Lines Matching refs:codec

529 	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);  in eqmode_get()  local
532 reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); in eqmode_get()
544 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_put() local
552 reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); in eqmode_put()
564 regpwr2 = snd_soc_read(codec, WM8985_POWER_MANAGEMENT_2); in eqmode_put()
565 regpwr3 = snd_soc_read(codec, WM8985_POWER_MANAGEMENT_3); in eqmode_put()
567 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_2, in eqmode_put()
569 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_3, in eqmode_put()
571 snd_soc_update_bits(codec, WM8985_ADDITIONAL_CONTROL, in eqmode_put()
574 snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF, in eqmode_put()
579 snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, regpwr2); in eqmode_put()
580 snd_soc_write(codec, WM8985_POWER_MANAGEMENT_3, regpwr3); in eqmode_put()
584 static int wm8985_reset(struct snd_soc_codec *codec) in wm8985_reset() argument
586 return snd_soc_write(codec, WM8985_SOFTWARE_RESET, 0x0); in wm8985_reset()
591 struct snd_soc_codec *codec = dai->codec; in wm8985_dac_mute() local
593 return snd_soc_update_bits(codec, WM8985_DAC_CONTROL, in wm8985_dac_mute()
600 struct snd_soc_codec *codec; in wm8985_set_fmt() local
603 codec = dai->codec; in wm8985_set_fmt()
624 snd_soc_update_bits(codec, WM8985_AUDIO_INTERFACE, in wm8985_set_fmt()
639 snd_soc_update_bits(codec, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_fmt()
676 snd_soc_update_bits(codec, WM8985_AUDIO_INTERFACE, in wm8985_set_fmt()
678 snd_soc_update_bits(codec, WM8985_AUDIO_INTERFACE, in wm8985_set_fmt()
688 struct snd_soc_codec *codec; in wm8985_hw_params() local
694 codec = dai->codec; in wm8985_hw_params()
695 wm8985 = snd_soc_codec_get_drvdata(codec); in wm8985_hw_params()
720 snd_soc_update_bits(codec, WM8985_AUDIO_INTERFACE, in wm8985_hw_params()
737 snd_soc_update_bits(codec, WM8985_ADDITIONAL_CONTROL, in wm8985_hw_params()
756 snd_soc_update_bits(codec, WM8985_CLOCK_GEN_CONTROL, in wm8985_hw_params()
772 snd_soc_update_bits(codec, WM8985_CLOCK_GEN_CONTROL, in wm8985_hw_params()
824 struct snd_soc_codec *codec; in wm8985_set_pll() local
827 codec = dai->codec; in wm8985_set_pll()
830 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_pll()
838 snd_soc_write(codec, WM8985_PLL_N, in wm8985_set_pll()
842 snd_soc_write(codec, WM8985_PLL_K_3, pll_div.k & 0x1ff); in wm8985_set_pll()
843 snd_soc_write(codec, WM8985_PLL_K_2, (pll_div.k >> 9) & 0x1ff); in wm8985_set_pll()
844 snd_soc_write(codec, WM8985_PLL_K_1, (pll_div.k >> 18)); in wm8985_set_pll()
846 snd_soc_update_bits(codec, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_pll()
849 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_pll()
858 struct snd_soc_codec *codec; in wm8985_set_sysclk() local
861 codec = dai->codec; in wm8985_set_sysclk()
862 wm8985 = snd_soc_codec_get_drvdata(codec); in wm8985_set_sysclk()
866 snd_soc_update_bits(codec, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_sysclk()
868 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_sysclk()
872 snd_soc_update_bits(codec, WM8985_CLOCK_GEN_CONTROL, in wm8985_set_sysclk()
884 static int wm8985_set_bias_level(struct snd_soc_codec *codec, in wm8985_set_bias_level() argument
890 wm8985 = snd_soc_codec_get_drvdata(codec); in wm8985_set_bias_level()
895 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
900 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) { in wm8985_set_bias_level()
904 dev_err(codec->dev, in wm8985_set_bias_level()
913 snd_soc_update_bits(codec, WM8985_OUT4_TO_ADC, in wm8985_set_bias_level()
917 snd_soc_update_bits(codec, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
919 snd_soc_update_bits(codec, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
923 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
926 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
931 snd_soc_update_bits(codec, WM8985_OUT4_TO_ADC, in wm8985_set_bias_level()
935 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
941 snd_soc_update_bits(codec, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
943 snd_soc_update_bits(codec, WM8985_OUTPUT_CTRL0, in wm8985_set_bias_level()
946 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_1, in wm8985_set_bias_level()
949 snd_soc_write(codec, WM8985_POWER_MANAGEMENT_1, 0); in wm8985_set_bias_level()
950 snd_soc_write(codec, WM8985_POWER_MANAGEMENT_2, 0); in wm8985_set_bias_level()
951 snd_soc_write(codec, WM8985_POWER_MANAGEMENT_3, 0); in wm8985_set_bias_level()
963 static int wm8985_probe(struct snd_soc_codec *codec) in wm8985_probe() argument
969 wm8985 = snd_soc_codec_get_drvdata(codec); in wm8985_probe()
974 ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8985->supplies), in wm8985_probe()
977 dev_err(codec->dev, "Failed to request supplies: %d\n", ret); in wm8985_probe()
984 dev_err(codec->dev, "Failed to enable supplies: %d\n", ret); in wm8985_probe()
988 ret = wm8985_reset(codec); in wm8985_probe()
990 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); in wm8985_probe()
996 snd_soc_update_bits(codec, volume_update_regs[i], in wm8985_probe()
999 snd_soc_update_bits(codec, WM8985_BIAS_CTRL, WM8985_BIASCUT, in wm8985_probe()