[alsa-devel] [PATCH] ASoC: core - Add support for DAI and machine kcontrols.

Liam Girdwood lrg at ti.com
Mon Feb 6 11:37:03 CET 2012


On Fri, 2012-02-03 at 20:46 +0000, Mark Brown wrote:
> On Fri, Feb 03, 2012 at 05:43:09PM +0000, Liam Girdwood wrote:
> 
> > 1) Use snd_soc_add_card_controls() where no direct codec control is required.
> > 2) Use snd_soc_add_codec_controls() where there is direct codec control.
> 
> > In the case of 1) above we also update the machine drivers to get the correct
> > component data pointers from the kcontrol (rather than getting the machine pointer
> > via the codec pointer).
> 
> Hrm, I can't apply this right now as I don't have an appropriate system
> to hand but what are the cases where there is CODEC control?  This
> sounds suspicous, perhaps we need some of the drivers enhancing (though
> no reason to block this patch).

There were some machine drivers that would just do a little extra
indirection (getting the soc_card via the kcontrol codec ptr) with their
kcontrols to access the machine private data. The patch fixed the
appropriate machine drivers so that they can access soc_card directly
now.

There was also the McBSP DAI using the codec ptr for a similar purpose.

The other machine drivers were all using the codec pointer to do extra
codec configuration with their kcontrol code so there was no update for
them.

Liam  




More information about the Alsa-devel mailing list