Lines Matching +full:pga +full:- +full:gain

1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8974.c -- WM8974 ALSA Soc Audio driver
5 * Copyright 2006-2009 Wolfson Microelectronics PLC.
55 static const char *wm8974_companding[] = {"Off", "NC", "u-law", "A-law" };
91 static const DECLARE_TLV_DB_SCALE(digital_tlv, -12750, 50, 1);
92 static const DECLARE_TLV_DB_SCALE(eq_tlv, -1200, 100, 0);
93 static const DECLARE_TLV_DB_SCALE(inpga_tlv, -1200, 75, 0);
94 static const DECLARE_TLV_DB_SCALE(spk_tlv, -5700, 100, 0);
103 SOC_ENUM("Playback De-emphasis", wm8974_enum[2]),
142 SOC_SINGLE("ALC Capture Max Gain", WM8974_ALC1, 3, 7, 0),
143 SOC_SINGLE("ALC Capture Min Gain", WM8974_ALC1, 0, 7, 0),
156 SOC_SINGLE("Capture PGA ZC Switch", WM8974_INPPGA, 7, 1, 0),
157 SOC_SINGLE_TLV("Capture PGA Volume", WM8974_INPPGA, 0, 63, 0, inpga_tlv),
189 SOC_DAPM_SINGLE("PGA Switch", WM8974_INPPGA, 6, 1, 1),
192 /* Input PGA */
213 SND_SOC_DAPM_MIXER("Input PGA", WM8974_POWER2, 2, 0, wm8974_inpga,
250 {"Boost Mixer", "PGA Switch", "Input PGA"},
253 /* Input PGA */
254 {"Input PGA", "Aux Switch", "Aux Input"},
255 {"Input PGA", "MicN Switch", "MICN"},
256 {"Input PGA", "MicP Switch", "MICP"},
284 pll_div->pre_div = 1;
287 pll_div->pre_div = 0;
294 pll_div->n = Ndiv;
309 pll_div->k = K;
315 struct snd_soc_component *component = codec_dai->component;
352 struct snd_soc_component *component = codec_dai->component;
369 return -EINVAL;
409 struct snd_soc_component *component = dai->component;
416 if (!priv->mclk || !priv->fs)
419 fs256 = 256 * priv->fs;
421 f = wm8974_get_mclkdiv(priv->mclk, fs256, &mclkdiv);
423 if (f != priv->mclk) {
428 wm8974_set_dai_pll(dai, 0, 0, priv->mclk, fpll);
437 struct snd_soc_component *component = dai->component;
441 return -EINVAL;
443 priv->mclk = freq;
451 struct snd_soc_component *component = codec_dai->component;
463 return -EINVAL;
479 return -EINVAL;
484 return -EINVAL;
501 return -EINVAL;
513 struct snd_soc_component *component = dai->component;
519 priv->fs = params_rate(params);
568 struct snd_soc_component *component = dai->component;
595 regcache_sync(dev_get_regmap(component->dev, NULL));
632 .name = "wm8974-hifi",
665 dev_err(component->dev, "Failed to issue reset\n");
693 priv = devm_kzalloc(&i2c->dev, sizeof(*priv), GFP_KERNEL);
695 return -ENOMEM;
703 ret = devm_snd_soc_register_component(&i2c->dev,