blob: a80e0ddd07364603ab2462e17664c743f8c4ce18 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Daniel Macke5779992010-03-04 19:46:13 +01002#ifndef __USBAUDIO_QUIRKS_H
3#define __USBAUDIO_QUIRKS_H
4
Daniel Mack2b58fd52012-09-04 10:23:07 +02005struct audioformat;
6struct snd_usb_endpoint;
7struct snd_usb_substream;
8
Daniel Macke5779992010-03-04 19:46:13 +01009int 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,
Takashi Iwai79289e22016-01-11 11:33:34 +010020 const struct snd_usb_audio_quirk *quirk,
21 unsigned int usb_id);
Daniel Macke5779992010-03-04 19:46:13 +010022
23void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
24 struct audioformat *fmt);
25
Joe Turnerb62b9982015-02-16 20:44:33 +000026bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip);
27
Daniel Macke5779992010-03-04 19:46:13 +010028int snd_usb_is_big_endian_format(struct snd_usb_audio *chip,
29 struct audioformat *fp);
30
Daniel Mack2b58fd52012-09-04 10:23:07 +020031void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep);
32
Daniel Mack21bb5aa2013-04-10 00:56:03 +080033void snd_usb_set_interface_quirk(struct usb_device *dev);
Daniel Mack2b58fd52012-09-04 10:23:07 +020034void 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);
37
Jurgen Kramer6874daa2014-11-28 17:32:54 +010038int snd_usb_select_mode_quirk(struct snd_usb_substream *subs,
39 struct audioformat *fmt);
40
Daniel Mack126825e2013-04-17 00:01:40 +080041u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
42 struct audioformat *fp,
43 unsigned int sample_bytes);
44
Ruslan Bilovolceb18f52018-03-19 03:46:02 +020045void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
46 struct audioformat *fp,
47 int stream);
48
Daniel Macke5779992010-03-04 19:46:13 +010049#endif /* __USBAUDIO_QUIRKS_H */