Lines Matching +full:4 +full:- +full:line

1 // SPDX-License-Identifier: GPL-2.0+
6 * Copyright (C) 2016 Chen-Yu Tsai <[email protected]>
10 * Based on sun8i-codec-analog.c
22 #include <sound/soc-dapm.h>
25 #include "sun8i-adda-pr-regmap.h"
36 #define SUN50I_ADDA_OL_MIX_CTRL_PHONE 4
45 #define SUN50I_ADDA_OR_MIX_CTRL_PHONE 4
52 #define SUN50I_ADDA_EARPIECE_CTRL0_EAR_RAMP_TIME 4
64 #define SUN50I_ADDA_LINEOUT_CTRL0_RSRC_SEL 4
70 #define SUN50I_ADDA_MIC1_CTRL_MIC1G 4
75 #define SUN50I_ADDA_MIC2_CTRL_MIC2G 4
86 #define SUN50I_ADDA_MIX_DAC_CTRL_LMIXEN 4
95 #define SUN50I_ADDA_L_ADCMIX_SRC_PHONE 4
104 #define SUN50I_ADDA_R_ADCMIX_SRC_PHONE 4
119 #define SUN50I_ADDA_MDET_CTRL_SELDETADC_FS 4
127 #define SUN50I_ADDA_JACK_MIC_CTRL_MICADCEN 4
139 SOC_DAPM_DOUBLE_R("Line In Playback Switch",
163 SOC_DAPM_DOUBLE_R("Line In Capture Switch",
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 */
229 SOC_SINGLE_TLV("Line In Playback Volume", SUN50I_ADDA_LINEIN_CTRL,
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",
397 /* Line input */
421 { "Left Mixer", "Line In Playback Switch", "LINEIN" },
428 { "Right Mixer", "Line In Playback Switch", "LINEIN" },
435 { "Left ADC Mixer", "Line In Capture Switch", "LINEIN" },
442 { "Right ADC Mixer", "Line In Capture Switch", "LINEIN" },
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",
596 MODULE_ALIAS("platform:sun50i-codec-analog");