Skip to content

Commit

Permalink
ALSA: usb-audio: Drop implicit fb quirk entries dubbed for capture
Browse files Browse the repository at this point in the history
The implicit feedback quirk table contains the entries that also
appear in the capture quirks, and those are all handled to be
skipped.  For the code simplicity, drop the duped entries in the
playback quirk table, and check the match with the capture quirk table
instead.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=212519
Link: https://lore.kernel.org/r/20210406113837.32041-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Takashi Iwai committed Apr 7, 2021
1 parent 5fb4541 commit 884c709
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions sound/usb/implicit.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,6 @@ static const struct snd_usb_implicit_fb_match playback_implicit_fb_quirks[] = {
.type = IMPLICIT_FB_FIXED,
.ep_num = 0x84, .iface = 0 }, /* MOTU MicroBook II */

/* No quirk for playback but with capture quirk (see below) */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x0130), /* BOSS BR-80 */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x0171), /* BOSS RC-505 */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x0185), /* BOSS GP-10 */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x0189), /* BOSS GT-100v2 */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d6), /* BOSS GT-1 */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x01d8), /* BOSS Katana */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x01e5), /* BOSS GT-001 */
IMPLICIT_FB_SKIP_DEV(0x0582, 0x0203), /* BOSS AD-10 */

{} /* terminator */
};

Expand Down Expand Up @@ -278,6 +268,11 @@ static int audioformat_implicit_fb_quirk(struct snd_usb_audio *chip,
}
}

/* Don't apply playback quirks for the devices with capture quirk */
p = find_implicit_fb_entry(chip, capture_implicit_fb_quirks, alts);
if (p && p->type == IMPLICIT_FB_FIXED)
return 0; /* no quirk */

/* Generic UAC2 implicit feedback */
if (attr == USB_ENDPOINT_SYNC_ASYNC &&
alts->desc.bInterfaceClass == USB_CLASS_AUDIO &&
Expand Down

0 comments on commit 884c709

Please sign in to comment.