/linux/sound/soc/codecs/ |
H A D | da9055.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 58 /* Input - Gain, Select and Filter Registers */ 71 /* Output - Gain, Select and Filter Registers */ 249 /* for MASTER mode, fs = 44.1Khz and its harmonics */ 250 {11289600, 2822400, 0x00, 0x00, 0x20, 1}, /* MCLK=11.2896Mhz */ 251 {12000000, 2822400, 0x03, 0x61, 0x1E, 1}, /* MCLK=12Mhz */ 252 {12288000, 2822400, 0x0C, 0xCC, 0x1D, 1}, /* MCLK=12.288Mhz */ 253 {13000000, 2822400, 0x19, 0x45, 0x1B, 1}, /* MCLK=13Mhz */ 254 {13500000, 2822400, 0x18, 0x56, 0x1A, 1}, /* MCLK=13.5Mhz */ 255 {14400000, 2822400, 0x02, 0xD0, 0x19, 1}, /* MCLK=14.4Mhz */ [all …]
|
H A D | nau8325.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // nau8325.c -- Nuvoton NAU8325 audio codec driver 25 /* Range of Master Clock MCLK (Hz) */ 29 /* scaling for MCLK source */ 30 #define CLK_PROC_BYPASS (-1) 35 /* from MCLK input */ 70 /* { FS, range, max, { MCLK source }} */ 192 static const DECLARE_TLV_DB_MINMAX_MUTE(dac_vol_tlv, -8000, 600); 219 snd_soc_dapm_to_component(w->dapm); in nau8325_dac_event() 224 regmap_update_bits(nau8325->regmap, NAU8325_R12_MUTE_CTRL, in nau8325_dac_event() [all …]
|
H A D | da7219.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * da7219.c - DA7219 ALSA SoC Codec Driver 13 #include <linux/clk-provider.h> 26 #include <sound/soc-dapm.h> 33 #include "da7219-aad.h" 41 static const DECLARE_TLV_DB_SCALE(da7219_mic_gain_tlv, -600, 600, 0); 42 static const DECLARE_TLV_DB_SCALE(da7219_mixin_gain_tlv, -450, 150, 0); 43 static const DECLARE_TLV_DB_SCALE(da7219_adc_dig_gain_tlv, -8325, 75, 0); 44 static const DECLARE_TLV_DB_SCALE(da7219_alc_threshold_tlv, -9450, 150, 0); 47 static const DECLARE_TLV_DB_SCALE(da7219_sidetone_gain_tlv, -4200, 300, 0); [all …]
|
H A D | da7210.c | 1 // SPDX-License-Identifier: GPL-2.0+ 222 /* for MASTER mode, fs = 44.1Khz */ 223 { 12000000, 2822400, 0xE8, 0x6C, 0x2, 1}, /* MCLK=12Mhz */ 224 { 13000000, 2822400, 0xDF, 0x28, 0xC, 1}, /* MCLK=13Mhz */ 225 { 13500000, 2822400, 0xDB, 0x0A, 0xD, 1}, /* MCLK=13.5Mhz */ 226 { 14400000, 2822400, 0xD4, 0x5A, 0x2, 1}, /* MCLK=14.4Mhz */ 227 { 19200000, 2822400, 0xBB, 0x43, 0x9, 1}, /* MCLK=19.2Mhz */ 228 { 19680000, 2822400, 0xB9, 0x6D, 0xA, 1}, /* MCLK=19.68Mhz */ 229 { 19800000, 2822400, 0xB8, 0xFB, 0xB, 1}, /* MCLK=19.8Mhz */ 230 /* for MASTER mode, fs = 48Khz */ [all …]
|
H A D | da7213.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 33 /* -54dB */ 34 0x0, 0x11, TLV_DB_SCALE_ITEM(-5400, 0, 0), 35 /* -52.5dB to 15dB */ 36 0x12, 0x3f, TLV_DB_SCALE_ITEM(-5250, 150, 0) 41 /* -78dB to 12dB */ 42 0x08, 0x7f, TLV_DB_SCALE_ITEM(-7800, 75, 0) 51 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0); 52 static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0); 53 static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0); [all …]
|
H A D | ak4375.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 23 #define PMCP2 BIT(1) /* Charge Pump 2: Class-G HP Amp */ 118 * from -12.5 to 3 dB in 0.5 dB steps (mute instead of -12.5 dB) 120 static DECLARE_TLV_DB_SCALE(dac_tlv, -1250, 50, 0); 123 * HP-Amp Analog volume control: 124 * from -4.2 to 6 dB in 2 dB steps (mute instead of -4.2 dB) 126 static DECLARE_TLV_DB_SCALE(hpg_tlv, -4200, 20, 0); 132 "+-VDD Operation", 133 "+-1/2VDD Operation" 138 * 0, 0 : Sharp Roll-Off Filter [all …]
|
H A D | sti-sas.c | 1 // SPDX-License-Identifier: GPL-2.0-only 15 #include <sound/soc-dapm.h> 20 /* sysconf 5041: Audio-Gue-Control */ 22 /* sysconf 5042: Audio-DAC-Control */ 54 int mclk; member 59 int mclk; member 84 status = regmap_read(drvdata->dac.regmap, reg, &val); in sti_sas_read_reg() 96 return regmap_write(drvdata->dac.regmap, reg, value); in sti_sas_write_reg() 108 /* Initialise bi-phase formatter to disabled */ in sti_sas_init_sas_registers() 113 /* Initialise bi-phase formatter idle value to 0 */ in sti_sas_init_sas_registers() [all …]
|
H A D | da7218.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * da7218.c - DA7218 ALSA SoC Codec Driver 22 #include <sound/soc-dapm.h> 37 static const DECLARE_TLV_DB_SCALE(da7218_mic_gain_tlv, -600, 600, 0); 38 static const DECLARE_TLV_DB_SCALE(da7218_mixin_gain_tlv, -450, 150, 0); 39 static const DECLARE_TLV_DB_SCALE(da7218_in_dig_gain_tlv, -8325, 75, 0); 40 static const DECLARE_TLV_DB_SCALE(da7218_ags_trigger_tlv, -9000, 600, 0); 42 static const DECLARE_TLV_DB_SCALE(da7218_alc_threshold_tlv, -9450, 150, 0); 47 static const DECLARE_TLV_DB_SCALE(da7218_dmix_gain_tlv, -4200, 150, 0); 50 static const DECLARE_TLV_DB_SCALE(da7218_dgs_trigger_tlv, -9450, 150, 0); [all …]
|
H A D | nau8822.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // nau8822.c -- NAU8822 ALSA Soc Audio driver 8 // Co-author: John Hsu <kchsu0@nuvoton.com> 9 // Co-author: Seven Li <wtli@nuvoton.com> 185 struct soc_bytes_ext *params = (void *)kcontrol->private_value; in nau8822_eq_get() 190 val = (u16 *)ucontrol->value.bytes.data; in nau8822_eq_get() 192 for (i = 0; i < params->max / sizeof(u16); i++) { in nau8822_eq_get() 194 /* conversion of 16-bit integers between native CPU format in nau8822_eq_get() 206 * cut-off frequency, bandwidth control, and equalizer path. 217 struct soc_bytes_ext *params = (void *)kcontrol->private_value; in nau8822_eq_put() [all …]
|
H A D | adau17x1.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright 2011-2014 Analog Devices Inc. 6 * Author: Lars-Peter Clausen <lars@metafoo.de> 26 #include "adau-utils.h" 48 static const DECLARE_TLV_DB_MINMAX(adau17x1_digital_tlv, -9563, 0); 60 SOC_SINGLE("Playback De-emphasis Switch", ADAU17X1_DAC_CONTROL0, 74 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in adau17x1_pll_event() 78 adau->pll_regs[5] = 1; in adau17x1_pll_event() 80 adau->pll_regs[5] = 0; in adau17x1_pll_event() 83 regmap_update_bits(adau->regmap, ADAU17X1_CLOCK_CONTROL, in adau17x1_pll_event() [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | loongson,ls-audio-card.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/loongson,ls-audio-card.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Yingkun Meng <mengyingkun@loongson.cn> 19 const: loongson,ls-audio-card 25 mclk-fs: 26 $ref: simple-card.yaml#/definitions/mclk-fs 33 sound-dai: 36 - sound-dai [all …]
|
H A D | simple-card.yaml | 1 # SPDX-License-Identifier: GPL-2.0 3 --- 4 $id: http://devicetree.org/schemas/sound/simple-card.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 14 frame-master: 15 description: Indicates dai-link frame master. 18 bitclock-master: 19 description: Indicates dai-link bit clock master 22 frame-inversion: [all …]
|
H A D | audio-graph-port.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/audio-graph-port.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 15 port-base: 17 - $ref: /schemas/graph.yaml#/$defs/port-base 18 - $ref: /schemas/sound/dai-params.yaml# 20 mclk-fs: 21 $ref: simple-card.yaml#/definitions/mclk-fs [all …]
|
/linux/Documentation/devicetree/bindings/media/i2c/ |
H A D | tda1997x.txt | 1 Device-Tree bindings for the NXP TDA1997x HDMI receiver 6 - RGB 8bit per color (24 bits total): R[11:4] B[11:4] G[11:4] 7 - YUV444 8bit per color (24 bits total): Y[11:4] Cr[11:4] Cb[11:4] 8 - YUV422 semi-planar 8bit per component (16 bits total): Y[11:4] CbCr[11:4] 9 - YUV422 semi-planar 10bit per component (20 bits total): Y[11:2] CbCr[11:2] 10 - YUV422 semi-planar 12bit per component (24 bits total): - Y[11:0] CbCr[11:0] 11 - YUV422 BT656 8bit per component (8 bits total): YCbCr[11:4] (2-cycles) 12 - YUV422 BT656 10bit per component (10 bits total): YCbCr[11:2] (2-cycles) 13 - YUV422 BT656 12bit per component (12 bits total): YCbCr[11:0] (2-cycles) 16 - RGB 12bit per color (36 bits total): R[11:0] B[11:0] G[11:0] [all …]
|
/linux/sound/soc/mxs/ |
H A D | mxs-saif.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 11 #include <linux/dma-mapping.h> 13 #include <linux/clk-provider.h> 22 #include "mxs-saif.h" 32 * For MXS, two SAIF modules are instantiated on-chip. 34 * mode simultaneously if they are connected to different off-chip codecs. 43 * The master id is provided in mach-specific layer according to different 54 saif->mclk = freq; in mxs_saif_set_dai_sysclk() 57 return -EINVAL; in mxs_saif_set_dai_sysclk() 70 return mxs_saif[saif->master_id]; in mxs_saif_get_master() [all …]
|
/linux/sound/soc/fsl/ |
H A D | imx-card.c | 1 // SPDX-License-Identifier: GPL-2.0+ 2 // Copyright 2017-2021 NXP 14 #include <sound/soc-dapm.h> 31 * Mapping LRCK fs and frame width, table 3 & 4 in datasheet 54 * struct imx_card_plat_data - specific info for codecs 56 * @fs_mul: ratio of mclk/fs for normal mode 57 * @tdm_fs_mul: ratio of mclk/f 382 unsigned int fs; ak5558_hw_rule_rate() local [all...] |
/linux/sound/soc/meson/ |
H A D | aiu-encoder-i2s.c | 1 // SPDX-License-Identifier: GPL-2.0 10 #include <sound/soc-dai.h> 58 return -EINVAL; in aiu_encoder_i2s_setup_desc() 68 return -EINVAL; in aiu_encoder_i2s_setup_desc() 94 dev_err(component->dev, "Unsupported i2s divider: %u\n", bs); in aiu_encoder_i2s_set_legacy_div() 95 return -EINVAL; in aiu_encoder_i2s_set_legacy_div() 117 * In most configuration, the i2s divider is 'mclk / blck'. in aiu_encoder_i2s_set_more_div() 118 * However, in 16 bits - 8ch mode, this factor needs to be in aiu_encoder_i2s_set_more_div() 124 dev_err(component->dev, in aiu_encoder_i2s_set_more_div() 126 return -EINVAL; in aiu_encoder_i2s_set_more_div() [all …]
|
/linux/sound/soc/loongson/ |
H A D | loongson_i2s.c | 1 // SPDX-License-Identifier: GPL-2.0 13 #include <linux/dma-mapping.h> 41 mask = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? in loongson_i2s_trigger() 43 regmap_update_bits(i2s->regmap, LS_I2S_CTRL, mask, mask); in loongson_i2s_trigger() 48 mask = (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) ? in loongson_i2s_trigger() 50 regmap_update_bits(i2s->regmap, LS_I2S_CTRL, mask, 0); in loongson_i2s_trigger() 53 ret = -EINVAL; in loongson_i2s_trigger() 64 u32 clk_rate = i2s->clk_rate; in loongson_i2s_hw_params() 65 u32 sysclk = i2s->sysclk; in loongson_i2s_hw_params() 68 u32 fs = params_rate(params); in loongson_i2s_hw_params() local [all …]
|
H A D | loongson_card.c | 1 // SPDX-License-Identifier: GPL-2.0 11 #include <sound/soc-acpi.h> 27 struct loongson_card_data *ls_card = snd_soc_card_get_drvdata(rtd->card); in loongson_card_hw_params() 30 int ret, mclk; in loongson_card_hw_params() local 32 if (!ls_card->mclk_fs) in loongson_card_hw_params() 35 mclk = ls_card->mclk_fs * params_rate(params); in loongson_card_hw_params() 36 ret = snd_soc_dai_set_sysclk(cpu_dai, 0, mclk, SND_SOC_CLOCK_OUT); in loongson_card_hw_params() 38 dev_err(codec_dai->dev, "cpu_dai clock not set\n"); in loongson_card_hw_params() 42 ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk, SND_SOC_CLOCK_IN); in loongson_card_hw_params() 44 dev_err(codec_dai->dev, "codec_dai clock not set\n"); in loongson_card_hw_params() [all …]
|
/linux/drivers/iio/adc/ |
H A D | ad4130.c | 1 // SPDX-License-Identifier: GPL-2.0+ 10 #include <linux/clk-provider.h> 125 #define AD4130_INVALID_SLOT -1 137 [AD4130_CHANNEL_X_REG(0) ... AD4130_CHANNEL_X_REG(AD4130_MAX_CHANNELS - 1)] = 3, 138 [AD4130_CONFIG_X_REG(0) ... AD4130_CONFIG_X_REG(AD4130_MAX_SETUPS - 1)] = 2, 139 [AD4130_FILTER_X_REG(0) ... AD4130_FILTER_X_REG(AD4130_MAX_SETUPS - 1)] = 3, 140 [AD4130_OFFSET_X_REG(0) ... AD4130_OFFSET_X_REG(AD4130_MAX_SETUPS - 1)] = 3, 141 [AD4130_GAIN_X_REG(0) ... AD4130_GAIN_X_REG(AD4130_MAX_SETUPS - 1)] = 3, 231 unsigned int fs; member 265 struct clk *mclk; member [all …]
|
/linux/sound/soc/generic/ |
H A D | audio-graph-card.c | 1 // SPDX-License-Identifier: GPL-2.0 8 // based on ${LINUX}/sound/soc/generic/simple-card.c 39 struct snd_soc_dapm_context *dapm = w->dapm; in graph_outdrv_event() 40 struct simple_util_priv *priv = snd_soc_card_get_drvdata(dapm->card); in graph_outdrv_event() 44 gpiod_set_value_cansleep(priv->pa_gpio, 1); in graph_outdrv_event() 47 gpiod_set_value_cansleep(priv->pa_gpio, 0); in graph_outdrv_event() 50 return -EINVAL; in graph_outdrv_event() 72 if (dai && (dai->component->driver->pcm_construct || in soc_component_is_pcm() 73 (dai->driver->ops && dai->driver->ops->pcm_new))) in soc_component_is_pcm() 83 struct device_node *top = dev->of_node; in graph_parse_convert() [all …]
|
H A D | simple-card.c | 1 // SPDX-License-Identifier: GPL-2.0 17 #include <sound/soc-dai.h> 22 #define DAI "sound-dai" 23 #define CELL "#sound-dai-cells" 24 #define PREFIX "simple-audio-card," 41 * Get node via "sound-dai = <&phandle port>" in simple_parse_platform() 50 dlc->of_node = args.np; in simple_parse_platform() 68 * Get node via "sound-dai = <&phandle port>" in simple_parse_dai() 80 dlc->dai_name = snd_soc_dai_name_get(dai); in simple_parse_dai() 81 dlc->dai_args = snd_soc_copy_dai_args(dev, &args); in simple_parse_dai() [all …]
|
/linux/arch/arm/boot/dts/st/ |
H A D | stihxxx-b2120.dtsi | 1 // SPDX-License-Identifier: GPL-2.0-only 6 #include <dt-bindings/clock/stih407-clks.h> 7 #include <dt-bindings/gpio/gpio.h> 8 #include <dt-bindings/media/c8sectpfe.h> 11 compatible = "gpio-leds"; 12 led-red { 15 linux,default-trigger = "heartbeat"; 17 led-green { 19 default-state = "off"; 24 compatible = "simple-audio-card"; [all …]
|
/linux/arch/arm/boot/dts/intel/pxa/ |
H A D | pxa300-raumfeld-connector.dts | 1 // SPDX-License-Identifier: GPL-2.0 3 /dts-v1/; 5 #include "pxa300-raumfeld-common.dtsi" 6 #include "pxa300-raumfeld-tuneable-clock.dtsi" 10 compatible = "raumfeld,raumfeld-connector-pxa303", "marvell,pxa300"; 13 compatible = "simple-audio-card"; 14 simple-audio-card,name = "Raumfeld Connector"; 15 #address-cells = <1>; 16 #size-cells = <0>; 18 simple-audio-card,dai-link@0 { [all …]
|
/linux/arch/arm64/boot/dts/renesas/ |
H A D | ulcb-kf-simple-audio-card.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 9 * (A) CPU0 <----> ak4613 10 * (B) CPU1 ----> HDMI 11 * (C) CPU2 ----> PCM3168A-p 12 * (D) CPU3 <---- PCM3168A-c 14 * (A) aplay -D plughw:0,0 xxx.wav 15 * (B) aplay -D plughw:0,1 xxx.wav 16 * (C) aplay -D plughw:1,0 xxx.wav 18 * (A) arecord -D plughw:0,0 xxx.wav 19 * (D) arecord -D plughw:1,1 xxx.wav [all …]
|