ASoC: Decouple DAPM from CODECs
authorLiam Girdwood <lrg@slimlogic.co.uk>
Fri, 5 Nov 2010 13:53:46 +0000 (15:53 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 6 Nov 2010 15:28:29 +0000 (11:28 -0400)
commitce6120cca2589ede530200c7cfe11ac9f144333c
tree6ea7c26ce64dd4753e7cf9a3b048e74614b169dc
parent22e2fda5660cdf62513acabdb5c82a5af415f838
ASoC: Decouple DAPM from CODECs

Decoupling Dynamic Audio Power Management (DAPM) from codec devices is
required when developing ASoC further. Such as for other ASoC components to
have DAPM widgets or when extending DAPM to handle cross-device paths.

This patch decouples DAPM related variables from struct snd_soc_codec and
moves them to new struct snd_soc_dapm_context that is used to encapsulate
DAPM context of a device. ASoC core and API of DAPM functions are modified
to use DAPM context instead of codec.

This patch does not change current functionality and a large part of changes
come because of structure and internal API changes.

Core implementation is from Liam Girdwood <lrg@slimlogic.co.uk> with some
minor core changes, codecs and machine driver conversions from
Jarkko Nikula <jhnikula@gmail.com>.

Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Cc: Cliff Cai <cliff.cai@analog.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Ryan Mallon <ryan@bluewatersys.com>
Cc: Timur Tabi <timur@freescale.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Jassi Brar <jassi.brar@samsung.com>
Cc: Daniel Gloeckner <dg@emlix.com>
Cc: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
108 files changed:
include/sound/soc-dapm.h
include/sound/soc.h
sound/soc/atmel/playpaq_wm8510.c
sound/soc/atmel/sam9g20_wm8731.c
sound/soc/atmel/snd-soc-afeb9260.c
sound/soc/codecs/88pm860x-codec.c
sound/soc/codecs/ad1836.c
sound/soc/codecs/ad193x.c
sound/soc/codecs/ak4535.c
sound/soc/codecs/ak4642.c
sound/soc/codecs/ak4671.c
sound/soc/codecs/alc5623.c
sound/soc/codecs/cq93vc.c
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cx20442.c
sound/soc/codecs/da7210.c
sound/soc/codecs/jz4740.c
sound/soc/codecs/max98088.c
sound/soc/codecs/ssm2602.c
sound/soc/codecs/stac9766.c
sound/soc/codecs/tlv320aic23.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/tpa6130a2.c
sound/soc/codecs/twl4030.c
sound/soc/codecs/twl6040.c
sound/soc/codecs/uda134x.c
sound/soc/codecs/uda1380.c
sound/soc/codecs/wm2000.c
sound/soc/codecs/wm8350.c
sound/soc/codecs/wm8400.c
sound/soc/codecs/wm8510.c
sound/soc/codecs/wm8523.c
sound/soc/codecs/wm8580.c
sound/soc/codecs/wm8711.c
sound/soc/codecs/wm8728.c
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8741.c
sound/soc/codecs/wm8750.c
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8776.c
sound/soc/codecs/wm8804.c
sound/soc/codecs/wm8900.c
sound/soc/codecs/wm8903.c
sound/soc/codecs/wm8904.c
sound/soc/codecs/wm8940.c
sound/soc/codecs/wm8955.c
sound/soc/codecs/wm8960.c
sound/soc/codecs/wm8961.c
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8971.c
sound/soc/codecs/wm8974.c
sound/soc/codecs/wm8978.c
sound/soc/codecs/wm8985.c
sound/soc/codecs/wm8988.c
sound/soc/codecs/wm8990.c
sound/soc/codecs/wm8993.c
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm9081.c
sound/soc/codecs/wm9090.c
sound/soc/codecs/wm9705.c
sound/soc/codecs/wm9712.c
sound/soc/codecs/wm9713.c
sound/soc/codecs/wm_hubs.c
sound/soc/davinci/davinci-evm.c
sound/soc/ep93xx/snappercl15.c
sound/soc/imx/wm1133-ev1.c
sound/soc/jz4740/qi_lb60.c
sound/soc/kirkwood/kirkwood-t5325.c
sound/soc/omap/am3517evm.c
sound/soc/omap/ams-delta.c
sound/soc/omap/n810.c
sound/soc/omap/omap3pandora.c
sound/soc/omap/osk5912.c
sound/soc/omap/rx51.c
sound/soc/omap/sdp3430.c
sound/soc/omap/sdp4430.c
sound/soc/omap/zoom2.c
sound/soc/pxa/corgi.c
sound/soc/pxa/e740_wm9705.c
sound/soc/pxa/e750_wm9705.c
sound/soc/pxa/e800_wm9712.c
sound/soc/pxa/magician.c
sound/soc/pxa/mioa701_wm9713.c
sound/soc/pxa/palm27x.c
sound/soc/pxa/poodle.c
sound/soc/pxa/saarb.c
sound/soc/pxa/spitz.c
sound/soc/pxa/tavorevb3.c
sound/soc/pxa/tosa.c
sound/soc/pxa/z2.c
sound/soc/pxa/zylonite.c
sound/soc/s3c24xx/aquila_wm8994.c
sound/soc/s3c24xx/goni_wm8994.c
sound/soc/s3c24xx/jive_wm8750.c
sound/soc/s3c24xx/neo1973_gta02_wm8753.c
sound/soc/s3c24xx/neo1973_wm8753.c
sound/soc/s3c24xx/rx1950_uda1380.c
sound/soc/s3c24xx/s3c24xx_simtec_hermes.c
sound/soc/s3c24xx/s3c24xx_simtec_tlv320aic23.c
sound/soc/s3c24xx/smartq_wm8987.c
sound/soc/s3c24xx/smdk64xx_wm8580.c
sound/soc/s6000/s6105-ipcam.c
sound/soc/sh/migor.c
sound/soc/sh/sh7760-ac97.c
sound/soc/soc-core.c
sound/soc/soc-dapm.c
sound/soc/soc-jack.c