#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 "ice1712.h"
#include "envy24ht.h"
#include "phase.h"
#include <sound/tlv.h>
struct phase28_spec { … };
#define WM_DAC_ATTEN …
#define WM_DAC_MASTER_ATTEN …
#define WM_DAC_DIG_ATTEN …
#define WM_DAC_DIG_MASTER_ATTEN …
#define WM_PHASE_SWAP …
#define WM_DAC_CTRL1 …
#define WM_MUTE …
#define WM_DAC_CTRL2 …
#define WM_INT_CTRL …
#define WM_MASTER …
#define WM_POWERDOWN …
#define WM_ADC_GAIN …
#define WM_ADC_MUX …
#define WM_OUT_MUX1 …
#define WM_OUT_MUX2 …
#define WM_RESET …
static const unsigned char wm_vol[256] = …;
#define WM_VOL_MAX …
#define WM_VOL_MUTE …
static const struct snd_akm4xxx akm_phase22 = …;
static const struct snd_ak4xxx_private akm_phase22_priv = …;
static int phase22_init(struct snd_ice1712 *ice)
{ … }
static int phase22_add_controls(struct snd_ice1712 *ice)
{ … }
static const unsigned char phase22_eeprom[] = …;
static const unsigned char phase28_eeprom[] = …;
static void phase28_spi_write(struct snd_ice1712 *ice, unsigned int cs,
unsigned int data, int bits)
{ … }
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 wm_set_vol(struct snd_ice1712 *ice, unsigned int index,
unsigned short vol, unsigned short master)
{ … }
#define wm_pcm_mute_info …
static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_pcm_mute_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 phase28_init(struct snd_ice1712 *ice)
{ … }
static int wm_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_mute_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo) { … }
static int wm_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define wm_master_mute_info …
static int wm_master_mute_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_master_mute_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define PCM_0dB …
#define PCM_RES …
#define PCM_MIN …
static int wm_pcm_vol_info(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_info *uinfo)
{ … }
static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int wm_pcm_vol_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
#define phase28_deemp_info …
static int phase28_deemp_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int phase28_deemp_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int phase28_oversampling_info(struct snd_kcontrol *k,
struct snd_ctl_elem_info *uinfo)
{ … }
static int phase28_oversampling_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{ … }
static int phase28_oversampling_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_SCALE(db_scale_wm_pcm, -6400, 50, 1);
static const struct snd_kcontrol_new phase28_dac_controls[] = …;
static const struct snd_kcontrol_new wm_controls[] = …;
static int phase28_add_controls(struct snd_ice1712 *ice)
{ … }
struct snd_ice1712_card_info snd_vt1724_phase_cards[] = …;