Lines Matching refs:rt1015

432 	struct rt1015_priv *rt1015 =  in rt1015_boost_mode_get()  local
435 ucontrol->value.integer.value[0] = rt1015->boost_mode; in rt1015_boost_mode_get()
445 struct rt1015_priv *rt1015 = in rt1015_boost_mode_put() local
476 rt1015->boost_mode = boost_mode; in rt1015_boost_mode_put()
486 struct rt1015_priv *rt1015 = in rt1015_bypass_boost_get() local
489 ucontrol->value.integer.value[0] = rt1015->bypass_boost; in rt1015_bypass_boost_get()
494 static void rt1015_calibrate(struct rt1015_priv *rt1015) in rt1015_calibrate() argument
496 struct snd_soc_component *component = rt1015->component; in rt1015_calibrate()
497 struct regmap *regmap = rt1015->regmap; in rt1015_calibrate()
529 struct rt1015_priv *rt1015 = in rt1015_bypass_boost_put() local
532 if (rt1015->dac_is_used) { in rt1015_bypass_boost_put()
537 rt1015->bypass_boost = ucontrol->value.integer.value[0]; in rt1015_bypass_boost_put()
538 if (rt1015->bypass_boost == RT1015_Bypass_Boost && in rt1015_bypass_boost_put()
539 !rt1015->cali_done) { in rt1015_bypass_boost_put()
540 rt1015_calibrate(rt1015); in rt1015_bypass_boost_put()
541 rt1015->cali_done = 1; in rt1015_bypass_boost_put()
543 regmap_write(rt1015->regmap, RT1015_MONO_DYNA_CTRL, 0x0010); in rt1015_bypass_boost_put()
579 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_is_sys_clk_from_pll() local
581 if (rt1015->sysclk_src == RT1015_SCLK_S_PLL) in rt1015_is_sys_clk_from_pll()
592 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in r1015_dac_event() local
596 rt1015->dac_is_used = 1; in r1015_dac_event()
597 if (rt1015->bypass_boost == RT1015_Enable_Boost) { in r1015_dac_event()
621 if (rt1015->bypass_boost == RT1015_Enable_Boost) { in r1015_dac_event()
638 rt1015->dac_is_used = 0; in r1015_dac_event()
652 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_amp_drv_event() local
671 msleep(rt1015->pdata.power_up_delay_ms); in rt1015_amp_drv_event()
703 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_hw_params() local
708 pre_div = rl6231_get_clk_info(rt1015->sysclk, lrck); in rt1015_hw_params()
808 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_set_component_sysclk() local
811 if (freq == rt1015->sysclk && clk_id == rt1015->sysclk_src) in rt1015_set_component_sysclk()
828 rt1015->sysclk = freq; in rt1015_set_component_sysclk()
829 rt1015->sysclk_src = clk_id; in rt1015_set_component_sysclk()
844 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_set_component_pll() local
851 rt1015->pll_in = 0; in rt1015_set_component_pll()
852 rt1015->pll_out = 0; in rt1015_set_component_pll()
857 if (source == rt1015->pll_src && freq_in == rt1015->pll_in && in rt1015_set_component_pll()
858 freq_out == rt1015->pll_out) in rt1015_set_component_pll()
894 rt1015->pll_in = freq_in; in rt1015_set_component_pll()
895 rt1015->pll_out = freq_out; in rt1015_set_component_pll()
896 rt1015->pll_src = source; in rt1015_set_component_pll()
1003 struct rt1015_priv *rt1015 = in rt1015_probe() local
1006 rt1015->component = component; in rt1015_probe()
1013 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_remove() local
1015 regmap_write(rt1015->regmap, RT1015_RESET, 0); in rt1015_remove()
1046 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_suspend() local
1048 regcache_cache_only(rt1015->regmap, true); in rt1015_suspend()
1049 regcache_mark_dirty(rt1015->regmap); in rt1015_suspend()
1056 struct rt1015_priv *rt1015 = snd_soc_component_get_drvdata(component); in rt1015_resume() local
1058 regcache_cache_only(rt1015->regmap, false); in rt1015_resume()
1059 regcache_sync(rt1015->regmap); in rt1015_resume()
1061 if (rt1015->cali_done) in rt1015_resume()
1062 rt1015_calibrate(rt1015); in rt1015_resume()
1121 static void rt1015_parse_dt(struct rt1015_priv *rt1015, struct device *dev) in rt1015_parse_dt() argument
1124 &rt1015->pdata.power_up_delay_ms); in rt1015_parse_dt()
1130 struct rt1015_priv *rt1015; in rt1015_i2c_probe() local
1134 rt1015 = devm_kzalloc(&i2c->dev, sizeof(*rt1015), GFP_KERNEL); in rt1015_i2c_probe()
1135 if (!rt1015) in rt1015_i2c_probe()
1138 i2c_set_clientdata(i2c, rt1015); in rt1015_i2c_probe()
1140 rt1015->pdata = i2s_default_platform_data; in rt1015_i2c_probe()
1143 rt1015->pdata = *pdata; in rt1015_i2c_probe()
1145 rt1015_parse_dt(rt1015, &i2c->dev); in rt1015_i2c_probe()
1147 rt1015->regmap = devm_regmap_init_i2c(i2c, &rt1015_regmap); in rt1015_i2c_probe()
1148 if (IS_ERR(rt1015->regmap)) { in rt1015_i2c_probe()
1149 ret = PTR_ERR(rt1015->regmap); in rt1015_i2c_probe()
1155 ret = regmap_read(rt1015->regmap, RT1015_DEVICE_ID, &val); in rt1015_i2c_probe()
1174 struct rt1015_priv *rt1015 = i2c_get_clientdata(client); in rt1015_i2c_shutdown() local
1176 regmap_write(rt1015->regmap, RT1015_RESET, 0); in rt1015_i2c_shutdown()