Lines Matching refs:codec
134 struct snd_soc_codec *codec = dai->codec; in max9850_hw_params() local
135 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_hw_params()
143 sf = (snd_soc_read(codec, MAX9850_CLOCK) >> 2) + 1; in max9850_hw_params()
149 snd_soc_write(codec, MAX9850_LRCLK_MSB, (lrclk_div >> 8) & 0x7f); in max9850_hw_params()
150 snd_soc_write(codec, MAX9850_LRCLK_LSB, lrclk_div & 0xff); in max9850_hw_params()
165 snd_soc_update_bits(codec, MAX9850_DIGITAL_AUDIO, 0x3, da); in max9850_hw_params()
173 struct snd_soc_codec *codec = codec_dai->codec; in max9850_set_dai_sysclk() local
174 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_set_dai_sysclk()
178 snd_soc_write(codec, MAX9850_CLOCK, 0x0); in max9850_set_dai_sysclk()
180 snd_soc_write(codec, MAX9850_CLOCK, 0x4); in max9850_set_dai_sysclk()
182 snd_soc_write(codec, MAX9850_CLOCK, 0x8); in max9850_set_dai_sysclk()
192 struct snd_soc_codec *codec = codec_dai->codec; in max9850_set_dai_fmt() local
238 snd_soc_write(codec, MAX9850_DIGITAL_AUDIO, da); in max9850_set_dai_fmt()
243 static int max9850_set_bias_level(struct snd_soc_codec *codec, in max9850_set_bias_level() argument
246 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_set_bias_level()
255 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { in max9850_set_bias_level()
258 dev_err(codec->dev, in max9850_set_bias_level()
267 codec->dapm.bias_level = level; in max9850_set_bias_level()
294 static int max9850_probe(struct snd_soc_codec *codec) in max9850_probe() argument
297 snd_soc_update_bits(codec, MAX9850_GENERAL_PURPOSE, 1, 1); in max9850_probe()
299 snd_soc_update_bits(codec, MAX9850_VOLUME, 0x40, 0x40); in max9850_probe()
301 snd_soc_update_bits(codec, MAX9850_CHARGE_PUMP, 0xff, 0xc0); in max9850_probe()