sac_stats.h
SPARK Audio Core statistics.
- Copyright
Copyright (C) 2022 SPARK Microsystems International Inc. All rights reserved.
- License
This source code is proprietary and subject to the SPARK Microsystems Software EULA found in this package in file EULA.txt.
- Author
SPARK FW Team.
Functions
-
sac_statistics_t *sac_pipeline_update_stats(sac_pipeline_t *pipeline)
Update the SPARK Audio Core pipeline statistics.
After calling this function, the statistics inside the pipeline instance will be updated. The function also returns a reference to these internal statistics so they can be used by the caller.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Reference to the statistics.
-
int sac_pipeline_format_stats(sac_pipeline_t *pipeline, char *buffer, uint16_t size)
Format the pipeline statistics as a string of characters.
- Parameters:
pipeline – [in] Pipeline instance.
buffer – [out] Buffer where to put the formatted string.
size – [in] Size of the buffer.
- Returns:
The formatted string length, excluding the NULL terminator.
-
uint32_t sac_pipeline_get_producer_buffer_load(sac_pipeline_t *pipeline)
Get producer buffer load.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
buffer producer load value
-
uint32_t sac_pipeline_get_consumer_buffer_load(sac_pipeline_t *pipeline)
Get consumer buffer load.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Consumer buffer load value.
-
uint32_t sac_pipeline_get_consumer_buffer_overflow_count(sac_pipeline_t *pipeline)
Get consumer buffer overflow count.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Consumer buffer overflow counter.
-
uint32_t sac_pipeline_get_consumer_buffer_underflow_count(sac_pipeline_t *pipeline)
Get consumer buffer underflow count.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Consumer buffer underflow counter.
-
uint32_t sac_pipeline_get_producer_buffer_overflow_count(sac_pipeline_t *pipeline)
Get producer buffer overflow count.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Producer buffer overflow counter.
-
uint32_t sac_pipeline_get_producer_packets_corrupted_count(sac_pipeline_t *pipeline)
Get producer packets corrupted.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Producer packets corrupted.
-
uint32_t sac_pipeline_get_cdc_inflated_packets_count(sac_pipeline_t *pipeline)
Get the CDC inflated packet count.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Inflated packet count.
-
uint32_t sac_pipeline_get_cdc_deflated_packets_count(sac_pipeline_t *pipeline)
Get the CDC deflated packet count.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Deflated packet count.
-
uint32_t sac_pipeline_get_consumer_queue_peak_buffer_load(sac_pipeline_t *pipeline)
Get consumer queue peak load.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Consumer queue peak load.
-
uint32_t sac_pipeline_get_consumer_link_margin_min_peak(sac_pipeline_t *pipeline)
Get consumer’s all-time minimum link margin.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Consumer link margin minimum.
-
uint32_t sac_pipeline_get_consumer_cca_peak(sac_pipeline_t *pipeline)
Get consumer CCA count peak.
- Parameters:
pipeline – [in] Pipeline instance.
- Returns:
Consumer CCA count peak.
-
void sac_pipeline_reset_stats(sac_pipeline_t *pipeline)
Reset the SPARK Audio Core stats.
- Parameters:
pipeline – [in] Pipeline instance.