From: Takashi Iwai <tiwai@suse.de>
To: Ryan Gammon <rggammon@helixcommunity.org>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: dmix, pause, and snd_pcm_delay
Date: Tue, 13 Jul 2004 11:50:07 +0200 [thread overview]
Message-ID: <s5h8ydob5io.wl@alsa2.suse.de> (raw)
In-Reply-To: <s5hacy4b608.wl@alsa2.suse.de>
[-- Attachment #1: Type: text/plain, Size: 573 bytes --]
At Tue, 13 Jul 2004 11:39:35 +0200,
I wrote:
>
> > 2. This works well until I try to pause. dmix claims support for
> > hardware pause, but when I pause, the hw.ptr seems to keep marching on,
> > and when I unpause, snd_pcm_delay() returns a negative value, as the
> > hardware pointer has become greater than the software pointer.
>
> Ok, it's a bug.
> A workaround is to disable pause/resume as your patch.
> I'll apply it cvs.
After rethought, it doesn't seem to be a good idea to disable them in
pcm_plug.c. Does the attached patch work alternatively?
Takashi
[-- Attachment #2: Type: text/plain, Size: 677 bytes --]
Index: alsa-lib/src/pcm/pcm_direct.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-lib/src/pcm/pcm_direct.c,v
retrieving revision 1.15
diff -u -r1.15 pcm_direct.c
--- alsa-lib/src/pcm/pcm_direct.c 7 Apr 2004 10:02:39 -0000 1.15
+++ alsa-lib/src/pcm/pcm_direct.c 13 Jul 2004 09:49:14 -0000
@@ -807,7 +807,7 @@
dmix->shmptr->s.rate = spcm->rate;
dmix->shmptr->s.format = spcm->format;
dmix->shmptr->s.boundary = spcm->boundary;
- dmix->shmptr->s.info = spcm->info;
+ dmix->shmptr->s.info = spcm->info & ~(SND_PCM_INFO_PAUSE|SND_PCM_INFO_RESUME);
dmix->shmptr->s.msbits = spcm->msbits;
spcm->donot_close = 1;
prev parent reply other threads:[~2004-07-13 9:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-06 7:46 dmix, pause, and snd_pcm_delay Ryan Gammon
2004-07-07 6:08 ` [patch] " Ryan Gammon
2004-07-13 9:39 ` Takashi Iwai
2004-07-13 9:50 ` Takashi Iwai [this message]
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=s5h8ydob5io.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=rggammon@helixcommunity.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 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.