Update to latest tinyalsa
3502113 pcm: fix pcm capture dropping samples
Change-Id: Icae0f32a39e58dda55a3b9a0094263ba781d65a7
diff --git a/pcm.c b/pcm.c
index 04d4396..9324f38 100644
--- a/pcm.c
+++ b/pcm.c
@@ -551,9 +551,14 @@
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;