/linux/sound/soc/codecs/ |
H A D | rk817_codec.c | 1 // SPDX-License-Identifier: GPL-2.0 32 * I don't have another implementation to compare from the Rockchip sources. Hard-coding for now. 45 if (rk817->mic_in_differential) { in rk817_init() 61 /* Set the PLL pre-divide value (values not documented). */ in rk817_set_component_pll() 73 * 0db~-95db, 0.375db/step, for example: 75 * 0xff: -95dB 78 static const DECLARE_TLV_DB_MINMAX(rk817_vol_tlv, -9500, 0); 82 * 27db~-18db, 3db/step, for example: 83 * 0x0: -18dB 87 static const DECLARE_TLV_DB_MINMAX(rk817_gain_tlv, -1800, 2700); [all …]
|
H A D | cs42l73.h | 1 /* SPDX-License-Identifier: GPL-2.0-only */ 15 /* I2C Address: 1001010[R/W] - 10010100 = 0x94(Write); 10010101 = 0x95(Read) */ 57 #define CS42L73_LIMRRATESPK 0x2A /* Lmtr Ctl,Release Rate Spk. [A]. */ 101 #define CS42L73_SPKMIPMA 0x56 /* SPK Mono Mixer: In. Path */ 102 #define CS42L73_SPKMXSPA 0x57 /* SPK Mono Mixer: XSP Mono/L/R Att. */ 103 #define CS42L73_SPKMASPA 0x58 /* SPK Mono Mixer: ASP Mono/L/R Att. */ 104 #define CS42L73_SPKMVSPMA 0x59 /* SPK Mono Mixer: VSP Mono Atten. */ 193 /* HP A/B Analog Mute */ 195 /* LO A/B Analog Mute */ 197 /* Digital Mute */
|
H A D | max98088.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max98088.c -- MAX98088 ALSA SoC Audio driver 90 { 0x2b, 0x00 }, /* 2B left SPK mixer */ 91 { 0x2c, 0x00 }, /* 2C right SPK mixer */ 92 { 0x2d, 0x00 }, /* 2D SPK control */ 109 { 0x3d, 0x00 }, /* 3D left SPK volume */ 110 { 0x3e, 0x00 }, /* 3E right SPK volume */ 337 "Off", "100Hz", "400Hz", "600Hz", "800Hz", "1000Hz", "200-400Hz", 338 "400-600Hz", "400-800Hz", 385 unsigned int sel = ucontrol->value.integer.value[0]; in max98088_mic1pre_set() [all …]
|
H A D | ak4535.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * ak4535.c -- AK4535 ALSA Soc Audio driver 65 static const char *ak4535_mono_gain[] = {"+6dB", "-17dB"}; 66 static const char *ak4535_mono_out[] = {"(L + R)/2", "Hi-Z"}; 174 SND_SOC_DAPM_PGA("Spk Amp", AK4535_PM2, 3, 0, NULL, 0), 232 {"Speaker Enable", "Switch", "Spk Amp"}, 233 {"Spk Amp", NULL, "MIN"}, 251 struct snd_soc_component *component = codec_dai->component; in ak4535_set_dai_sysclk() 254 ak4535->sysclk = freq; in ak4535_set_dai_sysclk() 262 struct snd_soc_component *component = dai->component; in ak4535_hw_params() [all …]
|
H A D | rt5631.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * rt5631.c -- RT5631 ALSA Soc Audio driver 22 #include <sound/soc-dapm.h> 68 * rt5631_write_index - write index register of 2nd layer 78 * rt5631_read_index - read index register of 2nd layer 169 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0); 170 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -95625, 375, 0); 171 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0); 189 ucontrol->value.integer.value[0] = rt5631->dmic_used_flag; in rt5631_dmic_get() 200 rt5631->dmic_used_flag = ucontrol->value.integer.value[0]; in rt5631_dmic_put() [all …]
|
H A D | rt700.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // rt700.c -- rt700 ALSA SoC audio driver 24 #include <sound/soc-dapm.h> 66 ret = rt700_index_read(rt700->regmap, RT700_IRQ_FLAG_TABLE1, &val80); in rt700_button_detect() 69 ret = rt700_index_read(rt700->regmap, RT700_IRQ_FLAG_TABLE2, &val81); in rt700_button_detect() 112 ret = rt700_index_read(rt700->regmap, in rt700_headset_detect() 122 ret = rt700_index_read(rt700->regmap, in rt700_headset_detect() 128 ret = regmap_read(rt700->regmap, reg, &jack_status); in rt700_headset_detect() 137 rt700->jack_type = SND_JACK_HEADPHONE; in rt700_headset_detect() 140 rt700->jack_type = SND_JACK_HEADSET; in rt700_headset_detect() [all …]
|
H A D | rk3328_codec.c | 1 // SPDX-License-Identifier: GPL-2.0 22 * 0: -39dB 34 struct gpio_desc *mute; member 58 regmap_write(rk3328->regmap, CODEC_RESET, 0x00); in rk3328_codec_reset() 60 regmap_write(rk3328->regmap, CODEC_RESET, 0x03); in rk3328_codec_reset() 68 snd_soc_component_get_drvdata(dai->component); in rk3328_set_dai_fmt() 79 return -EINVAL; in rk3328_set_dai_fmt() 82 regmap_update_bits(rk3328->regmap, DAC_INIT_CTRL1, in rk3328_set_dai_fmt() 100 return -EINVAL; in rk3328_set_dai_fmt() 103 regmap_update_bits(rk3328->regmap, DAC_INIT_CTRL2, in rk3328_set_dai_fmt() [all …]
|
H A D | cs42l52.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * cs42l52.c -- CS42L52 ALSA SoC audio driver 28 #include <sound/soc-dapm.h> 130 static DECLARE_TLV_DB_SCALE(hl_tlv, -10200, 50, 0); 132 static DECLARE_TLV_DB_SCALE(hpd_tlv, -9600, 50, 1); 134 static DECLARE_TLV_DB_SCALE(ipd_tlv, -9600, 100, 0); 138 static DECLARE_TLV_DB_SCALE(pga_tlv, -600, 50, 0); 140 static DECLARE_TLV_DB_SCALE(pass_tlv, -6000, 50, 0); 142 static DECLARE_TLV_DB_SCALE(mix_tlv, -5150, 50, 0); 144 static DECLARE_TLV_DB_SCALE(beep_tlv, -56, 200, 0); [all …]
|
H A D | sma1303.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 // sma1303.c -- sma1303 ALSA SoC Audio driver 236 static const DECLARE_TLV_DB_SCALE(sma1303_spk_tlv, -6000, 50, 0); 242 int cnt = sma1303->retry_cnt; in sma1303_regmap_write() 244 while (cnt--) { in sma1303_regmap_write() 245 ret = regmap_write(sma1303->regmap, reg, val); in sma1303_regmap_write() 247 dev_err(sma1303->dev, in sma1303_regmap_write() 259 int cnt = sma1303->retry_cnt; in sma1303_regmap_update_bits() 261 while (cnt--) { in sma1303_regmap_update_bits() 262 ret = regmap_update_bits_check(sma1303->regmap, reg, in sma1303_regmap_update_bits() [all …]
|
H A D | rt722-sdca.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 // rt722-sdca.c -- rt722 SDCA ALSA SoC audio driver 23 #include <sound/soc-dapm.h> 26 #include "rt722-sdca.h" 31 struct regmap *regmap = rt722->mbq_regmap; in rt722_sdca_index_write() 37 dev_err(&rt722->slave->dev, in rt722_sdca_index_write() 48 struct regmap *regmap = rt722->mbq_regmap; in rt722_sdca_index_read() 53 dev_err(&rt722->slave->dev, in rt722_sdca_index_read() 99 ret = regmap_read(rt722->regmap, in rt722_sdca_button_detect() 110 ret = regmap_read(rt722->regmap, in rt722_sdca_button_detect() [all …]
|
H A D | wm8983.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * wm8983.c -- WM8983 ALSA SoC Audio driver 29 { 0x01, 0x0000 }, /* R1 - Power management 1 */ 30 { 0x02, 0x0000 }, /* R2 - Power management 2 */ 31 { 0x03, 0x0000 }, /* R3 - Power management 3 */ 32 { 0x04, 0x0050 }, /* R4 - Audio Interface */ 33 { 0x05, 0x0000 }, /* R5 - Companding control */ 34 { 0x06, 0x0140 }, /* R6 - Clock Gen control */ 35 { 0x07, 0x0000 }, /* R7 - Additional control */ 36 { 0x08, 0x0000 }, /* R8 - GPIO Control */ [all …]
|
H A D | cs35l45.c | 1 // SPDX-License-Identifier: GPL-2.0 3 // cs35l45.c - CS35L45 ALSA SoC audio driver 5 // Copyright 2019-2022 Cirrus Logic, Inc. 53 if (!cs35l45->dsp.cs_dsp.running) { in cs35l45_set_cspl_mbox_cmd() 54 dev_err(cs35l45->dev, "DSP not running\n"); in cs35l45_set_cspl_mbox_cmd() 55 return -EPERM; in cs35l45_set_cspl_mbox_cmd() 62 dev_err(cs35l45->dev, "Failed to write MBOX: %d\n", ret); in cs35l45_set_cspl_mbox_cmd() 72 dev_err(cs35l45->dev, "Failed to read MBOX STS: %d\n", ret); in cs35l45_set_cspl_mbox_cmd() 77 dev_dbg(cs35l45->dev, "[%u] cmd %u returned invalid sts %u", i, cmd, sts); in cs35l45_set_cspl_mbox_cmd() 83 dev_err(cs35l45->dev, "Failed to set mailbox cmd %u (status %u)\n", cmd, sts); in cs35l45_set_cspl_mbox_cmd() [all …]
|
H A D | wm8903.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * wm8903.c -- WM8903 ALSA SoC Audio driver 5 * Copyright 2008-12 Wolfson Microelectronics 6 * Copyright 2011-2012 NVIDIA, Inc. 11 * - TDM mode configuration. 41 { 4, 0x0018 }, /* R4 - Bias Control 0 */ 42 { 5, 0x0000 }, /* R5 - VMID Control 0 */ 43 { 6, 0x0000 }, /* R6 - Mic Bias Control 0 */ 44 { 8, 0x0001 }, /* R8 - Analogue DAC 0 */ 45 { 10, 0x0001 }, /* R10 - Analogue ADC 0 */ [all …]
|
H A D | max98090.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * max98090.c -- MAX98090 ALSA SoC Audio driver 5 * Copyright 2011-2012 Maxim Integrated Products 73 { 0x2E, 0x00 }, /* 2E Left Spk Mixer */ 74 { 0x2F, 0x00 }, /* 2F Right Spk Mixer */ 76 { 0x30, 0x00 }, /* 30 Spk Control */ 77 { 0x31, 0x2C }, /* 31 Left Spk Volume */ 78 { 0x32, 0x2C }, /* 32 Right Spk Volume */ 279 /* Reset the codec by writing to this write-only reset register */ in max98090_reset() 280 ret = regmap_write(max98090->regmap, M98090_REG_SOFTWARE_RESET, in max98090_reset() [all …]
|
H A D | wm9712.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * wm9712.c -- ALSA Soc WM9712 codec support 5 * Copyright 2006-12 Wolfson Microelectronics PLC. 105 static const char *wm9712_rec_adc[] = {"Stereo", "Left", "Right", "Mute"}; 112 static const char *wm9712_ng_type[] = {"Constant Gain", "Mute"}; 115 static const DECLARE_TLV_DB_SCALE(main_tlv, -3450, 150, 0); 181 SOC_SINGLE("3D Upper Cut-off Switch", AC97_3D_CONTROL, 5, 1, 1), 182 SOC_SINGLE("3D Lower Cut-off Switch", AC97_3D_CONTROL, 4, 1, 1), 186 SOC_SINGLE("Bass Cut-off Switch", AC97_MASTER_TONE, 12, 1, 1), 187 SOC_SINGLE("Tone Cut-off Switch", AC97_MASTER_TONE, 4, 1, 1), [all …]
|
H A D | rtq9128.c | 1 // SPDX-License-Identifier: GPL-2.0-only 104 return -EINVAL; in rtq9128_i2c_write() 108 return i2c_smbus_write_i2c_block_data(i2c, reg, rg_size, data + count - rg_size); in rtq9128_i2c_write() 123 return -EINVAL; in rtq9128_i2c_read() 131 return -EIO; in rtq9128_i2c_read() 133 memset(val_buf, 0, val_size - rg_size); in rtq9128_i2c_read() 134 memcpy(val_buf + val_size - rg_size, data_tmp, rg_size); in rtq9128_i2c_read() 218 static const DECLARE_TLV_DB_SCALE(dig_tlv, -10375, 25, 0); 221 0, 3, TLV_DB_SCALE_ITEM(-600, 600, 0), 270 SOC_SINGLE_TLV("SPK Gain Volume", RTQ9128_REG_MISC, 0, 5, 0, spkgain_tlv), [all …]
|
/linux/sound/soc/pxa/ |
H A D | spitz.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * spitz.c -- SoC audio for Sharp SL-Cxx00 models Spitz, Borzoi and Akita 22 #include <asm/mach-types.h> 24 #include "pxa2xx-i2s.h" 34 /* audio clock in Hz - rounded from 12.235MHz */ 46 snd_soc_dapm_enable_pin_unlocked(dapm, "Ext Spk"); in spitz_ext_control() 48 snd_soc_dapm_disable_pin_unlocked(dapm, "Ext Spk"); in spitz_ext_control() 62 /* enable mic jack and bias, mute hp */ in spitz_ext_control() 71 /* enable line jack, disable mic bias and mute hp */ in spitz_ext_control() 80 /* enable and unmute headset jack enable mic bias, mute L hp */ in spitz_ext_control() [all …]
|
/linux/Documentation/devicetree/bindings/sound/ |
H A D | rockchip,rk3328-codec.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/sound/rockchip,rk3328-codec.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 10 - Heiko Stuebner <heiko@sntech.de> 12 - $ref: dai-common.yaml# 17 const: rockchip,rk3328-codec 24 - description: clock for audio codec 25 - description: clock for I2S master clock 27 clock-names: [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 …]
|
/linux/Documentation/sound/hd-audio/ |
H A D | models.rst | 2 HD-Audio Codec-Specific Models 8 3-jack in back and a headphone out 9 3stack-digout 10 3-jack in back, a HP out and a SPDIF out 12 5-jack in back, 2-jack in front 13 5stack-digout 14 5-jack in back, 2-jack in front, a SPDIF out 16 6-jack in back, 2-jack in front 17 6stack-digout 18 6-jack with a SPDIF out [all …]
|
/linux/sound/pci/hda/ |
H A D | hda_generic.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Generic BIOS auto-parser helper functions for HD-audio 16 /* table entry for multi-io paths */ 18 hda_nid_t pin; /* multi-io widget pin NID */ 20 unsigned int ctl_in; /* cached input-pi [all...] |
H A D | cs35l41_hda.c | 1 // SPDX-License-Identifier: GPL-2.0 37 #define CS35L41_UUID "50d90cdc-3de4-4f18-b528-c7fe3b71f40d" 89 { CS35L41_SP_HIZ_CTRL, 0x00000002 }, // Hi-Z unused 111 { CS35L41_SP_HIZ_CTRL, 0x00000003 }, // Hi-Z unused/disabled 133 { CS35L41_AMP_DIG_VOL_CTRL, 0x0000A678 }, // AMP_HPF_PCM_EN = 1, AMP_VOL_PCM Mute 149 return -ENOMEM; in cs35l41_request_tuning_param_file() 151 ret = firmware_request_nowarn(firmware, *filename, cs35l41->dev); in cs35l41_request_tuning_param_file() 153 dev_dbg(cs35l41->dev, "Failed to request '%s'\n", *filename); in cs35l41_request_tuning_param_file() 166 const char * const dsp_name = cs35l41->cs_dsp.name; in cs35l41_request_firmware_file() 170 if (spkid > -1 && ssid && amp_name) in cs35l41_request_firmware_file() [all …]
|
H A D | patch_conexant.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 7 * Tobin Davis <tdavis@dsl-only.net> 63 spec->gen.beep_nid = nid; in set_beep_amp() 65 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp() 68 return -ENOMEM; in set_beep_amp() 69 knew->private_value = beep_amp; in set_beep_amp() 76 struct conexant_spec *spec = codec->spec; in cx_auto_parse_beep() 95 struct conexant_spec *spec = codec->spec; in cx_auto_parse_eapd() 103 spec->eapds[spec->num_eapds++] = nid; in cx_auto_parse_eapd() 104 if (spec->num_eapds >= ARRAY_SIZE(spec->eapds)) in cx_auto_parse_eapd() [all …]
|
/linux/sound/soc/qcom/ |
H A D | sdm845.c | 1 // SPDX-License-Identifier: GPL-2.0 6 #include <dt-bindings/sound/qcom,q6afe.h> 15 #include <uapi/linux/input-event-codes.h> 65 struct sdm845_snd_data *pdata = snd_soc_card_get_drvdata(rtd->card); in sdm845_slim_snd_hw_params() 73 substream->stream); in sdm845_slim_snd_hw_params() 74 if (sruntime != ERR_PTR(-ENOTSUPP)) in sdm845_slim_snd_hw_params() 75 pdata->sruntime[cpu_dai->id] = sruntime; in sdm845_slim_snd_hw_params() 80 if (ret != 0 && ret != -ENOTSUPP) { in sdm845_slim_snd_hw_params() 83 } else if (ret == -ENOTSUPP) { in sdm845_slim_snd_hw_params() 88 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in sdm845_slim_snd_hw_params() [all …]
|
/linux/sound/soc/tegra/ |
H A D | tegra_asoc_machine.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * tegra_asoc_machine.c - Universal ASoC machine driver for NVIDIA Tegra boards. 58 if (gpiod_get_value_cansleep(machine->gpiod_hp_det) && in coupled_mic_hp_check() 59 gpiod_get_value_cansleep(machine->gpiod_mic_det)) in coupled_mic_hp_check() 81 struct snd_soc_dapm_context *dapm = w->dapm; in tegra_machine_event() 82 struct tegra_machine *machine = snd_soc_card_get_drvdata(dapm->card); in tegra_machine_event() 84 if (!snd_soc_dapm_widget_name_cmp(w, "Int Spk") || in tegra_machine_event() 86 gpiod_set_value_cansleep(machine->gpiod_spkr_en, in tegra_machine_event() 91 gpiod_set_value_cansleep(machine->gpiod_ext_mic_en, in tegra_machine_event() 96 gpiod_set_value_cansleep(machine->gpiod_int_mic_en, in tegra_machine_event() [all …]
|