Lines Matching +full:internal +full:- +full:bias +full:- +full:resistor

1 // SPDX-License-Identifier: GPL-2.0+
3 * This driver supports the analog controls for the internal codec
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 */
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()
375 /* Microphone Bias */
387 /* Microphone Bias */
473 /* Line-out Routes */
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",
593 MODULE_DESCRIPTION("Allwinner internal codec analog controls driver for A64");
596 MODULE_ALIAS("platform:sun50i-codec-analog");