mirror of https://github.com/thesofproject/sof.git
dma-trace.c: add some comments
Connect the DMA initialization dots. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
parent
448bbc61a7
commit
4ebd4d66a6
|
@ -161,7 +161,7 @@ int trace_filter_update(const struct trace_filter *elem);
|
|||
/** The start of this linker output MUST match the 'ldc_entry_header'
|
||||
* struct defined in the logger program running in user space.
|
||||
*/
|
||||
#define _DECLARE_LOG_ENTRY(lvl, format, comp_class, params) \
|
||||
#define _DECLARE_LOG_ENTRY(lvl, format, comp_class, n_params) \
|
||||
__section(".static_log." #lvl) \
|
||||
static const struct { \
|
||||
uint32_t level; \
|
||||
|
@ -175,7 +175,7 @@ int trace_filter_update(const struct trace_filter *elem);
|
|||
} log_entry = { \
|
||||
lvl, \
|
||||
comp_class, \
|
||||
params, \
|
||||
n_params, \
|
||||
__LINE__, \
|
||||
sizeof(RELATIVE_FILE), \
|
||||
sizeof(format), \
|
||||
|
@ -306,10 +306,14 @@ static inline int trace_filter_update(const struct trace_filter *filter)
|
|||
|
||||
#endif /* CONFIG_TRACEE, CONFIG_TRACE */
|
||||
|
||||
|
||||
#define _TRACE_INV_CLASS TRACE_CLASS_DEPRECATED
|
||||
/** Default value when there is no specific pipeline, dev, dai, etc. */
|
||||
#define _TRACE_INV_ID -1
|
||||
|
||||
/** This has been replaced in commits 6ce635aa82 and earlier by the
|
||||
* DECLARE_TR_CTX, tr_ctx and component UUID system below
|
||||
*/
|
||||
#define _TRACE_INV_CLASS TRACE_CLASS_DEPRECATED
|
||||
|
||||
/**
|
||||
* Trace context.
|
||||
*/
|
||||
|
|
|
@ -120,6 +120,10 @@ out:
|
|||
return SOF_TASK_STATE_RESCHEDULE;
|
||||
}
|
||||
|
||||
/** Do this early so we can log at initialization time even before the
|
||||
* DMA runs. The rest happens later in dma_trace_init_complete() and
|
||||
* dma_trace_enable()
|
||||
*/
|
||||
int dma_trace_init_early(struct sof *sof)
|
||||
{
|
||||
sof->dmat = rzalloc(SOF_MEM_ZONE_SYS_SHARED, 0, SOF_MEM_CAPS_RAM, sizeof(*sof->dmat));
|
||||
|
@ -135,6 +139,7 @@ int dma_trace_init_early(struct sof *sof)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/** Run after dma_trace_init_early() and before dma_trace_enable() */
|
||||
int dma_trace_init_complete(struct dma_trace_data *d)
|
||||
{
|
||||
int ret = 0;
|
||||
|
@ -317,6 +322,9 @@ static int dma_trace_get_avail_data(struct dma_trace_data *d,
|
|||
|
||||
#endif /* CONFIG_DMA_GW */
|
||||
|
||||
/** Invoked remotely by SOF_IPC_TRACE_DMA_PARAMS* Depends on
|
||||
* dma_trace_init_complete()
|
||||
*/
|
||||
int dma_trace_enable(struct dma_trace_data *d)
|
||||
{
|
||||
int err;
|
||||
|
|
Loading…
Reference in New Issue