]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - sitara-epos/sitara-epos-kernel.git/commit
ASoC: codecs: wm8753: Fix DAI mode switching
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 6 Feb 2011 09:04:11 +0000 (10:04 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 7 Feb 2011 12:02:49 +0000 (12:02 +0000)
commit338ee25393a5627e8ded5819147f98b919656ce9
tree59f42aa1c0a7d12b6133318e4adce9226e0ad909
parent480b08d0bb1aab29de2545625767dac55c7dcb59
ASoC: codecs: wm8753: Fix DAI mode switching

The wm8753 codec supports switching between different DAI modes.
The current drivers tries to implement this by changing the DAI driver at
runtime. But to properly work this would require support from the ASoC core.

So this patch takes a different approch on how the DAI mode switching is
implemented.

The only difference, from a driver point of view, between the different DAI modes
is how to program the DAI format to the hardware. So what this patch is, it
stores the current format for each DAI in the drivers private struct and when
the DAI mode is changed the format gets simply reprogrammed according to the
new DAI mode.

Futhermore this patch restricts the changing of the DAI format to when the
codec is inactive.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8753.c