summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorSteffen Trumtrar <s.trumtrar@pengutronix.de>2013-09-09 18:09:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-26 17:18:13 -0700
commit87d5b89a6a77f1e141d41c5447f6a4e83feb8d11 (patch)
tree55d205366fd64968d8fbe179e1964063136f4afe /sound
parenta1b8ce5ac7db6a7c29a4ca658d5aff5384bd073e (diff)
downloadlinux-3.10-87d5b89a6a77f1e141d41c5447f6a4e83feb8d11.tar.gz
linux-3.10-87d5b89a6a77f1e141d41c5447f6a4e83feb8d11.tar.bz2
linux-3.10-87d5b89a6a77f1e141d41c5447f6a4e83feb8d11.zip
ASoC: mc13783: add spi errata fix
commit 9f6f0afbb9fdabf6dcac642dfec457f28981e3f8 upstream. The MC13783 Chip Errata, Rev. 4 says, that depending on SPI clock and main audio clock speed, the Audio Codec or Stereo DAC do sometimes not start when programmed to do so. This is due to an internal clock timing issue related to the loading of the SPI bits into the audio block. On an i.MX27 based system, this issue lead to switched audio channels under certain circumstances: RTC + Touch + Audio are used and loaded at startup. The mentioned workaround of writing registers 40 and 41 two times is implemented here. Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de> Signed-off-by: Mark Brown <broonie@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/mc13783.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/soc/codecs/mc13783.c b/sound/soc/codecs/mc13783.c
index 5402dfbbb71..8a8d9364e87 100644
--- a/sound/soc/codecs/mc13783.c
+++ b/sound/soc/codecs/mc13783.c
@@ -126,6 +126,10 @@ static int mc13783_write(struct snd_soc_codec *codec,
ret = mc13xxx_reg_write(priv->mc13xxx, reg, value);
+ /* include errata fix for spi audio problems */
+ if (reg == MC13783_AUDIO_CODEC || reg == MC13783_AUDIO_DAC)
+ ret = mc13xxx_reg_write(priv->mc13xxx, reg, value);
+
mc13xxx_unlock(priv->mc13xxx);
return ret;