Projectname
large_stringclasses
15 values
Filepath
large_stringlengths
4
106
⌀
Function
large_stringlengths
11
3.45k
Label
list
Linux Kernel
sound/soc/codecs/wcd938x.c
static int wcd938x_get_hph_type(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component); ucontrol->value.integer.value...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wcd938x.c
static int wcd938x_codec_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct wcd938x_priv *wcd938x = dev_get_drvdata(dai->dev); struct wcd938x_sdw_priv *wcd = wcd938x->sdw_priv[dai->...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wcd938x.c
static void wcd938x_unbind(struct device *dev) { struct wcd938x_priv *wcd938x = dev_get_drvdata(dev); device_link_remove(dev, wcd938x->txdev); device_link_remove(dev, wcd938x->rxdev); device_link_remove(wcd938x->rxdev, wcd938x->txdev); snd_soc_unregister_component(dev); component_unbind_all(dev, wcd938x);...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wcd938x.c
static int wcd938x_remove(struct platform_device *pdev) { component_master_del(&pdev->dev, &wcd938x_comp_ops); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wcd938x.h
static inline int wcd938x_sdw_set_sdw_stream(struct wcd938x_sdw_priv *wcd, struct snd_soc_dai *dai, void *stream, int direction) { return -EOPNOTSUPP; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wcd938x.h
static inline struct device *wcd938x_sdw_device_get(struct device_node *np) { return NULL; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wcd938x.h
static inline int wcd938x_swr_get_current_bank(struct sdw_slave *sdev) { return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wl1273.c
static int snd_wl1273_set_audio_route(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wl1273_priv *wl1273 = snd_soc_component_get_drvdata(component); if (wl1273->mode == ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wl1273.c
static int snd_wl1273_fm_volume_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wl1273_priv *wl1273 = snd_soc_component_get_drvdata(component); dev_dbg(component->dev,...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wl1273.c
static void wl1273_remove(struct snd_soc_component *component) { struct wl1273_priv *wl1273 = snd_soc_component_get_drvdata(component); dev_dbg(component->dev, "%s\n", __func__); kfree(wl1273); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wl1273.c
static int wl1273_platform_probe(struct platform_device *pdev) { return devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wl1273, &wl1273_dai, 1); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm2000.c
static int wm2000_enter_standby(struct i2c_client *i2c, int analogue) { struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE)) return -EINVAL; if (analogue) { wm2000_write(i2c, WM2000_REG_ANA_VMID_PD_TIME, 248 / 4); wm2000_write(i2c, WM2000_REG_SYS_MO...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm2000.c
static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); ucontrol->value.integer.value[0] = wm2000-...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm2000.c
static int wm2000_speaker_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); unsigned int val = ucontrol->value.integer.va...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm2000.c
static int wm2000_anc_power_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); struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); int ret; mutex_lock(&wm2000->lo...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm2000.c
static bool wm2000_readable_reg(struct device *dev, unsigned int reg) { switch (reg) { case WM2000_REG_SYS_START: case WM2000_REG_ANC_GAIN_CTRL: case WM2000_REG_MSE_TH1: case WM2000_REG_MSE_TH2: case WM2000_REG_SPEECH_CLARITY: case WM2000_REG_SYS_WATCHDOG: case WM2000_REG_ANA_VMID_PD_TIME: case WM200...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm2200.c
static int wm2200_reset(struct wm2200_priv *wm2200) { if (wm2200->pdata.reset) { gpio_set_value_cansleep(wm2200->pdata.reset, 0); gpio_set_value_cansleep(wm2200->pdata.reset, 1); return 0; } else { return regmap_write(wm2200->regmap, WM2200_SOFTWARE_RESET, 0x2200); } }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm5100.c
static int wm5100_out_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 wm5100_priv *wm5100 = snd_soc_component_get_drvdata(component); switch (w->reg) { case WM5100_CHANNEL_EN...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm5100.c
static void wm5100_log_status3(struct wm5100_priv *wm5100, int val) { if (val & WM5100_SPK_SHUTDOWN_WARN_EINT) dev_crit(wm5100->dev, "Speaker shutdown warning\n"); if (val & WM5100_SPK_SHUTDOWN_EINT) dev_crit(wm5100->dev, "Speaker shutdown\n"); if (val & WM5100_CLKGEN_ERR_EINT) dev_crit(wm5100->dev, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm5102.c
static int wm5102_out_comp_coeff_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct arizona *arizona = dev_get_drvdata(component->dev->parent); uint16_t dac_comp_coeff = ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm5102.c
static int wm5102_component_probe(struct snd_soc_component *component) { struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct wm5102_priv *priv = snd_soc_component_get_drvdata(component); struct arizona *arizona = priv->core.arizona; int ret; snd_soc_component_init_regmap(compon...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm5110.c
static int wm5110_clear_pga_volume(struct arizona *arizona, int output) { unsigned int reg = ARIZONA_OUTPUT_PATH_CONFIG_1L + output * 4; int ret; ret = regmap_write(arizona->regmap, reg, 0x80); if (ret) dev_err(arizona->dev, "Failed to clear PGA (0x%x): %d\n", reg, ret); return ret; }
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm5110.c
static int wm5110_in_pga_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); int ret; snd_soc_dapm_mutex_lock...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8350.c
static int pga_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); struct wm8350_data *wm8350_data = snd_soc_component_get_drvdata(component); struct wm8350_output *out; switch (w->shift)...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8350.c
static int wm8350_put_volsw_2r_vu(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); struct wm8350_data *wm8350_priv = snd_soc_component_get_drvdata(component); struct wm8350_output *ou...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8350.c
static void wm8350_hp_work(struct wm8350_data *priv, struct wm8350_jack_data *jack, u16 mask) { struct wm8350 *wm8350 = priv->wm8350; u16 reg; int report; reg = wm8350_reg_read(wm8350, WM8350_JACK_PIN_STATUS); if (reg & mask) report = jack->report; else report = 0; sn...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8350.c
int wm8350_hp_jack_detect(struct snd_soc_component *component, enum wm8350_jack which, struct snd_soc_jack *jack, int report) { struct wm8350_data *priv = snd_soc_component_get_drvdata(component); struct wm8350 *wm8350 = priv->wm8350; int ena; switch (which) ...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8400.c
static void wm8400_component_reset(struct snd_soc_component *component) { struct wm8400_priv *wm8400 = snd_soc_component_get_drvdata(component); wm8400_reset_codec_reg_cache(wm8400->wm8400); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8400.c
static int wm8400_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, WM8400_AUDIO_INTERFACE_1); audio3 = snd_soc_component_read(component, WM8400_AUDIO_INTERFACE_3); switch ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8400.c
static int wm8400_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; u16 audio1 = snd_soc_component_read(component, WM8400_AUDIO_INTERFACE_1); aud...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8400.c
static int wm8400_component_probe(struct snd_soc_component *component) { struct wm8400 *wm8400 = dev_get_platdata(component->dev); struct wm8400_priv *priv; int ret; u16 reg; priv = devm_kzalloc(component->dev, sizeof(struct wm8400_priv), GFP_KERNEL); if (priv == NULL) return -ENOMEM; snd_soc_compon...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8400.c
static int wm8400_probe(struct platform_device *pdev) { return devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wm8400, &wm8400_dai, 1); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8510.c
static void pll_factors(unsigned int target, unsigned int source) { unsigned long long Kpart; unsigned int K, Ndiv, Nmod; Ndiv = target / source; if (Ndiv < 6) { source >>= 1; pll_div.pre_div = 1; Ndiv = target / source; } else pll_div.pre_div = 0; if ((Ndiv < 6) || (Ndiv > 12)) printk...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8510.c
static int wm8510_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; u16 reg; if (freq_in == 0 || freq_out == 0) { reg = snd_...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8510.c
static int wm8510_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 WM8510_OPCLKDIV: reg = snd_soc_component_read(component, WM8510_GPIO) & 0x1cf; snd_soc_comp...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8510.c
static int wm8510_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, WM8510_DAC) & 0xffbf; if (mute) snd_soc_component_write(component, WM8510_DAC, mute_reg | 0x40); else snd_soc_component_writ...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8510.c
static int wm8510_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct wm8510_priv *wm8510 = snd_soc_component_get_drvdata(component); u16 power1 = snd_soc_component_read(component, WM8510_POWER1) & ~0x3; switch (level) { case SND_SOC_BIAS...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8510.c
static int wm8510_probe(struct snd_soc_component *component) { wm8510_reset(component); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8523.c
static int wm8523_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct wm8523_priv *wm8523 = snd_soc_component_get_drvdata(component); if (!wm8523->sysclk) { dev_err(component->dev, "No MCLK configured, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8523.c
static int wm8523_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_component *component = codec_dai->component; u16 aifctrl1 = snd_soc_component_read(component, WM8523_AIF_CTRL1); aifctrl1 &= ~(WM8523_BCLK_INV_MASK | WM8523_LRCLK_INV_MASK | WM8523_FMT_MASK | WM8523_...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8524.c
static int wm8524_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; struct wm8524_priv *wm8524 = snd_soc_component_get_drvdata(component); if (!wm8524->sysclk) { dev_err(component->dev, "No MCLK configured, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8524.c
static int wm8524_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 wm8524_priv *wm8524 = snd_soc_component_get_drvdata(component); unsigned int val; int i, j = 0; wm8524-...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8524.c
static int wm8524_mute_stream(struct snd_soc_dai *dai, int mute, int stream) { struct wm8524_priv *wm8524 = snd_soc_component_get_drvdata(dai->component); if (wm8524->mute) gpiod_set_value_cansleep(wm8524->mute, mute); return 0; } #define WM8524_RATES SNDRV_PCM_RATE_8000_192000 #define WM8524_FORMATS ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8580.c
static int wm8580_out_vu(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); struct wm8580_priv *wm8580 =...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8580.c
static int pll_factors(struct _pll_div *pll_div, unsigned int target, unsigned int source) { u64 Kpart; unsigned int K, Ndiv, Nmod; int i; pr_debug("wm8580: PLL %uHz->%uHz\n", source, target); for (i = 0; i < ARRAY_SIZE(post_table); i++) { if (target * post_table[i].div >= 9000000...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8580.c
static int wm8580_set_dai_clkdiv(struct snd_soc_dai *codec_dai, int div_id, int div) { struct snd_soc_component *component = codec_dai->component; unsigned int reg; switch (div_id) { case WM8580_MCLK: reg = snd_soc_component_read(component, WM8580_PLLB4); reg &= ~WM8580...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8580.c
static int wm8580_mute(struct snd_soc_dai *codec_dai, int mute, int direction) { struct snd_soc_component *component = codec_dai->component; unsigned int reg; reg = snd_soc_component_read(component, WM8580_DAC_CONTROL5); if (mute) reg |= WM8580_DAC_CONTROL5_MUTEALL; else reg &= ~WM8580_DAC_CONTROL5...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8580.c
static int wm8580_i2c_probe(struct i2c_client *i2c) { const struct of_device_id *of_id; struct wm8580_priv *wm8580; int ret, i; wm8580 = devm_kzalloc(&i2c->dev, sizeof(struct wm8580_priv), GFP_KERNEL); if (wm8580 == NULL) return -ENOMEM; wm8580->regmap = devm_regmap_init_i2c(i2c, &wm8580_regmap); i...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8711.c
static void wm8711_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { struct snd_soc_component *component = dai->component; if (!snd_soc_component_active(component)) { udelay(50); snd_soc_component_write(component, WM8711_ACTIVE, 0x0); } }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8711.c
static int wm8711_probe(struct snd_soc_component *component) { int ret; ret = wm8711_reset(component); if (ret < 0) { dev_err(component->dev, "Failed to issue reset\n"); return ret; } snd_soc_component_update_bits(component, WM8711_LOUT1V, 0x0100, 0x0100); snd_soc_component_update_bits(component, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8711.c
static int __init wm8711_modinit(void) { int ret; #if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&wm8711_i2c_driver); if (ret != 0) { printk(KERN_ERR "Failed to register WM8711 I2C driver: %d\n", ret); } #endif #if defined(CONFIG_SPI_MASTER) ret = spi_register_driver(&wm8711_spi_driver); if (ret != 0)...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8728.c
static int wm8728_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct wm8728_priv *wm8728 = snd_soc_component_get_drvdata(component); u16 reg; switch (level) { case SND_SOC_BIAS_ON: case SND_SOC_BIAS_PREPARE: case SND_SOC_BIAS_STANDBY...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8731.c
static int wm8731_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 wm8731_priv *wm8731 = snd_soc_component_get_drvdata(component); u16 ifa...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8731.c
static int wm8731_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 snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); struct wm8731_priv *wm8731 = snd_soc_co...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8731.c
static int wm8731_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct wm8731_priv *wm8731 = snd_soc_component_get_drvdata(component); int ret; u16 reg; switch (level) { case SND_SOC_BIAS_ON: if (wm8731->mclk) { ret = clk_prepa...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8737.c
static int wm8737_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 wm8737_priv *wm8737 = snd_soc_component_get_drvdata(component); int i;...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8737.c
static int wm8737_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 wm8737_priv *wm8737 = snd_soc_component_get_drvdata(component); int i; for (i = 0; i < ARRAY_SIZE(coeff_...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8741.c
static int wm8741_reset(struct snd_soc_component *component) { return snd_soc_component_write(component, WM8741_RESET, 0); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8741.c
static int wm8741_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_component *component = codec_dai->component; unsigned int iface; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBS_CFS: break; default: return -EINVAL; } /* interface format */ swi...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8741.c
static void wm8741_remove(struct snd_soc_component *component) { struct wm8741_priv *wm8741 = snd_soc_component_get_drvdata(component); regulator_bulk_disable(ARRAY_SIZE(wm8741->supplies), wm8741->supplies); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8741.c
static int wm8741_i2c_probe(struct i2c_client *i2c) { struct wm8741_priv *wm8741; int ret, i; wm8741 = devm_kzalloc(&i2c->dev, sizeof(struct wm8741_priv), GFP_KERNEL); if (wm8741 == NULL) return -ENOMEM; for (i = 0; i < ARRAY_SIZE(wm8741->supplies); i++) wm8741->supplies[i].supply = wm8741_supply_na...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8741.c
static int wm8741_spi_probe(struct spi_device *spi) { struct wm8741_priv *wm8741; int ret, i; wm8741 = devm_kzalloc(&spi->dev, sizeof(struct wm8741_priv), GFP_KERNEL); if (wm8741 == NULL) return -ENOMEM; for (i = 0; i < ARRAY_SIZE(wm8741->supplies); i++) wm8741->supplies[i].supply = wm8741_supply_na...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8741.c
static int __init wm8741_modinit(void) { int ret = 0; #if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&wm8741_i2c_driver); if (ret != 0) pr_err("Failed to register WM8741 I2C driver: %d\n", ret); #endif #if defined(CONFIG_SPI_MASTER) ret = spi_register_driver(&wm8741_spi_driver); if (ret != 0) { pri...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8750.c
static int wm8750_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 wm8750_priv *wm8750 = snd_soc_component_get_drvdata(component...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8750.c
static int wm8750_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { u16 pwr_reg = snd_soc_component_read(component, WM8750_PWR1) & 0xfe3e; switch (level) { case SND_SOC_BIAS_ON: snd_soc_component_write(component, WM8750_PWR1, pwr_reg | 0x00...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8750.c
static int __init wm8750_modinit(void) { int ret = 0; #if IS_ENABLED(CONFIG_I2C) ret = i2c_add_driver(&wm8750_i2c_driver); if (ret != 0) { printk(KERN_ERR "Failed to register wm8750 I2C driver: %d\n", ret); } #endif #if defined(CONFIG_SPI_MASTER) ret = spi_register_driver(&wm8750_spi_driver); if (ret !...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8750.c
static void __exit wm8750_exit(void) { #if IS_ENABLED(CONFIG_I2C) i2c_del_driver(&wm8750_i2c_driver); #endif #if defined(CONFIG_SPI_MASTER) spi_unregister_driver(&wm8750_spi_driver); #endif }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8753.c
static bool wm8753_volatile(struct device *dev, unsigned int reg) { return reg == WM8753_RESET; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8753.c
static int wm8753_pcm_set_dai_fmt(struct snd_soc_component *component, unsigned int fmt) { u16 voice, ioctl; voice = snd_soc_component_read(component, WM8753_PCM) & 0x011f; ioctl = snd_soc_component_read(component, WM8753_IOCTL) & 0x015d; switch (fmt & SND_SOC_DAIFMT_MASTER_M...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8753.c
static int wm8753_i2s_set_dai_fmt(struct snd_soc_component *component, unsigned int fmt) { u16 ioctl, hifi; hifi = snd_soc_component_read(component, WM8753_HIFI) & 0x013f; ioctl = snd_soc_component_read(component, WM8753_IOCTL) & 0x00ae; switch (fmt & SND_SOC_DAIFMT_MASTER_MA...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8753.c
static int wm8753_i2s_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 wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8753.c
static int wm8753_spi_probe(struct spi_device *spi) { struct wm8753_priv *wm8753; int ret; wm8753 = devm_kzalloc(&spi->dev, sizeof(struct wm8753_priv), GFP_KERNEL); if (wm8753 == NULL) return -ENOMEM; spi_set_drvdata(spi, wm8753); wm8753->regmap = devm_regmap_init_spi(spi, &wm8753_regmap); if (IS_E...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8770.c
static int wm8770_mute(struct snd_soc_dai *dai, int mute, int direction) { struct snd_soc_component *component; component = dai->component; return snd_soc_component_update_bits(component, WM8770_DACMUTE, 0x10, !!mute << 4); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8776.c
static int wm8776_spi_probe(struct spi_device *spi) { struct wm8776_priv *wm8776; int ret; wm8776 = devm_kzalloc(&spi->dev, sizeof(struct wm8776_priv), GFP_KERNEL); if (wm8776 == NULL) return -ENOMEM; wm8776->regmap = devm_regmap_init_spi(spi, &wm8776_regmap); if (IS_ERR(wm8776->regmap)) return PT...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8782.c
static int wm8782_soc_probe(struct snd_soc_component *component) { struct wm8782_priv *priv = snd_soc_component_get_drvdata(component); return regulator_bulk_enable(ARRAY_SIZE(priv->supplies), priv->supplies); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8782.c
static int wm8782_soc_suspend(struct snd_soc_component *component) { struct wm8782_priv *priv = snd_soc_component_get_drvdata(component); regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8782.c
static int wm8782_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct wm8782_priv *priv; int ret, i; priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) return -ENOMEM; dev_set_drvdata(dev, priv); for (i = 0; i < ARRAY_SIZE(supply_names); i++) priv->suppli...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8804.c
static int wm8804_aif_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); struct wm8804_priv *wm8804 = snd_soc_component_get_drvdata(component); switch (event) { case SND_SOC_DAPM_...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8804.c
static int wm8804_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_component *component; u16 blen; component = dai->component; switch (params_width(params)) { case 16: blen =...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8804.c
static int wm8804_runtime_resume(struct device *dev) { struct wm8804_priv *wm8804 = dev_get_drvdata(dev); int ret; ret = regulator_bulk_enable(ARRAY_SIZE(wm8804->supplies), wm8804->supplies); if (ret) { dev_err(wm8804->dev, "Failed to enable supplies: %d\n", ret); return ret; } regcache_sync(wm880...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8804.c
static int wm8804_runtime_suspend(struct device *dev) { struct wm8804_priv *wm8804 = dev_get_drvdata(dev); regmap_update_bits(wm8804->regmap, WM8804_PWRDN, 0x8, 0x8); regulator_bulk_disable(ARRAY_SIZE(wm8804->supplies), wm8804->supplies); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8900.c
static bool wm8900_volatile_register(struct device *dev, unsigned int reg) { switch (reg) { case WM8900_REG_ID: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8900.c
static int wm8900_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id, int source, unsigned int freq_in, unsigned int freq_out) { return wm8900_set_fll(codec_dai->component, pll_id, freq_in, freq_out); }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8900.c
static int wm8900_suspend(struct snd_soc_component *component) { struct wm8900_priv *wm8900 = snd_soc_component_get_drvdata(component); int fll_out = wm8900->fll_out; int fll_in = wm8900->fll_in; int ret; ret = wm8900_set_fll(component, 0, 0, 0); if (ret != 0) { dev_err(component->dev, "Failed to stop ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8900.c
static int wm8900_probe(struct snd_soc_component *component) { int reg; reg = snd_soc_component_read(component, WM8900_REG_ID); if (reg != 0x8900) { dev_err(component->dev, "Device is not a WM8900 - ID %x\n", reg); return -ENODEV; } wm8900_reset(component); snd_soc_component_force_bias_level(comp...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8903.c
static int wm8903_set_deemph(struct snd_soc_component *component) { struct wm8903_priv *wm8903 = snd_soc_component_get_drvdata(component); int val, i, best; if (wm8903->deemph) { best = 1; for (i = 2; i < ARRAY_SIZE(wm8903_deemph); i++) { if (abs(wm8903_deemph[i] - wm8903->fs) < abs(wm890...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8903.c
static int wm8903_resume(struct snd_soc_component *component) { struct wm8903_priv *wm8903 = snd_soc_component_get_drvdata(component); regcache_sync(wm8903->regmap); return 0; } #ifdef CONFIG_GPIOLIB
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8903.c
static void wm8903_free_gpio(struct wm8903_priv *wm8903) {} #endif
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8903.c
static int wm8903_set_pdata_irq_trigger(struct i2c_client *i2c, struct wm8903_platform_data *pdata) { struct irq_data *irq_data = irq_get_irq_data(i2c->irq); if (!irq_data) { dev_err(&i2c->dev, "Invalid IRQ: %d\n", i2c->irq); return -EINVAL; } switch (irqd_get_tr...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8904.c
static int wm8904_configure_clocking(struct snd_soc_component *component) { struct wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); unsigned int clock0, clock2, rate; clock2 = snd_soc_component_read(component, WM8904_CLOCK_RATES_2); snd_soc_component_update_bits(component, WM8904_CLOCK_RATES_2, ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8904.c
static int wm8904_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 wm8904_priv *wm8904 = snd_soc_component_get_drvdata(component); ucontrol->val...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8904.c
static int wm8904_adc_osr_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol); unsigned int val; int ret; ret = snd_soc_put_volsw(kcontrol, ucontrol); if (ret < 0) return ret; ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8904.c
static int cp_event(struct snd_soc_dapm_widget *w, struct snd_kcontrol *kcontrol, int event) { if (WARN_ON(event != SND_SOC_DAPM_POST_PMU)) return -EINVAL; udelay(500); return 0; }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8904.c
static int wm8904_set_sysclk(struct snd_soc_dai *dai, int clk_id, unsigned int freq, int dir) { struct snd_soc_component *component = dai->component; struct wm8904_priv *priv = snd_soc_component_get_drvdata(component); unsigned long mclk_freq; int ret; switch (clk_id) { case WM...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8940.c
static int wm8940_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct wm8940_priv *wm8940 = snd_soc_component_get_drvdata(component); u16 val; u16 pwr_reg = snd_soc_component_read(component, WM8940_POWER1) & 0x1F0; int ret = 0; switch (...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8940.c
static int wm8940_set_dai_clkdiv(struct snd_soc_dai *codec_dai, int div_id, int div) { struct snd_soc_component *component = codec_dai->component; u16 reg; int ret = 0; switch (div_id) { case WM8940_BCLKDIV: reg = snd_soc_component_read(component, WM8940_CLOCK) & 0xFFE3;...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8940.c
static int wm8940_i2c_probe(struct i2c_client *i2c) { struct wm8940_priv *wm8940; int ret; wm8940 = devm_kzalloc(&i2c->dev, sizeof(struct wm8940_priv), GFP_KERNEL); if (wm8940 == NULL) return -ENOMEM; wm8940->regmap = devm_regmap_init_i2c(i2c, &wm8940_regmap); if (IS_ERR(wm8940->regmap)) return P...
[ 1, 0 ]
Linux Kernel
sound/soc/codecs/wm8955.c
static bool wm8955_writeable(struct device *dev, unsigned int reg) { switch (reg) { case WM8955_LOUT1_VOLUME: case WM8955_ROUT1_VOLUME: case WM8955_DAC_CONTROL: case WM8955_AUDIO_INTERFACE: case WM8955_SAMPLE_RATE: case WM8955_LEFT_DAC_VOLUME: case WM8955_RIGHT_DAC_VOLUME: case WM8955_BASS_CONTROL: ...
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8955.c
static bool wm8955_volatile(struct device *dev, unsigned int reg) { switch (reg) { case WM8955_RESET: return true; default: return false; } }
[ 0, 0 ]
Linux Kernel
sound/soc/codecs/wm8955.c
static int wm8955_reset(struct snd_soc_component *component) { return snd_soc_component_write(component, WM8955_RESET, 0); }
[ 0, 0 ]