Hi all,
We have a problem about sgtl5000 on i.mx28 evk.
We play any mp3 file with mp3play app.
After a few seconds we kill mp3play with "Ctrl + c" and get below output,
sgtl5000_hw_read: read reg error : Reg 0x0e
sgtl5000_write: write reg error : Reg 0x0e = 0x000c
sgtl5000_write: write reg error : Reg 0x02 = 0x0020
sgtl5000_write: write reg error : Reg 0x06 = 0x0130
After 10-20 plays, sound gets interrupted and got more errors like below,
sgtl5000_write: write reg error : Reg 0x02 = 0x0021
sgtl5000_hw_read: read reg error : Reg 0x0e
sgtl5000_write: write reg error : Reg 0x0e = 0x0000
sgtl5000_write: write reg error : Reg 0x02 = 0x0021
sgtl5000_hw_read: read reg error : Reg 0x0e
sgtl5000_write: write reg error : Reg 0x0e = 0x0000
sgtl5000_hw_read: read reg error : Reg 0x0e
sgtl5000_write: write reg error : Reg 0x0e = 0x000c
sgtl5000_write: write reg error : Reg 0x02 = 0x0020
sgtl5000_write: write reg error : Reg 0x06 = 0x0130
sgtl5000_write: write reg error : Reg 0x2a = 0x0000
sgtl5000_write: write reg error : Reg 0x30 = 0x5a79
sgtl5000_write: write reg error : Reg 0x02 = 0x0020
sgtl5000_write: write reg error : Reg 0x24 = 0x0132
sgtl5000_hw_read: read reg error : Reg 0x0e
sgtl5000_write: write reg error : Reg 0x0e = 0x000c
sgtl5000_write: write reg error : Reg 0x30 = 0x5a60
sgtl5000_write: write reg error : Reg 0x02 = 0x0000
I can get sound after reboot.
Thanks
I'm seeing these sorts of problems too. Has anyone found a fix?
In our case, we found that the problem occurred when a user-space application was trying to talk to an I2C bus device that wasn't connected (an OLED display). If we stopped that application, or connected the OLED display, the problem went away. I'm guessing that this may have tied up the I2C bus with timeouts, interfering with the normal SGTL5000 operation.
Still, I would hope that the SGTL5000 driver (or I2C driver, or whatever) should be robust enough to still function okay in this scenario. I haven't yet tried the i.MX28 BSP patches, but plan to soon.
Please try the recent i.MX28 BSP :
https://www.freescale.com/webapp/Download?colCode=L2.6.35_1.1.0_LINUX_DOCS&location=null
My guess is that the sclk of sgtl5000 is provided or controlled by the imx25, when the mp3play be killed, the sclk was be disable, and then all the access to sgtl5000 by i2c bus will fail.
I just wonder why sgtl5000 was be accessed even the mp3play be killed.
I wrote an test application for /dev/dsp. it plays a wav file in an infinite loop,after a while it gives error in ioctl function that is called after playback(shown below)
ioctl(fd, SOUND_PCM_SYNC, 0);
perror says "Input/output error"
Regards,
snan