Lines Matching +full:left +full:-

1 // SPDX-License-Identifier: GPL-2.0+
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"
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 */
287 "DACR", "DACL", "Right Mixer", "Left Mixer",
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()
321 SND_SOC_DAPM_DAC("Left DAC", NULL, SUN50I_ADDA_MIX_DAC_CTRL,
326 SND_SOC_DAPM_ADC("Left ADC", NULL, SUN50I_ADDA_ADC_CTRL,
337 SND_SOC_DAPM_MUX("Left Headphone Source",
341 SND_SOC_DAPM_SWITCH("Left Headphone Switch",
345 SND_SOC_DAPM_OUT_DRV("Left Headphone Amp",
353 SND_SOC_DAPM_MUX("Left Line Out Source",
357 SND_SOC_DAPM_SWITCH("Left Line Out Switch",
401 SND_SOC_DAPM_MIXER("Left Mixer", SUN50I_ADDA_MIX_DAC_CTRL,
409 SND_SOC_DAPM_MIXER("Left ADC Mixer", SND_SOC_NOPM, 0, 0,
418 /* Left Mixer Routes */
419 { "Left Mixer", "Mic1 Playback Switch", "Mic1 Amplifier" },
420 { "Left Mixer", "Mic2 Playback Switch", "Mic2 Amplifier" },
421 { "Left Mixer", "Line In Playback Switch", "LINEIN" },
422 { "Left Mixer", "DAC Playback Switch", "Left DAC" },
423 { "Left Mixer", "DAC Reversed Playback Switch", "Right DAC" },
430 { "Right Mixer", "DAC Reversed Playback Switch", "Left DAC" },
432 /* Left ADC Mixer Routes */
433 { "Left ADC Mixer", "Mic1 Capture Switch", "Mic1 Amplifier" },
434 { "Left ADC Mixer", "Mic2 Capture Switch", "Mic2 Amplifier" },
435 { "Left ADC Mixer", "Line In Capture Switch", "LINEIN" },
436 { "Left ADC Mixer", "Mixer Capture Switch", "Left Mixer" },
437 { "Left ADC Mixer", "Mixer Reversed Capture Switch", "Right Mixer" },
444 { "Right ADC Mixer", "Mixer Reversed Capture Switch", "Left Mixer" },
447 { "Left ADC", NULL, "Left ADC Mixer" },
451 { "Left Headphone Source", "DAC", "Left DAC" },
452 { "Left Headphone Source", "Mixer", "Left Mixer" },
453 { "Left Headphone Switch", "Headphone Playback Switch", "Left Headphone Source" },
454 { "Left Headphone Amp", NULL, "Left Headphone Switch" },
455 { "Left Headphone Amp", NULL, "Headphone Amp" },
456 { "HP", NULL, "Left Headphone Amp" },
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" },
482 { "Right Line Out Source", "Mono Differential", "Left Line Out Switch" },
486 { "Earpiece Source Playback Route", "DACL", "Left DAC" },
488 { "Earpiece Source Playback Route", "Left Mixer", "Left Mixer" },
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");