/openbmc/linux/sound/soc/codecs/ |
H A D | adau7118.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Analog Devices ADAU7118 8 channel PDM-to-I2S/TDM Converter driver 65 /* PDM Clocks */ 128 snd_soc_component_get_drvdata(dai->component); in adau7118_set_channel_map() 131 dev_dbg(st->dev, "Set channel map, %d", tx_num); in adau7118_set_channel_map() 134 ret = snd_soc_component_update_bits(dai->component, in adau7118_set_channel_map() 145 static int adau7118_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) in adau7118_set_fmt() argument 148 snd_soc_component_get_drvdata(dai->component); in adau7118_set_fmt() 152 dev_dbg(st->dev, "Set format, fmt:%d\n", fmt); in adau7118_set_fmt() 154 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { in adau7118_set_fmt() [all …]
|
H A D | max98926.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max98926.c -- ALSA SoC MAX98926 driver 4 * Copyright 2013-15 Maxim Integrated Products 104 SOC_DAPM_SINGLE("PDM Single Switch", MAX98926_SPK_AMP, 141 SND_SOC_DAPM_MUX("PDM CH1 Source", 145 SND_SOC_DAPM_MUX("PDM CH0 Source", 159 {"PDM CH1 Source", "Current", "DAI_OUT"}, 160 {"PDM CH1 Source", "Voltage", "DAI_OUT"}, 161 {"PDM CH0 Source", "Current", "DAI_OUT"}, 162 {"PDM CH0 Source", "Voltage", "DAI_OUT"}, [all …]
|
H A D | tlv320adcx140.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Copyright (C) 2020 Texas Instruments Incorporated - https://www.ti.com/ 41 "ti,gpo-config-1", 42 "ti,gpo-config-2", 43 "ti,gpo-config-3", 44 "ti,gpo-config-4", 163 /* Digital Volume control. From -100 to 27 dB in 0.5 dB steps */ 164 static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10050, 50, 0); 169 /* DRE Level. From -12 dB to -66 dB in 1 dB steps */ 170 static DECLARE_TLV_DB_SCALE(dre_thresh_tlv, -6600, 100, 0); [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); 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() 383 rate = rt5651->sysclk / rl6231_get_pre_div(rt5651->regmap, in set_dmic_clk() [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 | 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 | cs35l35.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * cs35l35.c -- CS35L35 ALSA SoC audio driver 27 #include <sound/soc-dapm.h> 163 gpiod_set_value_cansleep(cs35l35->reset_gpio, 0); in cs35l35_reset() 165 gpiod_set_value_cansleep(cs35l35->reset_gpio, 1); in cs35l35_reset() 173 if (cs35l35->pdata.ext_bst) { in cs35l35_wait_for_pdn() 178 reinit_completion(&cs35l35->pdn_done); in cs35l35_wait_for_pdn() 180 ret = wait_for_completion_timeout(&cs35l35->pdn_done, in cs35l35_wait_for_pdn() 183 dev_err(cs35l35->dev, "PDN_DONE did not complete\n"); in cs35l35_wait_for_pdn() 184 return -ETIMEDOUT; in cs35l35_wait_for_pdn() [all …]
|
H A D | max98927.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * max98927.c -- MAX98927 ALSA Soc Audio driver 5 * Copyright (C) 2016-2017 Maxim Integrated Products 140 static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) in max98927_dai_set_fmt() argument 142 struct snd_soc_component *component = codec_dai->component; in max98927_dai_set_fmt() 149 dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); in max98927_dai_set_fmt() 151 switch (fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK) { in max98927_dai_set_fmt() 153 max98927->provider = false; in max98927_dai_set_fmt() 157 max98927->provider = true; in max98927_dai_set_fmt() 161 dev_err(component->dev, "DAI clock mode unsupported\n"); in max98927_dai_set_fmt() [all …]
|
H A D | cs42l43.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright (C) 2022-2023 Cirrus Logic, Inc. and 15 #include <linux/mfd/cs42l43-regs.h> 22 #include <sound/soc-component.h> 23 #include <sound/soc-dapm.h> 24 #include <sound/soc-dai.h> 126 dev_err(priv->dev, "Error " #name " IRQ\n"); \ 147 dev_dbg(priv->dev, #name " completed\n"); \ in CS42L43_IRQ_ERROR() 148 complete(&priv->name); \ in CS42L43_IRQ_ERROR() 173 dev_dbg(priv->dev, "Microphone shutter changed\n"); [all …]
|
H A D | madera.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 // Copyright (C) 2015-2019 Cirrus Logic, Inc. and 18 #include <linux/irqchip/irq-madera.h> 22 #include <sound/madera-pdata.h> 24 #include <dt-bindings/sound/madera.h> 142 #define madera_fll_err(_fll, fmt, ...) \ argument 143 dev_err(_fll->madera->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__) 144 #define madera_fll_warn(_fll, fmt, ...) \ argument 145 dev_warn(_fll->madera->dev, "FLL%d: " fmt, _fll->id, ##__VA_ARGS__) 146 #define madera_fll_dbg(_fll, fmt, ...) \ argument [all …]
|
H A D | cs35l36.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // cs35l36.c -- CS35L36 ALSA SoC audio driver 27 #include <sound/soc-dapm.h> 448 TLV_DB_MINMAX_ITEM(-10200, 1200)); 465 ucontrol->value.integer.value[0] = cs35l36->ldm_mode_sel; in cs35l36_ldm_sel_get() 477 int val = (ucontrol->value.integer.value[0]) ? CS35L36_NG_AMP_EN_MASK : in cs35l36_ldm_sel_put() 480 cs35l36->ldm_mode_sel = val; in cs35l36_ldm_sel_put() 482 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_ldm_sel_put() 494 SOC_SINGLE("Amp Gain Zero-Cross Switch", CS35L36_AMP_GAIN_CTRL, 496 SOC_SINGLE("PDM LDM Enter Ramp Switch", CS35L36_DAC_MSM_CFG, [all …]
|
H A D | wm2200.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * wm2200.c -- WM2200 ALSA SoC Audio driver 161 { 0x000B, 0x0000 }, /* R11 - Tone Generator 1 */ 162 { 0x0102, 0x0000 }, /* R258 - Clocking 3 */ 163 { 0x0103, 0x0011 }, /* R259 - Clocking 4 */ 164 { 0x0111, 0x0000 }, /* R273 - FLL Control 1 */ 165 { 0x0112, 0x0000 }, /* R274 - FLL Control 2 */ 166 { 0x0113, 0x0000 }, /* R275 - FLL Control 3 */ 167 { 0x0114, 0x0000 }, /* R276 - FLL Control 4 */ 168 { 0x0116, 0x0177 }, /* R278 - FLL Control 6 */ [all …]
|
/openbmc/linux/sound/soc/rockchip/ |
H A D | rockchip_pdm.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Rockchip PDM ALSA SoC Digital Audio Interface(DAI) driver 78 static unsigned int get_pdm_clk(struct rk_pdm_dev *pdm, unsigned int sr, in get_pdm_clk() argument 92 if ((div & (div - 1)) == 0) { in get_pdm_clk() 94 rate = clk_round_rate(pdm->clk, clkref[i].clk); in get_pdm_clk() 104 clk = clk_round_rate(pdm->clk, PDM_SIGNOFF_CLK_RATE); in get_pdm_clk() 180 static void rockchip_pdm_rxctrl(struct rk_pdm_dev *pdm, int on) in rockchip_pdm_rxctrl() argument 183 regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, in rockchip_pdm_rxctrl() 185 regmap_update_bits(pdm->regmap, PDM_SYSCONFIG, in rockchip_pdm_rxctrl() 188 regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, in rockchip_pdm_rxctrl() [all …]
|
/openbmc/linux/Documentation/devicetree/bindings/sound/ |
H A D | cirrus,madera.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - patches@opensource.cirrus.com 21 include/dt-bindings/sound/madera.h 26 - $ref: dai-common.yaml# 29 '#sound-dai-cells': 38 INnAR INnBL INnBR. For non-muxed inputs the first two cells 46 $ref: /schemas/types.yaml#/definitions/uint32-array 54 cirrus,out-mono: [all …]
|
H A D | wlf,arizona.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - patches@opensource.cirrus.com 20 - $ref: dai-common.yaml# 23 '#sound-dai-cells': 31 signals. Valid values are 0 (Differential), 1 (Single-ended) and 38 $ref: /schemas/types.yaml#/definitions/uint32-array 46 wlf,out-mono: 50 (eg. First entry in the list corresponds to output 1). A non-zero [all …]
|
/openbmc/linux/sound/soc/sof/ |
H A D | ipc3-topology.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 12 #include "sof-priv.h" 13 #include "sof-audio.h" 14 #include "ipc3-priv.h" 232 * DMIC PDM Tokens 234 * as it increments the index while parsing the array of pdm tokens 322 [SOF_DMIC_PDM_TOKENS] = {"DMIC PDM tokens", dmic_pdm_tokens, ARRAY_SIZE(dmic_pdm_tokens)}, 331 * sof_comp_alloc - allocate and initialize buffer for a new component 344 size_t ext_size = sizeof(swidget->uuid); in sof_comp_alloc() 346 /* only non-zero UUID is valid */ in sof_comp_alloc() [all …]
|
/openbmc/linux/sound/soc/fsl/ |
H A D | fsl_sai.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 // Copyright 2012-2015 Freescale Semiconductor, Inc. 23 #include <linux/mfd/syscon/imx6q-iomuxc-gpr.h> 27 #include "imx-pcm.h" 45 * fsl_sai_dir_is_synced - Check if stream is synced by the opposite stream 59 return !sai->synchronous[dir] && sai->synchronous[adir]; in fsl_sai_dir_is_synced() 66 if (sai->is_pdm_mode) { in fsl_sai_get_pins_state() 69 state = pinctrl_lookup_state(sai->pinctrl, "dsd512"); in fsl_sai_get_pins_state() 73 state = pinctrl_lookup_state(sai->pinctrl, "dsd"); in fsl_sai_get_pins_state() 77 state = pinctrl_lookup_state(sai->pinctrl, "pcm_b2m"); in fsl_sai_get_pins_state() [all …]
|
/openbmc/linux/sound/soc/generic/ |
H A D | test-component.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // test-component.c -- Test Audio Component driver 38 #define mile_stone(d) dev_info((d)->dev, "%s() : %s", __func__, (d)->driver->name) 64 static int test_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) in test_dai_set_fmt() argument 66 unsigned int format = fmt & SND_SOC_DAIFMT_FORMAT_MASK; in test_dai_set_fmt() 67 unsigned int clock = fmt & SND_SOC_DAIFMT_CLOCK_MASK; in test_dai_set_fmt() 68 unsigned int inv = fmt & SND_SOC_DAIFMT_INV_MASK; in test_dai_set_fmt() 69 unsigned int master = fmt & SND_SOC_DAIFMT_CLOCK_PROVIDER_MASK; in test_dai_set_fmt() 72 dev_info(dai->dev, "name : %s", dai->name); in test_dai_set_fmt() 95 str = "pdm"; in test_dai_set_fmt() [all …]
|
/openbmc/linux/sound/soc/atmel/ |
H A D | mchp-pdmc.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright (C) 2019-2022 Microchip Technology Inc. and its subsidiaries 9 #include <dt-bindings/sound/microchip,pdmc.h> 24 * ---- PDMC Register map ---- 37 * ---- Control Register (Write-only) ---- 42 * ---- Mode Register (Read/Write) ---- 66 * ---- Configuration Register (Read/Write) ---- 75 * ---- Interrupt Enable/Disable/Mask/Status Registers ---- 85 * ---- Version Register (Read-only) ---- 139 struct soc_enum *e = (struct soc_enum *)kcontrol->private_value; in mchp_pdmc_sinc_order_get() [all …]
|
/openbmc/linux/sound/soc/intel/skylake/ |
H A D | skl-messages.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * skl-message.c - HDA DSP interface for FW registration, Pipe and Module 16 #include <uapi/sound/skl-tplg-interface.h> 17 #include "skl-sst-dsp.h" 18 #include "cnl-sst-dsp.h" 19 #include "skl-sst-ipc.h" 21 #include "../common/sst-dsp.h" 22 #include "../common/sst-dsp-priv.h" 23 #include "skl-topology.h" 47 skl_ipc_set_large_config(&skl->ipc, &msg, data); in skl_dsp_set_astate_cfg() [all …]
|
H A D | skl-topology.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * skl-topology.c - Implements Platform component ALSA controls/widget 6 * Copyright (C) 2014-2015 Intel Corp 15 #include <sound/intel-nhlt.h> 17 #include <sound/soc-acpi.h> 18 #include <sound/soc-topology.h> 20 #include <uapi/sound/skl-tplg-interface.h> 21 #include "skl-sst-dsp.h" 22 #include "skl-sst-ipc.h" 23 #include "skl-topology.h" [all …]
|
/openbmc/linux/sound/soc/amd/acp/ |
H A D | acp-mach-common.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 19 #include <sound/soc-dapm.h> 29 #include "acp-mach.h" 35 #define NAU8821_CODEC_DAI "nau8821-hifi" 38 #define MAX98388_CODEC_DAI "max98388-aif1" 44 /* Google skyrim proto-0 */ 77 clk_set_rate(drvdata->wclk, srate); in acp_clk_enable() 78 clk_set_rate(drvdata->bclk, srate * bclk_ratio); in acp_clk_enable() 80 return clk_prepare_enable(drvdata->wclk); in acp_clk_enable() 85 DAILINK_COMP_ARRAY(COMP_CODEC("i2c-10EC5682:00", "rt5682-aif1"))); [all …]
|
/openbmc/linux/sound/soc/stm/ |
H A D | stm32_sai_sub.c | 1 // SPDX-License-Identifier: GPL-2.0-only 5 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved 10 #include <linux/clk-provider.h> 41 #define STM_SAI_IS_PLAYBACK(ip) ((ip)->dir == SNDRV_PCM_STREAM_PLAYBACK) 42 #define STM_SAI_IS_CAPTURE(ip) ((ip)->dir == SNDRV_PCM_STREAM_CAPTURE) 47 #define STM_SAI_IS_SUB_A(x) ((x)->id == STM_SAI_A_ID) 53 #define STM_SAI_PROTOCOL_IS_SPDIF(ip) ((ip)->spdif) 54 #define STM_SAI_HAS_SPDIF(x) ((x)->pdata->conf.has_spdif_pdm) 55 #define STM_SAI_HAS_PDM(x) ((x)->pdata->conf.has_spdif_pdm) 56 #define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4(sai->pdata)) [all …]
|
/openbmc/linux/sound/soc/ |
H A D | soc-core.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 // soc-core.c -- ALSA SoC Audio Layer 11 // with code, comments and ideas from :- 39 #include <sound/soc-dpcm.h> 40 #include <sound/soc-topology.h> 41 #include <sound/soc-link.h> 75 return sysfs_emit(buf, "%ld\n", rtd->pmdown_time); in pmdown_time_show() 85 ret = kstrtol(buf, 10, &rtd->pmdown_time); in pmdown_time_store() 109 return attr->mode; /* always visible */ in soc_dev_attr_is_visible() 110 return rtd->dai_link->num_codecs ? attr->mode : 0; /* enabled only with codec */ in soc_dev_attr_is_visible() [all …]
|
/openbmc/phosphor-dbus-monitor/src/ |
H A D | pdmgen.py | 6 1 - Import YAML files as native python type(s) instance(s). 7 2 - Create an instance of the Everything class from the 10 3 - The Everything class constructor orchestrates conversion of the 14 4 - Present the converted YAML to the command processing method 46 fmt = 'Duplicate {0}: "{1}"' 48 path, fmt.format(cls, " ".join(names)) 130 """Un-capitalize booleans.""" 155 """Non-array type arguments.""" 1293 "generate-cpp": "generate_cpp", 1298 "Phosphor DBus Monitor (PDM) YAML scanner and code generator." [all …]
|