#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/mutex.h>
#include <sound/core.h>
#include <sound/info.h>
#include <sound/tlv.h>
#include "ice1712.h"
#include "envy24ht.h"
#include "prodigy_hifi.h"
struct prodigy_hifi_spec { … };
#define WM_DEV …
#define WM_HP_ATTEN_L …
#define WM_HP_ATTEN_R …
#define WM_HP_MASTER …
#define WM_DAC_ATTEN_L …
#define WM_DAC_ATTEN_R …
#define WM_DAC_MASTER …
#define WM_PHASE_SWAP …
#define WM_DAC_CTRL1 …
#define WM_DAC_MUTE …
#define WM_DAC_CTRL2 …
#define WM_DAC_INT …
#define WM_ADC_INT …
#define WM_MASTER_CTRL …
#define WM_POWERDOWN …
#define WM_ADC_ATTEN_L …
#define WM_ADC_ATTEN_R …
#define WM_ALC_CTRL1 …
#define WM_ALC_CTRL2 …
#define WM_ALC_CTRL3 …
#define WM_NOISE_GATE …
#define WM_LIMITER …
#define WM_ADC_MUX …
#define WM_OUT_MUX …
#define WM_RESET …
#define WM_AIN1 …
#define WM_AIN2 …
#define WM_AIN3 …
#define WM_AIN4 …
#define WM_AIN5 …
#define WM8766_SPI_CLK …
#define WM8766_SPI_MD …
#define WM8766_SPI_ML …
#define WM8766_DAC_CTRL …
#define WM8766_INT_CTRL …
#define WM8766_DAC_CTRL2 …
#define WM8766_DAC_CTRL3 …
#define WM8766_RESET …
#define WM8766_LDA1 …
#define WM8766_LDA2 …
#define WM8766_LDA3 …
#define WM8766_RDA1 …
#define WM8766_RDA2 …
#define WM8766_RDA3 …
#define WM8766_MUTE1 …
#define WM8766_MUTE2 …
#define AK4396_ADDR …
#define AK4396_CSN …
#define AK4396_CCLK …
#define AK4396_CDTI …
#define AK4396_CTRL1 …
#define AK4396_CTRL2 …
#define AK4396_CTRL3 …
#define AK4396_LCH_ATT …
#define AK4396_RCH_ATT …
static unsigned short wm_get(struct snd_ice1712 *ice, int reg)
{ … }
static void wm_put_nocache(struct snd_ice1712 *ice, int reg, unsigned short val)
{ … }
static void wm_put(struct snd_ice1712 *ice, int reg, unsigned short val)
{ … }
static void set_gpio_bit(struct snd_ice1712 *ice, unsigned int bit, int val)
{ … }
static void wm8766_spi_send_word(struct snd_ice1712 *ice, unsigned int data)
{ … }
static void wm8766_spi_write(struct snd_ice1712 *ice, unsigned int reg,
unsigned int data)
{ … }
static void ak4396_send_word(struct snd_ice1712 *ice, unsigned int data)
{ … }
static void ak4396_write(struct snd_ice1712 *ice, unsigned int reg,
unsigned int data)
{ … }
static int ak4396_dac_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int ak4396_dac_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int ak4396_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static const DECLARE_TLV_DB_SCALE(db_scale_wm_dac, -12700, 100, 1);
static const DECLARE_TLV_DB_LINEAR(ak4396_db_scale, TLV_DB_GAIN_MUTE, 0);
static const struct snd_kcontrol_new prodigy_hd2_controls[] = …;
#define WM_VOL_MAX …
#define WM_VOL_MUTE …
#define DAC_0dB …
#define DAC_RES …
#define DAC_MIN …
static void wm_set_vol(struct snd_ice1712 *ice, unsigned int index,
unsigned short vol, unsigned short master)
{ … }
static void wm8766_set_vol(struct snd_ice1712 *ice, unsigned int index,
unsigned short vol, unsigned short master)
{ … }
static int wm_dac_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm_dac_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_dac_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm8766_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm8766_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm8766_vol_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_master_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm_master_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_master_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_adc_mux_enum_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm_adc_mux_enum_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_adc_mux_enum_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define ADC_0dB …
#define ADC_RES …
#define ADC_MIN …
static int wm_adc_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm_adc_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_adc_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define wm_adc_mux_info …
static int wm_adc_mux_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_adc_mux_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define wm_bypass_info …
static int wm_bypass_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_bypass_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define wm_chswap_info …
static int wm_chswap_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_chswap_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static const struct snd_kcontrol_new prodigy_hifi_controls[] = …;
static void wm_proc_regs_write(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{ … }
static void wm_proc_regs_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{ … }
static void wm_proc_init(struct snd_ice1712 *ice)
{ … }
static int prodigy_hifi_add_controls(struct snd_ice1712 *ice)
{ … }
static int prodigy_hd2_add_controls(struct snd_ice1712 *ice)
{ … }
static void wm8766_init(struct snd_ice1712 *ice)
{ … }
static void wm8776_init(struct snd_ice1712 *ice)
{ … }
#ifdef CONFIG_PM_SLEEP
static int prodigy_hifi_resume(struct snd_ice1712 *ice)
{ … }
#endif
static int prodigy_hifi_init(struct snd_ice1712 *ice)
{ … }
static void ak4396_init(struct snd_ice1712 *ice)
{ … }
#ifdef CONFIG_PM_SLEEP
static int prodigy_hd2_resume(struct snd_ice1712 *ice)
{ … }
#endif
static int prodigy_hd2_init(struct snd_ice1712 *ice)
{ … }
static const unsigned char prodigy71hifi_eeprom[] = …;
static const unsigned char prodigyhd2_eeprom[] = …;
static const unsigned char fortissimo4_eeprom[] = …;
struct snd_ice1712_card_info snd_vt1724_prodigy_hifi_cards[] = …;