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

Mark Brown broonie at opensource.wolfsonmicro.com
Wed Sep 30 12:46:29 CEST 2009


On Wed, Sep 30, 2009 at 01:24:19PM +0300, Peter Ujfalusi wrote:

> With the original implementation only the debugfs files are only
> created for the first codec, other codecs loaded later would fail to
> create the debugfs files (since they are already exist).
> Furthermore in this situation any of the codecs has been removed, would
> cause the debugfs entries to disappear, regardless if the codec, which
> created them are still loaded (the one which loaded first).

> Signed-off-by: Peter Ujfalusi <peter.ujfalusi at nokia.com>

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.  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.

> +       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.  A dev_name() is going to be required as well,
munged in with the CODEC name for usability.


More information about the Alsa-devel mailing list