diff options
author | Eric Laurent <elaurent@google.com> | 2012-01-30 11:31:56 -0800 |
---|---|---|
committer | Simon Wilson <simonwilson@google.com> | 2012-01-30 11:51:46 -0800 |
commit | 350211381a270fc6f5e02d3a75cbf6bf99152ec8 (patch) | |
tree | dbb633fd6ff7fdedeaf841cf6bf2aec9d02c6b81 | |
parent | 7db48587ba86708f4d1284014e07c88de044b2d4 (diff) |
pcm: fix pcm capture dropping samples
Commit ee9ba87d modified the stop threshold for capture and
playback and caused pcm samples to be dropped during capture.
Restore initial stop threshold for capture and leave new value
for playback.
-rw-r--r-- | pcm.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -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; |