All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhen Fu <fuzh@marvell.com>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Zhen Fu <fuzh@marvell.com>
Subject: then there was "overrun" occue every time once trigger the audio recording
Date: Fri, 6 Jul 2012 03:00:00 -0700	[thread overview]
Message-ID: <DBBC59900F0EF340B9938F193FB1A3453625BD3E@SC-VEXCH4.marvell.com> (raw)

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

             reply	other threads:[~2012-07-06 10:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-06 10:00 Zhen Fu [this message]
  -- strict thread matches above, loose matches on Subject: below --
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBBC59900F0EF340B9938F193FB1A3453625BD3E@SC-VEXCH4.marvell.com \
    --to=fuzh@marvell.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.