regmap_update_bits(cmpnt->regmap, MT6351_ZCD_CON0, 0x7 << 1, 0x5 << 1); regmap_update_bits(cmpnt->regmap, MT6351_ZCD_CON0, 0x1 << 0, 0x1 << 0); } static void hp_zcd_disable(struct snd_soc_component *cmpnt) { regmap_write(cmpnt->regmap, MT6351_ZCD_CON0, 0x0000); } static const DECLARE_TLV_DB_SCALE(playback_tlv, -1000, 100, 0); static const DECLARE_TLV_DB_SCALE(pga_tlv, 0, 600, 0); static const struct snd_kcontrol_new mt6351_snd_controls[] = { /* dl pga gain */ SOC_DOUBLE_TLV("Headphone Volume", MT6351_ZCD_CON2, 0, 7, 0x12, 1, playback_tlv), SOC_DOUBLE_TLV("Lineout Volume", MT6351_ZCD_CON1, 0, 7, 0x12, 1, playback_tlv), SOC_SINGLE_TLV("Handset Volume", MT6351_ZCD_CON3, 0, 0x12, 1, playback_tlv), /* ul pga gain */ SOC_DOUBLE_R_TLV("PGA Volume", MT6351_AUDENC_ANA_CON0, MT6351_AUDENC_ANA_CON1, 8, 4, 0, pga_tlv), }; /* MUX */
SOC_ENUM("DRC FF Delay", drc_ff_delay), SOC_SINGLE("DRC Anticlip Switch", WM8903_DRC_0, 1, 1, 0), SOC_SINGLE("DRC QR Switch", WM8903_DRC_0, 2, 1, 0), SOC_SINGLE_TLV("DRC QR Threshold Volume", WM8903_DRC_0, 6, 3, 0, drc_tlv_max), SOC_ENUM("DRC QR Decay Rate", drc_qr_decay), SOC_SINGLE("DRC Smoothing Switch", WM8903_DRC_0, 3, 1, 0), SOC_SINGLE("DRC Smoothing Hysteresis Switch", WM8903_DRC_0, 0, 1, 0), SOC_ENUM("DRC Smoothing Threshold", drc_smoothing), SOC_SINGLE_TLV("DRC Startup Volume", WM8903_DRC_0, 6, 18, 0, drc_tlv_startup), SOC_DOUBLE_R_TLV("Digital Capture Volume", WM8903_ADC_DIGITAL_VOLUME_LEFT, WM8903_ADC_DIGITAL_VOLUME_RIGHT, 1, 96, 0, digital_tlv), SOC_ENUM("ADC Companding Mode", adc_companding), SOC_SINGLE("ADC Companding Switch", WM8903_AUDIO_INTERFACE_0, 3, 1, 0), SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8903_DAC_DIGITAL_0, 4, 8, 12, 0, digital_sidetone_tlv), /* DAC */ SOC_DOUBLE_R_TLV("Digital Playback Volume", WM8903_DAC_DIGITAL_VOLUME_LEFT, WM8903_DAC_DIGITAL_VOLUME_RIGHT, 1, 120, 0, digital_tlv), SOC_ENUM("DAC Soft Mute Rate", soft_mute), SOC_ENUM("DAC Mute Mode", mute_mode), SOC_SINGLE("DAC Mono Switch", WM8903_DAC_DIGITAL_1, 12, 1, 0), SOC_ENUM("DAC De-emphasis", dac_deemphasis), SOC_ENUM("DAC Companding Mode", dac_companding), SOC_SINGLE("DAC Companding Switch", WM8903_AUDIO_INTERFACE_0, 1, 1, 0), /* Headphones */ SOC_DOUBLE_R("Headphone Switch", WM8903_ANALOGUE_OUT1_LEFT, WM8903_ANALOGUE_OUT1_RIGHT, 8, 1, 1),
static const struct snd_kcontrol_new hsdacr_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_HSRCTL, 5, 1, 0); /* Handsfree DAC playback switches */ static const struct snd_kcontrol_new hfdacl_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFLCTL, 2, 1, 0); static const struct snd_kcontrol_new hfdacr_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFRCTL, 2, 1, 0); static const struct snd_kcontrol_new ep_driver_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_EARCTL, 0, 1, 0); static const struct snd_kcontrol_new twl6040_snd_controls[] = { /* Capture gains */ SOC_DOUBLE_TLV("Capture Preamplifier Volume", TWL6040_REG_MICGAIN, 6, 7, 1, 1, mic_preamp_tlv), SOC_DOUBLE_TLV("Capture Volume", TWL6040_REG_MICGAIN, 0, 3, 4, 0, mic_amp_tlv), /* Playback gains */ SOC_DOUBLE_TLV("Headset Playback Volume", TWL6040_REG_HSGAIN, 0, 4, 0xF, 1, hs_tlv), SOC_DOUBLE_R_TLV("Handsfree Playback Volume", TWL6040_REG_HFLGAIN, TWL6040_REG_HFRGAIN, 0, 0x1D, 1, hf_tlv), SOC_SINGLE_TLV("Earphone Playback Volume", TWL6040_REG_EARCTL, 1, 0xF, 1, ep_tlv), }; static const struct snd_soc_dapm_widget twl6040_dapm_widgets[] = { /* Inputs */ SND_SOC_DAPM_INPUT("MAINMIC"),
/* -16.5db min scale, 1.5db steps, no mute */ static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0); static const unsigned int boost_tlv[] = { TLV_DB_RANGE_HEAD(2), 0, 1, TLV_DB_SCALE_ITEM(0, 2000, 0), 1, 3, TLV_DB_SCALE_ITEM(2000, 1000, 0), }; /* 0db min scale, 6 db steps, no mute */ static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0); /* 0db min scalem 0.75db steps, no mute */ static const DECLARE_TLV_DB_SCALE(vdac_tlv, -3525, 75, 0); static const struct snd_kcontrol_new alc5632_vol_snd_controls[] = { /* left starts at bit 8, right at bit 0 */ /* 31 steps (5 bit), -46.5db scale */ SOC_DOUBLE_TLV("Speaker Playback Volume", ALC5632_SPK_OUT_VOL, 8, 0, 31, 1, hp_tlv), /* bit 15 mutes left, bit 7 right */ SOC_DOUBLE("Speaker Playback Switch", ALC5632_SPK_OUT_VOL, 15, 7, 1, 1), SOC_DOUBLE_TLV("Headphone Playback Volume", ALC5632_HP_OUT_VOL, 8, 0, 31, 1, hp_tlv), SOC_DOUBLE("Headphone Playback Switch", ALC5632_HP_OUT_VOL, 15, 7, 1, 1), }; static const struct snd_kcontrol_new alc5632_snd_controls[] = { SOC_DOUBLE_TLV("Auxout Playback Volume", ALC5632_AUX_OUT_VOL, 8, 0, 31, 1, hp_tlv), SOC_DOUBLE("Auxout Playback Switch", ALC5632_AUX_OUT_VOL, 15, 7, 1, 1), SOC_SINGLE_TLV("Voice DAC Playback Volume",
SOC_ENUM_SINGLE(AC97_PCI_SVID, 5, 2, wm9713_ng_type), /* noise gate type 17 */ SOC_ENUM_SINGLE(AC97_3D_CONTROL, 12, 3, wm9713_mic_select), /* mic selection 18 */ SOC_ENUM_SINGLE(MICB_MUX, 0, 2, wm9713_micb_select), /* mic selection 19 */ }; static const DECLARE_TLV_DB_SCALE(out_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(misc_tlv, -1500, 300, 0); static unsigned int mic_tlv[] = { TLV_DB_RANGE_HEAD(2), 0, 2, TLV_DB_SCALE_ITEM(1200, 600, 0), 3, 3, TLV_DB_SCALE_ITEM(3000, 0, 0), }; static const struct snd_kcontrol_new wm9713_snd_ac97_controls[] = { SOC_DOUBLE_TLV("Speaker Playback Volume", AC97_MASTER, 8, 0, 31, 1, out_tlv), SOC_DOUBLE("Speaker Playback Switch", AC97_MASTER, 15, 7, 1, 1), SOC_DOUBLE_TLV("Headphone Playback Volume", AC97_HEADPHONE, 8, 0, 31, 1, out_tlv), SOC_DOUBLE("Headphone Playback Switch", AC97_HEADPHONE, 15, 7, 1, 1), SOC_DOUBLE_TLV("Line In Volume", AC97_PC_BEEP, 8, 0, 31, 1, main_tlv), SOC_DOUBLE_TLV("PCM Playback Volume", AC97_PHONE, 8, 0, 31, 1, main_tlv), SOC_SINGLE_TLV("Mic 1 Volume", AC97_MIC, 8, 31, 1, main_tlv), SOC_SINGLE_TLV("Mic 2 Volume", AC97_MIC, 0, 31, 1, main_tlv), SOC_SINGLE_TLV("Mic 1 Preamp Volume", AC97_3D_CONTROL, 10, 3, 0, mic_tlv), SOC_SINGLE_TLV("Mic 2 Preamp Volume", AC97_3D_CONTROL, 12, 3, 0, mic_tlv), SOC_SINGLE("Mic Boost (+20dB) Switch", AC97_LINE, 5, 1, 0), SOC_SINGLE("Mic Headphone Mixer Volume", AC97_LINE, 0, 7, 1), SOC_SINGLE("Capture Switch", AC97_CD, 15, 1, 1),
}; static const struct soc_enum drc_qr_rate = SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_3, 0, 3, drc_qr_rate_text); static const char *drc_smooth_text[] = { "Low", "Medium", "High", }; static const struct soc_enum drc_smooth = SOC_ENUM_SINGLE(WM8993_DRC_CONTROL_1, 4, 3, drc_smooth_text); static const struct snd_kcontrol_new wm8993_snd_controls[] = { SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8993_DIGITAL_SIDE_TONE, 5, 9, 12, 0, sidetone_tlv), SOC_SINGLE("DRC Switch", WM8993_DRC_CONTROL_1, 15, 1, 0), SOC_ENUM("DRC Path", drc_path), SOC_SINGLE_TLV("DRC Compressor Threshold Volume", WM8993_DRC_CONTROL_2, 2, 60, 1, drc_comp_threash), SOC_SINGLE_TLV("DRC Compressor Amplitude Volume", WM8993_DRC_CONTROL_3, 11, 30, 1, drc_comp_amp), SOC_ENUM("DRC R0", drc_r0), SOC_ENUM("DRC R1", drc_r1), SOC_SINGLE_TLV("DRC Minimum Volume", WM8993_DRC_CONTROL_1, 2, 3, 1, drc_min_tlv), SOC_SINGLE_TLV("DRC Maximum Volume", WM8993_DRC_CONTROL_1, 0, 3, 0, drc_max_tlv), SOC_ENUM("DRC Attack Rate", drc_attack), SOC_ENUM("DRC Decay Rate", drc_decay),
}; static const struct snd_kcontrol_new wm8350_snd_controls[] = { SOC_ENUM("Playback Deemphasis", wm8350_enum[0]), SOC_ENUM("Playback DAC Inversion", wm8350_enum[1]), SOC_WM8350_DOUBLE_R_TLV("Playback PCM Volume", WM8350_DAC_DIGITAL_VOLUME_L, WM8350_DAC_DIGITAL_VOLUME_R, 0, 255, 0, dac_pcm_tlv), SOC_ENUM("Playback PCM Mute Function", wm8350_enum[2]), SOC_ENUM("Playback PCM Mute Speed", wm8350_enum[3]), SOC_ENUM("Playback PCM Filter", wm8350_enum[4]), SOC_ENUM("Capture PCM Filter", wm8350_enum[5]), SOC_ENUM("Capture PCM HP Filter", wm8350_enum[6]), SOC_ENUM("Capture ADC Inversion", wm8350_enum[7]), SOC_WM8350_DOUBLE_R_TLV("Capture PCM Volume", WM8350_ADC_DIGITAL_VOLUME_L, WM8350_ADC_DIGITAL_VOLUME_R, 0, 255, 0, adc_pcm_tlv), SOC_DOUBLE_TLV("Capture Sidetone Volume", WM8350_ADC_DIVIDER, 8, 4, 15, 1, capture_sd_tlv), SOC_WM8350_DOUBLE_R_TLV("Capture Volume", WM8350_LEFT_INPUT_VOLUME, WM8350_RIGHT_INPUT_VOLUME, 2, 63, 0, pre_amp_tlv), SOC_DOUBLE_R("Capture ZC Switch", WM8350_LEFT_INPUT_VOLUME, WM8350_RIGHT_INPUT_VOLUME, 13, 1, 0), SOC_SINGLE_TLV("Left Input Left Sidetone Volume", WM8350_OUTPUT_LEFT_MIXER_VOLUME, 1, 7, 0, out_mix_tlv), SOC_SINGLE_TLV("Left Input Right Sidetone Volume", WM8350_OUTPUT_LEFT_MIXER_VOLUME, 5, 7, 0, out_mix_tlv), SOC_SINGLE_TLV("Left Input Bypass Volume", WM8350_OUTPUT_LEFT_MIXER_VOLUME, 9, 7, 0, out_mix_tlv), SOC_SINGLE_TLV("Right Input Left Sidetone Volume", WM8350_OUTPUT_RIGHT_MIXER_VOLUME, 1, 7, 0, out_mix_tlv), SOC_SINGLE_TLV("Right Input Right Sidetone Volume", WM8350_OUTPUT_RIGHT_MIXER_VOLUME, 5, 7, 0, out_mix_tlv), SOC_SINGLE_TLV("Right Input Bypass Volume", WM8350_OUTPUT_RIGHT_MIXER_VOLUME,
* REVISIT: The actual min value(0x01) is -12 dB and the reg value 0x00 is not * available */ static DECLARE_TLV_DB_SCALE(mic_amp_tlv, -1500, 300, 0); static const struct snd_kcontrol_new ak4671_snd_controls[] = { /* Common playback gain controls */ SOC_SINGLE_TLV("Line Output1 Playback Volume", AK4671_OUTPUT_VOLUME_CONTROL, 0, 0x6, 0, out1_tlv), SOC_SINGLE_TLV("Headphone Output2 Playback Volume", AK4671_OUTPUT_VOLUME_CONTROL, 4, 0xd, 0, out2_tlv), SOC_SINGLE_TLV("Line Output3 Playback Volume", AK4671_LOUT3_POWER_MANAGERMENT, 6, 0x3, 0, out3_tlv), /* Common capture gain controls */ SOC_DOUBLE_TLV("Mic Amp Capture Volume", AK4671_MIC_AMP_GAIN, 0, 4, 0xf, 0, mic_amp_tlv), }; /* event handlers */ static int ak4671_out2_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_codec *codec = w->codec; u8 reg; switch (event) { case SND_SOC_DAPM_POST_PMU: reg = snd_soc_read(codec, AK4671_LOUT2_POWER_MANAGERMENT); reg |= AK4671_MUTEN; snd_soc_write(codec, AK4671_LOUT2_POWER_MANAGERMENT, reg); break;
SOC_SINGLE_TLV("Right Mixer Right Bypass Volume", ES8328_DACCONTROL20, 3, 7, 1, bypass_tlv), SOC_DOUBLE_R_TLV("PCM Volume", ES8328_LDACVOL, ES8328_RDACVOL, 0, ES8328_DACVOL_MAX, 1, dac_adc_tlv), SOC_DOUBLE_R_TLV("Output 1 Playback Volume", ES8328_LOUT1VOL, ES8328_ROUT1VOL, 0, ES8328_OUT1VOL_MAX, 0, play_tlv), SOC_DOUBLE_R_TLV("Output 2 Playback Volume", ES8328_LOUT2VOL, ES8328_ROUT2VOL, 0, ES8328_OUT2VOL_MAX, 0, play_tlv), SOC_DOUBLE_TLV("Mic PGA Volume", ES8328_ADCCONTROL1, 4, 0, 8, 0, mic_tlv), }; /* * DAPM Controls */ static const char * const es8328_line_texts[] = { "Line 1", "Line 2", "PGA", "Differential"}; static const struct soc_enum es8328_lline_enum = SOC_ENUM_SINGLE(ES8328_DACCONTROL16, 3, ARRAY_SIZE(es8328_line_texts), es8328_line_texts); static const struct snd_kcontrol_new es8328_left_line_controls = SOC_DAPM_ENUM("Route", es8328_lline_enum);
static const struct soc_enum input_mode_mux_enum = SOC_ENUM_SINGLE(AUDIO_IC_CODEC_CTRL1, 4, 2, input_mode_mux); static const struct snd_kcontrol_new sirf_audio_codec_input_mode_control = SOC_DAPM_ENUM("Route", input_mode_mux_enum); static const DECLARE_TLV_DB_SCALE(playback_vol_tlv, -12400, 100, 0); static const DECLARE_TLV_DB_SCALE(capture_vol_tlv_prima2, 500, 100, 0); static const DECLARE_TLV_DB_RANGE(capture_vol_tlv_atlas6, 0, 7, TLV_DB_SCALE_ITEM(-100, 100, 0), 0x22, 0x3F, TLV_DB_SCALE_ITEM(700, 100, 0), ); static struct snd_kcontrol_new volume_controls_atlas6[] = { SOC_DOUBLE_TLV("Playback Volume", AUDIO_IC_CODEC_CTRL0, 21, 14, 0x7F, 0, playback_vol_tlv), SOC_DOUBLE_TLV("Capture Volume", AUDIO_IC_CODEC_CTRL1, 16, 10, 0x3F, 0, capture_vol_tlv_atlas6), }; static struct snd_kcontrol_new volume_controls_prima2[] = { SOC_DOUBLE_TLV("Speaker Volume", AUDIO_IC_CODEC_CTRL0, 21, 14, 0x7F, 0, playback_vol_tlv), SOC_DOUBLE_TLV("Capture Volume", AUDIO_IC_CODEC_CTRL1, 15, 10, 0x1F, 0, capture_vol_tlv_prima2), }; static struct snd_kcontrol_new left_input_path_controls[] = { SOC_DAPM_SINGLE("Line Left Switch", AUDIO_IC_CODEC_CTRL1, 6, 1, 0), SOC_DAPM_SINGLE("Mic Left Switch", AUDIO_IC_CODEC_CTRL1, 3, 1, 0), };
VOLAD1_CTVOL_BST_PGA1_SHIFT, (BIT(VOLAD1_CTVOL_BST_PGA1_WIDTH) - 1), 0, cod3022x_ctvol_bst_pga_tlv), SOC_SINGLE_TLV("MIC2 Boost Volume", COD3022X_21_VOL_AD2, VOLAD2_CTVOL_BST2_SHIFT, (BIT(VOLAD2_CTVOL_BST2_WIDTH) - 1), 0, cod3022x_ctvol_bst_tlv), SOC_SINGLE_TLV("MIC2 Volume", COD3022X_21_VOL_AD2, VOLAD2_CTVOL_BST_PGA2_SHIFT, (BIT(VOLAD2_CTVOL_BST_PGA2_WIDTH) - 1), 0, cod3022x_ctvol_bst_pga_tlv), SOC_DOUBLE_TLV("Line-in Volume", COD3022X_22_VOL_AD3, VOLAD3_CTVOL_LNL_SHIFT, VOLAD3_CTVOL_LNR_SHIFT, (BIT(VOLAD3_CTVOL_LNL_WIDTH) - 1), 0, cod3022x_ctvol_line_tlv), SOC_DOUBLE_R_TLV("Headphone Volume", COD3022X_30_VOL_HPL, COD3022X_31_VOL_HPR, VOLHP_CTVOL_HP_SHIFT, (BIT(VOLHP_CTVOL_HP_WIDTH) - 1), 1, cod3022x_ctvol_hp_tlv), SOC_SINGLE_TLV("Earphone Volume", COD3022X_32_VOL_EP_SPK, CTVOL_EP_SHIFT, (BIT(CTVOL_EP_WIDTH) - 1), 0, cod3022x_ctvol_ep_tlv), SOC_SINGLE_TLV("Speaker Volume", COD3022X_32_VOL_EP_SPK, CTVOL_SPK_PGA_SHIFT, (BIT(CTVOL_SPK_PGA_WIDTH) - 1), 0,
pmu4_audio_reg = PMU4_AUDIO_BASE + reg; aml1220_write16(pmu4_audio_reg, val); return 0; } static const DECLARE_TLV_DB_SCALE(pga_in_tlv, -1200, 250, 1); static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -29625, 375, 1); static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95250, 375, 1); static const struct snd_kcontrol_new pmu4_audio_snd_controls[] = { /*PGA_IN Gain*/ SOC_DOUBLE_TLV("PGA IN Gain", PMU4_PGA_IN_CONFIG, PMU4_PGAL_IN_GAIN, PMU4_PGAR_IN_GAIN, 0x1f, 0, pga_in_tlv), /*ADC Digital Volume control*/ SOC_DOUBLE_TLV("ADC Digital Capture Volume", PMU4_ADC_VOL_CTR, PMU4_ADCL_VOL_CTR, PMU4_ADCR_VOL_CTR, 0x7f, 0, adc_vol_tlv), /*DAC Digital Volume control*/ SOC_DOUBLE_TLV("DAC Digital Playback Volume", PMU4_DAC_VOL_CTR, PMU4_DACL_VOL_CTR, PMU4_DACR_VOL_CTR, 0xff, 0, dac_vol_tlv), }; /*pgain Left Channel Input */
7, 0xffffff99, 0x18, adc_pcm_tlv), SOC_DOUBLE_R("PCM Playback Switch", CS42L51_PCMA_VOL, CS42L51_PCMB_VOL, 7, 1, 1), SOC_DOUBLE_R_SX_TLV("Analog Playback Volume", CS42L51_AOUTA_VOL, CS42L51_AOUTB_VOL, 8, 0xffffff19, 0x18, aout_tlv), SOC_DOUBLE_R_SX_TLV("ADC Mixer Volume", CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 0xffffff99, 0x18, adc_pcm_tlv), SOC_DOUBLE_R("ADC Mixer Switch", CS42L51_ADCA_VOL, CS42L51_ADCB_VOL, 7, 1, 1), SOC_SINGLE("Playback Deemphasis Switch", CS42L51_DAC_CTL, 3, 1, 0), SOC_SINGLE("Auto-Mute Switch", CS42L51_DAC_CTL, 2, 1, 0), SOC_SINGLE("Soft Ramp Switch", CS42L51_DAC_CTL, 1, 1, 0), SOC_SINGLE("Zero Cross Switch", CS42L51_DAC_CTL, 0, 0, 0), SOC_DOUBLE_TLV("Mic Boost Volume", CS42L51_MIC_CTL, 0, 1, 1, 0, boost_tlv), SOC_SINGLE_TLV("Bass Volume", CS42L51_TONE_CTL, 0, 0xf, 1, tone_tlv), SOC_SINGLE_TLV("Treble Volume", CS42L51_TONE_CTL, 4, 0xf, 1, tone_tlv), SOC_ENUM_EXT("PCM channel mixer", cs42l51_chan_mix, cs42l51_get_chan_mix, cs42l51_set_chan_mix), }; static int cs42l51_pdn_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { switch (event) { case SND_SOC_DAPM_PRE_PMD: snd_soc_update_bits(w->codec, CS42L51_POWER_CTL1, CS42L51_POWER_CTL1_PDN, CS42L51_POWER_CTL1_PDN);
SND_SOC_DAPM_DAC("DAC", "Playback", AD1836_DAC_CTRL1, AD1836_DAC_POWERDOWN, 1), SND_SOC_DAPM_ADC("ADC", "Capture", SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_SUPPLY("ADC_PWR", AD1836_ADC_CTRL1, AD1836_ADC_POWERDOWN, 1, NULL, 0), }; static const struct snd_soc_dapm_route ad183x_dapm_routes[] = { { "DAC", NULL, "ADC_PWR" }, { "ADC", NULL, "ADC_PWR" }, }; static const DECLARE_TLV_DB_SCALE(ad1836_in_tlv, 0, 300, 0); static const struct snd_kcontrol_new ad1836_controls[] = { SOC_DOUBLE_TLV("ADC2 Capture Volume", AD1836_ADC_CTRL1, 3, 0, 4, 0, ad1836_in_tlv), }; /* * DAI ops entries */ static int ad1836_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { /* at present, we support adc aux mode to interface with * blackfin sport tdm mode */ case SND_SOC_DAIFMT_DSP_A: break;
static SOC_ENUM_SINGLE_DECL(rt5640_if2_adc_enum, RT5640_DIG_INF_DATA, RT5640_IF2_ADC_SEL_SFT, rt5640_data_select); /* Class D speaker gain ratio */ static const char * const rt5640_clsd_spk_ratio[] = {"1.66x", "1.83x", "1.94x", "2x", "2.11x", "2.22x", "2.33x", "2.44x", "2.55x", "2.66x", "2.77x"}; static SOC_ENUM_SINGLE_DECL(rt5640_clsd_spk_ratio_enum, RT5640_CLS_D_OUT, RT5640_CLSD_RATIO_SFT, rt5640_clsd_spk_ratio); static const struct snd_kcontrol_new rt5640_snd_controls[] = { /* Speaker Output Volume */ SOC_DOUBLE("Speaker Channel Switch", RT5640_SPK_VOL, RT5640_VOL_L_SFT, RT5640_VOL_R_SFT, 1, 1), SOC_DOUBLE_TLV("Speaker Playback Volume", RT5640_SPK_VOL, RT5640_L_VOL_SFT, RT5640_R_VOL_SFT, 39, 1, out_vol_tlv), /* Headphone Output Volume */ SOC_DOUBLE("HP Channel Switch", RT5640_HP_VOL, RT5640_VOL_L_SFT, RT5640_VOL_R_SFT, 1, 1), SOC_DOUBLE_TLV("HP Playback Volume", RT5640_HP_VOL, RT5640_L_VOL_SFT, RT5640_R_VOL_SFT, 39, 1, out_vol_tlv), /* OUTPUT Control */ SOC_DOUBLE("OUT Playback Switch", RT5640_OUTPUT, RT5640_L_MUTE_SFT, RT5640_R_MUTE_SFT, 1, 1), SOC_DOUBLE("OUT Channel Switch", RT5640_OUTPUT, RT5640_VOL_L_SFT, RT5640_VOL_R_SFT, 1, 1), SOC_DOUBLE_TLV("OUT Playback Volume", RT5640_OUTPUT, RT5640_L_VOL_SFT, RT5640_R_VOL_SFT, 39, 1, out_vol_tlv), /* DAC Digital Volume */ SOC_DOUBLE("DAC2 Playback Switch", RT5640_DAC2_CTRL,
WM8904_ANALOGUE_OUT2_RIGHT, 0, 63, 0, out_tlv), SOC_DOUBLE_R("Line Output Switch", WM8904_ANALOGUE_OUT2_LEFT, WM8904_ANALOGUE_OUT2_RIGHT, 8, 1, 1), SOC_DOUBLE_R("Line Output ZC Switch", WM8904_ANALOGUE_OUT2_LEFT, WM8904_ANALOGUE_OUT2_RIGHT, 6, 1, 0), SOC_SINGLE("EQ Switch", WM8904_EQ1, 0, 1, 0), SOC_SINGLE("DRC Switch", WM8904_DRC_0, 15, 1, 0), SOC_ENUM("DRC Path", drc_path), SOC_SINGLE("DAC OSRx2 Switch", WM8904_DAC_DIGITAL_1, 6, 1, 0), SOC_SINGLE_BOOL_EXT("DAC Deemphasis Switch", 0, wm8904_get_deemph, wm8904_put_deemph), }; static const struct snd_kcontrol_new wm8904_snd_controls[] = { SOC_DOUBLE_TLV("Digital Sidetone Volume", WM8904_DAC_DIGITAL_0, 4, 8, 15, 0, sidetone_tlv), }; static const struct snd_kcontrol_new wm8904_eq_controls[] = { SOC_SINGLE_TLV("EQ1 Volume", WM8904_EQ2, 0, 24, 0, eq_tlv), SOC_SINGLE_TLV("EQ2 Volume", WM8904_EQ3, 0, 24, 0, eq_tlv), SOC_SINGLE_TLV("EQ3 Volume", WM8904_EQ4, 0, 24, 0, eq_tlv), SOC_SINGLE_TLV("EQ4 Volume", WM8904_EQ5, 0, 24, 0, eq_tlv), SOC_SINGLE_TLV("EQ5 Volume", WM8904_EQ6, 0, 24, 0, eq_tlv), }; static int cp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { if (WARN_ON(event != SND_SOC_DAPM_POST_PMU)) return -EINVAL;
static const struct snd_kcontrol_new pmu3_snd_controls[] = { /* MIC */ SOC_ENUM("Mic Bias1 Level", mic_bias1_enum), SOC_ENUM("Mic Bias2 Level", mic_bias2_enum), SOC_SINGLE_TLV("PGAIN Left Gain", PMU3_PGA_IN, 12, 0xf, 0, pga_in_tlv), SOC_SINGLE_TLV("PGAIN Right Gain", PMU3_PGA_IN, 4, 0xf, 0, pga_in_tlv), /* ADC */ SOC_SINGLE_TLV("Left ADC Sidetone Volume", PMU3_SIDETONE_MIXING, 12, 0xf, 0, adc_svol_tlv), SOC_SINGLE_TLV("Right ADC Sidetone Volume", PMU3_SIDETONE_MIXING, 8, 0xf, 0, adc_svol_tlv), SOC_DOUBLE_TLV("Digital Capture Volume", PMU3_ADC_VOLUME_CTL, 8, 0, 0x7f, 0, adc_tlv), SOC_SINGLE("ADC HPF Switch", PMU3_ADC_DAC, 11, 1, 0), SOC_ENUM("ADC HPF Mode", adc_hpf_mode), SOC_ENUM("Left Digital Audio Source", aifl_src), SOC_ENUM("Right Digital Audio Source", aifr_src), SOC_SINGLE_TLV("DACL to MIXOUTL Volume", PMU3_MIXOUT_L, 11, 0x1f, 0, xx2mixout_tlv), SOC_SINGLE_TLV("DACR to MIXOUTR Volume", PMU3_MIXOUT_R, 11, 0x1f, 0, xx2mixout_tlv), SOC_ENUM("DACL DATA Source", dacl_src), SOC_ENUM("DACR DATA Source", dacr_src), SOC_ENUM("DACL Sidetone Source", dacl_sidetone), SOC_ENUM("DACR Sidetone Source", dacr_sidetone),
static const struct snd_kcontrol_new hfr_mux_controls = SOC_DAPM_ENUM("Route", twl6040_enum[5]); static const struct snd_kcontrol_new ep_driver_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_EARCTL, 0, 1, 0); #if WOOFER_HAL_CONTROL static const struct snd_kcontrol_new handsfree_l_driver_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFLCTL, 6, 1, 0); static const struct snd_kcontrol_new handsfree_r_driver_switch_controls = SOC_DAPM_SINGLE("Switch", TWL6040_REG_HFRCTL, 6, 1, 0); #endif static const struct snd_kcontrol_new twl6040_snd_controls[] = { /* Capture gains */ SOC_DOUBLE_TLV("Capture Preamplifier Volume", TWL6040_REG_MICGAIN, 6, 7, 1, 1, mic_preamp_tlv), SOC_DOUBLE_TLV("Capture Volume", TWL6040_REG_MICGAIN, 0, 3, 4, 0, mic_amp_tlv), /* AFM gains */ SOC_DOUBLE_TLV("Aux FM Volume", TWL6040_REG_LINEGAIN, 0, 4, 0xF, 0, afm_amp_tlv), /* Playback gains */ SOC_DOUBLE_TLV_TWL6040_HS("Headset Playback Volume", TWL6040_REG_HSGAIN, 0, 4, 0xF, 1, hs_tlv), SOC_DOUBLE_R_TLV_TWL6040_HF("Handsfree Playback Volume", TWL6040_REG_HFLGAIN, TWL6040_REG_HFRGAIN, 0, 0x1D, 1, hf_tlv), SOC_SINGLE_TLV("Earphone Playback Volume", TWL6040_REG_EARCTL, 1, 0xF, 1, ep_tlv), };
static const DECLARE_TLV_DB_SCALE(mic_amp_tlv, 0, 100, 0); static const DECLARE_TLV_DB_SCALE(afm_amp_tlv, -3300, 300, 0); static const DECLARE_TLV_DB_SCALE(dac_tlv, -1200, 200, 0); static const DECLARE_TLV_DB_SCALE(hf_tlv, -5000, 200, 0); /* from -63 to 0 dB in 1 dB steps */ static const DECLARE_TLV_DB_SCALE(dpga_tlv, -6300, 100, 1); /* from -63 to 9 dB in 1 dB steps */ static const DECLARE_TLV_DB_SCALE(rx_tlv, -6300, 100, 1); static const DECLARE_TLV_DB_SCALE(st_tlv, -2700, 300, 1); static const DECLARE_TLV_DB_SCALE(tx_tlv, -600, 100, 0); static const struct snd_kcontrol_new isabelle_snd_controls[] = { SOC_DOUBLE_TLV("Headset Playback Volume", ISABELLE_HSDRV_GAIN_REG, 4, 0, 0xF, 0, dac_tlv), SOC_DOUBLE_R_TLV("Handsfree Playback Volume", ISABELLE_HFLPGA_CFG_REG, ISABELLE_HFRPGA_CFG_REG, 0, 0x1F, 0, hf_tlv), SOC_DOUBLE_TLV("Aux Playback Volume", ISABELLE_LINEAMP_GAIN_REG, 4, 0, 0xF, 0, dac_tlv), SOC_SINGLE_TLV("Earpiece Playback Volume", ISABELLE_EARDRV_CFG1_REG, 0, 0xF, 0, dac_tlv), SOC_DOUBLE_TLV("Aux FM Volume", ISABELLE_APGA_GAIN_REG, 4, 0, 0xF, 0, afm_amp_tlv), SOC_SINGLE_TLV("Mic1 Capture Volume", ISABELLE_MIC1_GAIN_REG, 3, 0x1F, 0, mic_amp_tlv), SOC_SINGLE_TLV("Mic2 Capture Volume", ISABELLE_MIC2_GAIN_REG, 3, 0x1F, 0, mic_amp_tlv),
static const DECLARE_TLV_DB_SCALE(hp_sec_tlv, -700, 100, 0); static const DECLARE_TLV_DB_SCALE(adc_tlv, -7200, 75, 1); static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 300, 0); static unsigned int boost_tlv[] = { TLV_DB_RANGE_HEAD(4), 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), 1, 1, TLV_DB_SCALE_ITEM(13, 0, 0), 2, 2, TLV_DB_SCALE_ITEM(20, 0, 0), 3, 3, TLV_DB_SCALE_ITEM(29, 0, 0), }; static const DECLARE_TLV_DB_SCALE(pga_tlv, -2325, 75, 0); static const struct snd_kcontrol_new wm8961_snd_controls[] = { SOC_DOUBLE_R_TLV("Headphone Volume", WM8961_LOUT1_VOLUME, WM8961_ROUT1_VOLUME, 0, 127, 0, out_tlv), SOC_DOUBLE_TLV("Headphone Secondary Volume", WM8961_ANALOGUE_HP_2, 6, 3, 7, 0, hp_sec_tlv), SOC_DOUBLE_R("Headphone ZC Switch", WM8961_LOUT1_VOLUME, WM8961_ROUT1_VOLUME, 7, 1, 0), SOC_DOUBLE_R_TLV("Speaker Volume", WM8961_LOUT2_VOLUME, WM8961_ROUT2_VOLUME, 0, 127, 0, out_tlv), SOC_DOUBLE_R("Speaker ZC Switch", WM8961_LOUT2_VOLUME, WM8961_ROUT2_VOLUME, 7, 1, 0), SOC_SINGLE("Speaker AC Gain", WM8961_CLASS_D_CONTROL_2, 0, 7, 0), SOC_SINGLE("DAC x128 OSR Switch", WM8961_ADC_DAC_CONTROL_2, 0, 1, 0), SOC_ENUM("DAC Deemphasis", dac_deemph), SOC_SINGLE("DAC Soft Mute Switch", WM8961_ADC_DAC_CONTROL_2, 3, 1, 0), SOC_DOUBLE_R_TLV("Sidetone Volume", WM8961_DSP_SIDETONE_0, WM8961_DSP_SIDETONE_1, 4, 12, 0, sidetone_tlv),
* ALC5623 Controls */ static const DECLARE_TLV_DB_SCALE(vol_tlv, -3450, 150, 0); static const DECLARE_TLV_DB_SCALE(hp_tlv, -4650, 150, 0); static const DECLARE_TLV_DB_SCALE(adc_rec_tlv, -1650, 150, 0); static const unsigned int boost_tlv[] = { TLV_DB_RANGE_HEAD(3), 0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), 1, 1, TLV_DB_SCALE_ITEM(2000, 0, 0), 2, 2, TLV_DB_SCALE_ITEM(3000, 0, 0), }; static const DECLARE_TLV_DB_SCALE(dig_tlv, 0, 600, 0); static const struct snd_kcontrol_new alc5621_vol_snd_controls[] = { SOC_DOUBLE_TLV("Speaker Playback Volume", ALC5623_SPK_OUT_VOL, 8, 0, 31, 1, hp_tlv), SOC_DOUBLE("Speaker Playback Switch", ALC5623_SPK_OUT_VOL, 15, 7, 1, 1), SOC_DOUBLE_TLV("Headphone Playback Volume", ALC5623_HP_OUT_VOL, 8, 0, 31, 1, hp_tlv), SOC_DOUBLE("Headphone Playback Switch", ALC5623_HP_OUT_VOL, 15, 7, 1, 1), }; static const struct snd_kcontrol_new alc5622_vol_snd_controls[] = { SOC_DOUBLE_TLV("Speaker Playback Volume", ALC5623_SPK_OUT_VOL, 8, 0, 31, 1, hp_tlv), SOC_DOUBLE("Speaker Playback Switch", ALC5623_SPK_OUT_VOL, 15, 7, 1, 1), SOC_DOUBLE_TLV("Line Playback Volume", ALC5623_HP_OUT_VOL, 8, 0, 31, 1, hp_tlv),
0, 0, TLV_DB_SCALE_ITEM(0, 0, 0), 1, 1, TLV_DB_SCALE_ITEM(2000, 0, 0), 2, 2, TLV_DB_SCALE_ITEM(2400, 0, 0), 3, 5, TLV_DB_SCALE_ITEM(3000, 500, 0), 6, 6, TLV_DB_SCALE_ITEM(4400, 0, 0), 7, 7, TLV_DB_SCALE_ITEM(5000, 0, 0), 8, 8, TLV_DB_SCALE_ITEM(5200, 0, 0), ); static const struct snd_kcontrol_new rt5616_snd_controls[] = { /* Headphone Output Volume */ SOC_DOUBLE("HP Playback Switch", RT5616_HP_VOL, RT5616_L_MUTE_SFT, RT5616_R_MUTE_SFT, 1, 1), SOC_DOUBLE("HPVOL Playback Switch", RT5616_HP_VOL, RT5616_VOL_L_SFT, RT5616_VOL_R_SFT, 1, 1), SOC_DOUBLE_TLV("HP Playback Volume", RT5616_HP_VOL, RT5616_L_VOL_SFT, RT5616_R_VOL_SFT, 39, 1, out_vol_tlv), /* OUTPUT Control */ SOC_DOUBLE("OUT Playback Switch", RT5616_LOUT_CTRL1, RT5616_L_MUTE_SFT, RT5616_R_MUTE_SFT, 1, 1), SOC_DOUBLE("OUT Channel Switch", RT5616_LOUT_CTRL1, RT5616_VOL_L_SFT, RT5616_VOL_R_SFT, 1, 1), SOC_DOUBLE_TLV("OUT Playback Volume", RT5616_LOUT_CTRL1, RT5616_L_VOL_SFT, RT5616_R_VOL_SFT, 39, 1, out_vol_tlv), /* DAC Digital Volume */ SOC_DOUBLE_TLV("DAC1 Playback Volume", RT5616_DAC1_DIG_VOL, RT5616_L_VOL_SFT, RT5616_R_VOL_SFT, 175, 0, dac_vol_tlv), /* IN1/IN2 Control */ SOC_SINGLE_TLV("IN1 Boost Volume", RT5616_IN1_IN2, RT5616_BST_SFT1, 8, 0, bst_tlv),
SOC_ENUM_SINGLE(AC97_STAC_ANALOG_SPECIAL, 12, 2, stac9766_record_all_mux); static const struct soc_enum stac9766_boost1_enum = SOC_ENUM_SINGLE(AC97_MIC, 6, 2, stac9766_boost1); /* 0/10dB */ static const struct soc_enum stac9766_boost2_enum = SOC_ENUM_SINGLE(AC97_STAC_ANALOG_SPECIAL, 2, 2, stac9766_boost2); /* 0/20dB */ static const struct soc_enum stac9766_stereo_mic_enum = SOC_ENUM_SINGLE(AC97_STAC_STEREO_MIC, 2, 1, stac9766_stereo_mic); static const DECLARE_TLV_DB_LINEAR(master_tlv, -4600, 0); static const DECLARE_TLV_DB_LINEAR(record_tlv, 0, 2250); static const DECLARE_TLV_DB_LINEAR(beep_tlv, -4500, 0); static const DECLARE_TLV_DB_LINEAR(mix_tlv, -3450, 1200); static const struct snd_kcontrol_new stac9766_snd_ac97_controls[] = { SOC_DOUBLE_TLV("Speaker Volume", AC97_MASTER, 8, 0, 31, 1, master_tlv), SOC_SINGLE("Speaker Switch", AC97_MASTER, 15, 1, 1), SOC_DOUBLE_TLV("Headphone Volume", AC97_HEADPHONE, 8, 0, 31, 1, master_tlv), SOC_SINGLE("Headphone Switch", AC97_HEADPHONE, 15, 1, 1), SOC_SINGLE_TLV("Mono Out Volume", AC97_MASTER_MONO, 0, 31, 1, master_tlv), SOC_SINGLE("Mono Out Switch", AC97_MASTER_MONO, 15, 1, 1), SOC_DOUBLE_TLV("Record Volume", AC97_REC_GAIN, 8, 0, 15, 0, record_tlv), SOC_SINGLE("Record Switch", AC97_REC_GAIN, 15, 1, 1), SOC_SINGLE_TLV("Beep Volume", AC97_PC_BEEP, 1, 15, 1, beep_tlv), SOC_SINGLE("Beep Switch", AC97_PC_BEEP, 15, 1, 1), SOC_SINGLE("Beep Frequency", AC97_PC_BEEP, 5, 127, 1), SOC_SINGLE_TLV("Phone Volume", AC97_PHONE, 0, 31, 1, mix_tlv),
SOC_SINGLE_TLV("SPKR Output Volume", WM8993_SPKMIXR_ATTENUATION, 3, 1, 1, wm_hubs_spkmix_tlv), SOC_DOUBLE_R_TLV("Speaker Mixer Volume", WM8993_SPKMIXL_ATTENUATION, WM8993_SPKMIXR_ATTENUATION, 0, 3, 1, spkmixout_tlv), SOC_DOUBLE_R_TLV("Speaker Volume", WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, 0, 63, 0, outpga_tlv), SOC_DOUBLE_R("Speaker Switch", WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, 6, 1, 0), SOC_DOUBLE_R("Speaker ZC Switch", WM8993_SPEAKER_VOLUME_LEFT, WM8993_SPEAKER_VOLUME_RIGHT, 7, 1, 0), SOC_DOUBLE_TLV("Speaker Boost Volume", WM8993_SPKOUT_BOOST, 0, 3, 7, 0, spkboost_tlv), SOC_ENUM("Speaker Reference", speaker_ref), SOC_ENUM("Speaker Mode", speaker_mode), { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = "Headphone Volume", .access = SNDRV_CTL_ELEM_ACCESS_TLV_READ | SNDRV_CTL_ELEM_ACCESS_READWRITE, .tlv.p = outpga_tlv, .info = snd_soc_info_volsw_2r, .get = snd_soc_get_volsw_2r, .put = wm8993_put_dc_servo, .private_value = (unsigned long)&(struct soc_mixer_control) { .reg = WM8993_LEFT_OUTPUT_VOLUME, .rreg = WM8993_RIGHT_OUTPUT_VOLUME, .shift = 0, .max = 63 },
int sysclk; }; static const DECLARE_TLV_DB_SCALE(play_tlv, -3000, 100, 0); static const DECLARE_TLV_DB_SCALE(cap_tlv, -9600, 50, 0); static const DECLARE_TLV_DB_SCALE(pga_tlv, 0, 300, 0); static const struct snd_kcontrol_new es8328_snd_controls[] = { SOC_DOUBLE_R_TLV("Speaker Playback Volume", ES8328_DACCONTROL26, ES8328_DACCONTROL27, 0, 0x24, 0, play_tlv), SOC_DOUBLE_R_TLV("Headphone Playback Volume", ES8328_DACCONTROL24, ES8328_DACCONTROL25, 0, 0x24, 0, play_tlv), SOC_DOUBLE_R_TLV("Mic Capture Volume", ES8328_ADCCONTROL8, ES8328_ADCCONTROL9, 0, 0xc0, 1, cap_tlv), SOC_DOUBLE_TLV("Mic PGA Volume", ES8328_ADCCONTROL1, 4, 0, 0x08, 0, pga_tlv), }; /* * DAPM controls. */ static const struct snd_soc_dapm_widget es8328_dapm_widgets[] = { SND_SOC_DAPM_DAC("Speaker Volume", "HiFi Playback", SND_SOC_NOPM, 0, 0), SND_SOC_DAPM_OUTPUT("VOUTL"), SND_SOC_DAPM_OUTPUT("VOUTR"), SND_SOC_DAPM_INPUT("LINE_IN"), SND_SOC_DAPM_INPUT("MIC_IN"), SND_SOC_DAPM_OUTPUT("HP_OUT"), SND_SOC_DAPM_OUTPUT("SPK_OUT"), };
static const struct soc_enum pcm512x_vnds = SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_1, PCM512x_VNDS_SHIFT, 4, pcm512x_ramp_step_text); static const struct soc_enum pcm512x_vnus = SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_1, PCM512x_VNUS_SHIFT, 4, pcm512x_ramp_step_text); static const struct soc_enum pcm512x_veds = SOC_ENUM_SINGLE(PCM512x_DIGITAL_MUTE_2, PCM512x_VEDS_SHIFT, 4, pcm512x_ramp_step_text); static const struct snd_kcontrol_new pcm512x_controls[] = { SOC_DOUBLE_R_TLV("Digital Playback Volume", PCM512x_DIGITAL_VOLUME_2, PCM512x_DIGITAL_VOLUME_3, 0, 255, 1, digital_tlv), SOC_DOUBLE_TLV("Analogue Playback Volume", PCM512x_ANALOG_GAIN_CTRL, PCM512x_LAGN_SHIFT, PCM512x_RAGN_SHIFT, 1, 1, analog_tlv), SOC_DOUBLE_TLV("Analogue Playback Boost Volume", PCM512x_ANALOG_GAIN_BOOST, PCM512x_AGBL_SHIFT, PCM512x_AGBR_SHIFT, 1, 0, boost_tlv), SOC_DOUBLE("Digital Playback Switch", PCM512x_MUTE, PCM512x_RQML_SHIFT, PCM512x_RQMR_SHIFT, 1, 1), SOC_SINGLE("Deemphasis Switch", PCM512x_DSP, PCM512x_DEMP_SHIFT, 1, 1), SOC_ENUM("DSP Program", pcm512x_dsp_program), SOC_ENUM("Clock Missing Period", pcm512x_clk_missing), SOC_ENUM("Auto Mute Time Left", pcm512x_autom_l), SOC_ENUM("Auto Mute Time Right", pcm512x_autom_r), SOC_SINGLE("Auto Mute Mono Switch", PCM512x_DIGITAL_MUTE_3, PCM512x_ACTL_SHIFT, 1, 0), SOC_DOUBLE("Auto Mute Switch", PCM512x_DIGITAL_MUTE_3, PCM512x_AMLE_SHIFT, PCM512x_AMRE_SHIFT, 1, 0),
SOC_DOUBLE_R_TLV("Headphone Playback Volume", ADAU1373_LHP_OUT, ADAU1373_RHP_OUT, 0, 0x1f, 0, adau1373_out_tlv), SOC_DOUBLE_R_TLV("Input 1 Capture Volume", ADAU1373_AINL_CTRL(0), ADAU1373_AINR_CTRL(0), 0, 0x1f, 0, adau1373_in_pga_tlv), SOC_DOUBLE_R_TLV("Input 2 Capture Volume", ADAU1373_AINL_CTRL(1), ADAU1373_AINR_CTRL(1), 0, 0x1f, 0, adau1373_in_pga_tlv), SOC_DOUBLE_R_TLV("Input 3 Capture Volume", ADAU1373_AINL_CTRL(2), ADAU1373_AINR_CTRL(2), 0, 0x1f, 0, adau1373_in_pga_tlv), SOC_DOUBLE_R_TLV("Input 4 Capture Volume", ADAU1373_AINL_CTRL(3), ADAU1373_AINR_CTRL(3), 0, 0x1f, 0, adau1373_in_pga_tlv), SOC_SINGLE_TLV("Earpiece Playback Volume", ADAU1373_EP_CTRL, 0, 3, 0, adau1373_ep_tlv), SOC_DOUBLE_TLV("AIF3 Boost Playback Volume", ADAU1373_VOL_GAIN1, 4, 5, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("AIF2 Boost Playback Volume", ADAU1373_VOL_GAIN1, 2, 3, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("AIF1 Boost Playback Volume", ADAU1373_VOL_GAIN1, 0, 1, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("AIF3 Boost Capture Volume", ADAU1373_VOL_GAIN2, 4, 5, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("AIF2 Boost Capture Volume", ADAU1373_VOL_GAIN2, 2, 3, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("AIF1 Boost Capture Volume", ADAU1373_VOL_GAIN2, 0, 1, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("DMIC Boost Capture Volume", ADAU1373_VOL_GAIN3, 6, 7, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("ADC Boost Capture Volume", ADAU1373_VOL_GAIN3, 4, 5, 1, 0, adau1373_gain_boost_tlv), SOC_DOUBLE_TLV("DAC2 Boost Playback Volume", ADAU1373_VOL_GAIN3, 2, 3,