Lines Matching +full:left +full:- +full:right

1 // SPDX-License-Identifier: GPL-2.0+
6 * Copyright (C) 2016 Chen-Yu Tsai <wens@csie.org>
10 * Based on sun8i-codec-analog.c
23 #include <sound/soc-dapm.h>
26 #include "sun8i-adda-pr-regmap.h"
172 -450, 150, 0);
178 static const DECLARE_TLV_DB_SCALE(sun50i_codec_hp_vol_scale, -6300, 100, 1);
182 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
187 2, 31, TLV_DB_SCALE_ITEM(-4350, 150, 0),
197 /* Mixer pre-gain */
207 /* Mixer pre-gain */
222 /* Mixer pre-gain */
281 "DACR", "DACL", "Right Mixer", "Left Mixer",
302 SND_SOC_DAPM_DAC("Left DAC", NULL, SUN50I_ADDA_MIX_DAC_CTRL,
304 SND_SOC_DAPM_DAC("Right DAC", NULL, SUN50I_ADDA_MIX_DAC_CTRL,
307 SND_SOC_DAPM_ADC("Left ADC", NULL, SUN50I_ADDA_ADC_CTRL,
309 SND_SOC_DAPM_ADC("Right ADC", NULL, SUN50I_ADDA_ADC_CTRL,
318 SND_SOC_DAPM_MUX("Left Headphone Source",
320 SND_SOC_DAPM_MUX("Right Headphone Source",
322 SND_SOC_DAPM_SWITCH("Left Headphone Switch",
324 SND_SOC_DAPM_SWITCH("Right Headphone Switch",
326 SND_SOC_DAPM_OUT_DRV("Left Headphone Amp",
328 SND_SOC_DAPM_OUT_DRV("Right Headphone Amp",
334 SND_SOC_DAPM_MUX("Left Line Out Source",
336 SND_SOC_DAPM_MUX("Right Line Out Source",
338 SND_SOC_DAPM_SWITCH("Left Line Out Switch",
340 SND_SOC_DAPM_SWITCH("Right Line Out Switch",
381 SND_SOC_DAPM_MIXER("Left Mixer", SUN50I_ADDA_MIX_DAC_CTRL,
385 SND_SOC_DAPM_MIXER("Right Mixer", SUN50I_ADDA_MIX_DAC_CTRL,
389 SND_SOC_DAPM_MIXER("Left ADC Mixer", SND_SOC_NOPM, 0, 0,
392 SND_SOC_DAPM_MIXER("Right ADC Mixer", SND_SOC_NOPM, 0, 0,
398 /* Left Mixer Routes */
399 { "Left Mixer", "Mic1 Playback Switch", "Mic1 Amplifier" },
400 { "Left Mixer", "Mic2 Playback Switch", "Mic2 Amplifier" },
401 { "Left Mixer", "Line In Playback Switch", "LINEIN" },
402 { "Left Mixer", "DAC Playback Switch", "Left DAC" },
403 { "Left Mixer", "DAC Reversed Playback Switch", "Right DAC" },
405 /* Right Mixer Routes */
406 { "Right Mixer", "Mic1 Playback Switch", "Mic1 Amplifier" },
407 { "Right Mixer", "Mic2 Playback Switch", "Mic2 Amplifier" },
408 { "Right Mixer", "Line In Playback Switch", "LINEIN" },
409 { "Right Mixer", "DAC Playback Switch", "Right DAC" },
410 { "Right Mixer", "DAC Reversed Playback Switch", "Left DAC" },
412 /* Left ADC Mixer Routes */
413 { "Left ADC Mixer", "Mic1 Capture Switch", "Mic1 Amplifier" },
414 { "Left ADC Mixer", "Mic2 Capture Switch", "Mic2 Amplifier" },
415 { "Left ADC Mixer", "Line In Capture Switch", "LINEIN" },
416 { "Left ADC Mixer", "Mixer Capture Switch", "Left Mixer" },
417 { "Left ADC Mixer", "Mixer Reversed Capture Switch", "Right Mixer" },
419 /* Right ADC Mixer Routes */
420 { "Right ADC Mixer", "Mic1 Capture Switch", "Mic1 Amplifier" },
421 { "Right ADC Mixer", "Mic2 Capture Switch", "Mic2 Amplifier" },
422 { "Right ADC Mixer", "Line In Capture Switch", "LINEIN" },
423 { "Right ADC Mixer", "Mixer Capture Switch", "Right Mixer" },
424 { "Right ADC Mixer", "Mixer Reversed Capture Switch", "Left Mixer" },
427 { "Left ADC", NULL, "Left ADC Mixer" },
428 { "Right ADC", NULL, "Right ADC Mixer" },
431 { "Left Headphone Source", "DAC", "Left DAC" },
432 { "Left Headphone Source", "Mixer", "Left Mixer" },
433 { "Left Headphone Switch", "Headphone Playback Switch", "Left Headphone Source" },
434 { "Left Headphone Amp", NULL, "Left Headphone Switch" },
435 { "Left Headphone Amp", NULL, "Headphone Amp" },
436 { "HP", NULL, "Left Headphone Amp" },
438 { "Right Headphone Source", "DAC", "Right DAC" },
439 { "Right Headphone Source", "Mixer", "Right Mixer" },
440 { "Right Headphone Switch", "Headphone Playback Switch", "Right Headphone Source" },
441 { "Right Headphone Amp", NULL, "Right Headphone Switch" },
442 { "Right Headphone Amp", NULL, "Headphone Amp" },
443 { "HP", NULL, "Right Headphone Amp" },
453 /* Line-out Routes */
454 { "Left Line Out Source", "Stereo", "Left Mixer" },
455 { "Left Line Out Source", "Mono Differential", "Left Mixer" },
456 { "Left Line Out Source", "Mono Differential", "Right Mixer" },
457 { "Left Line Out Switch", "Line Out Playback Switch", "Left Line Out Source" },
458 { "LINEOUT", NULL, "Left Line Out Switch" },
460 { "Right Line Out Switch", "Line Out Playback Switch", "Right Mixer" },
461 { "Right Line Out Source", "Stereo", "Right Line Out Switch" },
462 { "Right Line Out Source", "Mono Differential", "Left Line Out Switch" },
463 { "LINEOUT", NULL, "Right Line Out Source" },
466 { "Earpiece Source Playback Route", "DACL", "Left DAC" },
467 { "Earpiece Source Playback Route", "DACR", "Right DAC" },
468 { "Earpiece Source Playback Route", "Left Mixer", "Left Mixer" },
469 { "Earpiece Source Playback Route", "Right Mixer", "Right Mixer" },
477 return regmap_update_bits(component->regmap, SUN50I_ADDA_HP_CTRL, in sun50i_a64_codec_suspend()
484 return regmap_update_bits(component->regmap, SUN50I_ADDA_HP_CTRL, in sun50i_a64_codec_resume()
501 .compatible = "allwinner,sun50i-a64-codec-analog",
515 dev_err(&pdev->dev, "Failed to map the registers\n"); in sun50i_codec_analog_probe()
519 regmap = sun8i_adda_pr_regmap_init(&pdev->dev, base); in sun50i_codec_analog_probe()
521 dev_err(&pdev->dev, "Failed to create regmap\n"); in sun50i_codec_analog_probe()
525 enable = device_property_read_bool(&pdev->dev, in sun50i_codec_analog_probe()
526 "allwinner,internal-bias-resistor"); in sun50i_codec_analog_probe()
531 return devm_snd_soc_register_component(&pdev->dev, in sun50i_codec_analog_probe()
538 .name = "sun50i-codec-analog",
548 MODULE_ALIAS("platform:sun50i-codec-analog");