alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Santosh Sivaraj <santoshs@fossix.org>
To: alsa-devel@alsa-project.org
Subject: a xrun() query
Date: Wed, 11 May 2011 17:40:39 +0530	[thread overview]
Message-ID: <20110511121039.GA19108@santoshs.mistral.in> (raw)

Hi,

I am getting glitches while playing audio with aplay. With little
debugging I figured out that the state changes from RUNNING to XRUN at
which time the trigger gets called. I also figured out that XRUN state
is set in the function:

static int snd_pcm_update_hw_ptr_post(struct snd_pcm_substream *substream,
				      struct snd_pcm_runtime *runtime)
{
        <snip>
	} else {
		if (avail >= runtime->stop_threshold) {
			xrun(substream);
			return -EPIPE;
		}
	}
        </snip>
}

I am not able to find out why the condition (avail >
runtime->stop_threshold) becomes true. Can the experts here tell
during what use cases/scenarios this happens?

Thanks,
Santosh

-- 
http://fossix.org, http://dot.slashb.in

Luck is a matter of preparation meeting the opportunity.
					-- Anon

                 reply	other threads:[~2011-05-11 12:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20110511121039.GA19108@santoshs.mistral.in \
    --to=santoshs@fossix.org \
    --cc=alsa-devel@alsa-project.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).