Lines Matching +full:aux +full:- +full:output +full:- +full:power
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]),
163 SOC_ENUM("Aux Mode", wm8974_auxmode),
173 /* Speaker Output Mixer */
176 SOC_DAPM_SINGLE("Aux Playback Switch", WM8974_SPKMIX, 5, 1, 0),
180 /* Mono Output Mixer */
183 SOC_DAPM_SINGLE("Aux Playback Switch", WM8974_MONOMIX, 2, 1, 0),
194 SOC_DAPM_SINGLE("Aux Switch", WM8974_INPUT, 2, 1, 0),
208 SND_SOC_DAPM_PGA("Aux Input", WM8974_POWER1, 6, 0, NULL, 0),
222 SND_SOC_DAPM_INPUT("AUX"),
229 /* Mono output mixer */
231 {"Mono Mixer", "Aux Playback Switch", "Aux Input"},
234 /* Speaker output mixer */
236 {"Speaker Mixer", "Aux Playback Switch", "Aux Input"},
249 {"Boost Mixer", NULL, "Aux Input"},
254 {"Input PGA", "Aux Switch", "Aux Input"},
259 {"Aux Input", NULL, "AUX"},
278 /* There is a fixed divide by 4 in the output path */ in pll_factors()
284 pll_div->pre_div = 1; in pll_factors()
287 pll_div->pre_div = 0; in pll_factors()
294 pll_div->n = Ndiv; in pll_factors()
309 pll_div->k = K; in pll_factors()
315 struct snd_soc_component *component = codec_dai->component; in wm8974_set_dai_pll()
352 struct snd_soc_component *component = codec_dai->component; in wm8974_set_dai_clkdiv()
369 return -EINVAL; in wm8974_set_dai_clkdiv()
409 struct snd_soc_component *component = dai->component; in wm8974_update_clocks()
416 if (!priv->mclk || !priv->fs) in wm8974_update_clocks()
419 fs256 = 256 * priv->fs; in wm8974_update_clocks()
421 f = wm8974_get_mclkdiv(priv->mclk, fs256, &mclkdiv); in wm8974_update_clocks()
422 if (f != priv->mclk) { in wm8974_update_clocks()
432 wm8974_set_dai_pll(dai, 0, 0, priv->mclk, fpll); in wm8974_update_clocks()
441 struct snd_soc_component *component = dai->component; in wm8974_set_dai_sysclk()
445 return -EINVAL; in wm8974_set_dai_sysclk()
447 priv->mclk = freq; in wm8974_set_dai_sysclk()
455 struct snd_soc_component *component = codec_dai->component; in wm8974_set_dai_fmt()
467 return -EINVAL; in wm8974_set_dai_fmt()
483 return -EINVAL; in wm8974_set_dai_fmt()
488 return -EINVAL; in wm8974_set_dai_fmt()
505 return -EINVAL; in wm8974_set_dai_fmt()
517 struct snd_soc_component *component = dai->component; in wm8974_pcm_hw_params()
523 priv->fs = params_rate(params); in wm8974_pcm_hw_params()
572 struct snd_soc_component *component = dai->component; in wm8974_mute()
582 /* liam need to make this lower power with dapm */
599 regcache_sync(dev_get_regmap(component->dev, NULL)); in wm8974_set_bias_level()
636 .name = "wm8974-hifi",
669 dev_err(component->dev, "Failed to issue reset\n"); in wm8974_probe()
697 priv = devm_kzalloc(&i2c->dev, sizeof(*priv), GFP_KERNEL); in wm8974_i2c_probe()
699 return -ENOMEM; in wm8974_i2c_probe()
707 ret = devm_snd_soc_register_component(&i2c->dev, in wm8974_i2c_probe()