patch-1.3.58 linux/drivers/sound/sscape.c
Next file: linux/drivers/sound/sys_timer.c
Previous file: linux/drivers/sound/soundvers.h
Back to the patch index
Back to the overall index
- Lines: 206
- Date:
Tue Jan 9 00:37:43 1996
- Orig file:
v1.3.57/linux/drivers/sound/sscape.c
- Orig date:
Wed Nov 8 07:11:37 1995
diff -u --recursive --new-file v1.3.57/linux/drivers/sound/sscape.c linux/drivers/sound/sscape.c
@@ -29,7 +29,7 @@
#include "sound_config.h"
-#if defined(CONFIGURE_SOUNDCARD) && !defined(EXCLUDE_SSCAPE)
+#if defined(CONFIG_SSCAPE)
#include "coproc.h"
@@ -102,7 +102,7 @@
{0};
static struct sscape_info *devc = &dev_info;
-static struct wait_queue *sscape_sleeper = NULL;
+static wait_handle *sscape_sleeper = NULL;
static volatile struct snd_wait sscape_sleep_flag =
{0};
@@ -309,7 +309,7 @@
{
{
sscape_sleep_flag.mode = WK_WAKEUP;
- wake_up (&sscape_sleeper);
+ module_wake_up (&sscape_sleeper);
};
}
@@ -318,7 +318,7 @@
printk ("SSCAPE: Host interrupt, data=%02x\n", host_read (devc));
}
-#if (!defined(EXCLUDE_MPU401) || !defined(EXCLUDE_MPU_EMU)) && !defined(EXCLUDE_MIDI)
+#if (defined(CONFIG_MPU401) || defined(CONFIG_MPU_EMU)) && defined(CONFIG_MIDI)
if (bits & 0x01)
{
mpuintr (irq, NULL);
@@ -338,35 +338,6 @@
}
-static void
-sscape_enable_intr (struct sscape_info *devc, unsigned intr_bits)
-{
- unsigned char temp, orig;
-
- temp = orig = sscape_read (devc, GA_INTENA_REG);
- temp |= intr_bits;
- temp |= 0x80; /* Master IRQ enable */
-
- if (temp == orig)
- return; /* No change */
-
- sscape_write (devc, GA_INTENA_REG, temp);
-}
-
-static void
-sscape_disable_intr (struct sscape_info *devc, unsigned intr_bits)
-{
- unsigned char temp, orig;
-
- temp = orig = sscape_read (devc, GA_INTENA_REG);
- temp &= ~intr_bits;
- if ((temp & ~0x80) == 0x00)
- temp = 0x00; /* Master IRQ disable */
- if (temp == orig)
- return; /* No change */
-
- sscape_write (devc, GA_INTENA_REG, temp);
-}
static void
do_dma (struct sscape_info *devc, int dma_chan, unsigned long buf, int blk_size, int mode)
@@ -431,6 +402,7 @@
return -EIO;
}
+ sscape_sleep_flag.mode = WK_NONE;
return 0;
}
@@ -445,7 +417,7 @@
if (devc->dma_allocated)
{
sscape_write (devc, GA_DMAA_REG, 0x20); /* DMA channel disabled */
-#ifndef EXCLUDE_NATIVE_PCM
+#ifdef CONFIG_NATIVE_PCM
#endif
devc->dma_allocated = 0;
}
@@ -478,7 +450,7 @@
cli ();
if (devc->dma_allocated == 0)
{
-#ifndef EXCLUDE_NATIVE_PCM
+#ifdef CONFIG_NATIVE_PCM
#endif
devc->dma_allocated = 1;
@@ -523,11 +495,11 @@
unsigned long tl;
if (1)
- current->timeout = tl = jiffies + (1);
+ current_set_timeout (tl = jiffies + (1));
else
tl = 0xffffffff;
sscape_sleep_flag.mode = WK_SLEEP;
- interruptible_sleep_on (&sscape_sleeper);
+ module_interruptible_sleep_on (&sscape_sleeper);
if (!(sscape_sleep_flag.mode & WK_WAKEUP))
{
if (jiffies >= tl)
@@ -571,11 +543,11 @@
unsigned long tl;
if (1)
- current->timeout = tl = jiffies + (1);
+ current_set_timeout (tl = jiffies + (1));
else
tl = 0xffffffff;
sscape_sleep_flag.mode = WK_SLEEP;
- interruptible_sleep_on (&sscape_sleeper);
+ module_interruptible_sleep_on (&sscape_sleeper);
if (!(sscape_sleep_flag.mode & WK_WAKEUP))
{
if (jiffies >= tl)
@@ -604,11 +576,11 @@
unsigned long tl;
if (1)
- current->timeout = tl = jiffies + (1);
+ current_set_timeout (tl = jiffies + (1));
else
tl = 0xffffffff;
sscape_sleep_flag.mode = WK_SLEEP;
- interruptible_sleep_on (&sscape_sleeper);
+ module_interruptible_sleep_on (&sscape_sleeper);
if (!(sscape_sleep_flag.mode & WK_WAKEUP))
{
if (jiffies >= tl)
@@ -917,10 +889,10 @@
if (old_hardware)
{
valid_interrupts = valid_interrupts_old;
- printk (" <Ensoniq Soundscape (old)>");
+ conf_printf ("Ensoniq Soundscape (old)", hw_config);
}
else
- printk (" <Ensoniq Soundscape>");
+ conf_printf ("Ensoniq Soundscape", hw_config);
for (i = 0; i < sizeof (valid_interrupts); i++)
if (hw_config->irq == valid_interrupts[i])
@@ -964,7 +936,7 @@
case 9: /* Master control reg. Don't modify CR-ROM bits. Disable SB emul */
sscape_write (devc, i,
- (sscape_read (devc, i) & 0xf0) | 0x00);
+ (sscape_read (devc, i) & 0xf0) | 0x08);
break;
default:
@@ -986,7 +958,7 @@
}
#endif
-#if !defined(EXCLUDE_MIDI) && !defined(EXCLUDE_MPU_EMU)
+#if defined(CONFIG_MIDI) && defined(CONFIG_MPU_EMU)
if (probe_mpu401 (hw_config))
hw_config->always_detect = 1;
{
@@ -1003,7 +975,7 @@
#ifndef EXCLUDE_NATIVE_PCM
/* Not supported yet */
-#ifndef EXCLUDE_AUDIO
+#ifdef CONFIG_AUDIO
if (num_audiodevs < MAX_AUDIO_DEV)
{
audio_devs[my_dev = num_audiodevs++] = &sscape_audio_operations;
@@ -1088,7 +1060,6 @@
if (old_hardware) /* Check that it's really an old Spea/Reveal card. */
{
- int status = 0;
unsigned char tmp;
int cc;
@@ -1153,7 +1124,7 @@
int i, irq_bits = 0xff;
-#ifdef EXCLUDE_NATIVE_PCM
+#ifndef CONFIG_NATIVE_PCM
int prev_devs = num_audiodevs;
#endif
@@ -1192,7 +1163,7 @@
0,
devc->osp);
-#ifdef EXCLUDE_NATIVE_PCM
+#ifndef CONFIG_NATIVE_PCM
if (num_audiodevs == (prev_devs + 1)) /* The AD1848 driver installed itself */
audio_devs[prev_devs]->coproc = &sscape_coproc_operations;
#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