Lines Matching refs:graph
582 int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt, in audioreach_graph_send_cmd_sync() argument
586 return audioreach_send_cmd_sync(graph->dev, NULL, &graph->result, &graph->lock, in audioreach_graph_send_cmd_sync()
587 graph->port, &graph->cmd_wait, pkt, rsp_opcode); in audioreach_graph_send_cmd_sync()
591 static int audioreach_display_port_set_media_format(struct q6apm_graph *graph, in audioreach_display_port_set_media_format() argument
650 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_display_port_set_media_format()
658 static int audioreach_codec_dma_set_media_format(struct q6apm_graph *graph, in audioreach_codec_dma_set_media_format() argument
728 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_codec_dma_set_media_format()
735 int audioreach_send_u32_param(struct q6apm_graph *graph, struct audioreach_module *module, in audioreach_send_u32_param() argument
762 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_send_u32_param()
770 static int audioreach_sal_limiter_enable(struct q6apm_graph *graph, in audioreach_sal_limiter_enable() argument
773 return audioreach_send_u32_param(graph, module, PARAM_ID_SAL_LIMITER_ENABLE, enable); in audioreach_sal_limiter_enable()
776 static int audioreach_sal_set_media_format(struct q6apm_graph *graph, in audioreach_sal_set_media_format() argument
780 return audioreach_send_u32_param(graph, module, PARAM_ID_SAL_OUTPUT_CFG, cfg->bit_width); in audioreach_sal_set_media_format()
783 static int audioreach_module_enable(struct q6apm_graph *graph, in audioreach_module_enable() argument
787 return audioreach_send_u32_param(graph, module, PARAM_ID_MODULE_ENABLE, enable); in audioreach_module_enable()
790 static int audioreach_gapless_set_media_format(struct q6apm_graph *graph, in audioreach_gapless_set_media_format() argument
794 return audioreach_send_u32_param(graph, module, PARAM_ID_EARLY_EOS_DELAY, in audioreach_gapless_set_media_format()
798 static int audioreach_mfc_set_media_format(struct q6apm_graph *graph, in audioreach_mfc_set_media_format() argument
838 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_mfc_set_media_format()
907 int audioreach_compr_set_param(struct q6apm_graph *graph, struct audioreach_module_config *mcfg) in audioreach_compr_set_param() argument
916 iid = q6apm_graph_get_rx_shmem_module_iid(graph); in audioreach_compr_set_param()
918 0, graph->port->id, iid); in audioreach_compr_set_param()
931 rc = gpr_send_port_pkt(graph->port, pkt); in audioreach_compr_set_param()
938 static int audioreach_i2s_set_media_format(struct q6apm_graph *graph, in audioreach_i2s_set_media_format() argument
1007 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_i2s_set_media_format()
1014 static int audioreach_logging_set_media_format(struct q6apm_graph *graph, in audioreach_logging_set_media_format() argument
1042 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_logging_set_media_format()
1049 static int audioreach_pcm_set_media_format(struct q6apm_graph *graph, in audioreach_pcm_set_media_format() argument
1061 dev_err(graph->dev, "Error: Invalid channels (%d)!\n", num_channels); in audioreach_pcm_set_media_format()
1100 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_pcm_set_media_format()
1107 static int audioreach_shmem_set_media_format(struct q6apm_graph *graph, in audioreach_shmem_set_media_format() argument
1120 dev_err(graph->dev, "Error: Invalid channels (%d)!\n", num_channels); in audioreach_shmem_set_media_format()
1127 graph->port->id, module->instance_id); in audioreach_shmem_set_media_format()
1170 rc = audioreach_graph_send_cmd_sync(graph, pkt, 0); in audioreach_shmem_set_media_format()
1209 static int audioreach_gain_set(struct q6apm_graph *graph, struct audioreach_module *module) in audioreach_gain_set() argument
1231 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_gain_set()
1238 int audioreach_set_media_format(struct q6apm_graph *graph, struct audioreach_module *module, in audioreach_set_media_format() argument
1245 rc = audioreach_module_enable(graph, module, true); in audioreach_set_media_format()
1247 rc = audioreach_logging_set_media_format(graph, module); in audioreach_set_media_format()
1254 rc = audioreach_pcm_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1257 rc = audioreach_display_port_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1261 rc = audioreach_i2s_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1264 rc = audioreach_shmem_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1267 rc = audioreach_gain_set(graph, module); in audioreach_set_media_format()
1271 rc = audioreach_codec_dma_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1274 rc = audioreach_sal_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1276 rc = audioreach_sal_limiter_enable(graph, module, true); in audioreach_set_media_format()
1279 rc = audioreach_mfc_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1282 rc = audioreach_gapless_set_media_format(graph, module, cfg); in audioreach_set_media_format()
1292 void audioreach_graph_free_buf(struct q6apm_graph *graph) in audioreach_graph_free_buf() argument
1296 mutex_lock(&graph->lock); in audioreach_graph_free_buf()
1297 port = &graph->rx_data; in audioreach_graph_free_buf()
1302 port = &graph->tx_data; in audioreach_graph_free_buf()
1306 mutex_unlock(&graph->lock); in audioreach_graph_free_buf()
1310 int audioreach_map_memory_regions(struct q6apm_graph *graph, unsigned int dir, size_t period_sz, in audioreach_map_memory_regions() argument
1322 data = &graph->rx_data; in audioreach_map_memory_regions()
1324 data = &graph->tx_data; in audioreach_map_memory_regions()
1340 graph->port->id); in audioreach_map_memory_regions()
1353 mutex_lock(&graph->lock); in audioreach_map_memory_regions()
1364 mutex_unlock(&graph->lock); in audioreach_map_memory_regions()
1366 rc = audioreach_graph_send_cmd_sync(graph, pkt, APM_CMD_RSP_SHARED_MEM_MAP_REGIONS); in audioreach_map_memory_regions()
1374 int audioreach_shared_memory_send_eos(struct q6apm_graph *graph) in audioreach_shared_memory_send_eos() argument
1380 iid = q6apm_graph_get_rx_shmem_module_iid(graph); in audioreach_shared_memory_send_eos()
1382 graph->port->id, iid); in audioreach_shared_memory_send_eos()
1390 rc = gpr_send_port_pkt(graph->port, pkt); in audioreach_shared_memory_send_eos()