Skip to content

Commit d763145

Browse files
committed
ALSA: usb-audio: Skip probe of UA-101 devices
UA-101 device and co are supported by another driver, snd-ua101, but the USB audio class driver (snd-usb-audio) catches all and this resulted in the lack of functionality like missing MIDI devices. This patch introduces a sort of deny-listing for those devices to just return -ENODEV at probe in snd-usb-audio driver, so that it falls back to the probe by snd-ua101. BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212477 Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 473d5ae commit d763145

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

sound/usb/card.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,8 @@ static int usb_audio_probe(struct usb_interface *intf,
713713
quirk = get_alias_quirk(dev, id);
714714
if (quirk && quirk->ifnum >= 0 && ifnum != quirk->ifnum)
715715
return -ENXIO;
716+
if (quirk && quirk->ifnum == QUIRK_NODEV_INTERFACE)
717+
return -ENODEV;
716718

717719
err = snd_usb_apply_boot_quirk(dev, intf, quirk, id);
718720
if (err < 0)

sound/usb/quirks-table.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,6 +1674,27 @@ YAMAHA_DEVICE(0x7010, "UB99"),
16741674
}
16751675
}
16761676
},
1677+
1678+
/* UA101 and co are supported by another driver */
1679+
{
1680+
USB_DEVICE(0x0582, 0x0044), /* UA-1000 high speed */
1681+
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1682+
.ifnum = QUIRK_NODEV_INTERFACE
1683+
},
1684+
},
1685+
{
1686+
USB_DEVICE(0x0582, 0x007d), /* UA-101 high speed */
1687+
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1688+
.ifnum = QUIRK_NODEV_INTERFACE
1689+
},
1690+
},
1691+
{
1692+
USB_DEVICE(0x0582, 0x008d), /* UA-101 full speed */
1693+
.driver_info = (unsigned long) & (const struct snd_usb_audio_quirk) {
1694+
.ifnum = QUIRK_NODEV_INTERFACE
1695+
},
1696+
},
1697+
16771698
/* this catches most recent vendor-specific Roland devices */
16781699
{
16791700
.match_flags = USB_DEVICE_ID_MATCH_VENDOR |

sound/usb/usbaudio.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ struct snd_usb_audio {
7777
*/
7878

7979
/* special values for .ifnum */
80+
#define QUIRK_NODEV_INTERFACE -3 /* return -ENODEV */
8081
#define QUIRK_NO_INTERFACE -2
8182
#define QUIRK_ANY_INTERFACE -1
8283

0 commit comments

Comments
 (0)