diff options
author | Chris Wulff <crwulff@gmail.com> | 2020-03-14 19:54:49 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-03-14 20:25:03 +0300 |
commit | 55f7326170d9e83e2d828591938e1101982a679c (patch) | |
tree | 69e4664c8d57d9f34d0fed279c61249ab48cfe41 /sound/usb/quirks.c | |
parent | 0aef31b75272a9894f7205c2c888c7dbc248ce94 (diff) | |
download | linux-55f7326170d9e83e2d828591938e1101982a679c.tar.xz |
ALSA: usb-audio: Create a registration quirk for Kingston HyperX Amp (0951:16d8)
Create a quirk that allows special processing and/or
skipping the call to snd_card_register.
For HyperX AMP, which uses two interfaces, but only has
a capture stream in the second, this allows the capture
stream to merge with the first PCM.
Signed-off-by: Chris Wulff <crwulff@gmail.com>
Link: https://lore.kernel.org/r/20200314165449.4086-3-crwulff@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r-- | sound/usb/quirks.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 3cc745fe24d8..d605aff801b8 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1808,3 +1808,17 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip, break; } } + +int snd_usb_registration_quirk(struct snd_usb_audio *chip, + int iface) +{ + switch (chip->usb_id) { + case USB_ID(0x0951, 0x16d8): /* Kingston HyperX AMP */ + /* Register only when we reach interface 2 so that streams can + * merge correctly into PCMs from interface 0 + */ + return (iface != 2); + } + /* Register as normal */ + return 0; +} |