I built a board that uses an embeddedarm ts4900 which uses the mcimx6s7cvm08ab. Audio is handled by the sgtl5000 codec. Linux version is linux-3.10.17-imx6 per an embeddedarm build.
I find that certain happenings to the board are causing the codec to reset I believe, and once reset there is no way known to me to revive this without a reboot. The codec quits producing any clocking per scope. The RiotBoards I have used as well also do similar. On the riotboard, only a power cycle brings it back.
Questions I have are:
#1. Could the sgtl5000 errata related to this?
#2. Could it be possible that an external 1.8 vddd would be superior to the ldo in this matter?
#3. Is there any way to fully re initialize the codec from any known alsa, or other userspace command?
#4. Why is <= rev 0x11 of any count in the newer kernels? Is there some reason why there is a conflict between the kernel and the errata?
Adding more to this, for whoever reads this monologue.
When the chip is powered externally and reboot perhaps by a power cycle, writing a 0x7060 to CHIP_ANA_POWER causes the chip to not respond as the current sgtl5000.c code is written.
The kernel outputs something like this
[ 2.715498] sgtl5000 1-000a: sgtl5000 revision 0x11
[ 2.732253] sgtl5000: probe of 1-000a failed with error -5
This code fixes that problem for me, so far.
static int sgtl5000_fill_defaults(struct sgtl5000_priv *sgtl5000)
{
int i, ret, val, index;
int reg;
for (i = 0; i < ARRAY_SIZE(sgtl5000_reg_defaults); i++) {
val = sgtl5000_reg_defaults[i].def;
index = sgtl5000_reg_defaults[i].reg;
ret = regmap_read(sgtl5000->regmap, index, ®);
if (ret) {
printk(KERN_WARNING "SGTL5000 probe read failed at %i\n", i);
return ret;
}
if (reg != val) {
ret = regmap_write(sgtl5000->regmap, index, val);
}
if (ret) {
printk(KERN_WARNING "SGTL5000 probe write failed %x at %i index %i @ %x\n", val, i, index, reg);
return ret;
}
}
return 0;
}
Guess this forum software doesn't have provision for code formatting.
Hi Erik
external vddd usage is described in erratum
http://cache.freescale.com/files/analog/doc/errata/SGTL5000ER.pdf
it may be useful to look at pacthes
SGTL5000: external VDDD with linux codec driver
in general one can try i2c reset:
http://www.analog.com/media/en/technical-documentation/application-notes/54305147357414AN686_0.pdf
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Note that the i2c bus is fine, or at least alsamixer works.