aboutsummaryrefslogtreecommitdiffstats
path: root/sound/usb/implicit.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-04-21 08:41:00 +0200
committerTakashi Iwai <tiwai@suse.de>2022-04-21 10:17:17 +0200
commit0f1f7a6661394fe4a53db254c346d6aa2dd64397 (patch)
tree2689f84d3117cd31af33e088ed11862b4b7ca796 /sound/usb/implicit.c
parentMerge branch 'for-linus' into for-next (diff)
downloadlinux-dev-0f1f7a6661394fe4a53db254c346d6aa2dd64397.tar.xz
linux-dev-0f1f7a6661394fe4a53db254c346d6aa2dd64397.zip
ALSA: usb-audio: Add quirk bits for enabling/disabling generic implicit fb
For making easier to test, add the new quirk_flags bits 17 and 18 to enable and disable the generic implicit feedback mode. The bit 17 is equivalent with implicit_fb=1 option, applying the generic implicit feedback sync mode. OTOH, the bit 18 disables the implicit fb mode forcibly. Link: https://lore.kernel.org/r/20220421064101.12456-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/implicit.c')
-rw-r--r--sound/usb/implicit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/usb/implicit.c b/sound/usb/implicit.c
index 2d444ec74202..1fd087128538 100644
--- a/sound/usb/implicit.c
+++ b/sound/usb/implicit.c
@@ -350,7 +350,8 @@ static int audioformat_implicit_fb_quirk(struct snd_usb_audio *chip,
}
/* Try the generic implicit fb if available */
- if (chip->generic_implicit_fb)
+ if (chip->generic_implicit_fb ||
+ (chip->quirk_flags & QUIRK_FLAG_GENERIC_IMPLICIT_FB))
return add_generic_implicit_fb(chip, fmt, alts);
/* No quirk */
@@ -387,6 +388,8 @@ int snd_usb_parse_implicit_fb_quirk(struct snd_usb_audio *chip,
struct audioformat *fmt,
struct usb_host_interface *alts)
{
+ if (chip->quirk_flags & QUIRK_FLAG_SKIP_IMPLICIT_FB)
+ return 0;
if (fmt->endpoint & USB_DIR_IN)
return audioformat_capture_quirk(chip, fmt, alts);
else