From 54a697ba7cc3a705c4d27d169175ce7ac64dfc24 Mon Sep 17 00:00:00 2001 From: dg Date: Tue, 27 Sep 1994 17:58:30 +0000 Subject: First round of changes to get the sound code working in 2.0. --- sys/i386/include/soundcard.h | 3 +-- sys/i386/isa/sound/dev_table.h | 3 +-- sys/i386/isa/sound/gus_card.c | 4 +--- sys/i386/isa/sound/local.h | 7 ++++++- sys/i386/isa/sound/os.h | 3 +-- sys/i386/isa/sound/patmgr.c | 4 ++-- sys/i386/isa/sound/sb16_dsp.c | 3 +-- sys/i386/isa/sound/sb_dsp.c | 3 +-- sys/i386/isa/sound/sound_calls.h | 7 +++++-- sys/i386/isa/sound/soundcard.c | 6 ++---- sys/sys/soundcard.h | 3 +-- 11 files changed, 22 insertions(+), 24 deletions(-) diff --git a/sys/i386/include/soundcard.h b/sys/i386/include/soundcard.h index 2ddd9a9..4fa1188 100644 --- a/sys/i386/include/soundcard.h +++ b/sys/i386/include/soundcard.h @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * - * $Id: soundcard.h,v 1.6 1994/08/02 07:39:03 davidg Exp $ + * $Id: soundcard.h,v 1.7 1994/08/21 04:55:31 paul Exp $ */ #ifndef _I386_MACHINE_SOUNDCARD_H_ @@ -761,5 +761,4 @@ void seqbuf_dump(void); /* This function must be provided by programs */ perror("Write patch: /dev/sequencer");} #endif -long soundcard_init(long mem_start); #endif diff --git a/sys/i386/isa/sound/dev_table.h b/sys/i386/isa/sound/dev_table.h index a814d5b..5c47285 100644 --- a/sys/i386/isa/sound/dev_table.h +++ b/sys/i386/isa/sound/dev_table.h @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: dev_table.h,v 1.6 1994/08/02 07:39:47 davidg Exp $ */ #ifndef _DEV_TABLE_H_ @@ -237,7 +237,6 @@ struct generic_midi_operations { long sndtable_init(long mem_start); int sndtable_get_cardcount (void); -long CMIDI_init(long mem_start); /* */ struct address_info *sound_getconf(int card_type); void sound_chconf(int card_type, int ioaddr, int irq, int dma); #endif diff --git a/sys/i386/isa/sound/gus_card.c b/sys/i386/isa/sound/gus_card.c index f3e8119..e0121d7 100644 --- a/sys/i386/isa/sound/gus_card.c +++ b/sys/i386/isa/sound/gus_card.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: gus_card.c,v 1.7 1994/08/02 07:39:52 davidg Exp $ */ #include "sound_config.h" @@ -34,8 +34,6 @@ #include "gus_hw.h" -void gusintr (int); - int gus_base, gus_irq, gus_dma; long diff --git a/sys/i386/isa/sound/local.h b/sys/i386/isa/sound/local.h index a5e7e54..3be3b58 100644 --- a/sys/i386/isa/sound/local.h +++ b/sys/i386/isa/sound/local.h @@ -1,9 +1,14 @@ /* for FreeBSD */ /* - * $Id$ + * $Id: local.h,v 1.8 1994/08/02 07:40:06 davidg Exp $ */ #include "snd.h" +#include +#include +#include +#include + #if NSND > 0 #define KERNEL_SOUNDCARD #endif diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h index ec3c47f..ee187b6 100644 --- a/sys/i386/isa/sound/os.h +++ b/sys/i386/isa/sound/os.h @@ -37,7 +37,7 @@ * before making the changes. It's possible that I have already made the * change. * - * $Id$ + * $Id: os.h,v 1.11 1994/08/02 07:40:16 davidg Exp $ */ /* @@ -218,7 +218,6 @@ struct snd_wait { */ #ifndef HZ -extern int hz; #define HZ hz #endif diff --git a/sys/i386/isa/sound/patmgr.c b/sys/i386/isa/sound/patmgr.c index f575437..1811ee9 100644 --- a/sys/i386/isa/sound/patmgr.c +++ b/sys/i386/isa/sound/patmgr.c @@ -25,7 +25,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: patmgr.c,v 1.5 1994/08/02 07:40:30 davidg Exp $ */ #define PATMGR_C @@ -130,7 +130,7 @@ pmgr_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) return RET_ERROR (EIO); } - COPY_FROM_USER (mbox[dev], buf, 0, 4); + COPY_FROM_USER ((caddr_t) mbox[dev], buf, 0, 4); if (*(unsigned char *) mbox[dev] == SEQ_FULLSIZE) { diff --git a/sys/i386/isa/sound/sb16_dsp.c b/sys/i386/isa/sound/sb16_dsp.c index 20c597d..cd9290d 100644 --- a/sys/i386/isa/sound/sb16_dsp.c +++ b/sys/i386/isa/sound/sb16_dsp.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: sb16_dsp.c,v 1.6 1994/08/02 07:40:36 davidg Exp $ */ #define DEB(x) @@ -70,7 +70,6 @@ static void sb16_dsp_halt (int dev); static int dsp_set_speed (int); static int dsp_set_stereo (int); static void dsp_cleanup (void); -int sb_reset_dsp (void); static struct audio_operations sb16_dsp_operations = { diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c index 9e296c6..992a00b 100644 --- a/sys/i386/isa/sound/sb_dsp.c +++ b/sys/i386/isa/sound/sb_dsp.c @@ -29,7 +29,7 @@ * Hunyue Yau Jan 6 1994 * Added code to support Sound Galaxy NX Pro * - * $Id$ + * $Id: sb_dsp.c,v 1.19 1994/08/02 07:40:42 davidg Exp $ */ #include "sound_config.h" @@ -78,7 +78,6 @@ volatile int sb_intr_active = 0; static int dsp_speed (int); static int dsp_set_stereo (int mode); -int sb_dsp_command (unsigned char val); #if !defined(EXCLUDE_MIDI) || !defined(EXCLUDE_AUDIO) diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h index 789d1d0..161118a 100644 --- a/sys/i386/isa/sound/sound_calls.h +++ b/sys/i386/isa/sound/sound_calls.h @@ -1,9 +1,11 @@ /* - * $Id$ + * $Id: sound_calls.h,v 1.5 1994/08/02 07:40:51 davidg Exp $ */ /* * DMA buffer calls */ +#ifndef _MACHINE_ISA_SOUND_H_ +#define _MACHINE_ISA_SOUND_H_ int DMAbuf_open(int dev, int mode); int DMAbuf_release(int dev, int mode); @@ -93,7 +95,6 @@ int pro_midi_write(int dev, snd_rw_buf *uio); int pro_midi_read(int dev, snd_rw_buf *uio); /* From soundcard.c */ -long soundcard_init(long mem_start); void tenmicrosec(void); void request_sound_timer (int count); void sound_stop_timer(void); @@ -209,3 +210,5 @@ int pmgr_inform(int dev, int event, unsigned long parm1, unsigned long parm2, /* From ics2101.c */ long ics2101_mixer_init(long mem_start); + +#endif diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index bc44b00..f3acf7e 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: soundcard.c,v 1.18 1994/08/02 07:40:58 davidg Exp $ */ #include "sound_config.h" @@ -72,7 +72,6 @@ unsigned long get_time(void) { -extern struct timeval time; struct timeval timecopy; int x; @@ -345,8 +344,7 @@ sound_mem_init (void) for (snd_raw_count[dev] = 0; snd_raw_count[dev] < sound_buffcounts[dev]; snd_raw_count[dev]++) { - char *tmpbuf = contigmalloc (sound_buffsizes[dev], M_DEVBUF, M_NOWAIT, - 0xFFFFFFul, 0ul, dma_pagesize - 1); + char *tmpbuf = (char *)vm_page_alloc_contig(sound_buffsizes[dev], 0ul, 0xfffffful, dma_pagesize); if (tmpbuf == NULL) { diff --git a/sys/sys/soundcard.h b/sys/sys/soundcard.h index 2ddd9a9..4fa1188 100644 --- a/sys/sys/soundcard.h +++ b/sys/sys/soundcard.h @@ -23,7 +23,7 @@ * SUCH DAMAGE. * * - * $Id: soundcard.h,v 1.6 1994/08/02 07:39:03 davidg Exp $ + * $Id: soundcard.h,v 1.7 1994/08/21 04:55:31 paul Exp $ */ #ifndef _I386_MACHINE_SOUNDCARD_H_ @@ -761,5 +761,4 @@ void seqbuf_dump(void); /* This function must be provided by programs */ perror("Write patch: /dev/sequencer");} #endif -long soundcard_init(long mem_start); #endif -- cgit v1.1