out of sync capture samples with MMAP on MIPS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using alsa's mmap() interface to capture audio samples on some AR71xx MIPS
devices via USB and sometimes the sampled audio sounds very disordered.

After debugging deeper into this issue I found that samples are fine in the
kernel's vmalloc'ed buffer (runtime->dma_area). But once they get accessed from
userspace via mmaped memory, the samples differ.

I wrote a module + userspace program to demonstrate the issue:
git@xxxxxxxxxx:dddaniel/mmaptest.git

The userspace tool reads the data a couple of times with a small delay.
As you see below, after a couple of reads the data gets closer to look like in
the kernel buffer:
---
root@OpenWrt:/# mmaptest-user
mmap addr: 0x77a04000
[  760.464968] mmap page 7573000 at va 87573000
check memory ...FAIL (at byte 0)
check memory ...FAIL (at byte 96)
check memory ...FAIL (at byte 96)
check memory ...FAIL (at byte 96)
check memory ...FAIL (at byte 128)
---

Does someone here experienced similar issues ?
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux