codecs: mc13783: add spi errate fix
PATCH 1/1 codecs: mc13783: add spi errate 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.
--- sound/soc/codecs/mc13783.c | 4 ++++ 1 file changed, 4 insertions(+)
sound/soc/codecs/mc13783.c +4 -0
@@ -125,6 +125,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 ==PMIC_AUDIO_CODEC || reg ==PMIC_AUDIO_DAC ) + ret =mc13xxx_reg_write (priv->mc13xxx, reg, value); +mc13xxx_unlock (priv->mc13xxx);return ret;
Signature · 1 line
1.8.4.rc3
Quoted 4 lines · Steffen Trumtrar
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.
Applied, thanks.
Mark Brown
maintainerQuoted 7 lines · Mark Brown
Quoted 4 lines · Steffen Trumtrar
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.
Applied, thanks.
...and reverted since PMIC_AUDIO_CODEC isn't defined. Please fix and resend.
Quoted 11 lines · Mark Brown
Quoted 7 lines · Mark Brown
Quoted 4 lines · Steffen Trumtrar
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.
Applied, thanks.
...and reverted since
PMIC_AUDIO_CODECisn't defined. Please fix and resend.
Ah, damn. Will resend ASAP. Sorry.
str
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |