Lines Matching defs: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;
73 int sof_ipc_tx_message(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
76 if (msg_bytes > ipc->max_payload_size ||
77 reply_bytes > ipc->max_payload_size)
80 return ipc->ops->tx_msg(ipc->sdev, msg_data, msg_bytes, reply_data,
86 int sof_ipc_set_get_data(struct snd_sof_ipc *ipc, void *msg_data,
89 return ipc->ops->set_get_data(ipc->sdev, msg_data, msg_bytes, set);
98 int sof_ipc_tx_message_no_pm(struct snd_sof_ipc *ipc, void *msg_data, size_t msg_bytes,
101 if (msg_bytes > ipc->max_payload_size ||
102 reply_bytes > ipc->max_payload_size)
105 return ipc->ops->tx_msg(ipc->sdev, msg_data, msg_bytes, reply_data,
114 * Sometimes, there is unexpected reply ipc arriving. The reply
115 * ipc belongs to none of the ipcs sent from driver.
116 * In this case, the driver must ignore the ipc.
119 dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
123 sdev->msg->reply_error = sdev->ipc->ops->get_reply(sdev);
130 struct snd_sof_ipc_msg *msg = &sdev->ipc->msg;
147 struct snd_sof_ipc *ipc;
151 ipc = devm_kzalloc(sdev->dev, sizeof(*ipc), GFP_KERNEL);
152 if (!ipc)
155 mutex_init(&ipc->tx_mutex);
156 ipc->sdev = sdev;
157 msg = &ipc->msg;
212 ipc->ops = ops;
214 return ipc;
220 struct snd_sof_ipc *ipc = sdev->ipc;
222 if (!ipc)
225 /* disable sending of ipc's */
226 scoped_guard(mutex, &ipc->tx_mutex)
227 ipc->disable_ipc_tx = true;
229 if (ipc->ops->exit)
230 ipc->ops->exit(sdev);