[alsa-devel] [PATCH v2 1/2] ASoC: DAPM: Add private data pointer for DAPM widget

Péter Ujfalusi peter.ujfalusi at ti.com
Mon Aug 22 15:33:20 CEST 2011


On Saturday 20 August 2011 09:02:20 Mark Brown wrote:
> On Fri, Aug 19, 2011 at 10:41:18AM +0300, Peter Ujfalusi wrote:
> > Support for using custom private data assigned
> > per DAPM widget.
> 
> If we're adding this we should probably go the accessor route like we do
> with the driver data for the CODECs.

Something like:

static inline void *snd_soc_widget_get_pdata(struct snd_soc_dapm_widget *w)
{
        return w->private_data;
}

static inline void snd_soc_widget_set_pdata(struct snd_soc_dapm_widget *w,
			void *data)
{
        w->private_data = data;
}

Another option at the moment is that I create global variable within the omap-
mcpdm.c, so I can have access to the mcpdm within the dapm event handler.

-- 
Péter


More information about the Alsa-devel mailing list