Lines Matching refs:wm8960

156 	struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);  in wm8960_set_deemph()  local
162 if (wm8960->deemph) { in wm8960_set_deemph()
165 if (abs(deemph_settings[i] - wm8960->playback_fs) < in wm8960_set_deemph()
166 abs(deemph_settings[best] - wm8960->playback_fs)) in wm8960_set_deemph()
185 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_get_deemph() local
187 ucontrol->value.integer.value[0] = wm8960->deemph; in wm8960_get_deemph()
195 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_put_deemph() local
201 wm8960->deemph = deemph; in wm8960_put_deemph()
446 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_add_widgets() local
447 struct wm8960_data *pdata = &wm8960->pdata; in wm8960_add_widgets()
482 wm8960->lout1 = w; in wm8960_add_widgets()
484 wm8960->rout1 = w; in wm8960_add_widgets()
486 wm8960->out3 = w; in wm8960_add_widgets()
571 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_hw_params() local
593 wm8960->playback_fs = params_rate(params); in wm8960_hw_params()
622 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_bias_level_out3() local
632 if (!IS_ERR(wm8960->mclk)) { in wm8960_set_bias_level_out3()
633 ret = clk_prepare_enable(wm8960->mclk); in wm8960_set_bias_level_out3()
647 if (!IS_ERR(wm8960->mclk)) in wm8960_set_bias_level_out3()
648 clk_disable_unprepare(wm8960->mclk); in wm8960_set_bias_level_out3()
659 regcache_sync(wm8960->regmap); in wm8960_set_bias_level_out3()
702 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_bias_level_capless() local
721 if (wm8960->lout1 && wm8960->lout1->power) in wm8960_set_bias_level_capless()
723 if (wm8960->rout1 && wm8960->rout1->power) in wm8960_set_bias_level_capless()
725 if (wm8960->out3 && wm8960->out3->power) in wm8960_set_bias_level_capless()
745 if (!IS_ERR(wm8960->mclk)) { in wm8960_set_bias_level_capless()
746 ret = clk_prepare_enable(wm8960->mclk); in wm8960_set_bias_level_capless()
757 if (!IS_ERR(wm8960->mclk)) in wm8960_set_bias_level_capless()
758 clk_disable_unprepare(wm8960->mclk); in wm8960_set_bias_level_capless()
773 regcache_sync(wm8960->regmap); in wm8960_set_bias_level_capless()
948 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_bias_level() local
950 return wm8960->set_bias_level(codec, level); in wm8960_set_bias_level()
987 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_probe() local
988 struct wm8960_data *pdata = &wm8960->pdata; in wm8960_probe()
991 wm8960->set_bias_level = wm8960_set_bias_level_capless; in wm8960_probe()
993 wm8960->set_bias_level = wm8960_set_bias_level_out3; in wm8960_probe()
1036 struct wm8960_priv *wm8960; in wm8960_i2c_probe() local
1039 wm8960 = devm_kzalloc(&i2c->dev, sizeof(struct wm8960_priv), in wm8960_i2c_probe()
1041 if (wm8960 == NULL) in wm8960_i2c_probe()
1044 wm8960->mclk = devm_clk_get(&i2c->dev, "mclk"); in wm8960_i2c_probe()
1045 if (IS_ERR(wm8960->mclk)) { in wm8960_i2c_probe()
1046 if (PTR_ERR(wm8960->mclk) == -EPROBE_DEFER) in wm8960_i2c_probe()
1050 wm8960->regmap = devm_regmap_init_i2c(i2c, &wm8960_regmap); in wm8960_i2c_probe()
1051 if (IS_ERR(wm8960->regmap)) in wm8960_i2c_probe()
1052 return PTR_ERR(wm8960->regmap); in wm8960_i2c_probe()
1055 memcpy(&wm8960->pdata, pdata, sizeof(struct wm8960_data)); in wm8960_i2c_probe()
1057 wm8960_set_pdata_from_of(i2c, &wm8960->pdata); in wm8960_i2c_probe()
1059 ret = wm8960_reset(wm8960->regmap); in wm8960_i2c_probe()
1065 if (wm8960->pdata.shared_lrclk) { in wm8960_i2c_probe()
1066 ret = regmap_update_bits(wm8960->regmap, WM8960_ADDCTL2, in wm8960_i2c_probe()
1076 regmap_update_bits(wm8960->regmap, WM8960_LINVOL, 0x100, 0x100); in wm8960_i2c_probe()
1077 regmap_update_bits(wm8960->regmap, WM8960_RINVOL, 0x100, 0x100); in wm8960_i2c_probe()
1078 regmap_update_bits(wm8960->regmap, WM8960_LADC, 0x100, 0x100); in wm8960_i2c_probe()
1079 regmap_update_bits(wm8960->regmap, WM8960_RADC, 0x100, 0x100); in wm8960_i2c_probe()
1080 regmap_update_bits(wm8960->regmap, WM8960_LDAC, 0x100, 0x100); in wm8960_i2c_probe()
1081 regmap_update_bits(wm8960->regmap, WM8960_RDAC, 0x100, 0x100); in wm8960_i2c_probe()
1082 regmap_update_bits(wm8960->regmap, WM8960_LOUT1, 0x100, 0x100); in wm8960_i2c_probe()
1083 regmap_update_bits(wm8960->regmap, WM8960_ROUT1, 0x100, 0x100); in wm8960_i2c_probe()
1084 regmap_update_bits(wm8960->regmap, WM8960_LOUT2, 0x100, 0x100); in wm8960_i2c_probe()
1085 regmap_update_bits(wm8960->regmap, WM8960_ROUT2, 0x100, 0x100); in wm8960_i2c_probe()
1087 i2c_set_clientdata(i2c, wm8960); in wm8960_i2c_probe()