Lines Matching refs:ipc

33  * Note: higher level sdev->ipc->tx_mutex must be held to make sure that
39 struct snd_sof_ipc *ipc = sdev->ipc;
43 if (ipc->disable_ipc_tx || sdev->fw_state != SOF_FW_BOOT_COMPLETE)
53 msg = &ipc->msg;
75 int sof_ipc_tx_message(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
78 if (msg_bytes > ipc->max_payload_size ||
79 reply_bytes > ipc->max_payload_size)
82 return ipc->ops->tx_msg(ipc->sdev, msg_data, msg_bytes, reply_data,
88 int sof_ipc_set_get_data(struct snd_sof_ipc *ipc, void *msg_data,
91 return ipc->ops->set_get_data(ipc->sdev, msg_data, msg_bytes, set);
100 int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
103 if (msg_bytes > ipc->max_payload_size ||
104 reply_bytes > ipc->max_payload_size)
107 return ipc->ops->tx_msg(ipc->sdev, msg_data, msg_bytes, reply_data,
116 * Sometimes, there is unexpected reply ipc arriving. The reply
117 * ipc belongs to none of the ipcs sent from driver.
118 * In this case, the driver must ignore the ipc.
121 dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
125 sdev->msg->reply_error = sdev->ipc->ops->get_reply(sdev);
132 struct snd_sof_ipc_msg *msg = &sdev->ipc->msg;
149 struct snd_sof_ipc *ipc;
153 ipc = devm_kzalloc(sdev->dev, sizeof(*ipc), GFP_KERNEL);
154 if (!ipc)
157 mutex_init(&ipc->tx_mutex);
158 ipc->sdev = sdev;
159 msg = &ipc->msg;
214 ipc->ops = ops;
216 return ipc;
222 struct snd_sof_ipc *ipc = sdev->ipc;
224 if (!ipc)
227 /* disable sending of ipc's */
228 mutex_lock(&ipc->tx_mutex);
229 ipc->disable_ipc_tx = true;
230 mutex_unlock(&ipc->tx_mutex);
232 if (ipc->ops->exit)
233 ipc->ops->exit(sdev);