aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pcm.c b/pcm.c
index d12e5da..461eb5a 100644
--- a/pcm.c
+++ b/pcm.c
@@ -333,6 +333,9 @@ int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail,
if (rc < 0)
return -1;
+ if (pcm->mmap_status->state == PCM_STATE_XRUN)
+ return -1;
+
*tstamp = pcm->mmap_status->tstamp;
if (tstamp->tv_sec == 0 && tstamp->tv_nsec == 0)
return -1;
@@ -540,7 +543,7 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
/* pick a high stop threshold - todo: does this need further tuning */
if (!config->stop_threshold)
pcm->config.stop_threshold = sparams.stop_threshold =
- config->period_count * config->period_size * 10;
+ config->period_count * config->period_size;
else
sparams.stop_threshold = config->stop_threshold;