Is this bug ? dpcm_prune_paths()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi ALSA ML.

I'm checking soc-pcm.c, and I noticed strange code at
dpcm_prune_paths().

	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++;
 -		}
		...
	}

In my understanding, (A) part is for CPU, and (B) part is for Codec.
Guessing from (a), I think it want to skip setup (C) if CPU widget
exist and matches to list.
If so, I guess (b) is maybe bug ?
This continue is for (2) loop, thus, it is totally do nothing now.
But maybe it want to be continue for (1) loop ?

Thank you for your help !!
Best regards
---
Kuninori Morimoto
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux