Lines Matching +full:adc +full:- +full:mux
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * wm8971.c -- WM8971 ALSA SoC Audio driver
97 "Mute ADC Output" };
159 SOC_ENUM("Treble Cut-off", wm8971_enum[2]),
180 SOC_ENUM("Playback De-emphasis", wm8971_enum[5]),
215 /* Left Line Mux */
219 /* Right Line Mux */
223 /* Left PGA Mux */
227 /* Right PGA Mux */
231 /* Mono ADC Mux */
255 SND_SOC_DAPM_ADC("Right ADC", "Right Capture", WM8971_PWR1, 2, 0),
256 SND_SOC_DAPM_ADC("Left ADC", "Left Capture", WM8971_PWR1, 3, 0),
258 SND_SOC_DAPM_MUX("Left PGA Mux", WM8971_PWR1, 5, 0,
260 SND_SOC_DAPM_MUX("Right PGA Mux", WM8971_PWR1, 4, 0,
262 SND_SOC_DAPM_MUX("Left Line Mux", SND_SOC_NOPM, 0, 0,
264 SND_SOC_DAPM_MUX("Right Line Mux", SND_SOC_NOPM, 0, 0,
267 SND_SOC_DAPM_MUX("Left ADC Mux", SND_SOC_NOPM, 0, 0,
269 SND_SOC_DAPM_MUX("Right ADC Mux", SND_SOC_NOPM, 0, 0,
286 {"Left Mixer", "Left Bypass Switch", "Left Line Mux"},
288 {"Left Mixer", "Right Bypass Switch", "Right Line Mux"},
292 {"Right Mixer", "Left Bypass Switch", "Left Line Mux"},
294 {"Right Mixer", "Right Bypass Switch", "Right Line Mux"},
314 {"Mono Mixer", "Left Bypass Switch", "Left Line Mux"},
316 {"Mono Mixer", "Right Bypass Switch", "Right Line Mux"},
322 /* Left Line Mux */
323 {"Left Line Mux", "Line", "LINPUT1"},
324 {"Left Line Mux", "PGA", "Left PGA Mux"},
325 {"Left Line Mux", "Differential", "Differential Mux"},
327 /* Right Line Mux */
328 {"Right Line Mux", "Line", "RINPUT1"},
329 {"Right Line Mux", "Mic", "MIC"},
330 {"Right Line Mux", "PGA", "Right PGA Mux"},
331 {"Right Line Mux", "Differential", "Differential Mux"},
333 /* Left PGA Mux */
334 {"Left PGA Mux", "Line", "LINPUT1"},
335 {"Left PGA Mux", "Differential", "Differential Mux"},
337 /* Right PGA Mux */
338 {"Right PGA Mux", "Line", "RINPUT1"},
339 {"Right PGA Mux", "Differential", "Differential Mux"},
341 /* Differential Mux */
342 {"Differential Mux", "Line", "LINPUT1"},
343 {"Differential Mux", "Line", "RINPUT1"},
345 /* Left ADC Mux */
346 {"Left ADC Mux", "Stereo", "Left PGA Mux"},
347 {"Left ADC Mux", "Mono (Left)", "Left PGA Mux"},
348 {"Left ADC Mux", "Digital Mono", "Left PGA Mux"},
350 /* Right ADC Mux */
351 {"Right ADC Mux", "Stereo", "Right PGA Mux"},
352 {"Right ADC Mux", "Mono (Right)", "Right PGA Mux"},
353 {"Right ADC Mux", "Digital Mono", "Right PGA Mux"},
355 /* ADC */
356 {"Left ADC", NULL, "Left ADC Mux"},
357 {"Right ADC", NULL, "Right ADC Mux"},
426 return -EINVAL;
432 struct snd_soc_component *component = codec_dai->component;
441 wm8971->sysclk = freq;
444 return -EINVAL;
450 struct snd_soc_component *component = codec_dai->component;
461 return -EINVAL;
481 return -EINVAL;
498 return -EINVAL;
509 struct snd_soc_component *component = dai->component;
513 int coeff = get_coeff(wm8971->sysclk, params_rate(params));
541 struct snd_soc_component *component = dai->component;
557 regmap_update_bits(wm8971->regmap, WM8971_PWR1, 0x0180, 0x0100);
573 flush_delayed_work(&wm8971->charge_work);
578 /* charge output caps - set vmid to 5k for quick power up */
581 &wm8971->charge_work, msecs_to_jiffies(1000));
589 cancel_delayed_work_sync(&wm8971->charge_work);
612 .name = "wm8971-hifi",
632 INIT_DELAYED_WORK(&wm8971->charge_work, wm8971_charge_work);
678 wm8971 = devm_kzalloc(&i2c->dev, sizeof(struct wm8971_priv),
681 return -ENOMEM;
683 wm8971->regmap = devm_regmap_init_i2c(i2c, &wm8971_regmap);
684 if (IS_ERR(wm8971->regmap))
685 return PTR_ERR(wm8971->regmap);
689 return devm_snd_soc_register_component(&i2c->dev,