From 1aeb3e481a292ae78906e5cb0f4f0d8b57f05ad3 Mon Sep 17 00:00:00 2001 From: Daniel Baluta Date: Thu, 4 Oct 2018 11:17:35 +0300 Subject: MLK-18497-3: ASoC: fsl: dsp_proxy: Add new send/recv helpers This commit adds 3 new function helpers for sending messages to DSP framework and waiting for response. While at it cleanup spaces around struct client fields. Reviewed-by: Cosmin-Gabriel Samoila Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_dsp_proxy.h | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'sound/soc/fsl/fsl_dsp_proxy.h') diff --git a/sound/soc/fsl/fsl_dsp_proxy.h b/sound/soc/fsl/fsl_dsp_proxy.h index 131acf3129a7..dc54dc2d00ef 100644 --- a/sound/soc/fsl/fsl_dsp_proxy.h +++ b/sound/soc/fsl/fsl_dsp_proxy.h @@ -21,6 +21,8 @@ #define XF_CFG_MESSAGE_POOL_SIZE 256 +struct xf_client; + /******************************************************************************* * Local proxy data ******************************************************************************/ @@ -284,8 +286,8 @@ struct xf_proxy { /* ...shared memory status change processing item */ struct work_struct work; - struct completion cmd_complete; - int is_ready; + struct completion cmd_complete; + int is_ready; /* ...internal lock */ spinlock_t lock; @@ -366,6 +368,25 @@ struct xf_message *xf_cmd_recv(struct xf_proxy *proxy, struct xf_msg_queue *queue, int wait); +struct xf_message* +xf_cmd_recv_timeout(struct xf_proxy *proxy, wait_queue_head_t *wq, + struct xf_msg_queue *queue, int wait); + +struct xf_message* +xf_cmd_send_recv(struct xf_proxy *proxy, u32 id, u32 opcode, + void *buffer, u32 length); + +struct xf_message* +xf_cmd_send_recv_wq(struct xf_proxy *proxy, u32 id, u32 opcode, void *buffer, + u32 length, wait_queue_head_t *wq, + struct xf_msg_queue *queue); + +struct xf_message* +xf_cmd_send_recv_complete(struct xf_client *client, struct xf_proxy *proxy, + u32 id, u32 opcode, void *buffer, u32 length, + struct work_struct *work, + struct completion *completion); + /* ...mu interrupt handle */ irqreturn_t fsl_dsp_mu_isr(int irq, void *dev_id); -- cgit v1.2.3