Lines Matching refs:pkt
200 struct gpr_pkt *pkt; in __audioreach_alloc_pkt() local
211 pkt = p; in __audioreach_alloc_pkt()
212 pkt->hdr.version = GPR_PKT_VER; in __audioreach_alloc_pkt()
213 pkt->hdr.hdr_size = GPR_PKT_HEADER_WORD_SIZE; in __audioreach_alloc_pkt()
214 pkt->hdr.pkt_size = pkt_size; in __audioreach_alloc_pkt()
215 pkt->hdr.dest_port = dest_port; in __audioreach_alloc_pkt()
216 pkt->hdr.src_port = src_port; in __audioreach_alloc_pkt()
218 pkt->hdr.dest_domain = GPR_DOMAIN_ID_ADSP; in __audioreach_alloc_pkt()
219 pkt->hdr.src_domain = GPR_DOMAIN_ID_APPS; in __audioreach_alloc_pkt()
220 pkt->hdr.token = token; in __audioreach_alloc_pkt()
221 pkt->hdr.opcode = opcode; in __audioreach_alloc_pkt()
231 return pkt; in __audioreach_alloc_pkt()
484 struct gpr_pkt *pkt; in audioreach_alloc_graph_pkt() local
509 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_GRAPH_OPEN, 0); in audioreach_alloc_graph_pkt()
510 if (IS_ERR(pkt)) in audioreach_alloc_graph_pkt()
511 return pkt; in audioreach_alloc_graph_pkt()
513 p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_alloc_graph_pkt()
562 return pkt; in audioreach_alloc_graph_pkt()
569 struct gpr_pkt *pkt, uint32_t rsp_opcode) in audioreach_send_cmd_sync() argument
572 struct gpr_hdr *hdr = &pkt->hdr; in audioreach_send_cmd_sync()
580 rc = gpr_send_port_pkt(port, pkt); in audioreach_send_cmd_sync()
582 rc = gpr_send_pkt(gdev, pkt); in audioreach_send_cmd_sync()
612 int audioreach_graph_send_cmd_sync(struct q6apm_graph *graph, struct gpr_pkt *pkt, in audioreach_graph_send_cmd_sync() argument
617 graph->port, &graph->cmd_wait, pkt, rsp_opcode); in audioreach_graph_send_cmd_sync()
633 struct gpr_pkt *pkt; in audioreach_codec_dma_set_media_format() local
644 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0); in audioreach_codec_dma_set_media_format()
645 if (IS_ERR(pkt)) in audioreach_codec_dma_set_media_format()
646 return PTR_ERR(pkt); in audioreach_codec_dma_set_media_format()
648 p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_codec_dma_set_media_format()
692 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_codec_dma_set_media_format()
694 kfree(pkt); in audioreach_codec_dma_set_media_format()
709 struct gpr_pkt *pkt; in audioreach_i2s_set_media_format() local
718 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0); in audioreach_i2s_set_media_format()
719 if (IS_ERR(pkt)) in audioreach_i2s_set_media_format()
720 return PTR_ERR(pkt); in audioreach_i2s_set_media_format()
722 p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_i2s_set_media_format()
768 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_i2s_set_media_format()
770 kfree(pkt); in audioreach_i2s_set_media_format()
781 struct gpr_pkt *pkt; in audioreach_logging_set_media_format() local
785 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0); in audioreach_logging_set_media_format()
786 if (IS_ERR(pkt)) in audioreach_logging_set_media_format()
787 return PTR_ERR(pkt); in audioreach_logging_set_media_format()
789 p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_logging_set_media_format()
803 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_logging_set_media_format()
805 kfree(pkt); in audioreach_logging_set_media_format()
819 struct gpr_pkt *pkt; in audioreach_pcm_set_media_format() local
828 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0); in audioreach_pcm_set_media_format()
829 if (IS_ERR(pkt)) in audioreach_pcm_set_media_format()
830 return PTR_ERR(pkt); in audioreach_pcm_set_media_format()
832 cfg = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_pcm_set_media_format()
861 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_pcm_set_media_format()
863 kfree(pkt); in audioreach_pcm_set_media_format()
877 struct gpr_pkt *pkt; in audioreach_shmem_set_media_format() local
887 pkt = audioreach_alloc_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0, in audioreach_shmem_set_media_format()
889 if (IS_ERR(pkt)) in audioreach_shmem_set_media_format()
890 return PTR_ERR(pkt); in audioreach_shmem_set_media_format()
892 p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_shmem_set_media_format()
923 rc = audioreach_graph_send_cmd_sync(graph, pkt, 0); in audioreach_shmem_set_media_format()
925 kfree(pkt); in audioreach_shmem_set_media_format()
935 struct gpr_pkt *pkt; in audioreach_gain_set_vol_ctrl() local
939 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0); in audioreach_gain_set_vol_ctrl()
940 if (IS_ERR(pkt)) in audioreach_gain_set_vol_ctrl()
941 return PTR_ERR(pkt); in audioreach_gain_set_vol_ctrl()
943 p = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_gain_set_vol_ctrl()
954 rc = q6apm_send_cmd_sync(apm, pkt, 0); in audioreach_gain_set_vol_ctrl()
956 kfree(pkt); in audioreach_gain_set_vol_ctrl()
967 struct gpr_pkt *pkt; in audioreach_gain_set() local
970 pkt = audioreach_alloc_apm_cmd_pkt(payload_size, APM_CMD_SET_CFG, 0); in audioreach_gain_set()
971 if (IS_ERR(pkt)) in audioreach_gain_set()
972 return PTR_ERR(pkt); in audioreach_gain_set()
974 cfg = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_gain_set()
984 rc = q6apm_send_cmd_sync(graph->apm, pkt, 0); in audioreach_gain_set()
986 kfree(pkt); in audioreach_gain_set()
1052 struct gpr_pkt *pkt; in audioreach_map_memory_regions() local
1074 pkt = audioreach_alloc_apm_pkt(payload_size, APM_CMD_SHARED_MEM_MAP_REGIONS, dir, in audioreach_map_memory_regions()
1076 if (IS_ERR(pkt)) in audioreach_map_memory_regions()
1077 return PTR_ERR(pkt); in audioreach_map_memory_regions()
1079 p = (void *)pkt + GPR_HDR_SIZE; in audioreach_map_memory_regions()
1101 rc = audioreach_graph_send_cmd_sync(graph, pkt, APM_CMD_RSP_SHARED_MEM_MAP_REGIONS); in audioreach_map_memory_regions()
1103 kfree(pkt); in audioreach_map_memory_regions()
1112 struct gpr_pkt *pkt; in audioreach_shared_memory_send_eos() local
1116 pkt = audioreach_alloc_cmd_pkt(sizeof(*eos), DATA_CMD_WR_SH_MEM_EP_EOS, 0, in audioreach_shared_memory_send_eos()
1118 if (IS_ERR(pkt)) in audioreach_shared_memory_send_eos()
1119 return PTR_ERR(pkt); in audioreach_shared_memory_send_eos()
1121 eos = (void *)pkt + GPR_HDR_SIZE + APM_CMD_HDR_SIZE; in audioreach_shared_memory_send_eos()
1125 rc = gpr_send_port_pkt(graph->port, pkt); in audioreach_shared_memory_send_eos()
1126 kfree(pkt); in audioreach_shared_memory_send_eos()