Re: [PATCHv2 2/3] ASoC: Move widgets from DAPM context to snd_soc_card

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

 



On Fri, 12 Nov 2010 15:57:56 +0200
Jarkko Nikula <jhnikula@xxxxxxxxx> wrote:

> On Fri, 12 Nov 2010 13:18:41 +0000
> Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> 
> > >  struct snd_soc_dapm_context {
> > > -	struct list_head widgets;
> > > +	int n_widgets; /* number of widgets in this context */
> > 
> > I'm not sure why we need to count the number of widgets here; 
> > 
> True, this should go the next patch actually.
> 
Not true, it is actually need here. We cannot detect widgetless codecs
by testing list_empty(&card->widgets) after moving widgets from dapm
to card so we must keep count of widgets for each DAPM context (device).

-	if (list_empty(&dapm->widgets)) {
+	if (!dapm->n_widgets) {


-- 
Jarkko
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


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

  Powered by Linux