[alsa-devel] Handle large period size end-of-stream situation

Patrick Lai plai at codeaurora.org
Wed Apr 3 17:07:06 CEST 2013


I am dealing with a use case requiring passing large buffer down to the
DSP. Application in the user-space passes PCM through mmap interface.
Per my understanding, ALSA is designed to work with DMA. Data is
transferred in chunk equal to period size. At the end of playback,
there may not be enough audio data left in the music stream to fill
entire period. If remaining audio data only takes up very small chunk
of period, playback takes longer to stop. Given that period size I have
to deal with is quite large, this problem is observed easily. If my
understanding is correct, what is the standard/recommended way of
handling end of stream case?


Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

More information about the Alsa-devel mailing list