Skip to content

Commit cf828ea

Browse files
committed
ASoC: SOF: ipc: Add no reply inline calls
95% of the calls inside SOF to TX an IPC don't care about a reply. Yet the previous commit cleaned up a bunch of replies that were being populated and then thrown away. This adds some functions so users who do not need replies don't feel obligated to provide the space to the API. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
1 parent 41f9d4f commit cf828ea

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

sound/soc/sof/sof-client.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ struct sof_client_dev {
3939

4040
int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg,
4141
void *reply_data, size_t reply_bytes);
42+
static inline int sof_client_ipc_tx_message_no_reply(struct sof_client_dev *cdev, void *ipc_msg)
43+
{
44+
return sof_client_ipc_tx_message(cdev, ipc_msg, NULL, 0);
45+
}
4246
int sof_client_ipc_set_get_data(struct sof_client_dev *cdev, void *ipc_msg,
4347
bool set);
4448

sound/soc/sof/sof-priv.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,20 @@ static inline void snd_sof_ipc_msgs_rx(struct snd_sof_dev *sdev)
708708
}
709709
int sof_ipc_tx_message(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
710710
void *reply_data, size_t reply_bytes);
711+
static inline int sof_ipc_tx_message_no_reply(struct snd_sof_ipc *ipc, void *msg_data,
712+
size_t msg_bytes)
713+
{
714+
return sof_ipc_tx_message(ipc, msg_data, msg_bytes, NULL, 0);
715+
}
711716
int sof_ipc_set_get_data(struct snd_sof_ipc *ipc, void *msg_data,
712717
size_t msg_bytes, bool set);
713718
int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
714719
void *reply_data, size_t reply_bytes);
720+
static inline int sof_ipc_tx_message_no_pm_no_reply(struct snd_sof_ipc *ipc, void *msg_data,
721+
size_t msg_bytes)
722+
{
723+
return sof_ipc_tx_message_no_pm(ipc, msg_data, msg_bytes, NULL, 0);
724+
}
715725
int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
716726
size_t reply_bytes);
717727

0 commit comments

Comments
 (0)