]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Switch back to non-latency mode at a later point
authorTakashi Iwai <tiwai@suse.de>
Fri, 19 Nov 2021 10:24:59 +0000 (11:24 +0100)
committerTakashi Iwai <tiwai@suse.de>
Fri, 19 Nov 2021 10:27:41 +0000 (11:27 +0100)
commit0e7fd59b08b00a71c857fee75d14b5848b4d5d60
treedae42795c04fa5206b4a27beb17f91951c3e74d7
parent1afbf4443bee586b82d515656337e9f1f42cdaf8
ALSA: usb-audio: Switch back to non-latency mode at a later point

The recent regression report revealed that the judgment of the
low-latency playback mode based on the runtime->stop_threshold cannot
work reliably at the prepare stage, as sw_params call may happen at
any time, and PCM dmix actually sets it up after the prepare call.
This ended up with the stall of the stream as PCM ack won't be issued
at all.

For addressing this, check the free-wheeling mode again at the PCM
trigger right before starting the stream again, and allow switching to
the non-LL mode at a late stage.

Fixes: e52a43f7870d ("ALSA: usb-audio: Improved lowlatency playback support")
Reported-and-tested-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Link: https://lore.kernel.org/r/20211117161855.m45mxcqszkfcetai@box.shutemov.name
Link: https://lore.kernel.org/r/20211119102459.7055-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c