ASoC: omap-mcbsp: Prepare for init time DAI format setting
authorJarkko Nikula <jarkko.nikula@bitmer.com>
Fri, 30 Sep 2011 13:07:44 +0000 (16:07 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 2 Oct 2011 18:57:07 +0000 (19:57 +0100)
commit4dd0417253be35bfbe368c40ec5a10732b24fd65
tree11da89922966d61ed18a91c456457b4384e6e0b4
parent177fdd89f9c3f3f157c0b5e0f9c25a3a7c37ecf7
ASoC: omap-mcbsp: Prepare for init time DAI format setting

Before commit 75d9ac4 ("ASoC: Allow DAI formats to be specified in the
dai_link") expectation for omap-mcbsp was that snd_soc_dai_set_fmt is to be
called first in machine hw_params callback before other CPU DAI functions.
Thus it was enough that only omap_mcbsp_dai_set_dai_fmt cleared the
mcbsp->regs structure.  [Note that this was pure convention, it's always
been OK to set things on init -- broonie]

Now this doesn't hold anymore since machine drivers can set the DAI format
only once on init time and thus mcbsp->regs may get out of sync when other
CPU DAI functions are modifying them dynamically with different values
between the calls. Therefore clear the accessed mcbsp->regs bits and
bitfields in other functions too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/omap/omap-mcbsp.c