Lines Matching +full:alc +full:- +full:enable
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" };
115 static const char *wm8510_alc[] = { "ALC", "Limiter" };
131 SOC_ENUM("Playback De-emphasis", wm8510_enum[2]),
149 SOC_SINGLE("ALC Enable Switch", WM8510_ALC1, 8, 1, 0),
150 SOC_SINGLE("ALC Capture Max Gain", WM8510_ALC1, 3, 7, 0),
151 SOC_SINGLE("ALC Capture Min Gain", WM8510_ALC1, 0, 7, 0),
153 SOC_SINGLE("ALC Capture ZC Switch", WM8510_ALC2, 8, 1, 0),
154 SOC_SINGLE("ALC Capture Hold", WM8510_ALC2, 4, 7, 0),
155 SOC_SINGLE("ALC Capture Target", WM8510_ALC2, 0, 15, 0),
157 SOC_ENUM("ALC Capture Mode", wm8510_enum[3]),
158 SOC_SINGLE("ALC Capture Decay", WM8510_ALC3, 4, 15, 0),
159 SOC_SINGLE("ALC Capture Attack", WM8510_ALC3, 0, 15, 0),
161 SOC_SINGLE("ALC Capture Noise Gate Switch", WM8510_NGATE, 3, 1, 0),
162 SOC_SINGLE("ALC Capture Noise Gate Threshold", WM8510_NGATE, 0, 7, 0),
266 unsigned int pre_div:4; /* prescale - 1 */
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()