Skip to content

Commit 000bca8

Browse files
computersforpeacebroonie
authored andcommitted
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 4ff028f ("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: 4ff028f ("ASoC: qcom: lpass-cpu: Make I2S SD lines configurable") Cc: <[email protected]> Signed-off-by: Brian Norris <[email protected]> Reviewed-by: Stephan Gerhold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent efd58ed commit 000bca8

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sound/soc/qcom/lpass-cpu.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,10 +1037,11 @@ static void of_lpass_cpu_parse_dai_data(struct device *dev,
10371037
struct lpass_data *data)
10381038
{
10391039
struct device_node *node;
1040-
int ret, id;
1040+
int ret, i, id;
10411041

10421042
/* Allow all channels by default for backwards compatibility */
1043-
for (id = 0; id < data->variant->num_dai; id++) {
1043+
for (i = 0; i < data->variant->num_dai; i++) {
1044+
id = data->variant->dai_driver[i].id;
10441045
data->mi2s_playback_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
10451046
data->mi2s_capture_sd_mode[id] = LPAIF_I2SCTL_MODE_8CH;
10461047
}

0 commit comments

Comments
 (0)