[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <875xdgpmq6.wl-kuninori.morimoto.gx@renesas.com>
Date: Thu, 18 Sep 2025 01:34:41 +0000
From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
To: Olivier MOYSAN <olivier.moysan@...s.st.com>
Cc: Arnaud Pouliquen <arnaud.pouliquen@...s.st.com>,
Liam Girdwood
<lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela
<perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Maxime Coquelin
<mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
<linux-sound@...r.kernel.org>,
<linux-stm32@...md-mailman.stormreply.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: stm32: sai: manage context in set_sysclk callback
Hi Olivier
Thank you for clarify the situation
> Looking at the traces (see below), initially, we had one call with the
> 'in' direction (kernel clock frequency) and one call with the 'out'
> direction.
(snip)
> Now, both calls have the 'out' direction when the property
> 'system-clock-direction-out' is set. This seems more consistent with the
> changes from commit 5725bce709db1.
Ah.. simple-card-utils calls snd_soc_dai_set_sysclk() from 3 functions
- simple_init_dai()
- simple_util_hw_params()
- simple_util_shutdown()
but its "direction" is...
Step0:
Before
a728f56094e7cf60a1dc0642fe86901d1a4dfb4e
("ASoC: make clock direction configurable in asoc-simple")
- simple_init_dai() fixed: 0
- simple_util_hw_params() fixed: SND_SOC_CLOCK_xx
- simple_util_shutdown() fixed: SND_SOC_CLOCK_xx
Step1:
After
a728f56094e7cf60a1dc0642fe86901d1a4dfb4e
("ASoC: make clock direction configurable in asoc-simple")
and before
5725bce709db1c001140d79398581e067e28c031
("ASoC: simple-card-utils: Unify clock direction by clk_direction")
- simple_init_dai() dai->clk_direction
- simple_util_hw_params() fixed: SND_SOC_CLOCK_xx
- simple_util_shutdown() fixed: SND_SOC_CLOCK_xx
Step2:
After
5725bce709db1c001140d79398581e067e28c031
("ASoC: simple-card-utils: Unify clock direction by clk_direction")
- simple_init_dai() dai->clk_direction
- simple_util_hw_params() dai->clk_direction
- simple_util_shutdown() dai->clk_direction
In Step0 and Step1, your dirver is called with both dir IN/OUT ?
> In my setup, the kernel clock is an input clock. Maybe it should be
> tagged as an input clock. However, we have no
> 'system-clock-direction-in' property yet.
> Anyway, the patch in the STM32 SAI driver is still valid.
OK
Or maybe reset simple_dai->sysclk somehow (not sure...) ?
(simple_init_dai() will call snd_soc_dai_set_sysclk() if it has
simple_dai->sysclk)
Thank you for your help !!
Best regards
---
Kuninori Morimoto
Powered by blists - more mailing lists