summaryrefslogtreecommitdiff
path: root/sound/usb/endpoint.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-08-24 08:57:20 +0300
committerTakashi Iwai <tiwai@suse.de>2021-08-24 08:58:16 +0300
commit6e41340994e5b5bd9262246e8d1f64406d72ab8b (patch)
tree86706db314a654c2222d3549a7d5dab4c56f413f /sound/usb/endpoint.c
parent1a10d5b0f6c2aebecec5f6f99d651bc2e2b4ce44 (diff)
downloadlinux-6e41340994e5b5bd9262246e8d1f64406d72ab8b.tar.xz
ALSA: usb-audio: Move set-interface-first workaround into common quirk
The recent quirk for WALKMAN (commit 7af5a14371c1: "ALSA: usb-audio: Fix regression on Sony WALKMAN NW-A45 DAC") may be required for other devices and is worth to be put into the common quirk flags. This patch adds a new quirk flag bit QUIRK_FLAG_SET_IFACE_FIRST and a quirk table entry for the device. Link: https://lore.kernel.org/r/20210824055720.9240-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/endpoint.c')
-rw-r--r--sound/usb/endpoint.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sound/usb/endpoint.c b/sound/usb/endpoint.c
index e6d58d7674a0..79a8c569c62b 100644
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -1293,10 +1293,8 @@ 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))
+ /* Workaround for devices that require the interface setup at first like UAC1 */
+ if (chip->quirk_flags & QUIRK_FLAG_SET_IFACE_FIRST)
iface_first = true;
if (iface_first) {
err = endpoint_set_interface(chip, ep, true);