Home
last modified time | relevance | path

Searched +full:pdm +full:- +full:fmt (Results 1 – 25 of 38) sorted by relevance

12

/kernel/linux/linux-4.19/sound/soc/rockchip/
Drockchip_pdm.c2 * Rockchip PDM ALSA SoC Digital Audio Interface(DAI) driver
61 if ((div & (div - 1)) == 0) { in get_pdm_clk()
75 static void rockchip_pdm_rxctrl(struct rk_pdm_dev *pdm, int on) in rockchip_pdm_rxctrl() argument
78 regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, in rockchip_pdm_rxctrl()
80 regmap_update_bits(pdm->regmap, PDM_SYSCONFIG, in rockchip_pdm_rxctrl()
83 regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, in rockchip_pdm_rxctrl()
85 regmap_update_bits(pdm->regmap, PDM_SYSCONFIG, in rockchip_pdm_rxctrl()
95 struct rk_pdm_dev *pdm = to_info(dai); in rockchip_pdm_hw_params() local
103 return -EINVAL; in rockchip_pdm_hw_params()
105 ret = clk_set_rate(pdm->clk, clk_rate); in rockchip_pdm_hw_params()
[all …]
/kernel/linux/linux-5.10/sound/soc/codecs/
Dadau7118.c1 // 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 …]
Dmax98926.c1 // 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 …]
Dtlv320adcx140.c1 // 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 …]
Drt5651.c1 // 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 …]
Drt5659.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rt5659.c -- RT5659/RT5658 ALSA SoC audio codec driver
26 #include <sound/soc-dapm.h>
1137 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2325, 75, 0);
1138 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
1139 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
1140 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
1141 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
1143 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0);
1250 * rt5659_headset_detect - Detect headset.
[all …]
Drt5665.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rt5665.c -- RT5665/RT5658 ALSA SoC audio codec driver
27 #include <sound/soc-dapm.h>
888 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0);
889 static const DECLARE_TLV_DB_SCALE(mono_vol_tlv, -1400, 150, 0);
890 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
891 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
892 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
893 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
895 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0);
[all …]
Dcs35l35.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * cs35l35.c -- CS35L35 ALSA SoC audio driver
28 #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 …]
Dmax98927.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * max98927.c -- MAX98927 ALSA Soc Audio driver
5 * Copyright (C) 2016-2017 Maxim Integrated Products
139 static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) in max98927_dai_set_fmt() argument
141 struct snd_soc_component *component = codec_dai->component; in max98927_dai_set_fmt()
148 dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); in max98927_dai_set_fmt()
150 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { in max98927_dai_set_fmt()
155 max98927->master = true; in max98927_dai_set_fmt()
159 dev_err(component->dev, "DAI clock mode unsupported\n"); in max98927_dai_set_fmt()
160 return -EINVAL; in max98927_dai_set_fmt()
[all …]
Dmadera.c1 // 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 …]
Dcs35l36.c1 // SPDX-License-Identifier: GPL-2.0
3 // cs35l36.c -- CS35L36 ALSA SoC audio driver
27 #include <sound/soc-dapm.h>
447 static DECLARE_TLV_DB_SCALE(dig_vol_tlv, -10200, 25, 0);
464 ucontrol->value.integer.value[0] = cs35l36->ldm_mode_sel; in cs35l36_ldm_sel_get()
476 int val = (ucontrol->value.integer.value[0]) ? CS35L36_NG_AMP_EN_MASK : in cs35l36_ldm_sel_put()
479 cs35l36->ldm_mode_sel = val; in cs35l36_ldm_sel_put()
481 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_ldm_sel_put()
493 SOC_SINGLE("Amp Gain Zero-Cross Switch", CS35L36_AMP_GAIN_CTRL,
495 SOC_SINGLE("PDM LDM Enter Ramp Switch", CS35L36_DAC_MSM_CFG,
[all …]
/kernel/linux/linux-5.10/sound/soc/rockchip/
Drockchip_pdm.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * Rockchip PDM ALSA SoC Digital Audio Interface(DAI) driver
76 static unsigned int get_pdm_clk(struct rk_pdm_dev *pdm, unsigned int sr, in get_pdm_clk() argument
90 if ((div & (div - 1)) == 0) { in get_pdm_clk()
92 rate = clk_round_rate(pdm->clk, clkref[i].clk); in get_pdm_clk()
102 clk = clk_round_rate(pdm->clk, PDM_SIGNOFF_CLK_RATE); in get_pdm_clk()
129 static void rockchip_pdm_rxctrl(struct rk_pdm_dev *pdm, int on) in rockchip_pdm_rxctrl() argument
132 regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, in rockchip_pdm_rxctrl()
134 regmap_update_bits(pdm->regmap, PDM_SYSCONFIG, in rockchip_pdm_rxctrl()
137 regmap_update_bits(pdm->regmap, PDM_DMA_CTRL, in rockchip_pdm_rxctrl()
[all …]
/kernel/linux/linux-4.19/sound/soc/codecs/
Dmax98926.c2 * max98926.c -- ALSA SoC MAX98926 driver
3 * Copyright 2013-15 Maxim Integrated Products
115 SOC_DAPM_SINGLE("PDM Single Switch", MAX98926_SPK_AMP,
152 SND_SOC_DAPM_MUX("PDM CH1 Source",
156 SND_SOC_DAPM_MUX("PDM CH0 Source",
170 {"PDM CH1 Source", "Current", "DAI_OUT"},
171 {"PDM CH1 Source", "Voltage", "DAI_OUT"},
172 {"PDM CH0 Source", "Current", "DAI_OUT"},
173 {"PDM CH0 Source", "Voltage", "DAI_OUT"},
174 {"PCM Sel", "Analog", "PDM CH1 Source"},
[all …]
Drt5651.c2 * rt5651.c -- RT5651 ALSA SoC audio codec driver
26 #include <sound/soc-dapm.h>
290 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
291 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
292 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
293 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
372 * set_dmic_clk - Set parameter of dmic.
382 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in set_dmic_clk()
386 rate = rt5651->sysclk / rl6231_get_pre_div(rt5651->regmap, in set_dmic_clk()
390 dev_err(component->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
[all …]
Drt5659.c2 * rt5659.c -- RT5659/RT5658 ALSA SoC audio codec driver
29 #include <sound/soc-dapm.h>
1140 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2325, 75, 0);
1141 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
1142 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
1143 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
1144 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
1146 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0);
1290 * rt5659_headset_detect - Detect headset.
1337 rt5659->jack_type = SND_JACK_HEADSET; in rt5659_headset_detect()
[all …]
Drt5665.c2 * rt5665.c -- RT5665/RT5658 ALSA SoC audio codec driver
30 #include <sound/soc-dapm.h>
891 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0);
892 static const DECLARE_TLV_DB_SCALE(mono_vol_tlv, -1400, 150, 0);
893 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
894 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
895 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
896 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
898 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0);
1033 * rt5665_sel_asrc_clk_src - select ASRC clock source for a set of filters
[all …]
Dcs35l35.c2 * cs35l35.c -- CS35L35 ALSA SoC audio driver
32 #include <sound/soc-dapm.h>
167 gpiod_set_value_cansleep(cs35l35->reset_gpio, 0); in cs35l35_reset()
169 gpiod_set_value_cansleep(cs35l35->reset_gpio, 1); in cs35l35_reset()
177 if (cs35l35->pdata.ext_bst) { in cs35l35_wait_for_pdn()
182 reinit_completion(&cs35l35->pdn_done); in cs35l35_wait_for_pdn()
184 ret = wait_for_completion_timeout(&cs35l35->pdn_done, in cs35l35_wait_for_pdn()
187 dev_err(cs35l35->dev, "PDN_DONE did not complete\n"); in cs35l35_wait_for_pdn()
188 return -ETIMEDOUT; in cs35l35_wait_for_pdn()
197 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in cs35l35_sdin_event()
[all …]
Dmax98927.c2 * max98927.c -- MAX98927 ALSA Soc Audio driver
4 * Copyright (C) 2016-2017 Maxim Integrated Products
143 static int max98927_dai_set_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) in max98927_dai_set_fmt() argument
145 struct snd_soc_component *component = codec_dai->component; in max98927_dai_set_fmt()
152 dev_dbg(component->dev, "%s: fmt 0x%08X\n", __func__, fmt); in max98927_dai_set_fmt()
154 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { in max98927_dai_set_fmt()
159 max98927->master = true; in max98927_dai_set_fmt()
163 dev_err(component->dev, "DAI clock mode unsupported\n"); in max98927_dai_set_fmt()
164 return -EINVAL; in max98927_dai_set_fmt()
167 regmap_update_bits(max98927->regmap, in max98927_dai_set_fmt()
[all …]
/kernel/linux/linux-5.10/Documentation/devicetree/bindings/sound/
Dcirrus,madera.yaml1 # 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 '#sound-dai-cells':
35 INnAR INnBL INnBR. For non-muxed inputs the first two cells
43 $ref: /schemas/types.yaml#/definitions/uint32-array
51 cirrus,out-mono:
55 $ref: /schemas/types.yaml#/definitions/uint32-array
[all …]
Dwlf,arizona.yaml1 # 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 '#sound-dai-cells':
28 signals. Valid values are 0 (Differential), 1 (Single-ended) and
35 $ref: /schemas/types.yaml#/definitions/uint32-array
43 wlf,out-mono:
47 (eg. First entry in the list corresponds to output 1). A non-zero
51 $ref: /schemas/types.yaml#/definitions/uint32-array
[all …]
/kernel/linux/linux-4.19/Documentation/devicetree/bindings/sound/
Dwlf,arizona.txt12 - wlf,inmode : A list of INn_MODE register values, where n is the number
13 of input signals. Valid values are 0 (Differential), 1 (Single-ended) and
20 - wlf,out-mono : A list of boolean values indicating whether each output is
22 (eg. First entry in the list corresponds to output 1). A non-zero value
27 - wlf,dmic-ref : DMIC reference voltage source for each input, can be
29 (ARIZONA_DMIC_xxxx) are provided in <dt-bindings/mfd/arizona.txt>. If
33 - wlf,max-channels-clocked : The maximum number of channels to be clocked on
41 - wlf,spk-fmt : PDM speaker data format, must contain 2 cells (OUT5 and OUT6).
46 - wlf,spk-mute : PDM speaker mute setting, must contain 2 cells (OUT5 and OUT6).
51 - wlf,out-volume-limit : The volume limit value that should be applied to each
/kernel/linux/linux-5.10/sound/soc/sof/
Dtopology.c1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
19 #include "sof-priv.h"
20 #include "sof-audio.h"
26 * from dB gain 20th root of 10 in Q1.16 fixed-point notation
29 /* 40th root of 10 in Q1.16 fixed-point notation*/
61 struct snd_soc_component *scomp = swidget->scomp; in ipc_pcm_params()
71 spcm = snd_sof_find_spcm_name(scomp, swidget->widget->sname); in ipc_pcm_params()
73 dev_err(scomp->dev, "error: cannot find PCM for %s\n", in ipc_pcm_params()
74 swidget->widget->name); in ipc_pcm_params()
75 return -EINVAL; in ipc_pcm_params()
[all …]
/kernel/linux/linux-4.19/sound/soc/intel/skylake/
Dskl-messages.c2 * skl-message.c - HDA DSP interface for FW registration, Pipe and Module
24 #include <uapi/sound/skl-tplg-interface.h>
25 #include "skl-sst-dsp.h"
26 #include "cnl-sst-dsp.h"
27 #include "skl-sst-ipc.h"
29 #include "../common/sst-dsp.h"
30 #include "../common/sst-dsp-priv.h"
31 #include "skl-topology.h"
39 return -ENODEV; in skl_alloc_dma_buf()
41 return bus->io_ops->dma_alloc_pages(bus, SNDRV_DMA_TYPE_DEV, size, dmab); in skl_alloc_dma_buf()
[all …]
/kernel/linux/linux-5.10/sound/soc/intel/skylake/
Dskl-messages.c1 // 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 …]
/kernel/linux/linux-4.19/sound/soc/stm/
Dstm32_sai_sub.c4 * Copyright (C) 2016, STMicroelectronics - All Rights Reserved
50 #define STM_SAI_IS_PLAYBACK(ip) ((ip)->dir == SNDRV_PCM_STREAM_PLAYBACK)
51 #define STM_SAI_IS_CAPTURE(ip) ((ip)->dir == SNDRV_PCM_STREAM_CAPTURE)
56 #define STM_SAI_IS_SUB_A(x) ((x)->id == STM_SAI_A_ID)
57 #define STM_SAI_IS_SUB_B(x) ((x)->id == STM_SAI_B_ID)
58 #define STM_SAI_BLOCK_NAME(x) (((x)->id == STM_SAI_A_ID) ? "A" : "B")
64 #define STM_SAI_PROTOCOL_IS_SPDIF(ip) ((ip)->spdif)
65 #define STM_SAI_HAS_SPDIF(x) ((x)->pdata->conf->has_spdif)
66 #define STM_SAI_HAS_EXT_SYNC(x) (!STM_SAI_IS_F4(sai->pdata))
72 * struct stm32_sai_sub_data - private data of SAI sub block (block A or B)
[all …]

12