ASoC: msm: qdsp6: Add new AFE API supported by q6
Add new I2S AFE API command to q6 to support multiple
audio formats to I2S port including L-PCM, compressed,
L-PCM packed in IEC-60958, and compressed in IEC-60958.
Change-Id: Ia4a902d750a62bd183f45d1d72359596822be6dd
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
diff --git a/include/sound/apr_audio.h b/include/sound/apr_audio.h
index 85da871..5408a52 100644
--- a/include/sound/apr_audio.h
+++ b/include/sound/apr_audio.h
@@ -225,7 +225,8 @@
/* i2s stereo = 3 */
u16 ws; /* 0, word select signal from external source */
/* 1, word select signal from internal source */
- u16 reserved;
+ u16 format; /* don't touch this field if it is not for */
+ /* AFE_PORT_CMD_I2S_CONFIG opcode */
} __attribute__ ((packed));
struct afe_port_hdmi_cfg {
@@ -298,6 +299,7 @@
#define AFE_PORT_AUDIO_IF_CONFIG 0x000100d3
#define AFE_PORT_AUDIO_SLIM_SCH_CONFIG 0x000100e4
#define AFE_PORT_MULTI_CHAN_HDMI_AUDIO_IF_CONFIG 0x000100D9
+#define AFE_PORT_CMD_I2S_CONFIG 0x000100E7
union afe_port_config {
struct afe_port_pcm_cfg pcm;
diff --git a/include/sound/q6afe.h b/include/sound/q6afe.h
index 2d0f53f..9893075 100644
--- a/include/sound/q6afe.h
+++ b/include/sound/q6afe.h
@@ -21,6 +21,11 @@
#define MSM_AFE_6CHANNELS 6
#define MSM_AFE_8CHANNELS 8
+#define MSM_AFE_I2S_FORMAT_LPCM 0
+#define MSM_AFE_I2S_FORMAT_COMPR 1
+#define MSM_AFE_I2S_FORMAT_IEC60958_LPCM 2
+#define MSM_AFE_I2S_FORMAT_IEC60958_COMPR 3
+
#define MSM_AFE_PORT_TYPE_RX 0
#define MSM_AFE_PORT_TYPE_TX 1