Re: [PATCH v10 1/4] ASoC: SDCA: Add PDE state transition helper

From: Pierre-Louis Bossart

Date: Thu Apr 23 2026 - 09:03:01 EST


On 4/23/26 10:52, Charles Keepax wrote:
> On Wed, Apr 22, 2026 at 07:56:09PM +0200, Pierre-Louis Bossart wrote:
>> On 4/22/26 10:26, Charles Keepax wrote:
>>> On Tue, Apr 21, 2026 at 06:21:09PM +0200, Pierre-Louis Bossart wrote:
>>>> On 4/21/26 17:57, Charles Keepax wrote:
>>>>> On Tue, Apr 21, 2026 at 09:18:01PM +0530, Niranjan H Y wrote:
>>> That is what is happening in the above code setting the
>>> reg/mask/on_val/off_val, DAPM uses that information to do the
>>> register write.
>>
>> Since we have two different ways of doing this PDE management,
>> do we need two helpers, one with the write and one without?
>
> I would really vote for just the polling helper, most of the time
> the register should be written by DAPM and for drivers that don't
> those drivers will likely be writing a bunch of other registers in
> the event handler anyway so what is one more.

I don't really see what drivers could possibly do between writing REQUESTED_PS and waiting on ACTUAL_PS...

They may have other registers to tweak *before* or *after* the sequence, this two-step power sequence doesn't really offer much room for interleaving other commands.
FWIW, this sort of sequence is exactly the same for HDaudio, you set the desired power and wait for it to be reached. We never did anything else in the mean time..

At any rate, not going to lay on the tracks for a helper. Fine if you want to keep the write to REQUESTED_PS out...