Re: [PATCH v4 1/4] ASoC: SOF: Intel: Add IRQ chip to distribute the SoundWire IRQ
From: Pierre-Louis Bossart
Date: Tue Nov 24 2026 - 13:33:12 EST
On 11/24/26 18:06, Charles Keepax wrote:
> On Tue, Nov 24, 2026 at 05:49:21PM +0100, Pierre-Louis Bossart wrote:
>> On 11/24/26 17:09, Charles Keepax wrote:
>>> Add an IRQ chip into the HDA code that can be used to trigger the
>>> SoundWire IRQ for each link. Currently, only the SoundWire IRQ
>>> is moved over to this IRQ chip, although in time the other IRQ
>>> functions could be too.
>>>
>>> This will allow refactoring such that the individual links each
>>> request and free their IRQs locally, rather than having to rely
>>> on looping over a list of links which is tricky to maintain while
>>> destroying the devices.
>>
>> Well, there's no such thing as a per-link SoundWire IRQ...
>>
>> The hardware is built in such a way that once a global interrupt is
>> received at the HDAudio controller level, the handler has to check if
>> this was an IPC, HDA, SoundWire interrupt - in that order. And in the
>> latter case there's no other way than iterating over each link.
>
> Yeah, hence why we add the IRQ domain and claim a shared interrupt.
> I will reword a bit for the next spin.
>
>> Using an abstraction to make each interrupt source 'self-contained'
>> would be fine and probably make the code cleaner, but then why stop at
>> SoundWire? I'd err on the side of 'go big or go home'...
>
> Yeah this definitely could be expanded to the other handlers, as
> I note in one of the commit messages. But not really sure I want
> to go that far as it no longer relates to the issues I am trying
> to solve.
understand, this would probably need to be handled by Intel folks, since
it'd impact ALL platforms since GeminiLake - 2019.
>> At any rate this would be a significant change on both SOF/HDA and
>> SoundWire sides that should be handled as a well-tested prerequisite to
>> the series to allow for communication with the device during remove - it
>> doesn't seem right as a patch casually added in a v4...
>
> I can split this patch out to a separate series if you prefer?
I guess it's more the Intel people who'd need to speak up on such an
invasive change. My recommendation would be to pick this patch and make
sure it's well tested with CI and daily tests. Whether it's part of the
same series or not is not really important, it's the test part that matters.
> Apologies, for the changes a few revisions in but I had generally
> imagined doing this would be too much work, hence the more hacky
> approach in the previous versions. But it turned out the rabbit
> hole was much shallower than I thought.
One open that I have is whether the dispatch of the shared interrupt
will deal with the links in the same order as with the explicit loop. If
not, there could be interesting timing issues that show up.
The other remark is that the free_irq() introduced in patch1 in
intel_link_remove() is moved in patch4.