[PATCH] ASoC: stm32: sai: manage context in set_sysclk callback
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Sep 16 17:32:11 PDT 2025
Hi Olivier
Thank you for your feedback
> Here is feedback regarding commit 5725bce709db1c001140d79398581e067e28c031
> ASoC: simple-card-utils: Unify clock direction by clk_direction
(snip)
> To accommodate the change introduced by this commit, I added the property
> "system-clock-direction-out" in the SAI device tree node.
(snip)
> * Before the change:
> - Initialization:
> simple_init_dai() -> set_sysclk(id=0, freq=sai_ck freq, dir=out)
> Calls clk_set_rate_exclusive()
> simple_util_shutdown() -> set_sysclk(id=0, freq=0, dir=out)
> Calls clk_rate_exclusive_put() (releases the mclk clock)
Here, about "Before the change". Does this "change" mean "before adding
system-clock-direction-out" or "before commit 5725bce709db1..." ?
> * After the change:
> - Initialization:
> simple_init_dai() -> set_sysclk(id=0, freq=sai_ck freq, dir=out)
> Calls clk_set_rate_exclusive()
> simple_util_shutdown() -> set_sysclk(id=0, freq=0, dir=in)
> clk_rate_exclusive_put() NOT called (mclk clock is not released)
Hmm...
If it was latest kernel, and if you added "system-clock-direction-out" in DT,
dir should be "out" in my understanding. dir=in means it doesn't have
"system-clock-direction-out".
And, dir will not be changed (out/in) in init / shutdown.
Are these same DAI ? Both "struct snd_soc_dai" and "struct simple_util_dai"
have "*name". Could you please double-check it ?
Thank you for your help !!
Best regards
---
Kuninori Morimoto
More information about the linux-arm-kernel
mailing list