/linux/sound/soc/tegra/ |
H A D | tegra_audio_graph_card.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // tegra_audio_graph_card.c - Audio Graph based Tegra Machine Driver 5 // Copyright (c) 2020-2021 NVIDIA CORPORATION. All rights reserved. 13 #include <sound/soc-dai.h> 22 * Sample rates multiple of 8000 Hz and below are supported: 28 * Sample rates multiple of 11025 Hz and below are supported: 51 !dai->driver->ops || in need_clk_update() 52 !dai->driver->name) in need_clk_update() 55 if (strstr(dai->driver->name, "I2S") || in need_clk_update() 56 strstr(dai->driver->name, "DMIC") || in need_clk_update() [all …]
|
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 tristate "SoC Audio for the Tegra System-on-Chip" 70 tristate "Tegra210 DMIC module" 72 Config to enable the Digital MIC (DMIC) controller which is used 74 The DMIC controller implements a converter to convert PDM signals 77 Say Y or M if you want to add support for Tegra210 DMIC module. 83 Config to enable the Inter-IC Sound (I2S) Controller which 84 implements full-duplex and bidirectional and single direction 85 point-to-point serial interfaces. It can interface with I2S 101 Config to enable the Asynchronous Sample Rate Converter (ASRC), [all …]
|
H A D | tegra210_dmic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // SPDX-FileCopyrightText: Copyright (c) 2020-2024 NVIDIA CORPORATION & AFFILIATES. 5 // tegra210_dmic.c - Tegra210 DMIC driver 26 /* Below enables all filters - DCR, LP and SC */ 45 struct tegra210_dmic *dmic = dev_get_drvdata(dev); in tegra210_dmic_runtime_suspend() local 47 regcache_cache_only(dmic->regmap, true); in tegra210_dmic_runtime_suspend() 48 regcache_mark_dirty(dmic->regmap); in tegra210_dmic_runtime_suspend() 50 clk_disable_unprepare(dmic->clk_dmic); in tegra210_dmic_runtime_suspend() 57 struct tegra210_dmic *dmic = dev_get_drvdata(dev); in tegra210_dmic_runtime_resume() local 60 err = clk_prepare_enable(dmic->clk_dmic); in tegra210_dmic_runtime_resume() [all …]
|
/linux/include/sound/sof/ |
H A D | dai-intel.h | 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 58 /* DMIC max. four controllers for eight microphone channels */ 61 /* SSP Configuration Request - SOF_IPC_DAI_SSP_CONFIG */ 93 /* HDA Configuration Request - SOF_IPC_DAI_HDA_CONFIG */ 97 uint32_t rate; member 101 /* ALH Configuration Request - SOF_IPC_DAI_ALH_CONFIG */ 105 uint32_t rate; member 112 /* DMIC Configuration Request - SOF_IPC_DAI_DMIC_CONFIG */ 127 * that delays the sampling time of data by half cycles of DMIC source clock 149 * device driver src/drivers/dmic.c need to match. It is incremented from [all …]
|
/linux/sound/hda/ |
H A D | intel-nhlt.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright (c) 2015-2019 Intel Corporation 5 #include <sound/intel-nhlt.h> 42 if (nhlt->header.length <= sizeof(struct acpi_table_header)) { in intel_nhlt_get_dmic_geo() 43 dev_warn(dev, "Invalid DMIC description table\n"); in intel_nhlt_get_dmic_geo() 47 for (j = 0, epnt = nhlt->desc; j < nhlt->endpoint_count; j++, in intel_nhlt_get_dmic_geo() 48 epnt = (struct nhlt_endpoint *)((u8 *)epnt + epnt->length)) { in intel_nhlt_get_dmic_geo() 50 if (epnt->linktype != NHLT_LINK_DMIC) in intel_nhlt_get_dmic_geo() 53 cfg = (struct nhlt_dmic_array_config *)(epnt->config.caps); in intel_nhlt_get_dmic_geo() 54 fmt_configs = (struct nhlt_fmt *)(epnt->config.caps + epnt->config.size); in intel_nhlt_get_dmic_geo() [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | qcom,lpass-wsa-macro.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/qcom,lpass-wsa-macro.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Srinivas Kandagatla <srinivas.kandagatla@linaro.org> 15 - enum: 16 - qcom,sc7280-lpass-wsa-macro 17 - qcom,sm8250-lpass-wsa-macro 18 - qcom,sm8450-lpass-wsa-macro 19 - qcom,sm8550-lpass-wsa-macro [all …]
|
/linux/sound/soc/sunxi/ |
H A D | sun50i-dmic.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 // This driver supports the DMIC in Allwinner's H6 SoCs. 93 if (substream->stream != SNDRV_PCM_STREAM_CAPTURE) in sun50i_dmic_startup() 94 return -EINVAL; in sun50i_dmic_startup() 96 regmap_update_bits(host->regmap, SUN50I_DMIC_RXFIFO_CTL, in sun50i_dmic_startup() 99 regmap_write(host->regmap, SUN50I_DMIC_CNT, SUN50I_DMIC_CNT_N); in sun50i_dmic_startup() 109 unsigned long rate = params_rate(params); in sun50i_dmic_hw_params() local 112 unsigned int chan_en = (1 << channels) - 1; in sun50i_dmic_hw_params() 115 /* DMIC num is N+1 */ in sun50i_dmic_hw_params() 116 regmap_update_bits(host->regmap, SUN50I_DMIC_CH_NUM, in sun50i_dmic_hw_params() [all …]
|
/linux/sound/soc/mediatek/mt8183/ |
H A D | mt8183-dai-adda.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "mt8183-afe-common.h" 11 #include "mt8183-interconnection.h" 12 #include "mt8183-reg.h" 13 #include "../common/mtk-dai-adda-common.h" 62 struct snd_soc_component *cmpnt = snd_soc_dapm_to_component(w->dapm); in mtk_adda_ul_event() 64 struct mt8183_afe_private *afe_priv = afe->platform_priv; in mtk_adda_ul_event() 66 dev_dbg(afe->dev, "%s(), name %s, event 0x%x\n", in mtk_adda_ul_event() 67 __func__, w->name, event); in mtk_adda_ul_event() 71 /* update setting to dmic */ in mtk_adda_ul_event() [all …]
|
/linux/sound/soc/mediatek/mt8186/ |
H A D | mt8186-dai-adda.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include "mt8186-afe-clk.h" 11 #include "mt8186-afe-common.h" 12 #include "mt8186-afe-gpio.h" 13 #include "mt8186-interconnection.h" 14 #include "../common/mtk-dai-adda-common.h" 47 struct mt8186_afe_private *afe_priv = afe->platform_priv; in get_adda_priv_by_name() 55 return afe_priv->dai_priv[dai_id]; in get_adda_priv_by_name() 132 return -EINVAL; in mtk_adda_ul_src_dmic() 135 /* dmic mode, 3.25M*/ in mtk_adda_ul_src_dmic() [all …]
|
/linux/sound/soc/codecs/ |
H A D | lpass-va-macro.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. 5 #include <linux/clk-provider.h> 16 #include <sound/soc-dapm.h> 19 #include "lpass-macro-common.h" 165 static const DECLARE_TLV_DB_SCALE(digital_gain, -8400, 100, -8400); 455 struct regmap *regmap = va->regmap; in va_clk_rsc_fs_gen_request() 488 struct regmap *regmap = va->regmap; in va_macro_mclk_enable() 504 struct snd_soc_component *comp = snd_soc_dapm_to_component(w->dapm); in va_macro_mclk_event() 509 return clk_prepare_enable(va->fsgen); in va_macro_mclk_event() [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 | 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 | 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 | wcd934x.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <linux/clk-provider.h> 21 #include <sound/soc-dapm.h> 23 #include "wcd-clsh-v2.h" 24 #include "wcd-mbhc-v2.h" 216 {"ADC MUX" #id, "DMIC", "DMIC MUX" #id }, \ 218 {"DMIC MUX" #id, "DMIC0", "DMIC0"}, \ 219 {"DMIC MUX" #id, "DMIC1", "DMIC1"}, \ 220 {"DMIC MUX" #id, "DMIC2", "DMIC2"}, \ 221 {"DMIC MUX" #id, "DMIC3", "DMIC3"}, \ [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); 817 regmap_write(rt5682->regmap, RT5682_RESET, 0); in rt5682_reset() 818 if (!rt5682->is_sdw) in rt5682_reset() 819 regmap_write(rt5682->regmap, RT5682_I2C_MODE, 1); in rt5682_reset() [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 | 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 | 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 30 { 0x05, 0x00 }, /* 05 Sample Rate Quick */ 231 { 0xC2, 0x00 }, /* C2 Sample Rate */ 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), [all …]
|
H A D | wm8994.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * wm8994.c -- WM8994 ALSA SoC Audio driver 5 * Copyright 2009-12 Wolfson Microelectronics plc 114 struct wm8994 *control = wm8994->wm8994; in wm8958_micd_set_rate() 120 idle = !wm8994->jack_mic; in wm8958_micd_set_rate() 124 sysclk = wm8994->aifclk[1]; in wm8958_micd_set_rate() 126 sysclk = wm8994->aifclk[0]; in wm8958_micd_set_rate() 128 if (control->pdata.micd_rates) { in wm8958_micd_set_rate() 129 rates = control->pdata.micd_rates; in wm8958_micd_set_rate() 130 num_rates = control->pdata.num_micd_rates; in wm8958_micd_set_rate() [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 …]
|
/linux/sound/soc/mediatek/mt8192/ |
H A D | mt8192-dai-adda.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include "mt8192-afe-clk.h" 13 #include "mt8192-afe-common.h" 14 #include "mt8192-afe-gpio.h" 15 #include "mt8192-interconnection.h" 16 #include "../common/mtk-dai-adda-common.h" 189 return -EINVAL; in mtk_adda_ul_src_dmic() 192 /* dmic mode, 3.25M*/ in mtk_adda_ul_src_dmic() 193 regmap_update_bits(afe->regmap, reg, in mtk_adda_ul_src_dmic() 196 regmap_update_bits(afe->regmap, reg, in mtk_adda_ul_src_dmic() [all …]
|
/linux/include/linux/mfd/arizona/ |
H A D | pdata.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 11 #include <dt-bindings/mfd/arizona.h> 12 #include <linux/regulator/arizona-ldo1.h> 13 #include <linux/regulator/arizona-micsupp.h> 36 #define ARIZONA_GPN_FN_MASK 0x007F /* GPN_FN - [6:0] */ 37 #define ARIZONA_GPN_FN_SHIFT 0 /* GPN_FN - [6:0] */ 38 #define ARIZONA_GPN_FN_WIDTH 7 /* GPN_FN - [6:0] */ 62 unsigned int soft_start:1; /** Disable aggressive startup ramp rate */ 135 /** Mic detect ramp rate */ 138 /** Mic detect sample rate */ [all …]
|
/linux/sound/soc/mediatek/mt8195/ |
H A D | mt8195-dai-adda.c | 1 // SPDX-License-Identifier: GPL-2.0 12 #include "mt8195-afe-clk.h" 13 #include "mt8195-afe-common.h" 14 #include "mt8195-reg.h" 15 #include "../common/mtk-dai-adda-common.h" 40 struct mt8195_afe_private *afe_priv = afe->platform_priv; in mt8195_adda_mtkaif_init() 41 struct mtkaif_param *param = &afe_priv->mtkaif_params; in mt8195_adda_mtkaif_init() 51 regmap_update_bits(afe->regmap, AFE_ADDA_MTKAIF_CFG0, mask, val); in mt8195_adda_mtkaif_init() 52 regmap_update_bits(afe->regmap, AFE_ADDA6_MTKAIF_CFG0, mask, val); in mt8195_adda_mtkaif_init() 56 regmap_update_bits(afe->regmap, AFE_AUD_PAD_TOP, mask, val); in mt8195_adda_mtkaif_init() [all …]
|
/linux/sound/soc/meson/ |
H A D | axg-pdm.c | 1 // SPDX-License-Identifier: (GPL-2.0 OR MIT) 12 #include <sound/soc-dai.h> 53 #define PDM_CHAN_CTRL_POINTER_MAX ((1 << PDM_CHAN_CTRL_POINTER_WIDTH) - 1) 134 axg_pdm_enable(priv->map); in axg_pdm_trigger() 140 axg_pdm_disable(priv->map); in axg_pdm_trigger() 144 return -EINVAL; in axg_pdm_trigger() 150 const struct axg_pdm_filters *filters = priv->cfg->filters; in axg_pdm_get_os() 151 unsigned int os = filters->hcic.ds; in axg_pdm_get_os() 160 os *= filters->lpf[i].ds; in axg_pdm_get_os() 166 unsigned int rate) in axg_pdm_set_sysclk() argument [all …]
|