Index: stable/2.2/sys/i386/conf/PCCARD =================================================================== --- stable/2.2/sys/i386/conf/PCCARD (nonexistent) +++ stable/2.2/sys/i386/conf/PCCARD (revision 30886) @@ -0,0 +1,113 @@ +# +# PCCARD -- GENERIC laptop support +# +# For more information read the handbook part System Administration -> +# Configuring the FreeBSD Kernel -> The Configuration File. +# The handbook is available in /usr/share/doc/handbook or online as +# latest version from the FreeBSD World Wide Web server +# +# +# An exhaustive list of options and more detailed explanations of the +# device lines is present in the ./LINT configuration file. If you are +# in doubt as to the purpose or necessity of a line, check first in LINT. +# +# $Id$ + +machine "i386" +cpu "I386_CPU" +cpu "I486_CPU" +cpu "I586_CPU" +cpu "I686_CPU" +ident PCCARD +maxusers 10 + +options MATH_EMULATE #Support for x87 emulation +options INET #InterNETworking +options FFS #Berkeley Fast Filesystem +options NFS #Network Filesystem +options MSDOSFS #MSDOS Filesystem +options "CD9660" #ISO 9660 Filesystem +options PROCFS #Process filesystem +options "COMPAT_43" #Compatible with BSD 4.3 [KEEP THIS!] +options SCSI_DELAY=15 #Be pessimistic about Joe SCSI device +options BOUNCE_BUFFERS #include support for DMA bounce buffers +options UCONSOLE #Allow users to grab the console +options FAILSAFE #Be conservative +options USERCONFIG #boot -c editor +options VISUAL_USERCONFIG #visual boot -c editor + +config kernel root on wd0 + +controller isa0 +controller pci0 + +controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr +disk fd0 at fdc0 drive 0 + +options "CMD640" # work around CMD640 chip deficiency +controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr +disk wd0 at wdc0 drive 0 + +controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr + +options ATAPI #Enable ATAPI support for IDE bus +options ATAPI_STATIC #Don't do it as an LKM +device wcd0 #IDE CD-ROM + +controller aic0 at isa? port 0x340 bio irq 11 vector aicintr + +controller scbus0 + +device sd0 + +device od0 #See LINT for possible `od' options. + +device st0 + +device cd0 #Only need one of these, the code dynamically grows + +# syscons is the default console driver, resembling an SCO console +device sc0 at isa? port "IO_KBD" tty irq 1 vector scintr + +device npx0 at isa? port "IO_NPX" irq 13 vector npxintr + +# +# Laptop support (see LINT for more options) +# +device apm0 at isa? flags 0x31 # Advanced Power Management + +# PCCARD (PCMCIA) support +controller card0 +device pcic0 at card? +device pcic1 at card? + +device sio0 at isa? port "IO_COM1" flags 0x10 tty irq 4 vector siointr +device sio1 at isa? port "IO_COM2" tty irq 3 vector siointr +device sio2 at isa? disable port "IO_COM3" tty irq 5 vector siointr +device sio3 at isa? disable port "IO_COM4" tty irq 9 vector siointr + +device lpt0 at isa? port? tty irq 7 vector lptintr + +device psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr + +device ed0 at isa? port 0x280 net irq 10 iomem 0xd8000 vector edintr +device ep0 at isa? port 0x300 net irq 10 vector epintr +device fe0 at isa? port 0x300 net irq ? vector feintr + +pseudo-device loop +pseudo-device ether +pseudo-device sl 1 +# iijppp uses tun instead of ppp device +#pseudo-device ppp 1 +pseudo-device tun 1 +pseudo-device pty 16 +pseudo-device gzip # Exec gzipped a.out's + +# KTRACE enables the system-call tracing facility ktrace(2). +# This adds 4 KB bloat to your kernel, and slightly increases +# the costs of each syscall. +options KTRACE #kernel tracing + +# This provides support for System V shared memory. +# +options SYSVSHM Property changes on: stable/2.2/sys/i386/conf/PCCARD ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/2.2/sys/i386/isa/snd/README =================================================================== --- stable/2.2/sys/i386/isa/snd/README (nonexistent) +++ stable/2.2/sys/i386/isa/snd/README (revision 30886) @@ -0,0 +1,126 @@ + --- A new FreeBSD audio driver --- + by Luigi Rizzo (luigi@iet.unipi.it) + + +This is an experimental version of the audio driver for FreeBSD. +I have almost completely rewritten the main parts of the code, +starting from the Voxware 3.5-alpha release with patches from +Amancio Hasty. The only file which is largely similar to the original +ones is "soundcard.h" (for compatibility reasons, since it contains +the definition of all the ioctls). + +Visit http://www.iet.unipi.it/~luigi/FreeBSD.html for the latest +information on the drivers. There you can obtain the latest source +package that includes documentation on the design of the driver. + + +CARD SUPPORT INFORMATION: + +For PnP cards, I also include the vendor_id and serial numbers of +cards I have encountered. + +CS4236: PnP id 0x3642630e +CS4237: PnP id 0x3742630e + + works like a charm. All modes, including full duplex, supported in + MSS mode. + +CS4232: PnP id 0x3242630e + + this chip is reported as broken in the OSS documentation. As a + matter of fact, on my Intel Zappa motherboard, I have problems in + make it use the secondary DMA channel. I have it working in + half duplex (both capture and playback) in SB3.2 emulation, + and working in playback mode in MSS emulation. + +OPTi931: PnP id 0x3109143e + + The data sheets of this chip are very cryptic and do not match + what the cards I have seem to do. I have it working + in WSS emulation, in full duplex and all modes. + In SB emulation mode the driver does not work yet (maybe I do + not initialize it the right way). It is not a major concern + anyways. + I am strongly convinced of a couple of bugs in the chip. I have + sent email to OPTI but got no reply so far. The bugs are: + - you cannot set both playback and capture format to use + a companded mode (ULAW, ALAW). If you do, the card will screw + up on the capture section. + The driver has a partial fix in software: when using ULAW, it + programs ULAW on the playback section, U8 on the capture, and + does a conversion in software (much like the SBPro). Of course + you lose 4-5 bits of dynamic range in the process. + - in full duplex (and single DMA mode), the card occasionally + misses interrupts, or generates spurious ones. Spurious ints are + not problematic since they can be ignored, but missed ones are + as you can imagine... This is fixed by auto-dma mode. + +SB16 PnP: PnP id 0xXX008c0e + + There are many such cards (plain SB16 PnP, AWE32, AWE64, Vibra16, + etc.) all differing in the PnP id. They have different synthesis + devices, which we do not support, so we are not affected by these + differences. Don't worry if the driver identifies the card as a + different SB16 than the one you have. + + Full duplex support of this card is tricky since one channel can + work in 16-bit and the other in 8-bit mode. You will need to use + the new set of ioctl to use separate data formats on the two + channels (the vat driver does this). Of course, quality in 8-bit + is much lower than in 16-bit. + + Full duplex operation is unsupported by Creative. It seems to + work, although on my Vibra16 the command to stop DMA transfer + seems to erroneously affect both channels instead of the one + they are issued for. The driver has a workaround, but I cannot + guarantee that it works for everybody. I have had several + positive reports. + +Yamaha SA2 + + this card emulates a WSS or SB. Have reports that it works, although + it has mixer problems (maybe the driver has the wrong set of + parameters). + +Ensoniq Soundscape VIVO + + this card emulates a WSS or SB. Have reports that it works. + +GusPnP: PnP id 0x0100561e + + I have code to recognize the board as MSS, but some initializations + of the IW chip is still missing, so the card is not supported yet. + I am working on this problem... + +OPTI924: PnP + + I have this card but it is still unsupported. + +OPTI925: PnP id 0x2509143e + + there is code to recognize it as a SB clone. I have reports that + it probes ok, but not sure if it works. + +OPTI930: + + should work as an MSS clone, but support for it is not implemented + yet. + +ESS1868 + + this card is not supported yet. It might work in SB emulation but + am not sure. + +ESS688 + + this card is used on many notebook. I don't have docs on this card + so I cannot support it. Pointers to the data sheets are welcome. + +PCI cards: + + some vendors have PCI cards. This code _cannot_ work on these + cards as it is now, since they cannot obviously use the ISA DMA + controller. As there are no data sheets available for these PCI + cards, none of them is supported at the moment, although support + should be easy as soon as I can put my hands on the data sheets + and cards. Property changes on: stable/2.2/sys/i386/isa/snd/README ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: stable/2.2/sys/i386/isa/snd/mss.h =================================================================== --- stable/2.2/sys/i386/isa/snd/mss.h (nonexistent) +++ stable/2.2/sys/i386/isa/snd/mss.h (revision 30886) @@ -0,0 +1,249 @@ +/* + * file: mss.h + * + * (C) 1997 Luigi Rizzo (luigi@iet.unipi.it) + * + * This file contains information and macro definitions for + * AD1848-compatible devices, used in the MSS/WSS compatible boards. + * + */ + +/* + * + +The codec part of the board is seen as a set of 4 registers mapped +at the base address for the board (default 0x534). Note that some +(early) boards implemented 4 additional registers 4 location before +(usually 0x530) to store configuration information. This is a source +of confusion in that one never knows what address to specify. The +(current) convention is to use the old address (0x530) in the kernel +configuration file and consider MSS registers start four location +ahead. + + * + */ + +/* + * The four visible registers of the MSS : + * + */ + +#define io_Index_Addr(d) ((d)->io_base + 4) +#define IA_BUSY 0x80 /* readonly, set when busy */ +#define IA_MCE 0x40 /* the MCE bit. */ + /* + * the MCE bit must be set whenever the current mode of the + * codec is changed; this in particular is true for the + * Data Format (I8, I28) and Interface Config(I9) registers. + * Only exception are CEN and PEN which can be changed on the fly. + * The DAC output is muted when MCE is set. + */ +#define IA_TRD 0x20 /* Transfer request disable */ + /* + * When TRD is set, DMA transfers cease when the INT bit in + * the MSS status reg is set. Must be cleared for automode + * DMA, set otherwise. + */ +#define IA_AMASK 0x1f /* mask for indirect address */ + +#define io_Indexed_Data(d) ((d)->io_base+1+4) + /* + * data to be transferred to the indirect register addressed + * by index addr. During init and sw. powerdown, cannot be + * written to, and is always read as 0x80 (consistent with the + * busy flag). + */ + +#define io_Status(d) ((d)->io_base+2+4) + +#define IS_CUL 0x80 /* capture upper/lower */ +#define IS_CLR 0x40 /* capture left/right */ +#define IS_CRDY 0x20 /* capture ready for programmed i/o */ +#define IS_SER 0x10 /* sample error (overrun/underrun) */ +#define IS_PUL 0x08 /* playback upper/lower */ +#define IS_PLR 0x04 /* playback left/right */ +#define IS_PRDY 0x02 /* playback ready for programmed i/o */ +#define IS_INT 0x01 /* int status (1 = active) */ + /* + * IS_INT is clreared by any write to the status register. + */ + +#define io_Polled_IO(d) ((d)->io_base+3+4) + /* + * this register is used in case of polled i/o + */ + +/* + * The MSS has a set of 16 (or 32 depending on the model) indirect + * registers accessible through the data port by specifying the + * appropriate address in the address register. + * + * The 16 low registers are uniformly handled in AD1848/CS4248 compatible + * mode (often called MODE1). For the upper 16 registers there are + * some differences among different products, mainly Crystal uses them + * differently from OPTi. + * + */ + +/* + * volume registers + */ + +#define I6_MUTE 0x80 + +/* + * register I9 -- interface configuration. + */ + +#define I9_PEN 0x01 /* playback enable */ +#define I9_CEN 0x02 /* capture enable */ + +/* + * values used in bd_flags + */ +#define BD_F_MCE_BIT 0x0001 +#define BD_F_IRQ_OK 0x0002 +#define BD_F_TMR_RUN 0x0004 + + +/* + * sound/ad1848_mixer.h + * + * Definitions for the mixer of AD1848 and compatible codecs. + * + * Copyright by Hannu Savolainen 1994 + * + * 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 AD1848 codec has generic input lines called Line, Aux1 and Aux2. + * Soundcard manufacturers have connected actual inputs (CD, synth, line, + * etc) to these inputs in different order. Therefore it's difficult + * to assign mixer channels to to these inputs correctly. The following + * contains two alternative mappings. The first one is for GUS MAX and + * the second is just a generic one (line1, line2 and line3). + * (Actually this is not a mapping but rather some kind of interleaving + * solution). + */ + +#define MSS_REC_DEVICES \ + (SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD|SOUND_MASK_IMIX) + + +/* + * Table of mixer registers. There is a default table for the + * AD1848/CS423x clones, and one for the OPTI931. As more WSS + * clones come out, there ought to be more tables. + * + * Fields in the table are : polarity, register, offset, bits + * + * The channel numbering used by individual soundcards is not fixed. + * Some cards have assigned different meanings for the AUX1, AUX2 + * and LINE inputs. Some have different features... + * + * Following there is a macro ...MIXER_DEVICES which is a bitmap + * of all non-zero fields in the table. + * MODE1_MIXER_DEVICES is the basic mixer of the 1848 in mode 1 + * registers I0..I15) + * + */ + +mixer_ent mix_devices[32][2] = { +MIX_NONE(SOUND_MIXER_VOLUME), +MIX_NONE(SOUND_MIXER_BASS), +MIX_NONE(SOUND_MIXER_TREBLE), +MIX_ENT(SOUND_MIXER_SYNTH, 2, 1, 0, 5, 3, 1, 0, 5), +MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 6, 7, 1, 0, 6), +MIX_ENT(SOUND_MIXER_SPEAKER, 26, 1, 0, 4, 0, 0, 0, 0), +MIX_ENT(SOUND_MIXER_LINE, 18, 1, 0, 5, 19, 1, 0, 5), +MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1), +MIX_ENT(SOUND_MIXER_CD, 4, 1, 0, 5, 5, 1, 0, 5), +MIX_ENT(SOUND_MIXER_IMIX, 13, 1, 2, 6, 0, 0, 0, 0), +MIX_NONE(SOUND_MIXER_ALTPCM), +MIX_NONE(SOUND_MIXER_RECLEV), +MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), +MIX_NONE(SOUND_MIXER_OGAIN), +MIX_NONE(SOUND_MIXER_LINE1), +MIX_NONE(SOUND_MIXER_LINE2), +MIX_NONE(SOUND_MIXER_LINE3), +}; + +#define MODE2_MIXER_DEVICES \ + (SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_SPEAKER | \ + SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | \ + SOUND_MASK_IMIX | SOUND_MASK_IGAIN ) + +#define MODE1_MIXER_DEVICES \ + (SOUND_MASK_SYNTH | SOUND_MASK_PCM | SOUND_MASK_MIC | \ + SOUND_MASK_CD | SOUND_MASK_IMIX | SOUND_MASK_IGAIN ) + + +/* + * entries for the opti931... + */ + +mixer_ent opti931_devices[32][2] = { /* for the opti931 */ +MIX_ENT(SOUND_MIXER_VOLUME, 22, 1, 1, 5, 23, 1, 1, 5), +MIX_NONE(SOUND_MIXER_BASS), +MIX_NONE(SOUND_MIXER_TREBLE), +MIX_ENT(SOUND_MIXER_SYNTH, 4, 1, 1, 4, 5, 1, 1, 4), +MIX_ENT(SOUND_MIXER_PCM, 6, 1, 0, 5, 7, 1, 0, 5), +MIX_NONE(SOUND_MIXER_SPEAKER), +MIX_ENT(SOUND_MIXER_LINE, 18, 1, 1, 4, 19, 1, 1, 4), +MIX_ENT(SOUND_MIXER_MIC, 0, 0, 5, 1, 1, 0, 5, 1), +MIX_ENT(SOUND_MIXER_CD, 2, 1, 1, 4, 3, 1, 1, 4), +MIX_NONE(SOUND_MIXER_IMIX), +MIX_NONE(SOUND_MIXER_ALTPCM), +MIX_NONE(SOUND_MIXER_RECLEV), +MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 4, 1, 0, 0, 4), +MIX_NONE(SOUND_MIXER_OGAIN), +MIX_ENT(SOUND_MIXER_LINE1, 16, 1, 1, 4, 17, 1, 1, 4), +MIX_NONE(SOUND_MIXER_LINE2), +MIX_NONE(SOUND_MIXER_LINE3), +}; + +#define OPTI931_MIXER_DEVICES \ + (SOUND_MASK_VOLUME | SOUND_MASK_SYNTH | SOUND_MASK_PCM | \ + SOUND_MASK_LINE | SOUND_MASK_MIC | SOUND_MASK_CD | \ + SOUND_MASK_IGAIN | SOUND_MASK_LINE1 ) + + +static u_short default_mixer_levels[SOUND_MIXER_NRDEVICES] = { + 0x5a5a, /* Master Volume */ + 0x3232, /* Bass */ + 0x3232, /* Treble */ + 0x4b4b, /* FM */ + 0x4040, /* PCM */ + 0x4b4b, /* PC Speaker */ + 0x2020, /* Ext Line */ + 0x4040, /* Mic */ + 0x4b4b, /* CD */ + 0x0000, /* Recording monitor */ + 0x4b4b, /* SB PCM */ + 0x4b4b, /* Recording level */ + 0x2525, /* Input gain */ + 0x0000, /* Output gain */ + /* 0x4040, Line1 */ + 0x0000, /* Line1 */ + 0x0000, /* Line2 */ + 0x1515 /* Line3 (usually line in)*/ +}; + Property changes on: stable/2.2/sys/i386/isa/snd/mss.h ___________________________________________________________________ Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property