[alsa-devel] [PATCH v2 2/2] ASoC: omap-mcpdm: Replace legacy driver
Péter Ujfalusi
peter.ujfalusi at ti.com
Mon Aug 22 13:34:23 CEST 2011
On Friday 19 August 2011 10:49:08 Lars-Peter Clausen wrote:
> sorry:
> struct omap_mcpdm *mcpdm = snd_soc_platform_get_drvdata(w->platform);
>
> > This would avoid having to add the private_data field to the widget
> > struct. In it's current form it will only really work, if there is just
> > one instance of the driver using the widget. And if that's the case you
> > can use a global variable directly anyway.
The other option was to use global variable to get the *mcpdm for the widget.
Generally I try to avoid global variables as much as I can, since the use of
them looks really hackish.
There could be some way to reach the CPU dai via pointers/lookups from the
widget, but it does looked really ugly, and I was only half way there.
--
Péter
More information about the Alsa-devel
mailing list