Lines Matching +full:analog +full:- +full:amplifier

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * This driver supports the analog controls for the internal codec
6 * Copyright 2016 Chen-Yu Tsai <wens@csie.org>
18 #include <sound/soc-dapm.h>
21 #include "sun8i-adda-pr-regmap.h"
23 /* Codec analog control register offsets and bit fields */
198 -450, 150, 0);
205 /* Mixer pre-gain */
243 SND_SOC_DAPM_PGA("Mic1 Amplifier", SUN8I_ADDA_MIC1G_MICBIAS_CTRL,
287 { "Mic1 Amplifier", NULL, "MIC1"},
294 { "Left Mixer", "Mic1 Playback Switch", "Mic1 Amplifier" },
299 { "Right Mixer", "Mic1 Playback Switch", "Mic1 Amplifier" },
304 { "Left ADC Mixer", "Mic1 Capture Switch", "Mic1 Amplifier" },
309 { "Right ADC Mixer", "Mic1 Capture Switch", "Mic1 Amplifier" },
317 static const DECLARE_TLV_DB_SCALE(sun8i_codec_hp_vol_scale, -6300, 100, 1);
347 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in sun8i_headphone_amp_event()
354 * Need a delay to have the amplifier up. 700ms seems the best in sun8i_headphone_amp_event()
355 * compromise between the time to let the amplifier up and the in sun8i_headphone_amp_event()
395 struct device *dev = cmpnt->dev; in sun8i_codec_add_headphone()
433 struct device *dev = cmpnt->dev; in sun8i_codec_add_mbias()
454 struct device *dev = cmpnt->dev; in sun8i_codec_add_hmic()
467 /* Mixer pre-gain */
491 struct device *dev = cmpnt->dev; in sun8i_codec_add_linein()
523 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
572 struct device *dev = cmpnt->dev; in sun8i_codec_add_lineout()
602 /* Mixer pre-gain */
618 SND_SOC_DAPM_PGA("Mic2 Amplifier", SUN8I_ADDA_MIC2G_CTRL,
623 { "Mic2 Amplifier", NULL, "MIC2"},
625 { "Left Mixer", "Mic2 Playback Switch", "Mic2 Amplifier" },
627 { "Right Mixer", "Mic2 Playback Switch", "Mic2 Amplifier" },
629 { "Left ADC Mixer", "Mic2 Capture Switch", "Mic2 Amplifier" },
631 { "Right ADC Mixer", "Mic2 Capture Switch", "Mic2 Amplifier" },
637 struct device *dev = cmpnt->dev; in sun8i_codec_add_mic2()
693 struct device *dev = cmpnt->dev; in sun8i_codec_analog_add_mixer()
696 if (!quirks->has_mic2 && !quirks->has_linein) { in sun8i_codec_analog_add_mixer()
738 struct device *dev = cmpnt->dev; in sun8i_codec_analog_cmpnt_probe()
754 if (quirks->has_headphone) { in sun8i_codec_analog_cmpnt_probe()
760 if (quirks->has_hmic) { in sun8i_codec_analog_cmpnt_probe()
766 if (quirks->has_linein) { in sun8i_codec_analog_cmpnt_probe()
772 if (quirks->has_lineout) { in sun8i_codec_analog_cmpnt_probe()
778 if (quirks->has_mbias) { in sun8i_codec_analog_cmpnt_probe()
784 if (quirks->has_mic2) { in sun8i_codec_analog_cmpnt_probe()
805 .compatible = "allwinner,sun8i-a23-codec-analog",
809 .compatible = "allwinner,sun8i-h3-codec-analog",
813 .compatible = "allwinner,sun8i-v3s-codec-analog",
827 dev_err(&pdev->dev, "Failed to map the registers\n"); in sun8i_codec_analog_probe()
831 regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base); in sun8i_codec_analog_probe()
833 dev_err(&pdev->dev, "Failed to create regmap\n"); in sun8i_codec_analog_probe()
837 return devm_snd_soc_register_component(&pdev->dev, in sun8i_codec_analog_probe()
844 .name = "sun8i-codec-analog",
851 MODULE_DESCRIPTION("Allwinner internal codec analog controls driver");
852 MODULE_AUTHOR("Chen-Yu Tsai <wens@csie.org>");
854 MODULE_ALIAS("platform:sun8i-codec-analog");