[PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes

Vijendar Mukunda posted 4 patches 2 weeks ago
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(-)
[PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes
Posted by Vijendar Mukunda 2 weeks ago
This series fixes four defects in the AMD ACP SoundWire machine drivers
(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(-)

-- 
2.48.1
Re: [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes
Posted by Mark Brown 1 week, 2 days ago
On Thu, 10 Sep 2026 21:46:45 +0530, Vijendar Mukunda wrote:
> ASoC: amd: acp: SoundWire machine driver fixes
> 
> This series fixes four defects in the AMD ACP SoundWire machine drivers
> (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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/4] ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers
      https://git.kernel.org/broonie/sound/c/2faa0ae56fa5
[2/4] ASoC: amd: acp: refactor codec config count in SOF SoundWire machine driver
      https://git.kernel.org/broonie/sound/c/efd76c8d6153
[3/4] ASoC: amd: acp: fix ffs() operator precedence for SoundWire link ID
      https://git.kernel.org/broonie/sound/c/5b28d773ed3a
[4/4] ASoC: amd: acp: fix card name length warning in SOF SoundWire machine driver
      https://git.kernel.org/broonie/sound/c/2444f73fe476

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
Re: [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes
Posted by Mario Limonciello 2 weeks ago

On 9/10/26 11:16, Vijendar Mukunda wrote:
> This series fixes four defects in the AMD ACP SoundWire machine drivers
> (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(-)
> 
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Re: [PATCH 0/4] ASoC: amd: acp: SoundWire machine driver fixes
Posted by Mark Brown 1 week, 1 day ago
On Thu, 10 Sep 2026 21:46:45 +0530, Vijendar Mukunda wrote:
> ASoC: amd: acp: SoundWire machine driver fixes
> 
> This series fixes four defects in the AMD ACP SoundWire machine drivers
> (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.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.3

Thanks!

[1/4] ASoC: amd: acp: bounds-check SoundWire link ID in machine drivers
      https://git.kernel.org/broonie/sound/c/29218a4d11a3
[2/4] ASoC: amd: acp: refactor codec config count in SOF SoundWire machine driver
      https://git.kernel.org/broonie/sound/c/0b7d55d3a912
[3/4] ASoC: amd: acp: fix ffs() operator precedence for SoundWire link ID
      https://git.kernel.org/broonie/sound/c/27098aaf28b9
[4/4] ASoC: amd: acp: fix card name length warning in SOF SoundWire machine driver
      https://git.kernel.org/broonie/sound/c/d57616f8be56

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark