[ALSA] ASoC: Clarify API for bias configuration
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 19 May 2008 10:31:28 +0000 (12:31 +0200)
committerJaroslav Kysela <perex@perex.cz>
Mon, 19 May 2008 15:28:43 +0000 (17:28 +0200)
commit0be9898adb6f58fee44f0fec0bbc0eac997ea9eb
tree61842c7381c7dcc4060280357a9a5fc08f4db023
parent1ef6ab75c7deef931d6308af282ed7d8e480e77f
[ALSA] ASoC: Clarify API for bias configuration

Currently the ASoC core configures the bias levels in the system using
a callback on codecs and machines called 'dapm_event', passing it PCI
style power levels as SNDRV_CTL_POWER_ constants. This is more obscure
than it needs to be and has caused confusion to driver authors,
especially given that DAPM is also performing power management.

Address this by renaming the callback function to 'set_bias_level' and
using constants explicitly representing the off, standby, pre-on and on
states which DAPM transitions through.

Also unexport the API for setting bias level: there are currently no
in-tree users of this API other than the core itself and it is likely
that the core would need to be extended to cater for any users.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8750.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm9712.c
sound/soc/codecs/wm9713.c
sound/soc/soc-core.c
sound/soc/soc-dapm.c