Re: [PATCH 1/2] ASoC: simple-card-utils: add ignore_zero_sysclk flag

Sheetal .
2026-03-25T05:27:14Z

On 18-03-2026 17:26, Mark Brown wrote:
> On Wed, Mar 18, 2026 at 02:36:42PM +0530, Sheetal . wrote:
>> On 18-03-2026 04:32, Kuninori Morimoto wrote:
>
>>>> If the driver simply can't tolerate disabling the sysclk it seems like
>>>> it would be easier to just have the driver directly ignore attempts to
>>>> do so rather than adding this flag which the driver has to set only to
>>>> get it passed in?
>
>>> Agree.
>>> I think this commit can help you ?
>
>>> 1e1a2ef95b571825ca9c0113f6bef51e9cec98b0
>>> ("ASoC: da7213: Avoid setting PLL when closing audio stream")
>
>> Thank you for the feedback and the da7213 reference.
>
>> The concern with the per-codec approach is that this affects any codec with
>> a set_dai_sysclk that forwards the frequency to clk_set_rate(). Since any
>> codec can be connected to Tegra platforms, and MCLK is provided by the SoC
>> to external codecs, when clk_set_rate(..., 0) reaches the BPMP firmware, it
>> raises a fault for rates below the hardware minimum. Fixing this per-codec
>> would require individual patches for each.
>
> Since in the clock API clk_get_rate() maps onto clk_disable() those
> drivers ought to be fixed anyway - perhaps we need some helpers for this
> since it does look like we have some issues here. Either the driver
> should ignore the disable (possibly due to already refcounting the use
> of the clock and disabling/enabling without machine driver help) or it
> should translate a rate of 0 to a disable.

Since this needs to be handled in the codec driver, I will start with
separate patch to fix in RT5640 codec. Adding Realtek codec maintainer
for visibility.