diff options
author | Takashi Iwai <tiwai@suse.de> | 2021-07-29 10:38:47 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2021-08-02 10:05:53 +0300 |
commit | 4d4dee0aefec36e6d1568e844a9e75a2e165cb93 (patch) | |
tree | b68e87eb6e04274a76ec1d4aaf2f5b5df0799b85 /sound/usb/quirks.h | |
parent | 01099b1ad9101ca3f41071a87b9c496d9ea1d2ad (diff) | |
download | linux-4d4dee0aefec36e6d1568e844a9e75a2e165cb93.tar.xz |
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>
Diffstat (limited to 'sound/usb/quirks.h')
-rw-r--r-- | sound/usb/quirks.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/quirks.h b/sound/usb/quirks.h index 67a02303c820..0a49e074ae6a 100644 --- a/sound/usb/quirks.h +++ b/sound/usb/quirks.h @@ -28,8 +28,6 @@ int snd_usb_apply_boot_quirk_once(struct usb_device *dev, void snd_usb_set_format_quirk(struct snd_usb_substream *subs, const struct audioformat *fmt); -bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip); - int snd_usb_is_big_endian_format(struct snd_usb_audio *chip, const struct audioformat *fp); @@ -53,4 +51,6 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip, bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface); +void snd_usb_init_quirk_flags(struct snd_usb_audio *chip); + #endif /* __USBAUDIO_QUIRKS_H */ |