diff options
Diffstat (limited to 'sys')
28 files changed, 655 insertions, 132 deletions
diff --git a/sys/i386/isa/sound/COPYING b/sys/i386/isa/sound/COPYING index be7703a..d1509c5 100644 --- a/sys/i386/isa/sound/COPYING +++ b/sys/i386/isa/sound/COPYING @@ -9,8 +9,6 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Unmodified version of this file (COPYING) must be provided with - * any source or binary distributions. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE diff --git a/sys/i386/isa/sound/adlib_card.c b/sys/i386/isa/sound/adlib_card.c index a9cf568..29e521e 100644 --- a/sys/i386/isa/sound/adlib_card.c +++ b/sys/i386/isa/sound/adlib_card.c @@ -4,8 +4,28 @@ * * Detection routine for the AdLib card. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" diff --git a/sys/i386/isa/sound/audio.c b/sys/i386/isa/sound/audio.c index e35366e..775e6ab 100644 --- a/sys/i386/isa/sound/audio.c +++ b/sys/i386/isa/sound/audio.c @@ -3,8 +3,28 @@ * * Device file manager for /dev/audio * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" diff --git a/sys/i386/isa/sound/dev_table.c b/sys/i386/isa/sound/dev_table.c index 96765cd8d4..7eabad4 100644 --- a/sys/i386/isa/sound/dev_table.c +++ b/sys/i386/isa/sound/dev_table.c @@ -3,8 +3,28 @@ * * Device call tables. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #define _DEV_TABLE_C_ diff --git a/sys/i386/isa/sound/dev_table.h b/sys/i386/isa/sound/dev_table.h index 64482ce..9bfd784 100644 --- a/sys/i386/isa/sound/dev_table.h +++ b/sys/i386/isa/sound/dev_table.h @@ -1,10 +1,31 @@ /* - linux/kernel/chr_drv/sound/dev_table.h - - Global definitions for device call tables - - (C) Hannu Savolainen 1992 - See COPYING for further details. Should be distributed with this file. + * dev_table.h + * + * Global definitions for device call tables + * + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ @@ -77,7 +98,10 @@ struct synth_operations { struct midi_operations { struct midi_info info; - int (*open) (int dev, int mode); + int (*open) (int dev, int mode, + void (*inputintr)(int dev, unsigned char data), + void (*outputintr)(int dev) + ); void (*close) (int dev); int (*ioctl) (int dev, unsigned int cmd, unsigned int arg); int (*putc) (int dev, unsigned char data); @@ -94,8 +118,8 @@ struct generic_midi_operations { struct midi_info info; int (*open) (int dev, int mode); void (*close) (int dev); - int (*write) (int dev, struct uio *data); - int (*read) (int dev, struct uio *data); + int (*write) (int dev, snd_rw_buf *data); + int (*read) (int dev, snd_rw_buf *data); }; #ifndef ALL_EXTERNAL_TO_ME diff --git a/sys/i386/isa/sound/dmabuf.c b/sys/i386/isa/sound/dmabuf.c index 5123022..da20ec5 100644 --- a/sys/i386/isa/sound/dmabuf.c +++ b/sys/i386/isa/sound/dmabuf.c @@ -3,8 +3,28 @@ * * The DMA buffer manager for digitized voice applications * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" @@ -58,7 +78,9 @@ static volatile int dmabuf_interrupted[MAX_DSP_DEV] = * Pointers to raw buffers */ -char *snd_raw_buf[MAX_DSP_DEV][DSP_BUFFCOUNT]; +char *snd_raw_buf[MAX_DSP_DEV][DSP_BUFFCOUNT] = +{ + {NULL}}; unsigned long snd_raw_buf_phys[MAX_DSP_DEV][DSP_BUFFCOUNT]; int snd_raw_count[MAX_DSP_DEV]; @@ -83,7 +105,9 @@ static int dev_nbufs[MAX_DSP_DEV]; /* # of logical buffers ( >= * sound_buffcounts[dev] */ static int dev_counts[MAX_DSP_DEV][MAX_SUB_BUFFERS]; static unsigned long dev_buf_phys[MAX_DSP_DEV][MAX_SUB_BUFFERS]; -static char *dev_buf[MAX_DSP_DEV][MAX_SUB_BUFFERS]; +static char *dev_buf[MAX_DSP_DEV][MAX_SUB_BUFFERS] = +{ + {NULL}}; static int dev_buffsize[MAX_DSP_DEV]; static void @@ -174,7 +198,7 @@ DMAbuf_open (int dev, int mode) return RET_ERROR (ENXIO); } - if (sound_buffcounts[dev] <= 0) + if (snd_raw_buf[dev][0] == NULL) return RET_ERROR (ENOSPC); /* Memory allocation failed during boot */ if ((retval = dsp_devs[dev]->open (dev, mode)) < 0) @@ -299,11 +323,7 @@ DMAbuf_getrdbuffer (int dev, char **buf, int *len) } /* Wait for the next block */ -#ifdef CRYPTO - REQUEST_TIMEOUT (60 * HZ, dev_sleeper[dev]); -#else REQUEST_TIMEOUT (10 * HZ, dev_sleeper[dev]); -#endif INTERRUPTIBLE_SLEEP_ON (dev_sleeper[dev], dev_sleep_flag[dev]); } RESTORE_INTR (flags); @@ -420,7 +440,8 @@ DMAbuf_getwrbuffer (int dev, char **buf, int *size) } /* Wait for free space */ - REQUEST_TIMEOUT (60 * HZ, dev_sleeper[dev]); /* Overestimated timeout */ + REQUEST_TIMEOUT (60 * HZ, dev_sleeper[dev]); /* GUS requires up to 60 + * sec */ INTERRUPTIBLE_SLEEP_ON (dev_sleeper[dev], dev_sleep_flag[dev]); } RESTORE_INTR (flags); diff --git a/sys/i386/isa/sound/finetune.h b/sys/i386/isa/sound/finetune.h index 07fd3e0..b86a0eb 100644 --- a/sys/i386/isa/sound/finetune.h +++ b/sys/i386/isa/sound/finetune.h @@ -1,7 +1,28 @@ #ifdef SEQUENCER_C /* - * Copyright Hannu Savolainen 1993 - * See COPYING for further details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ unsigned short finetune_table[128] = diff --git a/sys/i386/isa/sound/gus_card.c b/sys/i386/isa/sound/gus_card.c index 82fa3a4..751b74f 100644 --- a/sys/i386/isa/sound/gus_card.c +++ b/sys/i386/isa/sound/gus_card.c @@ -1,11 +1,30 @@ - /* * linux/kernel/chr_drv/sound/gus_card.c * * Detection routine for the Gravis Ultrasound. * - * (C) 1993 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" diff --git a/sys/i386/isa/sound/gus_midi.c b/sys/i386/isa/sound/gus_midi.c index 6978eed..b5cd684 100644 --- a/sys/i386/isa/sound/gus_midi.c +++ b/sys/i386/isa/sound/gus_midi.c @@ -3,8 +3,28 @@ * * The low level driver for the GUS Midi Interface. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" @@ -20,6 +40,8 @@ static int my_dev; static int output_used = 0; static volatile unsigned char gus_midi_control; +static void (*midi_input_intr) (int dev, unsigned char data); + static unsigned char tmp_queue[256]; static volatile int qlen; static volatile unsigned char qhead, qtail; @@ -28,7 +50,10 @@ extern int gus_base, gus_irq, gus_dma; #define GUS_MIDI_STATUS() INB(u_MidiStatus) static int -gus_midi_open (int dev, int mode) +gus_midi_open (int dev, int mode, + void (*input) (int dev, unsigned char data), + void (*output) (int dev) +) { if (midi_busy) @@ -58,6 +83,7 @@ gus_midi_open (int dev, int mode) midi_busy = 1; qlen = qhead = qtail = output_used = 0; + midi_input_intr = input; return 0; } @@ -225,7 +251,7 @@ gus_midi_interrupt (int dummy) { data = INB (u_MidiData); if (input_opened) - sequencer_midi_input (my_dev, data); + midi_input_intr (my_dev, data); } if (stat & MIDI_XMIT_EMPTY) diff --git a/sys/i386/isa/sound/gus_wave.c b/sys/i386/isa/sound/gus_wave.c index 2ea4569..50a9fcd 100644 --- a/sys/i386/isa/sound/gus_wave.c +++ b/sys/i386/isa/sound/gus_wave.c @@ -4,8 +4,28 @@ * * Driver for the Gravis UltraSound wave table synth. * - * (C) 1993 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ /* #define GUS_LINEAR_VOLUME */ @@ -1266,10 +1286,6 @@ guswave_load_patch (int dev, int format, snd_rw_buf * addr, if (format != GUS_PATCH) { printk ("GUS Error: Invalid patch format (key) 0x%04x\n", format); -#ifndef CPU_I486 - if (format == OBSOLETE_GUS_PATCH) - printk ("GUS Error: obsolete patch format\n"); -#endif return RET_ERROR (EINVAL); } diff --git a/sys/i386/isa/sound/midi.c b/sys/i386/isa/sound/midi.c index 83088d2..8d604a8 100644 --- a/sys/i386/isa/sound/midi.c +++ b/sys/i386/isa/sound/midi.c @@ -1,4 +1,28 @@ -/* UWM - comments to soft-eng@cs.uwm.edu */ +/* + * Copyright by UWM - comments to soft-eng@cs.uwm.edu + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ #define _MIDI_TABLE_C_ #include "sound_config.h" diff --git a/sys/i386/isa/sound/midibuf.c b/sys/i386/isa/sound/midibuf.c index ca1bdf7..0196f84 100644 --- a/sys/i386/isa/sound/midibuf.c +++ b/sys/i386/isa/sound/midibuf.c @@ -5,10 +5,28 @@ * * NOTE! This part of the driver is currently just a stub. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * - * Based on the Midi driver for bsd386 by Mike Durian. */ #include "sound_config.h" @@ -39,7 +57,7 @@ MIDIbuf_open (int dev, struct fileinfo *file) return RET_ERROR (ENXIO); } - if ((err = midi_devs[mpu401_dev]->open (mpu401_dev, mode)) < 0) + if ((err = midi_devs[mpu401_dev]->open (mpu401_dev, mode, NULL, NULL)) < 0) return err; midibuf_busy = 1; diff --git a/sys/i386/isa/sound/mpu401.c b/sys/i386/isa/sound/mpu401.c index f948510..9dd5cb2 100644 --- a/sys/i386/isa/sound/mpu401.c +++ b/sys/i386/isa/sound/mpu401.c @@ -5,8 +5,28 @@ * * This version supports just the DUMB UART mode. * - * (C) 1993 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" @@ -39,6 +59,7 @@ static int mpu401_detected = 0; static int my_dev; static int reset_mpu401 (void); +static void (*midi_input_intr) (int dev, unsigned char data); static void mpu401_input_loop (void) @@ -55,7 +76,7 @@ mpu401_input_loop (void) count = 100; if (mpu401_opened & OPEN_READ) - sequencer_midi_input (my_dev, c); + midi_input_intr (my_dev, c); } else while (!input_avail () && count) @@ -65,8 +86,6 @@ mpu401_input_loop (void) void mpuintr (int unit) { - unsigned char c; - if (input_avail ()) mpu401_input_loop (); } @@ -141,7 +160,10 @@ set_mpu401_irq (int interrupt_level) } static int -mpu401_open (int dev, int mode) +mpu401_open (int dev, int mode, + void (*input) (int dev, unsigned char data), + void (*output) (int dev) +) { if (mpu401_opened) { @@ -151,6 +173,7 @@ mpu401_open (int dev, int mode) mpu401_input_loop (); + midi_input_intr = input; mpu401_opened = mode; poll_mpu401 (0); /* Enable input polling */ diff --git a/sys/i386/isa/sound/opl3.c b/sys/i386/isa/sound/opl3.c index a9ef7cb..2dbed1f 100644 --- a/sys/i386/isa/sound/opl3.c +++ b/sys/i386/isa/sound/opl3.c @@ -3,8 +3,28 @@ * * A low level driver for Yamaha YM3812 and OPL-3 -chips * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ /* Major improvements to the FM handling 30AUG92 by Rob Hooft, */ @@ -405,7 +425,7 @@ set_voice_volume (int voice, int volume) static int opl3_start_note (int dev, int voice, int note, int volume) { - unsigned char data; + unsigned char data, fpc; int block, fnum, freq, voice_mode; struct sbi_instrument *instr; struct physical_voice_info *map; @@ -491,8 +511,11 @@ opl3_start_note (int dev, int voice, int note, int volume) opl3_command (map->ioaddr, WAVE_SELECT + map->op[1], instr->operators[9]); /* Set Feedback/Connection */ - /* Connect the voice to both stereo channels */ - opl3_command (map->ioaddr, FEEDBACK_CONNECTION + map->voice_num, instr->operators[10] | 0x30); + fpc = instr->operators[10]; + if (!(fpc & 0x30)) + fpc |= 0x30; /* Ensure that at least one chn is enabled */ + opl3_command (map->ioaddr, FEEDBACK_CONNECTION + map->voice_num, + fpc); /* * If the voice is a 4 OP one, initialize the operators 3 and 4 also @@ -518,8 +541,10 @@ opl3_start_note (int dev, int voice, int note, int volume) opl3_command (map->ioaddr, WAVE_SELECT + map->op[3], instr->operators[OFFS_4OP + 9]); /* Set Feedback/Connection */ - /* Connect the voice to both stereo channels */ - opl3_command (map->ioaddr, FEEDBACK_CONNECTION + map->voice_num + 3, instr->operators[OFFS_4OP + 10] | 0x30); + fpc = instr->operators[OFFS_4OP + 10]; + if (!(fpc & 0x30)) + fpc |= 0x30; /* Ensure that at least one chn is enabled */ + opl3_command (map->ioaddr, FEEDBACK_CONNECTION + map->voice_num + 3, fpc); } voices[voice].mode = voice_mode; @@ -905,8 +930,6 @@ opl3_init (long mem_start) for (i = 0; i < SBFM_MAXINSTR; i++) instrmap[i].channel = -1; - printk("\n"); - return mem_start; } diff --git a/sys/i386/isa/sound/opl3.h b/sys/i386/isa/sound/opl3.h index b577af7..ea7901f 100644 --- a/sys/i386/isa/sound/opl3.h +++ b/sys/i386/isa/sound/opl3.h @@ -1,9 +1,6 @@ /* * opl3.h - Definitions of the OPL-3 registers * - */ - -/* * Copyright by Hannu Savolainen 1993 * * Redistribution and use in source and binary forms, with or without @@ -15,10 +12,10 @@ * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * - * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) diff --git a/sys/i386/isa/sound/os.h b/sys/i386/isa/sound/os.h index 2ea9e5a..38e9f3c 100644 --- a/sys/i386/isa/sound/os.h +++ b/sys/i386/isa/sound/os.h @@ -3,7 +3,30 @@ /* * OS specific settings for FreeBSD * - * This chould be used as an example when porting the driver to a new + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * This should be used as an example when porting the driver to a new * operating systems. * * What you should do is to rewrite the soundcard.c and os.h (this file). diff --git a/sys/i386/isa/sound/pas2_card.c b/sys/i386/isa/sound/pas2_card.c index a341273..e5a2f1f 100644 --- a/sys/i386/isa/sound/pas2_card.c +++ b/sys/i386/isa/sound/pas2_card.c @@ -5,9 +5,28 @@ * * Detection routine for the Pro Audio Spectrum cards. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) Craig Metz - * (cmetz@thor.tjhsst.edu) See COPYING for further details. Should be - * distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" @@ -330,7 +349,7 @@ attach_pas_card (long mem_start, struct address_info *hw_config) } } - printk("\n"); + printk ("\n"); return mem_start; } diff --git a/sys/i386/isa/sound/pas2_midi.c b/sys/i386/isa/sound/pas2_midi.c index a5fd604..1a60590 100644 --- a/sys/i386/isa/sound/pas2_midi.c +++ b/sys/i386/isa/sound/pas2_midi.c @@ -3,8 +3,28 @@ * * The low level driver for the PAS Midi Interface. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" @@ -13,7 +33,7 @@ #include "pas.h" -#if !defined(EXCLUDE_PAS) && !defined(EXCLUDE_MIDI) && defined(EXCLUDE_PRO_MIDI) +#if !defined(EXCLUDE_PAS) && !defined(EXCLUDE_MIDI) && defined(EXCLUDE_PRO_MIDI) static int midi_busy = 0, input_opened = 0; static int my_dev; @@ -23,8 +43,13 @@ static unsigned char tmp_queue[256]; static volatile int qlen; static volatile unsigned char qhead, qtail; +static void (*midi_input_intr) (int dev, unsigned char data); + static int -pas_midi_open (int dev, int mode) +pas_midi_open (int dev, int mode, + void (*input) (int dev, unsigned char data), + void (*output) (int dev) +) { int err; unsigned long flags; @@ -50,6 +75,7 @@ pas_midi_open (int dev, int mode) ctrl = 0; input_opened = 0; + midi_input_intr = input; if (mode == OPEN_READ || mode == OPEN_READWRITE) { @@ -224,7 +250,7 @@ pas_midi_interrupt (void) for (i = 0; i < incount; i++) if (input_opened) { - sequencer_midi_input (my_dev, pas_read (MIDI_DATA)); + midi_input_intr (my_dev, pas_read (MIDI_DATA)); } else pas_read (MIDI_DATA); /* Flush */ diff --git a/sys/i386/isa/sound/pas2_mixer.c b/sys/i386/isa/sound/pas2_mixer.c index 3aa2072..33135d2 100644 --- a/sys/i386/isa/sound/pas2_mixer.c +++ b/sys/i386/isa/sound/pas2_mixer.c @@ -5,9 +5,28 @@ * * Mixer routines for the Pro Audio Spectrum cards. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) Craig Metz - * (cmetz@thor.tjhsst.edu) See COPYING for further details. Should be - * distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" diff --git a/sys/i386/isa/sound/pas2_pcm.c b/sys/i386/isa/sound/pas2_pcm.c index f4634c5..878de5a 100644 --- a/sys/i386/isa/sound/pas2_pcm.c +++ b/sys/i386/isa/sound/pas2_pcm.c @@ -4,9 +4,28 @@ * * The low level driver for the Pro Audio Spectrum ADC/DAC. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) Craig Metz - * (cmetz@thor.tjhsst.edu) See COPYING for further details. Should be - * distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" diff --git a/sys/i386/isa/sound/patmgr.c b/sys/i386/isa/sound/patmgr.c index 48c1004..140a428 100644 --- a/sys/i386/isa/sound/patmgr.c +++ b/sys/i386/isa/sound/patmgr.c @@ -3,8 +3,28 @@ * * The patch maneger interface for the /dev/sequencer * - * (C) 1993 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #define PATMGR_C diff --git a/sys/i386/isa/sound/pro_midi.c b/sys/i386/isa/sound/pro_midi.c index b7f6b9a..606657d 100644 --- a/sys/i386/isa/sound/pro_midi.c +++ b/sys/i386/isa/sound/pro_midi.c @@ -1,4 +1,28 @@ -/* UWM -- comments to soft-eng@cs.uwm.edu */ +/* + * Copyright by UWM -- comments to soft-eng@cs.uwm.edu + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ #define ALL_EXTERNAL_TO_ME #include "sound_config.h" diff --git a/sys/i386/isa/sound/sb_card.c b/sys/i386/isa/sound/sb_card.c index b9d0701..e2527c5 100644 --- a/sys/i386/isa/sound/sb_card.c +++ b/sys/i386/isa/sound/sb_card.c @@ -4,8 +4,28 @@ * * Detection routine for the SoundBlaster cards. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" diff --git a/sys/i386/isa/sound/sb_dsp.c b/sys/i386/isa/sound/sb_dsp.c index 965922f..3802d88 100644 --- a/sys/i386/isa/sound/sb_dsp.c +++ b/sys/i386/isa/sound/sb_dsp.c @@ -3,8 +3,27 @@ * * The low level driver for the SoundBlaster DS chips. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. * * The mixer support is based on the SB-BSD 1.5 driver by (C) Steve Haehnichen * <shaehnic@ucsd.edu> @@ -1021,7 +1040,10 @@ sb_mixer_ioctl (int dev, unsigned int cmd, unsigned int arg) /* Midi code */ static int -sb_midi_open (int dev, int mode) +sb_midi_open (int dev, int mode, + void (*input) (int dev, unsigned char data), + void (*output) (int dev) +) { int ret; @@ -1033,7 +1055,8 @@ sb_midi_open (int dev, int mode) if (mode != OPEN_WRITE && !duplex_midi) { - printk ("SoundBlaster: Midi input not currently supported\n"); + if (num_midis == 1) + printk ("SoundBlaster: Midi input not currently supported\n"); return RET_ERROR (EPERM); } @@ -1290,7 +1313,6 @@ sb_dsp_init (long mem_start, struct address_info *hw_config) #endif sb_dsp_ok = 1; - printk("\n"); return mem_start; } diff --git a/sys/i386/isa/sound/sequencer.c b/sys/i386/isa/sound/sequencer.c index 2d4ef37..7df0812 100644 --- a/sys/i386/isa/sound/sequencer.c +++ b/sys/i386/isa/sound/sequencer.c @@ -3,8 +3,28 @@ * * The sequencer personality manager. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) See COPYING for further - * details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. 2. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #define SEQUENCER_C @@ -80,7 +100,7 @@ sequencer_read (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) return count - c; } -void +static void sequencer_midi_output (int dev) { /* Currently NOP */ @@ -106,7 +126,7 @@ copy_to_input (unsigned char *event) RESTORE_INTR (flags); } -void +static void sequencer_midi_input (int dev, unsigned char data) { int tstamp; @@ -205,7 +225,8 @@ sequencer_write (int dev, struct fileinfo *file, snd_rw_buf * buf, int count) mode = file->mode & O_ACCMODE; - if ((err = midi_devs[dev]->open (dev, mode)) < 0) + if ((err = midi_devs[dev]->open (dev, mode, + sequencer_midi_input, sequencer_midi_output)) < 0) { seq_reset (); printk ("Sequencer Error: Unable to open Midi #%d\n", dev); @@ -504,7 +525,8 @@ sequencer_open (int dev, struct fileinfo *file) for (i = 0; i < num_midis; i++) { - if ((retval = midi_devs[i]->open (i, mode)) >= 0) + if ((retval = midi_devs[i]->open (i, mode, + sequencer_midi_input, sequencer_midi_output)) >= 0) midi_opened[i] = 1; } } @@ -724,7 +746,9 @@ sequencer_ioctl (int dev, struct fileinfo *file, int err, mode; mode = file->mode & O_ACCMODE; - if ((err = midi_devs[midi_dev]->open (midi_dev, mode)) < 0) + if ((err = midi_devs[midi_dev]->open (midi_dev, mode, + sequencer_midi_input, + sequencer_midi_output)) < 0) return err; } @@ -1114,18 +1138,6 @@ sequencer_init (long mem_start) return mem_start; } -void -sequencer_midi_input (int dev, unsigned char data) -{ - return; -} - -void -sequencer_midi_output (int dev) -{ - return; -} - int sequencer_select (int dev, struct fileinfo *file, int sel_type, select_table * wait) { diff --git a/sys/i386/isa/sound/sound_calls.h b/sys/i386/isa/sound/sound_calls.h index fdf1fe1..89bd796 100644 --- a/sys/i386/isa/sound/sound_calls.h +++ b/sys/i386/isa/sound/sound_calls.h @@ -56,8 +56,6 @@ int sequencer_ioctl (int dev, struct fileinfo *file, unsigned int cmd, unsigned int arg); int sequencer_lseek (int dev, struct fileinfo *file, off_t offset, int orig); long sequencer_init (long mem_start); -void sequencer_midi_input(int dev, unsigned char data); -void sequencer_midi_output(int dev); void sequencer_timer(void); int note_to_freq(int note_num); unsigned long compute_finetune(unsigned long base_freq, int bend, int range); @@ -101,8 +99,8 @@ int CMIDI_close (int dev, struct fileinfo *file); long pro_midi_attach(long mem_start); int pro_midi_open(int dev, int mode); void pro_midi_close(int dev); -int pro_midi_write(int dev, struct uio *uio); -int pro_midi_read(int dev, struct uio *uio); +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); diff --git a/sys/i386/isa/sound/sound_config.h b/sys/i386/isa/sound/sound_config.h index 09d36e5..395e5f1 100644 --- a/sys/i386/isa/sound/sound_config.h +++ b/sys/i386/isa/sound/sound_config.h @@ -1,8 +1,32 @@ -/* linux/kernel/chr_drv/sound/sound-config.h - -A driver for Soundcards, misc configuration parameters. - -(C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) */ +/* sound_config.h + * + * A driver for Soundcards, misc configuration parameters. + * + * + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + */ #include "local.h" @@ -116,7 +140,7 @@ If your card has nonstandard I/O address or IRQ number, change defines /* SEQ_MAX_QUEUE is the maximum number of sequencer events buffered by the driver. (There is no need to alter this) */ -#define SEQ_MAX_QUEUE 512 +#define SEQ_MAX_QUEUE 1024 #define SBFM_MAXINSTR (256) /* Size of the FM Instrument bank */ @@ -137,6 +161,7 @@ If your card has nonstandard I/O address or IRQ number, change defines * Also do not forget to add table midi_supported[] * Minor numbers for on-chip midi devices start from 15.. and * should be contiguous.. viz. 15,16,17.... + * ERROR!!!!!!!!! NO NO. Minor numbers above 15 are reserved!!!!!! Hannu * Also note the max # of midi devices as MAX_MIDI_DEV */ @@ -177,6 +202,9 @@ struct address_info { #include "os.h" #include "sound_calls.h" #include "dev_table.h" -#include "debug.h" + +#ifndef DEB +#define DEB(x) +#endif #endif diff --git a/sys/i386/isa/sound/soundcard.c b/sys/i386/isa/sound/soundcard.c index a0ded01..7a20f3d 100644 --- a/sys/i386/isa/sound/soundcard.c +++ b/sys/i386/isa/sound/soundcard.c @@ -1,10 +1,31 @@ /* * sound/386bsd/soundcard.c * - * Soundcard driver for 386BSD. + * Soundcard driver for FreeBSD. * - * (C) 1992 Hannu Savolainen (hsavolai@cs.helsinki.fi) - * See COPYING for further details. Should be distributed with this file. + * Copyright by Hannu Savolainen 1993 + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * */ #include "sound_config.h" @@ -72,7 +93,7 @@ sndread (int dev, struct uio *buf) DEB (printk ("sound_read(dev=%d, count=%d)\n", dev, count)); - switch (dev & 0xff) /* Changed to 0xff from 0x0f */ + switch (dev & 0x0f) /* It really has to be 0x0f */ { case SND_DEV_AUDIO: FIX_RETURN (audio_read (dev, &files[dev], buf, count)); @@ -116,7 +137,7 @@ sndwrite (int dev, struct uio *buf) dev = minor (dev); - switch (dev & 0xff) /* Changed to 0xff from 0x0f */ + switch (dev & 0x0f) /* It really has to be 0x0f */ { case SND_DEV_SEQ: @@ -177,7 +198,7 @@ sndopen (dev_t dev, int flags) else if (flags & FWRITE) files[dev].mode = OPEN_WRITE; - switch (dev & 0xff) /* Changed to 0xff from 0x0f */ + switch (dev & 0x0f) /* It has to be 0x0f. Trust me */ { case SND_DEV_CTL: if (!soundcards_installed) @@ -243,7 +264,7 @@ sndclose (dev_t dev, int flags) DEB (printk ("sound_release(dev=%d)\n", dev)); - switch (dev & 0xff) /* Changed to 0xff from 0x0f */ + switch (dev & 0x0f) /* Has to be 0x0f */ { case SND_DEV_SEQ: sequencer_release (dev, &files[dev]); @@ -337,7 +358,7 @@ sndselect (int dev, int rw) } static short -ipri_to_irq (short ipri) +ipri_to_irq (unsigned short ipri) { /* * Converts the ipri (bitmask) to the corresponding irq number @@ -396,6 +417,8 @@ sndattach (struct isa_device *dev) return FALSE; /* No cards detected */ } + printf("\n"); + #ifndef EXCLUDE_AUDIO soundcard_configured = 1; if (num_dspdevs) @@ -511,7 +534,7 @@ sound_mem_init (void) if (sound_dma_automode[dev]) { - sound_dma_automode[dev] = 0; /* Not possible with 386BSD */ + sound_dma_automode[dev] = 0; /* Not possible with FreeBSD */ } if (sound_buffcounts[dev] == 1) |