From: Takashi Iwai <tiwai@suse.de>
To: Andrew Davison <andy@dvsn.net>
Cc: tiwai@suse.com, perex@perex.cz, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda: Fix [codec] ID matching in patch files for IDs with bit 31 set
Date: Sat, 07 Nov 2026 10:07:52 +0100 [thread overview]
Message-ID: <87fqxdypp3.wl-tiwai@suse.de> (raw)
In-Reply-To: <20261106175518.18629-1-andy@dvsn.net>
On Fri, 06 Nov 2026 18:55:18 +0100,
Andrew Davison wrote:
>
> parse_codec_mode() reads the vendor and subsystem IDs of a patch file's
> [codec] line into an int, and skips the check when the value is zero or
> negative, as documented. An ID with bit 31 set, such as SigmaTel's
> 0x8384xxxx or Intel's 0x8086xxxx, comes out negative, so it is taken as
> a wildcard and the section is applied to every codec instead of the one
> it names.
>
> This was seen on an OpenPeak OpenFrame 2 with an IDT 92HD75B2X5
> (0x111d7608). A patch file written for the STAC9202 (0x83847632) in the
> related OpenFrame 1 was applied to it, swapping the headphone and
> speaker pin configurations, so auto-mute never muted the speaker.
>
> Read the IDs as long long, so real IDs are compared exactly. Values
> written as negative numbers (e.g. -1) still act as wildcards, as
> documented; a hex value such as 0xffffffff is now compared as written.
>
> Tested on 6.18.60 on an OpenFrame 2, with a rebuilt snd-hda-codec and
> the STAC9202 patch file: user_pin_configs stays empty for the IDT codec,
> and the headphone and line-out pins are assigned as the BIOS sets them.
> Not tested on a STAC9202 itself.
>
> The bug was tracked down and this fix written with an AI coding
> assistant (Claude Code, Claude Opus 5.5), which also ran the tests
> above. I have reviewed the change and the tests.
>
> Fixes: ef940b0403d4 ("ALSA: hda - Allow patching with any vendor/subsystem ids")
> Cc: stable@vger.kernel.org
> Signed-off-by: Andrew Davison <andy@dvsn.net>
Applied now. Thanks.
Takashi
prev parent reply other threads:[~2026-11-07 9:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 17:55 [PATCH] ALSA: hda: Fix [codec] ID matching in patch files for IDs with bit 31 set Andrew Davison
2026-11-07 9:07 ` Takashi Iwai [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fqxdypp3.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=andy@dvsn.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=stable@vger.kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.