This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ALSA MMAP playback error

Hi,

   We are using DM8168 board withDVRRDK_03.00.00.00 software,In our usecase,we use the alsalib to recode and palyback the audio PCM data,and we find it's easy to appear the "broken pipe" error , to avoid the error on audio playback,we refer to RDK4.0's suggestion, use the mmap mode to playback PCM data.After modified into the MMAP method,the "broken pipe :underrun" error  is never seen again,but when we connect VGA or save the audio and video data to the hard disk,our playback audio function will abnormal.

In our playback function ,we invoke "snd_pcm_avail_update" firstly to get a valid value

avail = snd_pcm_avail_update(hdl->m_audpla_hdl);

then invoke

snd_pcm_mmap_begin(hdl->m_audpla_hdl, &my_areas, &offset, &avail);

we find that after "snd_pcm_mmap_begin",the value of avail will be modified to 0

Question :

I want to know ,In what circumstances the value of avail will be 0 .

how to config  the ALSA (MMAP mode ) can avoid the error.