RE: [EXTERNAL] Re: [PATCH v1 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver
From: Holalu Yogendra, Niranjan
Date: Tue Mar 24 2026 - 11:48:14 EST
> On 16:23-20260324, Charles Keepax wrote:
> Subject: Re: [PATCH v1 2/4] ASoC: tac5xx2-sdw: add soundwire based codec driver
> On Mon, Mar 23, 2026 at 09:45:45AM +0530, Niranjan H Y wrote:
> > + return regmap_write(tac_dev->regmap,
> > + SDW_SDCA_CTL(function_number, fu_entity,
> > + TAC_SDCA_CHANNEL_MUTE,
> channel),
> > + mute);
>
> If all this does is write the register why not just pass the
> register to the DAPM widget and not both having a callback at
> all?
>
> Same for many of the other power callbacks.
Will fix it in next version for those which doesn't need explicit handling.
> > + dev_err(tac_dev->dev,
> > + "error: operation without hw initialization");
> > + return -EINVAL;
> > + }
>
> This is a bit weird should these not be handled by runtime
> resume? This happens in a couple other odd places too.
I am observing the following sequence during the playback resume from low power mode ( with .idle_bias_on = 0 )
Device gets detached first. Then tries to resume. Then hw_params is called. Then gets "attached".
So waiting for attached to get completed before proceeding with .hw_params.
> > +
> > + ret = regmap_write(tac_dev->regmap, SDW_SDCA_CTL(function_id,
> pde_entity,
> > +
> TAC_SDCA_REQUESTED_PS, 0),
> > + 0x03);
>
> Agree with Pierre its a bit weird to be handling PDEs outside of
> DAPM, at least a comment to explain why would make sense.
I will fix this in next patch.
Regards
Niranjan