Lines Matching refs:codec
87 struct snd_soc_codec *codec; member
311 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in vout12supply_event() local
315 snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0); in vout12supply_event()
318 snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0x180); in vout12supply_event()
328 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in vout34supply_event() local
332 snd_soc_update_bits(codec, WM8770_OUTMUX2, 0x180, 0); in vout34supply_event()
335 snd_soc_update_bits(codec, WM8770_OUTMUX2, 0x180, 0x180); in vout34supply_event()
342 static int wm8770_reset(struct snd_soc_codec *codec) in wm8770_reset() argument
344 return snd_soc_write(codec, WM8770_RESET, 0); in wm8770_reset()
349 struct snd_soc_codec *codec; in wm8770_set_fmt() local
352 codec = dai->codec; in wm8770_set_fmt()
395 snd_soc_update_bits(codec, WM8770_IFACECTRL, 0xf, iface); in wm8770_set_fmt()
396 snd_soc_update_bits(codec, WM8770_MSTRCTRL, 0x100, master); in wm8770_set_fmt()
414 struct snd_soc_codec *codec; in wm8770_hw_params() local
421 codec = dai->codec; in wm8770_hw_params()
422 wm8770 = snd_soc_codec_get_drvdata(codec); in wm8770_hw_params()
453 if (snd_soc_read(codec, WM8770_MSTRCTRL) & 0x100) { in wm8770_hw_params()
461 dev_err(codec->dev, in wm8770_hw_params()
467 dev_dbg(codec->dev, "MCLK is %dfs\n", mclk_ratios[i]); in wm8770_hw_params()
469 snd_soc_update_bits(codec, WM8770_MSTRCTRL, 0x7 << shift, in wm8770_hw_params()
473 snd_soc_update_bits(codec, WM8770_IFACECTRL, 0x30, iface); in wm8770_hw_params()
480 struct snd_soc_codec *codec; in wm8770_mute() local
482 codec = dai->codec; in wm8770_mute()
483 return snd_soc_update_bits(codec, WM8770_DACMUTE, 0x10, in wm8770_mute()
490 struct snd_soc_codec *codec; in wm8770_set_sysclk() local
493 codec = dai->codec; in wm8770_set_sysclk()
494 wm8770 = snd_soc_codec_get_drvdata(codec); in wm8770_set_sysclk()
499 static int wm8770_set_bias_level(struct snd_soc_codec *codec, in wm8770_set_bias_level() argument
505 wm8770 = snd_soc_codec_get_drvdata(codec); in wm8770_set_bias_level()
513 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { in wm8770_set_bias_level()
517 dev_err(codec->dev, in wm8770_set_bias_level()
526 snd_soc_write(codec, WM8770_PWDNCTRL, 0); in wm8770_set_bias_level()
531 snd_soc_write(codec, WM8770_PWDNCTRL, 1); in wm8770_set_bias_level()
537 codec->dapm.bias_level = level; in wm8770_set_bias_level()
571 static int wm8770_probe(struct snd_soc_codec *codec) in wm8770_probe() argument
576 wm8770 = snd_soc_codec_get_drvdata(codec); in wm8770_probe()
577 wm8770->codec = codec; in wm8770_probe()
582 dev_err(codec->dev, "Failed to enable supplies: %d\n", ret); in wm8770_probe()
586 ret = wm8770_reset(codec); in wm8770_probe()
588 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); in wm8770_probe()
593 snd_soc_update_bits(codec, WM8770_MSDIGVOL, 0x100, 0x100); in wm8770_probe()
594 snd_soc_update_bits(codec, WM8770_MSALGVOL, 0x100, 0x100); in wm8770_probe()
595 snd_soc_update_bits(codec, WM8770_VOUT1RVOL, 0x100, 0x100); in wm8770_probe()
596 snd_soc_update_bits(codec, WM8770_VOUT2RVOL, 0x100, 0x100); in wm8770_probe()
597 snd_soc_update_bits(codec, WM8770_VOUT3RVOL, 0x100, 0x100); in wm8770_probe()
598 snd_soc_update_bits(codec, WM8770_VOUT4RVOL, 0x100, 0x100); in wm8770_probe()
599 snd_soc_update_bits(codec, WM8770_DAC1RVOL, 0x100, 0x100); in wm8770_probe()
600 snd_soc_update_bits(codec, WM8770_DAC2RVOL, 0x100, 0x100); in wm8770_probe()
601 snd_soc_update_bits(codec, WM8770_DAC3RVOL, 0x100, 0x100); in wm8770_probe()
602 snd_soc_update_bits(codec, WM8770_DAC4RVOL, 0x100, 0x100); in wm8770_probe()
605 snd_soc_update_bits(codec, WM8770_DACMUTE, 0x10, 0x10); in wm8770_probe()