All of lore.kernel.org
 help / color / mirror / Atom feed
* then there was "overrun" occue every time once trigger the audio recording
@ 2012-07-06  2:28 Zhen Fu
  2012-07-06  7:17 ` Clemens Ladisch
  0 siblings, 1 reply; 5+ messages in thread
From: Zhen Fu @ 2012-07-06  2:28 UTC (permalink / raw)
  To: alsa-devel; +Cc: Zhen Fu

Hi developer,

When I use arecord command, then there was "overrun" occue every time once trigger the audio recording. I have no clue of alsa driver when and how handler xrun. In other words, how to understand function snd_pcm_update_hw_ptr0 in pcm_lib.c. Please enlighten me on this issue. Thanks a lot in advance.

--
Best Regards,
Zhen Fu

^ permalink raw reply	[flat|nested] 5+ messages in thread
* then there was "overrun" occue every time once trigger the audio recording
@ 2012-07-06 10:00 Zhen Fu
  0 siblings, 0 replies; 5+ messages in thread
From: Zhen Fu @ 2012-07-06 10:00 UTC (permalink / raw)
  To: Clemens Ladisch; +Cc: alsa-devel, Zhen Fu

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-06 10:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-06  2:28 then there was "overrun" occue every time once trigger the audio recording Zhen Fu
2012-07-06  7:17 ` Clemens Ladisch
2012-07-06  7:51   ` Zhen Fu
2012-07-06  8:23     ` Clemens Ladisch
2012-07-06 10:00 Zhen Fu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.