From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: dmix, pause, and snd_pcm_delay Date: Tue, 13 Jul 2004 11:50:07 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: References: <40EA58EA.2080005@helixcommunity.org> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: multipart/mixed; boundary="Multipart_Tue_Jul_13_11:50:07_2004-1" Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Ryan Gammon Cc: alsa-devel@lists.sourceforge.net List-Id: alsa-devel@alsa-project.org --Multipart_Tue_Jul_13_11:50:07_2004-1 Content-Type: text/plain; charset=US-ASCII 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 --Multipart_Tue_Jul_13_11:50:07_2004-1 Content-Type: text/plain; charset=US-ASCII 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; --Multipart_Tue_Jul_13_11:50:07_2004-1-- ------------------------------------------------------- This SF.Net email sponsored by Black Hat Briefings & Training. Attend Black Hat Briefings & Training, Las Vegas July 24-29 - digital self defense, top technical experts, no vendor pitches, unmatched networking opportunities. Visit www.blackhat.com