Pārlūkot izejas kodu

asoc: codec: Enable RX1 mix path

Enable WSA RX1 mix path to ensure DMA is enabled
properly and data is consumed to drive right channel
using wsa mix path.

Change-Id: I2b0bc92eeaa82734254ceda96de39f20a761dc75
Signed-off-by: sarath varma ganapathiraju <[email protected]>
sarath varma ganapathiraju 1 gadu atpakaļ
vecāks
revīzija
86102f43f6
1 mainītis faili ar 9 papildinājumiem un 6 dzēšanām
  1. 9 6
      asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c

+ 9 - 6
asoc/codecs/lpass-cdc/lpass-cdc-wsa-macro.c

@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /* Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
- * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #include <linux/module.h>
@@ -1343,19 +1343,22 @@ static int lpass_cdc_wsa_macro_enable_mix_path(struct snd_soc_dapm_widget *w,
 
 	if (!(strcmp(w->name, "WSA_RX0 MIX INP"))) {
 		gain_reg = LPASS_CDC_WSA_RX0_RX_VOL_MIX_CTL;
+		reg = LPASS_CDC_WSA_RX0_RX_PATH_CTL +
+			(LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET *  w->shift);
+		mix_reg = LPASS_CDC_WSA_RX0_RX_PATH_MIX_CTL +
+			LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET * w->shift;
 	} else if (!(strcmp(w->name, "WSA_RX1 MIX INP"))) {
 		gain_reg = LPASS_CDC_WSA_RX1_RX_VOL_MIX_CTL;
+		reg = LPASS_CDC_WSA_RX1_RX_PATH_CTL +
+			(LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET *  w->shift);
+		mix_reg = LPASS_CDC_WSA_RX1_RX_PATH_MIX_CTL +
+			LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET * w->shift;
 	} else {
 		dev_err_ratelimited(component->dev, "%s: No gain register avail for %s\n",
 			__func__, w->name);
 		return 0;
 	}
 
-	reg = LPASS_CDC_WSA_RX0_RX_PATH_CTL +
-			(LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET *  w->shift);
-	mix_reg = LPASS_CDC_WSA_RX0_RX_PATH_MIX_CTL +
-			LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET * w->shift;
-
 	switch (event) {
 	case SND_SOC_DAPM_PRE_PMU:
 		snd_soc_component_update_bits(component, mix_reg, 0x40, 0x40);