Lines Matching +full:bypass +full:- +full:enable
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * wm8990.c -- WM8990 ALSA Soc Audio driver
37 static const DECLARE_TLV_DB_SCALE(in_pga_tlv, -1650, 3000, 0);
39 static const DECLARE_TLV_DB_SCALE(out_mix_tlv, 0, -2100, 0);
41 static const DECLARE_TLV_DB_SCALE(out_pga_tlv, -7300, 600, 0);
43 static const DECLARE_TLV_DB_SCALE(out_dac_tlv, -7163, 0, 0);
45 static const DECLARE_TLV_DB_SCALE(in_adc_tlv, -7163, 1763, 0);
47 static const DECLARE_TLV_DB_SCALE(out_sidetone_tlv, -3600, 0, 0);
54 (struct soc_mixer_control *)kcontrol->private_value; in wm899x_outpga_put_volsw_vu()
55 int reg = mc->reg; in wm899x_outpga_put_volsw_vu()
88 {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
104 SOC_SINGLE_TLV("LOMIX LIN3 Bypass Volume", WM8990_OUTPUT_MIXER3,
106 SOC_SINGLE_TLV("LOMIX RIN12 PGA Bypass Volume", WM8990_OUTPUT_MIXER3,
108 SOC_SINGLE_TLV("LOMIX LIN12 PGA Bypass Volume", WM8990_OUTPUT_MIXER3,
110 SOC_SINGLE_TLV("LOMIX RIN3 Bypass Volume", WM8990_OUTPUT_MIXER5,
112 SOC_SINGLE_TLV("LOMIX AINRMUX Bypass Volume", WM8990_OUTPUT_MIXER5,
114 SOC_SINGLE_TLV("LOMIX AINLMUX Bypass Volume", WM8990_OUTPUT_MIXER5,
118 SOC_SINGLE_TLV("ROMIX RIN3 Bypass Volume", WM8990_OUTPUT_MIXER4,
120 SOC_SINGLE_TLV("ROMIX LIN12 PGA Bypass Volume", WM8990_OUTPUT_MIXER4,
122 SOC_SINGLE_TLV("ROMIX RIN12 PGA Bypass Volume", WM8990_OUTPUT_MIXER4,
124 SOC_SINGLE_TLV("ROMIX LIN3 Bypass Volume", WM8990_OUTPUT_MIXER6,
126 SOC_SINGLE_TLV("ROMIX AINLMUX Bypass Volume", WM8990_OUTPUT_MIXER6,
128 SOC_SINGLE_TLV("ROMIX AINRMUX Bypass Volume", WM8990_OUTPUT_MIXER6,
294 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in outmixer_event()
295 u32 reg_shift = kcontrol->private_value & 0xfff; in outmixer_event()
305 ret = -1; in outmixer_event()
313 ret = -1; in outmixer_event()
321 ret = -1; in outmixer_event()
329 ret = -1; in outmixer_event()
338 static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);
412 SOC_DAPM_SINGLE("LOMIX Right ADC Bypass Switch", WM8990_OUTPUT_MIXER1,
414 SOC_DAPM_SINGLE("LOMIX Left ADC Bypass Switch", WM8990_OUTPUT_MIXER1,
416 SOC_DAPM_SINGLE("LOMIX RIN3 Bypass Switch", WM8990_OUTPUT_MIXER1,
418 SOC_DAPM_SINGLE("LOMIX LIN3 Bypass Switch", WM8990_OUTPUT_MIXER1,
420 SOC_DAPM_SINGLE("LOMIX RIN12 PGA Bypass Switch", WM8990_OUTPUT_MIXER1,
422 SOC_DAPM_SINGLE("LOMIX LIN12 PGA Bypass Switch", WM8990_OUTPUT_MIXER1,
430 SOC_DAPM_SINGLE("ROMIX Left ADC Bypass Switch", WM8990_OUTPUT_MIXER2,
432 SOC_DAPM_SINGLE("ROMIX Right ADC Bypass Switch", WM8990_OUTPUT_MIXER2,
434 SOC_DAPM_SINGLE("ROMIX LIN3 Bypass Switch", WM8990_OUTPUT_MIXER2,
436 SOC_DAPM_SINGLE("ROMIX RIN3 Bypass Switch", WM8990_OUTPUT_MIXER2,
438 SOC_DAPM_SINGLE("ROMIX LIN12 PGA Bypass Switch", WM8990_OUTPUT_MIXER2,
440 SOC_DAPM_SINGLE("ROMIX RIN12 PGA Bypass Switch", WM8990_OUTPUT_MIXER2,
458 SOC_DAPM_SINGLE("LOPMIX Right Mic Bypass Switch", WM8990_LINE_MIXER1,
460 SOC_DAPM_SINGLE("LOPMIX Left Mic Bypass Switch", WM8990_LINE_MIXER1,
478 SOC_DAPM_SINGLE("ROPMIX Left Mic Bypass Switch", WM8990_LINE_MIXER2,
480 SOC_DAPM_SINGLE("ROPMIX Right Mic Bypass Switch", WM8990_LINE_MIXER2,
488 SOC_DAPM_SINGLE("OUT3MIX LIN4/RXP Bypass Switch", WM8990_OUT3_4_MIXER,
498 SOC_DAPM_SINGLE("OUT4MIX RIN4/RXP Bypass Switch", WM8990_OUT3_4_MIXER,
504 SOC_DAPM_SINGLE("SPKMIX LIN2 Bypass Switch", WM8990_SPEAKER_MIXER,
506 SOC_DAPM_SINGLE("SPKMIX LADC Bypass Switch", WM8990_SPEAKER_MIXER,
516 SOC_DAPM_SINGLE("SPKMIX RADC Bypass Switch", WM8990_SPEAKER_MIXER,
518 SOC_DAPM_SINGLE("SPKMIX RIN2 Bypass Switch", WM8990_SPEAKER_MIXER,
721 {"LOMIX", "LOMIX RIN3 Bypass Switch", "RIN3"},
722 {"LOMIX", "LOMIX LIN3 Bypass Switch", "LIN3"},
723 {"LOMIX", "LOMIX LIN12 PGA Bypass Switch", "LIN12 PGA"},
724 {"LOMIX", "LOMIX RIN12 PGA Bypass Switch", "RIN12 PGA"},
725 {"LOMIX", "LOMIX Right ADC Bypass Switch", "AINRMUX"},
726 {"LOMIX", "LOMIX Left ADC Bypass Switch", "AINLMUX"},
730 {"ROMIX", "ROMIX RIN3 Bypass Switch", "RIN3"},
731 {"ROMIX", "ROMIX LIN3 Bypass Switch", "LIN3"},
732 {"ROMIX", "ROMIX LIN12 PGA Bypass Switch", "LIN12 PGA"},
733 {"ROMIX", "ROMIX RIN12 PGA Bypass Switch", "RIN12 PGA"},
734 {"ROMIX", "ROMIX Right ADC Bypass Switch", "AINRMUX"},
735 {"ROMIX", "ROMIX Left ADC Bypass Switch", "AINLMUX"},
739 {"SPKMIX", "SPKMIX LIN2 Bypass Switch", "LIN2"},
740 {"SPKMIX", "SPKMIX RIN2 Bypass Switch", "RIN2"},
741 {"SPKMIX", "SPKMIX LADC Bypass Switch", "AINLMUX"},
742 {"SPKMIX", "SPKMIX RADC Bypass Switch", "AINRMUX"},
754 {"LOPMIX", "LOPMIX Right Mic Bypass Switch", "RIN12 PGA"},
755 {"LOPMIX", "LOPMIX Left Mic Bypass Switch", "LIN12 PGA"},
759 {"OUT3MIX", "OUT3MIX LIN4/RXP Bypass Switch", "LIN4/RXN"},
764 {"OUT4MIX", "OUT4MIX RIN4/RXP Bypass Switch", "RIN4/RXP"},
772 {"ROPMIX", "ROPMIX Left Mic Bypass Switch", "LIN12 PGA"},
773 {"ROPMIX", "ROPMIX Right Mic Bypass Switch", "RIN12 PGA"},
816 pll_div->div2 = 1; in pll_factors()
819 pll_div->div2 = 0; in pll_factors()
825 pll_div->n = Ndiv; in pll_factors()
840 pll_div->k = K; in pll_factors()
846 struct snd_soc_component *component = codec_dai->component; in wm8990_set_dai_pll()
860 /* set up N , fractional mode and pre-divisor if necessary */ in wm8990_set_dai_pll()
879 struct snd_soc_component *component = codec_dai->component; in wm8990_set_dai_sysclk()
882 wm8990->sysclk = freq; in wm8990_set_dai_sysclk()
892 struct snd_soc_component *component = codec_dai->component; in wm8990_set_dai_fmt()
907 return -EINVAL; in wm8990_set_dai_fmt()
934 return -EINVAL; in wm8990_set_dai_fmt()
945 struct snd_soc_component *component = codec_dai->component; in wm8990_set_dai_clkdiv()
965 return -EINVAL; in wm8990_set_dai_clkdiv()
978 struct snd_soc_component *component = dai->component; in wm8990_hw_params()
1003 struct snd_soc_component *component = dai->component; in wm8990_mute()
1034 ret = regcache_sync(wm8990->regmap); in wm8990_set_bias_level()
1036 dev_err(component->dev, "Failed to sync cache: %d\n", ret); in wm8990_set_bias_level()
1040 /* Enable all output discharge bits */ in wm8990_set_bias_level()
1046 /* Enable POBCTRL, SOFT_ST, VMIDTOG and BUFDCOPEN */ in wm8990_set_bias_level()
1061 /* Enable outputs */ in wm8990_set_bias_level()
1066 /* Enable VMID at 2x50k */ in wm8990_set_bias_level()
1071 /* Enable VREF */ in wm8990_set_bias_level()
1076 /* Enable BUFIOEN */ in wm8990_set_bias_level()
1087 /* Enable workaround for ADC clocking issue. */ in wm8990_set_bias_level()
1099 /* Enable POBCTRL and SOFT_ST */ in wm8990_set_bias_level()
1103 /* Enable POBCTRL, SOFT_ST and BUFDCOPEN */ in wm8990_set_bias_level()
1112 /* Enable any disabled outputs */ in wm8990_set_bias_level()
1120 /* Enable all output discharge bits */ in wm8990_set_bias_level()
1132 regcache_mark_dirty(wm8990->regmap); in wm8990_set_bias_level()
1165 .name = "wm8990-hifi",
1227 wm8990 = devm_kzalloc(&i2c->dev, sizeof(struct wm8990_priv), in wm8990_i2c_probe()
1230 return -ENOMEM; in wm8990_i2c_probe()
1234 ret = devm_snd_soc_register_component(&i2c->dev, in wm8990_i2c_probe()