Hi,
Background: we found that when tearing down ALSA, this can in rare cases cause the DAC (PCM1791A) to output digital noise even though the frame-clock and pcm data isn't running.
The issue is a bit difficult to replicate, but what we do is to run 'aplay 1sec.wav' over an over in a shell-script loop, i.e. alsa / davinci / mcasp) setup and teardown. Sometimes this result in a short ~10-100msec zip-noise, but sometimes it causes the DAC to get in a bad state, outputting loud random noise until we reset.
At the same time we have another script taking the wifi up & down using ifconfig stressing the system a bit. (you might ask why we do this, reason is that you'll get a tiny audible click from the DAC when doing so even though no sound is running. this might be another issue but when chasing it we found that it's possible to put the system+dac in this broken state which is highly unwanted.)
We do have compared register settings before and after the noise and I can confirm it's correct, i.e. 1:1 with how it should be, so I'd say we can assume it's not related to glitches on the i2c-bus.
Please find a logic capture of the I2S sequence attached below.
pcm1791a dac noise capture r1.pdf
system info:
- am3352, Linux 3.12/.13 kernel, wl18x via sdio.
- pcm1791 dac running in slave mode
- lrck: mcasp0_fsx
- bck: mcasp0_aclkx
- data: mcasp0_axr0
- sck: mcasp0_ahclkx
external 24.576MHz clock tied to both cpu & dac