Lines Matching +full:digital +full:- +full:input +full:- +full:sink +full:- +full:range +full:- +full:high

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;
55 int reg = mc->reg;
88 {"Hi-fi mode", "Voice mode 1", "Voice mode 2", "Voice mode 3"};
190 SOC_WM899X_OUTPGA_SINGLE_R_TLV("Left DAC Digital Volume",
197 SOC_WM899X_OUTPGA_SINGLE_R_TLV("Right DAC Digital Volume",
204 SOC_ENUM("Left Digital Sidetone", wm8990_left_digital_sidetone_enum),
205 SOC_ENUM("Right Digital Sidetone", wm8990_right_digital_sidetone_enum),
207 SOC_SINGLE_TLV("Left Digital Sidetone Volume", WM8990_DIGITAL_SIDE_TONE,
210 SOC_SINGLE_TLV("Right Digital Sidetone Volume", WM8990_DIGITAL_SIDE_TONE,
214 SOC_SINGLE("ADC Digital High Pass Filter Switch", WM8990_ADC_CTRL,
219 SOC_WM899X_OUTPGA_SINGLE_R_TLV("Left ADC Digital Volume",
226 SOC_WM899X_OUTPGA_SINGLE_R_TLV("Right ADC Digital Volume",
294 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
295 u32 reg_shift = kcontrol->private_value & 0xfff;
305 ret = -1;
313 ret = -1;
321 ret = -1;
329 ret = -1;
338 static const DECLARE_TLV_DB_SCALE(in_mix_tlv, -1200, 600, 0);
523 /* Input Side */
524 /* Input Lines */
546 /* Input PGAs */
662 SND_SOC_DAPM_OUTPUT("Internal DAC Sink"),
667 {"Internal DAC Sink", NULL, "Left DAC"},
668 {"Internal DAC Sink", NULL, "Right DAC"},
679 /* Input Side */
816 pll_div->div2 = 1;
819 pll_div->div2 = 0;
823 "WM8990 N value outwith recommended range! N = %u\n", Ndiv);
825 pll_div->n = Ndiv;
837 /* Move down to proper range now rounding is done */
840 pll_div->k = K;
846 struct snd_soc_component *component = codec_dai->component;
860 /* set up N , fractional mode and pre-divisor if necessary */
879 struct snd_soc_component *component = codec_dai->component;
882 wm8990->sysclk = freq;
892 struct snd_soc_component *component = codec_dai->component;
907 return -EINVAL;
934 return -EINVAL;
945 struct snd_soc_component *component = codec_dai->component;
965 return -EINVAL;
978 struct snd_soc_component *component = dai->component;
1003 struct snd_soc_component *component = dai->component;
1034 ret = regcache_sync(wm8990->regmap);
1036 dev_err(component->dev, "Failed to sync cache: %d\n", ret);
1132 regcache_mark_dirty(wm8990->regmap);
1165 .name = "wm8990-hifi",
1227 wm8990 = devm_kzalloc(&i2c->dev, sizeof(struct wm8990_priv),
1230 return -ENOMEM;
1234 ret = devm_snd_soc_register_component(&i2c->dev,