/** * ipc3_probes_init - initialize data probing * @cdev: SOF client device * @stream_tag: Extractor stream tag * @buffer_size: DMA buffer size to set for extractor * * Host chooses whether extraction is supported or not by providing * valid stream tag to DSP. Once specified, stream described by that * tag will be tied to DSP for extraction for the entire lifetime of * probe. * * Probing is initialized only once and each INIT request must be * matched by DEINIT call.
*/ staticint ipc3_probes_init(struct sof_client_dev *cdev, u32 stream_tag,
size_t buffer_size)
{ struct sof_ipc_probe_dma_add_params *msg;
size_t size = struct_size(msg, dma, 1); int ret;
ret = sof_client_ipc_tx_message_no_reply(cdev, msg);
kfree(msg); return ret;
}
/** * ipc3_probes_deinit - cleanup after data probing * @cdev: SOF client device * * Host sends DEINIT request to free previously initialized probe * on DSP side once it is no longer needed. DEINIT only when there * are no probes connected and with all injectors detached.
*/ staticint ipc3_probes_deinit(struct sof_client_dev *cdev)
{ struct sof_ipc_cmd_hdr msg;
ret = sof_client_ipc_tx_message(cdev, &msg, reply, max_msg_size); if (ret < 0 || reply->rhdr.error < 0) gotoexit;
if (!reply->num_elems) gotoexit;
if (cmd == SOF_IPC_PROBE_DMA_INFO)
bytes = sizeof(reply->dma[0]); else
bytes = sizeof(reply->desc[0]);
bytes *= reply->num_elems;
*params = kmemdup(&reply->dma[0], bytes, GFP_KERNEL); if (!*params) {
ret = -ENOMEM; gotoexit;
}
*num_params = reply->num_elems;
exit:
kfree(reply); return ret;
}
/** * ipc3_probes_points_info - retrieve list of active probe points * @cdev: SOF client device * @desc: Returned list of active probes * @num_desc: Returned count of active probes * * Host sends PROBE_POINT_INFO request to obtain list of active probe * points, valid for disconnection when given probe is no longer * required.
*/ staticint ipc3_probes_points_info(struct sof_client_dev *cdev, struct sof_probe_point_desc **desc,
size_t *num_desc)
{ return ipc3_probes_info(cdev, SOF_IPC_PROBE_POINT_INFO,
(void **)desc, num_desc);
}
/** * ipc3_probes_points_add - connect specified probes * @cdev: SOF client device * @desc: List of probe points to connect * @num_desc: Number of elements in @desc * * Dynamically connects to provided set of endpoints. Immediately * after connection is established, host must be prepared to * transfer data from or to target stream given the probing purpose. * * Each probe point should be removed using PROBE_POINT_REMOVE * request when no longer needed.
*/ staticint ipc3_probes_points_add(struct sof_client_dev *cdev, struct sof_probe_point_desc *desc,
size_t num_desc)
{ struct sof_ipc_probe_point_add_params *msg;
size_t size = struct_size(msg, desc, num_desc); int ret;
ret = sof_client_ipc_tx_message_no_reply(cdev, msg);
kfree(msg); return ret;
}
/** * ipc3_probes_points_remove - disconnect specified probes * @cdev: SOF client device * @buffer_id: List of probe points to disconnect * @num_buffer_id: Number of elements in @desc * * Removes previously connected probes from list of active probe * points and frees all resources on DSP side.
*/ staticint ipc3_probes_points_remove(struct sof_client_dev *cdev, unsignedint *buffer_id,
size_t num_buffer_id)
{ struct sof_ipc_probe_point_remove_params *msg;
size_t size = struct_size(msg, buffer_id, num_buffer_id); int ret;
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.