Lines Matching defs:rt1016

3 // rt1016.c  --  RT1016 ALSA SoC audio amplifier driver
28 #include "rt1016.h"
180 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
182 if (rt1016->sysclk_src == RT1016_SCLK_S_PLL)
308 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
312 rt1016->lrck = params_rate(params);
313 pre_div = rl6231_get_clk_info(rt1016->sysclk, rt1016->lrck);
327 rt1016->bclk = rt1016->lrck * (32 << bclk_ms);
329 if (bclk_ms && rt1016->master)
334 rt1016->lrck, pre_div, dai->id);
366 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
372 rt1016->master = 1;
421 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
424 if (freq == rt1016->sysclk && clk_id == rt1016->sysclk_src)
441 rt1016->sysclk = freq;
442 rt1016->sysclk_src = clk_id;
457 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
464 rt1016->pll_in = 0;
465 rt1016->pll_out = 0;
470 if (source == rt1016->pll_src && freq_in == rt1016->pll_in &&
471 freq_out == rt1016->pll_out)
509 rt1016->pll_in = freq_in;
510 rt1016->pll_out = freq_out;
511 rt1016->pll_src = source;
518 struct rt1016_priv *rt1016 =
521 rt1016->component = component;
528 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
530 regmap_write(rt1016->regmap, RT1016_RESET, 0);
544 .name = "rt1016-aif",
560 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
562 regcache_cache_only(rt1016->regmap, true);
563 regcache_mark_dirty(rt1016->regmap);
570 struct rt1016_priv *rt1016 = snd_soc_component_get_drvdata(component);
572 regcache_cache_only(rt1016->regmap, false);
573 regcache_sync(rt1016->regmap);
611 { "rt1016", 0 },
618 { .compatible = "realtek,rt1016", },
634 struct rt1016_priv *rt1016;
638 rt1016 = devm_kzalloc(&i2c->dev, sizeof(struct rt1016_priv),
640 if (rt1016 == NULL)
643 i2c_set_clientdata(i2c, rt1016);
645 rt1016->regmap = devm_regmap_init_i2c(i2c, &rt1016_regmap);
646 if (IS_ERR(rt1016->regmap)) {
647 ret = PTR_ERR(rt1016->regmap);
653 regmap_read(rt1016->regmap, RT1016_DEVICE_ID, &val);
656 "Device with ID register %x is not rt1016\n", val);
660 regmap_write(rt1016->regmap, RT1016_RESET, 0);
662 ret = regmap_register_patch(rt1016->regmap, rt1016_patch,
674 struct rt1016_priv *rt1016 = i2c_get_clientdata(client);
676 regmap_write(rt1016->regmap, RT1016_RESET, 0);
681 .name = "rt1016",