quirks.h (1719B)
1/* SPDX-License-Identifier: GPL-2.0 */ 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 const struct audioformat *fmt); 30 31int snd_usb_is_big_endian_format(struct snd_usb_audio *chip, 32 const struct audioformat *fp); 33 34void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep); 35 36void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe, 37 __u8 request, __u8 requesttype, __u16 value, 38 __u16 index, void *data, __u16 size); 39 40int snd_usb_select_mode_quirk(struct snd_usb_audio *chip, 41 const struct audioformat *fmt); 42 43u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip, 44 struct audioformat *fp, 45 unsigned int sample_bytes); 46 47void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip, 48 struct audioformat *fp, 49 int stream); 50 51bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface); 52 53void snd_usb_init_quirk_flags(struct snd_usb_audio *chip); 54 55#endif /* __USBAUDIO_QUIRKS_H */