[alsa-devel] Is this bug ? dpcm_prune_paths()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Wed Oct 9 02:58:17 CEST 2019


Hi Pierre-Louis

> > 	static int dpcm_prune_paths(...)
> > 	{
> > 		...
> > 		/* Destroy any old FE <--> BE connections */
> > (1)		for_each_dpcm_be(fe, stream, dpcm) {
> > 			unsigned int i;
> > 
> >   -			/* is there a valid CPU DAI widget for this BE */
> >   |			widget = dai_get_widget(dpcm->be->cpu_dai, stream);
> >   |
> > (A)			/* prune the BE if it's no longer in our active list */
> >   |			if (widget && widget_in_list(list, widget))
> >   |(a)				continue;
> >   -
> >   |			/* is there a valid CODEC DAI widget for this BE */
> >   |(2)			for_each_rtd_codec_dai(dpcm->be, i, dai) {
> >   |				widget = dai_get_widget(dai, stream);
> > (B)
> >   |				/* prune the BE if it's no longer in our active list */
> >   |				if (widget && widget_in_list(list, widget))
> >   |(b)					continue;
> >   -			}
> > 
> >   -			...
> >   |			dpcm->state = ...
> > (C)			dpcm->be->dpcm[stream].runtime_update = ...
> >   |			prune++;
> >   -		}
> > 		...
> > 	}
(snip)
> Nice catch. This looks like a problem added during the transition to
> multi-codec.
(snip)
> the continue was not meant to continue the for loop on num_codecs, but
> the outer loop for dpcm.

Thank for checking !!
OK, it is bug.
I will post patch for it.

Thank you for your help !!
Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list