Lines Matching +full:aux +full:- +full:output +full:- +full:source
1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8510.c -- WM8510 ALSA Soc Audio driver
113 static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" };
131 SOC_ENUM("Playback De-emphasis", wm8510_enum[2]),
176 /* Speaker Output Mixer */
179 SOC_DAPM_SINGLE("Aux Playback Switch", WM8510_SPKMIX, 5, 1, 0),
183 /* Mono Output Mixer */
186 SOC_DAPM_SINGLE("Aux Playback Switch", WM8510_MONOMIX, 2, 1, 0),
192 SOC_DAPM_SINGLE("Aux Volume", WM8510_ADCBOOST, 0, 7, 0),
199 SOC_DAPM_SINGLE("AUX Switch", WM8510_INPUT, 2, 1, 0),
211 SND_SOC_DAPM_PGA("Aux Input", WM8510_POWER1, 6, 0, NULL, 0),
227 SND_SOC_DAPM_INPUT("AUX"),
234 /* Mono output mixer */
236 {"Mono Mixer", "Aux Playback Switch", "Aux Input"},
239 /* Speaker output mixer */
241 {"Speaker Mixer", "Aux Playback Switch", "Aux Input"},
255 { "Mic PGA", "AUX Switch", "Aux Input" },
260 {"Boost Mixer", "Aux Volume", "Aux Input"},
266 unsigned int pre_div:4; /* prescale - 1 */
277 static void pll_factors(unsigned int target, unsigned int source) in pll_factors() argument
282 Ndiv = target / source; in pll_factors()
284 source >>= 1; in pll_factors()
286 Ndiv = target / source; in pll_factors()
296 Nmod = target % source; in pll_factors()
299 do_div(Kpart, source); in pll_factors()
314 int source, unsigned int freq_in, unsigned int freq_out) in wm8510_set_dai_pll() argument
316 struct snd_soc_component *component = codec_dai->component; in wm8510_set_dai_pll()
352 struct snd_soc_component *component = codec_dai->component; in wm8510_set_dai_clkdiv()
377 return -EINVAL; in wm8510_set_dai_clkdiv()
386 struct snd_soc_component *component = codec_dai->component; in wm8510_set_dai_fmt()
398 return -EINVAL; in wm8510_set_dai_fmt()
415 return -EINVAL; in wm8510_set_dai_fmt()
432 return -EINVAL; in wm8510_set_dai_fmt()
444 struct snd_soc_component *component = dai->component; in wm8510_pcm_hw_params()
492 struct snd_soc_component *component = dai->component; in wm8510_mute()
520 regcache_sync(wm8510->regmap); in wm8510_set_bias_level()
558 .name = "wm8510-hifi",
621 wm8510 = devm_kzalloc(&spi->dev, sizeof(struct wm8510_priv), in wm8510_spi_probe()
624 return -ENOMEM; in wm8510_spi_probe()
626 wm8510->regmap = devm_regmap_init_spi(spi, &wm8510_regmap); in wm8510_spi_probe()
627 if (IS_ERR(wm8510->regmap)) in wm8510_spi_probe()
628 return PTR_ERR(wm8510->regmap); in wm8510_spi_probe()
632 ret = devm_snd_soc_register_component(&spi->dev, in wm8510_spi_probe()
653 wm8510 = devm_kzalloc(&i2c->dev, sizeof(struct wm8510_priv), in wm8510_i2c_probe()
656 return -ENOMEM; in wm8510_i2c_probe()
658 wm8510->regmap = devm_regmap_init_i2c(i2c, &wm8510_regmap); in wm8510_i2c_probe()
659 if (IS_ERR(wm8510->regmap)) in wm8510_i2c_probe()
660 return PTR_ERR(wm8510->regmap); in wm8510_i2c_probe()
664 ret = devm_snd_soc_register_component(&i2c->dev, in wm8510_i2c_probe()