Re: [PATCH] ALSA: hda/core: Stop capability walk on empty capability header
From: Takashi Iwai
Date: Tue Nov 03 2026 - 11:12:31 EST
On Mon, 02 Nov 2026 12:49:39 +0100,
Michał Kopeć wrote:
>
> From: Michal Kopec <michal.kopec@xxxxxxxxx>
>
> snd_hdac_bus_parse_capabilities() walks the controller's linked
> capability list starting at LLCH. On some platforms one of the entries
> reads back as all zeros. Such a header does not describe a capability,
> but the walk still treats it as one: it falls into the default case and
> reports an error, printing the raw register value instead of the
> capability ID:
>
> snd_hda_intel 0000:00:1f.3: Unknown capability 0
>
> The walk then stops anyway, because the next pointer of a zero header
> is 0, so the message is only noise.
>
> Treat an all-zero header as the end of the list, the same way a failed
> read (-1) is already handled, and log it at debug level only. Also
> print the capability ID in hex for a genuinely unknown capability,
> instead of the full header value.
>
> Fixes: 0b00a5615dc4 ("ALSA: hdac_ext: add hdac extended controller")
> Signed-off-by: Michał Kopeć <michal.kopec@xxxxxxxxx>
Applied now. Thanks.
Takashi