Lines Matching refs:codec

555 	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);  in eqmode_get()  local
558 reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_get()
570 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_put() local
578 reg_eq = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_put()
590 regpwr2 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_2); in eqmode_put()
591 regpwr3 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_3); in eqmode_put()
593 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_2, in eqmode_put()
595 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_3, in eqmode_put()
598 snd_soc_update_bits(codec, WM8983_EQ1_LOW_SHELF, in eqmode_put()
603 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, regpwr2); in eqmode_put()
604 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_3, regpwr3); in eqmode_put()
618 struct snd_soc_codec *codec = dai->codec; in wm8983_dac_mute() local
620 return snd_soc_update_bits(codec, WM8983_DAC_CONTROL, in wm8983_dac_mute()
627 struct snd_soc_codec *codec = dai->codec; in wm8983_set_fmt() local
649 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_set_fmt()
664 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_set_fmt()
695 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_set_fmt()
697 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_set_fmt()
707 struct snd_soc_codec *codec = dai->codec; in wm8983_hw_params() local
708 struct wm8983_priv *wm8983 = snd_soc_codec_get_drvdata(codec); in wm8983_hw_params()
716 dev_err(codec->dev, "Failed to convert params to bclk: %d\n", ret); in wm8983_hw_params()
741 snd_soc_update_bits(codec, WM8983_AUDIO_INTERFACE, in wm8983_hw_params()
758 snd_soc_update_bits(codec, WM8983_ADDITIONAL_CONTROL, in wm8983_hw_params()
777 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_hw_params()
793 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_hw_params()
845 struct snd_soc_codec *codec; in wm8983_set_pll() local
848 codec = dai->codec; in wm8983_set_pll()
851 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_pll()
860 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_pll()
864 snd_soc_write(codec, WM8983_PLL_N, in wm8983_set_pll()
868 snd_soc_write(codec, WM8983_PLL_K_3, pll_div.k & 0x1ff); in wm8983_set_pll()
869 snd_soc_write(codec, WM8983_PLL_K_2, (pll_div.k >> 9) & 0x1ff); in wm8983_set_pll()
870 snd_soc_write(codec, WM8983_PLL_K_1, (pll_div.k >> 18)); in wm8983_set_pll()
872 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_pll()
882 struct snd_soc_codec *codec = dai->codec; in wm8983_set_sysclk() local
883 struct wm8983_priv *wm8983 = snd_soc_codec_get_drvdata(codec); in wm8983_set_sysclk()
887 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_set_sysclk()
891 snd_soc_update_bits(codec, WM8983_CLOCK_GEN_CONTROL, in wm8983_set_sysclk()
903 static int wm8983_set_bias_level(struct snd_soc_codec *codec, in wm8983_set_bias_level() argument
906 struct wm8983_priv *wm8983 = snd_soc_codec_get_drvdata(codec); in wm8983_set_bias_level()
913 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
918 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { in wm8983_set_bias_level()
921 dev_err(codec->dev, "Failed to sync cache: %d\n", ret); in wm8983_set_bias_level()
925 snd_soc_update_bits(codec, WM8983_OUT4_TO_ADC, in wm8983_set_bias_level()
929 snd_soc_update_bits(codec, WM8983_OUTPUT_CTRL, in wm8983_set_bias_level()
932 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
935 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
940 snd_soc_update_bits(codec, WM8983_OUT4_TO_ADC, in wm8983_set_bias_level()
946 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
952 snd_soc_update_bits(codec, WM8983_OUTPUT_CTRL, in wm8983_set_bias_level()
955 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_1, in wm8983_set_bias_level()
960 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_1, 0); in wm8983_set_bias_level()
961 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, 0); in wm8983_set_bias_level()
962 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_3, 0); in wm8983_set_bias_level()
966 codec->dapm.bias_level = level; in wm8983_set_bias_level()
970 static int wm8983_probe(struct snd_soc_codec *codec) in wm8983_probe() argument
975 ret = snd_soc_write(codec, WM8983_SOFTWARE_RESET, 0); in wm8983_probe()
977 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); in wm8983_probe()
983 snd_soc_update_bits(codec, vol_update_regs[i], in wm8983_probe()
989 snd_soc_update_bits(codec, i, 0x40, 0x40); in wm8983_probe()
992 snd_soc_update_bits(codec, WM8983_DAC_CONTROL, in wm8983_probe()
997 snd_soc_update_bits(codec, WM8983_BIAS_CTRL, in wm8983_probe()