aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pcm.c b/pcm.c
index 010d054..2ef7075 100644
--- a/pcm.c
+++ b/pcm.c
@@ -542,9 +542,14 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
sparams.start_threshold = config->start_threshold;
/* 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;
+ if (!config->stop_threshold) {
+ if (pcm->flags & PCM_IN)
+ pcm->config.stop_threshold = sparams.stop_threshold =
+ config->period_count * config->period_size * 10;
+ else
+ pcm->config.stop_threshold = sparams.stop_threshold =
+ config->period_count * config->period_size;
+ }
else
sparams.stop_threshold = config->stop_threshold;