Lines Matching refs:codec

85 	struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);  in snd_soc_tlv320aic23_put_volsw()  local
99 reg = snd_soc_read(codec, TLV320AIC23_ANLG) & (~0x1C0); in snd_soc_tlv320aic23_put_volsw()
100 snd_soc_write(codec, TLV320AIC23_ANLG, reg | (val << 6)); in snd_soc_tlv320aic23_put_volsw()
108 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_tlv320aic23_get_volsw() local
111 val = snd_soc_read(codec, TLV320AIC23_ANLG) & (0x1C0); in snd_soc_tlv320aic23_get_volsw()
300 static void get_current_sample_rates(struct snd_soc_codec *codec, int mclk, in get_current_sample_rates() argument
303 int src = snd_soc_read(codec, TLV320AIC23_SRATE); in get_current_sample_rates()
317 static int set_sample_rate_control(struct snd_soc_codec *codec, int mclk, in set_sample_rate_control() argument
327 snd_soc_write(codec, TLV320AIC23_SRATE, data); in set_sample_rate_control()
331 get_current_sample_rates(codec, mclk, &adc, &dac); in set_sample_rate_control()
343 struct snd_soc_codec *codec = dai->codec; in tlv320aic23_hw_params() local
346 struct aic23 *aic23 = snd_soc_codec_get_drvdata(codec); in tlv320aic23_hw_params()
360 ret = set_sample_rate_control(codec, aic23->mclk, sample_rate_adc, in tlv320aic23_hw_params()
365 iface_reg = snd_soc_read(codec, TLV320AIC23_DIGT_FMT) & ~(0x03 << 2); in tlv320aic23_hw_params()
380 snd_soc_write(codec, TLV320AIC23_DIGT_FMT, iface_reg); in tlv320aic23_hw_params()
388 struct snd_soc_codec *codec = dai->codec; in tlv320aic23_pcm_prepare() local
391 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0001); in tlv320aic23_pcm_prepare()
399 struct snd_soc_codec *codec = dai->codec; in tlv320aic23_shutdown() local
400 struct aic23 *aic23 = snd_soc_codec_get_drvdata(codec); in tlv320aic23_shutdown()
403 if (!snd_soc_codec_is_active(codec)) { in tlv320aic23_shutdown()
405 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); in tlv320aic23_shutdown()
415 struct snd_soc_codec *codec = dai->codec; in tlv320aic23_mute() local
418 reg = snd_soc_read(codec, TLV320AIC23_DIGT); in tlv320aic23_mute()
425 snd_soc_write(codec, TLV320AIC23_DIGT, reg); in tlv320aic23_mute()
433 struct snd_soc_codec *codec = codec_dai->codec; in tlv320aic23_set_dai_fmt() local
436 iface_reg = snd_soc_read(codec, TLV320AIC23_DIGT_FMT) & (~0x03); in tlv320aic23_set_dai_fmt()
471 snd_soc_write(codec, TLV320AIC23_DIGT_FMT, iface_reg); in tlv320aic23_set_dai_fmt()
484 static int tlv320aic23_set_bias_level(struct snd_soc_codec *codec, in tlv320aic23_set_bias_level() argument
487 u16 reg = snd_soc_read(codec, TLV320AIC23_PWR) & 0x17f; in tlv320aic23_set_bias_level()
494 snd_soc_write(codec, TLV320AIC23_PWR, reg); in tlv320aic23_set_bias_level()
500 snd_soc_write(codec, TLV320AIC23_PWR, in tlv320aic23_set_bias_level()
505 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x0); in tlv320aic23_set_bias_level()
506 snd_soc_write(codec, TLV320AIC23_PWR, 0x1ff); in tlv320aic23_set_bias_level()
542 static int tlv320aic23_resume(struct snd_soc_codec *codec) in tlv320aic23_resume() argument
544 struct aic23 *aic23 = snd_soc_codec_get_drvdata(codec); in tlv320aic23_resume()
551 static int tlv320aic23_codec_probe(struct snd_soc_codec *codec) in tlv320aic23_codec_probe() argument
554 snd_soc_write(codec, TLV320AIC23_RESET, 0); in tlv320aic23_codec_probe()
556 snd_soc_write(codec, TLV320AIC23_DIGT, TLV320AIC23_DEEMP_44K); in tlv320aic23_codec_probe()
559 snd_soc_update_bits(codec, TLV320AIC23_LINVOL, in tlv320aic23_codec_probe()
562 snd_soc_update_bits(codec, TLV320AIC23_RINVOL, in tlv320aic23_codec_probe()
565 snd_soc_update_bits(codec, TLV320AIC23_ANLG, in tlv320aic23_codec_probe()
570 snd_soc_write(codec, TLV320AIC23_LCHNVOL, in tlv320aic23_codec_probe()
572 snd_soc_write(codec, TLV320AIC23_RCHNVOL, in tlv320aic23_codec_probe()
575 snd_soc_write(codec, TLV320AIC23_ACTIVE, 0x1); in tlv320aic23_codec_probe()