[alsa-devel] What is correct way to put conditional stuff in ASoC codec driver?
broonie at opensource.wolfsonmicro.com
Mon Jul 11 16:17:44 CEST 2011
On Mon, Jul 11, 2011 at 07:46:43PM +0530, Ashish Chavan wrote:
> On Thu, 2011-07-07 at 21:19 +0530, Mark Brown wrote:
> > Those functions are used by the core for providing readback of the
> > controls to userspace. You need to provide them but your driver can use
> > whatever it likes to read its own state (providing it's tasteful), it
> > doesn't need to go through external APIs. Any driver with a custom
> > control will have an example of how it chooses to read its own state.
> I see. Thanks for the insight.
> I am looking at SOC_DAPM_SINGLE_W in wm8903.c, SOC_WM8350_DOUBLE_R_TLV
> in wm8350.c and SOC_TWL6040_DOUBLE_TLV in twl6040.c as reference
> examples. Respective xxx_get_xxx() methods are what you are trying to
> point me to, right?
No. Like I say in the text you quote above these are functions used to
report the control state to userspace and there's no reason why you'd
need to use those interfaces from within the driver itself.
More information about the Alsa-devel