Re: [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes
From: Mario Limonciello
Date: Thu Sep 10 2026 - 12:44:51 EST
On 9/10/26 11:16, Vijendar Mukunda wrote:
This series fixes four defects in the AMD ACP SoundWire machine driversReviewed-by: Mario Limonciello (AMD) <superm1@xxxxxxxxxx>
(acp-sdw-legacy-mach.c and acp-sdw-sof-mach.c).
A bounds check is added to validate the SoundWire link ID before it is
used as an array index in create_sdw_dailink(), preventing out-of-bounds
access when an unexpected link_mask value is encountered. The codec
config count in the SOF machine driver is refactored to use a dedicated
variable rather than reusing the endpoint-count variable for two
purposes, making the intent clearer and avoiding a stale value being
passed to the codec config array. An operator-precedence bug in the
ffs(link_mask - 1) expression is corrected to ffs(link_mask) - 1,
ensuring the link ID is derived from the correct bit position. Finally,
the SOF machine driver card name is shortened to fit within the 16-byte
snd_card driver[] field and eliminate a compile-time warning.
Vijendar Mukunda (4):
ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers
ASoC: amd: acp: refactor codec config count in SOF SoundWire machine
driver
ASoC: amd: acp: fix ffs() operator precedence for SoundWire link ID
ASoC: amd: acp: fix card name length warning in SOF SoundWire machine
driver
sound/soc/amd/acp/acp-sdw-legacy-mach.c | 14 ++++++++++++--
sound/soc/amd/acp/acp-sdw-sof-mach.c | 23 +++++++++++++++++------
2 files changed, 29 insertions(+), 8 deletions(-)