1
2#ifndef __USBAUDIO_QUIRKS_H
3#define __USBAUDIO_QUIRKS_H
4
5struct audioformat;
6struct snd_usb_endpoint;
7struct snd_usb_substream;
8
9int 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);
13
14int snd_usb_apply_interface_quirk(struct snd_usb_audio *chip,
15 int iface,
16 int altno);
17
18int snd_usb_apply_boot_quirk(struct usb_device *dev,
19 struct usb_interface *intf,
20 const struct snd_usb_audio_quirk *quirk,
21 unsigned int usb_id);
22
23int snd_usb_apply_boot_quirk_once(struct usb_device *dev,
24 struct usb_interface *intf,
25 const struct snd_usb_audio_quirk *quirk,
26 unsigned int usb_id);
27
28void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
29 struct audioformat *fmt);
30
31bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip);
32
33int snd_usb_is_big_endian_format(struct snd_usb_audio *chip,
34 struct audioformat *fp);
35
36void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep);
37
38void snd_usb_set_interface_quirk(struct usb_device *dev);
39void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
40 __u8 request, __u8 requesttype, __u16 value,
41 __u16 index, void *data, __u16 size);
42
43int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
44 struct audioformat *fmt);
45
46u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
47 struct audioformat *fp,
48 unsigned int sample_bytes);
49
50void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
51 struct audioformat *fp,
52 int stream);
53
54bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface);
55
56#endif
57