[alsa-devel] [PATCH] ASoC: Make register_card API available to drivers

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Jan 13 14:34:36 CET 2011


On Thu, Jan 13, 2011 at 06:54:52PM +0530, Koul, Vinod wrote:

> > My plan for this when I originally wrote the comment had been to make
> > the contents of the soc-audio device probe and removal look exactly like
> > what you'd write directly in a machine driver so no code except for the
> > code doing the soc-audio device had any idea it was there.  This would
> > keep backwards compatiblity without special casing, making things more
> > maintainable.

> Hmmmm, I didn't want to change the current machine drivers yet, hence tried to
> move the code of soc_probe into card_register.
> So that works neatly (doesn't matter who is doing, machine or core)
> Only thing which I kept is to check for card pointer and if valid then call
> register (assuming someone is still using old method) which we should mark
> deprecated

The above doesn't require any change in existing machine drivers - they
still pass the card data structure into the soc-audio device which then
registers with the core.  This the whole point, move the soc-audio
device over to using an API that can also be used externally then
convert the machine drivers to stop using the soc-audio device.

> Btw this make me wonder what will soc_probe be used (it is not doing anything)
> Do we still need this and creating soc-audio device?

That's the point I'm making above.  It shouldn't be involved at all
except as part of the soc-audio device code, anything registering a card
directly should never call it.


More information about the Alsa-devel mailing list