]> git.proxmox.com Git - mirror_ubuntu-jammy-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)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:49:04 +0000 (09:49 +0100)
commit43e6929d431adc4cfaaff6bf96bb26285539f52a
tree2261d54f1b8ec2e83fe1f333977bbf6f2337b2e8
parent96acb95323c5e8a42dd5ede526f6816da558ed5c
ALSA: usb-audio: Switch back to non-latency mode at a later point

BugLink: https://bugs.launchpad.net/bugs/1953731
commit eee5d6f1356a016105a974fb176b491288439efa upstream.

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: d5f871f89e21 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
sound/usb/pcm.c