Skip to content

Commit 48f07a3

Browse files
author
Li Li
committed
ALSA: pcm: change timeout to 100ms
The previous 10s timeout is way too much. Change-Id: I2b79d74c692fc77d853e2b2dcdb095c2b7aff44f Signed-off-by: Li Li <[email protected]>
1 parent 2881bae commit 48f07a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sound/core/pcm_lib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1931,12 +1931,12 @@ static int wait_for_avail(struct snd_pcm_substream *substream,
19311931
if (runtime->no_period_wakeup)
19321932
wait_time = MAX_SCHEDULE_TIMEOUT;
19331933
else {
1934-
wait_time = 10;
1934+
wait_time = 100;
19351935
if (runtime->rate) {
1936-
long t = runtime->period_size * 2 / runtime->rate;
1936+
long t = runtime->period_size * 2 * 1000 / runtime->rate;
19371937
wait_time = max(t, wait_time);
19381938
}
1939-
wait_time = msecs_to_jiffies(wait_time * 1000);
1939+
wait_time = msecs_to_jiffies(wait_time);
19401940
}
19411941

19421942
for (;;) {

0 commit comments

Comments
 (0)