Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[ source navigation ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
FreeBSD/Linux Kernel Cross Reference
|
Name | Size | Last modified (GMT) | Description | |
Parent directory | 2008-10-04 07:13:55 | |||
CARDS | 10485 bytes | 1998-10-22 13:35:22 | ||
README | 11992 bytes | 1998-10-22 13:35:22 | ||
ad1848.c | 48457 bytes | 1998-11-14 13:09:09 | ||
clones.c | 7251 bytes | 1997-11-23 07:03:11 | ||
dmabuf.c | 24035 bytes | 1998-10-22 13:35:22 | ||
mss.h | 8480 bytes | 1998-06-10 17:37:01 | ||
sb_dsp.c | 35926 bytes | 1998-12-14 17:18:05 | ||
sbcard.h | 12706 bytes | 1998-12-14 17:18:05 | ||
sound.c | 40640 bytes | 1998-11-29 22:52:16 | ||
sound.h | 15247 bytes | 1998-06-10 17:37:02 |
1 --- A new FreeBSD audio driver --- 2 by Luigi Rizzo (luigi@iet.unipi.it) 3 4 This is a new, completely rewritten, audio driver for FreeBSD. 5 Only "soundcard.h" has remained largely similar to the original 6 OSS/Voxware header file, mostly for compatibility with existing 7 applications. 8 9 This driver tries to cover those areas where the Voxware 3.0 driver 10 is mostly lacking: full-duplex, audio applications, modern (mostly 11 PnP) cards. For backward compatibility, the driver implements most 12 of the Voxware ioctl() audio calls, so that many applications -- 13 even commercial ones -- will run unmodified with this driver. On 14 the other hand, at the moment this driver does not support /dev/midi 15 and /dev/synth, or some ioctl() used in xquake. Do not expect 16 /dev/synth to be supported anytime soon. 17 18 I also have implemented a new software interface with an independent 19 set of ioctl(), to support some functions which were not easy to 20 express with the existing software interface (e.g. full duplex on 21 the SB16). To make an effective use of the new functionalities you 22 need to recompile applications by replacing the audio module(s). 23 Such modified driver modules are present in the misc/ directory 24 for several applications. 25 26 This file gives quick information on how to install the driver. 27 Most of these information are also in the manpage included here, 28 which will become the 'official' reference in case of discrepancies. 29 For more info you are invited to look at the doc/ directory where 30 you can find more documentation (in Latex and Postscript) on the 31 driver and how to extend it. The files in doc/ should give a good 32 idea of what the driver is supposed to do and how, the Voxware 33 documentation should be of some help, and the various driver modules 34 in misc/ should also give some help. 35 36 Also note that you might need the PnP code (pnp971020.tgz), which 37 as of January 1998 has been incorporated in -current and -stable 38 versions of FreeBSD. 39 40 Updated versions of this code will available at the following URL: 41 42 http://www.iet.unipi.it/~luigi/FreeBSD.html 43 44 Please READ CAREFULLY this file (and possibly the LaTeX documentation) 45 to build a working kernel. The configuration is DIFFERENT (and 46 hopefully much simpler) from the original Voxware driver. The 47 relevant steps are indicated at "---INSTALLATION---". 48 49 This code (and the associated patches) should work unmodified on 50 2.2.5 and in general on 2.2.X versions of FreeBSD. Minor modifications 51 will be necessary to make the code work on 2.1.X. The code assumes 52 that, if you are using FreeBSD 3.0, your system uses poll(2) instead 53 of select(2) -- this change happened around late 1997. The code which 54 deals with this is mostly in sound.c, and conditioned by 55 56 #if __FreeBSD__ >= 3 57 58 This archive includes: 59 * the main files for the driver, in this directory, which must be 60 moved to /sys/i386/isa/snd; 61 * miscellaneous, but important, files in the "misc" subdirectory; 62 * documentation, in the "doc" subdirectory; 63 64 CARDS: 65 66 The driver supports most clones of WSS, SB16 and SBPro cards. 67 This includes those based on the Crystal CS423x, OPTI931, GUSPnP, 68 Yamaha, SB16/32 (both plain ISA, PnP, and the various AWExx). 69 Many PnP cards are directly recognised, for others you might need 70 manual configuration. See the file "CARDS" for more details. 71 72 APPLICATIONS: 73 74 In general, most applications which use /dev/audio or /dev/dsp 75 work unmodified or with a specially-supplied module. 76 77 UNMODIFIED: 78 - raplayer (Real Audio Player), rvplayer (linux version) 79 - xboing 80 - xanim 81 - various mpeg players (mpg123, amp, ...); 82 83 WITH SPECIAL DRIVER MODULE (supplied) 84 - speak_freely, full duplex (requires removing the definition of 85 HALF_DUPLEX in the Makefile); 86 - the realaudio player (3.0, dynamically linked); 87 - vat, full duplex (driver included); 88 - nas, full duplex (driver included); 89 - timidity, a software midi-to-pcm converter; 90 91 NOT WORKING 92 - xquake (we do not support mmapped buffers yet); 93 94 95 ---INSTALLATION--- 96 97 In order to use this driver, you need FreeBSD 2.2 or above (I have 98 tested this code on 2.2.1 and 2.2.5, and have many reports of the 99 driver working on various vintages of 3.0 ). The enclosed patch 100 file refers to FreeBSD 2.2.5. Your mileage may vary -- e.g. both 101 -stable and -current at the time of this writing (Jun.98) have 102 included the modifications to isa.c . 103 104 Installation requires the following steps: 105 106 2.2.6 USERS: 107 * replace the files in /sys/i386/isa/snd with the files in this 108 directory. 109 110 2.2.5 AND EARLIER VERSIONS: 111 * install the PnP support files (pnp971020.tgz). This is optional, 112 in case you don't you might need to do some simple modifications 113 to the file because pnp.h might not exist. 114 115 * unpack the content of this archive in /sys/i386/isa/snd/ 116 117 * if you are running a version of 2.2 earlies than 2.2.5-RELEASE, 118 apply the patches in "patches.22x" to isa.c 119 120 * patch the following system files using the patches in 121 "patches.225" : 122 123 /sys/i386/isa/isa.c 124 a couple of new functions have been added; 125 126 /sys/i386/conf/files.i386 127 lines related to this audio driver have been added; 128 129 * update file soundcard.h by copying the one in this directory into: 130 131 /sys/i386/include/soundcard.h 132 /usr/include/machine/soundcard.h 133 134 The new file should be compatible with the old one, but has 135 the definition of new ioctl() calls which are implemented by 136 this driver. 137 138 ALL VERSIONS: 139 * add the following lines to your kernel configuration file: 140 141 controller pnp0 # this is required for PnP support 142 143 device pcm0 at isa ? port? tty irq N drq D flags F vector pcmintr 144 145 where 146 147 N is the IRQ address used by the sound card, 148 D is the primary DMA channel used by the sound card, 149 F is used to specify a number of options, in particular: 150 bit 2..0 secondary DMA channel; 151 bit 4 set if the board uses two dma channels; 152 bit 15..8 board type, overrides autodetection; leave it 153 zero if don't know what to put in (and you don't, 154 since this is unsupported at the moment...). 155 156 The code will probe for common port addresses (0x220, 0x240 157 for SB and clonse, 0x530 for WSS and clones), so you don't need 158 to specify them if your system uses one of them. In case you 159 do, note that for WSS cards the code assumes that the board 160 occupies 8 IO addresses, the first four used to configure 161 IRQ/DRQ, and the other four to access codec registers. Many 162 boards (including all the ones I have) do not have registers 163 to program IRQ and DRQ, so they really start at 0x534... yet 164 I decided to use the old convention for historical reasons. 165 166 You can use multiple sound cards, in which case you need more 167 lines like 168 169 device pcm1 at isa ? port? tty irq N drq D flags F vector pcmintr 170 device pcm2 at isa ? port? tty irq N drq D flags F vector pcmintr 171 ... 172 173 EXAMPLES: a typical "device" line for the SB16 (full duplex) is 174 175 device pcm0 at isa ? port? tty irq 5 drq 1 flags 0x15 vector pcmintr 176 177 The driver will check at the default addresses (or the one you 178 specify) which type of SoundBlaster you have (1.5, 2.0, 3.X 179 aka SBPro, 4.X aka SB16) and use the correct commands. You 180 _do_not_ need to specify different drivers (sb,sbpro,sbxvi) as 181 it was the case (and a big source of confusion) in the previous 182 sound driver. 183 184 For a WSS-compatible codec (non PnP) working in full duplex using 185 dma channels 1 and 3, you can specify: 186 187 device pcm0 at isa ? port 0x530 tty irq 7 drq 1 flags 0x13 vector pcmintr 188 189 (0x530 is a default if no port address is specified). The 190 "flags 0x13" specifies that you have a dual dma board with 191 channel 3 as secondary DMA channel. 192 193 * build the kernel using the following steps 194 195 config MYKERNEL 196 cd /sys/compile/MYKERNEL 197 make depend 198 make 199 200 * PnP support: 201 202 For PnP cards, only the line for "pcm0" is needed (the code 203 will allocate entries for more cards if found), but IT MUST 204 INCLUDE ALL FIELDS, including "vector pcmintr". You can use 205 the following line: 206 207 device pcm0 at isa ? port? tty irq 7 drq 1 vector pcmintr 208 209 NOTE that: 210 - the parameters for the PnP device(s) will be read from the 211 configuration of the card(s); they are usually assigned by 212 the bios, and there is no way (at the moment) to override 213 them, so if you have a broken (or no) PnP bios your only 214 chance is to patch the pnp attach code in the driver for your 215 card (ad1848.c, sb_dsp.c, clones.c) and write there the 216 parameters you want; 217 - The driver will assign unit numbers to the PnP cards starting 218 from the next free one (e.g. 1, 2, ...) same as it is done 219 with PCI devices which are clones of ISA devices. 220 221 The driver assumes a working PnP bios, which will assign correct 222 addresses and IO and DMA channels to the devices. If you do not 223 have a PnP-aware BIOS, you must boot with the -c option and assign 224 addresses manually the first time. The general commands are described in 225 the pnp README file. For the card-specific commands check in the 226 file CARDS. 227 228 WHAT IF THIS DRIVER DOES NOT WORK: 229 230 If the driver does not work with your hardware, I am willing to 231 help but I need the following: 232 233 - relevant lines in your config file; 234 - dmesg output 235 - possibly, pnpinfo output 236 237 Please send all the above in plain text, not as a mime attachment. 238 239 Common mistakes: 240 241 * you are trying to use /dev/audio0 instead of /dev/audio1 242 For technical reasons, a PnP device is attached as unit 1 instead 243 of unit 0 -- most applications are programmed to access the audio 244 hardware through /dev/audio, /dev/dsp, /dev/mixer which are in turn 245 symlinks to the correct device entries. Check them and possibly fix 246 these symlinks in /dev 247 248 * you have used a wrong config line 249 250 The configuration of this driver is different from the Voxware one. 251 Please read the information in this file carefully. 252 253 * your BIOS is leaving the card disabled. 254 255 Some BIOSes do not initialize the card, or leave it disabled. At the 256 moment, the fix is to use the pnp code booting with "-c" and set the 257 correct port, irq, drq etc for the card. See the PnP documentation. 258 259 * your card is not recognized. 260 261 This driver supports a large, but still limited, number of cards, 262 mostly SB and WSS clones. Other cards may or may not work depending 263 on how closely they emulate these devices. In case, send me an email 264 with the info indicated above. 265 266 * the mixer does not work well 267 268 Different cards have different connections to the mixer, so it might 269 well be that to control the volume of your CD you have to use the FM 270 port, etc. Also, on some cards the volume might be lower than you 271 expect. The mixer code still does not try to exploit the features of 272 each card, and it just provides basic functionalities. 273 274 --- ACKNWOLEDGEMENTS --- 275 276 Several people helped, directly or indirectly, in the development of 277 this driver. In particular I would like to thank: 278 279 * Hannu Savolainen (the Voxware author) for making his code 280 available. It was a very good source of technical info; 281 * Amancio Hasty for continuous support and his work on guspnp code; 282 * Jim Lowe for his suggestion on the block-mode select; 283 * Allison Mankin and Brad Karp at ISI-East for supplying a GUS PnP 284 which allowed me to support this card; 285 * Eric J. Schwertfeger for donating sn ES1868 card for writing the 286 driver. 287 * and many people who had the patience to try the driver 288 on their cards and report success/fauilure and useful 289 information. 290 291 It was certainly helpful to have the data sheets for some of the 292 devices I support available on the net, especially in the (unfortunately 293 rare) cases where the data sheets matched the actual behaviour of 294 the product. Too bad that no one of the chip/card manufacturers I 295 have contacted by email regarding missing or inconsistent documentation 296 on their products did even care to reply to my messages.
[ source navigation ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]
This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.