aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2023-01-12 21:32:19 -0800
committerChristian Marangi <ansuelsmth@gmail.com>2023-01-21 01:02:24 +0100
commitc20915e8414c02cff24b9938944c63862176d2c2 (patch)
tree6e567a8b4546c5f15e8d2739d684ac8f13f91ac6 /target/linux
parent108ed0e1c7c801b174bec5d4b16ebf3411acfe51 (diff)
downloadupstream-c20915e8414c02cff24b9938944c63862176d2c2.tar.gz
upstream-c20915e8414c02cff24b9938944c63862176d2c2.tar.bz2
upstream-c20915e8414c02cff24b9938944c63862176d2c2.zip
ipq806x: ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
This fixes device tree registration for 'qcom,lpass-cpu' as used by qcom-ipq8064 SoCs, and allows speaker audio to function. This patch has been submitted (and merged, for -next; likely v6.3) upstream. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch b/target/linux/ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch
new file mode 100644
index 0000000000..099dc60611
--- /dev/null
+++ b/target/linux/ipq806x/patches-5.15/007-v6.3-ASoC-qcom-lpass-cpu-Fix-fallback-SD-line-index-handl.patch
@@ -0,0 +1,42 @@
+From: Brian Norris <computersforpeace@gmail.com>
+Date: Thu, 15 Dec 2022 01:33:45 -0800
+Subject: [PATCH] ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
+
+[[ Submitted upstream as:
+ https://lore.kernel.org/all/20221231061545.2110253-1-computersforpeace@gmail.com/
+ Currently queued for -next (v6.3?) as:
+ 000bca8d706d ASoC: qcom: lpass-cpu: Fix fallback SD line index handling
+]]
+
+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>
+---
+ sound/soc/qcom/lpass-cpu.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/qcom/lpass-cpu.c
++++ b/sound/soc/qcom/lpass-cpu.c
+@@ -851,10 +851,11 @@ static void of_lpass_cpu_parse_dai_data(
+ struct lpass_data *data)
+ {
+ struct device_node *node;
+- int ret, id;
++ int ret, i, id;
+
+ /* Allow all channels by default for backwards compatibility */
+- for (id = 0; id < data->variant->num_dai; id++) {
++ for (i = 0; i < data->variant->num_dai; i++) {
++ id = data->variant->dai_driver[i].id;
+ data->mi2s_playback_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
+ data->mi2s_capture_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
+ }