Lines Matching full:wm8753
3 * wm8753.c -- WM8753 ALSA Soc Audio driver
9 * The WM8753 is a low power, high quality stereo codec with integrated PCM
47 #include "wm8753.h"
51 MODULE_PARM_DESC(caps_charge, "WM8753 cap charge time (msecs)");
59 * wm8753 register cache
60 * We can't read the WM8753 register space when we
151 * WM8753 Controls
228 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_get_dai() local
230 ucontrol->value.enumerated.item[0] = wm8753->dai_func; in wm8753_get_dai()
238 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_set_dai() local
241 if (wm8753->dai_func == ucontrol->value.enumerated.item[0]) in wm8753_set_dai()
249 wm8753->dai_func = ucontrol->value.enumerated.item[0]; in wm8753_set_dai()
251 if (((ioctl >> 2) & 0x3) == wm8753->dai_func) in wm8753_set_dai()
254 ioctl = (ioctl & 0x1f3) | (wm8753->dai_func << 2); in wm8753_set_dai()
258 wm8753_hifi_write_dai_fmt(component, wm8753->hifi_fmt); in wm8753_set_dai()
259 wm8753_voice_write_dai_fmt(component, wm8753->voice_fmt); in wm8753_set_dai()
718 "wm8753: unsupported N = %u\n", Ndiv); in pll_factors()
865 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_set_dai_sysclk() local
874 wm8753->sysclk = freq; in wm8753_set_dai_sysclk()
877 wm8753->pcmclk = freq; in wm8753_set_dai_sysclk()
925 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_pcm_hw_params() local
945 if (params_rate(params) * 384 == wm8753->pcmclk) in wm8753_pcm_hw_params()
1156 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_i2s_hw_params() local
1162 coeff = get_coeff(wm8753->sysclk, params_rate(params)); in wm8753_i2s_hw_params()
1164 printk(KERN_ERR "wm8753 invalid MCLK or rate\n"); in wm8753_i2s_hw_params()
1236 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_hifi_write_dai_fmt() local
1239 switch (wm8753->dai_func) { in wm8753_hifi_write_dai_fmt()
1263 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_hifi_set_dai_fmt() local
1265 wm8753->hifi_fmt = fmt; in wm8753_hifi_set_dai_fmt()
1273 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_voice_write_dai_fmt() local
1276 if (wm8753->dai_func != 0) in wm8753_voice_write_dai_fmt()
1293 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_voice_set_dai_fmt() local
1295 wm8753->voice_fmt = fmt; in wm8753_voice_set_dai_fmt()
1304 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_mute() local
1306 /* the digital mute covers the HiFi and Voice DAC's on the WM8753. in wm8753_mute()
1308 if (mute && wm8753->dai_func == 1) { in wm8753_mute()
1323 struct wm8753_priv *wm8753 = in wm8753_charge_work() local
1327 regmap_update_bits(wm8753->regmap, WM8753_PWR1, 0x0180, 0x0100); in wm8753_charge_work()
1333 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_set_bias_level() local
1343 flush_delayed_work(&wm8753->charge_work); in wm8753_set_bias_level()
1349 schedule_delayed_work(&wm8753->charge_work, in wm8753_set_bias_level()
1357 cancel_delayed_work_sync(&wm8753->charge_work); in wm8753_set_bias_level()
1373 * The WM8753 supports up to 4 different and mutually exclusive DAI
1376 * is connected between the wm8753 and a BT codec or GSM modem.
1405 { .name = "wm8753-hifi",
1423 { .name = "wm8753-voice",
1444 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_resume() local
1446 regcache_sync(wm8753->regmap); in wm8753_resume()
1453 struct wm8753_priv *wm8753 = snd_soc_component_get_drvdata(component); in wm8753_probe() local
1456 INIT_DELAYED_WORK(&wm8753->charge_work, wm8753_charge_work); in wm8753_probe()
1464 wm8753->dai_func = 0; in wm8753_probe()
1498 { .compatible = "wlf,wm8753", },
1518 struct wm8753_priv *wm8753; in wm8753_spi_probe() local
1521 wm8753 = devm_kzalloc(&spi->dev, sizeof(struct wm8753_priv), in wm8753_spi_probe()
1523 if (wm8753 == NULL) in wm8753_spi_probe()
1526 spi_set_drvdata(spi, wm8753); in wm8753_spi_probe()
1528 wm8753->regmap = devm_regmap_init_spi(spi, &wm8753_regmap); in wm8753_spi_probe()
1529 if (IS_ERR(wm8753->regmap)) { in wm8753_spi_probe()
1530 ret = PTR_ERR(wm8753->regmap); in wm8753_spi_probe()
1546 .name = "wm8753",
1556 struct wm8753_priv *wm8753; in wm8753_i2c_probe() local
1559 wm8753 = devm_kzalloc(&i2c->dev, sizeof(struct wm8753_priv), in wm8753_i2c_probe()
1561 if (wm8753 == NULL) in wm8753_i2c_probe()
1564 i2c_set_clientdata(i2c, wm8753); in wm8753_i2c_probe()
1566 wm8753->regmap = devm_regmap_init_i2c(i2c, &wm8753_regmap); in wm8753_i2c_probe()
1567 if (IS_ERR(wm8753->regmap)) { in wm8753_i2c_probe()
1568 ret = PTR_ERR(wm8753->regmap); in wm8753_i2c_probe()
1583 { "wm8753" },
1590 .name = "wm8753",
1604 printk(KERN_ERR "Failed to register wm8753 I2C driver: %d\n", in wm8753_modinit()
1611 printk(KERN_ERR "Failed to register wm8753 SPI driver: %d\n", in wm8753_modinit()
1630 MODULE_DESCRIPTION("ASoC WM8753 driver");