All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Wood <carlo@alinoe.com>
To: xvoice@yahoogroups.com
Cc: kai.vehmanen@wakkanet.fi, alsa-devel@lists.sourceforge.net
Subject: Re: [xvoice] Hacking ViaVoice, part 4
Date: Sat, 12 Jul 2003 15:50:25 +0200	[thread overview]
Message-ID: <20030712135025.GA6553@alinoe.com> (raw)
In-Reply-To: <20030712120834.GA5378@alinoe.com>

On Sat, Jul 12, 2003 at 02:08:34PM +0200, Carlo Wood wrote:
> Hence, the problem is now reduced to the question:
> Why is snd_pcm_update_hw_ptr_interrupt not called anymore
> after we did run into an xrun?

I added a few more printk's and already I can guess
what is the reason that the 'blackbox' (the rest)
stops calling snd_pcm_update_hw_ptr_interrupt:

Jul 12 15:40:38 ansset kernel: Entering snd_pcm_update_hw_ptr_interrupt
Jul 12 15:40:38 ansset kernel: snd_pcm_update_hw_ptr_interrupt: status->hw_ptr set to 2048
Jul 12 15:40:38 ansset kernel: snd_pcm_capture_avail: boundary = 1073741824, status->hw_ptr = 2048, control->appl_ptr = 1024
Jul 12 15:40:38 ansset kernel: Leaving snd_pcm_update_hw_ptr_interrupt with EPIPE

Lets have a closer look at snd_pcm_update_hw_ptr_interrupt:

        runtime->status->hw_ptr = new_hw_ptr;
        printk("snd_pcm_update_hw_ptr_interrupt: status->hw_ptr set to %li\n", runtime->status->hw_ptr);
        runtime->hw_ptr_interrupt = new_hw_ptr - new_hw_ptr % runtime->period_size;

        if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
                avail = snd_pcm_playback_avail(runtime);
        else
                avail = snd_pcm_capture_avail(runtime);
        if (avail > runtime->avail_max)
                runtime->avail_max = avail;
        if (avail >= runtime->stop_threshold) {
                snd_pcm_stop(substream,
                             runtime->status->state == SNDRV_PCM_STATE_DRAINING ?
                             SNDRV_PCM_STATE_SETUP : SNDRV_PCM_STATE_XRUN);
                printk("Leaving snd_pcm_update_hw_ptr_interrupt with EPIPE\n");
                return -EPIPE;
        }
        if (avail >= runtime->control->avail_min)
                wake_up(&runtime->sleep);
        printk("Leaving snd_pcm_update_hw_ptr_interrupt\n");
        return 0;
}

I thought it was said that an xrun should simply be ignored?

What is the correct way to recover from this, to continue
recording in this case, after the xrun?

-- 
Carlo Wood <carlo@alinoe.com>


-------------------------------------------------------
This SF.Net email sponsored by: Parasoft
Error proof Web apps, automate testing & more.
Download & eval WebKing and get a free book.
www.parasoft.com/bulletproofapps1

       reply	other threads:[~2003-07-12 13:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20030712120834.GA5378@alinoe.com>
2003-07-12 13:50 ` Carlo Wood [this message]
2003-07-12 18:56   ` Re: [xvoice] Hacking ViaVoice, part 4 Jaroslav Kysela
2003-07-12 23:05     ` Carlo Wood
2003-07-12 23:10       ` Carlo Wood

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=20030712135025.GA6553@alinoe.com \
    --to=carlo@alinoe.com \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=kai.vehmanen@wakkanet.fi \
    --cc=xvoice@yahoogroups.com \
    /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.