/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 127 fsl_asrc_divider_avail(int clk_rate,int rate,int * div) fsl_asrc_divider_avail() argument 217 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_request_pair() local 260 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_release_pair() local 285 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_set_watermarks() local 326 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_set_ideal_ratio() local 381 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_config_pair() local 584 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_start_pair() local 618 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_stop_pair() local 634 struct fsl_asrc *asrc = pair->asrc; fsl_asrc_get_dma_channel() local 646 struct fsl_asrc *asrc = snd_soc_dai_get_drvdata(dai); fsl_asrc_dai_startup() local 667 int rate[2], select_clk[2]; /* Array size 2 means IN and OUT */ fsl_asrc_select_clk() local 701 struct fsl_asrc *asrc = snd_soc_dai_get_drvdata(dai); fsl_asrc_dai_hw_params() local 707 unsigned int rate = params_rate(params); fsl_asrc_dai_hw_params() local 785 struct fsl_asrc *asrc = snd_soc_dai_get_drvdata(dai); fsl_asrc_dai_probe() local 975 fsl_asrc_init(struct fsl_asrc * asrc) fsl_asrc_init() argument 1013 struct fsl_asrc *asrc = (struct fsl_asrc *)dev_id; fsl_asrc_isr() local 1073 struct fsl_asrc *asrc; fsl_asrc_probe() local 1264 struct fsl_asrc *asrc = dev_get_drvdata(dev); fsl_asrc_runtime_resume() local 1339 struct fsl_asrc *asrc = dev_get_drvdata(dev); fsl_asrc_runtime_suspend() local [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 | fsl_easrc.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 10 #include <linux/dma/imx-dma.h> 16 /* ASRC Input Write FIFO */ 18 /* ASRC Output Read FIFO */ 20 /* ASRC Context Control */ 22 /* ASRC Context Control Extended 1 */ 24 /* ASRC Context Control Extended 2 */ 26 /* ASRC Contro [all...] |
H A D | fsl_asrc_common.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 15 ASRC_INVALID_PAIR = -1, 25 * struct fsl_asrc_m2m_cap - capability data 30 * @rate_in: minimum rate 45 * fsl_asrc_pair: ASRC Pair common data 47 * @asrc: pointer to its parent module 59 * @rate: rate o 39 struct fsl_asrc *asrc; global() member [all...] |
/linux/Documentation/devicetree/bindings/sound/ |
H A D | fsl,imx-asrc.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/fsl,imx-asrc.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Freescale Asynchronous Sample Rate Converter (ASRC) Controller 10 The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of 17 - Shawn Guo <shawnguo@kernel.org> 18 - Sascha Hauer <s.hauer@pengutronix.de> 23 - enum: 24 - fsl,imx35-asrc [all …]
|
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, -652 2676 rt5682_wclk_round_rate(struct clk_hw * hw,unsigned long rate,unsigned long * parent_rate) rt5682_wclk_round_rate() argument 2699 rt5682_wclk_set_rate(struct clk_hw * hw,unsigned long rate,unsigned long parent_rate) rt5682_wclk_set_rate() argument 2780 rt5682_bclk_get_factor(unsigned long rate,unsigned long parent_rate) rt5682_bclk_get_factor() argument 2796 rt5682_bclk_round_rate(struct clk_hw * hw,unsigned long rate,unsigned long * parent_rate) rt5682_bclk_round_rate() argument 2819 rt5682_bclk_set_rate(struct clk_hw * hw,unsigned long rate,unsigned long parent_rate) rt5682_bclk_set_rate() argument [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 | 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 | 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 | 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 808 * The ASRC function is for asynchronous MCLK and LRCK. Also, since RT5668 can 809 * only support standard 32fs or 64fs i2s format, ASRC should be enabled to 810 * support special i2s clock format such as Intel's 100fs(100 * sampling rate). [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); 356 /* ASRC */ 357 SOC_SINGLE("IF1 ASRC Switch", RT5651_PLL_MODE_1, 359 SOC_SINGLE("IF2 ASRC Switch", RT5651_PLL_MODE_1, [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; 438 /* Some (package) variants have the headset-mic pin not-connecte 882 int idx, rate; set_dmic_clk() local [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 …]
|
/linux/sound/soc/tegra/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 3 tristate "SoC Audio for the Tegra System-on-Chip" 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 99 tristate "Tegra186 ASRC module" 101 Config to enable the Asynchronous Sample Rate Converter (ASRC), 104 sample rate ratios (freq_in/freq_out) from 1:24 to 24:1. 105 ASRC has two modes of operation. One where ratio can be programmed 108 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 …]
|
/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 21 #include <sound/soc-acpi.h> 23 #include "../atom/sst-atom-controls.h" 24 #include "../common/soc-intel-quirks.h" 29 #define CHT_CODEC_DAI "rt5670-aif1" 53 struct snd_soc_dapm_context *dapm = w->dapm; in platform_clock_control() 54 struct snd_soc_card *card = dapm->card; in platform_clock_control() 61 dev_err(card->dev, "Codec dai not found; Unable to set platform clock\n"); in platform_clock_control() 62 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 …]
|
H A D | sof_rt5682.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 // Copyright(c) 2019-2020 Intel Corporation. 22 #include <sound/soc-acpi.h> 26 #include "../common/soc-intel-quirks.h" 31 /* Driver-specific board quirks: from bit 0 to 7 */ 40 sof_rt5682_quirk = (unsigned long)id->driver_data; in sof_rt5682_quirk_cb() 57 DMI_MATCH(DMI_PRODUCT_NAME, "UP-CHT01"), 74 DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98373_ALC5682I_I2S_UP4"), 86 DMI_MATCH(DMI_OEM_STRING, "AUDIO-ADL_MAX98373_ALC5682I_I2S"), 97 DMI_MATCH(DMI_OEM_STRING, "AUDIO-MAX98390_ALC5682I_I2S"), [all …]
|
/linux/sound/soc/mediatek/mt8365/ |
H A D | mt8365-dai-pcm.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include "mt8365-afe-clk.h" 14 #include "mt8365-afe-common.h" 27 regmap_update_bits(afe->regmap, PCM_INTF_CON1, in mt8365_dai_enable_pcm1() 33 regmap_update_bits(afe->regmap, PCM_INTF_CON1, in mt8365_dai_disable_pcm1() 41 struct mt8365_afe_private *afe_priv = afe->platform_priv; in mt8365_dai_configure_pcm1() 42 struct mt8365_pcm_intf_data *pcm_priv = afe_priv->dai_priv[MT8365_AFE_IO_PCM1]; in mt8365_dai_configure_pcm1() 43 bool slave_mode = pcm_priv->slave_mode; in mt8365_dai_configure_pcm1() 44 bool lrck_inv = pcm_priv->lrck_inv; in mt8365_dai_configure_pcm1() 45 bool bck_inv = pcm_priv->bck_inv; in mt8365_dai_configure_pcm1() [all …]
|
/linux/sound/soc/mediatek/mt8192/ |
H A D | mt8192-dai-i2s.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include "mt8192-afe-clk.h" 14 #include "mt8192-afe-common.h" 15 #include "mt8192-afe-gpio.h" 16 #include "mt8192-interconnection.h" 45 int rate; /* for determine which apll to use */ member 113 return -EINVAL; in get_i2s_id_by_name() 119 struct mt8192_afe_private *afe_priv = afe->platform_priv; in get_i2s_priv_by_name() 125 return afe_priv->dai_priv[dai_id]; in get_i2s_priv_by_name() 142 i2s_priv = get_i2s_priv_by_name(afe, kcontrol->id.name); in mt8192_i2s_hd_get() [all …]
|