6 Jul
2022
6 Jul
'22
3:07 p.m.
On Wed, Jul 06, 2022 at 05:57:21PM +0800, Raphael-Xu wrote:
- snd_soc_component_write(tas2780->component, TAS2780_SW_RST,
TAS2780_RST);
- if (ret) {
dev_err(tas2780->dev,
"%s:errCode:0x%x Reset error!\n",
__func__, ret);
That's still a very strange style of logging for the kernel.
snd_soc_dapm_to_component(w->dapm);
- struct tas2780_priv *tas2780 =
snd_soc_component_get_drvdata(component);
- int ret = 0;
- switch (event) {
- case SND_SOC_DAPM_PRE_PMU:
ret = snd_soc_component_update_bits(component,
TAS2780_CLK_CFG, TAS2780_CLK_CFG_MASK,
TAS2780_CLK_CFG_ENABLE);
break;
- default:
dev_err(tas2780->dev, "Unsupported event\n");
ret = -EINVAL;
- }
- if (ret < 0) {
This will turn the clocks on the first time the DAC is turned on and I can't see anything that ever turns them off again? If it's sensible to leave them on then it'd be simpler to just turn them on during probe and then leave them on.