ASoC: add support for multiple cards/codecs in debugfs
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>
Thu, 1 Oct 2009 07:32:47 +0000 (10:32 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 1 Oct 2009 11:13:04 +0000 (12:13 +0100)
commit88439ac793934a47f47ad285656b63d09f5937c8
treef2292568c573bc063f198fe62ce7e8bb72f73711
parent17c86a32076f0119437a017de70a583431f4bf51
ASoC: add support for multiple cards/codecs in debugfs

In order to support multiple codecs on the same system in the debugfs
the directory hierarchy need to be changed by adding directory per codec
under the asoc direcorty:

debugfs/asoc/{dev_name(socdev->dev)}-{codec->name}/codec_reg
                                                  /dapm_pop_time
                                                  /dapm/{widgets}

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@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
include/sound/soc.h
sound/soc/soc-core.c