Lines Matching refs:codec
50 static inline int alc5623_reset(struct snd_soc_codec *codec) in alc5623_reset() argument
52 return snd_soc_write(codec, ALC5623_RESET, 0); in alc5623_reset()
58 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in amp_mixer_event() local
64 snd_soc_write(codec, ALC5623_HID_CTRL_INDEX, 0x46); in amp_mixer_event()
68 snd_soc_write(codec, ALC5623_HID_CTRL_DATA, 0xFFFF); in amp_mixer_event()
71 snd_soc_write(codec, ALC5623_HID_CTRL_DATA, 0); in amp_mixer_event()
530 struct snd_soc_codec *codec = codec_dai->codec; in alc5623_set_dai_pll() local
538 snd_soc_update_bits(codec, ALC5623_PWR_MANAG_ADD2, in alc5623_set_dai_pll()
543 reg = snd_soc_read(codec, ALC5623_DAI_CONTROL); in alc5623_set_dai_pll()
579 snd_soc_write(codec, ALC5623_GLOBAL_CLK_CTRL_REG, gbl_clk); in alc5623_set_dai_pll()
580 snd_soc_write(codec, ALC5623_PLL_CTRL, pll_div); in alc5623_set_dai_pll()
581 snd_soc_update_bits(codec, ALC5623_PWR_MANAG_ADD2, in alc5623_set_dai_pll()
585 snd_soc_write(codec, ALC5623_GLOBAL_CLK_CTRL_REG, gbl_clk); in alc5623_set_dai_pll()
608 static int get_coeff(struct snd_soc_codec *codec, int rate) in get_coeff() argument
610 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in get_coeff()
626 struct snd_soc_codec *codec = codec_dai->codec; in alc5623_set_dai_sysclk() local
627 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in alc5623_set_dai_sysclk()
647 struct snd_soc_codec *codec = codec_dai->codec; in alc5623_set_dai_fmt() local
699 return snd_soc_write(codec, ALC5623_DAI_CONTROL, iface); in alc5623_set_dai_fmt()
705 struct snd_soc_codec *codec = dai->codec; in alc5623_pcm_hw_params() local
706 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in alc5623_pcm_hw_params()
710 iface = snd_soc_read(codec, ALC5623_DAI_CONTROL); in alc5623_pcm_hw_params()
732 snd_soc_write(codec, ALC5623_DAI_CONTROL, iface); in alc5623_pcm_hw_params()
734 coeff = get_coeff(codec, rate); in alc5623_pcm_hw_params()
739 dev_dbg(codec->dev, "%s: sysclk=%d,rate=%d,coeff=0x%04x\n", in alc5623_pcm_hw_params()
741 snd_soc_write(codec, ALC5623_STEREO_AD_DA_CLK_CTRL, coeff); in alc5623_pcm_hw_params()
748 struct snd_soc_codec *codec = dai->codec; in alc5623_mute() local
750 u16 mute_reg = snd_soc_read(codec, ALC5623_MISC_CTRL) & ~hp_mute; in alc5623_mute()
755 return snd_soc_write(codec, ALC5623_MISC_CTRL, mute_reg); in alc5623_mute()
773 static void enable_power_depop(struct snd_soc_codec *codec) in enable_power_depop() argument
775 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in enable_power_depop()
777 snd_soc_update_bits(codec, ALC5623_PWR_MANAG_ADD1, in enable_power_depop()
781 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD3, ALC5623_ADD3_POWER_EN); in enable_power_depop()
783 snd_soc_update_bits(codec, ALC5623_MISC_CTRL, in enable_power_depop()
789 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD2, ALC5623_ADD2_POWER_EN); in enable_power_depop()
793 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD1, in enable_power_depop()
796 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD1, in enable_power_depop()
800 snd_soc_update_bits(codec, ALC5623_MISC_CTRL, in enable_power_depop()
806 static int alc5623_set_bias_level(struct snd_soc_codec *codec, in alc5623_set_bias_level() argument
811 enable_power_depop(codec); in alc5623_set_bias_level()
817 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD2, in alc5623_set_bias_level()
819 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD3, in alc5623_set_bias_level()
824 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD2, 0); in alc5623_set_bias_level()
825 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD3, 0); in alc5623_set_bias_level()
826 snd_soc_write(codec, ALC5623_PWR_MANAG_ADD1, 0); in alc5623_set_bias_level()
829 codec->dapm.bias_level = level; in alc5623_set_bias_level()
867 static int alc5623_suspend(struct snd_soc_codec *codec) in alc5623_suspend() argument
869 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in alc5623_suspend()
876 static int alc5623_resume(struct snd_soc_codec *codec) in alc5623_resume() argument
878 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in alc5623_resume()
885 dev_err(codec->dev, "Failed to sync register cache: %d\n", in alc5623_resume()
894 static int alc5623_probe(struct snd_soc_codec *codec) in alc5623_probe() argument
896 struct alc5623_priv *alc5623 = snd_soc_codec_get_drvdata(codec); in alc5623_probe()
897 struct snd_soc_dapm_context *dapm = &codec->dapm; in alc5623_probe()
899 alc5623_reset(codec); in alc5623_probe()
902 snd_soc_write(codec, ALC5623_ADD_CTRL_REG, in alc5623_probe()
907 snd_soc_write(codec, ALC5623_JACK_DET_CTRL, in alc5623_probe()
913 snd_soc_add_codec_controls(codec, alc5621_vol_snd_controls, in alc5623_probe()
917 snd_soc_add_codec_controls(codec, alc5622_vol_snd_controls, in alc5623_probe()
921 snd_soc_add_codec_controls(codec, alc5623_vol_snd_controls, in alc5623_probe()
928 snd_soc_add_codec_controls(codec, alc5623_snd_controls, in alc5623_probe()