patch-1.3.74 linux/drivers/sound/sb_dsp.c
Next file: linux/drivers/sound/sound_config.h
Previous file: linux/drivers/sound/sb16_midi.c
Back to the patch index
Back to the overall index
- Lines: 79
- Date:
Wed Mar 13 09:12:59 1996
- Orig file:
v1.3.73/linux/drivers/sound/sb_dsp.c
- Orig date:
Tue Mar 5 10:11:05 1996
diff -u --recursive --new-file v1.3.73/linux/drivers/sound/sb_dsp.c linux/drivers/sound/sb_dsp.c
@@ -75,6 +75,7 @@
int sbc_major = 0, sbc_minor = 0;
static int dsp_stereo = 0;
static int dsp_current_speed = DSP_DEFAULT_SPEED;
+static int dsp_requested_speed = DSP_DEFAULT_SPEED;
static int sb16 = 0;
static int irq_verified = 0;
@@ -334,6 +335,8 @@
unsigned long flags;
int max_speed = 44100;
+ dsp_requested_speed = speed;
+
if (AudioDrive)
return ess_speed (speed);
@@ -447,6 +450,7 @@
}
dsp_stereo = !!mode;
+ dsp_speed (dsp_requested_speed);
return dsp_stereo;
}
@@ -473,9 +477,6 @@
unsigned long flags;
int count = nr_bytes;
- if (!sb_irq_mode)
- dsp_speaker (ON);
-
DMAbuf_start_dma (dev, buf, count, DMA_MODE_WRITE);
sb_irq_mode = 0;
@@ -564,9 +565,6 @@
* Start a DMA input to the buffer pointed by dmaqtail
*/
- if (!sb_irq_mode)
- dsp_speaker (OFF);
-
DMAbuf_start_dma (dev, buf, count, DMA_MODE_READ);
sb_irq_mode = 0;
@@ -665,6 +663,7 @@
dsp_cleanup ();
dsp_speaker (OFF);
+ dsp_speed (dsp_requested_speed);
if (sbc_major == 3) /*
* SB Pro
@@ -722,7 +721,6 @@
else
sb_dsp_command (dsp_16bit ? 0xa4 : 0xa0);
- dsp_speed (dsp_current_speed);
} /* !AudioDrive */
}
trigger_bits = 0;
@@ -734,6 +732,7 @@
{
dsp_cleanup ();
dsp_speaker (OFF);
+ dsp_speed (dsp_requested_speed);
if (sbc_major == 3) /* SB Pro (at least ) */
{
@@ -827,6 +826,9 @@
printk ("SB Error: SoundBlaster board not installed\n");
return -ENXIO;
}
+
+ if (!sb_midi_busy)
+ sb_reset_dsp ();
if (sb_no_recording && mode & OPEN_READ)
{
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