aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Laurent2012-01-30 13:31:56 -0600
committerSimon Wilson2012-01-30 14:01:24 -0600
commit1b32ddfd35e54b0a6ef1e43ca35dbc1547e5676a (patch)
treea68d6bcd2ae13b1c4ba02c550a4ce6c9579fd6b8
parent8dd366f47258eeda07910a99b29ba681fe7464a7 (diff)
downloadplatform-external-tinyalsa-1b32ddfd35e54b0a6ef1e43ca35dbc1547e5676a.tar.gz
platform-external-tinyalsa-1b32ddfd35e54b0a6ef1e43ca35dbc1547e5676a.tar.xz
platform-external-tinyalsa-1b32ddfd35e54b0a6ef1e43ca35dbc1547e5676a.zip
Update to latest tinyalsa
3502113 pcm: fix pcm capture dropping samples Change-Id: Icae0f32a39e58dda55a3b9a0094263ba781d65a7
-rw-r--r--pcm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/pcm.c b/pcm.c
index 04d4396..9324f38 100644
--- a/pcm.c
+++ b/pcm.c
@@ -551,9 +551,14 @@ struct pcm *pcm_open(unsigned int card, unsigned int device,
551 sparams.start_threshold = config->start_threshold; 551 sparams.start_threshold = config->start_threshold;
552 552
553 /* pick a high stop threshold - todo: does this need further tuning */ 553 /* pick a high stop threshold - todo: does this need further tuning */
554 if (!config->stop_threshold) 554 if (!config->stop_threshold) {
555 pcm->config.stop_threshold = sparams.stop_threshold = 555 if (pcm->flags & PCM_IN)
556 config->period_count * config->period_size; 556 pcm->config.stop_threshold = sparams.stop_threshold =
557 config->period_count * config->period_size * 10;
558 else
559 pcm->config.stop_threshold = sparams.stop_threshold =
560 config->period_count * config->period_size;
561 }
557 else 562 else
558 sparams.stop_threshold = config->stop_threshold; 563 sparams.stop_threshold = config->stop_threshold;
559 564