[alsa-devel] asoc device probing and dai question

Mark Brown broonie at opensource.wolfsonmicro.com
Thu Dec 2 12:47:13 CET 2010

On Thu, Dec 02, 2010 at 05:08:51PM +0530, Koul, Vinod wrote:

> So I am thinking now that since my platform tells me that I have only one audio 
> device which is platform device, so should I add my codec device and platform 
> device same way as I add the soc-audio from my machine driver. That way I can 
> even change codec's based on what I detect on the board.

> And platform and codec driver probe register the dais

> Would that be the right approach?

Ideally your platform would also register the devices separately
(especialy the CODEC which would usually be instantiated by whatever
bus it's on, or the probe of the core driver for the CODEC if it's an
MFD like yours are in silicon) but if you're limited in this way then 
it's a good approach.

It may be worth separating out the device registration from the rest of
the machine driver for clarity.

More information about the Alsa-devel mailing list