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()
756 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_dai_sysclk() local
757 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in wm8350_set_dai_sysclk()
772 fll_4 = snd_soc_read(codec, WM8350_FLL_CONTROL_4) & in wm8350_set_dai_sysclk()
774 snd_soc_write(codec, WM8350_FLL_CONTROL_4, fll_4 | clk_id); in wm8350_set_dai_sysclk()
791 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_clkdiv() local
796 val = snd_soc_read(codec, WM8350_ADC_DIVIDER) & in wm8350_set_clkdiv()
798 snd_soc_write(codec, WM8350_ADC_DIVIDER, val | div); in wm8350_set_clkdiv()
801 val = snd_soc_read(codec, WM8350_DAC_CLOCK_CONTROL) & in wm8350_set_clkdiv()
803 snd_soc_write(codec, WM8350_DAC_CLOCK_CONTROL, val | div); in wm8350_set_clkdiv()
806 val = snd_soc_read(codec, WM8350_CLOCK_CONTROL_1) & in wm8350_set_clkdiv()
808 snd_soc_write(codec, WM8350_CLOCK_CONTROL_1, val | div); in wm8350_set_clkdiv()
811 val = snd_soc_read(codec, WM8350_CLOCK_CONTROL_1) & in wm8350_set_clkdiv()
813 snd_soc_write(codec, WM8350_CLOCK_CONTROL_1, val | div); in wm8350_set_clkdiv()
816 val = snd_soc_read(codec, WM8350_CLOCK_CONTROL_1) & in wm8350_set_clkdiv()
818 snd_soc_write(codec, WM8350_CLOCK_CONTROL_1, val | div); in wm8350_set_clkdiv()
821 val = snd_soc_read(codec, WM8350_DAC_LR_RATE) & in wm8350_set_clkdiv()
823 snd_soc_write(codec, WM8350_DAC_LR_RATE, val | div); in wm8350_set_clkdiv()
826 val = snd_soc_read(codec, WM8350_ADC_LR_RATE) & in wm8350_set_clkdiv()
828 snd_soc_write(codec, WM8350_ADC_LR_RATE, val | div); in wm8350_set_clkdiv()
839 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_dai_fmt() local
840 u16 iface = snd_soc_read(codec, WM8350_AI_FORMATING) & in wm8350_set_dai_fmt()
842 u16 master = snd_soc_read(codec, WM8350_AI_DAC_CONTROL) & in wm8350_set_dai_fmt()
844 u16 dac_lrc = snd_soc_read(codec, WM8350_DAC_LR_RATE) & in wm8350_set_dai_fmt()
846 u16 adc_lrc = snd_soc_read(codec, WM8350_ADC_LR_RATE) & in wm8350_set_dai_fmt()
899 snd_soc_write(codec, WM8350_AI_FORMATING, iface); in wm8350_set_dai_fmt()
900 snd_soc_write(codec, WM8350_AI_DAC_CONTROL, master); in wm8350_set_dai_fmt()
901 snd_soc_write(codec, WM8350_DAC_LR_RATE, dac_lrc); in wm8350_set_dai_fmt()
902 snd_soc_write(codec, WM8350_ADC_LR_RATE, adc_lrc); in wm8350_set_dai_fmt()
910 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_pcm_hw_params() local
911 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in wm8350_pcm_hw_params()
913 u16 iface = snd_soc_read(codec, WM8350_AI_FORMATING) & in wm8350_pcm_hw_params()
931 snd_soc_write(codec, WM8350_AI_FORMATING, iface); in wm8350_pcm_hw_params()
950 struct snd_soc_codec *codec = dai->codec; in wm8350_mute() local
958 snd_soc_update_bits(codec, WM8350_DAC_MUTE, WM8350_DAC_MUTE_ENA, val); in wm8350_mute()
1027 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_fll() local
1028 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_set_fll()
1053 fll_1 = snd_soc_read(codec, WM8350_FLL_CONTROL_1) & in wm8350_set_fll()
1055 snd_soc_write(codec, WM8350_FLL_CONTROL_1, in wm8350_set_fll()
1057 snd_soc_write(codec, WM8350_FLL_CONTROL_2, in wm8350_set_fll()
1060 snd_soc_write(codec, WM8350_FLL_CONTROL_3, fll_div.k); in wm8350_set_fll()
1061 fll_4 = snd_soc_read(codec, WM8350_FLL_CONTROL_4) & in wm8350_set_fll()
1063 snd_soc_write(codec, WM8350_FLL_CONTROL_4, in wm8350_set_fll()
1077 static int wm8350_set_bias_level(struct snd_soc_codec *codec, in wm8350_set_bias_level() argument
1080 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_set_bias_level()
1083 wm8350->codec.platform_data; in wm8350_set_bias_level()
1104 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { in wm8350_set_bias_level()
1321 int wm8350_hp_jack_detect(struct snd_soc_codec *codec, enum wm8350_jack which, in wm8350_hp_jack_detect() argument
1324 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_hp_jack_detect()
1400 int wm8350_mic_jack_detect(struct snd_soc_codec *codec, in wm8350_mic_jack_detect() argument
1404 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_mic_jack_detect()
1458 static int wm8350_codec_probe(struct snd_soc_codec *codec) in wm8350_codec_probe() argument
1460 struct wm8350 *wm8350 = dev_get_platdata(codec->dev); in wm8350_codec_probe()
1466 if (wm8350->codec.platform_data == NULL) { in wm8350_codec_probe()
1467 dev_err(codec->dev, "No audio platform data supplied\n"); in wm8350_codec_probe()
1471 priv = devm_kzalloc(codec->dev, sizeof(struct wm8350_data), in wm8350_codec_probe()
1475 snd_soc_codec_set_drvdata(codec, priv); in wm8350_codec_probe()
1498 snd_soc_write(codec, WM8350_SECURITY, 0xa7); in wm8350_codec_probe()
1499 snd_soc_write(codec, 0xde, 0x13); in wm8350_codec_probe()
1500 snd_soc_write(codec, WM8350_SECURITY, 0); in wm8350_codec_probe()
1553 static int wm8350_codec_remove(struct snd_soc_codec *codec) in wm8350_codec_remove() argument
1555 struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); in wm8350_codec_remove()
1556 struct wm8350 *wm8350 = dev_get_platdata(codec->dev); in wm8350_codec_remove()