]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: SOF: Intel: hda-mlink: fix off-by-one error
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Mon, 7 Aug 2023 21:09:40 +0000 (16:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:48:16 +0000 (09:48 +0200)
commitd4aa235496a284838df7a0a7bb6e49e8bd45fb8c
tree87abf4e2ae6b7d94de0a7a0d28bf958765b32b43
parent9064662f15f451de2dff64e55e0d81f44b352a4d
ASoC: SOF: Intel: hda-mlink: fix off-by-one error

[ Upstream commit 7075b0c91b3cd5d32b4ac7403f771a3253d3fbf6 ]

The HCHAN parameter should be the highest channel number, not the
channel count.

While we're at it, handle LCHAN with the dual __ffs helper.

Fixes: ccc2f0c1b6b6 ("ASoC: SOF: Intel: hda-mlink: add helper to program SoundWire PCMSyCM registers")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Link: https://lore.kernel.org/r/20230807210959.506849-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sof/intel/hda-mlink.c