From: Takashi Iwai <tiwai@suse.de>
To: Michael Jochum <e9725005@stud3.tuwien.ac.at>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: rtcw,quake3 hang on exit
Date: Tue, 09 Apr 2002 10:37:33 +0200 [thread overview]
Message-ID: <s5h1ydpmfn6.wl@alsa2.suse.de> (raw)
In-Reply-To: <1018296113.12764.0.camel@mjo>
[-- Attachment #1: Type: text/plain, Size: 664 bytes --]
Hi Michael,
At 08 Apr 2002 22:01:49 +0200,
Michael Jochum wrote:
>
> On Mon, 2002-04-08 at 17:05, Takashi Iwai wrote:
> > i got the point.
> > snd_pcm_playback_drain() (which is called at closing the pcm) never
> > returns when OSS is running on mmap mode.
> > now fixed on cvs. please give a try.
>
> i tried cvs - quake3 and rtcw don`t hang on exit now - BUT there is no
> sound at all during the game. there is sound during the intro and when
> moving the mouse over the buttons in the main menu but no sound during
> the game. maybe the intro does not use the mmap mode?
could you try the following patch?
if it's ok, i'll commit this to cvs.
Takashi
[-- Attachment #2: oss-mmap-fix.dif --]
[-- Type: application/octet-stream, Size: 1235 bytes --]
Index: alsa-kernel/core/pcm_lib.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/core/pcm_lib.c,v
retrieving revision 1.7
diff -u -r1.7 pcm_lib.c
--- alsa-kernel/core/pcm_lib.c 8 Apr 2002 11:42:08 -0000 1.7
+++ alsa-kernel/core/pcm_lib.c 9 Apr 2002 08:34:10 -0000
@@ -142,13 +142,17 @@
avail = snd_pcm_capture_avail(runtime);
if (avail > runtime->avail_max)
runtime->avail_max = avail;
- /* here we need to check both stop_threshold and buffer_size, because
- OSS mmap mode sets stop_threshold as maximum (boundary size). */
- if (avail >= runtime->stop_threshold ||
- avail >= runtime->buffer_size) {
+ if (avail >= runtime->stop_threshold) {
snd_pcm_stop(substream,
runtime->status->state == SNDRV_PCM_STATE_DRAINING ?
SNDRV_PCM_STATE_SETUP : SNDRV_PCM_STATE_XRUN);
+ return -EPIPE;
+ }
+ /* here need to check the avail size in draining because
+ OSS mmap mode sets stop_threshold as maximum (boundary size). */
+ if (runtime->status->state == SNDRV_PCM_STATE_DRAINING &&
+ avail >= runtime->buffer_size) {
+ snd_pcm_stop(substream, SNDRV_PCM_STATE_SETUP);
return -EPIPE;
}
if (avail >= runtime->control->avail_min)
next prev parent reply other threads:[~2002-04-09 8:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-03-20 19:58 rtcw,quake3 hang on exit Michael Jochum
2002-03-20 21:00 ` Steven Walter
2002-03-20 21:47 ` Paul Davis
2002-03-20 21:51 ` Dan Hollis
2002-03-20 22:05 ` Michael Jochum
2002-03-20 23:21 ` Steven Walter
2002-04-08 15:05 ` Takashi Iwai
2002-04-08 20:01 ` Michael Jochum
2002-04-09 8:37 ` Takashi Iwai [this message]
2002-04-09 9:30 ` Takashi Iwai
2002-04-09 17:32 ` rtcw,quake3 hang on exit <<< patch is working!!!! Michael Jochum
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=s5h1ydpmfn6.wl@alsa2.suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@lists.sourceforge.net \
--cc=e9725005@stud3.tuwien.ac.at \
/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.