\documentclass[letterpaper]{article}
\nonstopmode
\akai
\usepackage{linuxdoc-sgml}
\usepackage{qwertz}
\usepackage{url}
\usepackage[latin1]{inputenc}
\usepackage{t1enc}
\usepackage[english]{babel}
\usepackage{epsfig}
\usepackage{null}
\def\addbibtoc{
\addcontentsline{toc}{section}{\numberline{\mbox{}}\relax\bibname}
}%end-preamble
\setcounter{page}{1}
\title{Alsa-sound-mini-HOWTO}
\author{Valentijn Sessink {\ttfamily valentyn@alsa-project.org}\\ 
ÒëÕß: ÎéÓÀ¿µ {\ttfamily yorkwu@ms4.hinet.net}}
\date{ÖÐÎÄ°æv0.2, 2000Äê6ÔÂ15ÈÕ (Ô­v0.2, 18 May 1999)}
\abstract{±¾ÎÄÃèÊö Linux µÄ AKSA ÒôÐ§Çý¶¯³ÌÊ½µÄ°²×°.
ÓÉì¶ËüÃÇÏàÈÝ. Õâ¸öÒôÐ§Çý¶¯³ÌÊ½¿ÉÒÔÓÃÀ´È¡´úÆ½³£ÓÃµÄÒôÐ§Çý¶¯³ÌÊ½.}


\begin{document}
\maketitle
\tableofcontents

\section{Introduction}

ÕâÊÇ ALSA ÒôÐ§Çý¶¯³ÌÊ½µÄ mini HOWTO. ËüÌá¹©Äú¹Øì¶°²×°¼°Ê¹ÓÃ ALSA
ÒôÐ§Çý¶¯³ÌÊ½µÄ×ÊÑ¶. ALSA Çý¶¯³ÌÊ½ÊÇÍêÈ«Ä£×é»¯, ²¢Ö§Ô® kerneld ¼° kmod.
ËüºÍ OSS API ÏàÈÝ, µ«³¬Ô½ÁËÆä¿ÉÄÜÐÔ. Ò»¾ä»°: ÏàÈÝ, µ«¸üºÃ.




\subsection{ÃúÐ»}

±¾ÎÄ¼þ°üº¬ÁËÎÒ´Ó ALSA Çý¶¯³ÌÊ½ÍøÕ¾µÃµ½µÄ×ÊÑ¶. Æä½á¹¹ÊÇÓÉ SB-mini-HOWTO
·ÖÀ´µÄ, Ö÷ÒªÊÇËüµÄ½á¹¹ºÍÎÒÀíÏëÖÐµÄºÜ½Ó½ü. ¸ÐÐ»ÓÐ 
\onlynameurl{SGML}Tools ÈíÌå,
Ê¹µÃ±¾ HOWTO Ö»ÓÃÒ»¸ö¹²ÓÃµÄÔ­Ê¼µµ, ¿ÉÒÔ²úÉú¶àÖÖ¸ñÊ½. Ð»Ð» Erik Warmelink
Ð£ÔÄ(proof reading), »¹ÓÐ Alfred Munnikes Ìá¹©ºÜ¶àÎÊÌâºÍÓÐÖúµÄ½¨ÑÔ, Yamahata
Isaku ·­Òë³ÉÈÕÎÄ, ÒÔ¼° Miodrag Vallat ·­³É·¨ÎÄ. ½ÓÏÂÀ´, Steve Crowd
ºÜºÃµÄÐ£¶©ÁËÈ«ÎÄ, ÒÔ¼° Marc-Aur`ele Darche, Piotr Ingling, Juergen Kahrs
¼° Tim Pearce Ìá¹©ÓÐÓÃµÄÐ¡¼¼ÇÉ(tip)¼°Ôö²¹.




\subsection{°æ±¾ÑØ¸ï}

1.4 °æ - 1999 Äê 5 ÔÂ 18 ÈÕ. ¼ÓÈëÁË·¨ÎÄ°æµÄ URL, ¸ÄÁË¸ü¶à URL.

1.3 °æ - 1999 Äê 5 ÔÂ 16 ÈÕ. Ð»Ð» Jaroslav, ÔÚ ALSA ¼Æ»­ÍøÕ¾½¨ÁË±¾ HOWTO
µÄÐÂ¼Ò. Òò´Ë, µçÓÊ¼°ÍøÕ¾Î»Ö·ÓÐÁËÐ©¸Ä±ä.

1.2 °æ - 1999 Äê 5 ÔÂ 11 ÈÕ. ¼¸´¦¸üÐÂ.

1.1 °æ - 1999 Äê 3 ÔÂ 11 ÈÕ. ÔÚÐÂµÄ 0.3
°æÇý¶¯³ÌÊ½ÖÐ¼ÓÈëÁËÒ»Ð©ÒôÐ§¿¨µÄÇý¶¯³ÌÊ½. Ð´ÁËÒ»µã¹Øì¶ 2.2 °æºËÐÄµÄ²¿·Ý.

1.0 °æ - 1999 Äê 2 ÔÂ 8 ÈÕ. ÔÚÎÊÌâ½â¾öÄÇ½Ú¼Ó½øÁËÐ©¶«Î÷, ¿´À´ÂùÍêÕûÁË.

0.3 beta °æ - 1999 Äê 1 ÔÂ 20 ÈÕ. ÔÚ ALSA ÍøÕ¾ÉÏÓÐÁËÁ¬½á. ¹þ!
ÖÕì¶ÊÇÕýÊ½µÄÁË!

0.2 alpha °æ. 1999 Äê 1 ÔÂÖÐ. µÚÒ»¸ö sgml °æ.

0.1 alpha °æ. 1999 Äê 1 ÔÂ. µÚÒ»°æ, ¶àÊýÊÇ HTML. 

Still: please submit any patches in plain English, you native speakers!
»¹ÓÐ: Ê¹ÓÃÓ¢ÓïµÄ¸÷Î», Çë¶à¼Ä´¿Ó¢ÎÄµÄ patch!




\subsection{±¾ÎÄ¼þµÄÐÂ°æ±¾ÔÚÄÄ?}

×îÐÂ°æ±¾¿ÉÔÚ\onlynameurl{http://www.alsa-project.org./\~{}valentyn}ÕÒµ½.

ÆäËü¸ñÊ½(È«²¿µÄ html, sgml, txt)ÔÚ \onlynameurl{other-formats} Ä¿Â¼ÏÂ.

Yamahata Isaku ·­ÒëÁËÈÕÎÄ°æ, ½«»á·ÅÔÚÈÕ±¾ ALSA ÍøÕ¾, \onlynameurl{http://plaza21.mbn.or.jp/\~{}momokuri/alsa/index.html}

Miodrag Vallat ·­ÁË·¨ÎÄ°æ, ¿ÉÔÚ 
\onlynameurl{http://www.freenix.fr/unix/linux/HOWTO/mini/Alsa.html}ÕÒµ½.

Èç¹ûÄú½«±¾ÎÄ¼þ·­³ÉÆäËüÓïÑÔ, ÇëÈÃÎÒÖªµÀ, ÎÒ½«ÔÚÕâ¶ù×ö¸öÁ¬½á.




\subsection{»ØÀ¡}

Õâ·Ý HOWTO ÎÄ¼þ, ÐèÒª¸÷Î»¶ÁÕßÐ­Öú, ²ÅÄÜÔ½À´Ô½ºÃÓÃ. Èç¹ûÄúÓÐÈÎºÎ½¨Òé, ÐÞÕý,
»òÒâ¼û, Çë¸æËß×÷Õß (\onlynameurl{alsa-howto@alsa-project.org})
ÎÒ½«»áÔÚÏÂÒ»°æÊÔÖø¼ÓÈëÕâÐ©Òâ¼û.



Çë×¢Òâ: ÎÒ»¹Ã»ÊÕµ½ºÜ¶à¹Øì¶ ALSA Çý¶¯³ÌÊ½µÄÐÅ¼þ, ÈÎºÎÔö¼Ó¶¼ºÜ»¶Ó­. ¼´Ê¹ÊÇ
"Ð»Ð»Äã..." ¶¼ºÃ. Ò²ÐíÎÄÖÐ¼ÓÈë "ÎÒÐÀÉÍ´ó°ëÄÚÈÝ" »ò "ÕâÀïÎÒ»¹ÊÇ¿´²»Ì«¶®"
ÕâÐ©»°²¢²»ÊÇºÜÀ§ÄÑ°É! (?)
(Ô­ÎÄÊÇ
Please note: I do not get a lot of mail about the ALSA drivers and any addition is welcome. Even a 
``thank you for'' is appreciated - maybe it's not too much work to add a ``I appreciated most'' or 
``this-or-that was not immediately clear to me''-section.
)



Èç¹ûÄúÔÚÎ¨¶Á¹âµúÉÏ»òÒÔÓ²¿½±´ÐÎÊ½·¢ÐÐ´ËÎÄ¼þ, ÇëÄú¸½ËÍÎÒÒ»·Ý. ÇëËÍµ½ÎÒµÄÕæÊµµØÖ·.
Ò²Çë¿¼ÂÇÒ»ÏÂ¶Ô Linux ÎÄ¼þ¼Æ»­×÷µã·îÏ×, ÒÔÖ§³Ö Linux µÄÃâ·ÑÎÄ¼þ. ÇëºÍ
Linux HOWTO Ð­µ÷ÈË Tim Bynum 
(\onlynameurl{linux-howto@metalab.unc.edu} )
ÁªÂçÒÔµÃµ½¸ü¶à×ÊÑ¶.




\subsection{É¢²¼Ê±µÄ×¢ÒâÊÂÏî}

Copyright 1998/1999 Valentijn Sessink

±¾ÖÐÎÄ°æÖ®°æÈ¨Îª Valentijn Sessink ¼° ÎéÓÀ¿µ ËùÓÐ (1999)

(°æÈ¨ÐûÑÔÔ­ÎÄÕÕµÇ)



This HOWTO is free documentation; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2 of the License, or (at your
option) any later version.



±¾ HOWTO ÊÇ×ÔÓÉÎÄ¼þ; Äú¿ÉÒÔÔÚºÏºõÓÉ×ÔÓÉÈíÌå»ù½ð»á³ö°æµÄ GNU
Ò»°ã¹«¿ªÖ´ÕÕËùÔØµÄÌõ¼þÏÂÖØÐÂÉ¢²¼¼°/»òÐÞ¸ÄËü.
Äú¿ÉÒÔÑ¡ÓÃ¸ÃÖ´ÕÕÖ®µÚ¶þ°æ»ò(ÈÎÄúÑ¡)ÆäááµÄ°æ±¾.



This document is distributed in the hope that it will be useful, but
{\bfseries without
any warranty}; without even the implied warranty of
{\bfseries merchantability}
or {\bfseries fitness for a particular purpose}. See the GNU General Public
License for more details.



±¾ÎÄ¼þÖ®É¢²¼, ÊÇÏ£ÍûÄÜÓÐÓÃ, µ«{\bfseries ²»Ìá¹©ÈÎºÎ±£Ö¤}; ¼´Ê¹ÊÇ
{\bfseries ÉÌÒµÉÏ} »ò {\bfseries ºÏì¶ÌØ¶¨ÓÃÍ¾} µÄÒþº¬±£Ö¤ÒàÎÞ. ÏêÇéÇë¿´ GNU
Ò»°ã¹«¿ªÖ´ÕÕ.



You can obtain a copy of the GNU General Public License by writing to
the \onlynameurl{Free Software Foundation}, Inc., 675
Mass Ave, Cambridge, MA 02139, USA.



Äú¿ÉÒÔÐ´ÐÅµ½\onlynameurl{×ÔÓÉÈíÌå»ù½ð»á},
µØÖ·ÊÇ  675 Mass Ave, Cambridge, MA 02139, USA. À´È¡µÃ GNU Ò»°ã¹«¿ªÖ´ÕÕ.






\section{ÔÚ¿ª¶¯Ö®Ç°}






\subsection{Ð÷ÂÛ}

±¾ÎÄ¼þ³¢ÊÔ°ïÖúÄúÔÚ Linux ÏÂ°²×°¼°Ê¹ÓÃ ALSA ÒôÐ§Çý¶¯³ÌÊ½. ²Î¿¼ÏµÍ³Ê¹ÓÃ AMD/K6
(x86 ÏàÈÝ)µÄ»úÆ÷, ×° Slackware 3.5 ·¢ÐÐÌ×¼þ. ²»¹ýÓ¦¸Ã×°ÔÚÈÎºÎÆäËü Linux
·¢ÐÐÌ×¼þ¶¼²»³ÉÎÊÌâ. ÓÉÎÄ¼þÖÐ ALSA Çý¶¯³ÌÊ½ÊÇ·ñ¿ÉÔÚÆäËüÆ½Ì¨Ê¹ÓÃ²»µÃ¶øÖª.
Alpha ÒÑ¾­²âÊÔÖ¤Ã÷¿ÉÓÃ. ÎÒÕâ¶ùÖ»ÓÐ x86 PC, ËùÒÔÄúÒªÊÇÓÐÈÎºÎ¶àµÄ×ÊÁÏ¶¼ºÜ»¶Ó­.

¶Á Linux Sound HOWTO(Çë¿´ÆäËü HOWTO ÄÇÒ»½Ú)¿ÉÄÜ¸üÓÐ°ïÖú, µ«ÄÇ¸ö HOWTO
Ö÷ÒªÊÇÔÚÌÖÂÛºËÐÄÄÚ½¨µÄÒôÐ§Çý¶¯³ÌÊ½.


\subsection{¹Øì¶ ALSA Çý¶¯³ÌÊ½µÄÒ»°ã×ÊÑ¶}

ALSA ÒôÐ§Çý¶¯³ÌÊ½Ô­±¾ÊÇÐ´À´È¡´ú Gravis UltraSound ¿¨µÄ Linux ºËÐÄÇý¶¯³ÌÊ½µÄ.
µ±ÊµÖ¤ÕâÈ¡´úµÃºÜ³É¹¦, ×÷Õß±ã¿ªÊ¼ ALSA ¼Æ»­, ÒÔÍêÈ«Ä£×éµÄÉè¼Æ, 
Ð´Ò»¸ö¸ø¼¸ÖÖÒôÐ§¾§Æ¬µÄÒ»°ãÇý¶¯³ÌÊ½.

ËüºÍ OSS/Free ¼° OSS/Linux ÒôÐ§Çý¶¯³ÌÊ½ÏàÈÝ(ºËÐÄµÄÇý¶¯³ÌÊ½), µ«ËüÓÐ±È OSS
Çû¶¯³ÌÊ½¸üºÃµÄ±¾Éí½éÃæ. Ò»Ð©ÓÅµã¿ÉÒÔÔÚ\onlynameurl{http://www.alsa-project.org/intro.html}¿´µ½.

ALSA ¼Æ»­Ö÷ÍøÒ³ÔÚ \onlynameurl{http://www.alsa-project.org/}




\subsection{Ö§Ô®µÄÓ²Ìå}

ALSA Çý¶¯³ÌÊ½½öÖ§Ô®²¿·ÝµÄÒôÐ§¿¨. ÔÚ±¾ÎÄÐ´×÷Ê±, ÒÔÏÂµÄ¿¨ÓÐ±»Ö§Ô®:
\begin{itemize}
\item Ê¹ÓÃ Trident 4D Wave DX/NX ¾§Æ¬µÄ¿¨, ¸ÐÐ» Trident Microsystem Ìá¹©ÁË ALSA
"µÚÒ»ÊÖ" GPL Çý¶¯³ÌÊ½(½ö MIXER ¼° PCM Éè±¸), ÒÔ¼°ËûÃÇµÄ 4D Wave PCI
ÒôÐ§¾§Æ¬µÄÎÄ¼þ.

Çë¿´ http://www.tridentmicro.com/HTML/products\%20folder/audio.htm 
µÃµ½¸ü¶à×ÊÑ¶. ÕâÇý¶¯³ÌÊ½ÏÖÒÑÔÚ CVS, ½«ÔÚ ALSA 0.3.0-pre5 ÖÐ¼ÓÈë.
\item Gravis Ultrasound (GUS): "PnP",~ Extreme, Classic/ACE, MAX
\item Ê¹ÓÃ GUS ¾§Æ¬µÄ¿¨: Dynasonic 3-D, STB Sound Rage 32, UltraSound
32-Pro (STB)
\item Éù°Ô¿¨: 1.0, 2.0, Pro, 16, AWE32/64, PCI64
\item ESS AudioDrive ESx688
\item ESS ES18xx (chipsets). Çë×¢ÒâÎÒ¸öÈËÔÚ ESS1888 ÉÏ¾­Àú¹ýºÜ¶àÂé·³.
Õâ¸öÇý¶¯³ÌÊ½µÄ¿ª·¢ÕßÒÑ¾¡Á¦ÁË, but to no avail.
\item ESS Solo-1 ES1938
\item Yamaha: OPL3-SA2, OPL3-SA3 (¾§Æ¬×é)
\item OAK Mozart
\item Schubert 32 PCI (PINE, S3 SonicVibes PCI ¾§Æ¬×é)
\item Ensoniq AudioPCI ES1370/1371 PCI ÒôÐ§¿¨ (Soundblaster PCI64)
\item SonicVibes PCI ÒôÐ§¿¨ (PINE Schubert 32 PCI)
\end{itemize}

½ÓÖøÒ»´óÆ±µÄ Crystal Semiconductors µÄ¿¨¶¼Ö§Ô®. ÕâÐ©¾§Æ¬¿ÉÔÚºÜ¶àÓ²ÌåÉÏ¿´µ½,
ÓÐÔÚÒôÐ§¿¨ÉÏµÄ(Èç Philips PCA ÏµÁÐ), Ò²ÓÐÖ÷»ú°åÄÚ½¨µÄ(Èç IBM Aptiva, Dell
computers) ÒÔÏÂµÄ¾§Æ¬×éÓÐÖ§Ô®.
\begin{itemize}
\item 4232
\item 4232A
\item 4235
\item 4236B
\item 4237B
\item 4238B
\item 4239
\end{itemize}

¸üÐÂµÄÁÐ±íÔÚÇý¶¯³ÌÊ½Ì×¼þÖÐµÄ doc/SOUNDCARDS ÖÐ¿ÉÕÒµ½.


\subsection{ÆäËü HOWTO}

ALSA-sound-mini-HOWTO Ö»ÊÇÃÔÄã°æ. ÓÐÐ©ÇéÐÎÏÂÕâÆª¾ÍÓÐµã¼òÂÔÁË, ¿´ÆäËü HOWTO
¿ÉÄÜ¶ÔÄúÓÐ°ïÖú. ÎÒ»áµã³öÄú³¢ÊÔ°²×° ALSA Çý¶¯³ÌÊ½Ê±¿ÉÄÜ»áÅöÉÏµÄÒ»Ð©×´¿ö.
Ò»°ãÀ´Ëµ, HOWTO ¿ÉÒÔÔÚ metalab(ÏÈÇ°µÄ
sunsite)µÄ¾µÉäÕ¾ (mirror site)ÕÒµ½. Òò´ËÇëÏÈÕÒÕÒ\onlynameurl{http://metalab.unc.edu/LDP/mirrors.html}, È¥ÀëÄã×î½üµÄ¾µÉäÕ¾ÔÄ¶Á.
Äú¿ÉÒÔÔÚ LDP/HOWTO Ä¿Â¼ÏÂÕÒµ½ HOWTO ÎÄ¼þ. Çë×¢Òâ: ±¾ÎÄ¼þµÄÁ¬½áÊÇÏà¶Ôì¶
/LDP/HOWTO/mini µÄ. Èç¹ûÄú´Ó¾µÉäµÃºÜÒ»ÖÂµÄÕ¾Ì¨¿´, Äú¾ÍÄÜÕÒµ½ÕâÐ© HOWTO.

ÁíÍâ¶Ô 2.2.x ºËÐÄ×÷µã²¹³ä. ÔÚ 2.2.x ÏµÁÐºËÐÄÀï, ÒôÐ§Ö§Ô®¾ÍÈçÍ¬ÆäËüÖ§Ô®Ò»°ã,
Ëü»¹ÄÜÓÃ, µ«ºÍÄúÏ°¹ßµÄÓÃ·¨²»Í¬. ±¾ HOWTO (¾ÍÏñÆäËü HOWTO Ò»Ñù) ÒÔ 2.0
ÏµÁÐºËÐÄÎªÖ÷, ²»¹ýÎÒ»áÊÔÖøÖ¸Ã÷Á½ÕßÖ®²»Í¬µã. ÎÒ½«ºÜ¸ßÐË¼ÓÈëÈÎºÎÊ¹±¾ HOWTO
ÄÜ¸úÉÏ 2.2 ÏµÁÐµÄ¶«Î÷.




\subsubsection{ÒôÐ§¿¨}

Ò²ÐíÄúÒÑ¾­ÂòÁËÆ¬ÒôÐ§¿¨, ÉõÖÁÒÑ¾­×°ÔÚÄúµÄµçÄÔºÃ¼¸ÄêÁË. ÏÖÔÚÄú¿ÉÒÔÓÃËüÁË!
¿ÉÒÔÏÈ¿´¿´ \onlynameurl{Sound-HOWTO},
¿´¿´ÊÇ²»ÊÇÖµµÃÃ°Õâ¸ö·çÏÕ. (ÄúÒ²ÐíÏëÂòÐÂµÄÊ²÷á Mega-Rumble-Blaster µÄ¿¨, ÊÔÊÔ
ALSA Çý¶¯³ÌÊ½.




\subsubsection{Ëæ²å¼´ÓÃµÄ¿¨}



¶àÊýÔÚ Intel Æ½Ì¨µÄÐÂÒôÐ§¿¨ÊÇ ISA PnP ¿¨, ÊÇ "Plug and Play" µÄËõÐ´.
ÆäÒâÊÇÖ¸ÕâÕÅ¿¨±ØÐë¾­ÓÉ×÷ÒµÏµÍ³Éè¶¨. Õâ±ØÐëÔÚ¿ª»úÊ±¾­ÓÉÒ»¸ö³ÌÐòÍê³É.
ÄúÒ²ÐíÐèÒªÔËÓÃ PnP-utils Ì×¼þÀ´Íê³ÉÉè¶¨. ×î½üµÄÃ¿ÖÖ Linux
·¢ÐÐÌ×¼þ¶¼°üº¬ÕâÐ©¹¤¾ß. ÓÃ·¨Çë²ÎÕÕ
\onlynameurl{Plug-and-Play-HOWTO}

ALSA Çý¶¯³ÌÊ½ËÆºõ¶ÔÒ»Ð©¿¨ÓÐ×öÒ»Ð©×Ô¼ºµÄ ISA Ëæ²å¼´ÓÃÖ§Ô®. È»¶ø²»ÐÒµÄ, ÒòÎªÎÒ
ÎÞ·¨ÕÒµ½Ïà¹ØÎÄ¼þ, ÎÒÎÞ·¨ÏòÄúËµÃ÷Ôõ÷á×ö. Èç¹ûÓÐÈËÏëÊÔ ALSA ÒôÐ§Ö§Ô®µ«²»ÏëÓÃ
ISA-PnP-tools, Çë¸øÎÒÒ»µãËµÃ÷. 




\subsubsection{¿ÉÔØÈëÄ£×é}

ALSA ÒôÐ§Çý¶¯³ÌÊ½ÊÇ½¨ÎªÄ£×éµÄ. Äú¿ÉÒÔÔÚ \onlynameurl{Kernel-HOWTO} ÖÐµÃµ½¹Øì¶Ä£×éµÄ¸ü¶à×ÊÑ¶. Ò²ÓÐ¸ö module-HOWTO, µ«Ä¿Ç°ÒÑ
ÎÞÈËÎ¬»¤; ÇëÔÚ Howto-HOWTO ÄÇÀï¿´¿´ÎÞÈËÎ¬»¤µÄÎÄ¼þÄÇÐ¡½Ú. ÓÐ¸ö
\onlynameurl{Modules-mini-HOWTO}
»òÐíÓÐÓÃ. (?)




\subsubsection{Kerneld}

ÁíÍâÓÐÒ»¸ö¶ÔÄ³Ð©ÈËÓÐÓÃµÄ HOWTO ÊÇ \onlynameurl{Kerneld-mini-HOWTO}. Kerneld ÊÇ¸öÔÚÐèÒªÊ±²Å°²×°¼°ÒÆ³ýºËÐÄÄ£×éµÄ
³£×¤³ÌÊ½(daemon). (±ÊÕß¶Ô´ËÃ»ÓÐ¾­Ñé, ËùÒÔ»¶Ó­Ìá¹©ÈÎºÎ×ÊÑ¶. ALSA Çý¶¯³ÌÊ½ÎÄ¼þ
°üº¬ÁËÒ»Ð©¹Øì¶Éè¶¨ kerneld µÄ×ÊÑ¶, ²¢ÒÑ°üº¬ì¶±¾ mini-HOWTO.)




\section{ÈçºÎ°²×° ALSA ÒôÐ§Çý¶¯³ÌÊ½}






\subsection{ÄúÐèÒªÊ²÷á}



\begin{itemize}
\item Ò»Ì×ÄÜ¶¯µÄ Linux ÏµÍ³(Èç Slackware ·¢ÐÐÌ×¼þ), ²¢ÓÐ°²×°¿ª·¢¹¤¾ßÌ×¼þ(Ïñ gcc, 
make µÈ).)
\item Ö§Ô®µÄÒôÐ§¿¨
\item Ò»Ð© Linux µÄÖªÊ¶(Äú×ÜÒªÏþµÃ "ls", "cd", "tar" µÈÔõ÷áÓÃ. )
\item root ÕÊºÅ
\end{itemize}

Èç¹ûÄúÓÐ PnP ¿¨, ÄúÒ²ÐèÒª:
\begin{itemize}
\item isapnptools ÈíÌåÌ×¼þ
\end{itemize}

ÔÚÇý³ÌÊ½Ä¿Â¼ÖÐµÄ INSTALL µµÄÚÎÄÌáµ½¶ÔÓÐÐ©¿¨Çý¶¯³ÌÊ½ÄÚÒÑ¾­ÄÜ´¦Àí PnP µÄÖ§Ô®.
ÎÒÒ²´Ó Jaroslav ÄÇ¶ùµÃµ½Ò»ÑùµÄÂÛµã. Èç¹ûÎÒ½«À´µÃµ½¸ü¶à×ÊÑ¶, ÎÒ»á½«ËüÃÇ¼Ó½ø±¾
mini-HOWTO.
(Ô­ÎÄÊÇ
The INSTALL text in the driver directory suggests that for some cards, PnP
support is native. I also received a suggestion from Jaroslav about this.
When I get further information about this topic I will add it to this
mini-HOWTO.
$\}$

Çë×¢ÒâÈç¹ûÄúÏëÊ¹ÓÃ ALSA Çý¶¯³ÌÊ½, ÄÇ÷áÄú²»Ó¦¸ÃÏÈÔØÈëÈÎºÎÆäËüÒôÐ§Çý¶¯³ÌÊ½.
Èç¹ûÄúµÄºËÐÄÖÐÄÚº¬ÒôÐ§Çý¶¯³ÌÊ½, ÄÇ÷áÓÐ±ØÒªÖØ±àÒëºËÐÄ. Èç¹ûÄúÕýÔÚÊ¹ÓÃ¾ÉµÄ
sound.o Ä£×é, Äú±ØÐë½â³ýËü. Èç¹ûÄúÊ¹ÓÃ kerneld, Õâ¿ÉÄÜ¾ÍÊÇÒªÄúÉ¾È¥
/lib/modules/{$<$}ºËÐÄ°æ±¾{$>$}/misc Ä¿Â¼ÏÂµÄ sound.o. ÐÂµÄ RedHat
ÏµÍ³µÄÒôÐ§Çý¶¯³ÌÊ½×éÖ¯·½Ê½²»Ì«Ò»Ñù, ÒªÔØÈëºÃ¼¸¸öÄ£×é, ÕâÖÖÇé¿öÄúÐèÒª½â³ýÈ«
²¿µÄÄ£×é. 

2.2 °æºËÐÄ¶ÔÒôÐ§Ôò²ÉÓÃÁËÐÂµÄ·½Ê½. ÄúÓ¦¸ÃÒª°üº¬ÒôÐ§µÄÖ§Ô®! ÊÇµÄ, Ã»ÓÐËµ´í,
ÄúÔÚºËÐÄÖÐ¼ÓÈëÁË¶ÔÒôÐ§µÄÖ§Ô®, µ«Ã»ÓÐ°üº¬ÈÎºÎÒôÐ§¿¨µÄ²¿·Ý.
È»ááÖØ±àÒë¼°°²×°ºËÐÄ, ½ÓÖø±àÒë ALSA Çý¶¯³ÌÊ½.




\subsection{È¡µÃÇý¶¯³ÌÊ½}

ALSA Çý¶¯³ÌÊ½¿ÉÔÚ \onlynameurl{ftp://ftp.alsa-project.org/pub} ÕÒµ½, ²¢ÇÒÔÚ \onlynameurl{ftp://linux.a2000.nl/alsa}
ÓÐÒ»·Ý¾µÉä(mirror). Òª°²×° ALSA µÄÍêÕû¹¦ÄÜ, ÄúÐèÒªÇý¶¯³ÌÊ½,
º¯Ê½¿â¼°Ò»Ð©¹«ÓÃ³ÌÊ½; Ò²¾ÍÊÇËµÈç¹ûÄúÓÉ¾µÉäÕ¾×¥ÄúÓ¦¸Ã \onlynameurl{ftp://linux.a2000.nl/alsa/driver/}alsa-driver-0.3.0-pre4.tar.gz, 
\onlynameurl{ftp://linux.a2000.nl/alsa/lib/}alsa-lib-0.3.0pre4.tar.gz, »¹ÓÐ
\onlynameurl{ftp://linux.a2000.nl/alsa/utils/}alsa-utils-0.3.0-pre4.tar.gz. (à¸,
ÉÏÃæµÄ²»ÊÇÍêÕûµÄÁ¬½á, Äú×îºÃµ½Ô­µØµã¿´¿´ÓÐÃ»ÓÐÐÂ°æ, ²¢×¥×îÐÂµÄ.)




\subsection{½â¿ªÇý¶¯³ÌÊ½}

ÓÃºÏÀíµÄÃüÁîÏñ  tar -zxf $<$file$>$ ½â¿ªÇý¶¯³ÌÊ½.
ÒÔÏÂµÄÊÇÐ´¸øÐÂÊÖ»ò³£Íü¼ÇµÄÈË:
(You extract the drivers by some reasonable command, like the all-time tar
-zxf $<$file{$>$}. For newbies and for those with amnesia:)

\begin{tscreen}
\begin{verbatim}
cd /usr/src
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
tar -zxf /alsa-driver-0.3.0-pre4.tar.gz
\end{verbatim}
\end{tscreen}


(Èç¹û³É¹¦ÁË, Äú¿ÉÄÜÒ»Ö±Ê¹ÓÃ root Éí·Ý½øÏµÍ³, ÕâÊÇ²»¶ÔµÄ, Í£ÏÂÀ´²¢¶ÁÒ»ÏÂ
DOS/Win95-to-Linux-HOWTO. ²»ÊÇÕâÑùµÄ»°,
ÄúÒÑ¾­ÖªµÀÕâÊÇ¹Øì¶ÏµÍ³¹ÜÀí(administrative)µÄÊÂ, ÄúÐèÒª superuser/root È¨ÏÞ.
ËùÒÔ, ÄúÐèÒª root È¨ÏÞ, ÊäÈë su ÒÔ¼°ÃÜÂë.

\begin{tscreen}
\begin{verbatim}
tar -zxf /alsa-lib-0.3.0pre4.tar.gz
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
tar -zxf /alsa-utils-0.3.0-pre4.tar.gz
\end{verbatim}
\end{tscreen}


ÏÂÕâÑùµÄÃüÁîÒ²¿ÉÒÔ, ÇÒ¸üÓÐÈ¤: find \~{} -name alsa* -exec tar -zxf $\{$$\}$ $\backslash$;
(º¢×Ó, ²»ÒªÔÚ¼ÒÊÔÕâ¸ö, ÕâÖ»ÊÇ¸ö¡õÀý¶øÒÑ. )×¢ÒâÈç¹ûÄúÊ¹ÓÃ Netscape
ÏÂÔØÇý¶¯³ÌÊ½, Äú¿ÉÄÜ×¥ÏÂµÄÊÇ½â¿ª¹ýµÄ, µ«ÑÓÉìµµÃû»¹ÊÇ .tgz. Èç¹û tar
±§Ô¹µµ°¸¸ñÊ½²»¶Ô, °Ñ tar ÃüÁîÖÐµÄ "z" Ñ¡ÏîÈ¥µô, ¿ÉÒÔµÃµ½½ÏºÃµÄ½á¹û.




\subsection{±àÒë}

ÔÚÄú¿ÉÒÔ±àÒë¼°Ê¹ÓÃº¯Ê½¿âÒÔÇ°, ÄúÐèÒªÏÈÓÐÇý¶¯³ÌÊ½.
¶øÓÐÁËº¯Ê½¿âáá²Å¿ÉÒÔ±àÒëÊ¹ÓÃ¹«ÓÃ³ÌÊ½. ËùÒÔÎÒÃÇ¿ªÊ¼°É:

\begin{tscreen}
\begin{verbatim}
cd alsa-driver-0.3.0-pre4
\end{verbatim}
\end{tscreen}


(¸øÄÇÐ©²»Ì«ÓÐ¾­ÑéµÄ: ÔÚ "alsa-d" áá½ÓÖø°´ $<$tab{$>$} ("tab" ¼ü). 
ÕâÑù¾Í»á½Ð³ö {\itshape ÃüÁîÁÐ×Ô¶¯²¹Íê(command line completion)\/}.)

(Òë×¢: ÓÐ¸üºÃµÄ·­·¨Âð?)

\begin{tscreen}
\begin{verbatim}
./configure
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
make
\end{verbatim}
\end{tscreen}


ÏÖÔÚÄúÐèÒªÓÃ root Éí·Ý°²×°¶«¶«(¿ÉÄÜÄúÒÑ¾­ÊÇ root ÁË)
\begin{tscreen}
\begin{verbatim}
make install
\end{verbatim}
\end{tscreen}


Èç¹ûËü»ØÓ¦Ïñ "version.h" µµÕÒ²»µ½Ö®ÀàµÄ, Äú¿ÉÄÜÃ»ÓÐÍ×ÉÆ°²×°ºËÐÄÔ­Ê¼Âë.
Òª±àÒë ALSA Çý¶¯³ÌÊ½ÐèÒªºËÐÄÔ­Ê¼ÂëÖÐµÄÒ»Ð©µµ°¸, ËùÒÔÄú°ÑÏëÓÃµÄ
linux-2.x.y.tar.gz ÔÚ /usr/src ÏÂ½â¿ª, ²¢ÏÂ {\ttfamily make menuconfig} ÃüÁî.
(Êµ¼ÊÉÏ, {\ttfamily make symlinks} ¿ÉÄÜ¾Í¹»ÁË). ÏÖÔÚ±àÒëº¯Ê½¿â:

\begin{tscreen}
\begin{verbatim}
cd ../alsa-lib-0.3.0-pre4
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
./configure
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
make
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
make install
\end{verbatim}
\end{tscreen}


OK, ÄúÒÑ¾­³É¹¦ÁË, ÔÙÀ´ÊÇ¹«ÓÃ³ÌÊ½:

\begin{tscreen}
\begin{verbatim}
cd ../alsa-utils-0.3.0-pre4
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
./configure
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
make
\end{verbatim}
\end{tscreen}


\begin{tscreen}
\begin{verbatim}
make install
\end{verbatim}
\end{tscreen}


×¢Òâ: ÔÚµÚÒ»´Î±àÒë¹«ÓÃ³ÌÊ½Ê±¿ÉÏÈ²»´ò "make install".
ÉõÖÁÄú¿ÉÒÔÏÈ²»Òª¶¯º¯Ê½¿â¼°¹«ÓÃ³ÌÊ½, Ö»¼ì²éÒ»ÏÂÈ·¶¨Çý¶¯³ÌÊ½ÄÜ²»ÄÜÓÃ. 




\subsection{×¼±¸Éè±¸µµ}

ÔÚÇý¶¯³ÌÊ½Ä¿Â¼ÏÂÓÐ¸öÃüÁî¸å(script)¿ÉÒÔ°Ñ ALSA µÄÒôÐ§Éè±¸µµ°²×°½ø /dev Ä¿Â¼.
ÔÚÇý¶¯³ÌÊ½Ä¿Â¼ÏÂ´òÈë

\begin{tscreen}
\begin{verbatim}
./snddevices
\end{verbatim}
\end{tscreen}


Èç´ËÓ¦¸ÃÓÐ /dev/snd ×ÓÄ¿Â¼ÁË(ÏÈ¿´¿´ÓÐÃ»ÓÐ. Èç¹ûÄúÉõÖÁÁ¬ "ls" ÃüÁî¶¼²»Êì,
Çë¿¼ÂÇÏÈ¶Á±ðµÄ HOWTO. ÔÚ°²×°±¾Çý¶¯³ÌÊ½Ç°ÄúÓ¦¸ÃÓÐÐ©»ù±¾µÄ Linux ÖªÊ¶²Å¶Ô.)



ÏÖÔÚÄú¿ÉÒÔ°²²åÇý¶¯³ÌÊ½ÁË. ÇëÌøµ½ÏÂÒ»¶Î°É.




\section{ÔØÈëÇý¶¯³ÌÊ½}

ÓÐÁ½ÖÖÊ¹ÓÃ ALSA ÒôÐ§Ä£×éµÄ·½·¨. ±ÊÕß¸öÈË±È½ÏÏ²»¶Ê¹ÓÃÊÖ¶¯µÄ·½·¨, Ò²¾ÍÊÇÔÚ¿ª»ú
Ê±°²²åÇý¶¯³ÌÊ½. ALSA Çý¶¯³ÌÊ½ÊÇÒÔ¿ÉÔØÈë/Ð¶³ýÄ£×éÎªÄ¿±êÀ´Éè¼Æ -- 
ÀýÈçËµËüÃÇ²»»áÔÚÔØÈëááÖØÉèÒôÁ¿ -- ËùÒÔÄú¿ÉÒÔ¼òµ¥µØÊ¹ÓÃ kerneld µÄ·½·¨.

(Òë×¢: Ô­ÎÄÖ±ÒëÎª ALSA Çý¶¯³ÌÊ½Éè¼Æ³É¿ÉÔØÈë/Ð¶³ýÄ£×é, µ«ÒëÕßÈÏÎª OSS Ò²¿ÉÒÔ
Õâ÷á×ö(Ö»²îËü»áÖØÉèÒôÁ¿, ¶ÔÄ£×éÊ¹ÓÃÕßÀ´Ëµ½Ï²»·½±ã, ËäÈ»½â¾ö°ì·¨ÊÇÓÐ(¼û Sound
HOWTO)), Õâ÷á·­ÎÞ·¨Í¹ÏÔ ALSA µÄÓÅµã, ¹Ê·­³ÉÉÏÃæµÄÒâË¼. Ï£ÍûÃ»Îó½â...)

ÇëÒ»¶¨ÒªÔÄ¶Á\ref{backw-compat} {(ÏòÇ°ÏàÈÝ)}Õâ½Ú, 
Èç¹ûÄúÏëÒªºÍÒÔÇ°µÄ³ÌÊ½ÏàÈÝµÄ»°.




\subsection{ÓÃ modprobe °²²åÇý¶¯³ÌÊ½}

Çë×¢Òâ: Èç¹ûÄúÓÐ PnP ÒôÐ§¿¨, ÄúÊ×ÏÈÒªÉè¶¨ÕýÈ·µÄ(»òÖÁÉÙÊÇÒÑÖªµÄ) IO/IRQ/DMA.
Çë¶Á Plug-and-Play-HOWTO. ÄúÒÑ¾­Éè¶¨¹ýÄúµÄ Ëæ²å¼´ÓÃ ÒôÐ§¿¨ÁËÂð? ºÃ,
ÄÇ÷áÇë¼ÌÐø¶ÁÏÂÈ¥. Ö÷Òª²¿·ÝÊÇ "modprobe snd-$<$soundcard{$>$}", ÕâÑùÓ¦¸Ã¾Í¿ÉÒÔ. 
²»¹ý²¢·ÇËùÓÐ°²×°Ì×¼þ¶¼°Ñ /sbin °üº¬ÔÚÄúµÄ PATH »·¾³±äÊýÏÂ. Èç¹ûÄúµÃµ½ "bash:
modprobe: command not found" ÕâÑùµÄ»ØÓ¦, ¿ÉÄÜÊÇÓÉì¶ modprobe Ã»ÓÐÔÚ path ÖÐ.
ÊÔÖøÓÃ "/sbin/modprobe snd-sb16", »òÏë°ì·¨ÕÒ³ö modprobe ¹«ÓÃ³ÌÊ½ÔÚÄÄ.

¶Ô Crystal ¾§Æ¬×éµÄ¿¨À´Ëµ¿ÉÄÜ×îÀ§ÄÑ. ALSA Çý¶¯³ÌÊ½²»¶ÔÕâÐ©¿¨½øÐÐ×Ô¶¯Õì²â.
¸ü½øÒ»²½µÄ×ÊÑ¶¼ÇÔØÔÚÇý¶¯³ÌÊ½Ä¿Â¼ÏÂµÄ INSTALL µµÖÐ. ½ÓÏÂÀ´±ÊÕß¾ÙÁ½¸öÀý×Ó, 
È»áá½ÓÖøÊÇ¸öÁÐ±í:

Gravis UltraSound (GUS) ¼°ÏàÈÝ¿¨:
\begin{tscreen}
\begin{verbatim}
/sbin/modprobe snd-gusclassic
\end{verbatim}
\end{tscreen}

¶ÔÍêÈ« 16 Î»ÔªµÄ SoundBlaster ¿¨ (SoundBlaster 16 (PnP), SoundBlaster
AWE 32 (PnP), SoundBlaster AWE 64 (PnP):
\begin{tscreen}
\begin{verbatim}
/sbin/modprobe snd-sb16
\end{verbatim}
\end{tscreen}





\subsection{ÄÇÕÅ¿¨Ó¦¸ÃÓÃÄÄ¸öÇý¶¯³ÌÊ½?}




\subsubsection{Gravis UltraSound Extreme}



{\ttfamily modprobe snd-gusextreme}


\subsubsection{Gravis UltraSound MAX}



{\ttfamily modprobe snd-gusmax}








\subsubsection{ESS AudioDrive}

ESS AudioDrive ES-1688 ¼° ES-688 ÒôÐ§¿¨

{\ttfamily modprobe snd-audiodrive1688}




\subsubsection{Gravis UltraSound PnP}

Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32 ÒÔ¼°ÆäËüÓÃ
AMD InterWave (tm) ¾§Æ¬µÄÒôÐ§¿¨.

{\ttfamily modprobe snd-interwave}


\subsubsection{UltraSound 32-Pro}

UltraSound 32-Pro (STB ÖÆ Compaq Ê¹ÓÃ) ¼°ÆäËüÊ¹ÓÃ
AMD InterWave (tm) ¾§Æ¬ÒÔ¼°ÓÃ TEA6330T µçÂ·À´×ö bass, treble ¼°Ö÷ÒôÁ¿¿ØÖÆµÄ¿¨.

{\ttfamily modprobe snd-interwave-stb}


\subsubsection{Soundblaster}

8-bit Soundblaster ¿¨ (SoundBlaster 1.0, SoundBlaster 2.0, SoundBlaster
Pro)

{\ttfamily modprobe snd-sb8}


\subsubsection{Soundblaster 16}

16-bit SoundBlaster ¿¨ (SoundBlaster 16 (PnP), SoundBlaster AWE
32 (PnP), SoundBlaster AWE 64 (PnP). 
Çë×¢Òâ±¾Ä£×é²»Ö§Ô® SoundBlaster VibraX16 ÒôÐ§¿¨.

{\ttfamily modprobe snd-sb16}


\subsubsection{Yamaha OPL3-SA2/SA3 ÒôÐ§¿¨}

¹âÊÇ "modprobe snd-opl3sa" ÊÇÎÞÐ§µÄ, Çý¶¯³ÌÊ½²»»á×Ô¶¯Õì²â. Çë¿´ááÃæ.




\subsubsection{S3 SonicVibes}

S3 SonicVibes PCI ÒôÐ§¿¨. (PINE Schubert 32 PCI)

{\ttfamily modprobe snd-sonicvibes}




\subsubsection{Ensoniq/Soundblaster PCI64}

Ensoniq AudioPCI ES1370/1371 PCI ÒôÐ§¿¨. (SoundBlaster PCI 64)

{\ttfamily modprobe snd-audiopci}




\subsubsection{CS4232/4232A}

ËùÓÐÊ¹ÓÃ CS4232/CS4232A ¾§Æ¬µÄÒôÐ§¿¨.
¹âÊÇ "modprobe snd-card-cs4232" Ã»ÓÃ, ²»×Ô¶¯Õì²â, ¿´ááÃæ. 




\subsubsection{4235 ÒÔ¼°ÆäááµÄ}

ËùÓÐÊ¹ÓÃ CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 ¾§Æ¬µÄ. 
¹âÊÇ "modprobe snd-card-cs4236" Ã»ÓÃ, ²»×Ô¶¯Õì²â, ¿´ááÃæ. 




\subsection{²»×Ô¶¯Õì²âÊ±Ôõ÷áÔØÈëÇý¶¯³ÌÊ½}

Èç¹ûÄúÒªÓÃµÄÇý¶¯³ÌÊ½²»×Ô¶¯Õì²â, Äú±ØÐëÔÚÈÃÇý¶¯³ÌÊ½ÔË×÷Ç°ÏÈÌá¹©¶îÍâ×ÊÑ¶.
¸ü¶à×ÊÑ¶¿ÉÔÚÇý¶¯³ÌÊ½Ä¿Â¼ÏÂµÄ INSTALL µµÖÐÕÒµ½.


\subsubsection{OPL3-SA2 ¼° OPL3-SA3}

¸ù¾Ý INSTALL µµ, ÄúÐèÒªÌá¹©Çý¶¯³ÌÊ½Ò»ÇÐ×ÊÑ¶. Èç¹ûÄúÓÃ isapnp-tools
À´³õÊ¼»¯ÄúµÄ¿¨, Ò²Ðí¿ÉÒÔÔÚ /etc/isapnp.conf µµÖÐ¿´µ½ÏñÏÂÃæµÄÖµ:
\begin{tscreen}
\begin{verbatim}
snd_port - control port # for OPL3-SA chip
snd_wss_port - WSS port # for OPL3-SA chip (0x530,0xe80,0xf40,0x604)
snd_midi_port - port # for MPU-401 UART (0x300,0x330), -1 = disable
snd_fm_port - FM port # for OPL3-SA chip (0x388), -1 = disable
snd_irq - IRQ # for OPL3-SA chip (5,7,9,10)
snd_dma1 - first DMA # for Yamaha OPL3-SA chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha OPL3-SA chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
\end{verbatim}
\end{tscreen}


ÄúÒªÓÃ
"modprobe snd-opl3sa snd\_port=0xNNN snd\_wss\_port=0x530 snd\_midi\_port=-1
snd\_fm\_port=0x388 snd\_irq=5 snd\_dma1=0 snd\_dma1\_size=NN snd\_dma2=1 snd\_dma2\_size=NN"
ÃüÁîÀ´ÔØÈëÇý¶¯³ÌÊ½(Ã»ÓÐ midi Ö§Ô®, ÎÒÈÔÈ»ÏàÐÅÈç¹ûÄúÓÐºÏ³ÉÆ÷Ö®ÀàÏëÁ¬ÉÏ Linux
Ö÷»ú, ÄúÐèÒªËü. Èç¹ûÖ»ÊÇÌý MIDI µµ¾Í²»±ØÁË.)

ÉÏÀýµÄ "NN" ÖµÄúÒª¸øÕæÕýµÄÖµ, ÎÒ²»ÏþµÃºÏÀíÖµÊÇ¶àÉÙ, ËùÒÔ²ÅÕâ÷áÐ´. 
ÎÒ²»ÏþµÃ dma ´óÐ¡µÄ²ÎÊýÊÇ²»ÊÇ·ÇÒª²»¿É.


\subsubsection{CS4232/CS4232A ¾§Æ¬}

¸ù¾Ý INSTALL µµËùÑÔ, ¶ÔÕâÐ©¿¨ÄúÒªÌá¹© midi port µÄ×ÊÑ¶. 
×¢Òâ¶ÔÏÂÃæÀýÖÐµÄ¿¨, ËüÊ¹ÓÃ¸ø 3235/6/7/8/9 µÄÇý¶¯³ÌÊ½, 
ÎÒ¸øÁËËùÓÐ×ÊÑ¶(³ýÁË DMA ´óÐ¡), ²»È»Ëü²»»á¶¯. ËùÒÔÄúÒ²Ðí¾ÍÓÃÕâÕû¶ÎÃüÁîÁÐÀ´ÔØ
ÈëÇý¶¯³ÌÊ½°É! Èç¹ûÄúÓÃÁË isapnp-tools, Äú¿ÉÄÜÔÚ /etc/isapnp.conf
ÖÐ¿´µ½ÕâÐ©Öµ:

\begin{tscreen}
\begin{verbatim}
snd_port - port # for CS4232 chip (PnP setup - 0x534)
snd_cport - control port # for CS4232 chip (PnP setup - 0x120)
snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
snd_fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
snd_jport - joystick port for CS4232 chip (PnP setup - 0x200), -1 =
disable
snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
snd_dma1 - first DMA # for CS4232 chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
\end{verbatim}
\end{tscreen}


¶Ô±ê×¼Éè¶¨ÖµµÄ¿¨, ÄúÒªÓÃ
"modprobe snd-card-cs4232 snd\_port=0x534 snd\_cport=0x120
snd\_mpu\_port=-1 snd\_fm\_port=0x388 snd\_jport=-1 snd\_irq=5 snd\_dma1=0 snd\_dma1\_size=NN
snd\_dma2=1 snd\_dma2\_size=NN"
ÃüÁîÀ´ÔØÈëÇý¶¯³ÌÊ½(Ã»ÓÐ midi Ö§Ô®, Çë¿´ Yamaha OPL-3 µÄ×¢ÒâÊÂÏî, ÓÖ,
Ã»ÓÐÖ§Ô®Ò¡¡õ). Èç¹ûÄúµÄ /etc/isapnp.conf ÖÐµÄÖµ²»Í¬, ÄÇ÷áÕâÀïµÄÖµÒ²¸Ã±äÒ»ÏÂ.
(ÓÃÓÃÄúµÄÍ·ÄÔÏëÏë±È½ÏºÃ ;)

ÉÏÀýµÄ "NN" ÖµÄúÒª¸øÕæÕýµÄÖµ, ÎÒ²»ÏþµÃºÏÀíÖµÊÇ¶àÉÙ, ËùÒÔ²ÅÕâ÷áÐ´. 
ÎÒ²»ÏþµÃ dma ´óÐ¡µÄ²ÎÊýÊÇ²»ÊÇ·ÇÒª²»¿É.


\subsubsection{CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips}

¸ù¾Ý INSTALL µµËùÑÔ, ¶ÔÕâÐ©¿¨ÄúÒªÌá¹© midi port ÒÔ¼° control port µÄ×ÊÑ¶. 
×¢Òâ¶Ô CS4237B µÄ¿¨,
ÎÒ¸øÁËËùÓÐ×ÊÑ¶(³ýÁË DMA ´óÐ¡), ²»È»Ëü²»»á¶¯. ËùÒÔÄúÒ²Ðí¾ÍÓÃÕâÕû¶ÎÃüÁîÁÐÀ´ÔØ
ÈëÇý¶¯³ÌÊ½, ²»Ö»ÊÇÓÐ snd\_port ¼° snd\_cport ¶øÒÑ. 
Èç¹ûÄúÓÃÁË isapnp-tools, Äú¿ÉÄÜÔÚ /etc/isapnp.conf ÖÐ¿´µ½ÕâÐ©Öµ:

\begin{tscreen}
\begin{verbatim}
snd_port - port # for CS4232 chip (PnP setup - 0x534)
snd_cport - control port # for CS4232 chip (PnP setup - 0x120)
snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
snd_fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
snd_jport - joystick port for CS4232 chip (PnP setup - 0x200), -1 = disable
snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
snd_dma1 - first DMA # for CS4232 chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
\end{verbatim}
\end{tscreen}


ÄúÒªÓÃ
"modprobe snd-card-cs4232 snd\_port=0x534 snd\_cport=0x120
snd\_mpu\_port=-1 snd\_fm\_port=0x388 snd\_jport=-1 snd\_irq=5 snd\_dma1=0 snd\_dma1\_size=NN
snd\_dma2=1 snd\_dma2\_size=NN"
ÃüÁîÀ´ÔØÈëÇý¶¯³ÌÊ½(Ã»ÓÐ midi Ö§Ô®, Çë¿´ Yamaha OPL-3 µÄ×¢ÒâÊÂÏî, ÓÖ,
Ã»ÓÐÖ§Ô®Ò¡¡õ). 

×¢ÒâÊÂÏî:
\begin{itemize}
\item "NN" ÖµÒª¸øÕæÕýµÄ, ÎÒ²»ÖªµÀºÏÀíÖµÊÇ¶àÉÙ²ÅÕâ÷áÐ´.
\item ÎÒµÄ CS4237B ¿¨Ã»ÓÐÃ÷°×Ö¸¶¨ DMA ´óÐ¡Ò²ÓÃµÃºÜºÃ.
\end{itemize}



\subsection{Ê¹ÓÃ kerneld À´ÔØÈë}

{\ttfamily kerneld} ÊÇ¸öÔÚÐèÒªÊ±²åÈëÄ£×é,
²¢ÔÚ²»ÔÙÊ¹ÓÃÊ±Ð¶³ýËüÃÇµÄ·þÎñ³ÌÊ½(daemon). ÓÉì¶±ÊÕßÃ»ÓÃ¹ý kerneld, ²»ÏþµÃÏÂ
ÃæµÄ×ÊÑ¶×¼²»×¼È·. ÒÔÏÂ×ÊÑ¶À´×Ô ALSA Çý¶¯³ÌÊ½Ì×¼þµÄ INSTALL µµ. ¹Øì¶ kerneld
µÄÏê¾¡×ÊÑ¶¿ÉÔÚ kerneld-mini-HOWTO ÖÐÕÒµ½.

ÕÕÒÔÏÂ²½Öè×ö:
\begin{itemize}
\item ±à¼­ /etc/conf.modules(ááÓÐ¡õÀý)
\item Ö´ÐÐ 'modprobe snd-card', ÆäÖÐ snd-card ÊÇÄúµÄÒôÐ§¿¨Ãû³Æ {[} ÎÒ¾õµÃÆæ¹Ö,
kerneld Ó¦¸Ã¸ºÔðÔØÈëËü²»ÊÇÂð? VS{]}
\end{itemize}

ÕâÊÇ Gravis UltraSound PnP ÒôÐ§¿¨µÄ /etc/conf.modules ¡õÀý:
\begin{tscreen}
\begin{verbatim}
alias char-major-14 snd
alias snd-minor-oss-0 snd-interwave
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-interwave
options snd snd_major=14 snd_cards_limit=1
options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=5
snd_dma1=5 snd_dma2=6
\end{verbatim}
\end{tscreen}


Èç¹ûÄúÏë²å¸ü¶à¿¨, Õâ¶ùÓÐ¡õÀý(ÊÇÍ¬Ê±ÓÐ Gravis UltraSound Classic ¼° Sound
Blaster 16 µÄÇéÐÎ)
\begin{tscreen}
\begin{verbatim}
alias char-major-14 snd
alias snd-minor-oss-0 snd-mixer
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-sb16
alias snd-card-1 snd-gusclassic
options snd snd_major=14 snd_cards_limit=2
options snd-sb16 snd_index=1 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5
options snd-gusclassic snd_index=2 snd_irq=11 snd_dma1=6 snd_dma2=7
\end{verbatim}
\end{tscreen}


Èç¹ûÓÐÁ½Æ¬ Gravis UltraSound Classic ÒôÐ§¿¨, ¾ÍÏñÏÂÀý:
\begin{tscreen}
\begin{verbatim}
alias char-major-14 snd
alias snd-minor-oss-0 snd-mixer
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-gusclassic
alias snd-card-1 snd-gusclassic
options snd snd_major=14 snd_cards_limit=2
options snd-gusclassic snd_index=1,2 snd_port=0x220,0x260 snd_irq=5,11
snd_dma1=5,6 snd_dma2=7,3
\end{verbatim}
\end{tscreen}





\subsection{ÏòÇ°ÏàÈÝ\label{backw-compat}}

Èç¹ûÄúÏë±£Áô OSS/Free »ò OSS/Linux µÄÏàÈÝÐÔ, Äú»¹ÒªÔÙ¼ÓÒ»¸öÇý¶¯³ÌÊ½:
snd-pcm1-oss Çý¶¯³ÌÊ½, Ìá¹© OSS ÏàÈÝÐÔ. ÏÂ
\begin{tscreen}
\begin{verbatim}
modprobe snd-pcm1-oss
\end{verbatim}
\end{tscreen}

ÃüÁî. Õâ½«Ìá¹© /dev/audio ¼° /dev/dsp µÄÖ§Ô®, ¾ÍÏñ OSS/Free (ºËÐÄ)Çý¶¯³ÌÊ½¼°
OSS/Linux (Òª 25 ÃÀ½ðµÄ)Ëù×öµÄÒ»Ñù. ×¢ÒâÕâÖ»ÊÇÄ£Äâ¶øÒÑ.




\section{²âÊÔ¼°Ê¹ÓÃ}

ÏÖÔÚÓ¦¸ÃÊÇÊÔÊÔÇý¶¯³ÌÊ½ÊÇ²»ÊÇÕæÄÜÓÃµÄÊ±ºòÁË. ½ÓÕß¾ÍÊÇÊ¹ÓÃËü.


\subsection{/proc µµ°¸ÏµÍ³}

Äú¿ÉÒÔÔÚ /proc Ä¿Â¼ÏÂÕÒµ½ºÜ¶à¹Øì¶ÄúµÄÏµÍ³µÄÓÐÓÃ×ÊÑ¶. /proc
ÊÇÒ»¸ö"ÐéÄâµÄ"µµ°¸ÏµÍ³, Òâ¼´Ëü²¢·ÇÕæÕý´æÔÚ,
¶øÊÇºÍÄúÕýÔÚÖ´ÐÐµÄ¸÷³ÌÐò¼äµÄÁ¬½á. ÒªÈÃ /proc ¿ÉÓÃ, ÄúÐèÒª½«Ëü±àÒë½øºËÐÄ.
¶àÊý Linux °²×°Ì×¼þÒÑ½«ËüÉèÎªÔ¤ÉèÖµ, µ«Èç¹ûÄúÖØ±àÒë²¢ÇÒ²¢Ã»ÓÐ½« /proc
°ü½øÀ´, ÄÇ÷áÔÚ /proc ÏÂ½«Ê²÷áÒ²Ã»ÓÐ.

/proc/modules ¼ÇÔØÁË¹Øì¶ÔØÈëµÄÄ£×éµÄ×ÊÑ¶. µ± ALSA ÒôÐ§Çý¶¯³ÌÊ½ÔØÈëáá, Èç¹ûÄú
´òÈë cat /proc/modules, Ó¦¸Ã¿´µ½ÏñÕâÑùµÄ¶«Î÷:
\begin{tscreen}
\begin{verbatim}
snd-pcm1-oss      4            0
snd-sb16          1            1
snd-sb-dsp        4    [snd-sb16]      0
snd-pcm1          4    [snd-pcm1-oss snd-sb-dsp]      0
snd-pcm           3    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1]    0
snd-mixer         3    [snd-pcm1-oss snd-sb16 snd-sb-dsp]      1
snd-mpu401-uart   1    [snd-sb16]      0
snd-midi          4    [snd-sb16 snd-sb-dsp snd-mpu401-uart]   0
snd-opl3          1    [snd-sb16]      0
snd-synth         1    [snd-sb16 snd-opl3]     0
snd-timer         1    [snd-opl3]      0
snd               8    [snd-pcm1-oss snd-sb16 snd-sb-dsp snd-pcm1 snd-pcm snd-mixer snd-mpu401-uart snd-midi snd-opl3 snd-synth snd-timer]    0
\end{verbatim}
\end{tscreen}

Èç¹ûÔÚ°²×°Çý¶¯³ÌÊ½Ê±ÓÐÄÄ²½¸ã´íÁË, ÄúÈÔÄÜ¿´µ½Ò»¶Ñ "snd" Éè±¸, µ«Ã»ÓÐÒôÐ§Ö§Ô®.

ÀýÈçËµ(ÇëÇ§Íò²»ÒªÕÕÖøÏÂÃæÏÂÃüÁî, cs4236 Çý¶¯³ÌÊ½ÐèÒª²ÎÊý):
\begin{tscreen}
\begin{verbatim}
win3:# modprobe snd-card-cs4236
/lib/modules/2.0.35/misc/snd-card-cs4236.o: init_module: Device or resource busy
snd-mixer: Device or resource busy
win3:# cat /proc/modules
snd-cs4236        2           0
snd-cs4231        3    [snd-cs4236]    0
snd-timer         1    [snd-cs4231]    0
snd-pcm1          4    [snd-cs4236 snd-cs4231] 0
snd-mixer         3    [snd-cs4236 snd-cs4231] 0
snd-pcm           3    [snd-cs4236 snd-cs4231 snd-pcm1]       0
snd-mpu401-uart   1           0
snd-midi          4    [snd-mpu401-uart]       0
snd-opl3          1           0
snd-synth         1    [snd-opl3]      0
snd-timer         1    [snd-cs4231 snd-opl3]   0
snd               8    [snd-cs4231 snd-timer snd-pcm1 snd-mixer snd-pcm]     0
\end{verbatim}
\end{tscreen}


Äú¿É½åÓÉ¿´ /proc/asound/cards ÄÚÈÝÀ´¿´ÒôÐ§¿¨ÊÇ·ñ´æÔÚ. ÀýÈç:
\begin{tscreen}
\begin{verbatim}
bash$ cat /proc/asound/cards
0 [card1          : SB16 - Sound Blaster 16
                    Sound Blaster 16 at 0x220, irq 5, dma 1&5
\end{verbatim}
\end{tscreen}

ÔÚ¸Õ¸ÕµÄÀý×ÓÖÐ(¾ÍÊÇÎÒÍüÁË¼Ó²ÎÊýµÄ), Êä³ö»áÊÇÏñ:
\begin{tscreen}
\begin{verbatim}
win3:# cat /proc/asound/cards
--- no soundcards ---
\end{verbatim}
\end{tscreen}

Èô CS4236 ¿¨ÄÜÓÃ, ½«ÓÐÒÔÏÂÊä³ö
\begin{tscreen}
\begin{verbatim}
0 [card1         ]: CS4236 - CS4237B
                    CS4237B at 0x534, irq 7, dma 1&0
\end{verbatim}
\end{tscreen}

Èç¹ûÄúÔÙÈý¼ì²éÄúµÄÉè¶¨ÕýÈ·áá, ÈÔÈ»ÕÒ²»µ½ÒôÐ§¿¨, ÄÇ÷áÈ¥¿´¿´ÎÊÌâ½â¾öÄÇ½Ú.

{\ttfamily /proc/asound/} ÐéÄâÄ¿Â¼ÏÔÊ¾ÁË¹Øì¶´ËÇý¶¯³ÌÊ½µÄÐí¶à×ÊÑ¶. Çë×¢Òâ
/proc/asound ÔÚÄúÔØÈëµÚÒ»¸ö ALSA Ä£×éáá²Å»á³öÏÖ. Èç¹ûÃ»ÓÐ /proc/asound,
ÄÇ÷á¾ÍÊÇ "snd" Ä£×éÃ»ÓÐÕýÈ·°²×°ºÃ. Äú¿ÉÒÔÔÚ /proc/asound/cards
µµÖÐÕÒµ½°²×°ºÃµÄ¿¨, È»ááÔÚ /proc/asound/0 ÕÒµ½¹Øì¶ 0 ºÅ¿¨, /proc/asound/1
ÖÐ¹Øì¶ 1 ºÅ¿¨µÄ×ÊÑ¶.

Èç¹û {\ttfamily cat /proc/asound/} ÏÔÊ¾Ïñ
\begin{tscreen}
\begin{verbatim}
      ES1370 DAC2/ADC
      Playback isn't active.
      Record isn't active.
\end{verbatim}
\end{tscreen}

ÕâÊÇËµÄúµÄÇý¶¯³ÌÊ½Ò»ÇÐ¶¼ºÜºÃ, µ«Ä¿Ç°²¢Ã»ÓÐÊÂ×ö(ËùÒÔÒ»ÇÐÕý³£).

»¹ÓÐµÚÈýÖÖÕÒÒôÐ§Éè±¸µÄ·½·¨, ¾ÍÊÇÈç¹ûÄúÓÐ OSS ÏàÈÝÇý¶¯³ÌÊ½, ÄÇ÷á¾ÍÓÐ
/dev/sndstat Éè±¸µµ. ALSA Çý¶¯³ÌÊ½»áÌåÌùµÄÌáÐÑÄú²»ÒªÒÀÀµÕâÐ©×ÊÑ¶, ËüÖ»ÊÇÎª¸ú
OSS ÏàÈÝ¶ø×öµÄ. ÓÉ /proc/asound ¿ÉÒÔ¼òµ¥µÄµÃµ½¸üºÃµÄ×ÊÑ¶.


\subsection{»ìÒôÆ÷}

Ò»µ©ÄúµÄÒôÐ§¿¨×°ºÃ, ¶ø /proc µµ°¸ÏµÍ³Ò²Õâ÷áÏÔÊ¾áá, Äú¿ÉÒÔÊÔÊÔÕæÕý·¢³öÉùÒô.
Ê×ÏÈÄØ, °²×°¹«ÓÃ³ÌÊ½Ì×¼þ, »òÖÁÉÙ°Ñ "amixer" ÃüÁî·Åµ½Ò»Ð©ºÏÀíµÄµØ·½(Èç
/usr/local/bin). ÏÈÓÃ "amixer" ¿´¿´»ìÒôÆ÷Éè¶¨. amixer
µÄÊä³ö»áËæ¿¨µÄ²»Í¬¶øÓÐºÜ´ó±ä»¯, ÎÒµÄ SoundBlaster16 ÏÔÊ¾:
\begin{tscreen}
\begin{verbatim}
Master         0  % (-14.00dB) : 0  % (-14.00dB)
Bass           0  % (-14.00dB) : 0  % (-14.00dB)
Treble         0  % (-14.00dB) : 0  % (-14.00dB)
Synth          0  % (-62.00dB) : 0  % (-62.00dB)
PCM            0  % (-62.00dB) : 0  % (-62.00dB)
Line-In        0  % (-62.00dB) : 0  % (-62.00dB) Mute
MIC            0  % (-62.00dB) : 0  % (-62.00dB) Mute
CD             0  % (-62.00dB) : 0  % (-62.00dB) Mute
In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
Out-Gain       0  % (-18.00dB) : 0  % (-18.00dB)
PC Speaker     0  % (-18.00dB) : 0  % (-18.00dB)
\end{verbatim}
\end{tscreen}

¶øÎÒµÄ Crystal 4237B µÄÒôÐ§¿¨ÓÐºÜ¶àÆäËüÑ¡Ïî:
\begin{tscreen}
\begin{verbatim}
Master D       0  % (-22.00dB) : 0  % (-22.00dB) Mute
3D Center      0  % (-22.50dB) : 0  % (-22.50dB)
3D Space       0  % (-22.50dB) : 0  % (-22.50dB) Mute
Synth          0  % (-94.50dB) : 0  % (-94.50dB) Mute
FM             0  % (-94.50dB) : 0  % (-94.50dB) Mute
DSP            0  % (-94.50dB) : 0  % (-94.50dB) Mute
PCM            0  % (-94.50dB) : 0  % (-94.50dB) Mute
Line-In        0  % (-34.50dB) : 0  % (-34.50dB) Mute
MIC            0  % (-22.50dB) : 0  % (-22.50dB) Mute
CD             0  % (-34.50dB) : 0  % (-34.50dB) Mute
Record-Gain    0  % (  0.00dB) : 0  % (  0.00dB)
In-Gain        0  % (-18.00dB) : 0  % (-18.00dB)
Loopback       0  % (-94.50dB) : 0  % (-94.50dB) Mute
Mono           0  % (-45.00dB) : 0  % (-45.00dB) Mute
Aux A          0  % (-34.50dB) : 0  % (-34.50dB) Mute
\end{verbatim}
\end{tscreen}


×¢ÒâÒ»ÏÂ "Mute" ÄÇÒ»À¸, CS4237B ÉõÖÁÁ¬Ö÷ÒôÁ¿Ò²µ÷¾²ÒôÁË. ¶Ô CS4237B,
ÎÒ»¹ÒªÏÈ´ò {\ttfamily amixer "master d" unmute} ÒÔáá²ÅÄÜ·¢³öÉùÒô. SoundBlaster
µÄÊä³ö¾ÍÃ»ÓÐ¾²Òô, ²»¹ý {\ttfamily amixer master 100 unmute} »á½«Ö÷ÒôÁ¿½â³ý¾²Òô,
»¹ÉèÎª 100\%. Äú¿ÉÒÔÓÃÊý×Ö, »òÏñ "mute" ¼° "unmute" µÄÎÄ×Ö, »ò¶¼´ò,
À´¿ØÖÆ. ´ò  {\ttfamily amixer "master d" 100; amixer pcm 100 unmute} ¿ÉÒÔ½«
CS4237B ¿¨µÄÖ÷ÒôÁ¿Éè×î´ó, ²¢½« PCM ÒôÁ¿½â³ý¾²Òô²¢ÉèÎª×î´ó. Èç¹û×óÓÒÒª²»Ò»Ñù,
¿ÉÒÔÓÃÃ°ºÅ, Èç {\ttfamily amixer CD 25:50}.(²», ÎÒ²»ÏþµÃÄÇÒ»¸öÊÇÖ¸×óÓÒÉùµÀ,
²»¹ýÎÒÇ¿µ÷Ò»ÏÂÕâÒ²ºÍÄúµÄÀ®°È°Ú·ÅÎ»ÖÃÓÐÃÜÇÐ¹ØÏµ.)

ÄúÓ¦¸ÃÏÂ {\ttfamily amixer cd rec} ÒÔ½« CD µ±×öÂ¼ÒôµÄÒôÔ´. È»ááááÏÂ {\ttfamily amixer
cd norec}ÃüÁî½â³ý´ËÉè¶¨. Èç¹ûÄúÏëÒª¾­ÓÉÂó¿Ë·çÀ´Â¼Ð©¶«Î÷, ÄúÒ²Ðí¿ÉÒÔÏÂ
{\ttfamily amixer record-gain 100; amixer mic 100 rec mute}(Èç¹û²»½«Âó¿Ë·çÊäÈë
µÄ·ÅÒôÉèÎª¾²ÒôµÄ»°, Âó¿Ë·ç»á´ÓÀ®°ÈÊÕµ½±¾ÉíµÄÐÅºÅ, »áÔì³É¸ßÒô²¿·ÝÒôÁ¿½µµÍ.)
È»¶ø²»ÐÒµÄÊÇÎÒÃ»ÄÜ¹»ÓÃ amixer À´¸Ä±ä 3D center ¼° 3D space µÄÒôÁ¿Éè¶¨. Èç¹û
ÓÐÈË³É¹¦ÁË, Çë¸æÖªÎÒ. Õâ¹¤×÷¿ÉÓÉ alsamixer À´½øÐÐ.

ALSA FAQ ÉÏÃæ±íÊ¾¿ÉÒÔÓÃ {\ttfamily cat $<$file{$>$} {$>$}
/proc/asound/\#/mixerC0D0} ÃüÁîÀ´»Ø¸´»ìÒôÉè¶¨, ÆäÖÐ $<$file{$>$}
µÄÄÚÈÝÊÇÓÉ /proc/asound/\#/mixerC0D0 ÖÐÈ¡µÃ. ÎÒÎÞ·¨ÖØÏÖÏàÍ¬µÄ½á¹û,
ÎÒµÄµçÄÔ±§Ô¹´ËÉè±¸ÕÒ²»µ½.


\subsection{/dev/snd/ ÏÂµÄÉè±¸}

ALSA Çý¶¯³ÌÊ½ÔÚ /dev/snd/ Ä¿Â¼ÏÂÓÐ×Ô¼ºµÄÇý¶¯³ÌÊ½. Èç¹ûÄúÓÐÒ»Æ¬ÒôÐ§¿¨,
Äú¿ÉÄÜ¿´µ½ÒÔÏÂÉè±¸:

\begin{tscreen}
\begin{verbatim}
/dev/snd/pcmC0D0 - ÕâÕÅÒôÐ§¿¨µÄÔ­ÉúÒôÐ§Éè±¸.
/dev/snd/mixerC0D0 - µÚ"Áã"ºÅ¿¨µÄ»ìÒôÆ÷Éè±¸.
/dev/snd/controlC0D0 - µÚ"Áã"ºÅ¿¨µÄ¿ØÖÆÉè±¸.
\end{verbatim}
\end{tscreen}

µÚÒ»¸öºÅÂëÊÇÖ¸µÚ¼¸ºÅÒôÐ§¿¨. µÚ¶þ¸öºÅÂëÊÇ´ú±íµ¥¿¨ÉÏµÄÉè±¸ºÅÂë. Ò»ÕÅÓÐÁ½¸ö PCM
Éè±¸µÄÒôÐ§¿¨Ó¦¸ÃÓÐ pcmC0D0 ¼° pcmc0D1 Éè±¸.

ÇëðÞN: ALSA µÄÉè±¸µµÃûºÍ¾É°æÒÑ¾­²»Ò»ÑùÁË. ¾ÉµÄ ALSA Çý¶¯³ÌÊ½ÓÃ
/dev/snd/pcm00 (µÚÒ»¸öÊÇ¿¨, µÚ¶þ¸öÊÇÉè±¸ºÅ). Èç¹û¿´µ½±¾ HOWTO ÖÐ»¹ÓÐÓÃ¾ÉµÄµµÃûµÄ,
ÇëÐ´·â Email ¸øÎÒÒÔ±ã¸üÕý.

ÏÖÔÚÄú¿ÉÒÔ½«ÈÎºÎÄúÏëÌýµÄÒôÐ§µµ¶ª½øµÚÒ»Æ¬¿¨µÄ PCM Éè±¸ÖÐÁË. ÏÖÔÚÊÔÊÔÓÃ cat
°ÑÈÎºÎÎÄ×Öµµ(»òÈÎºÎµµ°¸)ËÍ½ø /dev/snd/pcmC0D0, ¾ÍÏñÕâÑù: {\ttfamily cat
$<$filename{$>$} {$>$} /dev/snd/pcmC0D0}. ÆäÖÐ filename ¿ÉÒÔÊÇÈÎÒâµµ°¸,
Ö»ÒªËü¹»´ó. Èç¹ûÄúÒÑÓÐÏÖ³ÉµÄÒôÐ§µµ, Ò²¿ÉÒÔÊÔÊÔ. ÄúÒ²¿ÉÒÔ×¥ \onlynameurl{http://www.ldp.org/sounds/english.au}. ÕâÊÇ Linux Torvalds ½² Linux
Õâ¸ö×ÖÈçºÎ·¢ÒôµÄ»°. 

ÒôÐ§Éè±¸Ô¤ÏÈ±»Éè¶¨Îª 8000Hz, 8 Î»Ôª. ÕâÒâÎ¶Öø¸ÕÌáµ½µÄ "english.au"
»á·¢³ö½²»°Éù, ¶øÆäËüµµ¿ÉÄÜÖ»»á·¢³öÔëÒô. Èç¹ûÄúÌý²»µ½, Çë¼ì²éÄúµÄÀ®°È, »òÔÙÖ´ÐÐ
amixer Ò»±é»òÈ¥¿´Ò½Ê¦(¸Ã²»»áÊÇ... ÄúµÄ¶ú¶äÁûÁË!?) .
(ÉÔááÄú¿ÉÒÔÓÃÄúÏ²»¶µÄ²¥·Å³ÌÊ½Èç sox »ò mpg123 , ¼òµ¥µÄÀ´·ÅÍêÈ«µÄ 48KHz, 
16 Î»ÔªÉùÒô.)

Èç¹ûÄúÔØÈëÁË "snd-pcm1-oss" Ä£×é, ÄúÒ²¿ÉÒÔÀûÓÃ OSS µÄÏàÈÝÐÔÀ´´æÈ¡ÒôÐ§¿¨.
Á½Õß¼äÓÐÒÔÏÂµÄ¶ÔÓ¦¹ØÏµ:

\begin{tscreen}
\begin{verbatim}
/dev/snd/pcmC0D0 -> /dev/audio0 (/dev/audio) -> ´Î±àºÅ 4
/dev/snd/pcmC0D0 -> /dev/dsp0 (/dev/dsp) -> ´Î±àºÅ 3
/dev/snd/pcmC0D1 -> /dev/adsp0 (/dev/adsp) -> ´Î±àºÅ 12
/dev/snd/pcmC1D0 -> /dev/audio1 -> ´Î±àºÅ 4+16 = 20
/dev/snd/pcmC1D0 -> /dev/dsp1 -> ´Î±àºÅ 3+16 = 19
/dev/snd/pcmC1D1 -> /dev/adsp1 -> ´Î±àºÅ 12+16 = 28
/dev/snd/pcmC2D0 -> /dev/audio2 -> ´Î±àºÅ 4+32 = 36
/dev/snd/pcmC2D0 -> /dev/dsp2 -> ´Î±àºÅ 3+32 = 39
/dev/snd/pcmC2D1 -> /dev/adsp2 -> ´Î±àºÅ 12+32 = 44
\end{verbatim}
\end{tscreen}





\subsection{¶îÍâµÄ×ÊÑ¶}

ÔÚ ALSA Çý¶¯³ÌÊ½Ä¿Â¼ÖÐµÄ INSTALL µµÒ²Ìáµ½ÁËÒ»Ð©Ð¡¼¼ÇÉ,
¸æËßÇý¶¯³ÌÊ½Òª×÷ºÎµ÷ÕûÉè¶¨. ÒÀÕÕ²¥·ÅÉùÒôµÄÓÃÍ¾, Äú¿ÉÄÜÐèÒªÓÃÕâÐ©ÃüÁî.
Ò»°ãµÄ²¥·Å³ÌÊ½, Èç mpg123, sox(³£ÒÔ ``play'' ÃüÁîÀ´Ö´ÐÐ), »ò X11 Ó¦ÓÃ³ÌÊ½Èç
RealPlayer¶¼²»±ØÓÃµ½ÕâÐ©. ÎÒ±¾ÈËÒ²´ÓÃ»ÓÃ¹ý.




\subsubsection{/proc/asound/\#/pcm\#0}



\begin{tscreen}
\begin{verbatim}
"Playback erase" - Çå³ýËùÓÐ¹Øì¶ OSS Ó¦ÓÃ³ÌÊ½µÄ¶îÍâ×ÊÑ¶.
"Playback <app_name> <fragments> <fragment_size> [<options>]"
"Record erase" - Çå³ýËùÓÐ¹Øì¶ OSS Ó¦ÓÃ³ÌÊ½µÄ¶îÍâ×ÊÑ¶.
"Record <app_name> <fragments> <fragment_size> [<options>]"
\end{verbatim}
\end{tscreen}


{\ttfamily $<$app\_name{$>$}} - Ó¦ÓÃ³ÌÊ½Ãû³Æ, °üº¬(½ÏÓÅÏÈ¼Ù¶¨)»ò²»°üº¬Â·¾¶.

{\ttfamily $<$fragments{$>$}} - Æ¬¶Ï(fragment)Êý, ¸ø 0 Ôò×Ô¶¯Ñ¡Ôñ.

{\ttfamily $<$fragment\_size{$>$}} - Ò»¸öÆ¬¶ÏµÄ byte Êý, »ò 0 Ñ¡Ôñ×Ô¶¯.

{\ttfamily $<$options{$>$}} - Ñ¡ÔñÐÔµÄ²ÎÊý

{\ttfamily WR\_ONLY} - Èç¹ûÓÐ¸öÓ¦ÓÃ³ÌÊ½Éè¿ªÆôÄ£Ê½ÎªO\_RDWR,
Êµ¼ÊµÄÈ¨ÏÞ½«¸ÄÎª O\_WRONLY(²¥·Å), ¶Ô Quake µÈºÜÓÐÓÃ...

¼¸¸ö¡õÀý:
\begin{tscreen}
\begin{verbatim}
echo "Playback x11amp 128 16384" > /proc/asound/0/pcm0o
echo "Playback squake 0 0 WR_ONLY" > /proc/asound/0/pcm0o
\end{verbatim}
\end{tscreen}



\subsubsection{/proc/asound/\#card\#/sb16}



\begin{tscreen}
\begin{verbatim}
"Playback 8" -> Çý¶¯³ÌÊ½²¥·ÅÊ±Ö»Ê¹ÓÃ 8-bit DMA Í¨µÀ.
"Playback 16" -> Çý¶¯³ÌÊ½²¥·ÅÊ±Ö»Ê¹ÓÃ 16-bit DMA Í¨µÀ.
"Playback auto" (default) -> Çý¶¯³ÌÊ½×Ô¶¯Ñ¡Ôñ(»áÏÈ³¢ÊÔÊ¹ÓÃ 16-bit DMA Í¨µÀ)
"Record 8" -> Çý¶¯³ÌÊ½Â¼ÒôÊ±Ö»Ê¹ÓÃ 8-bit DMA Í¨µÀ.
"Record 16" -> Çý¶¯³ÌÊ½Â¼ÒôÊ±Ö»Ê¹ÓÃ 16-bit DMA Í¨µÀ.
"Record auto" (default) -> Çý¶¯³ÌÊ½×Ô¶¯Ñ¡Ôñ(»áÏÈ³¢ÊÔÊ¹ÓÃ 16-bit DMA Í¨µÀ)
\end{verbatim}
\end{tscreen}


ÀýÈç: {\ttfamily echo "Record 16" {$>$} /proc/asound/0/sb16}

¸ü½øÒ»²½µÄ×ÊÑ¶Çë²Î¿¼ INSTALL µµ.


\section{Ð¡¼¼ÇÉ¼°ÎÊÌâÅÅ³ý}

ÇëÏÈ¿´¿´ÒôÐ§¿¨Çý¶¯³ÌÊ½Ä¿Â¼µÄ FAQ µµ. ÕâÒ»½ÚÈÔÈ»ÔÚÔöÐÞÖÐ.


\subsection{±àÒëÇý¶¯³ÌÊ½}




\subsubsection{Linux ºËÐÄÔ­Ê¼ÂëÄ¿Â¼Ê÷}

Èç¹û ALSA Çý¶¯³ÌÊ½ÎÞ·¨³É¹¦±àÒë, ³öÏÖÏñÕÒ²»µ½ ``version.h''
»òÆäËüÒýÈëµµ(header files)Ö®ÀàµÄ´íÎó, ÕâÊÇÖ¸ÄúÃ»ÓÐ°²×°ºËÐÄµÄÒýÈëµµ.
ÏÈ»¨µãÊ±¼ä¿´¿´ Kernel-HOWTO, ½«×îÐÂ½üµÄºËÐÄ½â¿ªµ½ /usr/src ²¢ÇÒÏÂ {\ttfamily make
config}ÃüÁî.




\subsection{ÔØÈëÇý¶¯³ÌÊ½}

Çë¼ì²éÒÔÏÂ¸÷Ìõ:




\subsubsection{ÒôÐ§¿¨ÏàÈÝÐÔ}

ÄúÊÇ·ñ°Ù·ÖÖ®°ÙµÄÈ·¶¨ÄúµÄÒôÐ§¿¨ÓÐÖ§Ô®ÄØ? Ç§ÍòÒª¼ÇµÃ¼ì²é. ÓÐÊ±Ò»Æ¬½Ð X123
µÄÒôÐ§¿¨²¢²»È«µÈì¶½Ð X123b µÄ, ÕâÑù¿ÉÄÜ»áÀË·ÑÄúµÄÊ±¼ä.

ÔÚÁíÒ»·½Ãæ, ¼´Ê¹ÊÇÓÐÖ§Ô®µÄ¿¨Ò²¿ÉÄÜ»áÕÒÄúÂé·³ - ÎªÁË°²×°Ò»Æ¬ CS4237B µÄ¿¨,
ºÄÁËÎÒÁ½¸öÐ¡Ê±À´¸ãÇå³þ, ½á¹û·¢ÏÖËµÃ÷ÎÄ¼þÀïÓÐ.
(Ô­ÎÄÊÇ
On the other hand, even a supported card can give you troubles - it took me two hours to
figure out the installation of a CS4237B which was, after all, just a fine example
of RTFM.
)




\subsubsection{``Device busy'' »ò ``unresolved symbols''}

Äú¿ÉÄÜÔÚ 2.0.x °æºËÐÄÖÐ½«ÒôÐ§¿¨Ö§Ô®±à½øºËÐÄÄÚ, »òÊÇÒÑÔØÈë
OSS/Lite(ºËÐÄµÄ)Çý¶¯³ÌÊ½(¿ÉÓÃ{\ttfamily cat /proc/modules}À´¼ì²é).
ÒÆ³ý¸ÃÇý¶¯³ÌÊ½»òÖØÐÂ±àÒëºËÐÄ(Çë¿´ Kernel-HOWTO áá¶¯ÊÖ).

ÔÚ 2.0 °æºËÐÄÖÐµÄÒôÐ§Ä£×é½Ð×ö "sound.o", {\bfseries ²»Ó¦¸Ã}±»ÆôÓÃ. (ËäÈ» ALSA
µÄÇý¶¯³ÌÊ½ "snd.o" ¿ÉÒÔ.)

Èç¹ûÄúµÄºËÐÄÊÇ 2.2.x °æ, ¶øÃ»ÓÐ½«ÒôÐ§Ö§Ô®±àÒë½øÈ¥, ALSA
Çý¶¯³ÌÊ½Ò²»áÎÞ·¨×÷ÓÃ.

ÎÒÒ²ÖªµÀÕâÁ½ÖÖ²»Í¬µÄ×´¿öÁîÈËÀ§ÈÅ, ËùÒÔÎÒÔÚ´ËÔÙ×÷Ò»´Î½âÊÍ. Èç¹ûÄúÓÃµÄÊÇ
{\bfseries 2.0.x°æ}ºËÐÄ ("uname -a"ÃüÁî´«»ØÏñ "Linux penguin 2.0.35 \#6 Wed Sep
23 10:19:16 CEST 1998 i686 unknown") ÄÇ÷áÄú±ØÐë½«ÒôÐ§Çý¶¯³ÌÊ½{\bfseries ÌÞ³ý}µô.

Èç¹ûÄúµÄºËÐÄÊÇ {\bfseries 2.2.x°æºËÐÄ}, ÄÇ÷áÄú{\bfseries ÐèÒªÒôÐ§Çý¶¯³ÌÊ½}. 2.2.x
°æºËÐÄÓ¦¸Ã{\bfseries ½«ÒôÐ§Çý¶¯³ÌÊ½±àÒë½øºËÐÄ, µ«²»¼ÓÈëÈÎºÎÒôÐ§¿¨µÄÖ§Ô®}.
Òò´ËÄúÒªÑ¡ÒôÐ§Ö§Ô®, µ«Ò²È·¶¨²»Òª¼ÓÈëÈÎºÎÒôÐ§¿¨Çý¶¯³ÌÊ½.




\subsubsection{ÓÖ¼û Unresolved symbols}

ÁíÒ»¸öÔì³É "unresolved symbols" Ñ¶Ï¢µÄÔ­Òò¿ÉÄÜÊÇÐÂ°æºËÐÄÅäºÏ¾É°æÇý¶¯³ÌÊ½.
ÇëÔÚÖØÐÂ±àÒëºËÐÄÖ®áá±ðÍüÁËÒ²ÖØÐÂ±àÒë ALSA Çý¶¯³ÌÊ½.
Èç´Ë²Å¿ÉÒÔÈ·¶¨Çý¶¯³ÌÊ½ÄÜÅäÉÏÄúµÄÐÂºËÐÄ.




\subsubsection{¼ì²é PnP Éè¶¨}

È·¶¨ÒôÐ§¿¨Æð¶¯(active)ÁËÂð? ÇëÁíÍâ»¨µãÊ±¼ä¶Á¶Á PnP-HOWTO,
È·ÈÏÄúÒÑÕýÈ·µØÖÂ¶¯(activate)ÁËÄúµÄÒôÐ§¿¨.




\subsubsection{²ÎÊýÓÐÉè¶ÔÂð?}

¼ì²é, ÔÙÈý¼ì²éÄúµÄÒôÐ§¿¨Éè¶¨²ÎÊý. ÇëÐ¡ÐÄ: 534 ²»µÈì¶ 543, 0x534 Ò²²»µÈì¶
534.

Í¬Ê±, ÓÐÐ©ÒôÐ§¿¨ÒªÔØÈëµÄÄ£×é²»ÊÇÄúÔ¤ÆÚµÄÄÇ¸ö. ÐÝÏ¢Ò»ÏÂ, ºÈ±­Æ¡¾Æ»òÊ²÷áµÄ,
È»ááÔÙ¿´¿´Äú modprobe µÄ½á¹û. ÀýÈç Crystal 4232 Ó¦¸Ã²åÈëµÄÇý¶¯³ÌÊ½ÊÇ
snd-card-cs4232, ²»ÊÇ "snd-cs4231". ¶ø SoundBlaster PCI64 Ó¦¸ÃÔØÈëµÄÊÇ
"snd-audiopci", ·Ç snd-es1370. (ÕâÐ©ÔÚÎÄ¼þÖÐ¶¼ÓÐÐ´, ¶ø±ÊÕßÔÚÐ´ÕâÆª HOWTO Ê±,
»¹Ôø»¨ÁËÒ»¸öÍíÉÏÊÔÖøÓÃ snd-cs4231 ÈÃËü·¢³öÉùÒô.) 




\subsection{Çý¶¯³ÌÊ½ÔØÈëÁË... ¿ÉÊÇÃ»ÉùÒô}






\subsubsection{½â³ý¾²Òô}

ALSA Çý¶¯³ÌÊ½¿ÉÒÔÔËÓÃ¶àÊýÒôÐ§¿¨¶¼ÓÐµÄ "¾²Òô" ÄÜÁ¦. Èç¹ûÄúÔØÈëÁËÒôÐ§Çý¶¯³ÌÊ½,
Ò»ÇÐ¿´ÆðÀ´¶¼»¹ÕýÈ·, ¾ÍÊÇÃ»ÓÐÉùÒôµÄ»°, ÄÇ÷áÄú¿ÉÄÜÍü¼Æ°Ñ¾²ÒôÈ¡ÏûµôÁË.
ÒªÕâ÷á×öÄúÒªÓÃ "amixer" »ò "alsamixer", Á½Õß¶¼¸½ÔÚÇý¶¯³ÌÊ½ÖÐ. Ö»Òª¼üÈë:
\begin{tscreen}
\begin{verbatim}
amixer -c 1 master 70:70 unmute
amixer -c 1 pcm 70:70 unmute
amixer -c 1 cd 70:70 unmute
\end{verbatim}
\end{tscreen}

¶Ô¶àÊýµÄÓ¦ÓÃ³ÌÊ½Ó¦¸Ã¶¼ÓÐÐ§µÄ.




\subsubsection{OSS/Linux µÄÏàÈÝÐÔ}

Èç¹ûÕâÊÇÄúÊ×´ÎÊ¹ÓÃ ALSA Çý¶¯³ÌÊ½, ¶øÄúÒÔÇ°Ê¹ÓÃ¹ýºËÐÄÄÚ½¨µÄÄÇ¸öµÄ»°,
Äú¿ÉÄÜÏëÒªÄÜºÍ¹ýÈ¥ÏàÈÝµÄÄÜÁ¦.(¼´Ê¹ÓÃ /dev/pcmX Éè±¸Ö®ÄÜÁ¦). ÕâÊ±ÄúÐèÒªÔØÈë
"OSS ÏàÈÝÇý¶¯³ÌÊ½". Ö´ÐÐ {\ttfamily modprobe snd-pcm1-oss}
(Ïê¼û¹Øì¶ÔØÈë±¾Çý¶¯³ÌÊ½ÄÇÒ»½Ú. ). ÇëðÞN: snd-pcm1-oss ²»ÄÜì¶ snd-pcm1.
¶Ô¾ÉÇý¶¯³ÌÊ½µÄÖ§Ô®ËùÐèÒªµÄÊÇ snd-pcm1-oss.




\subsection{Ò»°ãÐÔ½¨ÑÔ}






\subsubsection{ÊÔÖøÓÃ "insmod"}

ÓÃ "insmod" È¡´ú kerneld ×ÜÊÇÓÐÓÃµÄ. Ò²ÐíÒò´ËÄú¾Í¿ÉÒÔÔÚÓ©Ä»ÉÏ¿´µ½´íÎóÑ¶Ï¢ÁË.




\subsubsection{¶Á INSTALL µµ.}

ÔÚÇý¶¯³ÌÊ½Ä¿Â¼ÖÐµÄ INSTALL µµ¿ÉÒÔ·¢ÏÖºÜ¶à×ÊÑ¶. Èç¹ûÄúµÄÇý¶¯³ÌÊ½²»Æð×÷ÓÃ,
±ðÍüÁË¿´¿´Õâ¸öµµ, Ò²Ðí»áÓÐ¶îÍâµÄ×ÊÑ¶.




\subsubsection{³ý´íÑ¶Ï¢}

Èç¹ûÒÔÉÏµÄ·½·¨»¹ÊÇÃ»ÓÐÓÃ, Äú¿ÉÒÔÖØÐÂ±àÒëÇý¶¯³ÌÊ½, ÒªÇóËü½«³ý´íÑ¶Ï¢ËÍ½ø
/var/log/messages µµÖÐ, ×öÎª×îááÊÖ¶Î. ÏÂ{\ttfamily cd
/usr/src/alsa-driver-...}ÃüÁî½øÈëÇý¶¯³ÌÊ½Ä¿Â¼, È»ááÊäÈë:

\begin{tscreen}
\begin{verbatim}
./configure --with-debug=detect; make clean; make
\end{verbatim}
\end{tscreen}


ÒÆ³ýÇý¶¯³ÌÊ½(Èç¹ûËüÒÑ¾­Æô¶¯µÄ»°, Çë¿´ááÃæÓÐÌáµ½µÄÒÆ³ýÄ£×éÐ¡¼¼ÇÉ)
È»ááÓÃÄú¸Õ¸ÕÓÃµÄ "modprobe" Ö¸Áî°²²åÐÂ±àÒëµÄÇý¶¯³ÌÊ½. ¿´¿´ /var/log/messages
ÀïÓÐÃ»ÓÐÈÎºÎÏà¹ØÑ¶Ï¢.




\subsubsection{Èç¹û¶¼Ã»ÓÐÓÃÄØ...}

Èç¹ûÄúÎÞ·¨ÓÉÑ¶Ï¢ÖÐÈ¡µÃÏßË÷, Ð´·â Email µ½ ALSA Ê¹ÓÃÕßÍ¨ÐÅÂÛÌ³,
\onlynameurl{alsa-user@alsa-project.org}.

±ðÍüÁË¼ÓÉÏÒÔÏÂ×ÊÑ¶:
\begin{itemize}
\item ÄúµÄÒôÐ§¿¨µÄÃû³ÆÒÔ¼°ÆäÊ¹ÓÃµÄ¾§Æ¬.
\item Èç¹ûÄúµÄÒôÐ§¿¨ÊÇ ISA PnP µÄ, ·ÅÈë isapnp.conf ÖÐÓÐ¹ØµÄ²¿·Ý.
\item ÄúµÄ conf.modules µµ»òÊÇÆô¶¯ ALSA Çý¶¯³ÌÊ½µÄÃüÁîÐÐ.
\item ËùÓÐÔÚ /var/log/messages ÖÐÓ¦¸ÃºÍ ALSA Çý¶¯³ÌÊ½ÓÐ¹ØµÄÑ¶Ï¢.
\end{itemize}





\subsection{»Ø±¨³ô³æ}

Èç¹ûÄú·¢ÏÖÁËÒ»Ö»³ô³æ, ALSA Çý¶¯³ÌÊ½¿ª·¢×éÏ£ÍûÄÜ¹»µÃÖª(ÖÁÉÙ)ÒÔÏÂ×ÊÑ¶:
\begin{enumerate}
\item  Çý¶¯³ÌÊ½¼°ºËÐÄµÄ°æ±¾: 'cat /proc/asound/version'
\item  ÒôÐ§¿¨×ÊÑ¶
\begin{itemize}
\item  ³§ÉÌËù±êÊ¾µÄÒôÐ§¿¨Ãû³Æ
\item  ¸Ã¿¨ÉÏÃæµÄ¸÷¸ö¾§Æ¬±êÊ¾
\item  'cat /proc/asound/cards' µÄÖ´ÐÐ½á¹û
\end{itemize}
\item  ËùÓÐÔÚ /var/log/messages ÖÐµÄÏà¹ØÑ¶Ï¢
\item  ÎÊÌâµÄÃèÊö
\end{enumerate}





\subsection{Ð¡¼¼ÇÉ: Ìý CD Ê±...}

Èç¹ûÄúÊ¹ÓÃkmod/kerneld ÒÔ¼° ALSA Çý¶¯³ÌÊ½À´Ìý CD, ÄÇ÷á kmod/kerneld
¿ÉÄÜ²»»áÏñÔ¤ÆÚÒ»°ãÔØÈëÇý¶¯³ÌÊ½. ÕâÊÇÓÉì¶ÃüÁîÁÐµÄ CD ·ÅÒô³ÌÊ½Ö»»á½Ð CDROM
¿ªÊ¼²¥·Å, ¶ø²»»áÊ¹ÓÃµ½ÈÎºÎÉè±¸, ÈÃ kmod/kerneld À´ÔØÈëÇý¶¯³ÌÊ½.
Õâ¸öÎÊÌâµÄ½â¿ÉÄÜ¾ÍÖ»ÓÐÊ¹ÓÃ modprobe ÁË.




\subsection{Ð¡¼¼ÇÉ: °²×° MIDI ÐòÁÐÇý¶¯¶¯³ÌÊ½}

Í¨³£, ÐòÁÐÉè±¸µÄ IO ²º»áÓÉ±ê×¼µÄÐòÁÐÉè±¸Çý¶¯³ÌÊ½Õ¼ÓÐ. ËùÒÔÔÚÄú¿ÉÒÔ½øÐÐ
"modprobe snd-serial" ÒÔÇ°, ±ØÐëÈÃÇý¶¯³ÌÊ½ÊÍ·Åµô¸ÃÐòÁÐÉè±¸.

ÒÔÏÂÊÇËùÐè³ÌÐò.

\begin{tscreen}
\begin{verbatim}
setserial /dev/ttyS0 uart none
modprobe snd-serial
\end{verbatim}
\end{tscreen}


(Èç¹ûÄúµÄ MIDI Éè±¸Ê¹ÓÃ²»Ò»ÑùµÄÉè±¸,½« /dev/ttyS0 »»³ÉÏà¶ÔÓ¦µÄ /dev/ttySx)




\subsection{Ð¡¼¼ÇÉ: »»ÐÂºËÐÄ? »»ÐÂÄ£×é!}

µ±Äú¸üÐÂºËÐÄáá, Äú¿ÉÄÜÐèÒªÖØÐÂ±àÒë ALSA Çý¶¯³ÌÊ½. Èç¹ûËüÃÇ»¹ÔÚÔ­À´µÄ
/usr/src Ä¿Â¼ÏÂ, Çë±ðÍüÁËÔÚÄú½øÐÐ ./configure, make, make install Ö®Ç°ÏÈÏÂ
{\ttfamily make clean} ÃüÁî.

à¸! »¹ÓÐ¸ö²»Ì«Ò»ÑùµÄºËÐÄ°æ±¾±àºÅ "2.2.0ac1", »á±» configure
ÃüÁîµµ±§Ô¹²»ÊÇÊý×Ö. ÎÒÏëÕâ¸öÔÚÐÂ°æµÄÃüÁîµµÖÐ»á½â¾ö,
²»È»Äú¿ÉÄÜµÃ¸Ä±äÔ­Ê¼ÂëÖÐµÄºËÐÄ°æ±¾±àºÅ.




\subsection{Ð¡¼¼ÇÉ: KDE ¼° ALSA Çý¶¯³ÌÊ½}

Èç¹ûÄúÊ¹ÓÃÁË KDE, µ«È´ÎÞ·¨Ìýµ½ÖîÈç¿ªÆôÊÓ´°»ò¸Ä±äÊ¹ÓÃµÄ×ÀÃæµÈÏµÍ³ÒôÐ§,
²»¹ýÆäËüÒôÐ§¶¯×÷Õý³£. Ò²¾ÍÊÇÄúµÄ CD ²¥·Å, MP3 ²¥·ÅÒÔ¼°»ìÒôÆ÷¶¼ºÜÕý³£,
ÄÇ÷á¿ÉÄÜÖ»ÊÇÒòÎªÇ·È± "kwmsound" ¶øÒÑ.

ËùÒÔ: È·¶¨ÔÚÄúµÄÆô¶¯ÃüÁîµµ(\$KDEDIR/bin/startkde)ÖÐÓÐ "kwmsound".




\subsection{Ð¡¼¼ÇÉ: Ê¹ÓÃ ALSA Éè±¸}

Èç¹ûÄúÒÔÇ°ÓÐÀûÓÃ¹ý Linux µÄÒôÐ§Ö§Ô®, ÄÇ÷áÄúµÄÓ¦ÓÃ³ÌÊ½¿ÉÄÜÐèÒªÓÃµ½ /dev/pcm0,
/dev/audio ¼° /dev/mixer. Ê¹ÓÃ OSS ÏàÈÝÄ£×é snd-pcm1-oss ÊÇ²»´íµÄ½â¾ö·½·¨,
µ«Èç¹ûÊ¹ÓÃÕæÕýµÄ ALSA Éè±¸(ÔÚ /dev/snd/ÏÂ)µÄ»°ÄÇ¸üºÃ.




\subsection{Ð¡¼¼ÇÉ: ÒÆ³ýËùÓÐÄ£×é}

ÒªÒ»¸öÒ»¸öµÄÒÆ³ýÊ®¼¸¸öÄ£×éÊµÔÚ²»ÊÇ¸öºÃ°ì·¨. ºÜÐÒÔËµÄ, ËùÓÐµÄÄ£×éÃû¶¼ÊÇÓÉ snd-
¿ªÊ¼, ËùÒÔÓÃÒ»µãÐ¡Ð¡µÄÃüÁîÁÐ¹æ»®, Äú¿ÉÒÔÇáÒ×µÄÏÂÒÔÏÂµÄÃüÁîÒÆ³ý ALSA
ÒôÐ§Çý¶¯³ÌÊ½:

\begin{tscreen}
\begin{verbatim}
cat /proc/modules|gawk '/^snd-/{print $1}|xargs -i rmmod {}
\end{verbatim}
\end{tscreen}


Juergen Kahrs Ð´µÀ: "ÎÒÓÐÒ»¸öÃüÁîµµ¿ÉÒÔÁ¬ soundcore, soundlow ÒÔ¼° sound
¶¼Ò»²¢ÏûÈ¥, Èç¹ûËüÃÇÒÑÔØÈëÇÒÃ»ÔÚÊ¹ÓÃÖÐµÄ»°. Õâ¸öÃüÁîµµ´¦Àí /proc/modules
Èý´Î, ÕâÑùÔÚÍê³ÉááÓ¦¸Ã²»»áÓÐÌ«¶àÄ£×éÁôÏÂÀ´." ËûµÄ½â·¨ÊÇ:

\begin{tscreen}
\begin{verbatim}
awk '/^snd/||/^sound/&&($3==0){system("rmmod " $1)}' /proc/modules /proc/modules /proc/modules
\end{verbatim}
\end{tscreen}


Çë×¢Òâ: Èç¹ûÓÐÒ»¸öÄ£×éÒÀÀµÁíÒ»¸öÄ£×éµÄ»°, Äú²»¿ÉÒÔÖ»ÒÆ³ý½ÏÉÏ²ãµÄÄÇ¸ö.
ÕâÒâÎ¶ÖøÄú¿ÉÄÜÓÐ±ØÒªÏÂµÚ¶þµÀÃüÁî. (ÎÒ´ÓÀ´Ã»Åöµ½¹ýÕâÖÖÇé¿ö;
¿´ÆðÀ´Äú¿ÉÒÔÒÔÒÀÕÕÔÚ /proc/modules ÖÐµÄË³ÐòÒÆ³ý ALSA Ä£×é.)



\end{document}
