/linux/sound/soc/ti/ |
H A D | omap-dmic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * omap-dmic.c -- OMAP ASoC DMIC DAI driver 5 * Copyright (C) 2010 - 2011 Texas Instruments 30 #include "omap-dmic.h" 31 #include "sdma-pcm.h" 51 static inline void omap_dmic_write(struct omap_dmic *dmic, u16 reg, u32 val) in omap_dmic_write() argument 53 writel_relaxed(val, dmic->io_base + reg); in omap_dmic_write() 56 static inline int omap_dmic_read(struct omap_dmic *dmic, u16 reg) in omap_dmic_read() argument 58 return readl_relaxed(dmic->io_base + reg); in omap_dmic_read() 61 static inline void omap_dmic_start(struct omap_dmic *dmic) in omap_dmic_start() argument [all …]
|
H A D | omap-abe-twl6040.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * omap-abe-twl6040.c -- SoC audio for TI OMAP based boards with ABE and 20 #include "omap-dmic.h" 21 #include "omap-mcpdm.h" 26 DAILINK_COMP_ARRAY(COMP_CODEC("twl6040-codec", 27 "twl6040-legacy")), 32 DAILINK_COMP_ARRAY(COMP_CODEC("dmic-codec", 33 "dmic-hifi")), 50 struct snd_soc_card *card = rtd->card; in omap_abe_hw_params() 52 int clk_id, freq; in omap_abe_hw_params() local [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | omap-abe-twl6040.txt | 4 - compatible: "ti,abe-twl6040" 5 - ti,model: Name of the sound card ( for example "SDP4430") 6 - ti,mclk-freq: MCLK frequency for HPPLL operation 7 - ti,mcpdm: phandle for the McPDM node 8 - ti,twl6040: phandle for the twl6040 core node 9 - ti,audio-routing: List of connections between audio components. 14 - ti,dmic: phandle for the OMAP dmic node if the machine have it connected 15 - ti,jack-detection: Need to be present if the board capable to detect jack 18 Available audio endpoints for the audio-routing table: 54 * DMic [all …]
|
H A D | maxim,max98090.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> 18 - $ref: dai-common.yaml# 23 - maxim,max98090 24 - maxim,max98091 31 - description: master clock 33 clock-names: 35 - const: mclk [all …]
|
/linux/sound/soc/codecs/ |
H A D | max9867.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright 2013-2015 Maxim Integrated Products 6 // Copyright 2018 Ladislav Michl <ladis@linux-mips.org> 42 "Butterworth/8-24" 55 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in max9867_adc_dac_event() 71 max9867->adc_dac_active |= BIT(adc_dac); in max9867_adc_dac_event() 73 max9867->adc_dac_active &= ~BIT(adc_dac); in max9867_adc_dac_event() 86 ret = regmap_read(max9867->regmap, MAX9867_CODECFLTR, ®); in max9867_filter_get() 88 return -EINVAL; in max9867_filter_get() 91 ucontrol->value.enumerated.item[0] = 1; in max9867_filter_get() [all …]
|
H A D | max98090.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max98090.c -- MAX98090 ALSA SoC Audio driver 5 * Copyright 2011-2012 Maxim Integrated Products 279 /* Reset the codec by writing to this write-only reset register */ in max98090_reset() 280 ret = regmap_write(max98090->regmap, M98090_REG_SOFTWARE_RESET, in max98090_reset() 283 dev_err(max98090->component->dev, in max98090_reset() 300 -600, 600, 0); 303 0, 3, TLV_DB_SCALE_ITEM(-600, 300, 0), 308 static const DECLARE_TLV_DB_SCALE(max98090_av_tlv, -1200, 100, 0); 311 static const DECLARE_TLV_DB_SCALE(max98090_dv_tlv, -1500, 100, 0); [all …]
|
H A D | rt5514.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5514.c -- RT5514 ALSA SoC audio codec driver 24 #include <sound/soc-dapm.h> 31 #include "rt5514-spi.h" 120 regmap_write(rt5514->i2c_regmap, 0x18002000, 0x000010ec); in rt5514_enable_dsp_prepare() 122 regmap_write(rt5514->i2c_regmap, 0x18002200, 0x00028604); in rt5514_enable_dsp_prepare() 124 regmap_write(rt5514->i2c_regmap, 0xfafafafa, 0x00000001); in rt5514_enable_dsp_prepare() 125 /* mini-core reset */ in rt5514_enable_dsp_prepare() 126 regmap_write(rt5514->i2c_regmap, 0x18002f00, 0x0005514b); in rt5514_enable_dsp_prepare() 127 regmap_write(rt5514->i2c_regmap, 0x18002f00, 0x00055149); in rt5514_enable_dsp_prepare() [all …]
|
H A D | rt5660.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5660.c -- RT5660 ALSA SoC audio codec driver 24 #include <sound/soc-dapm.h> 296 static const DECLARE_TLV_DB_SCALE(rt5660_out_vol_tlv, -4650, 150, 0); 297 static const DECLARE_TLV_DB_SCALE(rt5660_dac_vol_tlv, -6525, 75, 0); 298 static const DECLARE_TLV_DB_SCALE(rt5660_adc_vol_tlv, -1725, 75, 0); 300 static const DECLARE_TLV_DB_SCALE(rt5660_bst_tlv, -1200, 75, 0); 342 * rt5660_set_dmic_clk - Set parameter of dmic. 352 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in rt5660_set_dmic_clk() 356 rate = rt5660->sysclk / rl6231_get_pre_div(rt5660->regmap, in rt5660_set_dmic_clk() [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 | tscs454.c | 1 // SPDX-License-Identifier: GPL-2.0 2 // tscs454.c -- TSCS454 ALSA SoC Audio driver 21 #include <sound/soc-dapm.h> 50 pll->id = id; in pll_init() 51 mutex_init(&pll->lock); in pll_init() 66 aif->id = id; in aif_init() 85 cache[((norm_addrs[i] + 1) * COEFF_SIZE) - 1] = 0x40; in init_coeff_ram_cache() 90 init_coeff_ram_cache(ram->cache); in coeff_ram_init() 91 mutex_init(&ram->lock); in coeff_ram_init() 103 status->streams |= mask; in set_aif_status_active() [all …]
|
H A D | es8316.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * es8316.c -- es8316 ALSA SoC audio driver 6 * Authors: David Yang <yangxiaohua@everest-semi.com>, 21 #include <sound/soc-dapm.h> 50 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9600, 50, 1); 51 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_vol_tlv, -9600, 50, 1); 52 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_max_gain_tlv, -650, 150, 0); 53 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_min_gain_tlv, -1200, 150, 0); 56 0, 10, TLV_DB_SCALE_ITEM(-1650, 150, 0), 57 11, 11, TLV_DB_SCALE_ITEM(-150, 0, 0), [all …]
|
H A D | rt286.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt286.c -- RT286 ALSA SoC audio codec driver 23 #include <sound/soc-dapm.h> 196 snd_soc_component_write(component, rt286->index_cache[i].reg, in rt286_index_sync() 197 rt286->index_cache[i].def); in rt286_index_sync() 223 if (!rt286->component) in rt286_jack_detect() 224 return -EINVAL; in rt286_jack_detect() 226 dapm = snd_soc_component_get_dapm(rt286->component); in rt286_jack_detect() 228 if (rt286->pdata.cbj_en) { in rt286_jack_detect() 229 regmap_read(rt286->regmap, RT286_GET_HP_SENSE, &buf); in rt286_jack_detect() [all …]
|
H A D | msm8916-wcd-digital.c | 1 // SPDX-License-Identifier: GPL-2.0 254 static const char *const cic_mux_text[] = { "AMIC", "DMIC" }; 331 /* Digital Gain control -84 dB to +40 dB in 1 dB steps */ 332 static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); 334 /* Cutoff Freq for High Pass Filter at -3dB */ 360 snd_soc_dapm_to_component(w->dapm); in msm8x16_wcd_codec_set_iir_gain() 365 if (w->shift == 0) in msm8x16_wcd_codec_set_iir_gain() 367 else if (w->shift == 1) in msm8x16_wcd_codec_set_iir_gain() 429 (struct wcd_iir_filter_ctl *)kcontrol->private_value; in msm8x16_wcd_get_iir_band_audio_mixer() 430 struct soc_bytes_ext *params = &ctl->bytes_ext; in msm8x16_wcd_get_iir_band_audio_mixer() [all …]
|
H A D | cs42l73.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * cs42l73.c -- CS42L73 ALSA Soc Audio driver 25 #include <sound/soc-dapm.h> 47 { 6, 0xF1 }, /* r06 - Power Ctl 1 */ 48 { 7, 0xDF }, /* r07 - Power Ctl 2 */ 49 { 8, 0x3F }, /* r08 - Power Ctl 3 */ 50 { 9, 0x50 }, /* r09 - Charge Pump Freq */ 51 { 10, 0x53 }, /* r0A - Output Load MicBias Short Detect */ 52 { 11, 0x00 }, /* r0B - DMIC Master Clock Ctl */ 53 { 12, 0x00 }, /* r0C - Aux PCM Ctl */ [all …]
|
H A D | rt298.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt298.c -- RT298 ALSA SoC audio codec driver 23 #include <sound/soc-dapm.h> 200 snd_soc_component_write(component, rt298->index_cache[i].reg, in rt298_index_sync() 201 rt298->index_cache[i].def); in rt298_index_sync() 227 if (!rt298->component) in rt298_jack_detect() 228 return -EINVAL; in rt298_jack_detect() 230 dapm = snd_soc_component_get_dapm(rt298->component); in rt298_jack_detect() 232 if (rt298->pdata.cbj_en) { in rt298_jack_detect() 233 regmap_read(rt298->regmap, RT298_GET_HP_SENSE, &buf); in rt298_jack_detect() [all …]
|
H A D | rt5631.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5631.c -- RT5631 ALSA Soc Audio driver 22 #include <sound/soc-dapm.h> 68 * rt5631_write_index - write index register of 2nd layer 78 * rt5631_read_index - read index register of 2nd layer 169 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 170 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95625, 375, 0); 171 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 189 ucontrol->value.integer.value[0] = rt5631->dmic_used_flag; in rt5631_dmic_get() 200 rt5631->dmic_used_flag = ucontrol->value.integer.value[0]; in rt5631_dmic_put() [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); 361 SOC_SINGLE("DMIC ASRC Switch", RT5651_PLL_MODE_1, 369 * set_dmic_clk - Set parameter of dmic. 379 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_clk() [all …]
|
H A D | tas2552.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * tas2552.c - ALSA SoC Texas Instruments TAS2552 Mono Audio Amplifier 5 * Copyright (C) 2014 - 2024 Texas Instruments Incorporated - 25 #include <sound/soc-dapm.h> 27 #include <sound/tas2552-plat.h> 28 #include <dt-bindings/sound/tas2552.h> 82 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in tas2552_post_event() 128 SND_SOC_DAPM_INPUT("DMIC") 138 {"ASI OUT", NULL, "DMIC"} 146 if (!tas2552->component) in tas2552_sw_shutdown() [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); 451 * set_dmic_clk - Set parameter of dmic. 461 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_clk() 465 rate = rt5640->sysclk / rl6231_get_pre_div(rt5640->regmap, in set_dmic_clk() [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 | 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); 1249 * rt5659_headset_detect - Detect headset. [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); 803 * rt5668_sel_asrc_clk_src - select ASRC clock source for a set of filters 827 return -EINVAL; in rt5668_sel_asrc_clk_src() 887 * rt5668_headset_detect - Detect headset. 922 rt5668->jack_type = SND_JACK_HEADSET; in rt5668_headset_detect() [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 | wm8995.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * wm8995.c -- WM8995 ALSA SoC Audio driver 26 #include <sound/soc-dapm.h> 400 regcache_mark_dirty(wm8995->regmap); \ 414 static const DECLARE_TLV_DB_SCALE(digital_tlv, -7200, 75, 1); 415 static const DECLARE_TLV_DB_SCALE(in1lr_pga_tlv, -1650, 150, 0); 417 static const DECLARE_TLV_DB_SCALE(sidetone_tlv, -3600, 150, 0); 420 "Differential", "Single-ended IN1LN", "Single-ended IN1LP" 427 "Differential", "Single-ended IN1RN", "Single-ended IN1RP" 495 dev_dbg(component->dev, "Class W source AIF2DAC\n"); in wm8995_update_class_w() [all …]
|
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 …]
|