Lines Matching refs:codec
96 static int wm8731_set_deemph(struct snd_soc_codec *codec) in wm8731_set_deemph() argument
98 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_deemph()
118 dev_dbg(codec->dev, "Set deemphasis %d (%dHz)\n", in wm8731_set_deemph()
121 return snd_soc_update_bits(codec, WM8731_APDIGI, 0x6, val); in wm8731_set_deemph()
127 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8731_get_deemph() local
128 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_get_deemph()
138 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8731_put_deemph() local
139 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_put_deemph()
150 wm8731_set_deemph(codec); in wm8731_put_deemph()
222 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in wm8731_check_osc() local
223 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_check_osc()
345 struct snd_soc_codec *codec = dai->codec; in wm8731_hw_params() local
346 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_hw_params()
347 u16 iface = snd_soc_read(codec, WM8731_IFACE) & 0xfff3; in wm8731_hw_params()
354 snd_soc_write(codec, WM8731_SRATE, srate); in wm8731_hw_params()
368 wm8731_set_deemph(codec); in wm8731_hw_params()
370 snd_soc_write(codec, WM8731_IFACE, iface); in wm8731_hw_params()
376 struct snd_soc_codec *codec = dai->codec; in wm8731_mute() local
377 u16 mute_reg = snd_soc_read(codec, WM8731_APDIGI) & 0xfff7; in wm8731_mute()
380 snd_soc_write(codec, WM8731_APDIGI, mute_reg | 0x8); in wm8731_mute()
382 snd_soc_write(codec, WM8731_APDIGI, mute_reg); in wm8731_mute()
389 struct snd_soc_codec *codec = codec_dai->codec; in wm8731_set_dai_sysclk() local
390 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_dai_sysclk()
424 snd_soc_dapm_sync(&codec->dapm); in wm8731_set_dai_sysclk()
433 struct snd_soc_codec *codec = codec_dai->codec; in wm8731_set_dai_fmt() local
485 snd_soc_write(codec, WM8731_IFACE, iface); in wm8731_set_dai_fmt()
489 static int wm8731_set_bias_level(struct snd_soc_codec *codec, in wm8731_set_bias_level() argument
492 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_bias_level()
504 if (codec->dapm.bias_level == SND_SOC_BIAS_OFF) { in wm8731_set_bias_level()
514 reg = snd_soc_read(codec, WM8731_PWR) & 0xff7f; in wm8731_set_bias_level()
515 snd_soc_write(codec, WM8731_PWR, reg | 0x0040); in wm8731_set_bias_level()
520 snd_soc_write(codec, WM8731_PWR, 0xffff); in wm8731_set_bias_level()
526 codec->dapm.bias_level = level; in wm8731_set_bias_level()
533 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(dai->codec); in wm8731_startup()
574 static int wm8731_probe(struct snd_soc_codec *codec) in wm8731_probe() argument
576 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_probe()
582 ret = devm_regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8731->supplies), in wm8731_probe()
585 dev_err(codec->dev, "Failed to request supplies: %d\n", ret); in wm8731_probe()
592 dev_err(codec->dev, "Failed to enable supplies: %d\n", ret); in wm8731_probe()
596 ret = wm8731_reset(codec); in wm8731_probe()
598 dev_err(codec->dev, "Failed to issue reset: %d\n", ret); in wm8731_probe()
602 wm8731_set_bias_level(codec, SND_SOC_BIAS_STANDBY); in wm8731_probe()
605 snd_soc_update_bits(codec, WM8731_LOUT1V, 0x100, 0); in wm8731_probe()
606 snd_soc_update_bits(codec, WM8731_ROUT1V, 0x100, 0); in wm8731_probe()
607 snd_soc_update_bits(codec, WM8731_LINVOL, 0x100, 0); in wm8731_probe()
608 snd_soc_update_bits(codec, WM8731_RINVOL, 0x100, 0); in wm8731_probe()
611 snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0); in wm8731_probe()
625 static int wm8731_remove(struct snd_soc_codec *codec) in wm8731_remove() argument
627 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_remove()