Lines Matching refs:wm8731
92 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_deemph() local
98 if (wm8731->deemph) { in wm8731_set_deemph()
101 if (abs(wm8731_deemph[i] - wm8731->playback_fs) < in wm8731_set_deemph()
102 abs(wm8731_deemph[best] - wm8731->playback_fs)) in wm8731_set_deemph()
122 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_get_deemph() local
124 ucontrol->value.enumerated.item[0] = wm8731->deemph; in wm8731_get_deemph()
133 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_put_deemph() local
141 if (wm8731->deemph != deemph) { in wm8731_put_deemph()
142 wm8731->deemph = deemph; in wm8731_put_deemph()
216 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(source->codec); in wm8731_check_osc() local
218 return wm8731->sysclk_type == WM8731_SYSCLK_XTAL; in wm8731_check_osc()
309 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_hw_params() local
311 int i = get_coeff(wm8731->sysclk, params_rate(params)); in wm8731_hw_params()
315 wm8731->playback_fs = params_rate(params); in wm8731_hw_params()
353 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_dai_sysclk() local
358 wm8731->sysclk_type = clk_id; in wm8731_set_dai_sysclk()
370 wm8731->sysclk = freq; in wm8731_set_dai_sysclk()
444 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_bias_level() local
455 ret = regulator_bulk_enable(ARRAY_SIZE(wm8731->supplies), in wm8731_set_bias_level()
456 wm8731->supplies); in wm8731_set_bias_level()
460 regcache_sync(wm8731->regmap); in wm8731_set_bias_level()
469 regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), in wm8731_set_bias_level()
470 wm8731->supplies); in wm8731_set_bias_level()
471 regcache_mark_dirty(wm8731->regmap); in wm8731_set_bias_level()
529 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_probe() local
532 codec->control_data = wm8731->regmap; in wm8731_probe()
539 for (i = 0; i < ARRAY_SIZE(wm8731->supplies); i++) in wm8731_probe()
540 wm8731->supplies[i].supply = wm8731_supply_names[i]; in wm8731_probe()
542 ret = regulator_bulk_get(codec->dev, ARRAY_SIZE(wm8731->supplies), in wm8731_probe()
543 wm8731->supplies); in wm8731_probe()
549 ret = regulator_bulk_enable(ARRAY_SIZE(wm8731->supplies), in wm8731_probe()
550 wm8731->supplies); in wm8731_probe()
574 regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); in wm8731_probe()
579 regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); in wm8731_probe()
581 regulator_bulk_free(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); in wm8731_probe()
589 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_remove() local
593 regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); in wm8731_remove()
594 regulator_bulk_free(ARRAY_SIZE(wm8731->supplies), wm8731->supplies); in wm8731_remove()
636 struct wm8731_priv *wm8731; in wm8731_spi_probe() local
639 wm8731 = devm_kzalloc(&spi->dev, sizeof(struct wm8731_priv), in wm8731_spi_probe()
641 if (wm8731 == NULL) in wm8731_spi_probe()
644 wm8731->regmap = devm_regmap_init_spi(spi, &wm8731_regmap); in wm8731_spi_probe()
645 if (IS_ERR(wm8731->regmap)) { in wm8731_spi_probe()
646 ret = PTR_ERR(wm8731->regmap); in wm8731_spi_probe()
652 spi_set_drvdata(spi, wm8731); in wm8731_spi_probe()
685 struct wm8731_priv *wm8731; in wm8731_i2c_probe() local
688 wm8731 = devm_kzalloc(&i2c->dev, sizeof(struct wm8731_priv), in wm8731_i2c_probe()
690 if (wm8731 == NULL) in wm8731_i2c_probe()
693 wm8731->regmap = devm_regmap_init_i2c(i2c, &wm8731_regmap); in wm8731_i2c_probe()
694 if (IS_ERR(wm8731->regmap)) { in wm8731_i2c_probe()
695 ret = PTR_ERR(wm8731->regmap); in wm8731_i2c_probe()
701 i2c_set_clientdata(i2c, wm8731); in wm8731_i2c_probe()