Lines Matching +full:dmic +full:- +full:mode
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,
370 "ADC", "DMIC",
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()
501 SND_SOC_DAPM_INPUT("DMIC"),
506 { "Left Decimator Mux", "DMIC", "DMIC" },
508 { "Right Decimator Mux", "DMIC", "DMIC" },
583 regcache_cache_only(adau->regmap, false); in adau1761_set_bias_level()
584 regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL, in adau1761_set_bias_level()
588 regcache_sync(adau->regmap); in adau1761_set_bias_level()
591 regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL, in adau1761_set_bias_level()
593 regcache_cache_only(adau->regmap, true); in adau1761_set_bias_level()
603 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_get_lineout_mode()
606 return pdata->lineout_mode; in adau1761_get_lineout_mode()
614 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_setup_digmic_jackdetect()
616 enum adau1761_digmic_jackdet_pin_mode mode; in adau1761_setup_digmic_jackdetect() local
621 mode = pdata->digmic_jackdetect_pin_mode; in adau1761_setup_digmic_jackdetect()
623 mode = ADAU1761_DIGMIC_JACKDET_PIN_MODE_NONE; in adau1761_setup_digmic_jackdetect()
625 switch (mode) { in adau1761_setup_digmic_jackdetect()
627 switch (pdata->jackdetect_debounce_time) { in adau1761_setup_digmic_jackdetect()
632 val |= pdata->jackdetect_debounce_time << 6; in adau1761_setup_digmic_jackdetect()
635 return -EINVAL; in adau1761_setup_digmic_jackdetect()
637 if (pdata->jackdetect_active_low) in adau1761_setup_digmic_jackdetect()
666 return -EINVAL; in adau1761_setup_digmic_jackdetect()
669 regmap_write(adau->regmap, ADAU1761_DIGMIC_JACKDETECT, val); in adau1761_setup_digmic_jackdetect()
678 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_setup_headphone_mode()
679 enum adau1761_output_mode mode; in adau1761_setup_headphone_mode() local
683 mode = pdata->headphone_mode; in adau1761_setup_headphone_mode()
685 mode = ADAU1761_OUTPUT_MODE_HEADPHONE; in adau1761_setup_headphone_mode()
687 switch (mode) { in adau1761_setup_headphone_mode()
691 regmap_update_bits(adau->regmap, ADAU1761_PLAY_MONO_OUTPUT_VOL, in adau1761_setup_headphone_mode()
698 regmap_update_bits(adau->regmap, ADAU1761_PLAY_HP_RIGHT_VOL, in adau1761_setup_headphone_mode()
703 return -EINVAL; in adau1761_setup_headphone_mode()
706 if (mode == ADAU1761_OUTPUT_MODE_HEADPHONE_CAPLESS) { in adau1761_setup_headphone_mode()
775 struct adau1761_platform_data *pdata = component->dev->platform_data; in adau1761_component_probe()
783 if (pdata && pdata->input_differential) { in adau1761_component_probe()
784 regmap_update_bits(adau->regmap, ADAU1761_LEFT_DIFF_INPUT_VOL, in adau1761_component_probe()
787 regmap_update_bits(adau->regmap, ADAU1761_RIGHT_DIFF_INPUT_VOL, in adau1761_component_probe()
807 regmap_update_bits(adau->regmap, ADAU1761_PLAY_LINE_LEFT_VOL, in adau1761_component_probe()
810 regmap_update_bits(adau->regmap, ADAU1761_PLAY_LINE_RIGHT_VOL, in adau1761_component_probe()
815 return -EINVAL; in adau1761_component_probe()
826 if (adau->type == ADAU1761) { in adau1761_component_probe()
866 .name = "adau-hifi",
885 .name = "adau-hifi",
922 /* Enable cache only mode as we could miss writes before bias level in adau1761_probe()
945 MODULE_AUTHOR("Lars-Peter Clausen <lars@metafoo.de>");