Re: [PATCH] ALSA: aoa: i2sbus: clear stale prepared state

From: Cássio Gabriel Monteiro Pires

Date: Tue Mar 31 2026 - 12:32:04 EST


On 3/31/26 11:27, Takashi Iwai wrote:
> Do we need to clear the active flag here? It must have been cleared
> by hw_params call. Or is it the case for errors?

Yes, that assignment was meant for the error / re-prepare case.

For the normal reconfiguration path, hw_params() already clears
pi->active.

My intent there was to avoid carrying over a previously successful
prepared state if prepare() is called again without a preceding
hw_params(), and that new prepare() attempt fails before completion.

That said, I can drop the clear at the beginning of
i2sbus_pcm_prepare() and keep the state reset in hw_params() and
hw_free(), since that is sufficient for the stale-state issue this
patch is addressing.

What you think?

--
Thanks,
Cássio