diff options
author | jkh <jkh@FreeBSD.org> | 1993-10-29 03:44:07 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1993-10-29 03:44:07 +0000 |
commit | ce47804b9f948c7aa8c1d6dc64ae53d8141bcc2b (patch) | |
tree | 5d115e8695930583bb24ce90c651b083cd5bcb9c /sys/i386/isa/sound/soundcard.c | |
parent | 222742d2c29a44c33c79b913956caa3f0abec493 (diff) | |
download | FreeBSD-src-ce47804b9f948c7aa8c1d6dc64ae53d8141bcc2b.zip FreeBSD-src-ce47804b9f948c7aa8c1d6dc64ae53d8141bcc2b.tar.gz |
Update to latest Linux sound driver 2.0
Diffstat (limited to 'sys/i386/isa/sound/soundcard.c')
-rw-r--r-- | sys/i386/isa/sound/soundcard.c | 41 |
1 files changed, 32 insertions, 9 deletions
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) |