From: Takashi Iwai <tiwai@suse.de>
To: raoxu <raoxu@uniontech.com>
Cc: perex@perex.cz, tiwai@suse.com, kees@kernel.org,
cassiogabrielcontato@gmail.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ALSA: hda: Fix connection list comparison in proc output
Date: Tue, 18 Aug 2026 11:41:12 +0200 [thread overview]
Message-ID: <87ecfvrcjr.wl-tiwai@suse.de> (raw)
In-Reply-To: <7B802A4E225CC808+20260818083808.2735120-1-raoxu@uniontech.com>
On Tue, 18 Aug 2026 10:38:08 +0200,
raoxu wrote:
>
> From: Xu Rao <raoxu@uniontech.com>
>
> print_conn_list() compares the raw hardware connection list with the
> connection list cached by the HDA driver. When they differ, it prints an
> additional "In-driver Connection" line so that /proc/asound/card*/codec#*
> shows the topology actually used by the driver.
>
> The comparison currently passes conn_len directly to memcmp(). However,
> conn_len is a number of connection-list entries, while memcmp() expects a
> size in bytes. Both list and conn are arrays of hda_nid_t, which is u16,
> so only half of the connection data is compared.
>
> For example, for two-entry lists such as:
>
> hardware: 0x0c 0x0d
> cached: 0x0c 0x0e
>
> conn_len is 2, and the current comparison checks only the first hda_nid_t.
> The lists are therefore incorrectly treated as identical even though the
> second connection differs.
>
> This can happen legitimately when codec fixups replace a cached connection
> list with snd_hda_override_conn_list(). The codec routing used by the
> driver is not affected, but the proc output can hide the overridden
> driver-visible routing and provide misleading topology information during
> codec debugging.
>
> Convert the entry count to a byte size so that memcmp() covers the
> complete connection list.
>
> Fixes: 8b2c7a5c404d ("ALSA: hda - Add In-driver connection info")
> Signed-off-by: Xu Rao <raoxu@uniontech.com>
Thanks, applied now.
Takashi
prev parent reply other threads:[~2026-08-18 9:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 8:38 [PATCH] ALSA: hda: Fix connection list comparison in proc output raoxu
2026-08-18 9:41 ` 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=87ecfvrcjr.wl-tiwai@suse.de \
--to=tiwai@suse.de \
--cc=cassiogabrielcontato@gmail.com \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=raoxu@uniontech.com \
--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.