Comment 15 for bug 100114

Revision history for this message
wvengen (wvengen) wrote :

I don't think the line
    pos -= pos % runtime->min_align;
updates the position buffer each time. You can see in posbuf-trace-01.txt that runtime->min_align=1, so pos remains the same. I can find no place where posbuf is updated, so I think the hardware does that. Before suspend, hardware and software agree about their buffers, after suspend they don't, which may be a result of your ***...*** marking in comment 12. But I still wonder why that would have any impact, since the stream is reset, so the hardware should be ready to accept new settings.

To verify this, I printed the lpib position (value of SD_LPIB register for the stream) in azx_pcm_pointer(), in addition to azx_dev->posbuf (see attachment). One can see that the lpib values are equal before and after suspend, while the computed posbuf is wrong. This probabely means that the hardware and software have a different idea about the dma buffer.