[alsa-devel] [PATCH 1/2] ASoC: add api for dapm kcontrol configiuration

Vinod Koul vinod.koul at intel.com
Mon May 26 18:18:13 CEST 2014

On Mon, May 26, 2014 at 04:05:07PM +0100, Mark Brown wrote:
> On Mon, May 26, 2014 at 05:38:55PM +0530, Vinod Koul wrote:
> > From: Subhransu S. Prusty <subhransu.s.prusty at intel.com>
> > 
> > For DSPs we need to set and get the value for snd_kcontrol. This is currently
> > done by dapm_kcontrol_set/get_value, so create a wrapper
> > snd_soc_dapm_kcontrol_get/set_value APIs to let drivers use this
> Can you provide any more detail on this than just simply stating that
> this is needed for DSPs - why do DSPs need it, what are they going to do
> with it?
Well,... planning to provide a patch too :)

For our DSPs we have mixers and we need to send messages to DSP on mixer enable
and disable by DAPM. So this fn helps us to get the value of widget and pass on
to the DSP.

The usage will be in my comming series for our DSP model using DAPM and DPCM.

> >  }
> > +unsigned int snd_soc_dapm_kcontrol_get_value(
> Missing blank line.
> > +	const struct snd_kcontrol *kcontrol)
> > +{
> > +	dapm_kcontrol_get_value(kcontrol);
> > +}
> > +EXPORT_SYMBOL_GPL(snd_soc_dapm_kcontrol_get_value);
> This function has a return value but no return statement, I'm surprised
> the compiler didn't tell you this.  To be honest I'm not sure why
> dapm_kcontrol_get_value() wasn't just exported, the wrapper isn't adding
> much and the function name is already so long that snd_soc_ isn't going
> to hurt.
Looks like patch got mangled, I will fix it up.

And agree to both your and Lar's comment that we dont need a wrapper so will
export the current funtion.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20140526/33618239/attachment-0001.sig>

More information about the Alsa-devel mailing list