Lines Matching refs:tas2552
140 static void tas2552_sw_shutdown(struct tas2552_data *tas2552, int sw_shutdown) in tas2552_sw_shutdown() argument
144 if (!tas2552->component) in tas2552_sw_shutdown()
150 snd_soc_component_update_bits(tas2552->component, TAS2552_CFG_1, TAS2552_SWS, in tas2552_sw_shutdown()
158 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_setup_pll() local
161 unsigned int pll_clkin = tas2552->pll_clkin; in tas2552_setup_pll()
165 if (tas2552->pll_clk_id != TAS2552_PLL_CLKIN_BCLK) in tas2552_setup_pll()
169 pll_clkin += tas2552->tdm_delay; in tas2552_setup_pll()
189 u8 pll_sel = (tas2552->pll_clk_id << 3) & TAS2552_PLL_SRC_MASK; in tas2552_setup_pll()
203 if (tas2552->pll_clk_id == TAS2552_PLL_CLKIN_BCLK) { in tas2552_setup_pll()
209 pll_clkin += tas2552->tdm_delay; in tas2552_setup_pll()
240 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_hw_params() local
247 cpf = 32 + tas2552->tdm_delay; in tas2552_hw_params()
251 cpf = 64 + 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()
329 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_prepare() local
333 if (tas2552->dai_fmt == SND_SOC_DAIFMT_DSP_A) in tas2552_prepare()
334 delay += (tas2552->tdm_delay + 1); in tas2552_prepare()
335 else if (tas2552->dai_fmt == SND_SOC_DAIFMT_DSP_B) in tas2552_prepare()
336 delay += tas2552->tdm_delay; in tas2552_prepare()
347 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_set_dai_fmt() local
386 tas2552->dai_fmt = fmt & SND_SOC_DAIFMT_FORMAT_MASK; in tas2552_set_dai_fmt()
397 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_set_dai_sysclk() local
416 tas2552->pll_clk_id = clk_id; in tas2552_set_dai_sysclk()
417 tas2552->pll_clkin = freq; in tas2552_set_dai_sysclk()
426 tas2552->pdm_clk_id = clk_id; in tas2552_set_dai_sysclk()
427 tas2552->pdm_clk = freq; in tas2552_set_dai_sysclk()
444 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_set_dai_tdm_slot() local
459 tas2552->tdm_delay = lsb * slot_width; in tas2552_set_dai_tdm_slot()
484 struct tas2552_data *tas2552 = dev_get_drvdata(dev); in tas2552_runtime_suspend() local
486 tas2552_sw_shutdown(tas2552, 1); in tas2552_runtime_suspend()
488 regcache_cache_only(tas2552->regmap, true); in tas2552_runtime_suspend()
489 regcache_mark_dirty(tas2552->regmap); in tas2552_runtime_suspend()
491 gpiod_set_value(tas2552->enable_gpio, 0); in tas2552_runtime_suspend()
498 struct tas2552_data *tas2552 = dev_get_drvdata(dev); in tas2552_runtime_resume() local
500 gpiod_set_value(tas2552->enable_gpio, 1); in tas2552_runtime_resume()
502 tas2552_sw_shutdown(tas2552, 0); in tas2552_runtime_resume()
504 regcache_cache_only(tas2552->regmap, false); in tas2552_runtime_resume()
505 regcache_sync(tas2552->regmap); in tas2552_runtime_resume()
568 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_component_probe() local
571 tas2552->component = component; in tas2552_component_probe()
573 ret = regulator_bulk_enable(ARRAY_SIZE(tas2552->supplies), in tas2552_component_probe()
574 tas2552->supplies); in tas2552_component_probe()
582 gpiod_set_value(tas2552->enable_gpio, 1); in tas2552_component_probe()
607 gpiod_set_value(tas2552->enable_gpio, 0); in tas2552_component_probe()
609 regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), in tas2552_component_probe()
610 tas2552->supplies); in tas2552_component_probe()
616 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_component_remove() local
620 gpiod_set_value(tas2552->enable_gpio, 0); in tas2552_component_remove()
626 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_suspend() local
629 ret = regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), in tas2552_suspend()
630 tas2552->supplies); in tas2552_suspend()
640 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_resume() local
643 ret = regulator_bulk_enable(ARRAY_SIZE(tas2552->supplies), in tas2552_resume()
644 tas2552->supplies); in tas2552_resume()