Lines Matching +full:playback +full:- +full:only

1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright 2011-2013 Analog Devices Inc.
6 * Author: Lars-Peter Clausen <lars@metafoo.de>
125 static const DECLARE_TLV_DB_SCALE(adau1761_sing_in_tlv, -1500, 300, 1);
126 static const DECLARE_TLV_DB_SCALE(adau1761_diff_in_tlv, -1200, 75, 0);
127 static const DECLARE_TLV_DB_SCALE(adau1761_out_tlv, -5700, 100, 0);
128 static const DECLARE_TLV_DB_SCALE(adau1761_sidetone_tlv, -1800, 300, 1);
129 static const DECLARE_TLV_DB_SCALE(adau1761_boost_tlv, -600, 600, 1);
130 static const DECLARE_TLV_DB_SCALE(adau1761_pga_boost_tlv, -2000, 2000, 1);
132 static const DECLARE_TLV_DB_SCALE(adau1761_alc_max_gain_tlv, -1200, 600, 0);
133 static const DECLARE_TLV_DB_SCALE(adau1761_alc_target_tlv, -2850, 150, 0);
134 static const DECLARE_TLV_DB_SCALE(adau1761_alc_ng_threshold_tlv, -7650, 150, 0);
260 SOC_SINGLE("Speaker Auto-mute Switch", ADAU1761_DIGMIC_JACKDETECT,
306 SOC_DOUBLE_R_TLV("Headphone Playback Volume", ADAU1761_PLAY_HP_LEFT_VOL,
308 SOC_DOUBLE_R("Headphone Playback Switch", ADAU1761_PLAY_HP_LEFT_VOL,
310 SOC_DOUBLE_R_TLV("Lineout Playback Volume", ADAU1761_PLAY_LINE_LEFT_VOL,
312 SOC_DOUBLE_R("Lineout Playback Switch", ADAU1761_PLAY_LINE_LEFT_VOL,
318 SOC_ENUM("Playback Bias", adau1761_playback_bias_enum),
323 SOC_SINGLE_TLV("Mono Playback Volume", ADAU1761_PLAY_MONO_OUTPUT_VOL,
325 SOC_SINGLE("Mono Playback Switch", ADAU1761_PLAY_MONO_OUTPUT_VOL,
382 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in adau1761_dejitter_fixup()
387 regmap_write(adau->regmap, ADAU1761_DEJITTER, 0); in adau1761_dejitter_fixup()
388 if (!adau->master) in adau1761_dejitter_fixup()
389 regmap_write(adau->regmap, ADAU1761_DEJITTER, 3); in adau1761_dejitter_fixup()
400 SOC_MIXER_ARRAY("Left Playback Mixer", ADAU1761_PLAY_MIXER_LEFT0,
402 SOC_MIXER_ARRAY("Right Playback Mixer", ADAU1761_PLAY_MIXER_RIGHT0,
404 SOC_MIXER_ARRAY("Left LR Playback Mixer", ADAU1761_PLAY_LR_MIXER_LEFT,
406 SOC_MIXER_ARRAY("Right LR Playback Mixer", ADAU1761_PLAY_LR_MIXER_RIGHT,
430 SND_SOC_DAPM_MIXER("Mono Playback Mixer", ADAU1761_PLAY_MIXER_MONO,
450 { "Left Playback Mixer", NULL, "Left Playback Enable"},
451 { "Right Playback Mixer", NULL, "Right Playback Enable"},
452 { "Left LR Playback Mixer", NULL, "Left Playback Enable"},
453 { "Right LR Playback Mixer", NULL, "Right Playback Enable"},
455 { "Left Playback Mixer", "Left DAC Switch", "Left DAC" },
456 { "Left Playback Mixer", "Right DAC Switch", "Right DAC" },
458 { "Right Playback Mixer", "Left DAC Switch", "Left DAC" },
459 { "Right Playback Mixer", "Right DAC Switch", "Right DAC" },
461 { "Left LR Playback Mixer", "Left Volume", "Left Playback Mixer" },
462 { "Left LR Playback Mixer", "Right Volume", "Right Playback Mixer" },
464 { "Right LR Playback Mixer", "Left Volume", "Left Playback Mixer" },
465 { "Right LR Playback Mixer", "Right Volume", "Right Playback Mixer" },
467 { "LHP", NULL, "Left Playback Mixer" },
468 { "RHP", NULL, "Right Playback Mixer" },
473 { "LOUT", NULL, "Left LR Playback Mixer" },
474 { "ROUT", NULL, "Right LR Playback Mixer" },
476 { "Left Playback Mixer", "Aux Bypass Volume", "LAUX" },
477 { "Left Playback Mixer", "Left Bypass Volume", "Left Input Mixer" },
478 { "Left Playback Mixer", "Right Bypass Volume", "Right Input Mixer" },
479 { "Right Playback Mixer", "Aux Bypass Volume", "RAUX" },
480 { "Right Playback Mixer", "Left Bypass Volume", "Left Input Mixer" },
481 { "Right Playback Mixer", "Right Bypass Volume", "Right Input Mixer" },
485 { "Mono Playback Mixer", NULL, "Left Playback Mixer" },
486 { "Mono Playback Mixer", NULL, "Right Playback Mixer" },
488 { "MONOOUT", NULL, "Mono Playback Mixer" },
549 { "Playback", NULL, "Serial Port Clock" },
551 { "Playback", NULL, "Serial Input Routing Clock" },
560 { "Right Playback Mixer", NULL, "Slew Clock" },
561 { "Left Playback Mixer", NULL, "Slew Clock" },
577 struct regmap *regmap = adau->regmap; in adau1761_compatibility_probe()
580 /* Only consider compatibility mode when ADAU1361 was specified. */ in adau1761_compatibility_probe()
581 if (adau->type != ADAU1361) in adau1761_compatibility_probe()
595 * ADAU17X1_SERIAL_SAMPLING_RATE doesn't exist in non-DSP chips; in adau1761_compatibility_probe()
596 * reading it results in zero at all times, and write is a no-op. in adau1761_compatibility_probe()
612 adau->type = ADAU1761_AS_1361; in adau1761_compatibility_probe()
631 regcache_cache_only(adau->regmap, false); in adau1761_set_bias_level()
632 regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL, in adau1761_set_bias_level()
636 regcache_sync(adau->regmap); in adau1761_set_bias_level()
639 regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL, in adau1761_set_bias_level()
641 regcache_cache_only(adau->regmap, true); in adau1761_set_bias_level()
651 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_get_lineout_mode()
654 return pdata->lineout_mode; in adau1761_get_lineout_mode()
662 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_setup_digmic_jackdetect()
669 mode = pdata->digmic_jackdetect_pin_mode; in adau1761_setup_digmic_jackdetect()
675 switch (pdata->jackdetect_debounce_time) { in adau1761_setup_digmic_jackdetect()
680 val |= pdata->jackdetect_debounce_time << 6; in adau1761_setup_digmic_jackdetect()
683 return -EINVAL; in adau1761_setup_digmic_jackdetect()
685 if (pdata->jackdetect_active_low) in adau1761_setup_digmic_jackdetect()
714 return -EINVAL; in adau1761_setup_digmic_jackdetect()
717 regmap_write(adau->regmap, ADAU1761_DIGMIC_JACKDETECT, val); in adau1761_setup_digmic_jackdetect()
726 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_setup_headphone_mode()
731 mode = pdata->headphone_mode; in adau1761_setup_headphone_mode()
739 regmap_update_bits(adau->regmap, ADAU1761_PLAY_MONO_OUTPUT_VOL, in adau1761_setup_headphone_mode()
746 regmap_update_bits(adau->regmap, ADAU1761_PLAY_HP_RIGHT_VOL, in adau1761_setup_headphone_mode()
751 return -EINVAL; in adau1761_setup_headphone_mode()
823 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_component_probe()
831 if (pdata && pdata->input_differential) { in adau1761_component_probe()
832 regmap_update_bits(adau->regmap, ADAU1761_LEFT_DIFF_INPUT_VOL, in adau1761_component_probe()
835 regmap_update_bits(adau->regmap, ADAU1761_RIGHT_DIFF_INPUT_VOL, in adau1761_component_probe()
855 regmap_update_bits(adau->regmap, ADAU1761_PLAY_LINE_LEFT_VOL, in adau1761_component_probe()
858 regmap_update_bits(adau->regmap, ADAU1761_PLAY_LINE_RIGHT_VOL, in adau1761_component_probe()
863 return -EINVAL; in adau1761_component_probe()
876 * ADAU1361, we need these non-DSP related DAPM widgets and routes. in adau1761_component_probe()
878 if (adau->type == ADAU1761 || adau->type == ADAU1761_AS_1361) { in adau1761_component_probe()
890 * These routes are DSP related and only used when we have a in adau1761_component_probe()
893 if (adau->type == ADAU1761) { in adau1761_component_probe()
908 if (adau->type == ADAU1761_AS_1361) { in adau1761_component_probe()
909 regmap_write(adau->regmap, ADAU17X1_SERIAL_INPUT_ROUTE, 0x01); in adau1761_component_probe()
910 regmap_write(adau->regmap, ADAU17X1_SERIAL_OUTPUT_ROUTE, 0x01); in adau1761_component_probe()
939 .name = "adau-hifi",
940 .playback = {
941 .stream_name = "Playback",
958 .name = "adau-hifi",
959 .playback = {
960 .stream_name = "Playback",
999 /* Enable cache only mode as we could miss writes before bias level in adau1761_probe()
1022 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");