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

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Oct 1 16:06:03 CEST 2009

On Thu, Oct 01, 2009 at 04:49:17PM +0300, Peter Ujfalusi wrote:

> One of the codec to be blamed is the twl4030 codec, but since that does not use 
> any _device/_driver method to load, there is no dev to be assigned to codec-
> >dev...
> I don't know if it would make sense to use platform_driver_register (and 
> associates) with it in the future.

Yes, it should be using a platform device and the MFD framework (as most
of the other TWL4030 subdevices do already).

> > your CODEC driver needs updating to current APIs

> Hmm, there are quite a bit of inconsistency among the codec drivers, so I'm not 
> sure what is the correct way of doing this.
> I will use the wm8993 driver for further fine tuning, since that seams to be 
> rather new in the tree.

In general look at the drivers that have been touched most recently -
wm8993 is a good one, as are wm8903 and wm8731, but the main thing is to
look at one that's not registering the DAIs in the module init function
but is using normal device model probing and registering the DAIs only
after the underlying device has come up.

> I'll send a patch later to fix this implementation:
> if the codec->dev is valid, than it is going to use dev_name(codec->dev), if it 
> is NULL, than it will use either the codec->name or provide the same string as 
> the current implementation does ( {dev_name(socdev->dev)}-{codec->name} ), 
> whichever is the preferred.

I'd just leave it as codec->name - the soc-audio device name doesn't add

More information about the Alsa-devel mailing list