Lines Matching refs:codec

64 static int wm8741_reset(struct snd_soc_codec *codec)  in wm8741_reset()  argument
66 return snd_soc_write(codec, WM8741_RESET, 0); in wm8741_reset()
184 struct snd_soc_codec *codec = dai->codec; in wm8741_startup() local
185 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_startup()
199 struct snd_soc_codec *codec = dai->codec; in wm8741_hw_params() local
200 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_hw_params()
201 u16 iface = snd_soc_read(codec, WM8741_FORMAT_CONTROL) & 0x1FC; in wm8741_hw_params()
208 dev_err(codec->dev, in wm8741_hw_params()
220 dev_err(codec->dev, "LRCLK %d unsupported with MCLK %d\n", in wm8741_hw_params()
239 dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d", in wm8741_hw_params()
244 dev_dbg(codec->dev, "wm8741_hw_params: bit size param = %d, rate param = %d", in wm8741_hw_params()
247 snd_soc_write(codec, WM8741_FORMAT_CONTROL, iface); in wm8741_hw_params()
254 struct snd_soc_codec *codec = codec_dai->codec; in wm8741_set_dai_sysclk() local
255 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_set_dai_sysclk()
257 dev_dbg(codec->dev, "wm8741_set_dai_sysclk info: freq=%dHz\n", freq); in wm8741_set_dai_sysclk()
299 struct snd_soc_codec *codec = codec_dai->codec; in wm8741_set_dai_fmt() local
300 u16 iface = snd_soc_read(codec, WM8741_FORMAT_CONTROL) & 0x1C3; in wm8741_set_dai_fmt()
348 dev_dbg(codec->dev, "wm8741_set_dai_fmt: Format=%x, Clock Inv=%x\n", in wm8741_set_dai_fmt()
352 snd_soc_write(codec, WM8741_FORMAT_CONTROL, iface); in wm8741_set_dai_fmt()
384 static int wm8741_resume(struct snd_soc_codec *codec) in wm8741_resume() argument
386 snd_soc_cache_sync(codec); in wm8741_resume()
393 static int wm8741_configure(struct snd_soc_codec *codec) in wm8741_configure() argument
395 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_configure()
403 snd_soc_update_bits(codec, WM8741_MODE_CONTROL_2, in wm8741_configure()
412 snd_soc_update_bits(codec, WM8741_DACLLSB_ATTENUATION, in wm8741_configure()
414 snd_soc_update_bits(codec, WM8741_DACLMSB_ATTENUATION, in wm8741_configure()
416 snd_soc_update_bits(codec, WM8741_DACRLSB_ATTENUATION, in wm8741_configure()
418 snd_soc_update_bits(codec, WM8741_DACRMSB_ATTENUATION, in wm8741_configure()
424 static int wm8741_add_controls(struct snd_soc_codec *codec) in wm8741_add_controls() argument
426 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_add_controls()
431 snd_soc_add_codec_controls(codec, in wm8741_add_controls()
436 snd_soc_add_codec_controls(codec, in wm8741_add_controls()
441 snd_soc_add_codec_controls(codec, in wm8741_add_controls()
452 static int wm8741_probe(struct snd_soc_codec *codec) in wm8741_probe() argument
454 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_probe()
460 dev_err(codec->dev, "Failed to enable supplies: %d\n", ret); in wm8741_probe()
464 ret = wm8741_reset(codec); in wm8741_probe()
466 dev_err(codec->dev, "Failed to issue reset\n"); in wm8741_probe()
470 ret = wm8741_configure(codec); in wm8741_probe()
472 dev_err(codec->dev, "Failed to change default settings\n"); in wm8741_probe()
476 ret = wm8741_add_controls(codec); in wm8741_probe()
478 dev_err(codec->dev, "Failed to add controls\n"); in wm8741_probe()
482 dev_dbg(codec->dev, "Successful registration\n"); in wm8741_probe()
491 static int wm8741_remove(struct snd_soc_codec *codec) in wm8741_remove() argument
493 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_remove()