]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: mfld_machine: Convert to table based DAPM and control setup
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 12 Mar 2014 14:27:31 +0000 (15:27 +0100)
committerMark Brown <broonie@linaro.org>
Fri, 21 Mar 2014 18:04:20 +0000 (18:04 +0000)
commit636cc56d2fda86d6bd01ed41867045757020b956
tree26794a65e721d6217a8352522370c601d721bc7a
parent375d16ba0661e96268a1dabddda3e2b1d609aac4
ASoC: mfld_machine: Convert to table based DAPM and control setup

Use table based setup to register the controls and DAPM widgets and routes.
This on one hand makes the code a bit cleaner and on the other hand
the board level DAPM elements get registered in the card's DAPM context rather
than in the CODEC's DAPM context.

The mfld_machine driver is a bit special in that it directly writes to one of
the CODEC registers from one of the control handlers. Previous to this patch it
was able to get a pointer to the CODEC from the control, since the control was
registered with the CODEC. This won't be possible anymore once the control is
registered with the card. Since there are already global variables in the driver
accessed in the same function the patch adds a global variable that holds a
pointer to the CODEC and uses that.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/intel/mfld_machine.c