Home
last modified time | relevance | path

Searched +full:adc +full:- +full:mux (Results 1 – 25 of 223) sorted by relevance

123456789

/linux/sound/soc/codecs/
H A Drt5665.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rt5665.c -- RT5665/RT5658 ALSA SoC audio codec driver
26 #include <sound/soc-dapm.h>
884 static const DECLARE_TLV_DB_SCALE(hp_vol_tlv, -2250, 150, 0);
885 static const DECLARE_TLV_DB_SCALE(mono_vol_tlv, -1400, 150, 0);
886 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
887 static const DECLARE_TLV_DB_SCALE(dac_vol_tlv, -65625, 375, 0);
888 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
889 static const DECLARE_TLV_DB_SCALE(adc_vol_tlv, -17625, 375, 0);
891 static const DECLARE_TLV_DB_SCALE(in_bst_tlv, -1200, 75, 0);
[all …]
H A Drt5677.c1 // 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 Drt5645.c1 // 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 Drt715-sdca.c1 // SPDX-License-Identifier: GPL-2.0-only
3 // rt715-sdca.c -- rt715 ALSA SoC audio driver
25 #include <sound/soc-dapm.h>
30 #include "rt715-sdca.h"
35 struct regmap *regmap = rt715->mbq_regmap; in rt715_sdca_index_write()
43 dev_err(&rt715->slave->dev, in rt715_sdca_index_write()
53 struct regmap *regmap = rt715->mbq_regmap; in rt715_sdca_index_read()
61 dev_err(&rt715->slave->dev, in rt715_sdca_index_read()
92 ((abs(u_ctrl_val - vol_gain_sft) * RT715_SDCA_DB_STEP) << 8) / 1000; in rt715_sdca_vol_gain()
117 reg_val = ~(reg_val - 1) & 0xffff; in rt715_sdca_get_gain()
[all …]
H A Des8328.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * es8328.c -- ES8328 ALSA SoC Audio driver
5 * Copyright 2014 Sutajio Ko-Usagi PTE LTD
99 static const DECLARE_TLV_DB_SCALE(play_tlv, -3000, 100, 0);
100 static const DECLARE_TLV_DB_SCALE(dac_adc_tlv, -9600, 50, 0);
101 static const DECLARE_TLV_DB_SCALE(bypass_tlv, -1500, 300, 0);
123 if (es8328->deemph) { in es8328_set_deemph()
126 if (abs(deemph_settings[i].rate - es8328->playback_fs) < in es8328_set_deemph()
127 abs(deemph_settings[best].rate - es8328->playback_fs)) in es8328_set_deemph()
136 dev_dbg(component->dev, "Set deemphasis %d\n", val); in es8328_set_deemph()
[all …]
H A Drt721-sdca.c1 // SPDX-License-Identifier: GPL-2.0-only
3 // rt721-sdca.c -- rt721 SDCA ALSA SoC audio driver
23 #include <sound/soc-dapm.h>
26 #include "rt721-sdca.h"
27 #include "rt-sdw-common.h"
35 if (!rt721->hs_jack) in rt721_sdca_jack_detect_handler()
38 if (!rt721->component->card || !rt721->component->card->instantiated) in rt721_sdca_jack_detect_handler()
42 if (rt721->scp_sdca_stat1 & SDW_SCP_SDCA_INT_SDCA_0) { in rt721_sdca_jack_detect_handler()
43 rt721->jack_type = rt_sdca_headset_detect(rt721->regmap, in rt721_sdca_jack_detect_handler()
45 if (rt721->jack_type < 0) in rt721_sdca_jack_detect_handler()
[all …]
H A Drt5668.c1 // 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);
783 SOC_DAPM_ENUM("IF2 ADC Swap Mux", rt5668_if2_adc_enum);
786 SOC_DAPM_ENUM("IF1 01 ADC Swap Mux", rt5668_if1_01_adc_enum);
789 SOC_DAPM_ENUM("IF1 23 ADC Swap Mux", rt5668_if1_23_adc_enum);
792 SOC_DAPM_ENUM("IF1 45 ADC Swap Mux", rt5668_if1_45_adc_enum);
[all …]
H A Drt5682.c1 // 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);
787 SOC_DAPM_ENUM("IF2 ADC Swap Mux", rt5682_if2_adc_enum);
790 SOC_DAPM_ENUM("IF1 01 ADC Swap Mux", rt5682_if1_01_adc_enum);
793 SOC_DAPM_ENUM("IF1 23 ADC Swap Mux", rt5682_if1_23_adc_enum);
[all …]
H A Drt715.c1 // SPDX-License-Identifier: GPL-2.0
3 * rt715.c -- rt715 ALSA SoC audio driver
28 #include <sound/soc-dapm.h>
111 ret = regmap_read(rt715->regmap, addr_l, r_val); in rt715_get_gain()
118 ret = regmap_read(rt715->regmap, addr_h, l_val); in rt715_get_gain()
123 /* For Verb-Set Amplifier Gain (Verb ID = 3h) */
131 (struct soc_mixer_control *)kcontrol->private_value; in rt715_set_amp_gain_put()
138 if (ucontrol->value.integer.value[i] != rt715->kctl_2ch_vol_ori[i]) { in rt715_set_amp_gain_put()
145 addr_h = mc->reg; in rt715_set_amp_gain_put()
146 addr_l = mc->rreg; in rt715_set_amp_gain_put()
[all …]
H A Drt5640.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * rt5640.c -- RT5640/RT5639 ALSA SoC audio codec driver
27 #include <sound/soc-dapm.h>
340 static const DECLARE_TLV_DB_SCALE(out_vol_tlv, -4650, 150, 0);
341 static const DECLARE_TLV_DB_MINMAX(dac_vol_tlv, -6562, 0);
342 static const DECLARE_TLV_DB_SCALE(in_vol_tlv, -3450, 150, 0);
343 static const DECLARE_TLV_DB_MINMAX(adc_vol_tlv, -1762, 3000);
420 /* ADC Digital Volume Control */
421 SOC_DOUBLE("ADC Capture Switch", RT5640_ADC_DIG_VOL,
423 SOC_DOUBLE_TLV("ADC Capture Volume", RT5640_ADC_DIG_VOL,
[all …]
H A Des8311.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * es8311.c -- es8311 ALSA SoC audio driver
38 static const DECLARE_TLV_DB_SCALE(es8311_adc_vol_tlv, -9550, 50, 0);
68 0, 1, TLV_DB_SCALE_ITEM(-3010, 600, 0),
69 2, 3, TLV_DB_SCALE_ITEM(-2060, 250, 0),
70 4, 5, TLV_DB_SCALE_ITEM(-1610, 160, 0),
71 6, 7, TLV_DB_SCALE_ITEM(-1320, 120, 0),
72 8, 9, TLV_DB_SCALE_ITEM(-1100, 90, 0),
73 10, 11, TLV_DB_SCALE_ITEM(-930, 80, 0),
74 12, 15, TLV_DB_SCALE_ITEM(-780, 60, 0),
[all …]
H A Dak4619.c1 // SPDX-License-Identifier: GPL-2.0
3 * ak4619.c -- Asahi Kasei ALSA SoC Audio driver
39 #define ADC_DF 0x0a /* ADC Digital Filter Setting */
40 #define ADC_AI 0x0b /* ADC Analog Input Setting */
41 #define ADC_MHPF 0x0D /* ADC Mute & HPF Control */
47 #define DAC_DEMP 0x13 /* DAC De-Emphasis Setting */
91 /* ADC Digital Volume */
95 /* ADC Digital Filter Setting */
105 /* ADC Mute & HPF Control */
126 /* DAC De-Emphasis Setting */
[all …]
H A D88pm860x-codec.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * 88pm860x-codec.c -- 88PM860x ALSA SoC Audio Driver
26 #include "88pm860x-codec.h"
75 /* ADC Analog Register 1 (0xd0) */
117 * This widget should be just after DAC & PGA in DAPM power-on sequence and
118 * before DAC & PGA in DAPM power-off sequence.
149 /* -9450dB to 0dB in 150dB steps ( mute instead of -9450dB) */
150 static const DECLARE_TLV_DB_SCALE(dpga_tlv, -9450, 150, 1);
152 /* -9dB to 0db in 3dB steps */
153 static const DECLARE_TLV_DB_SCALE(adc_tlv, -900, 300, 0);
[all …]
H A Drt5682s.c1 // 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 Dmt6351.c1 // SPDX-License-Identifier: GPL-2.0
3 // mt6351.c -- mt6351 ALSA SoC audio codec driver
8 #include <linux/dma-mapping.h>
202 regmap_update_bits(cmpnt->regmap, MT6351_ZCD_CON2, in set_hp_gain_zero()
204 regmap_update_bits(cmpnt->regmap, MT6351_ZCD_CON2, in set_hp_gain_zero()
225 dev_warn(cmpnt->dev, "%s(), error rate %d, return 3", in get_cap_reg_val()
256 dev_warn(cmpnt->dev, "%s(), error rate %d, return 8", in get_play_reg_val()
266 struct snd_soc_component *cmpnt = dai->component; in mt6351_codec_dai_hw_params()
270 dev_dbg(priv->dev, "%s(), substream->stream %d, rate %d\n", in mt6351_codec_dai_hw_params()
271 __func__, substream->stream, rate); in mt6351_codec_dai_hw_params()
[all …]
H A Dwcd934x.c1 // SPDX-License-Identifier: GPL-2.0
6 #include <linux/clk-provider.h>
21 #include <sound/soc-dapm.h>
23 #include "wcd-clsh-v2.h"
24 #include "wcd-common.h"
25 #include "wcd-mbhc-v
3301 slim_rx_mux_to_dai_id(int mux) slim_rx_mux_to_dai_id() argument
[all...]
H A Drt700.c1 // 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 Dcs42l52.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * cs42l52.c -- CS42L52 ALSA SoC audio driver
29 #include <sound/soc-dapm.h>
43 /* MICA mode selection Differential or Single-ended */
46 /* MICB mode selection Differential or Single-ended */
80 { CS42L52_ADC_HPF_FREQ, 0x00 }, /* r0B ADC HPF Corner Freq */
81 { CS42L52_ADC_MISC_CTL, 0x00 }, /* r0C Misc. ADC Ctl */
147 static DECLARE_TLV_DB_SCALE(hl_tlv, -10200, 50, 0);
149 static DECLARE_TLV_DB_SCALE(hpd_tlv, -9600, 50, 1);
151 static DECLARE_TLV_DB_SCALE(ipd_tlv, -9600, 100, 0);
[all …]
/linux/sound/soc/sunxi/
H A Dsun8i-codec.c1 // SPDX-License-Identifier: GPL-2.0-or-later
6 * (C) Copyright 2010-2016
9 * Mylène Josserand <mylene.josserand@free-electrons.com>
27 #include <sound/soc-dapm.h>
251 ret = clk_prepare_enable(scodec->clk_bus); in sun8i_codec_runtime_resume()
257 regcache_cache_only(scodec->regmap, false); in sun8i_codec_runtime_resume()
259 ret = regcache_sync(scodec->regmap); in sun8i_codec_runtime_resume()
272 regcache_cache_only(scodec->regmap, true); in sun8i_codec_runtime_suspend()
273 regcache_mark_dirty(scodec->regmap); in sun8i_codec_runtime_suspend()
275 clk_disable_unprepare(scodec->clk_bus); in sun8i_codec_runtime_suspend()
[all …]
/linux/Documentation/devicetree/bindings/mux/
H A Dadi,adg792a.txt4 - compatible : "adi,adg792a" or "adi,adg792g"
5 - #mux-control-cells : <0> if parallel (the three muxes are bound together
6 with a single mux controller controlling all three muxes), or <1> if
7 not (one mux controller for each mux).
8 * Standard mux-controller bindings as described in mux-controller.yaml
11 - gpio-controller : if present, #gpio-cells below is required.
12 - #gpio-cells : should be <2>
13 - First cell is the GPO line number, i.e. 0 or 1
14 - Second cell is used to specify active high (0)
18 - idle-state : if present, array of states that the mux controllers will have
[all …]
H A Dmux-controller.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/mux/mux-controller.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Peter Rosin <peda@axentia.se>
13 A multiplexer (or mux) controller will have one, or several, consumer devices
14 that uses the mux controller. Thus, a mux controller can possibly control
16 multiplexer needed by each consumer, but a single mux controller can of course
19 A mux controller provides a number of states to its consumers, and the state
20 space is a simple zero-based enumeration. I.e. 0-1 for a 2-way multiplexer,
[all …]
/linux/arch/arm/boot/dts/aspeed/
H A Daspeed-bmc-ampere-mtjade.dts1 // SPDX-License-Identifier: GPL-2.0+
2 /dts-v1/;
3 #include "aspeed-g5.dtsi"
4 #include <dt-bindings/gpio/aspeed-gpio.h>
8 compatible = "ampere,mtjade-bmc", "aspeed,ast2500";
12 * i2c bus 50-57 assigned to NVMe slot 0-7
24 * i2c bus 60-67 assigned to NVMe slot 8-15
36 * i2c bus 70-77 assigned to NVMe slot 16-23
48 * i2c bus 80-81 assigned to NVMe M2 slot 0-1
60 stdout-path = &uart5;
[all …]
/linux/arch/arm/boot/dts/microchip/
H A Dat91-natte.dtsi1 // SPDX-License-Identifier: GPL-2.0+
3 * at91-natte.dts - Device Tree include file for the Natte board
11 mux: mux-controller { label
12 compatible = "gpio-mux";
13 #mux-control-cells = <0>;
15 mux-gpios = <&ioexp 0 GPIO_ACTIVE_HIGH>,
20 batntc-mux {
21 compatible = "io-channel-mux";
22 io-channels = <&adc 5>;
23 io-channel-names = "parent";
[all …]
/linux/sound/pci/emu10k1/
H A Dp17v.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright (c) by James Courtier-Dutton <James@superbug.demon.co.uk>
8 /* Audigy2Value Tina (P17V) pointer-offset register set, */
12 /* 00 - 07: Not used */
16 /* 09 - 12: Not used */
20 /* 14 - 17: Not used */
24 /* 1b - 1f: Not used */
25 /* 20 - 2f: Not used */
26 /* 30 - 3b: Not used */
39 #define I2C_A_ADC_ADD 0x00000034 /*This is the Device address for ADC */
[all …]
/linux/Documentation/devicetree/bindings/iio/multiplexer/
H A Dio-channel-mux.yaml1 # SPDX-License-Identifier: GPL-2.0
3 ---
4 $id: http://devicetree.org/schemas/iio/multiplexer/io-channel-mux.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
10 - Peter Rosin <peda@axentia.se>
14 e.g. an ADC channel, these bindings describe that situation.
16 For each non-empty string in the channels property, an io-channel will be
17 created. The number of this io-channel is the same as the index into the list
18 of strings in the channels property, and also matches the mux controller
19 state. The mux controller state is described in
[all …]

123456789