Hello everyone,
Recently I met an problem with mcasp audio capture. The appearance is that when occur overrun, mcasp will capture some error data from PCM1808 . And this data is generated by PCM1808, mcasp just catpured them. When I go through pcm1808 datasheet, I found that pcm1808 will "Power Down and Reset by Halting System Clock".
In functuin snd_pcm_update_state int file sound/core/pcm_lib.c,
if (avail >= runtime->stop_threshold) {
xrun(substream);
return -EPIPE;
}
when application thread can't send or get audio data from mcasp, kernel will raise an EPIPE signal to alsa lib, that is overrun.
In this case, mcasp will be stopped, and stopped the AFSR/X clock, and then PCM1808 will reset and then generate than pulse.
How to fix this problem? How to avoid reset PCM1808, because we do not want to capture these error data .
Thank you everyone