Prechádzať zdrojové kódy

dsp: add support for Slimbus 9 port in AFE

Add support for SLIMBUS_9 Rx and Tx ports in AFE
driver.

Change-Id: I7a21c06fd67984ef60e7d40b61a100ddc48371fc
Signed-off-by: Surendar Karka <[email protected]>
Signed-off-by: Mangesh Kunchamwar <[email protected]>
Surendar Karka 6 rokov pred
rodič
commit
b0dd21f1a3
4 zmenil súbory, kde vykonal 27 pridanie a 2 odobranie
  1. 10 0
      dsp/q6afe.c
  2. 6 0
      dsp/q6audio-v2.c
  3. 7 1
      include/dsp/apr_audio-v2.h
  4. 4 1
      include/dsp/q6afe-v2.h

+ 10 - 0
dsp/q6afe.c

@@ -839,6 +839,8 @@ int afe_sizeof_cfg_cmd(u16 port_id)
 	case SLIMBUS_7_TX:
 	case SLIMBUS_8_RX:
 	case SLIMBUS_8_TX:
+	case SLIMBUS_9_RX:
+	case SLIMBUS_9_TX:
 		ret_size = SIZEOF_CFG_CMD(afe_param_id_slimbus_cfg);
 		break;
 	case VOICE_PLAYBACK_TX:
@@ -4041,6 +4043,8 @@ static int __afe_port_start(u16 port_id, union afe_port_config *afe_config,
 	case SLIMBUS_7_TX:
 	case SLIMBUS_8_RX:
 	case SLIMBUS_8_TX:
+	case SLIMBUS_9_RX:
+	case SLIMBUS_9_TX:
 		cfg_type = AFE_PARAM_ID_SLIMBUS_CONFIG;
 		break;
 	case AFE_PORT_ID_USB_RX:
@@ -4288,6 +4292,8 @@ int afe_get_port_index(u16 port_id)
 	case SLIMBUS_7_TX: return IDX_SLIMBUS_7_TX;
 	case SLIMBUS_8_RX: return IDX_SLIMBUS_8_RX;
 	case SLIMBUS_8_TX: return IDX_SLIMBUS_8_TX;
+	case SLIMBUS_9_RX: return IDX_SLIMBUS_9_RX;
+	case SLIMBUS_9_TX: return IDX_SLIMBUS_9_TX;
 	case AFE_PORT_ID_USB_RX: return IDX_AFE_PORT_ID_USB_RX;
 	case AFE_PORT_ID_USB_TX: return IDX_AFE_PORT_ID_USB_TX;
 	case AFE_PORT_ID_PRIMARY_MI2S_RX:
@@ -4685,6 +4691,8 @@ int afe_open(u16 port_id,
 	case SLIMBUS_7_TX:
 	case SLIMBUS_8_RX:
 	case SLIMBUS_8_TX:
+	case SLIMBUS_9_RX:
+	case SLIMBUS_9_TX:
 		cfg_type = AFE_PARAM_ID_SLIMBUS_CONFIG;
 		break;
 	case AFE_PORT_ID_USB_RX:
@@ -6557,6 +6565,8 @@ int afe_validate_port(u16 port_id)
 	case SLIMBUS_7_TX:
 	case SLIMBUS_8_RX:
 	case SLIMBUS_8_TX:
+	case SLIMBUS_9_RX:
+	case SLIMBUS_9_TX:
 	case AFE_PORT_ID_USB_RX:
 	case AFE_PORT_ID_USB_TX:
 	case AFE_PORT_ID_PRIMARY_MI2S_RX:

+ 6 - 0
dsp/q6audio-v2.c

@@ -79,6 +79,8 @@ int q6audio_get_port_index(u16 port_id)
 	case SLIMBUS_7_TX: return IDX_SLIMBUS_7_TX;
 	case SLIMBUS_8_RX: return IDX_SLIMBUS_8_RX;
 	case SLIMBUS_8_TX: return IDX_SLIMBUS_8_TX;
+	case SLIMBUS_9_RX: return IDX_SLIMBUS_9_RX;
+	case SLIMBUS_9_TX: return IDX_SLIMBUS_9_TX;
 	case INT_BT_SCO_RX: return IDX_INT_BT_SCO_RX;
 	case INT_BT_SCO_TX: return IDX_INT_BT_SCO_TX;
 	case INT_BT_A2DP_RX: return IDX_INT_BT_A2DP_RX;
@@ -415,6 +417,8 @@ int q6audio_get_port_id(u16 port_id)
 	case SLIMBUS_7_TX: return AFE_PORT_ID_SLIMBUS_MULTI_CHAN_7_TX;
 	case SLIMBUS_8_RX: return AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_RX;
 	case SLIMBUS_8_TX: return AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_TX;
+	case SLIMBUS_9_RX: return AFE_PORT_ID_SLIMBUS_MULTI_CHAN_9_RX;
+	case SLIMBUS_9_TX: return AFE_PORT_ID_SLIMBUS_MULTI_CHAN_9_TX;
 	case INT_BT_SCO_RX: return AFE_PORT_ID_INTERNAL_BT_SCO_RX;
 	case INT_BT_SCO_TX: return AFE_PORT_ID_INTERNAL_BT_SCO_TX;
 	case INT_BT_A2DP_RX: return AFE_PORT_ID_INTERNAL_BT_A2DP_RX;
@@ -925,6 +929,8 @@ int q6audio_validate_port(u16 port_id)
 	case SLIMBUS_7_TX:
 	case SLIMBUS_8_RX:
 	case SLIMBUS_8_TX:
+	case SLIMBUS_9_RX:
+	case SLIMBUS_9_TX:
 	case INT_BT_SCO_RX:
 	case INT_BT_SCO_TX:
 	case INT_BT_A2DP_RX:

+ 7 - 1
include/dsp/apr_audio-v2.h

@@ -1085,7 +1085,9 @@ struct adm_cmd_connect_afe_port_v5 {
 #define SLIMBUS_7_TX		0x400f
 #define SLIMBUS_8_RX		0x4010
 #define SLIMBUS_8_TX		0x4011
-#define SLIMBUS_PORT_LAST	SLIMBUS_8_TX
+#define SLIMBUS_9_RX		0x4012
+#define SLIMBUS_9_TX		0x4013
+#define SLIMBUS_PORT_LAST	SLIMBUS_9_TX
 #define INT_BT_SCO_RX 0x3000
 #define INT_BT_SCO_TX 0x3001
 #define INT_BT_A2DP_RX 0x3002
@@ -1284,6 +1286,10 @@ struct adm_cmd_connect_afe_port_v5 {
 #define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_RX      0x4010
 /* SLIMbus Tx port on channel 8. */
 #define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_8_TX      0x4011
+/* SLIMbus Rx port on channel 9. */
+#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_9_RX      0x4012
+/* SLIMbus Tx port on channel 9. */
+#define AFE_PORT_ID_SLIMBUS_MULTI_CHAN_9_TX      0x4013
 /* AFE Rx port for audio over Display port */
 #define AFE_PORT_ID_HDMI_OVER_DP_RX              0x6020
 /*USB AFE port */

+ 4 - 1
include/dsp/q6afe-v2.h

@@ -251,10 +251,13 @@ enum {
 	IDX_AFE_PORT_ID_TX_CODEC_DMA_TX_5,
 	IDX_AFE_PORT_ID_RX_CODEC_DMA_RX_6,
 	IDX_AFE_PORT_ID_RX_CODEC_DMA_RX_7,
-	/* IDX 182 to 185 */
+	/* IDX 182 to 184 */
 	IDX_SECONDARY_SPDIF_RX,
 	IDX_PRIMARY_SPDIF_TX,
 	IDX_SECONDARY_SPDIF_TX,
+	/* IDX 185 to 187 */
+	IDX_SLIMBUS_9_RX,
+	IDX_SLIMBUS_9_TX,
 	AFE_MAX_PORTS
 };