#include <linux/init.h>
#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/audio.h>
#include <linux/usb/midi.h>
#include <linux/bits.h>
#include <sound/control.h>
#include <sound/core.h>
#include <sound/info.h>
#include <sound/pcm.h>
#include "usbaudio.h"
#include "card.h"
#include "mixer.h"
#include "mixer_quirks.h"
#include "midi.h"
#include "midi2.h"
#include "quirks.h"
#include "helper.h"
#include "endpoint.h"
#include "pcm.h"
#include "clock.h"
#include "stream.h"
static int create_composite_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk_comp)
{ … }
static int ignore_interface_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
static int create_any_midi_quirk(struct snd_usb_audio *chip,
struct usb_interface *intf,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
static int create_standard_audio_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
static int add_audio_stream_from_fixed_fmt(struct snd_usb_audio *chip,
struct audioformat *fp)
{ … }
static int create_fixed_stream_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
static int create_auto_pcm_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver)
{ … }
static int create_yamaha_midi_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
struct usb_host_interface *alts)
{ … }
static int create_roland_midi_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
struct usb_host_interface *alts)
{ … }
static int create_std_midi_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
struct usb_host_interface *alts)
{ … }
static int create_auto_midi_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver)
{ … }
static int create_autodetect_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
static int create_uaxx_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
static int create_standard_mixer_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
int snd_usb_create_quirk(struct snd_usb_audio *chip,
struct usb_interface *iface,
struct usb_driver *driver,
const struct snd_usb_audio_quirk *quirk)
{ … }
#define EXTIGY_FIRMWARE_SIZE_OLD …
#define EXTIGY_FIRMWARE_SIZE_NEW …
static int snd_usb_extigy_boot_quirk(struct usb_device *dev, struct usb_interface *intf)
{ … }
static int snd_usb_audigy2nx_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_fasttrackpro_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_cm106_write_int_reg(struct usb_device *dev, int reg, u16 value)
{ … }
static int snd_usb_cm106_boot_quirk(struct usb_device *dev)
{ … }
#define CM6206_REG0_DMA_MASTER …
#define CM6206_REG0_SPDIFO_RATE_48K …
#define CM6206_REG0_SPDIFO_RATE_96K …
#define CM6206_REG0_SPDIFO_CAT_CODE_GENERAL …
#define CM6206_REG0_SPDIFO_EMPHASIS_CD …
#define CM6206_REG0_SPDIFO_COPYRIGHT_NA …
#define CM6206_REG0_SPDIFO_NON_AUDIO …
#define CM6206_REG0_SPDIFO_PRO_FORMAT …
#define CM6206_REG1_TEST_SEL_CLK …
#define CM6206_REG1_PLLBIN_EN …
#define CM6206_REG1_SOFT_MUTE_EN …
#define CM6206_REG1_GPIO4_OUT …
#define CM6206_REG1_GPIO4_OE …
#define CM6206_REG1_GPIO3_OUT …
#define CM6206_REG1_GPIO3_OE …
#define CM6206_REG1_GPIO2_OUT …
#define CM6206_REG1_GPIO2_OE …
#define CM6206_REG1_GPIO1_OUT …
#define CM6206_REG1_GPIO1_OE …
#define CM6206_REG1_SPDIFO_INVALID …
#define CM6206_REG1_SPDIF_LOOP_EN …
#define CM6206_REG1_SPDIFO_DIS …
#define CM6206_REG1_SPDIFI_MIX …
#define CM6206_REG2_DRIVER_ON …
#define CM6206_REG2_HEADP_SEL_SIDE_CHANNELS …
#define CM6206_REG2_HEADP_SEL_SURROUND_CHANNELS …
#define CM6206_REG2_HEADP_SEL_CENTER_SUBW …
#define CM6206_REG2_HEADP_SEL_FRONT_CHANNELS …
#define CM6206_REG2_MUTE_HEADPHONE_RIGHT …
#define CM6206_REG2_MUTE_HEADPHONE_LEFT …
#define CM6206_REG2_MUTE_REAR_SURROUND_RIGHT …
#define CM6206_REG2_MUTE_REAR_SURROUND_LEFT …
#define CM6206_REG2_MUTE_SIDE_SURROUND_RIGHT …
#define CM6206_REG2_MUTE_SIDE_SURROUND_LEFT …
#define CM6206_REG2_MUTE_SUBWOOFER …
#define CM6206_REG2_MUTE_CENTER …
#define CM6206_REG2_MUTE_RIGHT_FRONT …
#define CM6206_REG2_MUTE_LEFT_FRONT …
#define CM6206_REG2_EN_BTL …
#define CM6206_REG2_MCUCLKSEL_1_5_MHZ …
#define CM6206_REG2_MCUCLKSEL_3_MHZ …
#define CM6206_REG2_MCUCLKSEL_6_MHZ …
#define CM6206_REG2_MCUCLKSEL_12_MHZ …
#define CM6206_REG3_FLYSPEED_DEFAULT …
#define CM6206_REG3_VRAP25EN …
#define CM6206_REG3_MSEL1 …
#define CM6206_REG3_SPDIFI_RATE_44_1K …
#define CM6206_REG3_SPDIFI_RATE_48K …
#define CM6206_REG3_SPDIFI_RATE_32K …
#define CM6206_REG3_PINSEL …
#define CM6206_REG3_FOE …
#define CM6206_REG3_ROE …
#define CM6206_REG3_CBOE …
#define CM6206_REG3_LOSE …
#define CM6206_REG3_HPOE …
#define CM6206_REG3_SPDIFI_CANREC …
#define CM6206_REG5_DA_RSTN …
#define CM6206_REG5_AD_RSTN …
#define CM6206_REG5_SPDIFO_AD2SPDO …
#define CM6206_REG5_SPDIFO_SEL_FRONT …
#define CM6206_REG5_SPDIFO_SEL_SIDE_SUR …
#define CM6206_REG5_SPDIFO_SEL_CEN_LFE …
#define CM6206_REG5_SPDIFO_SEL_REAR_SUR …
#define CM6206_REG5_CODECM …
#define CM6206_REG5_EN_HPF …
#define CM6206_REG5_T_SEL_DSDA4 …
#define CM6206_REG5_T_SEL_DSDA3 …
#define CM6206_REG5_T_SEL_DSDA2 …
#define CM6206_REG5_T_SEL_DSDA1 …
#define CM6206_REG5_T_SEL_DSDAD_NORMAL …
#define CM6206_REG5_T_SEL_DSDAD_FRONT …
#define CM6206_REG5_T_SEL_DSDAD_S_SURROUND …
#define CM6206_REG5_T_SEL_DSDAD_CEN_LFE …
#define CM6206_REG5_T_SEL_DSDAD_R_SURROUND …
static int snd_usb_cm6206_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_gamecon780_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_novation_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_accessmusic_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_nativeinstruments_boot_quirk(struct usb_device *dev)
{ … }
static void mbox2_setup_48_24_magic(struct usb_device *dev)
{ … }
#define MBOX2_FIRMWARE_SIZE …
#define MBOX2_BOOT_LOADING …
#define MBOX2_BOOT_READY …
static int snd_usb_mbox2_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_axefx3_boot_quirk(struct usb_device *dev)
{ … }
static void mbox3_setup_defaults(struct usb_device *dev)
{ … }
#define MBOX3_DESCRIPTOR_SIZE …
static int snd_usb_mbox3_boot_quirk(struct usb_device *dev)
{ … }
#define MICROBOOK_BUF_SIZE …
static int snd_usb_motu_microbookii_communicate(struct usb_device *dev, u8 *buf,
int buf_size, int *length)
{ … }
static int snd_usb_motu_microbookii_boot_quirk(struct usb_device *dev)
{ … }
static int snd_usb_motu_m_series_boot_quirk(struct usb_device *dev)
{ … }
#define MAUDIO_SET …
#define MAUDIO_SET_COMPATIBLE …
#define MAUDIO_SET_DTS …
#define MAUDIO_SET_96K …
#define MAUDIO_SET_24B …
#define MAUDIO_SET_DI …
#define MAUDIO_SET_MASK …
#define MAUDIO_SET_24B_48K_DI …
#define MAUDIO_SET_24B_48K_NOTDI …
#define MAUDIO_SET_16B_48K_DI …
#define MAUDIO_SET_16B_48K_NOTDI …
static int quattro_skip_setting_quirk(struct snd_usb_audio *chip,
int iface, int altno)
{ … }
static int audiophile_skip_setting_quirk(struct snd_usb_audio *chip,
int iface,
int altno)
{ … }
static int fasttrackpro_skip_setting_quirk(struct snd_usb_audio *chip,
int iface, int altno)
{ … }
static int s1810c_skip_setting_quirk(struct snd_usb_audio *chip,
int iface, int altno)
{ … }
int snd_usb_apply_interface_quirk(struct snd_usb_audio *chip,
int iface,
int altno)
{ … }
int snd_usb_apply_boot_quirk(struct usb_device *dev,
struct usb_interface *intf,
const struct snd_usb_audio_quirk *quirk,
unsigned int id)
{ … }
int snd_usb_apply_boot_quirk_once(struct usb_device *dev,
struct usb_interface *intf,
const struct snd_usb_audio_quirk *quirk,
unsigned int id)
{ … }
int snd_usb_is_big_endian_format(struct snd_usb_audio *chip,
const struct audioformat *fp)
{ … }
enum { … };
static void set_format_emu_quirk(struct snd_usb_substream *subs,
const struct audioformat *fmt)
{ … }
static int pioneer_djm_set_format_quirk(struct snd_usb_substream *subs,
u16 windex)
{ … }
static void mbox3_set_format_quirk(struct snd_usb_substream *subs,
const struct audioformat *fmt)
{ … }
void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
const struct audioformat *fmt)
{ … }
int snd_usb_select_mode_quirk(struct snd_usb_audio *chip,
const struct audioformat *fmt)
{ … }
void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep)
{ … }
void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
__u8 request, __u8 requesttype, __u16 value,
__u16 index, void *data, __u16 size)
{ … }
u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
struct audioformat *fp,
unsigned int sample_bytes)
{ … }
void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
struct audioformat *fp,
int stream)
{ … }
struct usb_audio_quirk_flags_table { … };
#define DEVICE_FLG(vid, pid, _flags) …
#define VENDOR_FLG(vid, _flags) …
static const struct usb_audio_quirk_flags_table quirk_flags_table[] = …;
void snd_usb_init_quirk_flags(struct snd_usb_audio *chip)
{ … }