Lines Matching refs:rt5616
961 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_hw_params() local
965 rt5616->lrck[dai->id] = params_rate(params); in rt5616_hw_params()
967 pre_div = rl6231_get_clk_info(rt5616->sysclk, rt5616->lrck[dai->id]); in rt5616_hw_params()
979 rt5616->bclk[dai->id] = rt5616->lrck[dai->id] * (32 << bclk_ms); in rt5616_hw_params()
982 rt5616->bclk[dai->id], rt5616->lrck[dai->id]); in rt5616_hw_params()
1014 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_set_dai_fmt() local
1019 rt5616->master[dai->id] = 1; in rt5616_set_dai_fmt()
1023 rt5616->master[dai->id] = 0; in rt5616_set_dai_fmt()
1066 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_set_dai_sysclk() local
1069 if (freq == rt5616->sysclk && clk_id == rt5616->sysclk_src) in rt5616_set_dai_sysclk()
1086 rt5616->sysclk = freq; in rt5616_set_dai_sysclk()
1087 rt5616->sysclk_src = clk_id; in rt5616_set_dai_sysclk()
1098 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_set_dai_pll() local
1102 if (source == rt5616->pll_src && freq_in == rt5616->pll_in && in rt5616_set_dai_pll()
1103 freq_out == rt5616->pll_out) in rt5616_set_dai_pll()
1109 rt5616->pll_in = 0; in rt5616_set_dai_pll()
1110 rt5616->pll_out = 0; in rt5616_set_dai_pll()
1151 rt5616->pll_in = freq_in; in rt5616_set_dai_pll()
1152 rt5616->pll_out = freq_out; in rt5616_set_dai_pll()
1153 rt5616->pll_src = source; in rt5616_set_dai_pll()
1161 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_set_bias_level() local
1178 clk_disable_unprepare(rt5616->mclk); in rt5616_set_bias_level()
1180 ret = clk_prepare_enable(rt5616->mclk); in rt5616_set_bias_level()
1222 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_probe() local
1225 rt5616->mclk = devm_clk_get_optional(component->dev, "mclk"); in rt5616_probe()
1226 if (IS_ERR(rt5616->mclk)) in rt5616_probe()
1227 return PTR_ERR(rt5616->mclk); in rt5616_probe()
1229 rt5616->component = component; in rt5616_probe()
1237 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_suspend() local
1239 regcache_cache_only(rt5616->regmap, true); in rt5616_suspend()
1240 regcache_mark_dirty(rt5616->regmap); in rt5616_suspend()
1247 struct rt5616_priv *rt5616 = snd_soc_component_get_drvdata(component); in rt5616_resume() local
1249 regcache_cache_only(rt5616->regmap, false); in rt5616_resume()
1250 regcache_sync(rt5616->regmap); in rt5616_resume()
1338 struct rt5616_priv *rt5616; in rt5616_i2c_probe() local
1342 rt5616 = devm_kzalloc(&i2c->dev, sizeof(struct rt5616_priv), in rt5616_i2c_probe()
1344 if (!rt5616) in rt5616_i2c_probe()
1347 i2c_set_clientdata(i2c, rt5616); in rt5616_i2c_probe()
1349 rt5616->regmap = devm_regmap_init_i2c(i2c, &rt5616_regmap); in rt5616_i2c_probe()
1350 if (IS_ERR(rt5616->regmap)) { in rt5616_i2c_probe()
1351 ret = PTR_ERR(rt5616->regmap); in rt5616_i2c_probe()
1357 regmap_read(rt5616->regmap, RT5616_DEVICE_ID, &val); in rt5616_i2c_probe()
1364 regmap_write(rt5616->regmap, RT5616_RESET, 0); in rt5616_i2c_probe()
1365 regmap_update_bits(rt5616->regmap, RT5616_PWR_ANLG1, in rt5616_i2c_probe()
1371 regmap_update_bits(rt5616->regmap, RT5616_PWR_ANLG1, in rt5616_i2c_probe()
1375 ret = regmap_register_patch(rt5616->regmap, init_list, in rt5616_i2c_probe()
1380 regmap_update_bits(rt5616->regmap, RT5616_PWR_ANLG1, in rt5616_i2c_probe()
1393 struct rt5616_priv *rt5616 = i2c_get_clientdata(client); in rt5616_i2c_shutdown() local
1395 regmap_write(rt5616->regmap, RT5616_HP_VOL, 0xc8c8); in rt5616_i2c_shutdown()
1396 regmap_write(rt5616->regmap, RT5616_LOUT_CTRL1, 0xc8c8); in rt5616_i2c_shutdown()