Messages in this thread Patch in this message | | | Date | Sat, 2 Jan 1999 08:45:19 +0100 (CET) | From | Mike Galbraith <> | Subject | Re: [PATCH] sb16 /dev/dsp busy 2.2.0-pre1 |
| |
On Sat, 2 Jan 1999, Brian Almeida wrote:
> On Wed, Dec 30, 1998 at 04:16:54PM +0100, Mike Galbraith wrote: > > after we have opened the dsp O_WRONLY and set it up for dma16. When we > > close, we end up closing the wrong dmap because it is switched out from > > underneath us in sb_audio_close() before close_dmap() is called. Later > > attempts to open O_RDWR find dmap_in busy. > > Tested with all of the sound goodies I have.. all seem happy. > First time works great. Second time, I get this. I'm running 2.2.0pre3. > > root@terminus [~]: /usr/games/quake2 > Added packfile ./baseq2/pak0.pak (3307 files) > Added packfile ./baseq2/pak4.pak (158 files) > Added packfile ./baseq2/pak5.pak (495 files) > Added packfile ./baseq2/pak6.pak (133 files) > execing default.cfg > execing config.cfg > Console initialized. > > ------- sound initialization ------- > sound sampling rate: 11025 > Segmentation fault
Hi,
Looks like my fix was almost right ;-(wrong). Mikael Pettersson donated the following, which works with everything I've tried. (quake free zone) Maybe some other folks should test?
-Mike
--- linux-2.2.0-pre1-ac4/drivers/sound/sb_audio.c.orig Thu Dec 31 16:48:36 1998 +++ linux-2.2.0-pre1-ac4/drivers/sound/sb_audio.c Thu Dec 31 18:06:44 1998 @@ -92,8 +92,10 @@ { sb_devc *devc = audio_devs[dev]->devc; - /* if we did dma juggling put the right dmap in the right place */ - if(devc->fullduplex && audio_devs[dev]->dmap_out->dma != devc->dma8) + /* fix things if mmap turned off fullduplex */ + if(devc->duplex + && !devc->fullduplex + && (devc->opened & OPEN_READ) && (devc->opened & OPEN_WRITE)) { struct dma_buffparms *dmap_temp; dmap_temp = audio_devs[dev]->dmap_out;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |