summaryrefslogtreecommitdiffstats
path: root/sound/soc/qcom/qdsp6/audioreach.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/qcom/qdsp6/audioreach.h')
-rw-r--r--sound/soc/qcom/qdsp6/audioreach.h47
1 files changed, 30 insertions, 17 deletions
diff --git a/sound/soc/qcom/qdsp6/audioreach.h b/sound/soc/qcom/qdsp6/audioreach.h
index 3ee8bfcd0121..1d1d47d47d40 100644
--- a/sound/soc/qcom/qdsp6/audioreach.h
+++ b/sound/soc/qcom/qdsp6/audioreach.h
@@ -15,6 +15,8 @@ struct q6apm_graph;
#define MODULE_ID_PCM_CNV 0x07001003
#define MODULE_ID_PCM_ENC 0x07001004
#define MODULE_ID_PCM_DEC 0x07001005
+#define MODULE_ID_SAL 0x07001010
+#define MODULE_ID_MFC 0x07001015
#define MODULE_ID_CODEC_DMA_SINK 0x07001023
#define MODULE_ID_CODEC_DMA_SOURCE 0x07001024
#define MODULE_ID_I2S_SINK 0x0700100A
@@ -499,6 +501,16 @@ struct data_logging_config {
uint32_t mode;
} __packed;
+#define PARAM_ID_SAL_OUTPUT_CFG 0x08001016
+struct param_id_sal_output_config {
+ uint32_t bits_per_sample;
+} __packed;
+
+#define PARAM_ID_SAL_LIMITER_ENABLE 0x0800101E
+struct param_id_sal_limiter_enable {
+ uint32_t enable_lim;
+} __packed;
+
#define PARAM_ID_MFC_OUTPUT_MEDIA_FORMAT 0x08001024
struct param_id_mfc_media_format {
@@ -525,6 +537,11 @@ struct payload_media_fmt_pcm {
uint8_t channel_mapping[];
} __packed;
+#define PARAM_ID_MODULE_ENABLE 0x08001026
+struct param_id_module_enable {
+ uint32_t enable;
+} __packed;
+
#define PARAM_ID_CODEC_DMA_INTF_CFG 0x08001063
struct param_id_codec_dma_intf_cfg {
@@ -595,7 +612,11 @@ struct audioreach_graph_info {
int id;
uint32_t num_sub_graphs;
struct list_head sg_list;
- struct list_head connection_list;
+ /* DPCM connection from FE Graph to BE graph */
+ uint32_t src_mod_inst_id;
+ uint32_t src_mod_op_port_id;
+ uint32_t dst_mod_inst_id;
+ uint32_t dst_mod_ip_port_id;
};
struct audioreach_sub_graph {
@@ -623,6 +644,8 @@ struct audioreach_container {
struct audioreach_sub_graph *sub_graph;
};
+#define AR_MAX_MOD_LINKS 8
+
struct audioreach_module {
uint32_t module_id;
uint32_t instance_id;
@@ -633,11 +656,12 @@ struct audioreach_module {
uint32_t in_port;
uint32_t out_port;
+ uint32_t num_connections;
/* Connections */
uint32_t src_mod_inst_id;
- uint32_t src_mod_op_port_id;
- uint32_t dst_mod_inst_id;
- uint32_t dst_mod_ip_port_id;
+ uint32_t src_mod_op_port_id[AR_MAX_MOD_LINKS];
+ uint32_t dst_mod_inst_id[AR_MAX_MOD_LINKS];
+ uint32_t dst_mod_ip_port_id[AR_MAX_MOD_LINKS];
/* Format specifics */
uint32_t ch_fmt;
@@ -694,9 +718,8 @@ void *audioreach_alloc_apm_pkt(int pkt_size, uint32_t opcode, uint32_t token,
void *audioreach_alloc_pkt(int payload_size, uint32_t opcode,
uint32_t token, uint32_t src_port,
uint32_t dest_port);
-void *audioreach_alloc_graph_pkt(struct q6apm *apm,
- struct list_head *sg_list,
- int graph_id);
+void *audioreach_alloc_graph_pkt(struct q6apm *apm, struct audioreach_graph_info
+ *info);
/* Topology specific */
int audioreach_tplg_init(struct snd_soc_component *component);
@@ -717,14 +740,4 @@ int audioreach_set_media_format(struct q6apm_graph *graph,
int audioreach_shared_memory_send_eos(struct q6apm_graph *graph);
int audioreach_gain_set_vol_ctrl(struct q6apm *apm,
struct audioreach_module *module, int vol);
-struct audioreach_module *audioreach_get_container_last_module(
- struct audioreach_container *container);
-struct audioreach_module *audioreach_get_container_first_module(
- struct audioreach_container *container);
-struct audioreach_module *audioreach_get_container_next_module(
- struct audioreach_container *container,
- struct audioreach_module *module);
-#define list_for_each_container_module(mod, cont) \
- for (mod = audioreach_get_container_first_module(cont); mod != NULL; \
- mod = audioreach_get_container_next_module(cont, mod))
#endif /* __AUDIOREACH_H__ */