blob: 2cd71ed1201f93ea8e6b54e1d487a84751e09885 [file] [log] [blame]
Daniel Macke5779992010-03-04 19:46:13 +01001#ifndef __USBAUDIO_QUIRKS_H
2#define __USBAUDIO_QUIRKS_H
3
Daniel Mack2b58fd52012-09-04 10:23:07 +02004struct audioformat;
5struct snd_usb_endpoint;
6struct snd_usb_substream;
7
Daniel Macke5779992010-03-04 19:46:13 +01008int snd_usb_create_quirk(struct snd_usb_audio *chip,
9 struct usb_interface *iface,
10 struct usb_driver *driver,
11 const struct snd_usb_audio_quirk *quirk);
12
13int snd_usb_apply_interface_quirk(struct snd_usb_audio *chip,
14 int iface,
15 int altno);
16
17int snd_usb_apply_boot_quirk(struct usb_device *dev,
18 struct usb_interface *intf,
19 const struct snd_usb_audio_quirk *quirk);
20
21void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
22 struct audioformat *fmt);
23
Joe Turnerb62b9982015-02-16 20:44:33 +000024bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip);
25
Daniel Macke5779992010-03-04 19:46:13 +010026int snd_usb_is_big_endian_format(struct snd_usb_audio *chip,
27 struct audioformat *fp);
28
Daniel Mack2b58fd52012-09-04 10:23:07 +020029void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep);
30
Daniel Mack21bb5aa2013-04-10 00:56:03 +080031void snd_usb_set_interface_quirk(struct usb_device *dev);
Daniel Mack2b58fd52012-09-04 10:23:07 +020032void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
33 __u8 request, __u8 requesttype, __u16 value,
34 __u16 index, void *data, __u16 size);
35
Jurgen Kramer6874daa2014-11-28 17:32:54 +010036int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
37 struct audioformat *fmt);
38
Daniel Mack126825e2013-04-17 00:01:40 +080039u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
40 struct audioformat *fp,
41 unsigned int sample_bytes);
42
Daniel Macke5779992010-03-04 19:46:13 +010043#endif /* __USBAUDIO_QUIRKS_H */