All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hector Martin <marcan@marcan.st>
To: alsa-devel@alsa-project.org
Cc: Takashi Iwai <tiwai@suse.de>, Hector Martin <marcan@marcan.st>,
	stable@vger.kernel.org
Subject: [PATCH v2] ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109
Date: Mon, 10 Aug 2020 13:53:19 +0900	[thread overview]
Message-ID: <20200810045319.128745-1-marcan@marcan.st> (raw)
In-Reply-To: <d0567d6f-a5f6-9d3f-e5a9-cebdba7d1fa0@marcan.st>

Matching by device matches all interfaces, which breaks the video/HID
portions of the device depending on module load order.

Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin <marcan@marcan.st>
---
 sound/usb/quirks-table.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h
index 9092cc0aa807..7cbb3d591a7f 100644
--- a/sound/usb/quirks-table.h
+++ b/sound/usb/quirks-table.h
@@ -3645,7 +3645,13 @@ ALC1220_VB_DESKTOP(0x26ce, 0x0a01), /* Asrock TRX40 Creator */
  * with.
  */
 {
-	USB_DEVICE(0x534d, 0x2109),
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+		       USB_DEVICE_ID_MATCH_INT_CLASS |
+		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+	.idVendor = 0x534d,
+	.idProduct = 0x2109,
+	.bInterfaceClass = USB_CLASS_AUDIO,
+	.bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL,
 	.driver_info = (unsigned long) &(const struct snd_usb_audio_quirk) {
 		.vendor_name = "MacroSilicon",
 		.product_name = "MS2109",
-- 
2.27.0


       reply	other threads:[~2020-08-10  5:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d0567d6f-a5f6-9d3f-e5a9-cebdba7d1fa0@marcan.st>
2020-08-10  4:53 ` Hector Martin [this message]
2020-08-10  6:59   ` [PATCH v2] ALSA: usb-audio: fix overeager device match for MacroSilicon MS2109 Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200810045319.128745-1-marcan@marcan.st \
    --to=marcan@marcan.st \
    --cc=alsa-devel@alsa-project.org \
    --cc=stable@vger.kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.