The Design and Implementation of the FreeBSD Operating System, Second Edition
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
sys/i386/isa/snd/

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

Name Size Last modified (GMT) Description
Back Parent directory 2023-01-29 20:54:29
File CARDS 12108 bytes 2023-01-29 20:54:29
File README 9169 bytes 2023-01-29 20:54:29
C file ad1848.c 71908 bytes 2023-01-29 20:54:29
C file clones.c 7279 bytes 2023-01-29 20:54:29
C file dmabuf.c 24781 bytes 2023-01-29 20:54:29
C file mss.h 17355 bytes 2023-01-29 20:54:29
C file sb_dsp.c 36056 bytes 2023-01-29 20:54:29
C file sbcard.h 12706 bytes 2023-01-29 20:54:29
C file sound.c 41688 bytes 2023-01-29 20:54:29
C file sound.h 16493 bytes 2023-01-29 20:54:29
C file ulaw.h 3392 bytes 2023-01-29 20:54:29

    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 old SB16 cards). To make an effective use of the new functionalities
   22 you 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 Updated versions of this code will be available at the following URL:
   28 
   29         http://www.iet.unipi.it/~luigi/FreeBSD.html
   30 
   31 Please READ CAREFULLY this file (and possibly the LaTeX documentation)
   32 to build a working kernel. The configuration is DIFFERENT (and
   33 hopefully much simpler) from the original Voxware driver.  The
   34 relevant steps are indicated at "---INSTALLATION---".
   35 
   36 CARDS:
   37 
   38   The driver supports most clones of WSS, SB16 and SBPro cards.
   39   This includes those based on the Crystal CS423x, OPTI931, GUSPnP,
   40   Yamaha, SB16/32 (both plain ISA, PnP, and the various AWExx).
   41   Many PnP cards are directly recognized, for others you might need
   42   manual configuration. See the file "CARDS" for more details.
   43 
   44 APPLICATIONS:
   45 
   46   In general, most applications which use /dev/audio or /dev/dsp
   47   work unmodified or with a specially-supplied module.
   48 
   49   UNMODIFIED:
   50   - raplayer (Real Audio Player), rvplayer (linux version)
   51   - xboing
   52   - xanim
   53   - various mpeg players (mpg123, amp, ...);
   54 
   55   WITH SPECIAL DRIVER MODULE (supplied)
   56   - speak_freely, full duplex (requires removing the definition of
   57     HALF_DUPLEX in the Makefile);
   58   - the realaudio player (3.0, dynamically linked);
   59   - vat, full duplex (the version in ports is already modified);
   60   - timidity, a software midi-to-pcm converter;
   61 
   62   NOT WORKING
   63   - xquake (we do not support mmapped buffers yet);
   64 
   65 
   66                     ---INSTALLATION---
   67 
   68   * add the following lines to your kernel configuration file:
   69 
   70       controller pnp0  # this is required for PnP support
   71 
   72       device     pcm0 at isa ? port? tty irq N drq D flags F
   73 
   74     where
   75 
   76       N is the IRQ address used by the sound card,
   77       D is the primary DMA channel used by the sound card,
   78       F is used to specify a number of options, in particular:
   79         bit  2..0   secondary DMA channel;
   80         bit  4      set if the board uses two dma channels;
   81         bit 15..8   board type, overrides autodetection; leave it
   82                     zero if don't know what to put in (and you don't,
   83                     since this is unsupported at the moment...).
   84 
   85     The code will probe for common port addresses (0x220, 0x240
   86     for SB and clones, 0x530 for WSS and clones), so you don't need
   87     to specify them if your system uses one of them. In case you
   88     do, note that for WSS cards the code assumes that the board
   89     occupies 8 IO addresses, the first four used to configure
   90     IRQ/DRQ, and the other four to access codec registers. Many
   91     boards (including all the ones I have) do not have registers
   92     to program IRQ and DRQ, so they really start at 0x534... yet
   93     I decided to use the old convention for historical reasons.
   94 
   95     You can use multiple sound cards, in which case you need more
   96     lines like
   97 
   98       device     pcm1 at isa ? port? tty irq N drq D flags F
   99       device     pcm2 at isa ? port? tty irq N drq D flags F
  100       ...
  101 
  102     EXAMPLES: a typical "device" line for the SB16 (full duplex) is
  103 
  104       device pcm0 at isa ? port? tty irq 5 drq 1 flags 0x15
  105 
  106     The driver will check at the default addresses (or the one you
  107     specify) which type of SoundBlaster you have (1.5, 2.0, 3.X
  108     aka SBPro, 4.X aka SB16) and use the correct commands. You
  109     _do_not_ need to specify different drivers (sb,sbpro,sbxvi) as
  110     it was the case (and a big source of confusion) in the previous
  111     sound driver.
  112 
  113     For a WSS-compatible codec (non PnP) working in full duplex using
  114     dma channels 1 and 3, you can specify:
  115 
  116       device pcm0 at isa ? port 0x530 tty irq 7 drq 1 flags 0x13
  117 
  118     (0x530 is a default if no port address is specified).  The
  119     "flags 0x13" specifies that you have a dual dma board with
  120     channel 3 as secondary DMA channel.
  121 
  122   * build the kernel using the standard steps
  123 
  124         config MYKERNEL
  125         cd /sys/compile/MYKERNEL
  126         make depend
  127         make
  128 
  129   * note for PnP cards:
  130 
  131     For PnP cards, only the line for "pcm0" is needed (the code
  132     will allocate entries for more cards if found), but IT MUST
  133     INCLUDE ALL FIELDS. You can use the following line:
  134 
  135       device pcm0 at isa ? port? tty irq 7 drq 1
  136 
  137     NOTE that:
  138       - the parameters for the PnP device(s) will be read from the
  139         configuration of the card(s); they are usually assigned by
  140         the bios, and there is no way (at the moment) to override
  141         them, so if you have a broken (or no) PnP bios your only
  142         chance is to patch the pnp attach code in the driver for your
  143         card (ad1848.c, sb_dsp.c, clones.c) and write there the
  144         parameters you want;
  145       - The driver will assign unit numbers to the PnP cards starting
  146         from the next free one (e.g. 1, 2, ...) same as it is done
  147         with PCI devices which are clones of ISA devices.
  148 
  149     The driver assumes a working PnP bios, which will assign correct
  150     addresses and IO and DMA channels to the devices. If you do not
  151     have a PnP-aware BIOS, you must boot with the -c option and assign
  152     addresses manually the first time. The general commands are described in
  153     the pnp README file. For the card-specific commands check in the
  154     file CARDS.
  155 
  156 WHAT IF THIS DRIVER DOES NOT WORK:
  157 
  158 If the driver does not work with your hardware, I might to help
  159 but I need the following information:
  160 
  161   - relevant lines in your config file;
  162   - dmesg output
  163   - possibly, pnpinfo output
  164 
  165 Please send all the above in plain text, not as a mime attachment.
  166 
  167 Common mistakes:
  168 
  169 * you are trying to use /dev/audio0 instead of /dev/audio1
  170   For technical reasons, a PnP device is attached as unit 1 instead
  171   of unit 0 -- most applications are programmed to access the audio
  172   hardware through /dev/audio, /dev/dsp, /dev/mixer which are in turn
  173   symlinks to the correct device entries. Check them and possibly fix
  174   these symlinks in /dev
  175 
  176 * you have used a wrong config line
  177 
  178   The configuration of this driver is different from the Voxware one.
  179   Please read the information in this file carefully.
  180 
  181 * your BIOS is leaving the card disabled.
  182 
  183   Some BIOSes do not initialize the card, or leave it disabled. At the
  184   moment, the fix is to use the pnp code booting with "-c" and set the
  185   correct port, irq, drq etc for the card. See the PnP documentation.
  186 
  187 * your card is not recognized.
  188 
  189   This driver supports a large, but still limited, number of cards,
  190   mostly SB and WSS clones. Other cards may or may not work depending
  191   on how closely they emulate these devices. In case, send me an email
  192   with the info indicated above.
  193 
  194 * the mixer does not work well
  195 
  196   Different cards have different connections to the mixer, so it might
  197   well be that to control the volume of your CD you have to use the FM
  198   port, etc. Also, on some cards the volume might be lower than you
  199   expect. The mixer code still does not try to exploit the features of
  200   each card, and it just provides basic functionalities.
  201 
  202 --- ACKNOWLEDGMENTS ---
  203 
  204 Several people helped, directly or indirectly, in the development of
  205 this driver. In particular I would like to thank:
  206 
  207     * Hannu Savolainen (the Voxware author) for making his code
  208       available. It was a very good source of technical info;
  209     * Amancio Hasty for continuous support and his work on guspnp code;
  210     * Jim Lowe for his suggestion on the block-mode select;
  211     * Allison Mankin and Brad Karp at ISI-East for supplying a GUS PnP
  212       which allowed me to support this card;
  213     * Eric J. Schwertfeger for donating an ES1868 card for writing the
  214       driver (which i haven't done yet...).
  215     * and many people who had the patience to try the driver
  216       on their cards and report success/failure and useful
  217       information.
  218 
  219 It was certainly helpful to have the data sheets for some of the
  220 devices I support available on the net, especially in the (unfortunately
  221 rare) cases where the data sheets matched the actual behavior of
  222 the product. Too bad that no one of the chip/card manufacturers I
  223 have contacted by email regarding missing or inconsistent documentation
  224 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.