ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
authorBrian Norris <computersforpeace@gmail.com>
Sat, 31 Dec 2022 06:15:45 +0000 (22:15 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Jan 2023 10:48:48 +0000 (11:48 +0100)
commitd4fa65960a9d0cb87a1102d47145675ceed7a4e6
treec8ff7b9e2288cc3bf6cfd5d5defb20094c37e4e0
parent8400b91c11db9edeb32979a6e9ef3120c91a8db9
ASoC: qcom: lpass-cpu: Fix fallback SD line index handling

commit 000bca8d706d1bf7cca01af75787247c5a2fdedf upstream.

These indices should reference the ID placed within the dai_driver
array, not the indices of the array itself.

This fixes commit 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD
lines configurable"), which among others, broke IPQ8064 audio
(sound/soc/qcom/lpass-ipq806x.c) because it uses ID 4 but we'd stop
initializing the mi2s_playback_sd_mode and mi2s_capture_sd_mode arrays
at ID 0.

Fixes: 4ff028f6c108 ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable")
Cc: <stable@vger.kernel.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20221231061545.2110253-1-computersforpeace@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/qcom/lpass-cpu.c