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

Koul, Vinod vinod.koul at intel.com
Thu Jan 13 14:24:52 CET 2011

> > Yes on both of these, but I didn't want to break current method.
> > So I kept these to ensure both methods work fine.
> > One we have converted all driver to use register then we can remove these.
> > Would have made sense to put a comment for that
> 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

>  	card->dev = &pdev->dev;
This would be required only for current method hence kept it there. For anyone
who uses register, the machine should set this up properly

And I agree that these things should be done by machine. But wanted to split the
change to avoid any issues

So what I propose is keep it as is, I will resend the split patch series, and
then after machine drivers are changed we remove these.

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?


More information about the Alsa-devel mailing list