1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __USBAUDIO_QUIRKS_H
3 #define __USBAUDIO_QUIRKS_H
6 struct snd_usb_endpoint;
7 struct snd_usb_substream;
9 int snd_usb_create_quirk(struct snd_usb_audio *chip,
10 struct usb_interface *iface,
11 struct usb_driver *driver,
12 const struct snd_usb_audio_quirk *quirk);
14 int snd_usb_apply_interface_quirk(struct snd_usb_audio *chip,
18 int snd_usb_apply_boot_quirk(struct usb_device *dev,
19 struct usb_interface *intf,
20 const struct snd_usb_audio_quirk *quirk,
23 void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
24 struct audioformat *fmt);
26 bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip);
28 int snd_usb_is_big_endian_format(struct snd_usb_audio *chip,
29 struct audioformat *fp);
31 void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep);
33 void snd_usb_set_interface_quirk(struct usb_device *dev);
34 void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
35 __u8 request, __u8 requesttype, __u16 value,
36 __u16 index, void *data, __u16 size);
38 int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
39 struct audioformat *fmt);
41 u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
42 struct audioformat *fp,
43 unsigned int sample_bytes);
45 #endif /* __USBAUDIO_QUIRKS_H */