/linux/sound/soc/codecs/ |
H A D | rt5665.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5665.c -- RT5665/RT5658 ALSA SoC audio codec driver 26 #include <sound/soc-dapm.h> 887 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0); 888 static const DECLARE_TLV_DB_SCALE(mono_vol_tlv, -1400, 150, 0); 889 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 890 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0); 891 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 892 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); 894 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0); [all …]
|
H A D | rt5677.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5677.c -- RT5677 ALSA SoC audio codec driver 29 #include <sound/soc-dapm.h> 35 #include "rt5677-spi.h" 552 * rt5677_dsp_mode_i2c_write_addr - Write value to address on DSP mode. 563 struct snd_soc_component *component = rt5677->component; in rt5677_dsp_mode_i2c_write_addr() 566 mutex_lock(&rt5677->dsp_cmd_lock); in rt5677_dsp_mode_i2c_write_addr() 568 ret = regmap_write(rt5677->regmap_physical, RT5677_DSP_I2C_ADDR_MSB, in rt5677_dsp_mode_i2c_write_addr() 571 dev_err(component->dev, "Failed to set addr msb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr() 575 ret = regmap_write(rt5677->regmap_physical, RT5677_DSP_I2C_ADDR_LSB, in rt5677_dsp_mode_i2c_write_addr() [all …]
|
H A D | rt5670.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5670.c -- RT5670 ALSA SoC audio codec driver 25 #include <sound/soc-dapm.h> 31 #include "rt5670-dsp.h" 50 MODULE_PARM_DESC(quirk, "Board-specific quirk override"); 422 * rt5670_headset_detect - Detect headset. 457 rt5670->jack_type = SND_JACK_HEADSET; in rt5670_headset_detect() 464 rt5670->jack_type = SND_JACK_HEADPHONE; in rt5670_headset_detect() 471 rt5670->jack_type = 0; in rt5670_headset_detect() 476 return rt5670->jack_type; in rt5670_headset_detect() [all …]
|
H A D | rt5645.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5645.c -- RT5645 ALSA SoC audio codec driver 26 #include <sound/soc-dapm.h> 41 static unsigned int quirk = -1; 438 /* Some (package) variants have the headset-mic pin not-connecte [all...] |
H A D | rt5659.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5659.c -- RT5659/RT5658 ALSA SoC audio codec driver 25 #include <sound/soc-dapm.h> 1136 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2325, 75, 0); 1137 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 1138 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0); 1139 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 1140 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); 1142 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0); 1174 SOC_DAPM_ENUM("IF1 01 ADC Swap Source", rt5659_if1_01_adc_enum); [all …]
|
H A D | rt715-sdca.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt715-sdca.c -- rt715 ALSA SoC audio driver 25 #include <sound/soc-dapm.h> 30 #include "rt715-sdca.h" 35 struct regmap *regmap = rt715->mbq_regmap; in rt715_sdca_index_write() 43 dev_err(&rt715->slave->dev, in rt715_sdca_index_write() 53 struct regmap *regmap = rt715->mbq_regmap; in rt715_sdca_index_read() 61 dev_err(&rt715->slave->dev, in rt715_sdca_index_read() 92 ((abs(u_ctrl_val - vol_gain_sft) * RT715_SDCA_DB_STEP) << 8) / 1000; in rt715_sdca_vol_gain() 117 reg_val = ~(reg_val - 1) & 0xffff; in rt715_sdca_get_gain() [all …]
|
H A D | es8328.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * es8328.c -- ES8328 ALSA SoC Audio driver 5 * Copyright 2014 Sutajio Ko-Usagi PTE LTD 99 static const DECLARE_TLV_DB_SCALE(play_tlv, -3000, 100, 0); 100 static const DECLARE_TLV_DB_SCALE(dac_adc_tlv, -9600, 50, 0); 101 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0); 123 if (es8328->deemph) { in es8328_set_deemph() 126 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph() 127 abs(deemph_settings[best].rate - es8328->playback_fs)) in es8328_set_deemph() 136 dev_dbg(component->dev, "Set deemphasis %d\n", val); in es8328_set_deemph() [all …]
|
H A D | rt5668.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5668.c -- RT5668B ALSA SoC audio component driver 26 #include <sound/soc-dapm.h> 746 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0); 747 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0); 748 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0); 783 SOC_DAPM_ENUM("IF2 ADC Swap Mux", rt5668_if2_adc_enum); 786 SOC_DAPM_ENUM("IF1 01 ADC Swap Mux", rt5668_if1_01_adc_enum); 789 SOC_DAPM_ENUM("IF1 23 ADC Swap Mux", rt5668_if1_23_adc_enum); 792 SOC_DAPM_ENUM("IF1 45 ADC Swap Mux", rt5668_if1_45_adc_enum); [all …]
|
H A D | rt5682.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt5682.c -- RT5682 ALSA SoC audio component driver 25 #include <sound/soc-dapm.h> 38 "LDO1-IN", 60 ret = regmap_multi_reg_write(rt5682->regmap, patch_list, in rt5682_apply_patch_list() 749 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6525, 75, 0); 750 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0); 785 SOC_DAPM_ENUM("IF2 ADC Swap Mux", rt5682_if2_adc_enum); 788 SOC_DAPM_ENUM("IF1 01 ADC Swap Mux", rt5682_if1_01_adc_enum); 791 SOC_DAPM_ENUM("IF1 23 ADC Swap Mux", rt5682_if1_23_adc_enum); [all …]
|
H A D | rt715.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * rt715.c -- rt715 ALSA SoC audio driver 28 #include <sound/soc-dapm.h> 111 ret = regmap_read(rt715->regmap, addr_l, r_val); in rt715_get_gain() 118 ret = regmap_read(rt715->regmap, addr_h, l_val); in rt715_get_gain() 123 /* For Verb-Set Amplifier Gain (Verb ID = 3h) */ 131 (struct soc_mixer_control *)kcontrol->private_value; in rt715_set_amp_gain_put() 138 if (ucontrol->value.integer.value[i] != rt715->kctl_2ch_vol_ori[i]) { in rt715_set_amp_gain_put() 145 addr_h = mc->reg; in rt715_set_amp_gain_put() 146 addr_l = mc->rreg; in rt715_set_amp_gain_put() [all …]
|
H A D | rt5640.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5640.c -- RT5640/RT5639 ALSA SoC audio codec driver 27 #include <sound/soc-dapm.h> 340 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 341 static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0); 342 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 343 static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000); 420 /* ADC Digital Volume Control */ 421 SOC_DOUBLE("ADC Capture Switch", RT5640_ADC_DIG_VOL, 423 SOC_DOUBLE_TLV("ADC Capture Volume", RT5640_ADC_DIG_VOL, [all …]
|
H A D | nau8540.c | 1 // SPDX-License-Identifier: GPL-2.0-only 24 #include <sound/soc-dapm.h> 182 static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -12800, 3600); 183 static const DECLARE_TLV_DB_MINMAX(fepga_gain_tlv, -100, 3600); 206 "ADC channel 1", "ADC channel 2", "ADC channel 3", "ADC channel 4" 235 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in nau8540_fepga_event() 240 regmap_update_bits(nau8540->regmap, NAU8540_REG_FEPGA2, in nau8540_fepga_event() 256 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in nau8540_precharge_event() 261 regmap_update_bits(nau8540->regmap, NAU8540_REG_REFERENCE, in nau8540_precharge_event() 264 regmap_update_bits(nau8540->regmap, NAU8540_REG_REFERENCE, in nau8540_precharge_event() [all …]
|
H A D | wm8971.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * wm8971.c -- WM8971 ALSA SoC Audio driver 97 "Mute ADC Output" }; 159 SOC_ENUM("Treble Cut-off", wm8971_enum[2]), 180 SOC_ENUM("Playback De-emphasis", wm8971_enum[5]), 215 /* Left Line Mux */ 219 /* Right Line Mux */ 223 /* Left PGA Mux */ 227 /* Right PGA Mux */ 231 /* Mono ADC Mux */ [all …]
|
H A D | wm8750.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * wm8750.c -- WM8750 ALSA SoC audio driver 99 "Mute ADC Output"}; 145 SOC_ENUM("Playback De-emphasis", wm8750_enum[15]), 158 SOC_ENUM("Treble Cut-off", wm8750_enum[2]), 162 SOC_ENUM("3D Lower Cut-off", wm8750_enum[3]), 163 SOC_ENUM("3D Upper Cut-off", wm8750_enum[4]), 177 SOC_SINGLE("Left ADC Capture Volume", WM8750_LADC, 0, 255, 0), 178 SOC_SINGLE("Right ADC Capture Volume", WM8750_RADC, 0, 255, 0), 186 /* ADCDAC Bit 0 - ADCHPD */ [all …]
|
H A D | rt5651.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5651.c -- RT5651 ALSA SoC audio codec driver 23 #include <sound/soc-dapm.h> 287 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 288 static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0); 289 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 290 static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000); 342 /* ADC Digital Volume Control */ 343 SOC_DOUBLE("ADC Capture Switch", RT5651_ADC_DIG_VOL, 345 SOC_DOUBLE_TLV("ADC Capture Volume", RT5651_ADC_DIG_VOL, [all …]
|
H A D | es8311.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * es8311.c -- es8311 ALSA SoC audio driver 38 static const DECLARE_TLV_DB_SCALE(es8311_adc_vol_tlv, -9550, 50, 0); 68 0, 1, TLV_DB_SCALE_ITEM(-3010, 600, 0), 69 2, 3, TLV_DB_SCALE_ITEM(-2060, 250, 0), 70 4, 5, TLV_DB_SCALE_ITEM(-1610, 160, 0), 71 6, 7, TLV_DB_SCALE_ITEM(-1320, 120, 0), 72 8, 9, TLV_DB_SCALE_ITEM(-1100, 90, 0), 73 10, 11, TLV_DB_SCALE_ITEM(-930, 80, 0), 74 12, 15, TLV_DB_SCALE_ITEM(-780, 60, 0), [all …]
|
H A D | ak4619.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * ak4619.c -- Asahi Kasei ALSA SoC Audio driver 39 #define ADC_DF 0x0a /* ADC Digital Filter Setting */ 40 #define ADC_AI 0x0b /* ADC Analog Input Setting */ 41 #define ADC_MHPF 0x0D /* ADC Mute & HPF Control */ 47 #define DAC_DEMP 0x13 /* DAC De-Emphasis Setting */ 91 /* ADC Digital Volume */ 95 /* ADC Digital Filter Setting */ 105 /* ADC Mute & HPF Control */ 126 /* DAC De-Emphasis Setting */ [all …]
|
H A D | 88pm860x-codec.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * 88pm860x-codec.c -- 88PM860x ALSA SoC Audio Driver 26 #include "88pm860x-codec.h" 75 /* ADC Analog Register 1 (0xd0) */ 117 * This widget should be just after DAC & PGA in DAPM power-on sequence and 118 * before DAC & PGA in DAPM power-off sequence. 149 /* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */ 150 static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1); 152 /* -9dB to 0db in 3dB steps */ 153 static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0); [all …]
|
H A D | rt5682s.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt5682s.c -- RT5682I-VS ALSA SoC audio component driver 25 #include <sound/soc-dapm.h> 38 .dai_clk_names[RT5682S_DAI_WCLK_IDX] = "rt5682-dai-wclk", 39 .dai_clk_names[RT5682S_DAI_BCLK_IDX] = "rt5682-dai-bclk", 46 [RT5682S_SUPPLY_LDO1_IN] = "LDO1-IN", 69 ret = regmap_multi_reg_write(rt5682s->regmap, patch_list, ARRAY_SIZE(patch_list)); in rt5682s_apply_patch_list() 624 regmap_write(rt5682s->regmap, RT5682S_RESET, 0); in rt5682s_reset() 634 dev_dbg(component->dev, "%s btn_type=%x\n", __func__, btn_type); in rt5682s_button_detect() 651 mutex_lock(&rt5682s->sar_mutex); in rt5682s_sar_power_mode() [all …]
|
H A D | mt6351.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // mt6351.c -- mt6351 ALSA SoC audio codec driver 8 #include <linux/dma-mapping.h> 202 regmap_update_bits(cmpnt->regmap, MT6351_ZCD_CON2, in set_hp_gain_zero() 204 regmap_update_bits(cmpnt->regmap, MT6351_ZCD_CON2, in set_hp_gain_zero() 225 dev_warn(cmpnt->dev, "%s(), error rate %d, return 3", in get_cap_reg_val() 256 dev_warn(cmpnt->dev, "%s(), error rate %d, return 8", in get_play_reg_val() 266 struct snd_soc_component *cmpnt = dai->component; in mt6351_codec_dai_hw_params() 270 dev_dbg(priv->dev, "%s(), substream->stream %d, rate %d\n", in mt6351_codec_dai_hw_params() 271 __func__, substream->stream, rate); in mt6351_codec_dai_hw_params() [all …]
|
/linux/sound/soc/sunxi/ |
H A D | sun8i-codec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * (C) Copyright 2010-2016 9 * Mylène Josserand <mylene.josserand@free-electrons.com> 27 #include <sound/soc-dapm.h> 251 if (scodec->clk_bus) { in sun8i_codec_runtime_resume() 252 ret = clk_prepare_enable(scodec->clk_bus); in sun8i_codec_runtime_resume() 259 regcache_cache_only(scodec->regmap, false); in sun8i_codec_runtime_resume() 261 ret = regcache_sync(scodec->regmap); in sun8i_codec_runtime_resume() 274 regcache_cache_only(scodec->regmap, true); in sun8i_codec_runtime_suspend() 275 regcache_mark_dirty(scodec->regmap); in sun8i_codec_runtime_suspend() [all …]
|
/linux/drivers/mfd/ |
H A D | pcf50633-adc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* NXP PCF50633 ADC Driver 4 * (C) 2006-2008 by Openmoko, Inc. 11 * NOTE: This driver does not yet support subtractive ADC mode, which means 23 #include <linux/mfd/pcf50633/adc.h> 26 int mux; member 51 return platform_get_drvdata(pcf->adc_pdev); in __to_adc() 62 /* start ADC conversion on selected channel */ in adc_setup() 69 struct pcf50633_adc *adc = __to_adc(pcf); in trigger_next_adc_job_if_any() local 72 head = adc->queue_head; in trigger_next_adc_job_if_any() [all …]
|
/linux/Documentation/devicetree/bindings/mux/ |
H A D | adi,adg792a.txt | 4 - compatible : "adi,adg792a" or "adi,adg792g" 5 - #mux-control-cells : <0> if parallel (the three muxes are bound together 6 with a single mux controller controlling all three muxes), or <1> if 7 not (one mux controller for each mux). 8 * Standard mux-controller bindings as described in mux-controller.yaml 11 - gpio-controller : if present, #gpio-cells below is required. 12 - #gpio-cells : should be <2> 13 - First cell is the GPO line number, i.e. 0 or 1 14 - Second cell is used to specify active high (0) 18 - idle-state : if present, array of states that the mux controllers will have [all …]
|
H A D | mux-controller.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/mux/mux-controller.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Peter Rosin <peda@axentia.se> 13 A multiplexer (or mux) controller will have one, or several, consumer devices 14 that uses the mux controller. Thus, a mux controller can possibly control 16 multiplexer needed by each consumer, but a single mux controller can of course 19 A mux controller provides a number of states to its consumers, and the state 20 space is a simple zero-based enumeration. I.e. 0-1 for a 2-way multiplexer, [all …]
|
/linux/arch/arm/boot/dts/aspeed/ |
H A D | aspeed-bmc-ampere-mtjade.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 2 /dts-v1/; 3 #include "aspeed-g5.dtsi" 4 #include <dt-bindings/gpio/aspeed-gpio.h> 8 compatible = "ampere,mtjade-bmc", "aspeed,ast2500"; 12 * i2c bus 50-57 assigned to NVMe slot 0-7 24 * i2c bus 60-67 assigned to NVMe slot 8-15 36 * i2c bus 70-77 assigned to NVMe slot 16-23 48 * i2c bus 80-81 assigned to NVMe M2 slot 0-1 60 stdout-path = &uart5; [all …]
|