]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Introduce quirk_flags field
authorTakashi Iwai <tiwai@suse.de>
Thu, 29 Jul 2021 07:38:47 +0000 (09:38 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 2 Aug 2021 07:05:53 +0000 (09:05 +0200)
commitac758a5e0f5a1ca400ffd18160bcba92821b4d5c
treeb68e87eb6e04274a76ec1d4aaf2f5b5df0799b85
parentd08fbc832ac9c060559e3d7f8a7b5b719f49309b
ALSA: usb-audio: Introduce quirk_flags field

As more and more device-specific workarounds came up and gathered in
various places, it becomes harder to manage.  Now it's time to clean
up and collect workarounds more consistently and make them more easily
applicable.

This patch is the first step for that: a new field quirk_flags is
introduced in snd_usb_audio struct to contain the bit flags for
various device-specific quirks.  Those are separate one from the
quirks in quirks-table.h; the quirks-table.h entries are for more
intrusive stuff that needs the descriptor override, while the new
quirk_flags is for easier ones that are tied with the vendor:product
IDs.

In this patch, as the first example, we convert the list of devices
and vendors to ignore GET_SAMPLE_RATE, formerly defined in
snb_usb_get_sample_rate_quirk().

Link: https://lore.kernel.org/r/20210729073855.19043-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/card.c
sound/usb/clock.c
sound/usb/quirks.c
sound/usb/quirks.h
sound/usb/usbaudio.h