Lines Matching refs:codec

495 	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);  in eqmode_get()  local
498 reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_get()
510 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_put() local
518 reg_eq = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_put()
530 regpwr2 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_2); in eqmode_put()
531 regpwr3 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_3); in eqmode_put()
533 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_2, in eqmode_put()
535 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_3, in eqmode_put()
538 snd_soc_update_bits(codec, WM8983_EQ1_LOW_SHELF, in eqmode_put()
543 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, regpwr2); in eqmode_put()
544 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_3, regpwr3); in eqmode_put()
565 struct snd_soc_codec *codec = dai->codec; in wm8983_dac_mute() local
567 return snd_soc_update_bits(codec, WM8983_DAC_CONTROL, in wm8983_dac_mute()
574 struct snd_soc_codec *codec = dai->codec; in wm8983_set_fmt() local
596 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_set_fmt()
611 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_set_fmt()
642 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_set_fmt()
644 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_set_fmt()
654 struct snd_soc_codec *codec = dai->codec; in wm8983_hw_params() local
655 struct wm8983_priv *wm8983 = snd_soc_codec_get_drvdata(codec); in wm8983_hw_params()
663 dev_err(codec->dev, "Failed to convert params to bclk: %d\n", ret); in wm8983_hw_params()
688 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_hw_params()
705 snd_soc_update_bits(codec, WM8983_ADDITIONAL_CONTROL, in wm8983_hw_params()
724 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_hw_params()
740 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_hw_params()
792 struct snd_soc_codec *codec; in wm8983_set_pll() local
795 codec = dai->codec; in wm8983_set_pll()
798 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_pll()
807 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_pll()
811 snd_soc_write(codec, WM8983_PLL_N, in wm8983_set_pll()
815 snd_soc_write(codec, WM8983_PLL_K_3, pll_div.k & 0x1ff); in wm8983_set_pll()
816 snd_soc_write(codec, WM8983_PLL_K_2, (pll_div.k >> 9) & 0x1ff); in wm8983_set_pll()
817 snd_soc_write(codec, WM8983_PLL_K_1, (pll_div.k >> 18)); in wm8983_set_pll()
819 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_pll()
829 struct snd_soc_codec *codec = dai->codec; in wm8983_set_sysclk() local
830 struct wm8983_priv *wm8983 = snd_soc_codec_get_drvdata(codec); in wm8983_set_sysclk()
834 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_set_sysclk()
838 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_set_sysclk()
850 static int wm8983_set_bias_level(struct snd_soc_codec *codec, in wm8983_set_bias_level() argument
853 struct wm8983_priv *wm8983 = snd_soc_codec_get_drvdata(codec); in wm8983_set_bias_level()
860 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
865 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { in wm8983_set_bias_level()
868 dev_err(codec->dev, "Failed to sync cache: %d\n", ret); in wm8983_set_bias_level()
872 snd_soc_update_bits(codec, WM8983_OUT4_TO_ADC, in wm8983_set_bias_level()
876 snd_soc_update_bits(codec, WM8983_OUTPUT_CTRL, in wm8983_set_bias_level()
879 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
882 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
887 snd_soc_update_bits(codec, WM8983_OUT4_TO_ADC, in wm8983_set_bias_level()
893 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
899 snd_soc_update_bits(codec, WM8983_OUTPUT_CTRL, in wm8983_set_bias_level()
902 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
907 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_1, 0); in wm8983_set_bias_level()
908 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, 0); in wm8983_set_bias_level()
909 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_3, 0); in wm8983_set_bias_level()
916 static int wm8983_probe(struct snd_soc_codec *codec) in wm8983_probe() argument
921 ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0); in wm8983_probe()
923 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); in wm8983_probe()
929 snd_soc_update_bits(codec, vol_update_regs[i], in wm8983_probe()
935 snd_soc_update_bits(codec, i, 0x40, 0x40); in wm8983_probe()
938 snd_soc_update_bits(codec, WM8983_DAC_CONTROL, in wm8983_probe()
943 snd_soc_update_bits(codec, WM8983_BIAS_CTRL, in wm8983_probe()