summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-08-24 08:47:00 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-08 09:50:21 +0300
commita0bdfbbb6d794a20770e3d2ab1ac8f2b2d91c05e (patch)
treea4f75a9ede7fa4197fd3d68aca4dafd6d8907282
parent237d4c2abcf80c52e622cfcf17070ccf524131e9 (diff)
downloadlinux-a0bdfbbb6d794a20770e3d2ab1ac8f2b2d91c05e.tar.xz
ALSA: usb-audio: Fix regression on Sony WALKMAN NW-A45 DAC
commit 7af5a14371c1cf94a41f08eabb62a3faceec8911 upstream. We've got a regression report for USB-audio with Sony WALKMAN NW-A45 DAC device where no sound is audible on recent kernel. The bisection resulted in the code change wrt endpoint management, and the further debug session revealed that it was caused by the order of the USB audio interface. In the earlier code, we always set up the USB interface at first before other setups, but it was changed to be done at the last for UAC2/3, which is more standard way, while keeping the old way for UAC1. OTOH, this device seems requiring the setup of the interface at first just like UAC1. This patch works around the regression by applying the interface setup specifically for the WALKMAN at the beginning of the endpoint setup procedure. This change is written straightforwardly to be easily backported in old kernels. A further cleanup to move the workaround into a generic quirk section will follow in a later patch. Fixes: bf6313a0ff76 ("ALSA: usb-audio: Refactor endpoint management") Cc: <stable@vger.kernel.org> BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214105 Link: https://lore.kernel.org/r/20210824054700.8236-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/usb/endpoint.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index 014c43862826..3cb1a584bf80 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1286,6 +1286,11 @@ int snd_usb_endpoint_configure(struct snd_usb_audio *chip,
* to be set up before parameter setups
*/
iface_first = ep->cur_audiofmt->protocol == UAC_VERSION_1;
+ /* Workaround for Sony WALKMAN NW-A45 DAC;
+ * it requires the interface setup at first like UAC1
+ */
+ if (chip->usb_id == USB_ID(0x054c, 0x0b8c))
+ iface_first = true;
if (iface_first) {
err = endpoint_set_interface(chip, ep, true);
if (err < 0)