Lines Matching +full:mute +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"};
153 SOC_SINGLE("LON Mute Switch", WM8990_LINE_OUTPUTS_VOLUME,
155 SOC_SINGLE("LOP Mute Switch", WM8990_LINE_OUTPUTS_VOLUME,
159 SOC_SINGLE("RON Mute Switch", WM8990_LINE_OUTPUTS_VOLUME,
161 SOC_SINGLE("ROP Mute Switch", WM8990_LINE_OUTPUTS_VOLUME,
166 SOC_SINGLE("OUT3 Mute Switch", WM8990_OUT3_4_VOLUME,
171 SOC_SINGLE("OUT4 Mute Switch", WM8990_OUT3_4_VOLUME,
243 SOC_SINGLE("LIN12 Mute Switch", WM8990_LEFT_LINE_INPUT_1_2_VOLUME,
256 SOC_SINGLE("LIN34 Mute Switch", WM8990_LEFT_LINE_INPUT_3_4_VOLUME,
269 SOC_SINGLE("RIN12 Mute Switch", WM8990_RIGHT_LINE_INPUT_1_2_VOLUME,
282 SOC_SINGLE("RIN34 Mute Switch", WM8990_RIGHT_LINE_INPUT_3_4_VOLUME,
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);
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()
1001 static int wm8990_mute(struct snd_soc_dai *dai, int mute, int direction) in wm8990_mute() argument
1003 struct snd_soc_component *component = dai->component; in wm8990_mute()
1008 if (mute) 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()
1108 /* mute DAC */ 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()