summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCong Tang <congt@codeaurora.org>2017-11-23 15:33:29 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2018-03-20 22:35:14 -0700
commit82c2a635bdad501623bc3791a76b0b1d2aa027f0 (patch)
treec0e58ed68e63b7735e46ca67c92c57ead0e5177c /include
parentbb9c0e0ec85aa211716bff72ae378e0c87dae4a2 (diff)
ASoC: msm: Upgrade ADM Driver to support 32 Channels
HLOS update adm driver to support ADM_CMD_OPEN_V8 for 32 channels playback and capture capability. The endpoint payload of this cmd should be the real channel mapping length and aligned with four bytes. Change-Id: I943259108becdfd27a68ce597bee37641cfc8339 Signed-off-by: Cong Tang <congt@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/sound/apr_audio-v2.h138
-rw-r--r--include/sound/q6adm-v2.h3
2 files changed, 35 insertions, 106 deletions
diff --git a/include/sound/apr_audio-v2.h b/include/sound/apr_audio-v2.h
index 65316c63ee90..0393c8869b8f 100644
--- a/include/sound/apr_audio-v2.h
+++ b/include/sound/apr_audio-v2.h
@@ -505,6 +505,39 @@ struct adm_cmd_device_open_v6 {
*/
} __packed;
+/* ADM device open endpoint payload the
+* #ADM_CMD_DEVICE_OPEN_V8 command.
+*/
+struct adm_device_endpoint_payload {
+ u16 dev_num_channel;
+ /* Number of channels the audio COPP sends to/receives from
+ * the endpoint.
+ * Supported values: 1 to 32.
+ * The value is ignored for the voice processor Tx block,
+ * where channel
+ * configuration is derived from the topology ID.
+ */
+
+ u16 bit_width;
+ /* Bit width (in bits) that the audio COPP sends to/receives
+ * from the
+ * endpoint. The value is ignored for the voice processing
+ * Tx block,
+ * where the PCM width is 16 bits.
+ */
+
+ u32 sample_rate;
+ /* Sampling rate at which the audio COPP/voice processor
+ * Tx block
+ * interfaces with the endpoint.
+ * Supported values for voice processor Tx: 8000, 16000,
+ * 48000 Hz
+ * Supported values for audio COPP: >0 and <=192 kHz
+ */
+
+ u8 dev_channel_mapping[32];
+} __packed;
+
/* ADM device open command payload of the
* #ADM_CMD_DEVICE_OPEN_V8 command.
*/
@@ -571,111 +604,6 @@ struct adm_cmd_device_open_v8 {
*/
u16 endpoint_id_3;
u16 reserved;
-
- u16 dev_num_channel;
-/* Number of channels the audio COPP sends to/receives from
- * the endpoint.
- * Supported values: 1 to 32.
- * The value is ignored for the voice processor Tx block,
- * where channel
- * configuration is derived from the topology ID.
- */
-
- u16 bit_width;
-/* Bit width (in bits) that the audio COPP sends to/receives
- * from the
- * endpoint. The value is ignored for the voice processing
- * Tx block,
- * where the PCM width is 16 bits.
- */
-
- u32 sample_rate;
-/* Sampling rate at which the audio COPP/voice processor
- * Tx block
- * interfaces with the endpoint.
- * Supported values for voice processor Tx: 8000, 16000,
- * 48000 Hz
- * Supported values for audio COPP: >0 and <=192 kHz
- */
-
- u8 dev_channel_mapping[32];
-/* Array of channel mapping of buffers that the audio COPP
- * sends to the endpoint. Channel[i] mapping describes channel
- * I inside the buffer, where 0 < i < dev_num_channel.
- * This value is relevant only for an audio Rx COPP.
- * For the voice processor block and Tx audio block, this field
- * is set to zero and is ignored.
- */
-
- u16 dev_num_channel_eid2;
-/* Number of channels the audio COPP sends to/receives from
- * the endpoint.
- * Supported values: 1 to 32.
- * The value is ignored for the voice processor Tx block,
- * where channel
- * configuration is derived from the topology ID.
- */
-
- u16 bit_width_eid2;
-/* Bit width (in bits) that the audio COPP sends to/receives
- * from the
- * endpoint. The value is ignored for the voice processing
- * Tx block,
- * where the PCM width is 16 bits.
- */
-
- u32 sample_rate_eid2;
-/* Sampling rate at which the audio COPP/voice processor
- * Tx block
- * interfaces with the endpoint.
- * Supported values for voice processor Tx: 8000, 16000,
- * 48000 Hz
- * Supported values for audio COPP: >0 and <=192 kHz
- */
-
- u8 dev_channel_mapping_eid2[32];
-/* Array of channel mapping of buffers that the audio COPP
- * sends to the endpoint. Channel[i] mapping describes channel
- * I inside the buffer, where 0 < i < dev_num_channel.
- * This value is relevant only for an audio Rx COPP.
- * For the voice processor block and Tx audio block, this field
- * is set to zero and is ignored.
- */
-
- u16 dev_num_channel_eid3;
-/* Number of channels the audio COPP sends to/receives from
- * the endpoint.
- * Supported values: 1 to 32.
- * The value is ignored for the voice processor Tx block,
- * where channel
- * configuration is derived from the topology ID.
- */
-
- u16 bit_width_eid3;
-/* Bit width (in bits) that the audio COPP sends to/receives
- * from the
- * endpoint. The value is ignored for the voice processing
- * Tx block,
- * where the PCM width is 16 bits.
- */
-
- u32 sample_rate_eid3;
-/* Sampling rate at which the audio COPP/voice processor
- * Tx block
- * interfaces with the endpoint.
- * Supported values for voice processor Tx: 8000, 16000,
- * 48000 Hz
- * Supported values for audio COPP: >0 and <=192 kHz
- */
-
- u8 dev_channel_mapping_eid3[32];
-/* Array of channel mapping of buffers that the audio COPP
- * sends to the endpoint. Channel[i] mapping describes channel
- * I inside the buffer, where 0 < i < dev_num_channel.
- * This value is relevant only for an audio Rx COPP.
- * For the voice processor block and Tx audio block, this field
- * is set to zero and is ignored.
- */
} __packed;
/*
diff --git a/include/sound/q6adm-v2.h b/include/sound/q6adm-v2.h
index e3cfb107c973..4545f2cd3826 100644
--- a/include/sound/q6adm-v2.h
+++ b/include/sound/q6adm-v2.h
@@ -61,7 +61,7 @@ enum adm_status_flags {
};
#define MAX_COPPS_PER_PORT 0x8
-#define ADM_MAX_CHANNELS 8
+#define ADM_MAX_CHANNELS 32
/* multiple copp per stream. */
struct route_payload {
@@ -223,4 +223,5 @@ int adm_programable_channel_mixer(int port_id, int copp_idx, int session_id,
int session_type,
struct msm_pcm_channel_mixer *ch_mixer,
int channel_index);
+void adm_set_native_mode(int mode);
#endif /* __Q6_ADM_V2_H__ */