ASoC: msm: qdsp6: Add APIs for compressed audio playback/capture

Add APIs for compressed audio playback/capture in pass through mode

Change-Id: Ic9b4c71b518e653dae4726112edb75025ccc2bc2
Signed-off-by: Santosh Mardi <gsantosh@codeaurora.org>
diff --git a/include/sound/apr_audio.h b/include/sound/apr_audio.h
index 5408a52..f71d743 100644
--- a/include/sound/apr_audio.h
+++ b/include/sound/apr_audio.h
@@ -1033,6 +1033,10 @@
 #define WMA_V9       0x00010BF4
 #define AMR_WB_PLUS  0x00010BF5
 #define AC3_DECODER  0x00010BF6
+#define EAC3_DECODER 0x00010C3C
+#define DTS	0x00010D88
+#define ATRAC	0x00010D89
+#define MAT	0x00010D8A
 #define G711_ALAW_FS 0x00010BF7
 #define G711_MLAW_FS 0x00010BF8
 #define G711_PCM_FS  0x00010BF9
@@ -1059,6 +1063,16 @@
 	u32            format;
 } __attribute__((packed));
 
+#define IEC_61937_MASK	0x00000001
+#define IEC_60958_MASK	0x00000002
+
+#define ASM_STREAM_CMD_OPEN_WRITE_COMPRESSED	0x00010D84
+struct asm_stream_cmd_open_write_compressed {
+	struct apr_hdr hdr;
+	u32	flags;
+	u32	format;
+} __packed;
+
 #define ASM_STREAM_CMD_OPEN_READWRITE                    0x00010BCC
 
 struct asm_stream_cmd_open_read_write {
@@ -1069,6 +1083,15 @@
 	u32                read_format;
 } __attribute__((packed));
 
+#define ADM_CMD_CONNECT_AFE_PORT 0x00010320
+
+struct adm_cmd_connect_afe_port {
+	struct apr_hdr     hdr;
+	u8	mode; /*mode represent the interface is for RX or TX*/
+	u8	session_id; /*ASM session ID*/
+	u16	afe_port_id;
+} __packed;
+
 #define ASM_STREAM_CMD_SET_ENCDEC_PARAM                  0x00010C10
 #define ASM_STREAM_CMD_GET_ENCDEC_PARAM                  0x00010C11
 #define ASM_ENCDEC_CFG_BLK_ID				 0x00010C2C
diff --git a/include/sound/q6adm.h b/include/sound/q6adm.h
index fe25d22..29fb606 100644
--- a/include/sound/q6adm.h
+++ b/include/sound/q6adm.h
@@ -40,6 +40,8 @@
 int adm_matrix_map(int session_id, int path, int num_copps,
 				unsigned int *port_id, int copp_id);
 
+int adm_connect_afe_port(int mode, int session_id, int port_id);
+
 #ifdef CONFIG_RTAC
 int adm_get_copp_id(int port_id);
 #endif
diff --git a/include/sound/q6asm.h b/include/sound/q6asm.h
index 0fabc5b..c3d4bd5 100644
--- a/include/sound/q6asm.h
+++ b/include/sound/q6asm.h
@@ -43,6 +43,12 @@
 #define FORMAT_AMR_WB_PLUS  0x0010
 #define FORMAT_MPEG4_MULTI_AAC 0x0011
 #define FORMAT_MULTI_CHANNEL_LINEAR_PCM 0x0012
+#define FORMAT_AC3	0x0013
+#define FORMAT_DTS	0x0014
+#define FORMAT_EAC3	0x0015
+#define FORMAT_ATRAC	0x0016
+#define FORMAT_MAT	0x0017
+#define FORMAT_AAC	0x0018
 
 #define ENCDEC_SBCBITRATE   0x0001
 #define ENCDEC_IMMEDIATE_DECODE 0x0002
@@ -175,6 +181,8 @@
 
 int q6asm_open_write(struct audio_client *ac, uint32_t format);
 
+int q6asm_open_write_compressed(struct audio_client *ac, uint32_t format);
+
 int q6asm_open_read_write(struct audio_client *ac,
 			uint32_t rd_format,
 			uint32_t wr_format);
diff --git a/include/sound/snd_compress_params.h b/include/sound/snd_compress_params.h
index 5080e13..232c2a2 100644
--- a/include/sound/snd_compress_params.h
+++ b/include/sound/snd_compress_params.h
@@ -69,7 +69,8 @@
 #define SND_AUDIOCODEC_IEC61937              ((__u32) 0x0000000B)
 #define SND_AUDIOCODEC_G723_1                ((__u32) 0x0000000C)
 #define SND_AUDIOCODEC_G729                  ((__u32) 0x0000000D)
-
+#define SND_AUDIOCODEC_AC3		     ((__u32) 0x0000000E)
+#define SND_AUDIOCODEC_DTS		     ((__u32) 0x0000000F)
 /*
  * Profile and modes are listed with bit masks. This allows for a
  * more compact representation of fields that will not evolve