Lines Matching defs:sdev

23  * @sdev:		pointer to SOF core device struct
33 * Note: higher level sdev->ipc->tx_mutex must be held to make sure that
36 int sof_ipc_send_msg(struct snd_sof_dev *sdev, void *msg_data, size_t msg_bytes,
39 struct snd_sof_ipc *ipc = sdev->ipc;
43 if (ipc->disable_ipc_tx || sdev->fw_state != SOF_FW_BOOT_COMPLETE)
50 spin_lock_irq(&sdev->ipc_lock);
62 sdev->msg = msg;
64 ret = snd_sof_dsp_send_msg(sdev, msg);
69 spin_unlock_irq(&sdev->ipc_lock);
82 return ipc->ops->tx_msg(ipc->sdev, msg_data, msg_bytes, reply_data,
91 return ipc->ops->set_get_data(ipc->sdev, msg_data, msg_bytes, set);
107 return ipc->ops->tx_msg(ipc->sdev, msg_data, msg_bytes, reply_data,
113 void snd_sof_ipc_get_reply(struct snd_sof_dev *sdev)
120 if (!sdev->msg) {
121 dev_warn(sdev->dev, "unexpected ipc interrupt raised!\n");
125 sdev->msg->reply_error = sdev->ipc->ops->get_reply(sdev);
130 void snd_sof_ipc_reply(struct snd_sof_dev *sdev, u32 msg_id)
132 struct snd_sof_ipc_msg *msg = &sdev->ipc->msg;
135 dev_dbg(sdev->dev,
147 struct snd_sof_ipc *snd_sof_ipc_init(struct snd_sof_dev *sdev)
153 ipc = devm_kzalloc(sdev->dev, sizeof(*ipc), GFP_KERNEL);
158 ipc->sdev = sdev;
166 switch (sdev->pdata->ipc_type) {
178 dev_err(sdev->dev, "Not supported IPC version: %d\n",
179 sdev->pdata->ipc_type);
185 dev_err(sdev->dev, "Missing IPC message handling ops\n");
191 dev_err(sdev->dev, "Missing IPC firmware loading ops\n");
196 dev_err(sdev->dev, "Missing IPC PCM ops\n");
201 dev_err(sdev->dev, "Missing IPC topology ops\n");
207 dev_err(sdev->dev, "Missing firmware tracing ops\n");
211 if (ops->init && ops->init(sdev))
220 void snd_sof_ipc_free(struct snd_sof_dev *sdev)
222 struct snd_sof_ipc *ipc = sdev->ipc;
233 ipc->ops->exit(sdev);