Lines Matching refs:tas2552
144 static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) in tas2552_sw_shutdown() argument
148 if (!tas2552->component) in tas2552_sw_shutdown()
154 snd_soc_component_update_bits(tas2552->component, TAS2552_CFG_1, TAS2552_SWS, in tas2552_sw_shutdown()
162 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_setup_pll() local
165 unsigned int pll_clkin = tas2552->pll_clkin; in tas2552_setup_pll()
169 if (tas2552->pll_clk_id != TAS2552_PLL_CLKIN_BCLK) in tas2552_setup_pll()
173 pll_clkin += tas2552->tdm_delay; in tas2552_setup_pll()
193 u8 pll_sel = (tas2552->pll_clk_id << 3) & TAS2552_PLL_SRC_MASK; in tas2552_setup_pll()
207 if (tas2552->pll_clk_id == TAS2552_PLL_CLKIN_BCLK) { in tas2552_setup_pll()
213 pll_clkin += tas2552->tdm_delay; in tas2552_setup_pll()
244 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_hw_params() local
251 cpf = 32 + tas2552->tdm_delay; in tas2552_hw_params()
255 cpf = 64 + tas2552->tdm_delay; in tas2552_hw_params()
259 cpf = 64 + tas2552->tdm_delay; in tas2552_hw_params()
263 cpf = 64 + tas2552->tdm_delay; in tas2552_hw_params()
333 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_prepare() local
337 if (tas2552->dai_fmt == SND_SOC_DAIFMT_DSP_A) in tas2552_prepare()
338 delay += (tas2552->tdm_delay + 1); in tas2552_prepare()
339 else if (tas2552->dai_fmt == SND_SOC_DAIFMT_DSP_B) in tas2552_prepare()
340 delay += tas2552->tdm_delay; in tas2552_prepare()
351 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_set_dai_fmt() local
390 tas2552->dai_fmt = fmt & SND_SOC_DAIFMT_FORMAT_MASK; in tas2552_set_dai_fmt()
401 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_set_dai_sysclk() local
420 tas2552->pll_clk_id = clk_id; in tas2552_set_dai_sysclk()
421 tas2552->pll_clkin = freq; in tas2552_set_dai_sysclk()
430 tas2552->pdm_clk_id = clk_id; in tas2552_set_dai_sysclk()
431 tas2552->pdm_clk = freq; in tas2552_set_dai_sysclk()
448 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_set_dai_tdm_slot() local
463 tas2552->tdm_delay = lsb * slot_width; in tas2552_set_dai_tdm_slot()
488 struct tas2552_data *tas2552 = dev_get_drvdata(dev); in tas2552_runtime_suspend() local
490 tas2552_sw_shutdown(tas2552, 1); in tas2552_runtime_suspend()
492 regcache_cache_only(tas2552->regmap, true); in tas2552_runtime_suspend()
493 regcache_mark_dirty(tas2552->regmap); in tas2552_runtime_suspend()
495 gpiod_set_value(tas2552->enable_gpio, 0); in tas2552_runtime_suspend()
502 struct tas2552_data *tas2552 = dev_get_drvdata(dev); in tas2552_runtime_resume() local
504 gpiod_set_value(tas2552->enable_gpio, 1); in tas2552_runtime_resume()
506 tas2552_sw_shutdown(tas2552, 0); in tas2552_runtime_resume()
508 regcache_cache_only(tas2552->regmap, false); in tas2552_runtime_resume()
509 regcache_sync(tas2552->regmap); in tas2552_runtime_resume()
579 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_component_probe() local
582 tas2552->component = component; in tas2552_component_probe()
584 ret = regulator_bulk_enable(ARRAY_SIZE(tas2552->supplies), in tas2552_component_probe()
585 tas2552->supplies); in tas2552_component_probe()
593 gpiod_set_value(tas2552->enable_gpio, 1); in tas2552_component_probe()
618 gpiod_set_value(tas2552->enable_gpio, 0); in tas2552_component_probe()
620 regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), in tas2552_component_probe()
621 tas2552->supplies); in tas2552_component_probe()
627 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_component_remove() local
631 gpiod_set_value(tas2552->enable_gpio, 0); in tas2552_component_remove()
637 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_suspend() local
640 ret = regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), in tas2552_suspend()
641 tas2552->supplies); in tas2552_suspend()
651 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_resume() local
654 ret = regulator_bulk_enable(ARRAY_SIZE(tas2552->supplies), in tas2552_resume()
655 tas2552->supplies); in tas2552_resume()