Prechádzať zdrojové kódy

asoc: lpass-cdc: update correct offset for compander and softclip

Update correct offset for compander and softclip.

Change-Id: Ic4071a25911db0c6c57d550e98d63e663354f62d
Signed-off-by: Meng Wang <[email protected]>
Meng Wang 4 rokov pred
rodič
commit
195771b877

+ 2 - 1
asoc/codecs/lpass-cdc/lpass-cdc-tx-macro.c

@@ -36,7 +36,8 @@
 
 #define LPASS_CDC_TX_MACRO_DMIC_SAMPLE_RATE_UNDEFINED 0
 #define LPASS_CDC_TX_MACRO_MCLK_FREQ 9600000
-#define LPASS_CDC_TX_MACRO_TX_PATH_OFFSET 0x80
+#define LPASS_CDC_TX_MACRO_TX_PATH_OFFSET \
+	(LPASS_CDC_TX1_TX_PATH_CTL - LPASS_CDC_TX0_TX_PATH_CTL)
 #define LPASS_CDC_TX_MACRO_SWR_MIC_MUX_SEL_MASK 0xF
 #define LPASS_CDC_TX_MACRO_ADC_MUX_CFG_OFFSET 0x8
 #define LPASS_CDC_TX_MACRO_ADC_MODE_CFG0_SHIFT 1

+ 2 - 1
asoc/codecs/lpass-cdc/lpass-cdc-va-macro.c

@@ -41,7 +41,8 @@
 
 #define LPASS_CDC_VA_MACRO_DMIC_SAMPLE_RATE_UNDEFINED 0
 #define LPASS_CDC_VA_MACRO_MCLK_FREQ 9600000
-#define LPASS_CDC_VA_MACRO_TX_PATH_OFFSET 0x80
+#define LPASS_CDC_VA_MACRO_TX_PATH_OFFSET \
+	(LPASS_CDC_VA_TX1_TX_PATH_CTL - LPASS_CDC_VA_TX0_TX_PATH_CTL)
 #define LPASS_CDC_VA_MACRO_TX_DMIC_CLK_DIV_MASK 0x0E
 #define LPASS_CDC_VA_MACRO_TX_DMIC_CLK_DIV_SHFT 0x01
 #define LPASS_CDC_VA_MACRO_SWR_MIC_MUX_SEL_MASK 0xF

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

@@ -47,9 +47,12 @@
 #define LPASS_CDC_WSA_MACRO_MUX_INP_MASK2 0x38
 #define LPASS_CDC_WSA_MACRO_MUX_CFG_OFFSET 0x8
 #define LPASS_CDC_WSA_MACRO_MUX_CFG1_OFFSET 0x4
-#define LPASS_CDC_WSA_MACRO_RX_COMP_OFFSET 0x40
-#define LPASS_CDC_WSA_MACRO_RX_SOFTCLIP_OFFSET 0x40
-#define LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET 0x80
+#define LPASS_CDC_WSA_MACRO_RX_COMP_OFFSET \
+		(LPASS_CDC_WSA_COMPANDER1_CTL0 - LPASS_CDC_WSA_COMPANDER0_CTL0)
+#define LPASS_CDC_WSA_MACRO_RX_SOFTCLIP_OFFSET \
+		(LPASS_CDC_WSA_SOFTCLIP1_CRC - LPASS_CDC_WSA_SOFTCLIP0_CRC)
+#define LPASS_CDC_WSA_MACRO_RX_PATH_OFFSET \
+		(LPASS_CDC_WSA_RX1_RX_PATH_CTL - LPASS_CDC_WSA_RX0_RX_PATH_CTL)
 #define LPASS_CDC_WSA_MACRO_RX_PATH_CFG3_OFFSET 0x10
 #define LPASS_CDC_WSA_MACRO_RX_PATH_DSMDEM_OFFSET 0x4C
 #define LPASS_CDC_WSA_MACRO_FS_RATE_MASK 0x0F

+ 6 - 3
asoc/codecs/lpass-cdc/lpass-cdc-wsa2-macro.c

@@ -47,9 +47,12 @@
 #define LPASS_CDC_WSA2_MACRO_MUX_INP_MASK2 0x38
 #define LPASS_CDC_WSA2_MACRO_MUX_CFG_OFFSET 0x8
 #define LPASS_CDC_WSA2_MACRO_MUX_CFG1_OFFSET 0x4
-#define LPASS_CDC_WSA2_MACRO_RX_COMP_OFFSET 0x40
-#define LPASS_CDC_WSA2_MACRO_RX_SOFTCLIP_OFFSET 0x40
-#define LPASS_CDC_WSA2_MACRO_RX_PATH_OFFSET 0x80
+#define LPASS_CDC_WSA2_MACRO_RX_COMP_OFFSET \
+		(LPASS_CDC_WSA2_COMPANDER1_CTL0 - LPASS_CDC_WSA2_COMPANDER0_CTL0)
+#define LPASS_CDC_WSA2_MACRO_RX_SOFTCLIP_OFFSET \
+		(LPASS_CDC_WSA2_SOFTCLIP1_CRC - LPASS_CDC_WSA2_SOFTCLIP0_CRC)
+#define LPASS_CDC_WSA2_MACRO_RX_PATH_OFFSET \
+		(LPASS_CDC_WSA2_RX1_RX_PATH_CTL - LPASS_CDC_WSA2_RX0_RX_PATH_CTL)
 #define LPASS_CDC_WSA2_MACRO_RX_PATH_CFG3_OFFSET 0x10
 #define LPASS_CDC_WSA2_MACRO_RX_PATH_DSMDEM_OFFSET 0x4C
 #define LPASS_CDC_WSA2_MACRO_FS_RATE_MASK 0x0F