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.

** Attachment added: "posbuf-trace-02.txt"
   http://launchpadlibrarian.net/8410140/posbuf-trace-02.txt

-- 
snd-hda-intel: distorted sound after resume, until the module is reloaded
https://bugs.launchpad.net/bugs/100114
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to