Prechádzať zdrojové kódy

ASoC: update mi2s/tdm/auxpcm interface names

Update backend interface names as required by spf.

Change-Id: I10e5d64677e9ea2b70d53697d9df09ef8cae8612
Signed-off-by: Vignesh Kulothungan <[email protected]>
Vignesh Kulothungan 3 rokov pred
rodič
commit
c02fc6e8c4
2 zmenil súbory, kde vykonal 37 pridanie a 37 odobranie
  1. 24 24
      asoc/msm-audio-defs.h
  2. 13 13
      asoc/msm_common.c

+ 24 - 24
asoc/msm-audio-defs.h

@@ -22,29 +22,29 @@
 
 #define LPASS_BE_PRI_AUXPCM_RX "AUXPCM-LPAIF-RX-PRIMARY"
 #define LPASS_BE_PRI_AUXPCM_TX "AUXPCM-LPAIF-TX-PRIMARY"
-#define LPASS_BE_SEC_AUXPCM_RX "AUXPCM-LPAIF-RX-SECONDARY"
-#define LPASS_BE_SEC_AUXPCM_TX "AUXPCM-LPAIF-TX-SECONDARY"
+#define LPASS_BE_SEC_AUXPCM_RX "AUXPCM-LPAIF_AUD-RX-PRIMARY"
+#define LPASS_BE_SEC_AUXPCM_TX "AUXPCM-LPAIF_AUD-TX-PRIMARY"
 #define LPASS_BE_TERT_AUXPCM_RX "AUXPCM-LPAIF-RX-TERTIARY"
 #define LPASS_BE_TERT_AUXPCM_TX "AUXPCM-LPAIF-TX-TERTIARY"
-#define LPASS_BE_QUAT_AUXPCM_RX "AUXPCM-LPAIF_RXTX-RX-QUATERNARY"
-#define LPASS_BE_QUAT_AUXPCM_TX "AUXPCM-LPAIF_RXTX-TX-QUATERNARY"
-#define LPASS_BE_QUIN_AUXPCM_RX "AUXPCM-LPAIF_VA-RX-QUINARY"
-#define LPASS_BE_QUIN_AUXPCM_TX "AUXPCM-LPAIF_VA-TX-QUINARY"
-#define LPASS_BE_SEN_AUXPCM_RX "AUXPCM-LPAIF_WSA-RX-SENARY"
-#define LPASS_BE_SEN_AUXPCM_TX "AUXPCM-LPAIF_WSA-TX-SENARY"
+#define LPASS_BE_QUAT_AUXPCM_RX "AUXPCM-LPAIF_RXTX-RX-PRIMARY"
+#define LPASS_BE_QUAT_AUXPCM_TX "AUXPCM-LPAIF_RXTX-TX-PRIMARY"
+#define LPASS_BE_QUIN_AUXPCM_RX "AUXPCM-LPAIF_VA-RX-PRIMARY"
+#define LPASS_BE_QUIN_AUXPCM_TX "AUXPCM-LPAIF_VA-TX-PRIMARY"
+#define LPASS_BE_SEN_AUXPCM_RX "AUXPCM-LPAIF_WSA-RX-PRIMARY"
+#define LPASS_BE_SEN_AUXPCM_TX "AUXPCM-LPAIF_WSA-TX-PRIMARY"
 
 #define LPASS_BE_PRI_MI2S_RX "MI2S-LPAIF-RX-PRIMARY"
 #define LPASS_BE_PRI_MI2S_TX "MI2S-LPAIF-TX-PRIMARY"
-#define LPASS_BE_SEC_MI2S_RX "MI2S-LPAIF-RX-SECONDARY"
-#define LPASS_BE_SEC_MI2S_TX "MI2S-LPAIF-TX-SECONDARY"
+#define LPASS_BE_SEC_MI2S_RX "MI2S-LPAIF_AUD-RX-PRIMARY"
+#define LPASS_BE_SEC_MI2S_TX "MI2S-LPAIF_AUD-TX-PRIMARY"
 #define LPASS_BE_TERT_MI2S_RX "MI2S-LPAIF-RX-TERTIARY"
 #define LPASS_BE_TERT_MI2S_TX "MI2S-LPAIF-TX-TERTIARY"
-#define LPASS_BE_QUAT_MI2S_RX "MI2S-LPAIF_RXTX-RX-QUATERNARY"
-#define LPASS_BE_QUAT_MI2S_TX "MI2S-LPAIF_RXTX-TX-QUATERNARY"
-#define LPASS_BE_QUIN_MI2S_RX "MI2S-LPAIF_VA-RX-QUINARY"
-#define LPASS_BE_QUIN_MI2S_TX "MI2S-LPAIF_VA-TX-QUINARY"
-#define LPASS_BE_SEN_MI2S_TX "MI2S-LPAIF_WSA-RX-SENARY"
-#define LPASS_BE_SEN_MI2S_RX "MI2S-LPAIF_WSA-TX-SENARY"
+#define LPASS_BE_QUAT_MI2S_RX "MI2S-LPAIF_RXTX-RX-PRIMARY"
+#define LPASS_BE_QUAT_MI2S_TX "MI2S-LPAIF_RXTX-TX-PRIMARY"
+#define LPASS_BE_QUIN_MI2S_RX "MI2S-LPAIF_VA-RX-PRIMARY"
+#define LPASS_BE_QUIN_MI2S_TX "MI2S-LPAIF_VA-TX-PRIMARY"
+#define LPASS_BE_SEN_MI2S_RX "MI2S-LPAIF_WSA-RX-PRIMARY"
+#define LPASS_BE_SEN_MI2S_TX "MI2S-LPAIF_WSA-TX-PRIMARY"
 
 #define LPASS_BE_SLIMBUS_0_RX "SLIM-DEV1-RX-0"
 #define LPASS_BE_SLIMBUS_0_TX "SLIM-DEV1-TX-0"
@@ -65,16 +65,16 @@
 
 #define LPASS_BE_PRI_TDM_RX_0 "TDM-LPAIF-RX-PRIMARY"
 #define LPASS_BE_PRI_TDM_TX_0 "TDM-LPAIF-TX-PRIMARY"
-#define LPASS_BE_SEC_TDM_RX_0 "TDM-LPAIF-RX-SECONDARY"
-#define LPASS_BE_SEC_TDM_TX_0 "TDM-LPAIF-TX-SECONDARY"
+#define LPASS_BE_SEC_TDM_RX_0 "TDM-LPAIF_AUD-RX-PRIMARY"
+#define LPASS_BE_SEC_TDM_TX_0 "TDM-LPAIF_AUD-TX-PRIMARY"
 #define LPASS_BE_TERT_TDM_RX_0 "TDM-LPAIF-RX-TERTIARY"
 #define LPASS_BE_TERT_TDM_TX_0 "TDM-LPAIF-TX-TERTIARY"
-#define LPASS_BE_SEN_TDM_RX_0 "TDM-LPAIF_WSA-RX-SENARY"
-#define LPASS_BE_SEN_TDM_TX_0 "TDM-LPAIF_WSA-TX-SENARY"
-#define LPASS_BE_QUAT_TDM_RX_0 "TDM-LPAIF_RXTX-RX-QUATERNARY"
-#define LPASS_BE_QUAT_TDM_TX_0 "TDM-LPAIF_RXTX-TX-QUATERNARY"
-#define LPASS_BE_QUIN_TDM_RX_0 "TDM-LPAIF_VA-RX-QUINARY"
-#define LPASS_BE_QUIN_TDM_TX_0 "TDM-LPAIF_VA-TX-QUINARY"
+#define LPASS_BE_SEN_TDM_RX_0 "TDM-LPAIF_WSA-RX-PRIMARY"
+#define LPASS_BE_SEN_TDM_TX_0 "TDM-LPAIF_WSA-TX-PRIMARY"
+#define LPASS_BE_QUAT_TDM_RX_0 "TDM-LPAIF_RXTX-RX-PRIMARY"
+#define LPASS_BE_QUAT_TDM_TX_0 "TDM-LPAIF_RXTX-TX-PRIMARY"
+#define LPASS_BE_QUIN_TDM_RX_0 "TDM-LPAIF_VA-RX-PRIMARY"
+#define LPASS_BE_QUIN_TDM_TX_0 "TDM-LPAIF_VA-TX-PRIMARY"
 
 
 #define LPASS_BE_USB_AUDIO_RX "USB_AUDIO-RX"

+ 13 - 13
asoc/msm_common.c

@@ -221,22 +221,22 @@ static void check_userspace_service_state(struct snd_soc_pcm_runtime *rtd,
 
 static int get_intf_index(const char *stream_name)
 {
-	if (strnstr(stream_name, "PRIMARY", strlen(stream_name)))
-		return PRI_MI2S_TDM_AUXPCM;
-	else if (strnstr(stream_name, "SECONDARY", strlen(stream_name)))
-		return SEC_MI2S_TDM_AUXPCM;
-	else if (strnstr(stream_name, "TERTIARY", strlen(stream_name)))
-		return TER_MI2S_TDM_AUXPCM;
-	else if (strnstr(stream_name, "QUATERNARY", strlen(stream_name)))
+	if (strnstr(stream_name, "LPAIF_RXTX", strlen(stream_name)))
 		return QUAT_MI2S_TDM_AUXPCM;
-	else if (strnstr(stream_name, "QUINARY", strlen(stream_name)))
-		return QUIN_MI2S_TDM_AUXPCM;
-	else if (strnstr(stream_name, "SENARY", strlen(stream_name)))
+	else if (strnstr(stream_name, "LPAIF_WSA", strlen(stream_name)))
 		return SEN_MI2S_TDM_AUXPCM;
-	else {
-		pr_debug("%s: stream name %s does not match\n", __func__, stream_name);
-		return -EINVAL;
+	else if (strnstr(stream_name, "LPAIF_VA", strlen(stream_name)))
+		return QUIN_MI2S_TDM_AUXPCM;
+	else if (strnstr(stream_name, "LPAIF_AUD", strlen(stream_name)))
+		return SEC_MI2S_TDM_AUXPCM;
+	else if (strnstr(stream_name, "LPAIF", strlen(stream_name))) {
+		if (strnstr(stream_name, "PRIMARY", strlen(stream_name)))
+			return PRI_MI2S_TDM_AUXPCM;
+		else if (strnstr(stream_name, "TERTIARY", strlen(stream_name)))
+			return TER_MI2S_TDM_AUXPCM;
 	}
+	pr_debug("%s: stream name %s does not match\n", __func__, stream_name);
+	return -EINVAL;
 }
 
 int msm_common_snd_startup(struct snd_pcm_substream *substream)