Re: [PATCH] ASoC: tas2783-sdw: power the Function up before preparing the port
Andrey Golovko <[email protected]>
| Newsgroups | org.kernel.vger.linux-sound,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Aug 13, 2026 at 09:18:58PM +0000, Robin Everaars wrote: > thanks. One clarification about my negative v1 result: it was not an > active-playback resume test. The controlled pre-suspend tone had completed > before system suspend. Thank you for going back and checking, that is a useful correction. I had been reading your result as evidence about the resume ioctl, and it is not. Your second case is the one I would expect to have worked on v1: a fresh pw-play after the sink was suspended opens the PCM again, so it goes through hw_params() and prepare(), and that is the path v1 already covered. It failing on v7.1.7 fits your own attribution to the missing b627da430357 - without it the DAPM writes that follow are dropped against a stale cache, so the Function never comes up no matter how well the port is prepared. So yes, for-next rather than another v7.1.7 cycle. For the third case I would expect it to still fail, and that is the point of running it: the PCM core does not trigger a stream that was left PREPARED, so nothing in the codec or machine driver gets a chance to act. sdw_prepare_stream() on a stream still marked PREPARED is a no-op too, so even a call from there would not help. It needs the stream state invalidated when the peripheral goes UNATTACHED and comes back. If your readout shows PrepareCtrl=0x0 while the stream is running, that is the same gap and not a second bug. The module is on its way off-list. It reads and prints DP1 PrepareCtrl, PrepareStatus, the ChannelEn of the current bank and the PDE23 requested and actual power states, straight over the bus with sdw_read_no_pm(), so the codec regmap cache is out of the picture. It only reads unless you ask it to write. For a shape to compare against, here is what the resume-ioctl case gave on this machine, unpatched kernel to the left, v2 to the right: DP1 PrepareCtrl before/after 0x1,0x2 -> 0x0,0x0 0x1,0x2 -> 0x1,0x2 PDE23 req/act after 0x3/0x3 0x0/0x0 440/660 Hz tone after -1.7/+1.8 dB +73.7/+88.5 dB The tone figures are levels in narrow bands around 440 and 660 Hz in a three-second capture from the built-in microphone, on a scale where a capture of silence reads about 0 dB in the same bands. The absolute numbers say nothing outside this machine; noise floor against signal does. v2 of the series is at https://lore.kernel.org/linux-sound/[email protected]/ Andrey