[Sound-open-firmware] [PATCH] dai: use verbose trace call to prevent trace buffer overflow

Ranjani Sridharan ranjani.sridharan at linux.intel.com
Tue Mar 27 05:19:23 CEST 2018


On Tue, 2018-03-27 at 10:54 +0800, Keyon Jie wrote:
> 
> On 2018年03月27日 10:32, Ranjani Sridharan wrote:
> > This patch changes the trace message to use the verbose option
> > to prevent trace buffer overflow.
> > 
> > Signed-off-by: Ranjani Sridharan <ranjani.sridharan at linux.intel.com
> > >
> > ---
> > Tested with
> > Minnowboard Turbot with RT5651
> > Kernel: https://github.com/plbossart/sound.git branch: topic/sof-
> > v4.14
> > SOF: 1.1-stable
> > SOFT: 1.1-stable
> > ---
> > ---
> >   src/audio/dai.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/audio/dai.c b/src/audio/dai.c
> > index 53536ed..f1b4a8e 100644
> > --- a/src/audio/dai.c
> > +++ b/src/audio/dai.c
> > @@ -82,7 +82,7 @@ static void dai_dma_cb(void *data, uint32_t type,
> > struct dma_sg_elem *next)
> >   	struct comp_buffer *dma_buffer;
> >   	uint32_t copied_size;
> >   
> > -	trace_dai("irq");
> > +	tracev_dai("irq");
> 
> I am not enthusiastic on changing trace to verbose to avoid problem 
> happens of dma trace, those several lines of trace per millisecond
> is 
> quite normal/common/basic needed for debugging/tracing for 
> playback/capture, what we need to think about(or root cause) is how
> to 
> fix the issue.
> 
> At least, it still have problem when we switch on tracev, those
> macros 
> are designed for us to use.
> 
> Thanks,
> ~Keyon

Please correct me if I am wrong. I am not sure how to prevent this
error if the trace buffer is thrashed with messages at a high rate.
Is this an error or should this be a warning?
But at least with tracev, we're kind of signing up for it. 
> 
> >   
> >   	/* is stream stopped or paused and we are not handling
> > XRUN ? */
> >   	if (dev->state != COMP_STATE_ACTIVE && dd->xrun == 0) {
> > 
> 
> _______________________________________________
> Sound-open-firmware mailing list
> Sound-open-firmware at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/sound-open-firmware


More information about the Sound-open-firmware mailing list