Commit 884c7094 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: usb-audio: Drop implicit fb quirk entries dubbed for capture

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: default avatarTakashi Iwai <tiwai@suse.de>
parent 5fb45414
Loading
Loading
Loading
Loading
+5 −10
Original line number Diff line number Diff line
@@ -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 */
};

@@ -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 &&