Subject: kern/10030: Audio driver for Creative Music System
To: None <gnats-bugs@gnats.netbsd.org>
From: None <g.mcgarry@ieee.org>
List: netbsd-bugs
Date: 05/01/2000 15:14:14
>Number: 10030
>Category: kern
>Synopsis: Audio driver for Creative Music System
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people
>State: open
>Class: support
>Submitter-Id: net
>Arrival-Date: Mon May 01 15:15:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator: Gregory McGarry
>Release: 1.4X
>Organization:
>Environment:
NetBSD/i386
>Description:
Audio driver for Creative Music System (CMS)
>How-To-Repeat:
>Fix:
*** files.isa.orig Sat Apr 29 13:17:23 2000
--- files.isa Sat Apr 29 13:16:54 2000
***************
*** 369,374 ****
--- 369,379 ----
attach aria at isa
file dev/isa/aria.c aria needs-flag
+ # Creative Music System (CMS)
+ device cms: midibus
+ attach cms at isa
+ file dev/isa/cms.c cms needs-flag
+
#
# PlanetConnect satellite receiver driver.
#
*** /dev/null Sun Apr 23 06:54:52 2000
--- cms.c Sat Apr 29 12:59:01 2000
***************
*** 0 ****
--- 1,345 ----
+ /* $NetBSD$ */
+
+ /*
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 "cms.h"
+ #if NCMS > 0
+
+ #include <sys/param.h>
+ #include <sys/systm.h>
+ #include <sys/kernel.h>
+ #include <sys/device.h>
+ #include <sys/select.h>
+
+ #include <machine/bus.h>
+
+ #include <sys/audioio.h>
+ #include <dev/audio_if.h>
+ #include <dev/audiovar.h>
+
+ #include <sys/midiio.h>
+ #include <dev/midi_if.h>
+ #include <dev/midivar.h>
+ #include <dev/midisynvar.h>
+
+ #include <dev/isa/isareg.h>
+ #include <dev/isa/isavar.h>
+ #include <dev/isa/cmsreg.h>
+
+ #ifdef AUDIO_DEBUG
+ #define DPRINTF(x) if (cmsdebug) printf x
+ int cmsdebug = 0;
+ #else
+ #define DPRINTF(x)
+ #endif
+
+ struct cms_softc {
+ struct midi_softc sc_mididev;
+
+ bus_space_tag_t sc_iot;
+ bus_space_handle_t sc_ioh;
+
+ /* shadow registers for each chip */
+ u_int8_t sc_shadowregs[32*2];
+ midisyn sc_midisyn;
+ };
+
+ int cms_probe __P((struct device *, struct cfdata *, void *));
+ void cms_attach __P((struct device *, struct device *, void *));
+
+ struct cfattach cms_ca = {
+ sizeof(struct cms_softc), cms_probe, cms_attach,
+ };
+
+ int cms_open __P((midisyn *, int));
+ void cms_close __P((midisyn *));
+ void cms_on __P((midisyn *, u_int32_t, u_int32_t, u_int32_t));
+ void cms_off __P((midisyn *, u_int32_t, u_int32_t, u_int32_t));
+
+ struct midisyn_methods midi_cms_hw = {
+ cms_open, /* open */
+ cms_close, /* close */
+ 0, /* ioctl */
+ 0, /* allocv */
+ cms_on, /* noteon */
+ cms_off, /* noteoff */
+ 0, /* keypres */
+ 0, /* ctlchg */
+ 0, /* pgmchg */
+ 0, /* chnpres */
+ 0, /* pitchb */
+ 0, /* sysex */
+ };
+
+ static void cms_reset __P((struct cms_softc *));
+
+ static char cms_note_table[] = {
+ /* A */ 3,
+ /* A# */ 31,
+ /* B */ 58,
+ /* C */ 83,
+ /* C# */ 107,
+ /* D */ 130,
+ /* D# */ 151,
+ /* E */ 172,
+ /* F */ 191,
+ /* F# */ 209,
+ /* G */ 226,
+ /* G# */ 242,
+ };
+
+ #define NOTE_TO_OCTAVE(note) (((note)-CMS_FIRST_NOTE)/12)
+ #define NOTE_TO_COUNT(note) cms_note_table[(((note)-CMS_FIRST_NOTE)%12)]
+
+ int
+ cms_probe(parent, match, aux)
+ struct device *parent;
+ struct cfdata *match;
+ void *aux;
+ {
+ struct isa_attach_args *ia = aux;
+ bus_space_tag_t iot;
+ bus_space_handle_t ioh;
+ int found = 0;
+ int i;
+
+ DPRINTF(("cms_probe():\n"));
+
+ iot = ia->ia_iot;
+
+ if (ia->ia_iobase == IOBASEUNK)
+ return 0;
+
+ if (bus_space_map(iot, ia->ia_iobase, CMS_IOSIZE, 0, &ioh))
+ return 0;
+
+ bus_space_write_1(iot, ioh, CMS_WREG, 0xaa);
+ if (bus_space_read_1(iot, ioh, CMS_RREG) != 0xaa)
+ goto out;
+
+ for (i=0; i<8; i++) {
+ if (bus_space_read_1(iot, ioh, CMS_MREG) != 0x7f)
+ goto out;
+ }
+ found = 1;
+
+ ia->ia_iosize = CMS_IOSIZE;
+
+ out:
+ bus_space_unmap(iot, ioh, CMS_IOSIZE);
+
+ return found;
+ }
+
+
+ void
+ cms_attach(parent, self, aux)
+ struct device *parent, *self;
+ void *aux;
+ {
+ struct cms_softc *sc = (struct cms_softc *)self;
+ struct isa_attach_args *ia = aux;
+ bus_space_tag_t iot;
+ bus_space_handle_t ioh;
+ midisyn *ms;
+ struct audio_attach_args arg;
+
+ printf("\n");
+
+ DPRINTF(("cms_attach():\n"));
+
+ iot = ia->ia_iot;
+
+ if (bus_space_map(iot, ia->ia_iobase, CMS_IOSIZE, 0, &ioh)) {
+ printf(": can't map i/o space\n");
+ return;
+ }
+
+ sc->sc_iot = iot;
+ sc->sc_ioh = ioh;
+
+ /* now let's reset the chips */
+ cms_reset(sc);
+
+ ms = &sc->sc_midisyn;
+ ms->mets = &midi_cms_hw;
+ strcpy(ms->name, "Creative Music System");
+ ms->nvoice = CMS_NVOICES;
+ ms->flags = MS_DOALLOC;
+ ms->data = sc;
+
+ /* use the synthesiser */
+ midisyn_attach(&sc->sc_mididev, ms);
+
+ /* now attach the midi device to the synthesiser */
+ arg.type = AUDIODEV_TYPE_MIDI;
+ arg.hwif = sc->sc_mididev.hw_if;
+ arg.hdl = sc->sc_mididev.hw_hdl;
+ config_found((struct device *)&sc->sc_mididev, &arg, 0);
+ }
+
+
+ int
+ cms_open(ms,flag)
+ midisyn *ms;
+ int flag;
+ {
+ struct cms_softc *sc = (struct cms_softc *)ms->data;
+
+ cms_reset(sc);
+
+ return 0;
+ }
+
+ void
+ cms_close(ms)
+ midisyn *ms;
+ {
+ struct cms_softc *sc = (struct cms_softc *)ms->data;
+
+ cms_reset(sc);
+ }
+
+ void
+ cms_on(ms, chan, note, vel)
+ midisyn *ms;
+ u_int32_t chan;
+ u_int32_t note;
+ u_int32_t vel;
+ {
+ struct cms_softc *sc = (struct cms_softc *)ms->data;
+ int chip = CHAN_TO_CHIP(chan);
+ int voice = CHAN_TO_VOICE(chan);
+ u_int8_t octave;
+ u_int8_t count;
+ u_int8_t reg;
+ u_int8_t vol;
+
+ if (note < CMS_FIRST_NOTE)
+ return;
+
+ octave = NOTE_TO_OCTAVE(note);
+ count = NOTE_TO_COUNT(note);
+
+ DPRINTF(("chip=%d voice=%d octave=%d count=%d offset=%d shift=%d\n",
+ chip, voice, octave, count, OCTAVE_OFFSET(voice),
+ OCTAVE_SHIFT(voice)));
+
+ /* write the count */
+ CMS_WRITE(sc, chip, CMS_IREG_FREQ0 + voice, count);
+
+ /* select the octave */
+ reg = CMS_READ(sc, chip, CMS_IREG_OCTAVE_1_0 + OCTAVE_OFFSET(voice));
+ reg &= ~(0x0f<<OCTAVE_SHIFT(voice));
+ reg |= ((octave&0x7)<<OCTAVE_SHIFT(voice));
+ CMS_WRITE(sc, chip, CMS_IREG_OCTAVE_1_0 + OCTAVE_OFFSET(voice), reg);
+
+ /* set the volume */
+ vol = (vel>>3)&0x0f;
+ CMS_WRITE(sc, chip, CMS_IREG_VOL0 + voice, ((vol<<4)|vol));
+
+ /* enable the voice */
+ reg = CMS_READ(sc, chip, CMS_IREG_FREQ_CTL);
+ reg |= (1<<voice);
+ CMS_WRITE(sc, chip, CMS_IREG_FREQ_CTL, reg);
+ }
+
+ void
+ cms_off(ms, chan, note, vel)
+ midisyn *ms;
+ u_int32_t chan;
+ u_int32_t note;
+ u_int32_t vel;
+ {
+ struct cms_softc *sc = (struct cms_softc *)ms->data;
+ int chip = CHAN_TO_CHIP(chan);
+ int voice = CHAN_TO_VOICE(chan);
+ u_int8_t reg;
+
+ if (note < CMS_FIRST_NOTE)
+ return;
+
+ /* disable the channel */
+ reg = CMS_READ(sc, chip, CMS_IREG_FREQ_CTL);
+ reg &= ~(1<<voice);
+ CMS_WRITE(sc, chip, CMS_IREG_FREQ_CTL, reg);
+ }
+
+ static void
+ cms_reset(sc)
+ struct cms_softc *sc;
+ {
+ int i;
+
+ DPRINTF(("cms_reset():\n"));
+
+ for (i=0; i<6; i++) {
+ CMS_WRITE(sc, 0, CMS_IREG_VOL0+i, 0x00);
+ CMS_WRITE(sc, 1, CMS_IREG_VOL0+i, 0x00);
+
+ CMS_WRITE(sc, 0, CMS_IREG_FREQ0+i, 0x00);
+ CMS_WRITE(sc, 1, CMS_IREG_FREQ0+i, 0x00);
+ }
+
+ for (i=0; i<3; i++) {
+ CMS_WRITE(sc, 0, CMS_IREG_OCTAVE_1_0+i, 0x00);
+ CMS_WRITE(sc, 1, CMS_IREG_OCTAVE_1_0+i, 0x00);
+ }
+
+ CMS_WRITE(sc, 0, CMS_IREG_FREQ_CTL, 0x00);
+ CMS_WRITE(sc, 1, CMS_IREG_FREQ_CTL, 0x00);
+
+ CMS_WRITE(sc, 0, CMS_IREG_NOISE_CTL, 0x00);
+ CMS_WRITE(sc, 1, CMS_IREG_NOISE_CTL, 0x00);
+
+ CMS_WRITE(sc, 0, CMS_IREG_NOISE_BW, 0x00);
+ CMS_WRITE(sc, 1, CMS_IREG_NOISE_BW, 0x00);
+
+ /*
+ * These registers don't appear to be useful, but must be
+ * cleared otherwise certain voices don't work properly
+ */
+ CMS_WRITE(sc, 0, 0x18, 0x00);
+ CMS_WRITE(sc, 1, 0x18, 0x00);
+ CMS_WRITE(sc, 0, 0x19, 0x00);
+ CMS_WRITE(sc, 1, 0x19, 0x00);
+
+ CMS_WRITE(sc, 0, CMS_IREG_SYS_CTL, CMS_IREG_SYS_RESET);
+ CMS_WRITE(sc, 1, CMS_IREG_SYS_CTL, CMS_IREG_SYS_RESET);
+
+ CMS_WRITE(sc, 0, CMS_IREG_SYS_CTL, CMS_IREG_SYS_ENBL);
+ CMS_WRITE(sc, 1, CMS_IREG_SYS_CTL, CMS_IREG_SYS_ENBL);
+ }
+
+ #endif
*** /dev/null Sun Apr 23 06:54:52 2000
--- cmsreg.h Sat Apr 29 12:56:13 2000
***************
*** 0 ****
--- 1,143 ----
+ /* $NetBSD$ */
+
+ /*
+ * Copyright (c) 2000 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * 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.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the NetBSD
+ * Foundation, Inc. and its contributors.
+ * 4. Neither the name of The NetBSD Foundation nor the names of its
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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 CMS_NVOICES 12
+ #define CMS_FIRST_NOTE 30
+
+ /* direct registers */
+
+ #define CMS_DATA0 0x00 /* for chip 0, voices 0-5 */
+ #define CMS_ADDR0 0x01
+
+ #define CMS_DATA1 0x02 /* for chip 1, voices 6-11 */
+ #define CMS_ADDR1 0x03
+
+ #define CMS_MREG 0x04 /* always returns 0x7f */
+ #define CMS_WREG 0x07 /* writable register */
+ #define CMS_RREG 0x0b /* readable register */
+
+ #define CMS_IOSIZE 16
+
+ /* Note that for each register, if ports CMS_DATA1/CMS_ADDR1 are used
+ * then the first voice is modified. If ports CMS_DATA2/CMS_ADDR2 are
+ * used then the second voice is modified. */
+
+ /* Each voice can have a volume between 0 and 15 on both left and
+ * right channels. The high-order nibble is the right channel volume,
+ * and the low-order nibble is the left channel volume. */
+
+ #define CMS_IREG_VOL0 0x00
+ #define CMS_IREG_VOL1 0x01
+ #define CMS_IREG_VOL2 0x02
+ #define CMS_IREG_VOL3 0x03
+ #define CMS_IREG_VOL4 0x04
+ #define CMS_IREG_VOL5 0x05
+
+ /* Frequency registers */
+ #define CMS_IREG_FREQ0 0x08
+ #define CMS_IREG_FREQ1 0x09
+ #define CMS_IREG_FREQ2 0x0a
+ #define CMS_IREG_FREQ3 0x0b
+ #define CMS_IREG_FREQ4 0x0c
+ #define CMS_IREG_FREQ5 0x0d
+
+ /* Octave Registers: To get tones in higher octaves the octave
+ * register for the voice must be set. Each octave register stores
+ * the octave number for two voices. The high-order nibble is for
+ * first voice and the low-order nibble is for the second voice. */
+
+ #define CMS_IREG_OCTAVE_1_0 0x10
+ #define CMS_IREG_OCTAVE_3_2 0x11
+ #define CMS_IREG_OCTAVE_5_4 0x12
+
+ #define CMS_IREG_FREQ_CTL 0x14 /* voice frequencies */
+ #define CMS_IREG_FREQ_ENBL0 0x01 /* setting the bit enables the voice */
+ #define CMS_IREG_FREQ_ENBL1 0x02 /* clearing the bit disables the voice */
+ #define CMS_IREG_FREQ_ENBL2 0x04
+ #define CMS_IREG_FREQ_ENBL3 0x08
+ #define CMS_IREG_FREQ_ENBL4 0x10
+ #define CMS_IREG_FREQ_ENBL5 0x20
+
+ /* There are 4 noise generators, each noise generator can be connected
+ * up to any of three voices:
+ *
+ * Noise generator 0: connected to voices 0,1,2
+ * 1: connected to voices 3,4,5
+ * 2: connected to voices 6,7,8
+ * 3: connected to voices 0,10,11
+ *
+ * CMS_DATA1/CMS_ADDR1 access noise generators 0 and 1. Each noise
+ * generator has two bits which control the noise generator rate */
+
+ #define CMS_IREG_NOISE_CTL 0x15 /* noises */
+ #define CMS_IREG_NOISE_ENBL0 0x01
+ #define CMS_IREG_NOISE_ENBL1 0x02
+ #define CMS_IREG_NOISE_ENBL2 0x04
+ #define CMS_IREG_NOISE_ENBL3 0x08
+ #define CMS_IREG_NOISE_ENBL4 0x10
+ #define CMS_IREG_NOISE_ENBL5 0x20
+
+ #define CMS_IREG_NOISE_BW 0x16
+ #define CMS_IREG_NOISE_MASK0 0x03 /* bits for noise generator 0 */
+ #define CMS_IREG_NOISE_MASK1 0x30 /* bits for noise generator 1 */
+ /* the bits in the mask have the following meaning */
+ #define CMS_IREG_NOISE_MASK_28k 0 /* 28kHz */
+ #define CMS_IREG_NOISE_MASK_14k 1 /* 14kHz */
+ #define CMS_IREG_NOISE_MASK_7k 2 /* 6.8kHz */
+
+ #define CMS_IREG_SYS_CTL 0x1c
+ #define CMS_IREG_SYS_ENBL 0x01 /* enable all channels */
+ #define CMS_IREG_SYS_RESET 0x02 /* reset and synchronise generators */
+
+
+ /*
+ * Some useful macros
+ */
+
+ #define CMS_WRITE(sc, chip, reg, val) \
+ do { \
+ (sc)->sc_shadowregs[((chip)<<5) + (reg)] = val; \
+ bus_space_write_1((sc)->sc_iot, (sc)->sc_ioh, \
+ CMS_ADDR0 + ((chip)<<1), (reg)); \
+ bus_space_write_1((sc)->sc_iot, (sc)->sc_ioh, \
+ CMS_DATA0 + ((chip)<<1), (val)); \
+ } while (0)
+
+ #define CMS_READ(sc, chip, reg) ((sc)->sc_shadowregs[((chip)<<5) + (reg)])
+
+ #define CHAN_TO_CHIP(chan) ((chan)>5)
+ #define CHAN_TO_VOICE(chan) ((chan)%6)
+ #define OCTAVE_OFFSET(voice) ((voice)>>1)
+ #define OCTAVE_SHIFT(voice) (((voice)&1)<<2)
*** /dev/null Sun Apr 23 06:54:52 2000
--- cms.4 Sat Apr 29 13:15:06 2000
***************
*** 0 ****
--- 1,67 ----
+ .\" $NetBSD$
+ .\"
+ .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
+ .\" All rights reserved.
+ .\"
+ .\" 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.
+ .\" 3. All advertising materials mentioning features or use of this software
+ .\" must display the following acknowledgement:
+ .\" This product includes software developed by the NetBSD
+ .\" Foundation, Inc. and its contributors.
+ .\" 4. Neither the name of The NetBSD Foundation nor the names of its
+ .\" contributors may be used to endorse or promote products derived
+ .\" from this software without specific prior written permission.
+ .\"
+ .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+ .\"
+ .Dd April 28, 2000
+ .Dt CMS 4
+ .Os
+ .Sh NAME
+ .Nm cms
+ .Nd Creative Music System device driver
+ .Sh SYNOPSIS
+ .Cd "cms0 at isa? port 0x220"
+ .Cd "midi* at cms?"
+ .Sh DESCRIPTION
+ The
+ .Nm
+ driver provides support for the Creative Music System (C/MS).
+ These cards were developed by Creative Labs, the same people who
+ designed the SoundBlaster cards. Chips were available for the
+ SoundBlaster to make them compatible with CMS.
+ .Pp
+ The CMS cards are only capable of playing basic notes and noises,
+ making them suitable for playing midi, but not much else. The output
+ is stereo, but the
+ .Nm
+ driver doesn't support stereo control. The cards have external volume
+ control, line-output and speaker.
+ .Pp
+ The base I/O port address is usually jumper-selected to 0x220. Valid
+ jumper settings are for 0x210, 0x220, 0x230, 0x240, 0x250 and 0x260.
+ There are no interrupt settings.
+ .Sh SEE ALSO
+ .Xr midi 4 ,
+ .Sh HISTORY
+ The
+ .Nm
+ device driver appeared in
+ .Nx 1.5 .
>Release-Note:
>Audit-Trail:
>Unformatted: