patch-1.3.58 linux/drivers/sound/sound_switch.c
Next file: linux/drivers/sound/sound_timer.c
Previous file: linux/drivers/sound/sound_pnp.c
Back to the patch index
Back to the overall index
- Lines: 214
- Date:
Tue Jan 9 00:37:40 1996
- Orig file:
v1.3.57/linux/drivers/sound/sound_switch.c
- Orig date:
Wed Nov 8 07:11:37 1995
diff -u --recursive --new-file v1.3.57/linux/drivers/sound/sound_switch.c linux/drivers/sound/sound_switch.c
@@ -29,17 +29,11 @@
#include "sound_config.h"
-#ifdef CONFIGURE_SOUNDCARD
-
struct sbc_device
{
int usecount;
};
-static struct sbc_device sbc_devices[SND_NDEVS] =
-{
- {0}};
-
static int in_use = 0; /*
@@ -210,7 +204,7 @@
return;
}
-#ifdef EXCLUDE_AUDIO
+#ifndef CONFIG_AUDIO
if (!put_status ("\nAudio devices: NOT ENABLED IN CONFIG\n"))
return;
#else
@@ -235,7 +229,7 @@
}
#endif
-#ifdef EXCLUDE_SEQUENCER
+#ifndef CONFIG_SEQUENCER
if (!put_status ("\nSynth devices: NOT ENABLED IN CONFIG\n"))
return;
#else
@@ -255,7 +249,7 @@
}
#endif
-#ifdef EXCLUDE_MIDI
+#ifndef CONFIG_MIDI
if (!put_status ("\nMidi devices: NOT ENABLED IN CONFIG\n"))
return;
#else
@@ -339,7 +333,7 @@
return read_status (buf, count);
break;
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
@@ -347,14 +341,14 @@
break;
#endif
-#ifndef EXCLUDE_SEQUENCER
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
return sequencer_read (dev, file, buf, count);
break;
#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
return MIDIbuf_read (dev, file, buf, count);
#endif
@@ -375,14 +369,14 @@
switch (dev & 0x0f)
{
-#ifndef EXCLUDE_SEQUENCER
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
return sequencer_write (dev, file, buf, count);
break;
#endif
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
@@ -390,7 +384,7 @@
break;
#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
return MIDIbuf_write (dev, file, buf, count);
#endif
@@ -407,7 +401,7 @@
{
int retval;
- DEB (printk ("sound_open_sw(dev=%d) : usecount=%d\n", dev, sbc_devices[dev].usecount));
+ DEB (printk ("sound_open_sw(dev=%d)\n", dev));
if ((dev >= SND_NDEVS) || (dev < 0))
{
@@ -431,7 +425,7 @@
return 0;
break;
-#ifndef EXCLUDE_SEQUENCER
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
if ((retval = sequencer_open (dev, file)) < 0)
@@ -439,14 +433,14 @@
break;
#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
if ((retval = MIDIbuf_open (dev, file)) < 0)
return retval;
break;
#endif
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
@@ -460,7 +454,6 @@
return -ENXIO;
}
- sbc_devices[dev].usecount++;
in_use++;
return 0;
@@ -484,20 +477,20 @@
case SND_DEV_CTL:
break;
-#ifndef EXCLUDE_SEQUENCER
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
sequencer_release (dev, file);
break;
#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
MIDIbuf_release (dev, file);
break;
#endif
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
@@ -508,8 +501,6 @@
default:
printk ("Sound error: Releasing unknown device 0x%02x\n", dev);
}
-
- sbc_devices[dev].usecount--;
in_use--;
}
@@ -527,7 +518,7 @@
switch (dtype)
{
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
@@ -559,14 +550,14 @@
return mixer_devs[dev]->ioctl (dev, cmd, arg);
break;
-#ifndef EXCLUDE_SEQUENCER
+#ifdef CONFIG_SEQUENCER
case SND_DEV_SEQ:
case SND_DEV_SEQ2:
return sequencer_ioctl (dev, file, cmd, arg);
break;
#endif
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
case SND_DEV_DSP:
case SND_DEV_DSP16:
case SND_DEV_AUDIO:
@@ -574,7 +565,7 @@
break;
#endif
-#ifndef EXCLUDE_MIDI
+#ifdef CONFIG_MIDI
case SND_DEV_MIDIN:
return MIDIbuf_ioctl (dev, file, cmd, arg);
break;
@@ -587,5 +578,3 @@
return -EPERM;
}
-
-#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this