linux/sound/soc/qcom
Zimeng Li ca51771c8e
ASoC: qcom: lpass-cpu: use DAI table index for playback constraints
The DAI ID is a hardware port ID and is not necessarily the index of
the corresponding entry in variant->dai_driver.

When configuring a DAI with LPAIF_I2SCTL_MODE_QUAD01, the probe code
currently uses dai_id to index variant->dai_driver. This is incorrect
for platforms where DAI IDs are sparse. For example, the IPQ806x MI2S
DAI has ID 4 while it is the only entry in the DAI driver table. If
that DAI is configured for QUAD01 and probe reaches this branch, the
code writes beyond that single entry via dai_driver[4] instead of
updating the DAI being processed.

Use the loop index i when updating the current DAI's playback channel
constraints, while retaining dai_id for indexing the hardware-port
specific playback SD-line mode array.

This fixes the incorrect DAI table access for platforms where the DAI
ID does not match its position in the driver table.

Fixes: c223f41c1a ("ASoC: qcom: Add four speaker support on MI2S secondary")
Cc: stable@vger.kernel.org
Signed-off-by: Zimeng Li <me@lizi.moe>
Assisted-by: LLM-assisted source analysis
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260927010911.51980-1-me@lizi.moe
Signed-off-by: Mark Brown <broonie@kernel.org>
History 2026-09-28 12:44:37 +01:00
..
qdsp6 treewide: refresh kmalloc_obj() conversions 2026-09-04 21:37:00 -07:00
apq8016_sbc.c ASoC: qcom: Use snd_soc_substream_to_rtd() for accessing private_data 2024-05-06 23:59:47 +09:00
apq8096.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
common.c ASoC: qcom: common: Distinguish missing and invalid TDM slot configuration 2026-08-18 19:22:46 +01:00
common.h ASoC: qcom: common: add DAI-node TDM slot helpers 2026-08-04 17:32:22 +01:00
Kconfig ASoC: soc-dapm: cleanups 2025-07-07 21:02:59 +01:00
lpass-apq8016.c ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
lpass-cdc-dma.c ASoC: qcom: use int type to store negative error codes 2025-08-28 16:07:45 +02:00
lpass-cpu.c ASoC: qcom: lpass-cpu: use DAI table index for playback constraints 2026-09-28 12:44:37 +01:00
lpass-hdmi.c ASoC: qcom: use int type to store negative error codes 2025-08-28 16:07:45 +02:00
lpass-hdmi.h ASoC: qcom: Add support for lpass hdmi driver 2020-10-08 20:27:34 +01:00
lpass-ipq806x.c ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
lpass-lpaif-reg.h ASoC: qcom: Add register definition for codec rddma and wrdma 2022-02-24 20:21:42 +00:00
lpass-platform.c ASoC: qcom: name back to pcm_new()/pcm_free() 2026-03-16 13:37:57 +00:00
lpass-sc7180.c ASoC: qcom: Convert to SYSTEM_SLEEP_PM_OPS() 2025-03-17 10:14:51 +00:00
lpass-sc7280.c ASoC: qcom: Convert to SYSTEM_SLEEP_PM_OPS() 2025-03-17 10:14:51 +00:00
lpass.h ASoC: qcom: common: validate cpu dai id during parsing 2026-04-02 16:33:43 +01:00
Makefile ASoC: qcom: qdsp6: Add headphone jack for offload connection status 2025-04-11 13:02:32 +02:00
sc7180.c ASoC: qcom: sc7180: convert to snd_soc_dapm_xxx() 2025-11-17 00:18:03 +00:00
sc7280.c Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c files) 2026-07-03 07:38:17 +02:00
sc8280xp.c ASoC: qcom: sc8280xp: Fix TDM hw_params error handling 2026-08-18 19:22:47 +01:00
sdm845.c ASoC: qcom: sdm845: remove unused card 2026-07-21 19:06:42 +01:00
sdw.c ASoC: qcom: sc7280: make use of common helpers 2025-10-29 14:54:40 +00:00
sdw.h ASoC: qcom: sdw: remove redundant code 2025-10-29 14:54:38 +00:00
sm8250.c ASoC: qcom: sm8250: add SDM660 compatible 2026-08-01 00:27:56 +01:00
storm.c ASoC: qcom: storm: use dev instead of card on storm_parse_of() 2026-07-21 19:06:43 +01:00
usb_offload_utils.c ASoC: qcom: qdsp6: Add headphone jack for offload connection status 2025-04-11 13:02:32 +02:00
usb_offload_utils.h ASoC: qcom: qdsp6: Add headphone jack for offload connection status 2025-04-11 13:02:32 +02:00
x1e80100.c ASoC: qcom: x1e80100: limit speaker volumes 2026-04-22 15:44:05 +01:00