mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
3ed2b549b3
... in wait_for_avail() and snd_pcm_drain(). t was calculated in seconds, so it would be pretty much always zero, to be subsequently de-facto ignored due to being max(t, 10)'d. And then it (i.e., 10) would be treated as secs, which doesn't seem right. However, fixing it to properly calculate msecs would potentially cause timeouts when using twice the period size for the default timeout (which seems reasonable to me), so instead use the buffer size plus 10 percent to be on the safe side ... but that still seems insufficient, presumably because the hardware typically needs a moment to fire up. To compensate for this, we up the minimal timeout to 100ms, which is still two orders of magnitude less than the bogus minimum. substream->wait_time was also misinterpreted as jiffies, despite being documented as being in msecs. Only the soc/sof driver sets it - to 500, which looks very much like msecs were intended. Speaking of which, shouldn't snd_pcm_drain() also use substream-> wait_time? As a drive-by, make the debug messages on timeout less confusing. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Link: https://lore.kernel.org/r/20230405201219.2197774-1-oswald.buddenhagen@gmx.de Signed-off-by: Takashi Iwai <tiwai@suse.de> |
||
---|---|---|
.. | ||
oss | ||
seq | ||
compress_offload.c | ||
control_compat.c | ||
control_led.c | ||
control.c | ||
ctljack.c | ||
device.c | ||
hrtimer.c | ||
hwdep_compat.c | ||
hwdep.c | ||
info_oss.c | ||
info.c | ||
init.c | ||
isadma.c | ||
jack.c | ||
Kconfig | ||
Makefile | ||
memalloc_local.h | ||
memalloc.c | ||
memory.c | ||
misc.c | ||
pcm_compat.c | ||
pcm_dmaengine.c | ||
pcm_drm_eld.c | ||
pcm_iec958.c | ||
pcm_lib.c | ||
pcm_local.h | ||
pcm_memory.c | ||
pcm_misc.c | ||
pcm_native.c | ||
pcm_param_trace.h | ||
pcm_timer.c | ||
pcm_trace.h | ||
pcm.c | ||
rawmidi_compat.c | ||
rawmidi.c | ||
seq_device.c | ||
sound_oss.c | ||
sound.c | ||
timer_compat.c | ||
timer.c | ||
vmaster.c |