Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/codecs/wm8955.c
static int wm8955_pll_factors(struct device *dev, int Fref, int Fout, struct pll_factors *pll) { u64 Kpart; unsigned int K, Ndiv, Nmod, target; dev_dbg(dev, "Fref=%u Fout=%u\n", Fref, Fout); target = Fout * 4; if (target < 90000000) { pll->outdiv = 1; target *= 2; } e...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8955.c
static int wm8955_set_deemph(struct snd_soc_component *component) { struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); int val, i, best; if (wm8955->deemph) { best = 1; for (i = 2; i < ARRAY_SIZE(deemph_settings); i++) { if (abs(deemph_settings[i] - wm8955->fs) < abs(d...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8955.c
static int wm8955_get_deemph(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); ucontrol->value.integer.value[0] = wm...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8955.c
static int wm8955_put_deemph(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8955_priv *wm8955 = snd_soc_component_get_drvdata(component); unsigned int deemph = ucontrol->value....
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8958-dsp2.c
static int wm8958_put_vss_hpf_enum(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); struct wm8994 *control = wm...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8958-dsp2.c
static int wm8958_vss_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int vss = kcontrol->private_value; struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); if (wm...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8958-dsp2.c
static int wm8958_put_enh_eq_enum(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); struct wm8994 *control = wm89...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8958-dsp2.c
static int wm8958_enh_eq_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int eq = kcontrol->private_value; struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); i...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8958-dsp2.c
static void wm8958_enh_eq_loaded(const struct firmware *fw, void *context) { struct snd_soc_component *component = context; struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); if (fw && (wm8958_dsp2_fw(component, "ENH_EQ", fw, true) == 0)) { mutex_lock(&wm8994->fw_lock); wm8994->enh_e...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8958-dsp2.c
static void wm8958_mbc_loaded(const struct firmware *fw, void *context) { struct snd_soc_component *component = context; struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); if (fw && (wm8958_dsp2_fw(component, "MBC", fw, true) == 0)) { mutex_lock(&wm8994->fw_lock); wm8994->mbc = fw; ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_set_deemph(struct snd_soc_component *component) { struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(component); int val, i, best; if (wm8960->deemph) { best = 1; for (i = 2; i < ARRAY_SIZE(deemph_settings); i++) { if (abs(deemph_settings[i] - wm8960->lrclk) < ab...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_add_widgets(struct snd_soc_component *component) { struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(component); struct wm8960_data *pdata = &wm8960->pdata; struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct snd_soc_dapm_widget *w; snd_soc_dapm_new_co...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_component *component = codec_dai->component; u16 iface = 0; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: iface |= 0x0040; break; case SND_SOC_DAIFMT_CBS_CFS: break; defaul...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_configure_sysclk(struct wm8960_priv *wm8960, int mclk, int *sysclk_idx, int *dac_idx, int *bclk_idx) { int sysclk, bclk, lrclk; int i, j, k; int diff; *bclk_idx = -1; bclk = wm8960->bclk; lrclk = wm8960->lrclk; /* c...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_hw_free(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(component); bool tx = substream->stream == SNDRV_PCM_STREAM_PLAYBACK; wm8960->is_...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_mute(struct snd_soc_dai *dai, int mute, int direction) { struct snd_soc_component *component = dai->component; if (mute) snd_soc_component_update_bits(component, WM8960_DACCTL1, 0x8, 0x8); else snd_soc_component_update_bits(component, WM8960_DACCTL1, 0x8, 0); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static bool is_pll_freq_available(unsigned int source, unsigned int target) { unsigned int Ndiv; if (source == 0 || target == 0) return false; target *= 4; Ndiv = target / source; if (Ndiv < 6) { source >>= 1; Ndiv = target / source; } if ((Ndiv < 6) || (Ndiv > 12)) return false; re...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_set_pll(struct snd_soc_component *component, unsigned int freq_in, unsigned int freq_out) { u16 reg; static struct _pll_div pll_div; int ret; if (freq_in && freq_out) { ret = pll_factors(freq_in, freq_out, &pll_div); if (ret != 0) return ret; } snd...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, int source, unsigned int freq_in, unsigned int freq_out) { struct snd_soc_component *component = codec_dai->component; struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(comp...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8960.c
static int wm8960_probe(struct snd_soc_component *component) { struct wm8960_priv *wm8960 = snd_soc_component_get_drvdata(component); struct wm8960_data *pdata = &wm8960->pdata; if (pdata->capless) wm8960->set_bias_level = wm8960_set_bias_level_capless; else wm8960->set_bias_level = wm8960_set_bias_le...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8961.c
static int wm8961_set_tristate(struct snd_soc_dai *dai, int tristate) { struct snd_soc_component *component = dai->component; u16 reg = snd_soc_component_read(component, WM8961_ADDITIONAL_CONTROL_2); if (tristate) reg |= WM8961_TRIS; else reg &= ~WM8961_TRIS; return snd_soc_component_write(componen...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static bool wm8962_volatile_register(struct device *dev, unsigned int reg) { switch (reg) { case WM8962_CLOCKING1: case WM8962_SOFTWARE_RESET: case WM8962_THERMAL_SHUTDOWN_STATUS: case WM8962_ADDITIONAL_CONTROL_4: case WM8962_DC_SERVO_6: case WM8962_INTERRUPT_STATUS_1: case WM8962_INTERRUPT_STATUS_2: ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static int wm8962_dsp2_ena_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { int shift = kcontrol->private_value; struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static int cp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { switch (event) { case SND_SOC_DAPM_POST_PMU: msleep(5); break; default: WARN(1, "Invalid event %d\n", event); return -EINVAL; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static int wm8962_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component); int i;...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
int wm8962_mic_detect(struct snd_soc_component *component, struct snd_soc_jack *jack) { struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component); struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); int irq_mask, enable; wm8962->jack = jack; if (jack) ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static int wm8962_gpio_direction_out(struct gpio_chip *chip, unsigned offset, int value) { struct wm8962_priv *wm8962 = gpiochip_get_data(chip); struct snd_soc_component *component = wm8962->component; int ret, val; val = (1 << WM8962_GP2_FN_SHIFT) | (value << WM8962_GP2_LV...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static void wm8962_init_gpio(struct snd_soc_component *component) { struct wm8962_priv *wm8962 = snd_soc_component_get_drvdata(component); struct wm8962_pdata *pdata = &wm8962->pdata; int ret; wm8962->gpio_chip = wm8962_template_chip; wm8962->gpio_chip.ngpio = WM8962_MAX_GPIO; wm8962->gpio_chip.parent = c...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8962.c
static int wm8962_set_pdata_from_of(struct i2c_client *i2c, struct wm8962_pdata *pdata) { const struct device_node *np = i2c->dev.of_node; u32 val32; int i; if (of_property_read_bool(np, "spk-mono")) pdata->spk_mono = true; if (of_property_read_u32(np, "mic-cfg", &val...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8971.c
static int get_coeff(int mclk, int rate) { int i; for (i = 0; i < ARRAY_SIZE(coeff_div); i++) { if (coeff_div[i].rate == rate && coeff_div[i].mclk == mclk) return i; } return -EINVAL; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8971.c
static int wm8971_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_component *component = codec_dai->component; u16 iface = 0; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: iface = 0x0040; break; case SND_SOC_DAIFMT_CBS_CFS: break; default...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8971.c
static int wm8971_pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct wm8971_priv *wm8971 = snd_soc_component_get_drvdata(component...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8974.c
static int wm8974_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_component *component = dai->component; struct wm8974_priv *priv = snd_soc_component_get_drvdata(component); if (dir != SND_SOC_CLOCK_IN) return -EINVAL; priv...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8974.c
static int wm8974_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { u16 power1 = snd_soc_component_read(component, WM8974_POWER1) & ~0x3; switch (level) { case SND_SOC_BIAS_ON: case SND_SOC_BIAS_PREPARE: power1 |= 0x1; snd_soc_componen...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8974.c
static int wm8974_probe(struct snd_soc_component *component) { int ret = 0; ret = wm8974_reset(component); if (ret < 0) { dev_err(component->dev, "Failed to issue reset\n"); return ret; } return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8978.c
static int wm8978_enum_mclk(unsigned int f_out, unsigned int f_mclk, unsigned int *f_pllout) { int i; for (i = 0; i < ARRAY_SIZE(mclk_numerator); i++) { unsigned int f_pllout_x4 = 4 * f_out * mclk_numerator[i] / mclk_denominator[i]; if (3 * f_mclk <= f_pllout_x4 && f_pll...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8978.c
static int wm8978_set_dai_clkdiv(struct snd_soc_dai *codec_dai, int div_id, int div) { struct snd_soc_component *component = codec_dai->component; struct wm8978_priv *wm8978 = snd_soc_component_get_drvdata(component); int ret = 0; switch (div_id) { case WM8978_OPCLKRATE: ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8983.c
static int eqmode_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); unsigned int regpwr2, regpwr3; unsigned int reg_eq; if (ucontrol->value.enumerated.item[0] != 0 && ucontrol->value....
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8983.c
static int wm8983_dac_mute(struct snd_soc_dai *dai, int mute, int direction) { struct snd_soc_component *component = dai->component; return snd_soc_component_update_bits(component, WM8983_DAC_CONTROL, WM8983_SOFTMUTE_MASK, !!mute << WM8...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8983.c
static int pll_factors(struct pll_div *pll_div, unsigned int target, unsigned int source) { u64 Kpart; unsigned long int K, Ndiv, Nmod; pll_div->div2 = 0; Ndiv = target / source; if (Ndiv < 6) { source >>= 1; pll_div->div2 = 1; Ndiv = target / source; } if (Ndiv < 6 ||...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8983.c
static int __init wm8983_modinit(void) { int ret = 0; #if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&wm8983_i2c_driver); if (ret) { printk(KERN_ERR "Failed to register wm8983 I2C driver: %d\n", ret); } #endif #if defined(CONFIG_SPI_MASTER) ret = spi_register_driver(&wm8983_spi_driver); if (ret != 0)...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8985.c
static int eqmode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); unsigned int reg; reg = snd_soc_component_read(component, WM8985_EQ1_LOW_SHELF); if (reg & WM8985_EQ3DMODE) ucontrol...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8985.c
static int wm8985_spi_probe(struct spi_device *spi) { struct wm8985_priv *wm8985; int ret; wm8985 = devm_kzalloc(&spi->dev, sizeof *wm8985, GFP_KERNEL); if (!wm8985) return -ENOMEM; spi_set_drvdata(spi, wm8985); wm8985->dev_type = WM8985; wm8985->regmap = devm_regmap_init_spi(spi, &wm8985_regmap);...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8985.c
static int wm8985_i2c_probe(struct i2c_client *i2c) { struct wm8985_priv *wm8985; const struct i2c_device_id *id = i2c_match_id(wm8985_i2c_id, i2c); int ret; wm8985 = devm_kzalloc(&i2c->dev, sizeof *wm8985, GFP_KERNEL); if (!wm8985) return -ENOMEM; i2c_set_clientdata(i2c, wm8985); wm8985->dev_type...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8985.c
static int __init wm8985_modinit(void) { int ret = 0; #if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&wm8985_i2c_driver); if (ret) { printk(KERN_ERR "Failed to register wm8985 I2C driver: %d\n", ret); } #endif #if defined(CONFIG_SPI_MASTER) ret = spi_register_driver(&wm8985_spi_driver); if (ret != 0)...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8988.c
static bool wm8988_writeable(struct device *dev, unsigned int reg) { switch (reg) { case WM8988_LINVOL: case WM8988_RINVOL: case WM8988_LOUT1V: case WM8988_ROUT1V: case WM8988_ADCDAC: case WM8988_IFACE: case WM8988_SRATE: case WM8988_LDAC: case WM8988_RDAC: case WM8988_BASS: case WM8988_TREBLE:...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8988.c
static int wm8988_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_component *component = codec_dai->component; u16 iface = 0; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: iface = 0x0040; break; case SND_SOC_DAIFMT_CBS_CFS: break; default...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8988.c
static int wm8988_mute(struct snd_soc_dai *dai, int mute, int direction) { struct snd_soc_component *component = dai->component; u16 mute_reg = snd_soc_component_read(component, WM8988_ADCDAC) & 0xfff7; if (mute) snd_soc_component_write(component, WM8988_ADCDAC, mute_reg | 0x8); else snd_soc_component...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8988.c
static int __init wm8988_modinit(void) { int ret = 0; #if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&wm8988_i2c_driver); if (ret != 0) { printk(KERN_ERR "Failed to register WM8988 I2C driver: %d\n", ret); } #endif #if defined(CONFIG_SPI_MASTER) ret = spi_register_driver(&wm8988_spi_driver); if (ret !...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8990.c
static int wm8990_set_dai_sysclk(struct snd_soc_dai *codec_dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_component *component = codec_dai->component; struct wm8990_priv *wm8990 = snd_soc_component_get_drvdata(component); wm8990->sysclk = freq; return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8991.c
static int wm899x_outpga_put_volsw_vu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); int reg = kcontrol->private_value & 0xff; int ret; u16 val; ret = snd_soc_put_volsw(kco...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8991.c
static int wm8991_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_component *component = codec_dai->component; u16 audio1, audio3; audio1 = snd_soc_component_read(component, WM8991_AUDIO_INTERFACE_1); audio3 = snd_soc_component_read(component, WM8991_AUDIO_INTERFACE_3); switch ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8991.c
static int wm8991_set_dai_clkdiv(struct snd_soc_dai *codec_dai, int div_id, int div) { struct snd_soc_component *component = codec_dai->component; u16 reg; switch (div_id) { case WM8991_MCLK_DIV: reg = snd_soc_component_read(component, WM8991_CLOCKING_2) & ~WM899...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8993.c
static int configure_clock(struct snd_soc_component *component) { struct wm8993_priv *wm8993 = snd_soc_component_get_drvdata(component); unsigned int reg; switch (wm8993->sysclk_source) { case WM8993_SYSCLK_MCLK: dev_dbg(component->dev, "Using %dHz MCLK\n", wm8993->mclk_rate); reg = snd_soc_component_...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8993.c
static int clk_sys_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: return configure_clock(component); case SND_SOC_DAPM_POST_PMD:...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int configure_aif_clock(struct snd_soc_component *component, int aif) { struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); int rate; int reg1 = 0; int offset; if (aif) offset = 4; else offset = 0; switch (wm8994->sysclk[aif]) { case WM8994_SYSCLK_MCLK1: rate = w...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int configure_clock(struct snd_soc_component *component) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); int change, new; configure_aif_clock(component, 0); configure_aif_clock(component, 1); /* Then...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_put_drc_sw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); int mask, ret; if...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_get_drc(const char *name) { if (strcmp(name, "AIF1DRC1 Mode") == 0) return 0; if (strcmp(name, "AIF1DRC2 Mode") == 0) return 1; if (strcmp(name, "AIF2DRC Mode") == 0) return 2; return -EINVAL; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_get_retune_mobile_block(const char *name) { if (strcmp(name, "AIF1.1 EQ Mode") == 0) return 0; if (strcmp(name, "AIF1.2 EQ Mode") == 0) return 1; if (strcmp(name, "AIF2 EQ Mode") == 0) return 2; return -EINVAL; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int vmid_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); switch (event) { case SND_SOC_DAPM_PRE_PMU: vmid_reference(component); break; case SND_SOC_DAPM_POST_PMD: ...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static bool wm8994_check_class_w_digital(struct snd_soc_component *component) { int source = 0; int reg, reg_r; /* We also need the same AIF source for L/R and only one path */ reg = snd_soc_component_read(component, WM8994_DAC1_LEFT_MIXER_ROUTING); switch (reg) { case WM8994_AIF2DACL_TO_DAC1L: dev_vdb...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static void wm8994_update_vu_bits(struct snd_soc_component *component) { struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); struct wm8994 *control = wm8994->wm8994; int i; for (i = 0; i < ARRAY_SIZE(wm8994_vu_bits); i++) snd_soc_component_write( component, wm8994_vu_bits[i].reg...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int aif2clk_late_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); switch (event) { case SND_SOC_DAPM_P...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_set_fll(struct snd_soc_dai *dai, int id, int src, unsigned int freq_in, unsigned int freq_out) { return _wm8994_set_fll(dai->component, id, src, freq_in, freq_out); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_set_mclk_rate(struct wm8994_priv *wm8994, unsigned int id, unsigned int *freq) { int ret; if (!wm8994->mclk[id].clk || *freq == wm8994->mclk_rate[id]) return 0; ret = clk_set_rate(wm8994->mclk[id].clk, *freq); if (ret < 0) return ret; *freq = clk_g...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
int wm8994_vmid_mode(struct snd_soc_component *component, enum wm8994_vmid_mode mode) { struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); switch (mode) { case WM8994_VMID_NORMAL: snd_soc_dap...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_aif_mute(struct snd_soc_dai *codec_dai, int mute, int direction) { struct snd_soc_component *component = codec_dai->component; int mute_reg; int reg; switch (codec_dai->id) { case 1: mute_reg = WM8994_AIF1_DAC1_FILTERS_1; break; case 2: mute_reg = W...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_aif2_probe(struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; snd_soc_component_update_bits(component, WM8994_GPIO_3, WM8994_GPN_PU | WM8994_GPN_PD, 0); snd_soc_component_update_bits(component, WM8994_GPIO_4, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static irqreturn_t wm8994_mic_irq(int irq, void *data) { struct wm8994_priv *priv = data; struct snd_soc_component *component = priv->hubs.component; #ifndef CONFIG_SND_SOC_WM8994_MODULE trace_snd_soc_jack_irq(dev_name(component->dev)); #endif pm_wakeup_event(component->dev, 300); queue_delayed_work(syste...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static void wm1811_micd_stop(struct snd_soc_component *component) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); if (!wm8994->jackdet) return; snd_soc_component_update_bits(component, WM8958_MIC_DETECT_1, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static void wm8958_mic_work(struct work_struct *work) { struct wm8994_priv *wm8994 = container_of(work, struct wm8994_priv, mic_complete_work.work); struct snd_soc_component *component = wm8994->hubs.component; pm_runtime_get_sync(component->dev); mutex_lock(&wm8994->accdet_lock); wm8994->mic_id_cb(...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static void wm8994_component_remove(struct snd_soc_component *component) { struct wm8994_priv *wm8994 = snd_soc_component_get_drvdata(component); struct wm8994 *control = wm8994->wm8994; int i; for (i = 0; i < ARRAY_SIZE(wm8994->fll_locked); i++) wm8994_free_irq(wm8994->wm8994, WM8994_IRQ_FLL1_LOCK + i, ...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_suspend(struct device *dev) { struct wm8994_priv *wm8994 = dev_get_drvdata(dev); if (wm8994->jackdet && !wm8994->active_refcount) regmap_update_bits(wm8994->wm8994->regmap, WM8994_ANTIPOP_2, WM1811_JACKDET_MODE_MASK, wm8994->jackdet_mode); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8994.c
static int wm8994_resume(struct device *dev) { struct wm8994_priv *wm8994 = dev_get_drvdata(dev); if (wm8994->jackdet && wm8994->jackdet_mode) regmap_update_bits(wm8994->wm8994->regmap, WM8994_ANTIPOP_2, WM1811_JACKDET_MODE_MASK, WM1811_JACKDET_MODE_AUDIO); return 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static int wm8995_put_class_w(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_dapm_kcontrol_component(kcontrol); int ret; ret = snd_soc_dapm_put_volsw(kcontrol, ucontrol); wm8995_update_class_w(component); ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static void dc_servo_cmd(struct snd_soc_component *component, unsigned int reg, unsigned int val, unsigned int mask) { int timeout = 10; dev_dbg(component->dev, "%s: reg = %#x, val = %#x, mask = %#x\n", __func__, reg, val, mask); snd_soc_component_write(component, reg, val); ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static bool wm8995_volatile(struct device *dev, unsigned int reg) { switch (reg) { case WM8995_SOFTWARE_RESET: case WM8995_DC_SERVO_READBACK_0: case WM8995_INTERRUPT_STATUS_1: case WM8995_INTERRUPT_STATUS_2: case WM8995_INTERRUPT_CONTROL: case WM8995_ACCESSORY_DETECT_MODE1: case WM8995_ACCESSORY_DETECT...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static int wm8995_aif_mute(struct snd_soc_dai *dai, int mute, int direction) { struct snd_soc_component *component = dai->component; int mute_reg; switch (dai->id) { case 0: mute_reg = WM8995_AIF1_DAC1_FILTERS_1; break; case 1: mute_reg = WM8995_AIF2_DAC_FILTERS_1; break; default: retu...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static int wm8995_set_dai_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_component *component; struct wm8995_priv *wm8995; component = dai->component; wm8995 = snd_soc_component_get_drvdata(component); switch (dai->id) { case 0: ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static int wm8995_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct wm8995_priv *wm8995; int ret; wm8995 = snd_soc_component_get_drvdata(component); switch (level) { case SND_SOC_BIAS_ON: case SND_SOC_BIAS_PREPARE: break; cas...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static int wm8995_spi_probe(struct spi_device *spi) { struct wm8995_priv *wm8995; int ret; wm8995 = devm_kzalloc(&spi->dev, sizeof(*wm8995), GFP_KERNEL); if (!wm8995) return -ENOMEM; spi_set_drvdata(spi, wm8995); wm8995->regmap = devm_regmap_init_spi(spi, &wm8995_regmap); if (IS_ERR(wm8995->regmap)...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8995.c
static void __exit wm8995_exit(void) { #if IS_ENABLED(CONFIG_I2C) i2c_del_driver(&wm8995_i2c_driver); #endif #if defined(CONFIG_SPI_MASTER) spi_unregister_driver(&wm8995_spi_driver); #endif }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static int wm8996_get_retune_mobile_enum(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8996_priv *wm8996 = snd_soc_component_get_drvdata(component); int block = wm...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static void wm8996_bg_disable(struct snd_soc_component *component) { struct wm8996_priv *wm8996 = snd_soc_component_get_drvdata(component); wm8996->bg_ena--; if (!wm8996->bg_ena) snd_soc_component_update_bits(component, WM8996_POWER_MANAGEMENT_1, WM8996_BG_ENA, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static bool wm8996_volatile_register(struct device *dev, unsigned int reg) { switch (reg) { case WM8996_SOFTWARE_RESET: case WM8996_CHIP_REVISION: case WM8996_LDO_1: case WM8996_LDO_2: case WM8996_INTERRUPT_STATUS_1: case WM8996_INTERRUPT_STATUS_2: case WM8996_INTERRUPT_RAW_STATUS_2: case WM8996_DC_S...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static void wm8996_gpio_set(struct gpio_chip *chip, unsigned offset, int value) { struct wm8996_priv *wm8996 = gpiochip_get_data(chip); regmap_update_bits(wm8996->regmap, WM8996_GPIO_1 + offset, WM8996_GP1_LVL, !!value << WM8996_GP1_LVL_SHIFT); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static int wm8996_gpio_get(struct gpio_chip *chip, unsigned offset) { struct wm8996_priv *wm8996 = gpiochip_get_data(chip); unsigned int reg; int ret; ret = regmap_read(wm8996->regmap, WM8996_GPIO_1 + offset, &reg); if (ret < 0) return ret; return (reg & WM8996_GP1_LVL) != 0; }
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static void wm8996_report_headphone(struct snd_soc_component *component) { dev_dbg(component->dev, "Headphone detected\n"); wm8996_hpdet_start(component); snd_soc_component_update_bits( component, WM8996_MIC_DETECT_1, WM8996_MICD_RATE_MASK | WM8996_MICD_BIAS_STARTTIME_MASK, 7 << WM8996_MICD_RAT...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8996.c
static irqreturn_t wm8996_edge_irq(int irq, void *data) { irqreturn_t ret = IRQ_NONE; irqreturn_t val; do { val = wm8996_irq(irq, data); if (val != IRQ_NONE) ret = val; } while (val != IRQ_NONE); return ret; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8997.c
static int wm8997_set_fll(struct snd_soc_component *component, int fll_id, int source, unsigned int Fref, unsigned int Fout) { struct wm8997_priv *wm8997 = snd_soc_component_get_drvdata(component); switch (fll_id) { case WM8997_FLL1: return arizona_set_fll(&wm8997->fll[0], source, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8997.c
static void wm8997_component_remove(struct snd_soc_component *component) { struct wm8997_priv *priv = snd_soc_component_get_drvdata(component); priv->core.arizona->dapm = NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8998.c
static int wm8998_asrc_ev(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); unsigned int val; switch (event) { case SND_SOC_DAPM_PRE_PMU: val = snd_soc_component_read(component, ARI...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8998.c
static int wm8998_set_fll(struct snd_soc_component *component, int fll_id, int source, unsigned int Fref, unsigned int Fout) { struct wm8998_priv *wm8998 = snd_soc_component_get_drvdata(component); switch (fll_id) { case WM8998_FLL1: return arizona_set_fll(&wm8998->fll[0], source, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm9081.c
static bool wm9081_volatile_register(struct device *dev, unsigned int reg) { switch (reg) { case WM9081_SOFTWARE_RESET: case WM9081_INTERRUPT_STATUS: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm9081.c
static int wm9081_reset(struct regmap *map) { return regmap_write(map, WM9081_SOFTWARE_RESET, 0x9081); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm9081.c
static int speaker_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); unsigned int reg; reg = snd_soc_component_read(component, WM9081_ANALOGUE_SPEAKER_2); if (reg & WM9081_SPK_M...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm9081.c
static int wm9081_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width) { struct snd_soc_component *component = dai->component; struct wm9081_priv *wm9081 = snd_soc_component_get_drvdata(component);...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm9090.c
static bool wm9090_readable(struct device *dev, unsigned int reg) { switch (reg) { case WM9090_SOFTWARE_RESET: case WM9090_POWER_MANAGEMENT_1: case WM9090_POWER_MANAGEMENT_2: case WM9090_POWER_MANAGEMENT_3: case WM9090_CLOCKING_1: case WM9090_IN1_LINE_CONTROL: case WM9090_IN2_LINE_CONTROL: case WM909...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm9705.c
static int ac97_prepare(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; int reg; snd_soc_component_update_bits(component, AC97_EXTENDED_STATUS, 0x1, 0x1); if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) reg ...
[ 0, 0 ]