/* * mtk_adsp_ipc_send - send ipc cmd to MTK ADSP * * @ipc: ADSP IPC handle * @idx: index of the mailbox channel * @msg: IPC cmd (reply or request) * * Returns zero for success from mbox_send_message * negative value for error
*/ int mtk_adsp_ipc_send(struct mtk_adsp_ipc *ipc, unsignedint idx, uint32_t msg)
{ struct mtk_adsp_chan *adsp_chan; int ret;
if (idx >= MTK_ADSP_MBOX_NUM) return -EINVAL;
adsp_chan = &ipc->chans[idx];
ret = mbox_send_message(adsp_chan->ch, &msg); if (ret < 0) return ret;
return 0;
}
EXPORT_SYMBOL_GPL(mtk_adsp_ipc_send);
/* * mtk_adsp_ipc_recv - recv callback used by MTK ADSP mailbox * * @c: mbox client * @msg: message received * * Users of ADSP IPC will need to privde handle_reply and handle_request * callbacks.
*/ staticvoid mtk_adsp_ipc_recv(struct mbox_client *c, void *msg)
{ struct mtk_adsp_chan *chan = container_of(c, struct mtk_adsp_chan, cl); struct device *dev = c->dev;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.