| /linux/sound/soc/fsl/ | 
| H A D | fsl_asrc.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Freescale ASRC ALSA SoC Digital Audio Interface (DAI) driver 11 #include <linux/dma-mapping.h> 14 #include <linux/dma/imx-dma.h> 26 	dev_err(&asrc->pdev->dev, "Pair %c: " fmt, 'A' + index, ##__VA_ARGS__) 29 	dev_dbg(&asrc->pdev->dev, "Pair %c: " fmt, 'A' + index, ##__VA_ARGS__) 32 	dev_warn(&asrc->pdev->dev, "Pair %c: " fmt, 'A' + index, ##__VA_ARGS__) 127 static bool fsl_asrc_divider_avail(int clk_rate, int rate, int *div)  in fsl_asrc_divider_avail()  argument 135 	if (clk_rate == 0 || rate == 0)  in fsl_asrc_divider_avail() 139 	rem = do_div(n, rate);  in fsl_asrc_divider_avail() [all …] 
 | 
| H A D | fsl_asrc_m2m.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Copyright (C) 2014-2016 Freescale Semiconductor, Inc. 4 // Copyright (C) 2019-2024 NXP 6 // Freescale ASRC Memory to Memory (M2M) driver 8 #include <linux/dma/imx-dma.h> 9 #include <linux/dma-buf.h> 10 #include <linux/dma-mapping.h> 35 	complete(&pair->complete[IN]);  in asrc_input_dma_callback() 43 	complete(&pair->complete[OUT]);  in asrc_output_dma_callback() 54 	struct fsl_asrc *asrc = pair->asrc;  in asrc_read_last_fifo()  local [all …] 
 | 
| H A D | fsl-asoc-card.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // Freescale Generic ASoC Sound Card driver with ASRC 23 #include "imx-audmux.h" 33 #define DRIVER_NAME "fsl-asoc-card" 44  * struct codec_priv - CODEC private data 46  * @mclk_freq: Clock rate of MCLK 47  * @free_freq: Clock rate of MCLK for hw_free() 62  * struct cpu_priv - CPU private data 66  * @sysclk_ratio: SYSCLK ratio on sample rate 82  * struct fsl_asoc_card_priv - Freescale Generic ASOC card private data [all …] 
 | 
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 7 	tristate "Asynchronous Sample Rate Converter (ASRC) module support" 15 	  Say Y if you want to add Asynchronous Sample Rate Converter (ASRC) 17 	  This option is only useful for out-of-tree drivers since 18 	  in-tree drivers select it automatically. 29 	  This option is only useful for out-of-tree drivers since 30 	  in-tree drivers select it automatically. 40 	  This option is only useful for out-of-tree drivers since 41 	  in-tree drivers select it automatically. 58 	  This option is only useful for out-of-tree drivers since [all …] 
 | 
| H A D | imx-card.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 // Copyright 2017-2021 NXP 14 #include <sound/soc-dapm.h> 34  * @rmin: min rate 35  * @rmax: max rate 56  * struct imx_card_plat_data - specific info for codecs 60  * @support_rates: supported sample rate 61  * @support_tdm_rates: supported sample rate for tdm mode 90  * struct dai_link_data - specific info for dai link 105  * struct imx_card_data - platform device data [all …] 
 | 
| /linux/Documentation/devicetree/bindings/sound/ | 
| H A D | nvidia,tegra186-asrc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/nvidia,tegra186-asrc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Tegra186 ASRC 10   Asynchronous Sample Rate Converter (ASRC) converts the sampling frequency 12   wide range of sample rate ratios (freq_in/freq_out) from 1:24 to 24:1. 13   ASRC has two modes of operation. One where ratio can be programmed in SW 16   It supports  sample rate conversions in the range of 8 to 192 kHz and 21   - Jon Hunter <jonathanh@nvidia.com> [all …] 
 | 
| /linux/include/sound/sof/ | 
| H A D | topology.h | 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 39 	SOF_COMP_ASRC,		/**< Asynchronous sample rate converter */ 53 /* create new generic component - SOF_IPC_TPLG_COMP_NEW */ 95 /* create new component buffer - SOF_IPC_TPLG_BUFFER_NEW */ 104 /* generic component config data - must always be after struct sof_ipc_comp */ 132 	uint32_t type;		/**< DAI type - SOF_DAI_ */ 167 	/* either source or sink rate must be non zero */ 168 	uint32_t source_rate;	/**< source rate or 0 for variable */ 169 	uint32_t sink_rate;	/**< sink rate or 0 for variable */ 173 /* generic ASRC component */ [all …] 
 | 
| /linux/sound/soc/codecs/ | 
| 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() 751 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6525, 75, 0); 752 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0); 819 	regmap_write(rt5682->regmap, RT5682_RESET, 0);  in rt5682_reset() 820 	if (!rt5682->is_sdw)  in rt5682_reset() 821 		regmap_write(rt5682->regmap, RT5682_I2C_MODE, 1);  in rt5682_reset() [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 | cs42l43.c | 1 // SPDX-License-Identifier: GPL-2.0 5 // Copyright (C) 2022-2023 Cirrus Logic, Inc. and 21 #include <linux/mfd/cs42l43-regs.h> 33 #include <sound/soc-component.h> 34 #include <sound/soc-dapm.h> 35 #include <sound/soc-dai.h> 83 	{ name_str,		"ASRC INT1",		"ASRC_INT1" }, \ 84 	{ name_str,		"ASRC INT 317 cs42l43_convert_sample_rate(unsigned int rate) cs42l43_convert_sample_rate()  argument  [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 | 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 | 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; 439 	/* Some (package) variants have the headset-mic pin not-connected */ 671 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 672 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -6525, 75, 0); 673 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 674 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -1725, 75, 0); 688 /* {-6, -4.5, -3, -1.5, 0, 0.82, 1.58, 2.28} dB */ [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); 844  * rt5668_headset_detect - Detect headset. 879 			rt5668->jack_type = SND_JACK_HEADSET;  in rt5668_headset_detect() 883 			rt5668->jack_type = SND_JACK_HEADPHONE;  in rt5668_headset_detect() 893 		rt5668->jack_type = 0;  in rt5668_headset_detect() [all …] 
 | 
| /linux/sound/soc/tegra/ | 
| H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 5 	tristate "SoC Audio for the Tegra System-on-Chip" 85 	  Config to enable the Inter-IC Sound (I2S) Controller which 86 	  implements full-duplex and bidirectional and single direction 87 	  point-to-point serial interfaces. It can interface with I2S 101 	tristate "Tegra186 ASRC module" 103 	  Config to enable the Asynchronous Sample Rate Converter (ASRC), 106 	  sample rate ratios (freq_in/freq_out) from 1:24 to 24:1. 107 	  ASRC has two modes of operation. One where ratio can be programmed 110 	  Say Y or M if you want to add support for Tegra186 ASRC module. [all …] 
 | 
| /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" 138 /* ASRC */ 194 		offsetof(struct sof_ipc_dai_alh_params, rate)}, 259 		offsetof(struct sof_ipc_dai_hda_params, rate)}, 267 		offsetof(struct sof_ipc_dai_mtk_afe_params, rate)}, 307 		offsetof(struct sof_ipc_dai_acp_sdw_params, rate)}, 334 	[SOF_ASRC_TOKENS] = {"ASRC tokens", asrc_tokens, ARRAY_SIZE(asrc_tokens)}, [all …] 
 | 
| H A D | ipc4-topology.c | 1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 14 #include <sound/intel-nhlt.h> 15 #include "sof-priv.h" 16 #include "sof-audio.h" 17 #include "ipc4-priv.h" 18 #include "ipc4-topology.h" 179 /* ASRC */ 208 	[SOF_ASRC_TOKENS] = {"ASRC tokens", asrc_tokens, ARRAY_SIZE(asrc_tokens)}, 216 	list_for_each_entry(swidget, &sdev->widget_list, list) {  in sof_ipc4_find_swidget_by_ids() 217 		struct sof_ipc4_fw_module *fw_module = swidget->module_info;  in sof_ipc4_find_swidget_by_ids() [all …] 
 | 
| H A D | ipc4-topology.h | 1 /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 15 #define SOF_IPC4_FW_PAGE(x) ((((x) + BIT(12) - 1) & ~(BIT(12) - 1)) >> 12) 16 #define SOF_IPC4_FW_ROUNDUP(x) (((x) + BIT(6) - 1) & (~(BIT(6) - 1))) 22  * LL domain - Low latency domain 23  * DP domain - Data processing domain 80  * The base of multi-gateways. Multi-gateways addressing starts from 81  * ALH_MULTI_GTW_BASE and there are ALH_MULTI_GTW_COUNT multi-sources 82  * and ALH_MULTI_GTW_COUNT multi-sinks available. 84  * ALH_MULTI_GTW_BASE + ALH_MULTI_GTW_COUNT - 1. 108  * HD-A gateways. [all …] 
 | 
| /linux/arch/arm64/boot/dts/freescale/ | 
| H A D | imx8mn-bsh-smm-s2pro.dts | 1 // SPDX-License-Identifier: GPL-2.0+ 7 /dts-v1/; 9 #include "imx8mn-bsh-smm-s2-common.dtsi" 10 #include <dt-bindings/sound/tlv320aic31xx.h> 14 	compatible = "bsh,imx8mn-bsh-smm-s2pro", "fsl,imx8mn"; 21 	sound-tlv320aic31xx { 22 		compatible = "fsl,imx-audio-tlv320aic31xx"; 23 		model = "tlv320aic31xx-hifi"; 24 		audio-cpu = <&sai3>; 25 		audio-codec = <&tlv320dac3101>; [all …] 
 | 
| H A D | imx8-ss-audio.dtsi | 1 // SPDX-License-Identifier: GPL-2.0+ 3  * Copyright 2018-2019 NXP 7 #include <dt-bindings/clock/imx8-clock.h> 8 #include <dt-bindings/clock/imx8-lpcg.h> 9 #include <dt-bindings/dma/fsl-edma.h> 10 #include <dt-bindings/firmware/imx/rsrc.h> 12 audio_ipg_clk: clock-audio-ipg { 13 	compatible = "fixed-clock"; 14 	#clock-cells = <0>; 15 	clock-frequency = <120000000>; [all …] 
 | 
| /linux/sound/soc/mediatek/mt8186/ | 
| H A D | mt8186-dai-i2s.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include "mt8186-afe-clk.h" 12 #include "mt8186-afe-common.h" 13 #include "mt8186-afe-gpio.h" 14 #include "mt8186-interconnection.h" 43 	int rate; /* for determine which apll to use */  member 88 	return -EINVAL;  in get_i2s_id_by_name() 94 	struct mt8186_afe_private *afe_priv = afe->platform_priv;  in get_i2s_priv_by_name() 100 	return afe_priv->dai_priv[dai_id];  in get_i2s_priv_by_name() 120 	i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name);  in mt8186_i2s_hd_get() [all …] 
 | 
| /linux/sound/soc/intel/boards/ | 
| H A D | cht_bsw_rt5672.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  *  cht_bsw_rt5672.c - ASoc Machine driver for Intel Cherryview-based platforms 22 #include <sound/soc-acpi.h> 24 #include "../atom/sst-atom-controls.h" 25 #include "../common/soc-intel-quirks.h" 30 #define CHT_CODEC_DAI	"rt5670-aif1" 54 	struct snd_soc_dapm_context *dapm = w->dapm;  in platform_clock_control() 55 	struct snd_soc_card *card = dapm->card;  in platform_clock_control() 62 		dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");  in platform_clock_control() 63 		return -EIO;  in platform_clock_control() [all …] 
 | 
| H A D | cht_bsw_rt5645.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3  *  cht-bsw-rt5645.c - ASoc Machine driver for Intel Cherryview-based platforms 25 #include <sound/soc-acpi.h> 27 #include "../atom/sst-atom-controls.h" 28 #include "../common/soc-intel-quirks.h" 31 #define CHT_CODEC_DAI1	"rt5645-aif1" 32 #define CHT_CODEC_DAI2	"rt5645-aif2" 69 	struct snd_soc_dapm_context *dapm = w->dapm;  in platform_clock_control() 70 	struct snd_soc_card *card = dapm->card;  in platform_clock_control() 80 		dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n");  in platform_clock_control() [all …] 
 | 
| /linux/sound/soc/intel/avs/boards/ | 
| H A D | rt5663.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // Copyright(c) 2022-2023 Intel Corporation 16 #include <sound/soc-acpi.h> 20 #define RT5663_CODEC_DAI	"rt5663-aif" 59 	struct snd_soc_card *card = runtime->card; in avs_rt5663_codec_init()  65 	jack = &priv->jack; in avs_rt5663_codec_init()  68 	pins = devm_kmemdup_array(card->de in avs_rt5663_codec_init()  97 struct snd_interval *rate, *channels; avs_rt5663_be_fixup()  local  [all...] | 
| H A D | rt5682.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // Copyright(c) 2021-2022 Intel Corporation 21 #include <sound/soc-acpi.h> 22 #include "../../common/soc-intel-quirks.h" 30 #define AVS_RT5682_CODEC_DAI_NAME	"rt5682-aif1" 37 	avs_rt5682_quirk = (unsigned long)id->driver_dat in avs_rt5682_quirk_cb()  189 struct snd_interval *rate, *channels; avs_rt5682_be_fixup()  local  [all...] |