[alsa-devel] [PATCH 1/1] ASoC: add support for multiple cards/codecs in debugfs

Peter Ujfalusi peter.ujfalusi at nokia.com
Wed Sep 30 13:21:46 CEST 2009

On Wednesday 30 September 2009 13:46:29 ext Mark Brown wrote:
> There's way more problems than this with multiple CODECs and multiple
> cards - DAPM can't really cope at all, and the split between CODECs and
> cards isn't as clear as would be desirable.

Yes, when I have moved to 2.6.31 it was kind of weird to have the 
snd_soc_init_card(socdev) called from the codec driver itself, which I still not 
feel too comfortable with...

> Looking into this is one of my big tasks for the rest of the year.  With this 
> particular problem I suspect the fix will fall out of the other
> reorganisations required to make the rest of the system work.

I have in my board two codecs, using separate sound cards for each.
One card - one codec.
So far DAPM and in general ASoC behaved quite well in all possible scenarios.
But not be able to use the debugfs in my setup is quite frustrating.

Btw. do you have some information about this upcoming reorganization, to see 
what is coming?

> > +       codec->debugfs_codec_root = debugfs_create_dir(codec->name,
> > +                                                      debugfs_root);
> I don't think the CODEC name is what we want to use here, one of the
> common cases is going to be to have two or more mono DACs or speaker
> drivers in the system, normally of the same type and therefore with the
> same name set here.

I see, these setups are going to be interesting and greatly complicates things.

> A dev_name() is going to be required as well,
> munged in with the CODEC name for usability.

The dev_name() is used in earlier ASoC versions as debugfs directory name.

All of that being said, it would be still nice to at least fix the current 
situation in some way, since the current implementation is clearly not behaving 

Does it help, if I use the dev_name() instead of the codec->name for the 
directory for now?

Later when you are doing the reorganization of the code, this could be also 


More information about the Alsa-devel mailing list