[alsa-devel] then there was "overrun" occue every time once trigger the audio recording

Zhen Fu fuzh at marvell.com
Fri Jul 6 12:00:00 CEST 2012


Hi Clemens,



Your answer is very useful to help me. Thank you very much.



>     case AUDIO_STREAM_CMDID_DATARXTXREQ:

>           len1 = get_zsp_buf_avail(&prtd->zsp_buf);

>           len2 = get_fw_avail(p_zsp_req, substream->stream);

>           len3 = get_buf_avail(&prtd->zsp_buf, substream->stream);

>           tsize = ((len1 < len2) ? len1 : len2);

>           if ((tsize == len1) && (len1 == len3) && (tsize >= \

>                 2 * prtd->zsp_buf.zsp_period_bytes)) {

>                 tsize -= prtd->zsp_buf.zsp_period_bytes;

>           }



>     This doesn't look as if tsize is always the same as the period size.

>     And what do the get_fw_avail and get_buf_avail functions do?



The ZSP have own buffer to save data, so get_fw_avail is acquired zsp buf avial.

And ZSP buffer must ensure the zsp_buf have sequenced, so do above process.

--
Best Regards,
Zhen Fu



More information about the Alsa-devel mailing list