• Home
  • Raw
  • Download

Lines Matching refs:wm8960

173 	struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec);  in wm8960_set_deemph()  local
179 if (wm8960->deemph) { in wm8960_set_deemph()
182 if (abs(deemph_settings[i] - wm8960->lrclk) < in wm8960_set_deemph()
183 abs(deemph_settings[best] - wm8960->lrclk)) in wm8960_set_deemph()
202 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_get_deemph() local
204 ucontrol->value.integer.value[0] = wm8960->deemph; in wm8960_get_deemph()
212 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_put_deemph() local
218 wm8960->deemph = deemph; in wm8960_put_deemph()
475 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_add_widgets() local
476 struct wm8960_data *pdata = &wm8960->pdata; in wm8960_add_widgets()
511 wm8960->lout1 = w; in wm8960_add_widgets()
513 wm8960->rout1 = w; in wm8960_add_widgets()
515 wm8960->out3 = w; in wm8960_add_widgets()
609 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_configure_clocking() local
620 if (wm8960->clk_id != WM8960_SYSCLK_MCLK && !wm8960->freq_in) { in wm8960_configure_clocking()
625 freq_in = wm8960->freq_in; in wm8960_configure_clocking()
626 bclk = wm8960->bclk; in wm8960_configure_clocking()
627 lrclk = wm8960->lrclk; in wm8960_configure_clocking()
634 if (wm8960->clk_id == WM8960_SYSCLK_AUTO) { in wm8960_configure_clocking()
638 } else if (wm8960->sysclk) { in wm8960_configure_clocking()
639 freq_out = wm8960->sysclk; in wm8960_configure_clocking()
645 if (wm8960->clk_id != WM8960_SYSCLK_PLL) { in wm8960_configure_clocking()
666 } else if (wm8960->clk_id != WM8960_SYSCLK_AUTO) { in wm8960_configure_clocking()
720 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_hw_params() local
725 wm8960->bclk = snd_soc_params_to_bclk(params); in wm8960_hw_params()
727 wm8960->bclk *= 2; in wm8960_hw_params()
751 wm8960->lrclk = params_rate(params); in wm8960_hw_params()
766 wm8960->is_stream_in_use[tx] = true; in wm8960_hw_params()
769 !wm8960->is_stream_in_use[!tx]) in wm8960_hw_params()
779 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_hw_free() local
782 wm8960->is_stream_in_use[tx] = false; in wm8960_hw_free()
801 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_bias_level_out3() local
812 if (!IS_ERR(wm8960->mclk)) { in wm8960_set_bias_level_out3()
813 ret = clk_prepare_enable(wm8960->mclk); in wm8960_set_bias_level_out3()
835 if (wm8960->clk_id == WM8960_SYSCLK_AUTO && (pm2 & 0x1)) in wm8960_set_bias_level_out3()
838 if (!IS_ERR(wm8960->mclk)) in wm8960_set_bias_level_out3()
839 clk_disable_unprepare(wm8960->mclk); in wm8960_set_bias_level_out3()
850 regcache_sync(wm8960->regmap); in wm8960_set_bias_level_out3()
891 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_bias_level_capless() local
911 if (wm8960->lout1 && wm8960->lout1->power) in wm8960_set_bias_level_capless()
913 if (wm8960->rout1 && wm8960->rout1->power) in wm8960_set_bias_level_capless()
915 if (wm8960->out3 && wm8960->out3->power) in wm8960_set_bias_level_capless()
935 if (!IS_ERR(wm8960->mclk)) { in wm8960_set_bias_level_capless()
936 ret = clk_prepare_enable(wm8960->mclk); in wm8960_set_bias_level_capless()
956 if (wm8960->clk_id == WM8960_SYSCLK_AUTO && (pm2 & 0x1)) in wm8960_set_bias_level_capless()
959 if (!IS_ERR(wm8960->mclk)) in wm8960_set_bias_level_capless()
960 clk_disable_unprepare(wm8960->mclk); in wm8960_set_bias_level_capless()
975 regcache_sync(wm8960->regmap); in wm8960_set_bias_level_capless()
1136 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_dai_pll() local
1138 wm8960->freq_in = freq_in; in wm8960_set_dai_pll()
1183 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_bias_level() local
1185 return wm8960->set_bias_level(codec, level); in wm8960_set_bias_level()
1192 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_dai_sysclk() local
1209 wm8960->sysclk = freq; in wm8960_set_dai_sysclk()
1210 wm8960->clk_id = clk_id; in wm8960_set_dai_sysclk()
1251 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_probe() local
1252 struct wm8960_data *pdata = &wm8960->pdata; in wm8960_probe()
1255 wm8960->set_bias_level = wm8960_set_bias_level_capless; in wm8960_probe()
1257 wm8960->set_bias_level = wm8960_set_bias_level_out3; in wm8960_probe()
1300 struct wm8960_priv *wm8960; in wm8960_i2c_probe() local
1303 wm8960 = devm_kzalloc(&i2c->dev, sizeof(struct wm8960_priv), in wm8960_i2c_probe()
1305 if (wm8960 == NULL) in wm8960_i2c_probe()
1308 wm8960->mclk = devm_clk_get(&i2c->dev, "mclk"); in wm8960_i2c_probe()
1309 if (IS_ERR(wm8960->mclk)) { in wm8960_i2c_probe()
1310 if (PTR_ERR(wm8960->mclk) == -EPROBE_DEFER) in wm8960_i2c_probe()
1314 wm8960->regmap = devm_regmap_init_i2c(i2c, &wm8960_regmap); in wm8960_i2c_probe()
1315 if (IS_ERR(wm8960->regmap)) in wm8960_i2c_probe()
1316 return PTR_ERR(wm8960->regmap); in wm8960_i2c_probe()
1319 memcpy(&wm8960->pdata, pdata, sizeof(struct wm8960_data)); in wm8960_i2c_probe()
1321 wm8960_set_pdata_from_of(i2c, &wm8960->pdata); in wm8960_i2c_probe()
1323 ret = wm8960_reset(wm8960->regmap); in wm8960_i2c_probe()
1329 if (wm8960->pdata.shared_lrclk) { in wm8960_i2c_probe()
1330 ret = regmap_update_bits(wm8960->regmap, WM8960_ADDCTL2, in wm8960_i2c_probe()
1340 regmap_update_bits(wm8960->regmap, WM8960_LINVOL, 0x100, 0x100); in wm8960_i2c_probe()
1341 regmap_update_bits(wm8960->regmap, WM8960_RINVOL, 0x100, 0x100); in wm8960_i2c_probe()
1342 regmap_update_bits(wm8960->regmap, WM8960_LADC, 0x100, 0x100); in wm8960_i2c_probe()
1343 regmap_update_bits(wm8960->regmap, WM8960_RADC, 0x100, 0x100); in wm8960_i2c_probe()
1344 regmap_update_bits(wm8960->regmap, WM8960_LDAC, 0x100, 0x100); in wm8960_i2c_probe()
1345 regmap_update_bits(wm8960->regmap, WM8960_RDAC, 0x100, 0x100); in wm8960_i2c_probe()
1346 regmap_update_bits(wm8960->regmap, WM8960_LOUT1, 0x100, 0x100); in wm8960_i2c_probe()
1347 regmap_update_bits(wm8960->regmap, WM8960_ROUT1, 0x100, 0x100); in wm8960_i2c_probe()
1348 regmap_update_bits(wm8960->regmap, WM8960_LOUT2, 0x100, 0x100); in wm8960_i2c_probe()
1349 regmap_update_bits(wm8960->regmap, WM8960_ROUT2, 0x100, 0x100); in wm8960_i2c_probe()
1351 i2c_set_clientdata(i2c, wm8960); in wm8960_i2c_probe()