#include <linux/slab.h>
#include <linux/usb.h>
#include <linux/usb/audio-v2.h>
#include <sound/core.h>
#include <sound/control.h>
#include "usbaudio.h"
#include "mixer.h"
#include "helper.h"
#include "mixer_us16x08.h"
static const char route_msg[] = …;
static const char mix_init_msg1[] = …;
static const char mix_init_msg2[] = …;
static const char mix_msg_in[] = …;
static const char mix_msg_out[] = …;
static const char bypass_msg_out[] = …;
static const char bus_msg_out[] = …;
static const char comp_msg[] = …;
static const char eqs_msq[] = …;
static const char ratio_map[] = …;
static const char *const route_names[] = …;
static int snd_us16x08_recv_urb(struct snd_usb_audio *chip,
unsigned char *buf, int size)
{ … }
static int snd_us16x08_send_urb(struct snd_usb_audio *chip, char *buf, int size)
{ … }
static int snd_us16x08_route_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_us16x08_route_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_route_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_master_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_us16x08_master_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_master_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_bus_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_bus_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_channel_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_channel_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_mix_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_us16x08_comp_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_comp_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_eqswitch_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_eqswitch_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_eq_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_eq_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_meter_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int snd_get_meter_comp_index(struct snd_us16x08_meter_store *store)
{ … }
static void get_meter_levels_from_urb(int s,
struct snd_us16x08_meter_store *store,
u8 *meter_urb)
{ … }
static int snd_us16x08_meter_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int snd_us16x08_meter_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new snd_us16x08_ch_boolean_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_ch_int_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_pan_int_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_master_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_route_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_bus_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_compswitch_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_comp_threshold_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_comp_ratio_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_comp_gain_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_comp_attack_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_comp_release_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_eq_gain_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_eq_low_freq_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_eq_mid_freq_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_eq_mid_width_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_eq_high_freq_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_eq_switch_ctl = …;
static const struct snd_kcontrol_new snd_us16x08_meter_ctl = …;
static struct snd_us16x08_comp_store *snd_us16x08_create_comp_store(void)
{ … }
static struct snd_us16x08_eq_store *snd_us16x08_create_eq_store(void)
{ … }
static struct snd_us16x08_meter_store *snd_us16x08_create_meter_store(void)
{ … }
static void elem_private_free(struct snd_kcontrol *kctl)
{ … }
static int add_new_ctl(struct usb_mixer_interface *mixer,
const struct snd_kcontrol_new *ncontrol,
int index, int val_type, int channels,
const char *name, void *opt,
bool do_private_free,
struct usb_mixer_elem_info **elem_ret)
{ … }
static const struct snd_us16x08_control_params eq_controls[] = …;
static const struct snd_us16x08_control_params comp_controls[] = …;
static const struct snd_us16x08_control_params channel_controls[] = …;
static const struct snd_us16x08_control_params master_controls[] = …;
int snd_us16x08_controls_create(struct usb_mixer_interface *mixer)
{ … }