Re: [PATCH 3/3] ASoC: renesas: fsi: Fix hang by enabling SPU clock

From: Bui Duc Phuc

Date: Tue Apr 07 2026 - 08:18:58 EST


Hi Morimoto-san,

> Ah... is it because PIO transfer ?
> I have 100% forgotten, but FSI doesn't support RX DMA...

That is correct. Currently, the Armadillo board lacks DMA and HDMI support
after the transition to DTS, so FSI is limited to FSIA in PIO mode. I plan to
investigate those drivers further once the FSI implementation is finalized.

> Hmm... fsi_dai_trigger() seems strange.
> It seems (A) stops clock, and (B) sets register after that.
> Is this the reason why you get error ? I think (A) and (B) should be
> reversed. The balance between SNDRV_PCM_TRIGGER_START, and with
> __fsi_suspend() are also not good.
> If so, can you use hw_start/stop() ?

Thank you for the guidance. After reordering the sequence and moving the
SPU power control to fsi_hw_start/shutdown, the system hang is now resolved.

> Basically, concept of this driver is that power/clock is enabled/disabled
> when trigger() was called (except suspend/resume).
> While your testing may be correct from an ALSA point of view, but setting
> configuring it in multiple places will lead to confusion.

I see your point. I agree that keeping the power/clock management centralized
in trigger() is a much cleaner approach.

By the way, I’d like to discuss the fsidiv clock handling.
In the legacy implementation, it was handled here:
https://elixir.bootlin.com/linux/v7.0-rc7/source/drivers/sh/clk/cpg.c.
Currently, this has not been ported to the Common Clock Framework (CCF) for
R8A7740, and it resides in a different register range from the core CPG.
For v2, would you prefer that I implement a small clock provider for
fsidiv within
the FSI driver, or should it be added under drivers/clk/renesas/?

Best regards,
Phuc