Lines Matching +full:analog +full:- +full:out

1 // SPDX-License-Identifier: GPL-2.0+
3 * This driver supports the analog controls for the internal codec
6 * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
10 * Based on sun8i-codec-analog.c
22 #include <sound/soc-dapm.h>
25 #include "sun8i-adda-pr-regmap.h"
27 /* Codec analog control register offsets and bit fields */
178 -450, 150, 0);
184 static const DECLARE_TLV_DB_SCALE(sun50i_codec_hp_vol_scale, -6300, 100, 1);
188 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
193 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
203 /* Mixer pre-gain */
213 /* Mixer pre-gain */
228 /* Mixer pre-gain */
233 SOC_SINGLE_TLV("Line Out Playback Volume",
276 SOC_DAPM_ENUM("Line Out Source Playback Route",
281 SOC_DAPM_DOUBLE("Line Out Playback Switch",
309 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in sun50i_codec_hbias_event()
312 regmap_update_bits(component->regmap, SUN50I_ADDA_JACK_MIC_CTRL, in sun50i_codec_hbias_event()
353 SND_SOC_DAPM_MUX("Left Line Out Source",
355 SND_SOC_DAPM_MUX("Right Line Out Source",
357 SND_SOC_DAPM_SWITCH("Left Line Out Switch",
359 SND_SOC_DAPM_SWITCH("Right Line Out Switch",
473 /* Line-out Routes */
474 { "Left Line Out Source", "Stereo", "Left Mixer" },
475 { "Left Line Out Source", "Mono Differential", "Left Mixer" },
476 { "Left Line Out Source", "Mono Differential", "Right Mixer" },
477 { "Left Line Out Switch", "Line Out Playback Switch", "Left Line Out Source" },
478 { "LINEOUT", NULL, "Left Line Out Switch" },
480 { "Right Line Out Switch", "Line Out Playback Switch", "Right Mixer" },
481 { "Right Line Out Source", "Stereo", "Right Line Out Switch" },
482 { "Right Line Out Source", "Mono Differential", "Left Line Out Switch" },
483 { "LINEOUT", NULL, "Right Line Out Source" },
503 regmap_clear_bits(component->regmap, SUN50I_ADDA_JACK_MIC_CTRL, in sun50i_a64_codec_set_bias_level()
507 regmap_set_bits(component->regmap, SUN50I_ADDA_HP_CTRL, in sun50i_a64_codec_set_bias_level()
511 regmap_clear_bits(component->regmap, SUN50I_ADDA_HP_CTRL, in sun50i_a64_codec_set_bias_level()
515 regmap_update_bits(component->regmap, SUN50I_ADDA_JACK_MIC_CTRL, in sun50i_a64_codec_set_bias_level()
542 .compatible = "allwinner,sun50i-a64-codec-analog",
556 dev_err(&pdev->dev, "Failed to map the registers\n"); in sun50i_codec_analog_probe()
560 regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base); in sun50i_codec_analog_probe()
562 dev_err(&pdev->dev, "Failed to create regmap\n"); in sun50i_codec_analog_probe()
566 enable = device_property_read_bool(&pdev->dev, in sun50i_codec_analog_probe()
567 "allwinner,internal-bias-resistor"); in sun50i_codec_analog_probe()
579 return devm_snd_soc_register_component(&pdev->dev, in sun50i_codec_analog_probe()
586 .name = "sun50i-codec-analog",
593 MODULE_DESCRIPTION("Allwinner internal codec analog controls driver for A64");
596 MODULE_ALIAS("platform:sun50i-codec-analog");