提交 9f6f0afb 编写于 作者: S Steffen Trumtrar 提交者: Mark Brown

ASoC: mc13783: add spi errata fix

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: NSteffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: stable@vger.kernel.org
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 5df498a2
...@@ -125,6 +125,10 @@ static int mc13783_write(struct snd_soc_codec *codec, ...@@ -125,6 +125,10 @@ static int mc13783_write(struct snd_soc_codec *codec,
ret = mc13xxx_reg_write(priv->mc13xxx, reg, value); 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); mc13xxx_unlock(priv->mc13xxx);
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册