aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/common/debug.c
diff options
context:
space:
mode:
authorTakashi Iwai <[email protected]>2022-12-05 13:21:24 +0000
committerTakashi Iwai <[email protected]>2022-12-05 13:22:48 +0000
commit198dde085ecc0138e4f0b0b69d18a0c870f2dea6 (patch)
tree6f6850158c7361816c88cd8e51a5a45a725a3258 /drivers/usb/common/debug.c
parentALSA: pcm: Handle XRUN at trigger START (diff)
downloadkernel-198dde085ecc0138e4f0b0b69d18a0c870f2dea6.tar.gz
kernel-198dde085ecc0138e4f0b0b69d18a0c870f2dea6.zip
ALSA: usb-audio: Workaround for XRUN at prepare
Under certain situations (typically in the implicit feedback mode), USB-audio driver starts a playback stream already at PCM prepare call even before the actual PCM trigger-START call. For implicit feedback mode, this effectively starts two streams for data and sync endpoints, and if a coupled sync stream gets XRUN at this point, it results in an error -EPIPE. The problem is that currently we return -EPIPE error as is from the prepare. Then application tries to recover again via the prepare call, but it'll fail again because the sync-stop is missing. The sync-stop is missing because it's an internal trigger call (hence the PCM core isn't involved). Since we'll need to re-issue the prepare in anyway when trapped into this pitfall, this patch attempts to address it in a bit different way; namely, the driver tries to prepare once again after syncing the stop manually by itself -- so applications don't see the internal error. At the second failure, we report the error as is, but this shouldn't happen in normal situations. Reported-and-tested-by: Carl Hetherington <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
Diffstat (limited to 'drivers/usb/common/debug.c')
0 files changed, 0 insertions, 0 deletions