possible fix for sb_audio

Jeff DeFouw (mrj@i2k.com)
Wed, 30 Dec 1998 02:40:34 -0500 (EST)


No response to my original message, so I found time to hack away at the
problem. The end result: disabling a couple lines of code in sb_audio.c.
I don't know what strange little thing this section of code between my
#if/#endif does but it confuses me, and some of the kernel sound DMA
stuff, enough that I decided to try running without it. My sound now
appears to work great (I can play and record audio many times without
error). Without this I cannot read from any audio device after doing any
audio I/O, I have to reload the module to read again. From what I could
figure out the "un-juggling" of the dmap_out/in screws up closing the
dmap's. Since it runs great without it, I can't tell why this is even in
there. I don't know enough about the sound driver, so this may not be
correct. As usual, I'm mostly going for function... my kernel hasn't
crashed or made any other bad noise so I'm happy with it. :)

2.2.0-pre1 sb_audio.c:
-------------
static void sb_audio_close(int dev)
{
sb_devc *devc = audio_devs[dev]->devc;

/* if we did dma juggling put the right dmap in the right place */
#if 0
if(devc->duplex && audio_devs[dev]->dmap_out->dma != devc->dma8)
{
struct dma_buffparms *dmap_temp;
dmap_temp = audio_devs[dev]->dmap_out;
audio_devs[dev]->dmap_out = audio_devs[dev]->dmap_in;
audio_devs[dev]->dmap_in = dmap_temp;
}
#endif
audio_devs[dev]->dmap_out->dma = devc->dma8;
audio_devs[dev]->dmap_in->dma = ( devc->duplex ) ?
devc->dma16 : devc->dma8;
-------------

--
Jeff DeFouw <mrj@i2k.com>
I2K Staff - http://www.i2k.com

- 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/