RE: [PATCH] prepatch-2.1.90 sound

Lars Heete (hel@admin.de)
Wed, 11 Mar 1998 21:25:25 +0100 (CET)


This message is in MIME format
--_=XFMail.1.2.p0.Linux:980311212525:861=_
Content-Type: text/plain; charset=us-ascii

Itai Nahshon <nahshon@actcom.co.il> wrote

> 1. Removed all includes of <kerneld.h>.
> 2. I just tried to set my card (82C931) full-duplex and got an Oops.
> The oops is in where dmap->raw_buf is NULL.
> To fix, I chose to set fragment_size to 0 when releasing the
> dma buffer.

> To repeat the Oops: you must have a duplex capable card.
> echo x > /dev/dsp ; echo < /dev/dsp

> An alternate fix (not tested) would be to check for
> dmap->raw_buf == NULL in sync_output().

My GusMAX card seems not to be duplex capable, so i can't check your solution.
But I slightly enhanced your patch to correct the automatic loading of modules
via kmod. I also removed some silly bug in the gus_module, that caused all its
global symbols to be exported.

Lars Heete

--_=XFMail.1.2.p0.Linux:980311212525:861=_
Content-Disposition: attachment; filename="2.1.90-pre1-sound.diff"
Content-Transfer-Encoding: 7bit
Content-Description: 2.1.90-pre1-sound.diff
Content-Type: text/plain;
charset=us-ascii; name=2.1.90-pre1-sound.diff; SizeOnDisk=2120

--- linux-2.1.90-pre1/drivers/sound/audio.c Wed Mar 11 17:16:24 1998
+++ linux/drivers/sound/audio.c Wed Mar 11 17:16:32 1998
@@ -21,7 +21,6 @@

#include <linux/config.h>
#include <linux/stddef.h>
-#include <linux/kerneld.h>

#include "sound_config.h"

--- linux-2.1.90-pre1/drivers/sound/dmabuf.c Wed Mar 11 19:47:45 1998
+++ dmabuf.c Wed Mar 11 19:51:54 1998
@@ -125,6 +125,7 @@

free_pages((unsigned long) dmap->raw_buf, sz);
dmap->raw_buf = NULL;
+ dmap->fragment_size = 0;
}


--- linux-2.1.90-pre1/drivers/sound/gus_card.c Wed Mar 11 17:17:23 1998
+++ linux/drivers/sound/gus_card.c Wed Mar 11 17:18:40 1998
@@ -207,6 +207,8 @@
int gus16 = 0;
static int db16 = 0; /* Has a Gus16 AD1848 on it */

+EXPORT_NO_SYMBOLS;
+
MODULE_PARM(io, "i");
MODULE_PARM(irq, "i");
MODULE_PARM(dma, "i");
--- linux-2.1.90-pre1/drivers/sound/midibuf.c Wed Mar 11 17:13:34 1998
+++ linux/drivers/sound/midibuf.c Wed Mar 11 17:16:42 1998
@@ -15,7 +15,6 @@
*/
#include <linux/config.h>
#include <linux/stddef.h>
-#include <linux/kerneld.h>

#define MIDIBUF_C

--- linux-2.1.90-pre1/drivers/sound/soundcard.c Wed Mar 11 17:14:35 1998
+++ linux/drivers/sound/soundcard.c Wed Mar 11 17:15:42 1998
@@ -26,7 +26,7 @@
#include <linux/fcntl.h>
#include <linux/ctype.h>
#include <linux/stddef.h>
-#include <linux/kerneld.h>
+#include <linux/kmod.h>
#ifdef __KERNEL__
#include <asm/io.h>
#include <asm/segment.h>
@@ -439,7 +439,7 @@

case SND_DEV_CTL:
dev >>= 4;
-#ifdef CONFIG_KERNELD
+#ifdef CONFIG_KMOD
if (dev >= 0 && dev < MAX_MIXER_DEV && mixer_devs[dev] == NULL) {
char modname[20];
sprintf(modname, "mixer%d", dev);
@@ -555,14 +555,14 @@
{
if (mixdev < 0 || mixdev >= MAX_MIXER_DEV)
return -ENXIO;
-#ifdef CONFIG_KERNELD
+#ifdef CONFIG_KMOD
/* Try to load the mixer... */
if (mixer_devs[mixdev] == NULL) {
char modname[20];
sprintf(modname, "mixer%d", mixdev);
request_module(modname);
}
-#endif /* CONFIG_KERNELD */
+#endif /* CONFIG_KMOD */
if (mixdev >= num_mixers || !mixer_devs[mixdev])
return -ENXIO;
if (cmd == SOUND_MIXER_INFO)

--_=XFMail.1.2.p0.Linux:980311212525:861=_--
End of MIME message

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu