Lines Matching full:component

64 	struct snd_soc_component *component;  member
82 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in tas2552_post_event() local
86 snd_soc_component_write(component, TAS2552_RESERVED_0D, 0xc0); in tas2552_post_event()
87 snd_soc_component_update_bits(component, TAS2552_LIMIT_RATE_HYS, (1 << 5), in tas2552_post_event()
89 snd_soc_component_update_bits(component, TAS2552_CFG_2, 1, 0); in tas2552_post_event()
90 snd_soc_component_update_bits(component, TAS2552_CFG_1, TAS2552_SWS, 0); in tas2552_post_event()
93 snd_soc_component_update_bits(component, TAS2552_CFG_1, TAS2552_SWS, in tas2552_post_event()
95 snd_soc_component_update_bits(component, TAS2552_CFG_2, 1, 1); in tas2552_post_event()
96 snd_soc_component_update_bits(component, TAS2552_LIMIT_RATE_HYS, (1 << 5), 0); in tas2552_post_event()
97 snd_soc_component_write(component, TAS2552_RESERVED_0D, 0xbe); in tas2552_post_event()
146 if (!tas2552->component) in tas2552_sw_shutdown()
152 snd_soc_component_update_bits(tas2552->component, TAS2552_CFG_1, TAS2552_SWS, in tas2552_sw_shutdown()
157 static int tas2552_setup_pll(struct snd_soc_component *component, in tas2552_setup_pll() argument
160 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_setup_pll()
174 pll_enable = snd_soc_component_read(component, TAS2552_CFG_2) & TAS2552_PLL_ENABLE; in tas2552_setup_pll()
175 snd_soc_component_update_bits(component, TAS2552_CFG_2, TAS2552_PLL_ENABLE, 0); in tas2552_setup_pll()
182 snd_soc_component_update_bits(component, TAS2552_PLL_CTRL_2, in tas2552_setup_pll()
192 u8 p = snd_soc_component_read(component, TAS2552_PLL_CTRL_1); in tas2552_setup_pll()
218 snd_soc_component_update_bits(component, TAS2552_CFG_1, TAS2552_PLL_SRC_MASK, in tas2552_setup_pll()
221 snd_soc_component_update_bits(component, TAS2552_PLL_CTRL_1, in tas2552_setup_pll()
224 snd_soc_component_write(component, TAS2552_PLL_CTRL_2, in tas2552_setup_pll()
226 snd_soc_component_write(component, TAS2552_PLL_CTRL_3, in tas2552_setup_pll()
231 snd_soc_component_update_bits(component, TAS2552_CFG_2, TAS2552_PLL_ENABLE, in tas2552_setup_pll()
241 struct snd_soc_component *component = dai->component; in tas2552_hw_params() local
242 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_hw_params()
264 dev_err(component->dev, "Not supported sample size: %d\n", in tas2552_hw_params()
278 snd_soc_component_update_bits(component, TAS2552_SER_CTRL_1, in tas2552_hw_params()
313 dev_err(component->dev, "Not supported sample rate: %d\n", in tas2552_hw_params()
318 snd_soc_component_update_bits(component, TAS2552_CFG_3, TAS2552_WCLK_FREQ_MASK, in tas2552_hw_params()
321 return tas2552_setup_pll(component, params); in tas2552_hw_params()
330 struct snd_soc_component *component = dai->component; in tas2552_prepare() local
331 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_prepare()
341 snd_soc_component_write(component, TAS2552_SER_CTRL_2, delay); in tas2552_prepare()
348 struct snd_soc_component *component = dai->component; in tas2552_set_dai_fmt() local
349 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_set_dai_fmt()
366 dev_vdbg(component->dev, "DAI Format master is not found\n"); in tas2552_set_dai_fmt()
385 dev_vdbg(component->dev, "DAI Format is not found\n"); in tas2552_set_dai_fmt()
390 snd_soc_component_update_bits(component, TAS2552_SER_CTRL_1, TAS2552_DAI_FMT_MASK, in tas2552_set_dai_fmt()
398 struct snd_soc_component *component = dai->component; in tas2552_set_dai_sysclk() local
399 struct tas2552_data *tas2552 = dev_get_drvdata(component->dev); in tas2552_set_dai_sysclk()
407 dev_warn(component->dev, "Out of range PLL_CLKIN: %u\n", in tas2552_set_dai_sysclk()
432 dev_err(component->dev, "Invalid clk id: %d\n", clk_id); in tas2552_set_dai_sysclk()
436 snd_soc_component_update_bits(component, reg, mask, val); in tas2552_set_dai_sysclk()
445 struct snd_soc_component *component = dai->component; in tas2552_set_dai_tdm_slot() local
446 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_set_dai_tdm_slot()
450 dev_err(component->dev, "tx masks need to be non 0\n"); in tas2552_set_dai_tdm_slot()
457 dev_err(component->dev, "Invalid mask, slots must be adjacent\n"); in tas2552_set_dai_tdm_slot()
464 snd_soc_component_update_bits(component, TAS2552_DOUT, in tas2552_set_dai_tdm_slot()
473 struct snd_soc_component *component = dai->component; in tas2552_mute() local
478 snd_soc_component_update_bits(component, TAS2552_CFG_1, TAS2552_MUTE, cfg1_reg); in tas2552_mute()
575 static int tas2552_component_probe(struct snd_soc_component *component) in tas2552_component_probe() argument
577 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_component_probe()
580 tas2552->component = component; in tas2552_component_probe()
586 dev_err(component->dev, "Failed to enable supplies: %d\n", in tas2552_component_probe()
593 ret = pm_runtime_resume_and_get(component->dev); in tas2552_component_probe()
595 dev_err(component->dev, "Enabling device failed: %d\n", in tas2552_component_probe()
600 snd_soc_component_update_bits(component, TAS2552_CFG_1, TAS2552_MUTE, TAS2552_MUTE); in tas2552_component_probe()
601 snd_soc_component_write(component, TAS2552_CFG_3, TAS2552_I2S_OUT_SEL | in tas2552_component_probe()
603 snd_soc_component_write(component, TAS2552_OUTPUT_DATA, in tas2552_component_probe()
606 snd_soc_component_write(component, TAS2552_BOOST_APT_CTRL, TAS2552_APT_DELAY_200 | in tas2552_component_probe()
609 snd_soc_component_write(component, TAS2552_CFG_2, TAS2552_BOOST_EN | TAS2552_APT_EN | in tas2552_component_probe()
615 pm_runtime_put_noidle(component->dev); in tas2552_component_probe()
623 static void tas2552_component_remove(struct snd_soc_component *component) in tas2552_component_remove() argument
625 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_component_remove()
627 pm_runtime_put(component->dev); in tas2552_component_remove()
633 static int tas2552_suspend(struct snd_soc_component *component) in tas2552_suspend() argument
635 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_suspend()
642 dev_err(component->dev, "Failed to disable supplies: %d\n", in tas2552_suspend()
647 static int tas2552_resume(struct snd_soc_component *component) in tas2552_resume() argument
649 struct tas2552_data *tas2552 = snd_soc_component_get_drvdata(component); in tas2552_resume()
656 dev_err(component->dev, "Failed to enable supplies: %d\n", in tas2552_resume()
741 dev_err(&client->dev, "Failed to register component: %d\n", ret); in tas2552_probe()