Lines Matching refs:codec

259 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);  in pga_event()  local
260 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in pga_event()
302 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8350_put_volsw_2r_vu() local
303 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec); in wm8350_put_volsw_2r_vu()
337 val = snd_soc_read(codec, reg); in wm8350_put_volsw_2r_vu()
338 snd_soc_write(codec, reg, val | WM8350_OUT1_VU); in wm8350_put_volsw_2r_vu()
345 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8350_get_volsw_2r() local
346 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec); in wm8350_get_volsw_2r()
757 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_dai_sysclk() local
758 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in wm8350_set_dai_sysclk()
773 fll_4 = snd_soc_read(codec, WM8350_FLL_CONTROL_4) & in wm8350_set_dai_sysclk()
775 snd_soc_write(codec, WM8350_FLL_CONTROL_4, fll_4 | clk_id); in wm8350_set_dai_sysclk()
792 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_clkdiv() local
797 val = snd_soc_read(codec, WM8350_ADC_DIVIDER) & in wm8350_set_clkdiv()
799 snd_soc_write(codec, WM8350_ADC_DIVIDER, val | div); in wm8350_set_clkdiv()
802 val = snd_soc_read(codec, WM8350_DAC_CLOCK_CONTROL) & in wm8350_set_clkdiv()
804 snd_soc_write(codec, WM8350_DAC_CLOCK_CONTROL, val | div); in wm8350_set_clkdiv()
807 val = snd_soc_read(codec, WM8350_CLOCK_CONTROL_1) & in wm8350_set_clkdiv()
809 snd_soc_write(codec, WM8350_CLOCK_CONTROL_1, val | div); in wm8350_set_clkdiv()
812 val = snd_soc_read(codec, WM8350_CLOCK_CONTROL_1) & in wm8350_set_clkdiv()
814 snd_soc_write(codec, WM8350_CLOCK_CONTROL_1, val | div); in wm8350_set_clkdiv()
817 val = snd_soc_read(codec, WM8350_CLOCK_CONTROL_1) & in wm8350_set_clkdiv()
819 snd_soc_write(codec, WM8350_CLOCK_CONTROL_1, val | div); in wm8350_set_clkdiv()
822 val = snd_soc_read(codec, WM8350_DAC_LR_RATE) & in wm8350_set_clkdiv()
824 snd_soc_write(codec, WM8350_DAC_LR_RATE, val | div); in wm8350_set_clkdiv()
827 val = snd_soc_read(codec, WM8350_ADC_LR_RATE) & in wm8350_set_clkdiv()
829 snd_soc_write(codec, WM8350_ADC_LR_RATE, val | div); in wm8350_set_clkdiv()
840 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_dai_fmt() local
841 u16 iface = snd_soc_read(codec, WM8350_AI_FORMATING) & in wm8350_set_dai_fmt()
843 u16 master = snd_soc_read(codec, WM8350_AI_DAC_CONTROL) & in wm8350_set_dai_fmt()
845 u16 dac_lrc = snd_soc_read(codec, WM8350_DAC_LR_RATE) & in wm8350_set_dai_fmt()
847 u16 adc_lrc = snd_soc_read(codec, WM8350_ADC_LR_RATE) & in wm8350_set_dai_fmt()
900 snd_soc_write(codec, WM8350_AI_FORMATING, iface); in wm8350_set_dai_fmt()
901 snd_soc_write(codec, WM8350_AI_DAC_CONTROL, master); in wm8350_set_dai_fmt()
902 snd_soc_write(codec, WM8350_DAC_LR_RATE, dac_lrc); in wm8350_set_dai_fmt()
903 snd_soc_write(codec, WM8350_ADC_LR_RATE, adc_lrc); in wm8350_set_dai_fmt()
911 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_pcm_hw_params() local
912 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in wm8350_pcm_hw_params()
914 u16 iface = snd_soc_read(codec, WM8350_AI_FORMATING) & in wm8350_pcm_hw_params()
932 snd_soc_write(codec, WM8350_AI_FORMATING, iface); in wm8350_pcm_hw_params()
951 struct snd_soc_codec *codec = dai->codec; in wm8350_mute() local
959 snd_soc_update_bits(codec, WM8350_DAC_MUTE, WM8350_DAC_MUTE_ENA, val); in wm8350_mute()
1028 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_fll() local
1029 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_set_fll()
1054 fll_1 = snd_soc_read(codec, WM8350_FLL_CONTROL_1) & in wm8350_set_fll()
1056 snd_soc_write(codec, WM8350_FLL_CONTROL_1, in wm8350_set_fll()
1058 snd_soc_write(codec, WM8350_FLL_CONTROL_2, in wm8350_set_fll()
1061 snd_soc_write(codec, WM8350_FLL_CONTROL_3, fll_div.k); in wm8350_set_fll()
1062 fll_4 = snd_soc_read(codec, WM8350_FLL_CONTROL_4) & in wm8350_set_fll()
1064 snd_soc_write(codec, WM8350_FLL_CONTROL_4, in wm8350_set_fll()
1078 static int wm8350_set_bias_level(struct snd_soc_codec *codec, in wm8350_set_bias_level() argument
1081 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_set_bias_level()
1084 wm8350->codec.platform_data; in wm8350_set_bias_level()
1105 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { in wm8350_set_bias_level()
1238 codec->dapm.bias_level = level; in wm8350_set_bias_level()
1323 int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which, in wm8350_hp_jack_detect() argument
1326 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_hp_jack_detect()
1402 int wm8350_mic_jack_detect(struct snd_soc_codec *codec, in wm8350_mic_jack_detect() argument
1406 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_mic_jack_detect()
1460 static int wm8350_codec_probe(struct snd_soc_codec *codec) in wm8350_codec_probe() argument
1462 struct wm8350 *wm8350 = dev_get_platdata(codec->dev); in wm8350_codec_probe()
1468 if (wm8350->codec.platform_data == NULL) { in wm8350_codec_probe()
1469 dev_err(codec->dev, "No audio platform data supplied\n"); in wm8350_codec_probe()
1473 priv = devm_kzalloc(codec->dev, sizeof(struct wm8350_data), in wm8350_codec_probe()
1477 snd_soc_codec_set_drvdata(codec, priv); in wm8350_codec_probe()
1500 snd_soc_write(codec, WM8350_SECURITY, 0xa7); in wm8350_codec_probe()
1501 snd_soc_write(codec, 0xde, 0x13); in wm8350_codec_probe()
1502 snd_soc_write(codec, WM8350_SECURITY, 0); in wm8350_codec_probe()
1555 static int wm8350_codec_remove(struct snd_soc_codec *codec) in wm8350_codec_remove() argument
1557 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_codec_remove()
1558 struct wm8350 *wm8350 = dev_get_platdata(codec->dev); in wm8350_codec_remove()