#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/string.h>
#include <sound/core.h>
#include <sound/tlv.h>
#include <sound/info.h>
#include "ice1712.h"
#include "envy24ht.h"
#include <sound/ak4113.h>
#include "quartet.h"
struct qtet_spec { … };
struct qtet_kcontrol_private { … };
enum { … };
static const char * const ext_clock_names[3] = …;
#define AK4113_ADDR …
#define AK4620_ADDR …
#define GPIO_D0 …
#define GPIO_D1_JACKDTC0 …
#define GPIO_D2_JACKDTC1 …
#define GPIO_D3 …
#define GPIO_D4_SPI_CDTO …
#define GPIO_D5_SPI_CCLK …
#define GPIO_D6_CD …
#define GPIO_D7_DD …
#define GPIO_CPLD_CSN …
#define GPIO_CPLD_RW …
#define GPIO_SPI_CSN0 …
#define GPIO_SPI_CSN1 …
#define GPIO_EX_GPIOE …
#define GPIO_SCR …
#define GPIO_MCR …
#define GPIO_SPI_ALL …
#define GPIO_DATA_MASK …
#define SCR_RELAY …
#define SCR_PHP_V …
#define SCR_MUTE …
#define SCR_PHP …
#define SCR_AIN12_SEL0 …
#define SCR_AIN12_SEL1 …
#define SCR_AIN34_SEL …
#define SCR_CODEC_PDN …
#define SCR_AIN12_LINE …
#define SCR_AIN12_MIC …
#define SCR_AIN12_LOWCUT …
#define MCR_IN12_MON12 …
#define MCR_IN12_MON34 …
#define MCR_IN34_MON12 …
#define MCR_IN34_MON34 …
#define MCR_OUT34_MON12 …
#define MCR_OUT12_MON34 …
#define CPLD_CKS0 …
#define CPLD_CKS1 …
#define CPLD_CKS2 …
#define CPLD_SYNC_SEL …
#define CPLD_WORD_SEL …
#define CPLD_COAX_OUT …
#define CPLD_IN12_SEL …
#define CPLD_IN34_SEL …
#define CPLD_CKS_44100HZ …
#define CPLD_CKS_48000HZ …
#define CPLD_CKS_88200HZ …
#define CPLD_CKS_96000HZ …
#define CPLD_CKS_176400HZ …
#define CPLD_CKS_192000HZ …
#define CPLD_CKS_MASK …
#define CPLD_EXT_SPDIF …
#define CPLD_EXT_WORDCLOCK_1FS …
#define CPLD_EXT_WORDCLOCK_256FS …
#define EXT_SPDIF_TYPE …
#define EXT_WORDCLOCK_1FS_TYPE …
#define EXT_WORDCLOCK_256FS_TYPE …
#define AK4620_DFS0 …
#define AK4620_DFS1 …
#define AK4620_CKS0 …
#define AK4620_CKS1 …
#define AK4620_DFS_REG …
#define AK4620_DEEMVOL_REG …
#define AK4620_SMUTE …
static char *get_binary(char *buffer, int value)
{ … }
static const unsigned int qtet_rates[] = …;
static const unsigned int cks_vals[] = …;
static const struct snd_pcm_hw_constraint_list qtet_rates_info = …;
static void qtet_ak4113_write(void *private_data, unsigned char reg,
unsigned char val)
{ … }
static unsigned char qtet_ak4113_read(void *private_data, unsigned char reg)
{ … }
static void qtet_akm_write(struct snd_akm4xxx *ak, int chip,
unsigned char addr, unsigned char data)
{ … }
static void qtet_akm_set_regs(struct snd_akm4xxx *ak, unsigned char addr,
unsigned char mask, unsigned char value)
{ … }
static void qtet_akm_set_rate_val(struct snd_akm4xxx *ak, unsigned int rate)
{ … }
#define AK_CONTROL(xname, xch) …
#define PCM_12_PLAYBACK_VOLUME …
#define PCM_34_PLAYBACK_VOLUME …
#define PCM_12_CAPTURE_VOLUME …
#define PCM_34_CAPTURE_VOLUME …
static const struct snd_akm4xxx_dac_channel qtet_dac[] = …;
static const struct snd_akm4xxx_adc_channel qtet_adc[] = …;
static const struct snd_akm4xxx akm_qtet_dac = …;
static void reg_write(struct snd_ice1712 *ice, unsigned int reg,
unsigned int data)
{ … }
static unsigned int get_scr(struct snd_ice1712 *ice)
{ … }
static unsigned int get_mcr(struct snd_ice1712 *ice)
{ … }
static unsigned int get_cpld(struct snd_ice1712 *ice)
{ … }
static void set_scr(struct snd_ice1712 *ice, unsigned int val)
{ … }
static void set_mcr(struct snd_ice1712 *ice, unsigned int val)
{ … }
static void set_cpld(struct snd_ice1712 *ice, unsigned int val)
{ … }
static void proc_regs_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{ … }
static void proc_init(struct snd_ice1712 *ice)
{ … }
static int qtet_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int qtet_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int qtet_ain12_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int qtet_ain12_sw_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int qtet_ain12_sw_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int qtet_php_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int qtet_php_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define PRIV_SW(xid, xbit, xreg) …
#define PRIV_ENUM2(xid, xbit, xreg, xtext1, xtext2) …
static const struct qtet_kcontrol_private qtet_privates[] = …;
static int qtet_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int qtet_sw_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int qtet_sw_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define qtet_sw_info …
#define QTET_CONTROL(xname, xtype, xpriv) …
static const struct snd_kcontrol_new qtet_controls[] = …;
static const char * const follower_vols[] = …;
static
DECLARE_TLV_DB_SCALE(qtet_master_db_scale, -6350, 50, 1);
static int qtet_add_controls(struct snd_ice1712 *ice)
{ … }
static inline int qtet_is_spdif_master(struct snd_ice1712 *ice)
{ … }
static unsigned int qtet_get_rate(struct snd_ice1712 *ice)
{ … }
static int get_cks_val(int rate)
{ … }
static void qtet_set_rate(struct snd_ice1712 *ice, unsigned int rate)
{ … }
static inline unsigned char qtet_set_mclk(struct snd_ice1712 *ice,
unsigned int rate)
{ … }
static int qtet_set_spdif_clock(struct snd_ice1712 *ice, int type)
{ … }
static int qtet_get_spdif_master_type(struct snd_ice1712 *ice)
{ … }
static void qtet_ak4113_change(struct ak4113 *ak4113, unsigned char c0,
unsigned char c1)
{ … }
static void qtet_spdif_in_open(struct snd_ice1712 *ice,
struct snd_pcm_substream *substream)
{ … }
static int qtet_init(struct snd_ice1712 *ice)
{ … }
static const unsigned char qtet_eeprom[] = …;
struct snd_ice1712_card_info snd_vt1724_qtet_cards[] = …;