Skip to contentSkip to conversation

snd-usb-audio: explicitly match Logitech QuickCam

PATCH In review Daniel Drake 3 participants 3 messages Apr 30, 2007 – May 2, 2007 Sound

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 snd-usb-audio: explicitly match Logitech QuickCam

Commit 93c8bf45e083b89dffe3a708363c15c1b220c723 modified the USB device matching behaviour to ignore interface class matches if the device class is vendor-specific.

This patch adds an explicit ID match for the Logitech QuickCam Messenger, which has a vendor specific device class (but standards-compliant audio interfaces).

This fixes a 2.6.20 regression where the audio component of this device was no longer usable.

http://bugs.gentoo.org/show_bug.cgi?id=175715
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/93822
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3040

Based on a patch from sergiom

sound/usb/usbquirks.h +15 -0
Index: linux/sound/usb/usbquirks.h
===================================================================
@@ -40,6 +40,21 @@
 	.bInterfaceClass = USB_CLASS_VENDOR_SPEC
 
 /*
+ * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
+ * class matches do not take effect without an explicit ID match.
+ */
+
+{
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+		       USB_DEVICE_ID_MATCH_INT_CLASS |
+		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+	.idVendor = 0x046d,
+	.idProduct = 0x08f0,
+	.bInterfaceClass = USB_CLASS_AUDIO,
+	.bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
+},
+
+/*
  * Yamaha devices
  */
#1 lore raw
Quoted 34 lines · Daniel Drake

Commit 93c8bf45e083b89dffe3a708363c15c1b220c723 modified the USB device matching behaviour to ignore interface class matches if the device class is vendor-specific.

This patch adds an explicit ID match for the Logitech QuickCam Messenger, which has a vendor specific device class (but standards-compliant audio interfaces).

This fixes a 2.6.20 regression where the audio component of this device was no longer usable.

http://bugs.gentoo.org/show_bug.cgi?id=175715
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/93822
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3040

Based on a patch from sergiom

Index: linux/sound/usb/usbquirks.h
===================================================================

sound/usb/usbquirks.h +7 -0
@@ -40,6 +40,21 @@
 	.bInterfaceClass = USB_CLASS_VENDOR_SPEC
 
 /*
+ * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
+ * class matches do not take effect without an explicit ID match.
+ */
+
+{
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+		       USB_DEVICE_ID_MATCH_INT_CLASS |

sound/usb/usbquirks.h line 59

Quoted 10 lines
sound/usb/usbquirks.h +8 -0
+		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+	.idVendor = 0x046d,
+	.idProduct = 0x08f0,
+	.bInterfaceClass = USB_CLASS_AUDIO,
+	.bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
+},
+
+/*
  * Yamaha devices
  */

This ought to fix the problem.

You might want to consider adding a macro to include/linux/usb.h to handle cases like this. Something like USB_DEVICE_AND_INTERFACE_INFO() -- it would make life easier for other people in the future when faced with the same problem.

Alan Stern

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

#2 lore raw
In reply to Daniel Drake

At Mon, 30 Apr 2007 04:13:00 +0100 (BST),

Quoted 12 lines · Daniel Drake

Commit 93c8bf45e083b89dffe3a708363c15c1b220c723 modified the USB device matching behaviour to ignore interface class matches if the device class is vendor-specific.

This patch adds an explicit ID match for the Logitech QuickCam Messenger, which has a vendor specific device class (but standards-compliant audio interfaces).

This fixes a 2.6.20 regression where the audio component of this device was no longer usable.

Quoted 7 lines

http://bugs.gentoo.org/show_bug.cgi?id=175715
https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.20/+bug/93822
https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3040

Based on a patch from sergiom

Thanks, I now applied it to ALSA tree.

Takashi

Quoted 32 lines

Index: linux/sound/usb/usbquirks.h
===================================================================

sound/usb/usbquirks.h +15 -0
@@ -40,6 +40,21 @@
 	.bInterfaceClass = USB_CLASS_VENDOR_SPEC
 
 /*
+ * Logitech QuickCam: bDeviceClass is vendor-specific, so generic interface
+ * class matches do not take effect without an explicit ID match.
+ */
+
+{
+	.match_flags = USB_DEVICE_ID_MATCH_DEVICE |
+		       USB_DEVICE_ID_MATCH_INT_CLASS |
+		       USB_DEVICE_ID_MATCH_INT_SUBCLASS,
+	.idVendor = 0x046d,
+	.idProduct = 0x08f0,
+	.bInterfaceClass = USB_CLASS_AUDIO,
+	.bInterfaceSubClass = USB_SUBCLASS_AUDIO_CONTROL
+},
+
+/*
  * Yamaha devices
  */
 

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel