Sound Open Firmware
Loading...
Searching...
No Matches
Audio Probes & Stream Tap Points

Dynamic pipeline buffer extraction and injection probes, probe DMA frames, and synchronization sync words. More...

Collaboration diagram for Audio Probes & Stream Tap Points:

Files

file  probe_dma_frame.h
 Audio probe extraction stream packet frame headers and format bitfield encoding.
 
file  probe.h
 IPC3 Audio probe points, DMA descriptors, and configuration commands.
 
file  probe.h
 Audio probe injection and extraction tap points and DMA manager.
 

Data Structures

struct  probe_data_packet
 Header for data packets sent via compressed PCM from extraction probes. More...
 
struct  probe_dma
 Host DMA channel descriptor allocated for audio probes. More...
 
union  probe_point_id_t
 Packed identifier identifying target audio buffer for probe attachment. More...
 
struct  probe_point
 Probe tap point descriptor binding a pipeline buffer to a probe purpose. More...
 
struct  sof_ipc_probe_dma_add_params
 DMA ADD for probes payload (SOF_IPC_PROBE_INIT, SOF_IPC_PROBE_DMA_ADD). More...
 
struct  sof_ipc_probe_info_params
 Reply to INFO queries (SOF_IPC_PROBE_DMA_INFO, SOF_IPC_PROBE_POINT_INFO). More...
 
struct  sof_ipc_probe_dma_remove_params
 Probe DMA remove payload (SOF_IPC_PROBE_DMA_REMOVE). More...
 
struct  sof_ipc_probe_point_add_params
 Add probe points payload (SOF_IPC_PROBE_POINT_ADD). More...
 
struct  sof_ipc_probe_point_remove_params
 Remove probe points payload (SOF_IPC_PROBE_POINT_REMOVE). More...
 

Typedefs

typedef ssize_t(* probe_logging_hook_t) (uint8_t *buffer, size_t length)
 Callback hook invoked when a chunk of probe logging data is ready.
 

Functions

void probe_logging_init (probe_logging_hook_t hook)
 Initialize the probe logging backend.
 
int probe_init (const struct probe_dma *extraction_probe_dma)
 Initialize the audio probes subsystem.
 
int probe_deinit (void)
 Deinitialize the probes subsystem and detach extraction DMA.
 
int probe_dma_add (uint32_t count, const struct probe_dma *probe_dma)
 Configure injection DMA channels for inserting audio streams into pipelines.
 
int probe_dma_info (struct sof_ipc_probe_info_params *data, uint32_t max_size)
 Query configuration information for active injection DMAs.
 
int probe_dma_remove (uint32_t count, const uint32_t *stream_tag)
 Disconnect and remove active injection DMA channels.
 
int probe_point_add (uint32_t count, const struct probe_point *probe)
 Attach probe points to audio pipeline buffers for stream tap/injection.
 
int probe_point_info (struct sof_ipc_probe_info_params *data, uint32_t max_size)
 Query configuration of currently active probe points.
 
int probe_point_remove (uint32_t count, const uint32_t *buffer_id)
 Detach and remove probe points from pipeline buffers.
 
static struct probe_pdata * probe_get (void)
 Retrieve global probes private data context from SOF runtime.
 

Detailed Description

Dynamic pipeline buffer extraction and injection probes, probe DMA frames, and synchronization sync words.

Typedef Documentation

◆ probe_logging_hook_t

typedef ssize_t(* probe_logging_hook_t) (uint8_t *buffer, size_t length)

Callback hook invoked when a chunk of probe logging data is ready.

Parameters
bufferPointer to raw probe buffer payload.
lengthByte length of data available.
Returns
Number of bytes processed, or negative error code.

Function Documentation

◆ probe_deinit()

int probe_deinit ( void  )

Deinitialize the probes subsystem and detach extraction DMA.

Returns
0 on success, or -EINVAL if active probe points remain connected.

◆ probe_dma_add()

int probe_dma_add ( uint32_t  count,
const struct probe_dma *  probe_dma 
)

Configure injection DMA channels for inserting audio streams into pipelines.

Parameters
[in]countNumber of DMA descriptors provided in array.
[in]probe_dmaArray of probe DMA descriptors specifying stream tags and buffer sizes.
Returns
0 on success, or negative error code on failure.

◆ probe_dma_info()

int probe_dma_info ( struct sof_ipc_probe_info_params *  data,
uint32_t  max_size 
)

Query configuration information for active injection DMAs.

Parameters
[out]dataReply payload structure populated with connected DMA details.
[in]max_sizeMaximum available capacity in data buffer in bytes.
Returns
0 on success, or negative error code on failure.

◆ probe_dma_remove()

int probe_dma_remove ( uint32_t  count,
const uint32_t *  stream_tag 
)

Disconnect and remove active injection DMA channels.

Parameters
[in]countNumber of stream tags in array.
[in]stream_tagArray of host DMA stream tags to remove.
Returns
0 on success, or negative error code on failure.

◆ probe_get()

static struct probe_pdata * probe_get ( void  )
inlinestatic

Retrieve global probes private data context from SOF runtime.

Returns
Pointer to struct probe_pdata.

◆ probe_init()

int probe_init ( const struct probe_dma *  extraction_probe_dma)

Initialize the audio probes subsystem.

Parameters
[in]extraction_probe_dmaHost DMA channel configured for data extraction, or NULL if extraction probes are not used.
Returns
0 on success, or negative error code on failure.

◆ probe_logging_init()

void probe_logging_init ( probe_logging_hook_t  hook)

Initialize the probe logging backend.

Parameters
hookCallback invoked when new logging data is written out.

◆ probe_point_add()

int probe_point_add ( uint32_t  count,
const struct probe_point *  probe 
)

Attach probe points to audio pipeline buffers for stream tap/injection.

Parameters
[in]countNumber of probe points in array.
[in]probeArray of probe point descriptors specifying buffer IDs and purpose.
Returns
0 on success, or negative error code on failure.

◆ probe_point_info()

int probe_point_info ( struct sof_ipc_probe_info_params *  data,
uint32_t  max_size 
)

Query configuration of currently active probe points.

Parameters
[out]dataReply payload structure populated with connected probe points.
[in]max_sizeMaximum available capacity in data buffer in bytes.
Returns
0 on success, or negative error code on failure.

◆ probe_point_remove()

int probe_point_remove ( uint32_t  count,
const uint32_t *  buffer_id 
)

Detach and remove probe points from pipeline buffers.

Parameters
[in]countNumber of buffer IDs in array.
[in]buffer_idArray of buffer IDs from which probe points should be detached.
Returns
0 on success, or negative error code on failure.