]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-external-tinyalsa.git/blobdiff - pcm.c
merge in ics-mr1-release history after reset to ics-mr1
[android-sdk/platform-external-tinyalsa.git] / pcm.c
diff --git a/pcm.c b/pcm.c
index f499a05d6c3bcb1151ccd20b2813ba753b430a5e..04d4396a1acfb5eda9bd32473a0db26ea3d1ae14 100644 (file)
--- a/pcm.c
+++ b/pcm.c
@@ -341,7 +341,8 @@ int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail,
     if (rc < 0)
         return -1;
 
-    if (pcm->mmap_status->state == PCM_STATE_XRUN)
+    if ((pcm->mmap_status->state != PCM_STATE_RUNNING) &&
+            (pcm->mmap_status->state != PCM_STATE_DRAINING))
         return -1;
 
     *tstamp = pcm->mmap_status->tstamp;