Re: [PATCH v1 RESEND] SoundWire: Allow Prepare command for Simplified_CP_SM

From: Holalu Yogendra, Niranjan

Date: Sat Feb 14 2026 - 11:43:03 EST



> On 02/13/26 20:27 Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxx> wrote:
> Subject: Re: [PATCH v1 RESEND] SoundWire: Allow Prepare command for Simplified_CP_SM
>
> > That's because it _IS_ a good response. If the part is reporting
> > NotFinished=0, then it's good to go and we don't need to treat it as a
> > timeout. The timeout is caused by the deadlock that Pierre mentioned.
> > Full CP_SM will always timeout because that code is holding the bus
> > lock, which blocks the interrupt handler.
> >
> > Ignoring the timeout if NotFinished=0 was a workaround until I found
> > time to fix the interrupt handling. Otherwise full CP_SM would never
> > work.
> >
> > We've now decided to replace that code with a polling loop instead of
> > using interrupts.
>
> IOW the suggestion would be to use Richard's patch and force the drive to
> use a regular state machine.
> see https://github.com/thesofproject/linux/pull/5649
I checked this PR. Seems to be working as expected. But,

>
> But if you want to keep following the CP_SM state machine, then you could
> indeed add the required write in a port_prep() routine.
> That'd fine as well, you'd be relying on what the core SoundWire stream
> management provides - namely a means to do device-specific stuff
> before/after port setup.
please ignore the patch in this thread.
I have sent a new patch to do handle this in codec driver itself
ASoC: tas2783A: add explicit port prepare handling