Accuracy of substream->ops->pointer?

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

 



During capture, my hardware can take up to two milliseconds for the DMA
to start transferring data to the buffer.  This is because the internal
FIFO needs to fill up before DMA starts.

Today, my .trigger function (during a START request) just waits until
the FIFO is full before returning control back to ALSA.  This seems to
work, except that I wait by using a busy-loop.  As you can imagine, a
2ms busy loop is not a good idea.

An alternative idea is to have my .pointer function return 0 if DMA has
not yet started.  This appears to work, but I want to make sure it's a
good idea.

My concern is that I might confuse ALSA because it is expecting some
data in the buffer after capture has started.  Is my approach correct?

-- 
Timur Tabi
Linux kernel developer at Freescale
_______________________________________________
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