Re: [PATCH v3 2/4] ASoC: SDCA: Populate IRQ data earlier
From: Charles Keepax
Date: Mon Jul 20 2026 - 10:49:33 EST
On Fri, Jul 17, 2026 at 10:42:46PM +0200, Pierre-Louis Bossart wrote:
> On 7/16/26 16:26, Charles Keepax wrote:
> > Currently, the IRQ data (attached Entity/Control/etc) is populated
> > as the IRQ is requested. However, this can cause issues as
> > occasionally the setup process wants to access specifics of
> > an IRQ before the IRQ is actually enabled. To facilitate this
> > cache all the IRQ data during sdca_irq_populate_early() and make
> > sdca_irq_populate() simply request the outstanding IRQs. This
> > also has the advantage that sdca_irq_populate() can now just
> > iterate through the IRQ array which is much smaller/faster than
> > going through every Entity in the Function for Controls.
> >
> > Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>
> > ---
>
> I may be splitting hair but shouldn't this patch be moved
> earlier?patch1/3-4 seem to be completely tied with the introduction and
> use of the fixup_controls() callback, I am not sure I see the link with
> the IRQ stuff. Or conversely move this last if this makes more sense.
It can be moved to the start of the series, probably not worth a
spin on its own but if we end up with changes from Mark's
comments I will do so.
This is slightly related though as sdca_jack_set_jack is called
before all the controls are registered and we populate the jack
masks in there, so moving the IRQs to later means we need that
information ready at that time which this accomplishes. Although
it does also just generally make things a bit neater.
> Also while I am at it, I wouldn't hurt to have an explanation of the
> races conditions earlier, it's only in patch3 that the race condition is
> described in details.
Yeah I should have probably included that in the cover letter
more. Likewise, I will update that if we end up with another
spin. If either you or Mark feel strongly enough on these points
to warrant another spin just for them just let me know.
Thanks,
Charles