    Linux HOWTO
  Jeff Tranter, tranter@pobox.com,  Alex Ott
  ott@phtd.tpu.edu.ru
  v1.19, 23  1998

        Linux. 
    ,    
       .   -- 
          
  Usenet   .
  ______________________________________________________________________

  Table of Contents





















































  1. 

     1.1 
     1.2  
     1.3    
     1.4  
     1.5  

  2.   

  3.  

     3.1  
     3.2   
     3.3 PC Speaker
     3.4  

  4. 

     4.1   
     4.2  
     4.3   
     4.4  Linux   
     4.5  
        4.5.1  1: ,      .
        4.5.2  2: ,      .
        4.5.3  3:         ?
        4.5.4  4:       dsp?
        4.5.5      

  5.   

  6.      (FAQ)

     6.1      ?
     6.2      ?
     6.3     ?
     6.4         ?
     6.5 : No such file or directory (    )   
     6.6 : No such device (  )   
     6.7 : No space left on device (    )   
     6.8 : Device busy ( )   
     6.9     :  !
     6.10    
     6.11       MOD
     6.12      
     6.13 SEGV    ,    
     6.14       ?
     6.15   ioctl()  ..  ?
     6.16          ?
     6.17   PAS16   SCSI Adaptec 1542
     6.18       ?
     6.19   SB16   IRQ 2,       .
     6.20   SoundBlaster AWE32  SoundBlaster16 ASP?
     6.21    Linux,    DOS,    /     .
     6.22    DOOM  Linux
     6.23     ,    ?
     6.24    ,   .
     6.25  ""           MS-DOS.
     6.26  16- ""  SoundBlaster      8-   Linux.
     6.27        Linux?
     6.28         ?
     6.29          ?
     6.30   VoxWare?
     6.31   Plug and Play  ?
     6.32 Sox/Play/Vplay  "invalid block size 1024 (   1024)"
     6.33       ?
     6.34         
     6.35     
     6.36     IBM ThinkPad?

  7. 



  ______________________________________________________________________

   ::      , 
  .


  11..  

   Linux Sound HOWTO.     
    ,       
     Linux.      
   (FAQ)        
     .

         Linux.
        ______  
      ,    
  .


  11..11..  

         
     ,  Hannu Savolainen
  (hannu@voxware.pp.fi).   Hannu    , 
       Linux   .

    SGML Tools,     
  ,      .


  11..22..   



      11..11
         ;     SOUND  
         Linux


      11..22
         ;      


      11..33
          SGML;     
          Linuxdoc-SGML Matt Welsh' Linuxdoc-SGML;
          -  ,   
        


      11..44
         tweaking of SGML;    
        PAS16  SCSI  Adaptec1542A SCSI



      11..55
          2.5a   1.1;    GUS-MAX;
          


      11..66
            "no space on device (  
        )";    ,   
        (Hacker's Guide)    ; 
           ;    "device
        busy ( )";   


      11..77
           ASP  AWE32;  VoxWare 2.9; 
            IRQ2;   
            SCSI HOWTO


      11..88
             DOS;    
            2.90;   DOOM';
           


      11..99
              


      11..1100
        ,  HOWTO   WWW,    
        ;    DMA   
        QIC;   Sound Galaxy NX Pro  Logitech BusMouse


      11..1111
          (  );   
         GPL;    3.0  ;
              
        ;       ;
             HTML;    
         CD-ROM HOWTO


      11..1122
             1.3.34;   
        ;  1542 address  334  333; 
         Creative Labs Emu  ASP;   Web- Creative
        Labs  MediaTrix


      11..1133
           VoxWare;    
             ;  
         Plug and Play;     ; 
         xconfig  menuconfig; modutils   
        ;   vger ;  Web-
        ;    


      11..1144
        Audio Excell DSP16    (  
          );    ;
           ;   
        mixer gains     ;  
        ---2.0;     ;   
            


      11..1155
          ,      
        ;     ; 
               
        ;     ; 
            


      11..1166
             Hannu Savolainen; 
          "";  URL    ;
            ;   
          


      11..1177
          ;   GUS; 
         ;     Linux  
          ;     mini-
        HOWTO;   IBM ThinkPad


      11..1188
          ;      
        MIPS;       ;
             fuser


     VVeerrssiioonn 11..1199
          ;    
         LDP  GPL



  11..33..     

          
   comp.os.linux.answers.      
   ftp-,    , 
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/>.

       Linux HOWTO   
  WWW-,   <http://sunsite.unc.edu/LDP/>.  
   Linux     HOWTO,  
   /usr/doc,        
  .      
  , ftp-      .  
          , 
        Internet.

       
  <ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/>.

       <http://yebisu.ics.es.osaka-
  u.ac.jp/linux/>.

     
  <http://www.psy.unipd.it/ildp/docs/HOWTO/Sound-HOWTO.html>.

     
  <http://www.insflug.nova.es/howtos/online/sonido/sonido-COMO.html>.


     
  <http://linux.ntcic.edu.tw/~yorkwu/linux/howto/sound/>.

     
  <http://members.iWorld.net/mangchi/HOWTO/Sound-HOWTO.html>.

       Linux HOWTO   
    <http://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/> 
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/translations/>.

          ,  
         .


  11..44..   


   ,       .  
    ,   , 
     tranter@pobox.com,       
   .

             Linux,
    .  ,   ,  
      ,      
  .        
        Linux.

            
  ,    .     
   .  ,     
   Linux Documentation Project     
    Linux.    Linux HOWTO, Tim
  Bynum  <mailto:linux-howto@sunsite.unc.edu>,   
  .


  11..55..   

    (c) 1995-1998 by Jeff Tranter.    
       LDP 
  <http://sunsite.unc.edu/LDP/COPYRIGHT.html>.


  22..    


     _____      ,
   ,        
  .         
        .


    __________ ;      
   .   _________;  
     .   
     __________-________ _______________ (A/D 
  ADC  )     
     ,      .
   , _________-__________ _______________ (D/A  DAC 
  )       ,
        ,  .

   - ,  
  ,   .   
    ,     
  . ________ _____________ --   
      (    
    ).     
      . 
   --      
   ,    .  
   --       .

       8  16-  
     4000  44000   .
      ()  
  ().

  _F_M ______      .   
      ( ,
  , ). FM     
    ,        .
      FM   
        . 
        ______
  _(_v_o_i_c_e_s_).

  ________ _(_W_a_v_e_t_a_b_l_e_) ______     
   FM .       
        ,   
     .    
    .

       __________
  _(_m_i_x_i_n_g_),       
    (gain).

  _M_I_D_I (stands)     
   (Musical Instrument Digital Interface),   
        
  ( )     .
      MIDI    
  MIDI-     . 
     MIDI-.     
   MIDI-    
  .

  _M_O_D_-_____      . 
      ,  
      ( ). MOD-
      Amiga,     
   ,  Linux,   
   .


  33..   

         
       Linux.   
       Linux.

       .   
   -- 2.0.33,      3.5.4-960630.

    , Hannu Savolainen,    
  -  ,      
     Linux.   
      <http://www.4front-
  tech.com/ossfree/new_cards.html> (USA) 
  <http://personal.eunet.fi/pp/voxware/new_cards.html> ().  
          
             .
   /usr/src/linux/drivers/sound/Readme.cards  
          , 
     () up to date.

        Linux'   Intel.

           
   Alpha. ,      
  -     Alpha,    
      i386,        
        .

    ,       PowerPC 
  Linux,     .

          Linux  MIPs,  
  MIPs-  EISA  /   .
   Linux-MIPs      
  .

   Linux     Atari  Amiga 
  Linux,       
   Intel      
  .

  SPARC  Linux       . 
  Amiga  Atari, SPARC-    ,
           (  
  ,   Linux /dev/dsp    SunOS).


  33..11..   

         Linux:


    ATI Stereo F/X (  )

    AdLib (  )

    Ensoniq SoundScape (   Reveal  Spea)

    Gravis Ultrasound

    Gravis Ultrasound ACE

    Gravis Ultrasound Max

    Gravis Ultrasound   16- 

    Logitech Sound Man 16

    Logitech SoundMan Games

    Logitech SoundMan Wave

    MAD16 Pro (OPTi 82C928, 82C929, 82C930, 82C924 chipsets)

    Media Vision Jazz16

    MediaTriX AudioTriX Pro

    Microsoft Windows Sound System (MSS/WSS)


    Mozart (OAK OTI-601)

    Orchid SW32

    Personal Sound System (PSS)

    Pro Audio Spectrum 16

    Pro Audio Studio 16

    Pro Sonic 16

    Roland MPU-401 MIDI interface

    Sound Blaster 1.0

    Sound Blaster 16

    Sound Blaster 16ASP

    Sound Blaster 2.0

    Sound Blaster AWE32

    Sound Blaster Pro

    TI TM4000M notebook

    ThunderBoard

    Turtle Beach Tropez ("",   Plus)

    Turtle Beach Maui

    Yamaha FM synthesizers (OPL2, OPL3  OPL4)

    6850 UART MIDI Interface

   ,  Plug and Play (PnP)    
     -PnP     .
  , SoundBlaster16 PnP     
  SoundBlaster16.      Soundscape PnP  GUS PnP.
      Plug and Play,    
   .

    __ ,      
  -      ,
     :


    Pro Audio Spectrum ()

    Pro Audio Spectrum+

     (  Sierra Aria)   
     Diamond

        
     _____     
   (  ) .

        " 
  SoundBlaster",      
  ,      SoundBlaster  Linux. 
         MSS/WSS  MAD16.
     SoundBlaster,  Creative Labs,
      Creative (
  SoundBlaster16 Vibra), MV Jazz16    ESS688/1688  
      SoundBlaster.   
  "SoundBlaster Pro  16-  "  
  SoundBlaster --    .

   Linux  SCSI ,    
   ( ProAudioSpectrum 16)    
    CD-ROM ( Soundblaster Pro). 
   Linux SCSI  HOWTO  CDROM HOWTO   
  .

         ,
   ,      .

  ,     SCSI, CD-ROM, ,  
      .

          WWW-
  Hannu Savolainen,    .


  33..22..    


     ""  , 
       Linux,   
    .

       Linux  
  4Front Technologies.    ,
      ,    Linux.  
       4Front Technologies 
    <http://www.4front-tech.com/>.


  Markus Mummert (mum@mmk.e-technik.tu-muenchen.de)   
    Turtle Beach MultiSound (), Tahiti, and
  Monterey.   :


       "     /
             .
        ,    , MIDI  
         (DSP)    . 
               . 
           VoxWare    
           1.0.9  1.2.1.   
          UN*X SysV386R3.2"


      
  <http://www.cs.colorado.edu/~mccreary/tbeach>.

  Kim Burgaard (burgaard@daimi.aau.dk)    
    MIDI  Roland MPU-401.  
   Linux   :


       "      Roland
       MPU-401  MIDI ( Roland SCC-1 
       RAP-10/ATW-10).      
          MIDI-  
       .


              0.11a.
         ,    
        IRQ      .
        ,  , 
             , 
        //overdub  , 
       ."


      
  <ftp://sunsite.unc.edu/pub/Linux/kernel/sound/mpu401-0.2.tar.gz>.

  Jaroslav Kysela       
   Gravis UltraSound.     
  <http://romeo.pf.jcu.cz/~perex/ultra>,    Linux
  UltraSound.

        Linux -- 
       .   2.1.x 
   ,      SoundBlaster and
  Windows Sound System     1200 bps AFSK 
  9600 bps FSK  .  AX25 HOWTO  
   (  ,   --  
  VE3ICH).


  33..33..  PPCC SSppeeaakkeerr

      ,   
    ;   
  .         ,
  ,    ,      
    .   , 
     .   
   ,   .

    1.1,      <ftp://ftp.informatik.hu-
  berlin.de/pub/os/linux/hu-sound/>


  33..44..   


      -
        
   .     ,
    ,     .   
   ,  ,    
       .


  44..  


   Linux      :


  1.   .

  2.       .

  3.   .

  4.   Linux  .


          .


  44..11..    


        
     .

          
   IRQ,  DMA  ..;   .
     ,    . ,
   ,      (
   ethernet,  SCSI,   
  ).

          
  /, IRQ  DMA,    DOS.   
   (  PnP )    
  ,      Linux.  
   .


  44..22..   


     Linux     .
        .  
       .   
          ,
    .

      Linux Kernel HOWTO
  <http://sunsite.unc.edu/LDP/HOWTO/Kernel-HOWTO.html>  
      .     
  ,    .

            , 
      ___ Readme-,  
   .       
   ,    
  /usr/src/linux/drivers/sound:


  CHANGELOG         -     
  COPYING           -     
  Readme            -     
  Readme.aedsp16    -     Audio Excel DSP 16
  Readme.cards      -     
  Readme.linux      -      
  Readme.modules    -      
  Readme.v30        -      3.0
  experimental.txt  -    



      .   
      . 
  ,     X11   
   "make xconfig".   ,  
       "make menuconfig".
   ,  "make config",  
  - .

    ,   "make xconfig" 
  "make menuconfig".   Yes/No   .  
  ,    ,  No,   
  .    "/dev/dsp and /dev/audio support"
  (CONFIG_AUDIO)    .

       ,    ,
  - ,   "make config", 
      .

   2    .  -- 
  ""  (    2.0.0).  
    ,    
  .      ,   ,
     ""  (
  miroSOUND, AWE32,  AEDSP16 cards).

   --  "" ,    
  -     (rest) .
        ,   
   .     PSS, SM Wave, AudioTrix Pro 
  TurtleBeach Tropez/Maui.     
   .

  ""     "make xconfig". 
   "make menuconfig",     "" 
  "" .   "make config",  
   "" .     
  "" ,      "make config". 
      ""   "make
  menuconfig"   "" .

    --  "make menuconfig"  
  ""   .     
   (   )  
  "" .

         .
        .   
         .

     make config,     "y"
   



       Sound card support (CONFIG_SOUND) [M/n/y/?]




     ,    
  ,        
  .  ,     ,  
         
   . ,   "yes"    (PAS16)
      PAS16.    ,  ,
       .    (
  MPU-401)      SCSI   
    .

          .
   "y" ()  "n" ()   .   
    "[Y/n/?]"  "y"    "[N/y/?]"
     "n".     
    Enter (),  ,     
   .

     ("?")   ,  
   .

  ,       .  
          .
        .



     OOlldd ccoonnffiigguurraattiioonn eexxiissttss iinn //eettcc//ssoouunnddccoonnff.. UUssee iitt [[YY//nn//??]]
        (    /etc/soundconf.  
        [//?])"        
         ,     
        .      ,
         "y".     
           ,    "n" 
          .


     PPrrooAAuuddiiooSSppeeccttrruumm 1166 ssuuppppoorrtt [[YY//nn//??]] (( PPrrooAAuuddiiooSSppeeccttrruumm 1166
        [[////??]]))
         "y" ______    Pro Audio Spectrum _1_6,
        ProAudio Studio 16  Logitech SoundMan 16.   "y"
              Media Vision 
        Logitech       PAS16.


     SSoouunnddBBllaasstteerr ssuuppppoorrtt [[YY//nn//??]] (( SSoouunnddBBllaasstteerr
        [//?])"   "y"     
        SoundBlaster  Creative Labs  100% 
          ( Thunderboard  SM Games).  
             ,  
           Readme.cards     . 
             "y"   
          SoundBlaster.


     GGrraavviiss UUllttrraassoouunndd ssuuppppoorrtt [[YY//nn//??]] (( GGrraavviiss UUllttrraassoouunndd
        [//?])"   "y"    GUS  GUS MAX.  "n"
             ,     
         .


     MMPPUU--440011 ssuuppppoorrtt ((NNOOTT ffoorr SSBB1166)) [[YY//nn//??]] (( MMPPUU--440011 ((
         SB16)[//?])"      . 
        MPU-401    . , 
        (natively supported)     MPU-401.
          MPU-401     . 
         MPU-401  ,    MPU-401 
          .      
         ,      
         Readme.cards.  "y" ,     
         MIDI  MPU-401.


     66885500 UUAARRTT MMiiddii ssuuppppoorrtt [[YY//nn//??]] (( 66885500 UUAARRTT MMiiddii
        [//?])"   "n"       .
         6850 UART    .


     PPSSSS ((EECCHHOO--AADDII22111111)) ssuuppppoorrtt [[YY//nn//??]] (( PPSSSS
        (ECHO-ADI2111) [//?])"   "y"    
        Orchid SW32, Cardinal DSP16   ,  
          PSS (AD1848 codec + ADSP-2115 DSP chip + Echo
        ESC614 ASIC CHIP).

     1166 bbiitt ssaammpplliinngg ooppttiioonn ooff GGUUSS ((_n_o_t GGUUSS MMAAXX)) [[YY//nn//??]]
        (16-   GUS (__  GUS MAX) [//?])"
         "y"     GUS  
          16- .  "n"    GUS
        MAX.       GUS MAX.


     GGUUSS MMAAXX ssuuppppoorrtt [[YY//nn//??]] (( GGUUSS MMAAXX [[////??]]))
         "y"     GUS MAX.


     MMiiccrroossoofftt SSoouunndd SSyysstteemm ssuuppppoorrtt [[YY//nn//??]] (( MMiiccrroossoofftt
        Sound System [//?])"       
        "y"   .   "y"   
          Windows Sound System,  Microsoft
          Aztech SG 16 Pro ( NX16 Pro).     "y"
          ,        . 
        ,     VoxWare, 
             Readme.cards.   
           MSS     
         .


     EEnnssoonniiqq SSoouunnddssccaappee ssuuppppoorrtt [[YY//nn//??]] (( EEnnssoonniiqq
        Soundscape [//?])"   "y"     
           Ensoniq SoundScape.   
        Spea  Reveal (Reveal    ).


     MMeeddiiaaTTrriiXX AAuuddiiooTTrriiXX PPrroo ssuuppppoorrtt [[YY//nn//??]] (( MMeeddiiaaTTrriiXX
        AudioTriX Pro [//?])"   "y"    AudioTriX
        Pro.


     SSuuppppoorrtt ffoorr MMAADD1166 aanndd//oorr MMoozzaarrtt bbaasseedd ccaarrddss [[YY//nn//??]] ((
           MAD16 / Mozart [//?])"   "y"
               Mozart
        (OAK OTI-601)  MAD16 (OPTi 82C928  82C929).  
            ,   , 
               .  
         MAD16    
         ,   Turtle Beach (Tropez),
        Reveal ( )  Diamond ( ).


     SSuuppppoorrtt ffoorr CCrryyssttaall CCSS44223322 bbaasseedd ((PPnnPP)) ccaarrddss [[YY//nn//??]]
        (    Crystal CS4232 (PnP) [//?])"
         "y"        
         Crystal CS4232.


     SSuuppppoorrtt ffoorr TTuurrttllee BBeeaacchh WWaavvee FFrroonntt ((MMaauuii,, TTrrooppeezz)) ssyynntthheessiizzeerrss
        [Y/n/?] (  Turtle Beach Wave Front (Maui,
        Tropez) [//?])"   "y"      
        .


     SSoouunnddBBllaasstteerr PPrroo ssuuppppoorrtt [[YY//nn//??]] (( SSoouunnddBBllaasstteerr PPrroo
        [//?])"    ,    SoundBlaster Pro 
        SoundBlaster 16.      
        SoundBlaster Pro.  "n"   
        ,  "y"   .


     SSoouunnddBBllaasstteerr 1166 ssuuppppoorrtt [[YY//nn//??]] (( SSoouunnddBBllaasstteerr 1166
        [//?])"  ,    SoundBlaster 16 (
        AWE32).


     AAuuddiioo EExxcceell DDSSPP 1166 iinniittiiaalliizzaattiioonn ssuuppppoorrtt [[YY//nn//??]] ((
         Audio Excel DSP 16[//?])"   ,  
          Audio Excel DSP16.    
          Readme.aedsp16.


       , 
   .   "y"    
  .  "n"     ,    
  .



     //ddeevv//ddsspp aanndd //ddeevv//aauuddiioo ssuuppppoorrtt ((uussuuaallllyy rreeqquuiirreedd)) [[YY//nn//??]]
        ( /dev/dsp  /dev/audio ( ) [//?])"
         "n"  /dev/dsp  /dev/audio ---   
        .  "y".


     MMIIDDII iinntteerrffaaccee ssuuppppoorrtt [[YY//nn//??]] (( MMIIDDII-- [[////??]]))
         "n"   /dev/midixx    
         MIDI  /dev/sequencer  /dev/music.  
              MPU-401 /
        General MIDI.


     FFMM ssyynntthheessiizzeerr ((YYMM33881122//OOPPLL--33)) ssuuppppoorrtt [[YY//nn//??]](( FFMM
         (YM3812/OPL-3) [//?])"   "y" .


     //ddeevv//sseeqquueenncceerr ssuuppppoorrtt [[YY//nn//??]] (( //ddeevv//sseeqquueenncceerr [[////??]]))
         "n"   /dev/sequencer  /dev/music


     DDoo yyoouu wwaanntt ssuuppppoorrtt ffoorr tthhee mmiixxeerr ooff SSGG NNXX PPrroo ?? (( 
           SG NX Pro ?)"   "y"   
          Sound Galaxy NX Pro     
          .


     DDoo yyoouu wwaanntt ssuuppppoorrtt ffoorr tthhee MMVV JJaazzzz1166 ((PPrrooSSoonniicc eettcc..)) ?? ((
          MV Jazz16 (ProSonic etc.) ?)"   "y"
             MV Jazz16.


     DDoo yyoouu hhaavvee aa LLooggiitteecchh SSoouunnddMMaann GGaammeess [[YY//nn//??]] ((  LLooggiitteecchh
        SoundMan Games [//?])"   "y"     
        Logitech SoundMan Games.


    ,    
       .   
    /,   IRQ  DMA.  
       ,  
   .   ,  
   DSP  ,   
      ()  .   
        .h-  
       . ,  ,
         Readme.cards.

       :

       The sound driver is now configured.
       Save copy of this configuration to /etc/soundconf [Y/n/?]

       (  .
            /etc/soundconf [//?])




      "y",      
   ,       
   .

         , , 
   /usr/include/sys/soundcard.h  /usr/include/sys/ultrasound.h
        
  /usr/include/linux,       #include
  <linux/soundcard.h>  #include <linux/ultrasound.h>, .

         .


  44..33..    


     ,    
     .      
     Linux.     
    ,  .      
  (  ),      .



       % ls -l /dev/sndstat
       crw-rw-rw-   1 root     root      14,   6 Apr 25  1995 /dev/sndstat




  ,       
  .          
      (   ).

    ,       
  ,     ,   ,
      Readme.linux  
  /usr/src/linux/drivers/sound,     (root).
     Linux   /dev/MAKEDEV, 
        .

        PC speaker, 
  ,    ,     
     .


  44..44..   LLiinnuuxx   


            
   .      
    (      ).

       ,   
    (     
   ,       dmesg).

       Sound initialization started
       <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
       <Sound Blaster 16> at 0x330 irq 5 dma 0
       <Yamaha OPL3 FM> at 0x388
       Sound initialization complete




          
  (  ).

  ,     ,  
          ( 
       ,   "insmod sound
  trace_init=1").

       ,   
  "Sound initialization started (  )"  "Sound
  initialization complete (  )".    
  ,  ,      .  
           
    .

        "Sound initialization
  started"  "Sound initialization complete",  ,  
     .    ,  
      ,   ,
     /     PnP , 
    .

          
     .     
       .

        /dev/sndstat.  
         
       .  
     :



























  % cat /dev/sndstat
  Sound Driver:3.5.4-960630 (Sat Jan 4 23:56:57 EST 1997 root,
  Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586)
  Kernel: Linux fizzbin 2.0.27 #48 Thu Dec 5 18:24:45 EST 1996 i586
  Config options: 0

  Installed drivers:
  Type 1: OPL-2/OPL-3 FM
  Type 2: Sound Blaster
  Type 7: SB MPU-401

  Card config:
  Sound Blaster at 0x220 irq 5 drq 1,5
  SB MPU-401 at 0x330 irq 5 drq 0
  OPL-2/OPL-3 FM at 0x388 drq 0

  Audio devices:
  0: Sound Blaster 16 (4.13)

  Synth devices:
  0: Yamaha OPL-3

  Midi devices:
  0: Sound Blaster 16

  Timers:
  0: System clock

  Mixers:
  0: Sound Blaster




  ,  ,     
  . "No such file or directory (    )"
  ,       (  4.3).
  "No such device (  )" ,  
         .  
   4.2   .

      "Card config:"  /dev/sndstat 
    (  "(SoundBlaster at 0x220 irq 5 drq 1,5)"), 
  ,    ,   .

         . 
            
    , 



       % cat endoftheworld >/dev/dsp
       % cat crash.au >/dev/audio




  (,     ">"   , 
  ).

  ,   ,  cat    
    ,    .   
       ( ),
      .


    ,       
    -  /dev/sndstat.  
  - ,      
  .

      "I/O error (
  /)",       , 
   "dmesg". ,      
  .     "Sound: DMA (output) timed out -
  IRQ/DRQ config error? (:  DMA () --  
  IRQ/DRQ?)".    ,   
       .  
    ,   IRQ   DMA 
      .     
   --     DMA  IRQ, 
  .

     --      
    .   
  ,   "SoundBlaster (Pro/16) compatible" 
       SoundBlaster.     
          
  (     comp.os.linux.hardware).

         
  <ftp://tsx-11.mit.edu/pub/linux/packages/sound/snd-data-0.1.tar.Z>

       .    
   ,      , 
  ,   :



       # record 4 seconds of audio from microphone
       EDT% dd bs=8k count=4 </dev/audio >sample.au
       4+0 records in
       4+0 records out
       # play back sound
       % cat sample.au >/dev/audio




  , ,      ,  
         .    
  ,       
     .

    ,    ,   
    ,    .   
  ,     .


  44..55..   


          
  ,    ,   
  ,   .    
   .    ,   
      .





  44..55..11..   ..   11:: ,,   
  


      ,      
    ,      .  
        uname:



       % uname -a
       Linux fizzbin 2.0.0 #1 Tue Jun 4 16:57:55 EDT 1996 i386




     /proc/version:



       % cat /proc/version
       Linux version 2.0.0 (root@fizzbin) (gcc version 2.7.0) #1 Tue Jun 4 16:57:55 EDT 1996




      ,    ,  
       .   
  ?    LILO,   
    (  /etc/lilo/install)?   
    ,       
      ?


  44..55..22..   22:: ,,      ..


       --   "dev/sndstat" 
   .      ,  - 
        .  
   ,      
  .


  44..55..33..  ??   33::       
  



  ,        .
        .    
   ,       
  dmesg:



       % dmesg




  




  % tail /var/adm/messages




      ,  - . , 
    .      DOS,
     ,   ,   
      .      
       ,    
       Linux.

    ,      "" , 
     DOS.   DOS 
      .  
  Linux ("" ),  Control-Alt-Delete. ,
     / ,  DMA,  IRQ  Linux 
   ,     DOS.   Readme.cards 
          
  .

         , ,  
  Linux   .       
  ,    .


  44..55..44..   44::       ddsspp??


      /dev/audio   dd
      .     .

     ,      IRQ  DMA
       ( 
   Linux     
  ).

    --  . 
      DOS    .


  44..55..55..       


       ,   
    ,    :


       

       ,    
     ,   Hannu Savolainen   
     ,   

           comp.os.linux  
       (comp.os.linux.hardware --   ;
             "sound"
       ,      )

       Web/Usenet   
          .   
       <http://www.altavista.digital.com>

         Linux (  
      ,      
     )
        

         (The Linux Sound HOWTO)

     emacs   Esc-x doctor :-)


  55..    


       ,    
  ,        Linux. 
    Linux Software Map (  
  Linux),   Internet, /    CD-ROM  Linux
     .

   ,      :


       - ( Sox)

      ( aumix or xmix)

    /   ( play 
     wavplay)

      MOD ( tracker)

      MIDI ( playmidi)

         ,   
    .      
    (    
  ).


  66..       ((FFAAQQ))

        ,  
        .

           
     OSS.


  66..11..       ??

    ""   ,  
  Linux     .


     //ddeevv//aauuddiioo
            /dev/audio0

     //ddeevv//aauuddiioo00
               
        Sun (  ,  
        ioctl-  Sun,  u-law )

     //ddeevv//aauuddiioo11
         - (    
              )

     //ddeevv//ddsspp
            /dev/dsp0

     //ddeevv//ddsspp00
           

     //ddeevv//ddsspp11
           

     //ddeevv//mmiixxeerr
            /dev/mixer0

     //ddeevv//mmiixxeerr00
          

     //ddeevv//mmiixxeerr11
          

     //ddeevv//mmuussiicc
          sequencer

     //ddeevv//sseeqquueenncceerr
           MIDI, FM,  GUS

     //ddeevv//sseeqquueenncceerr22
            /dev/music

     //ddeevv//mmiiddii0000
        1-    MIDI

     //ddeevv//mmiiddii0011
        2-    MIDI

     //ddeevv//mmiiddii0022
        3-    MIDI

     //ddeevv//mmiiddii0033
        4-    MIDI

     //ddeevv//ssnnddssttaatt
             

   PC speaker   :


     //ddeevv//ppccaauuddiioo
         /dev/audio

     //ddeevv//ppccsspp
         /dev/dsp

     //ddeevv//ppccmmiixxeerr
         /dev/mixer


  66..22..       ??

      Sun (.au)   
      /dev/audio.   ()
        /dev/dsp.    
   ,    
    play,       
         -- 
    ..

    wavplay  vplay (  snd-util)  
      WAV files.    
  WAV- Microsoft,    ADPCM.   
   play (  Lsox)     16-
  WAV-.

   splay,    the snd-util,  
       , 
         .


  66..33..      ??

     /dev/audio  /dev/dsp  
   ,      .
  ,   vrec    , 
   ,   ..   
        
  .


  66..44..          ??

         
       SoundBlaster,
  SoundBlaster/Pro, SoundBlaster16, MPU-401  MSS.   
  SoundBlaster ,     SB2_BASE,
  SB2_IRQ, SB2_DMA  (  ) SB2_DMA2, 
    local.h .   
  SoundBlaster   PAS16.

      2.0.x,     make
  config,  local.h,    
  /usr/include/linux/autoconf.h.     :



       #define SBC_BASE 0x220
       #define SBC_IRQ (5)
       #define SBC_DMA (1)
       #define SB_DMA2 (5)
       #define SB_MPU_BASE 0x0
       #define SB_MPU_IRQ (-1)




     (    ):



       #define SB2_BASE 0x330
       #define SB2_IRQ (7)
       #define SB2_DMA (2)
       #define SB2_DMA2 (2)




        :


    GUS ( )

    MAD16 ( )

    AudioTrix Pro ( )

    CS4232 ( )

  66..55..  ))    :: NNoo ssuucchh ffiillee oorr ddiirreecc
  ttoorryy ((   

        .  
     .     ,
  ,      (major)  
  (minor)  (   Linux   
       ).


  66..66..    :: NNoo ssuucchh ddeevviiccee ((  ))
  

         ,  
    /    .
  ,       , 
     ,    ,
     .


  66..77..  ))    :: NNoo ssppaaccee lleefftt oonn ddeevviiccee
  ((   

    ,       
  /dev/audio  /dev/dsp     . 
         
     .    ,
     ________ ______ __________  .

       Linux 2.0      
      ,  
  .         (8k)
        DMA.  
    ,     16M   
      .    
        C- 
    :



       main() {
         int i;
         char mem[500000];
         for (i = 0; i < 500000; i++)
           mem[i] = 0;
         exit(0);
       }





  66..88..  :: DDeevviiccee bbuussyy (( ))   

        .  
  -    .   
    --   fuser:



       % fuser -v /dev/dsp
       /dev/dsp:             USER       PID ACCESS COMMAND
                             tranter    265 f....  tracker



    ,  fuser ,   265
   .       
   (kill)      .   
    fuser      
      .


  66..99..      ::  !!

    Brian Gough,   SoundBlaster, 
   DMA- 1,     
   QIC-02,    DMA 1,   "device
  busy ( )".    FTAPE,    
    .    FTAPE-HOWTO, 
  QIC-02      FTAPE; 
    QIC-117.     
  QIC-117,   QIC-02   FTAPE   .


  66..1100..     

    --       
         "missing IRQ
  ( IRQ)"  "DMA timeout ( DMA)".    
     IRQ   DMA.  , 
           
     .

    "" .    
  IRQ.


  66..1111..        MMOODD


   MOD-    .  
           
         .  
   :


            
      

      

       

         ( Gravis UltraSound)

      Gravis UltraSound,     
   mod-    GUS (
  gmod).


  66..1122..       

   1.0c        
    ioctl().     
          
    .     Readme  
   .

   ,      
  soundcard.h  ultrasound.h   . 
        .
  66..1133..   SSEEGGVV    ,,  
  



     ,      .


  66..1144..        ??


    Readme  CHANGELOG,    
   .


  66..1155..    iiooccttll(())  ....  ??


      _H_a_c_k_e_r_'_s _G_u_i_d_e _t_o _V_o_x_W_a_r_e,  
      .   -- draft 2,  
      <ftp://nic.funet.fi/pub/Linux/ALPHA/sound/>. ,
     ""      . 
     "cd"       FTP
  "dir",    ______  .

    ,      
  4Front Technologies.

     -- Linux Multimedia Guide,  
   .


  66..1166..    ??      
   


       ,     :


      PCM   FM-

        

          

      

     / ,  ,  , 
     ..

   ,  386      
  FM-   8-  .

    MOD-   
  s.    , 
    44kHz    40%   486/50 
  386/25      22 kHz (   8-
      SoundBlaster).    Gravis
  UltraSound    ,  ,   
    .

    ,     
   .

       , 
  ,   sox  ,    
    ( CPU   FPU).   
       .


  66..1177..    PPAASS1166   SSCCSSII AAddaapptteecc 11554422


  (    seeker@indirect.com)

  Linux   1542    330 ( ) 
  334,  PAS   MPU-401    330.  
      MPU-401, - 
     1542     .
    1542   334   .

    ,   1542  PAS-16  16-
  DMA,      16-bit 44 KHz - 
     SCSI-,    1542,  
   .  DMA     
      ,     
   ``PARITY ERROR - SYSTEM HALTED (  - 
  )'',     .   
  -      
  QIC-117  on/off ,     1542  , 
  .   SCSISEL.EXE  Adaptec BBS  
     internet,    BUS ON  
   BUS OFF       . SCSISEL 
   EEPROM,        (patch) 
    DOS  CONFIG.SYS,      
    Linux (     DOS).  
  .


    -    Symphony  
    /     . 
     ,      __ _____  
   ,  PAS-16.   BBS Media Vision 
  SYMPFIX.EXE,       
        Symphony,   
    .     :


          
      ,

      , 

        .

  Young Microsystems      $30 (US);
      ,     
      ( ).   ,
        ProAudio; _____  
  $120       6MHz AT.  
    25-40MHz 386/486 ,     
     12MHz,   
  .


       ,   
   ,       BIOS,  
   . :-)       
   (  ),  DMA  1542 
  ()  / .    
    Media Vision      Symphony
      .  , 3  4-
        " ".   
   _____,     -  , 
       .


  66..1188..        ??


        
   .     .  
     " "  _H_a_c_k_e_r_'_s _G_u_i_d_e _t_o
  _V_o_x_w_a_r_e.


  66..1199..    ..    SSBB1166   IIRRQQ 22,,
     


   286   ,  IRQ 2   
   .   IRQ 9.


  66..2200..    SSoouunnddBBllaasstteerr AAWWEE3322  SSoouunnddBBllaasstteerr1166 AASSPP??


   , Creative Labs      
  .        AWE   
  Linux 2.1.x.


  66..2211..   //     ..   
   LLiinnuuxx,,    DDOOSS,,  


     ""   DOS.   
        CONFIG.SYS.

        
  IRQ  DMA.       Linux  MS-
  DOS/Windows,    .    
         (..
       ).

         
      (reset)   
   ""  ( Ctrl-Alt-Del).

    ,      
  IRQ  DMA  MS-DOS  Linux (   DOS :-).


  66..2222..     DDOOOOMM  LLiinnuuxx


    DOOM  ID software (  Linux) 
     .

           2.90
    ;     "DOOM " 
  .

     16-.    8- 
        ,   ,
     <ftp://sunsite.unc.edu/pub/Linux/games/doom>.


    DOOM    ,   
  (  sndserver)   .

    DOOM    (   DOS).
   musserver     DOOM  Linux. 
     
  <ftp://pandora.st.hmc.edu/pub/linux/musserver.tgz>.


  66..2233..      ,,    ??


   ,     
          
  .      ,  
      ( 
    ).

       ,  
    ( )    

           
       .

    ,      ,    
   no-hlt   .   ,   
    halt     .
          
  append="no-hlt"     LILO.


  66..2244..     ,,   ..


      ,    , 
    :


         
      ( )

           

      ,     
       MS-DOS  ,     
     

           DMA.
         ,   DMA 
    .


  66..2255..      MMSS--DDOOSS..   """"
       


      "  SoundBlaster" 
     Linux       
  SoundBlaster.     
  ( "  16- SB Pro" or "SB  16
  "),     SoundBlaster   "hack" 
       DOS.    
  16- ,     
   Linux (2.0.1  ).


     (  )  
        SoundBlaster. 
   ,      ,
      Mwave.


  66..2266..     88--   LLiinnuuxx..   1166--
  """"  SSoouunnddBBllaasstteerr  


  16-       SoundBlaster 
      8- SoundBlaster Pro.
     16- ,     SoundBlaster
  16       Linux.

        16-  
   MAD16  MSS/WSS.


  66..2277..         LLiinnuuxx??


         
     Linux:


    <ftp://sunsite.unc.edu:/pub/Linux/kernel/sound/>

    <ftp://sunsite.unc.edu:/pub/Linux/apps/sound/>

    <ftp://tsx-11.mit.edu:/pub/linux/packages/sound/>

    <ftp://nic.funet.fi:/pub/Linux/util/sound/>

    <ftp://nic.funet.fi:/pub/Linux/xtra/snd-kit/>

    <ftp://nic.funet.fi:/pub/Linux/ALPHA/sound/>


  66..2288..  ??        
  


         
   .

      /usr/src/linux/drivers/sound/Readme.modules
   /usr/src/linux/Documentation/modules.txt ( 
  /usr/src/linux/README).


  66..2299..   ??       
   


    oplbeep,    
  <ftp://sunsite.unc.edu/pub/Linux/apps/sound/oplbeep-alpha.tar.gz>

      beep  
  <ftp://sunsite.unc.edu/pub/Linux/kernel/patches/misc/modreq_beep.tgz>

   modutils      (patch)  ,
        
   ,   .


          
    PC speaker'   ,     
      .


  66..3300..    VVooxxWWaarree??


       Unix-
      Intel-based,     
      Linux.   1996 ,  
    "VoxWare".      
    VoxWare Incorporated,    
  .    OSS/Free.

  Open Sound System (OSS)      
  Unix-,  4Front Technologies.   ,
    OSS/Free     
  Linux-.

    -- TASD (Temporarily Anonymous Sound Driver) and USS
  (Unix Sound System),    ,   
          .

       4Front Technologies  
  <http://www.4front-tech.com/>.    OSS/Linux   
   1997 Linux Journal.


  66..3311..    PPlluugg aanndd PPllaayy  ??


    Plug and Play    Linux  2.1. 
       
  (workarounds)       Plug and Play.

      Pentium-  Plug and Play BIOS,  
        . ,   
    Linux     / IRQ, 
   DMA    BIOS.

    Plug and Play   Linux,   
     .      Web-
   Red Hat  <http://www.redhat.com/> (     
    Linux).

       Windows95,   
      ,  ""
    Linux   LOADLIN.  
  Windows95  Linux    .

       DOS,     icu,
      SoundBlaster16 PnP    
  DOS,  ""   Linux  
  LOADLIN.  ,  DOS  Linux  
   .

      OSS    
  SoundBlaster16 PnP.       4Front
  Technologies.


  66..3322..  ((   11002244))"" SSooxx//PPllaayy//VVppllaayy 
  ""iinnvvaalliidd bblloocckk ssiizzee 11002244


        1.3.67  
   ,  () ,   
  ioctl SNDCTL_DSP_GETBLKSIZE    4096.   
   -util-3.x.tar.gz (  <ftp://ftp.4front-
  tech.com/ossfree>)    .  
      ,   
     4096 ,     
   .


  66..3333..        ??


       
  .  configure,    
      . 
         
  .

    ,     
         ( 
  " ").


  66..3344..        
   


          
   kerneld      
   .      -  
        
  .         
  ( SoundBlaster16)   . Markus Gutschke
  (gutschk@uni-muenster.de)  .    
    /etc/conf.modules:



       options sound dma_buffsize=65536 && /usr/bin/setmixer igain 0 ogain 0 vol 75




       (   setmixer)
      .   dma_buffsize
    ,  -  option 
    .      
        .

           
      ,     
         
  /etc/rc.d/rc.local.


  66..3355..      


       Readme.linux,   
   ,      root.
       .    
           
    .      ,  
   ,   .

     ,    
  .    ,   .


  66..3366..      IIBBMM TThhiinnkkPPaadd??


         mwave  
   IBM ThinkPad  Linux    
  <http://www.screamin.demon.co.uk/>.


  77..  


      ,   CD-ROM  SCSI
  ,  Linux SCSI HOWTO  Linux CD-ROM HOWTO 
   ,      .

   Sound Playing HOWTO     
       Linux.

  Ultrasound Plug'n'play Mini-HOWTO     
  Linux plug and play  Gravis Ultrasound.

  Linux SoundBlaster 16 PnP Mini-HOWTO    
   Linux plug and play  SoundBlaster 16.

  Linux SoundBlaster AWE64 PnP Mini-HOWTO   
    Linux plug and play  SoundBlaster AWE64.

   ,  _H_a_c_k_e_r_'_s _G_u_i_d_e _t_o _V_o_x_W_a_r_e,  
  <ftp://nic.funet.fi/pub/Linux/ALPHA/sound/>.   
       <http://www.4front-tech.com/pguide>, 
    /dev/sequencer     .

   FAQ      Usenet
  news.announce    
  <ftp://rtfm.mit.edu/pub/usenet/news.answers>:


    PCsoundcards/generic-faq ( PC Soundcard FAQ)

    PCsoundcards/soundcard-faq (comp.sys.ibm.pc.soundcard FAQ)

    PCsoundcards/gravis-ultrasound/faq (Gravis UltraSound FAQ)

    audio-fmts/part1 (  -)

    audio-fmts/part2 (  -)

          
   .    Usenet  
     / .


    alt.binaries.sounds.* (    
     )

    alt.binaries.multimedia (  -)

    alt.sb.programmer (   Soundblaster)

    comp.multimedia (  )


    comp.music (     )

    comp.sys.ibm.pc.soundcard.* (     IBM
     PC)

  Web-       
  <http://viswiz.gmd.de/MultimediaInfo/>. Creative Labs  Web-
    <http://www.creaf.com/>.  MediaTrix   
  <http://www.mediatrix.com/>.

    Linux   "",  
  ,  .      , 
      "help"     
  majordomo@vger.rutgers.edu.      
        ..,   
     .

    ,     
   Readme,      . 
        /usr/src/linux/drivers/sound.

     , Hannu Savolainen,   
    hannu@voxware.pp.fi.    WWW  
   <http://personal.eunet.fi/pp/voxware>.   
         ,
   ,   .

    OSS,     Linux  
  Unix-  ,    
  Web- 4Front Technologies    <http://www.4front-
  tech.com/>.

  _L_i_n_u_x _S_o_f_t_w_a_r_e _M_a_p _(_____ ____________ ___________ _L_i_n_u_x_) (LSM) --
         Linux.
    LSM  ,   _s_o_u_n_d --   
      . LSM    
    FTP-, 
  <ftp://sunsite.unc.edu/pub/Linux/docs/LSM/>.

  Linux Documentation Project     Linux, 
  _L_i_n_u_x _I_n_s_t_a_l_l_a_t_i_o_n _a_n_d _G_e_t_t_i_n_g _S_t_a_r_t_e_d _(_________ _L_i_n_u_x _ ______
  _______).      FTP   
   Linux       .

     :      
    (    CD-ROM 
   ),    _L_i_n_u_x _M_u_l_t_i_m_e_d_i_a _G_u_i_d_e, ISBN
  1-56592-219-0,  O'Reilly and Associates. 
    ,      
  .    call 800-998-9938    
   
  <http://www.ora.com/catalog/multilinux/noframes.html>   
    <http://www.pobox.com/~tranter>.













