Home
last modified time | relevance | path

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

1234567

/linux/sound/soc/codecs/
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 Dcs35l41.c1 // SPDX-License-Identifier: GPL-2.0
3 // cs35l41.c -- CS35l41 ALSA SoC audio driver
5 // Copyright 2017-2021 Cirrus Logic, Inc.
22 #include <sound/soc-dapm.h>
33 int freq; member
105 int freq; member
155 static int cs35l41_get_fs_mon_config_index(int freq) in cs35l41_get_fs_mon_config_index() argument
160 if (cs35l41_fs_mon[i].freq == freq) in cs35l41_get_fs_mon_config_index()
164 return -EINVAL; in cs35l41_get_fs_mon_config_index()
169 1, 913, TLV_DB_MINMAX_ITEM(-10200, 1200));
[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 */
49 /* Charge Pump Freq. Check datasheet Pg73 */
80 { CS42L52_ADC_HPF_FREQ, 0x00 }, /* r0B ADC HPF Corner Freq */
81 { CS42L52_ADC_MISC_CTL, 0x00 }, /* r0C Misc. ADC Ctl */
97 { CS42L52_BEEP_FREQ, 0x00 }, /* r1C Beep Freq on Time */
147 static DECLARE_TLV_DB_SCALE(hl_tlv, -10200, 50, 0);
[all …]
H A Dmax9867.c1 // SPDX-License-Identifier: GPL-2.0
5 // Copyright 2013-2015 Maxim Integrated Products
6 // Copyright 2018 Ladislav Michl <ladis@linux-mips.org>
42 "Butterworth/8-24"
55 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in max9867_adc_dac_event()
71 max9867->adc_dac_active |= BIT(adc_dac); in max9867_adc_dac_event()
73 max9867->adc_dac_active &= ~BIT(adc_dac); in max9867_adc_dac_event()
86 ret = regmap_read(max9867->regmap, MAX9867_CODECFLTR, &reg); in max9867_filter_get()
88 return -EINVAL; in max9867_filter_get()
91 ucontrol->value.enumerated.item[0] = 1; in max9867_filter_get()
[all …]
H A Des8316.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * es8316.c -- es8316 ALSA SoC audio driver
6 * Authors: David Yang <yangxiaohua@everest-semi.com>,
21 #include <sound/soc-dapm.h>
52 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(dac_vol_tlv, -9600, 50, 1);
53 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(adc_vol_tlv, -9600, 50, 1);
54 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_max_gain_tlv, -650, 150, 0);
55 static const SNDRV_CTL_TLVD_DECLARE_DB_SCALE(alc_min_gain_tlv, -1200, 150, 0);
58 0, 10, TLV_DB_SCALE_ITEM(-1650, 150, 0),
59 11, 11, TLV_DB_SCALE_ITEM(-150, 0, 0),
[all …]
H A Dad193x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
30 * AD193X volume/mute/de-emphasis etc. controls
37 static const DECLARE_TLV_DB_MINMAX(adau193x_tlv, -9563, 0);
67 /* DAC de-emphasis */
72 /* ADC switch control */
78 /* ADC high-pass filter */
79 SOC_SINGLE("ADC High Pass Filter Switch", AD193X_ADC_CTRL0,
96 SND_SOC_DAPM_ADC("ADC", "Capture", SND_SOC_NOPM, 0, 0),
105 struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); in ad193x_check_pll()
108 return !!ad193x->sysclk; in ad193x_check_pll()
[all …]
H A Dcs35l36.c1 // SPDX-License-Identifier: GPL-2.0
3 // cs35l36.c -- CS35L36 ALSA SoC audio driver
27 #include <sound/soc-dapm.h>
60 int freq; member
446 TLV_DB_MINMAX_ITEM(-10200, 1200));
463 ucontrol->value.integer.value[0] = cs35l36->ldm_mode_sel; in cs35l36_ldm_sel_get()
475 int val = (ucontrol->value.integer.value[0]) ? CS35L36_NG_AMP_EN_MASK : in cs35l36_ldm_sel_put()
478 cs35l36->ldm_mode_sel = val; in cs35l36_ldm_sel_put()
480 regmap_update_bits(cs35l36->regmap, CS35L36_NG_CFG, in cs35l36_ldm_sel_put()
492 SOC_SINGLE("Amp Gain Zero-Cross Switch", CS35L36_AMP_GAIN_CTRL,
[all …]
H A Dda7213.c1 // SPDX-License-Identifier: GPL-2.0-or-later
34 /* -54dB */
35 0x0, 0x11, TLV_DB_SCALE_ITEM(-5400, 0, 0),
36 /* -52.5dB to 15dB */
37 0x12, 0x3f, TLV_DB_SCALE_ITEM(-5250, 150, 0)
42 /* -78dB to 12dB */
43 0x08, 0x7f, TLV_DB_SCALE_ITEM(-7800, 75, 0)
52 static const DECLARE_TLV_DB_SCALE(mic_vol_tlv, -600, 600, 0);
53 static const DECLARE_TLV_DB_SCALE(mixin_gain_tlv, -450, 150, 0);
54 static const DECLARE_TLV_DB_SCALE(eq_gain_tlv, -1050, 150, 0);
[all …]
H A Dmc13783.c1 // SPDX-License-Identifier: GPL-2.0-or-later
20 #include <sound/soc-dapm.h>
97 struct snd_soc_component *component = dai->component; in mc13783_pcm_hw_params_dac()
109 return -EINVAL; in mc13783_pcm_hw_params_dac()
116 struct snd_soc_component *component = dai->component; in mc13783_pcm_hw_params_codec()
128 return -EINVAL; in mc13783_pcm_hw_params_codec()
141 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) in mc13783_pcm_hw_params_sync()
150 struct snd_soc_component *component = dai->component; in mc13783_set_fmt()
165 return -EINVAL; in mc13783_set_fmt()
192 return -EINVAL; in mc13783_set_fmt()
[all …]
H A Dtwl4030.c1 // SPDX-License-Identifier: GPL-2.0-only
13 #include <linux/mfd/twl4030-audio.h>
64 u8 ctl_cache[TWL4030_REG_PRECKR_CTL - TWL4030_REG_EAR_CTL + 1];
76 twl4030->ctl_cache[i - TWL4030_REG_EAR_CTL] = byte; in tw4030_init_ctl_cache()
86 return -EIO; in twl4030_read()
95 value = twl4030->ctl_cache[reg - TWL4030_REG_EAR_CTL]; in twl4030_read()
113 if (twl4030->earpiece_enabled) in twl4030_can_write_to_chip()
117 if (twl4030->predrivel_enabled) in twl4030_can_write_to_chip()
121 if (twl4030->predriver_enabled) in twl4030_can_write_to_chip()
125 if (twl4030->carkitl_enabled) in twl4030_can_write_to_chip()
[all …]
H A Dcs42l56.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * cs42l56.c -- CS42L56 ALSA SoC audio driver
30 #include <sound/soc-dapm.h>
43 /* Analog Input 1A Reference 0=Single 1=Pseudo-Differential */
46 /* Analog Input 2A Reference 0=Single 1=Pseudo-Differential */
49 /* Analog Input 1B Reference 0=Single 1=Pseudo-Differential */
52 /* Analog Input 2B Reference 0=Single 1=Pseudo-Differential */
55 /* Charge Pump Freq. Check datasheet Pg62 */
95 { 3, 0x7f }, /* r03 - Power Ctl 1 */
96 { 4, 0xff }, /* r04 - Power Ctl 2 */
[all …]
H A Drt5514.c1 // 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 Dpcm3060.c1 // SPDX-License-Identifier: GPL-2.0
17 unsigned int freq, int dir) in pcm3060_set_sysclk() argument
19 struct snd_soc_component *comp = dai->component; in pcm3060_set_sysclk()
25 dev_err(comp->dev, "unsupported sysclock dir: %d\n", dir); in pcm3060_set_sysclk()
26 return -EINVAL; in pcm3060_set_sysclk()
35 val = (dai->id == PCM3060_DAI_ID_DAC ? PCM3060_REG_CSEL : 0); in pcm3060_set_sysclk()
39 val = (dai->id == PCM3060_DAI_ID_DAC ? 0 : PCM3060_REG_CSEL); in pcm3060_set_sysclk()
43 dev_err(comp->dev, "unsupported sysclock id: %d\n", clk_id); in pcm3060_set_sysclk()
44 return -EINVAL; in pcm3060_set_sysclk()
47 if (dai->id == PCM3060_DAI_ID_DAC) in pcm3060_set_sysclk()
[all …]
H A Dadav80x.c1 // SPDX-License-Identifier: GPL-2.0-or-later
7 * Author: Lars-Peter Clausen <lars@metafoo.de>
113 #define ADAV80X_PLL_OUTE_SYSCLKPD(x) BIT(2 - (x))
155 "ADC",
185 SND_SOC_DAPM_ADC("ADC", NULL, ADAV80X_ADC_CTRL1, 5, 1),
214 struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); in adav80x_dapm_sysclk_check()
218 switch (adav80x->clk_src) { in adav80x_dapm_sysclk_check()
238 struct snd_soc_component *component = snd_soc_dapm_to_component(source->dapm); in adav80x_dapm_pll_check()
241 return adav80x->pll_src == ADAV80X_PLL_SRC_XTAL; in adav80x_dapm_pll_check()
246 { "DAC Select", "ADC", "ADC" },
[all …]
H A Des7241.c1 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
39 gpiod_set_value_cansleep(priv->reset, 0); in es7241_set_mode()
42 gpiod_set_value_cansleep(priv->m0, m0); in es7241_set_mode()
43 gpiod_set_value_cansleep(priv->m1, m1); in es7241_set_mode()
45 /* take the device out of reset - datasheet does not specify a delay */ in es7241_set_mode()
46 gpiod_set_value_cansleep(priv->reset, 1); in es7241_set_mode()
58 for (j = 0; j < mode->slv_mfs_num; j++) { in es7241_set_consumer_mode()
59 if (mode->slv_mfs[j] == mfs) in es7241_set_consumer_mode()
63 return -EINVAL; in es7241_set_consumer_mode()
78 if (mfs && mfs != mode->mst_mfs) in es7241_set_provider_mode()
[all …]
H A Dssm2602.c1 // SPDX-License-Identifier: GPL-2.0-or-later
85 48, 127, TLV_DB_SCALE_ITEM(-7400, 100, 0)
88 static const DECLARE_TLV_DB_SCALE(ssm260x_inpga_tlv, -3450, 150, 0);
89 static const DECLARE_TLV_DB_SCALE(ssm260x_sidetone_tlv, -1500, 300, 0);
96 SOC_SINGLE("ADC High Pass Filter Switch", SSM2602_APDIGI, 0, 1, 1),
99 SOC_ENUM("Playback De-emphasis", ssm2602_enum[1]),
136 * is activated too early, or even before the ADC is powered up, audible in ssm2602_mic_switch_event()
148 SND_SOC_DAPM_ADC("ADC", "HiFi Capture", SSM2602_PWR, 2, 1),
178 ARRAY_SIZE(ssm260x_output_mixer_controls) - 1), /* Last element is the mic */
183 {"ADC", NULL, "Digital Core Power"},
[all …]
H A Dwm8731.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8731.c -- WM8731 ALSA SoC Audio driver
6 * Copyright 2006-12 Wolfson Microelectronics, plc
76 if (wm8731->deemph) { in wm8731_set_deemph()
79 if (abs(wm8731_deemph[i] - wm8731->playback_fs) < in wm8731_set_deemph()
80 abs(wm8731_deemph[best] - wm8731->playback_fs)) in wm8731_set_deemph()
90 dev_dbg(component->dev, "Set deemphasis %d (%dHz)\n", in wm8731_set_deemph()
102 ucontrol->value.integer.value[0] = wm8731->deemph; in wm8731_get_deemph()
112 unsigned int deemph = ucontrol->value.integer.value[0]; in wm8731_put_deemph()
116 return -EINVAL; in wm8731_put_deemph()
[all …]
H A Dtlv320aic23.c1 // SPDX-License-Identifier: GPL-2.0-only
73 static const DECLARE_TLV_DB_SCALE(out_gain_tlv, -12100, 100, 0);
74 static const DECLARE_TLV_DB_SCALE(input_gain_tlv, -1725, 75, 0);
75 static const DECLARE_TLV_DB_SCALE(sidetone_vol_tlv, -1800, 300, 0);
83 val = (ucontrol->value.integer.value[0] & 0x07); in snd_soc_tlv320aic23_put_volsw()
86 * 000 = -6db in snd_soc_tlv320aic23_put_volsw()
87 * 001 = -9db in snd_soc_tlv320aic23_put_volsw()
88 * 010 = -12db in snd_soc_tlv320aic23_put_volsw()
89 * 011 = -18db (Min) in snd_soc_tlv320aic23_put_volsw()
92 val = (val >= 4) ? 4 : (3 - val); in snd_soc_tlv320aic23_put_volsw()
[all …]
H A Dtscs42xx.c1 // SPDX-License-Identifier: GPL-2.0
2 // tscs42xx.c -- TSCS42xx ALSA SoC Audio driver
19 #include <sound/soc-dapm.h>
108 dev_err(component->dev, in plls_locked()
115 } while (count--); in plls_locked()
135 return -EINVAL; in sample_rate_to_pll_freq_out()
153 dev_err(component->dev, in write_coeff_ram()
162 ret = -EIO; in write_coeff_ram()
163 dev_err(component->dev, in write_coeff_ram()
168 ret = regmap_write(tscs42xx->regmap, R_DACCRADDR, addr); in write_coeff_ram()
[all …]
/linux/drivers/media/dvb-frontends/
H A Ddib0070.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Linux-DVB Driver for DiBcom's DiB0070 base-band RF Tuner.
5 * Copyright (C) 2005-9 DiBcom (http://www.dibcom.fr/)
73 if (mutex_lock_interruptible(&state->i2c_buffer_lock) < 0) { in dib0070_read_reg()
78 state->i2c_write_buffer[0] = reg; in dib0070_read_reg()
80 memset(state->msg, 0, 2 * sizeof(struct i2c_msg)); in dib0070_read_reg()
81 state->msg[0].addr = state->cfg->i2c_address; in dib0070_read_reg()
82 state->msg[0].flags = 0; in dib0070_read_reg()
83 state->msg[0].buf = state->i2c_write_buffer; in dib0070_read_reg()
84 state->msg[0].len = 1; in dib0070_read_reg()
[all …]
/linux/drivers/media/tuners/
H A Dmax2165.c1 // SPDX-License-Identifier: GPL-2.0-or-later
20 #include "tuner-i2c.h"
38 msg.addr = priv->config->i2c_address; in max2165_write_reg()
43 ret = i2c_transfer(priv->i2c, &msg, 1); in max2165_write_reg()
49 return (ret != 1) ? -EIO : 0; in max2165_write_reg()
55 u8 dev_addr = priv->config->i2c_address; in max2165_read_reg()
64 ret = i2c_transfer(priv->i2c, msg, 2); in max2165_read_reg()
67 return -EIO; in max2165_read_reg()
104 priv->tf_ntch_low_cfg = dat[0] >> 4; in max2165_read_rom_table()
105 priv->tf_ntch_hi_cfg = dat[0] & 0x0F; in max2165_read_rom_table()
[all …]
/linux/Documentation/devicetree/bindings/mfd/
H A Dst,stmpe.yaml1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
3 ---
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
11 touchscreen, ADC, PWM or rotator. It can contain one or several different
15 - Linus Walleij <linus.walleij@linaro.org>
18 - $ref: /schemas/spi/spi-peripheral-props.yaml#
23 - st,stmpe601
24 - st,stmpe801
25 - st,stmpe811
26 - st,stmpe1600
[all …]
/linux/drivers/media/i2c/
H A Dmax2175.c1 // SPDX-License-Identifier: GPL-2.0
23 #include <media/v4l2-ctrls.h>
24 #include <media/v4l2-device.h>
30 #define mxm_dbg(ctx, fmt, arg...) dev_dbg(&ctx->client->dev, fmt, ## arg)
31 #define mxm_err(ctx, fmt, arg...) dev_err(&ctx->client->dev, fmt, ## arg)
36 u32 freq; /* Default freq in Hz */ member
264 struct v4l2_subdev sd; /* Sub-device */
273 struct v4l2_ctrl *hsls; /* High-side/Low-side polarity */
280 u32 freq; /* Tuned freq In Hz */ member
285 unsigned long xtal_freq; /* Ref Oscillator freq in Hz */
[all …]
/linux/arch/arm64/boot/dts/allwinner/
H A Daxp803.dtsi1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
10 interrupt-controller;
11 #interrupt-cells = <1>;
13 ac_power_supply: ac-power {
14 compatible = "x-powers,axp803-ac-power-supply",
15 "x-powers,axp813-ac-power-supply";
19 axp_adc: adc {
20 compatible = "x-powers,axp803-adc", "x-powers,axp813-adc";
21 #io-channel-cells = <1>;
25 compatible = "x-powers,axp803-gpio", "x-powers,axp813-gpio";
[all …]
/linux/drivers/iio/adc/
H A Dstm32-dfsdm-adc.c1 // SPDX-License-Identifier: GPL-2.0
3 * This file is the ADC part of the STM32 DFSDM driver
5 * Copyright (C) 2017, STMicroelectronics - All Rights Reserved
10 #include <linux/dma-mapping.h>
11 #include <linux/iio/adc/stm32-dfsdm-adc.h>
14 #include <linux/iio/hw-consumer.h>
16 #include <linux/iio/timer/stm32-lptim-trigger.h>
17 #include <linux/iio/timer/stm32-timer-trigger.h>
29 #include "stm32-dfsdm.h"
44 /* Limit filter output resolution to 31 bits. (i.e. sample range is +/-2^30) */
[all …]

1234567