Gentoo Archives: gentoo-doc-cvs

From: Josh Saddler <nightmorph@×××××××××××.org>
To: gentoo-doc-cvs@l.g.o
Subject: [gentoo-doc-cvs] cvs commit: alsa-guide.xml
Date: Wed, 31 Jan 2007 15:55:09
Message-Id: E1HCHn9-0006pf-JQ@lark.gentoo.org
1 nightmorph 07/01/31 15:54:35
2
3 Modified: alsa-guide.xml
4 Log:
5 the big alsa guide update to make the whole damn thing more neutral (among other additions), fixes bugs 164573, 164576, 164577, 164578, 164593, 164597, and 164598
6
7 Revision Changes Path
8 1.71 xml/htdocs/doc/en/alsa-guide.xml
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/alsa-guide.xml?rev=1.71&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/alsa-guide.xml?rev=1.71&content-type=text/plain
12 diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/alsa-guide.xml?r1=1.70&r2=1.71
13
14 Index: alsa-guide.xml
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v
17 retrieving revision 1.70
18 retrieving revision 1.71
19 diff -u -r1.70 -r1.71
20 --- alsa-guide.xml 2 Nov 2006 18:24:36 -0000 1.70
21 +++ alsa-guide.xml 31 Jan 2007 15:54:35 -0000 1.71
22 @@ -1,5 +1,5 @@
23 <?xml version='1.0' encoding="UTF-8"?>
24 -<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.70 2006/11/02 18:24:36 nightmorph Exp $ -->
25 +<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.71 2007/01/31 15:54:35 nightmorph Exp $ -->
26
27 <!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
28
29 @@ -9,6 +9,12 @@
30 <author title="Author">
31 <mail link="fox2mike@g.o">Shyam Mani</mail>
32 </author>
33 +<author title="Author">
34 + <mail link="nightmorph@g.o">Joshua Saddler</mail>
35 +</author>
36 +<author title="Contributor">
37 + <mail link="flameeyes@g.o">Diego Pettenò</mail>
38 +</author>
39
40 <abstract>
41 This document helps a user setup ALSA on Gentoo Linux.
42 @@ -18,8 +24,8 @@
43 <!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
44 <license/>
45
46 -<version>2.15</version>
47 -<date>2006-11-02</date>
48 +<version>2.16</version>
49 +<date>2007-01-31</date>
50
51 <chapter>
52 <title>Introduction</title>
53 @@ -76,17 +82,18 @@
54 </p>
55
56 <ol>
57 - <li>
58 - Use ALSA provided by your kernel. This is the preferred/recommended
59 - method.
60 - </li>
61 - <li>
62 - Use Gentoo's <c>media-sound/alsa-driver</c> package.
63 - </li>
64 + <li>Use ALSA provided by your kernel.</li>
65 + <li>Use Gentoo's <c>media-sound/alsa-driver</c> package.</li>
66 </ol>
67
68 <p>
69 -We shall take a peek into both before finally deciding on one.
70 +The in-kernel drivers and the <c>alsa-driver</c> package can vary a little; it's
71 +possible that features and fixes found in one might not yet be incorporated into
72 +the other. The upstream developers are aware of this, but the two drivers are
73 +effectively separate branches of the ALSA project; they are not entirely
74 +identical. You should be aware that they might function slightly differently, so
75 +if one doesn't work for you, try the other! We shall take a peek into both
76 +before finally deciding on one.
77 </p>
78
79 <p>
80 @@ -101,7 +108,9 @@
81 </tr>
82 <tr>
83 <th>+</th>
84 - <ti>Pretty stable as drivers are integrated into kernel.</ti>
85 + <ti>
86 + No need to emerge yet another package; drivers are integrated into kernel.
87 + </ti>
88 </tr>
89 <tr>
90 <th>+</th>
91 @@ -109,7 +118,7 @@
92 </tr>
93 <tr>
94 <th>-</th>
95 - <ti>Might be a slightly older version than <c>alsa-driver</c>.</ti>
96 + <ti>Might be a slightly different version than <c>alsa-driver</c>.</ti>
97 </tr>
98 </table>
99
100 @@ -124,7 +133,11 @@
101 </tr>
102 <tr>
103 <th>+</th>
104 - <ti>Latest drivers from the ALSA Project.</ti>
105 + <ti>Possibly the latest drivers from the ALSA Project.</ti>
106 +</tr>
107 +<tr>
108 + <th>+</th>
109 + <ti>Useful if you intend to develop audio drivers.</ti>
110 </tr>
111 <tr>
112 <th>-</th>
113 @@ -143,11 +156,11 @@
114 <body>
115
116 <p>
117 -The main difference between using <c>alsa-driver</c> and ALSA that comes with
118 -the kernel is that <c>alsa-driver</c> is generally more up to date than the
119 -version in the kernel. Since this does not make any huge difference as
120 -such, you are encouraged to use the ALSA provided by the kernel for ease of use.
121 -Before reporting any sound related issues to <uri
122 +The differences between <c>alsa-driver</c> and the in-kernel ALSA drivers are
123 +quite subtle, as mentioned earlier. Since there are not any huge differences,
124 +this guide will go through the process of using the ALSA provided by the kernel
125 +<e>first</e> for ease of use. However, if you run into problems, try switching
126 +to <c>alsa-driver</c>. Before reporting any sound related issues to <uri
127 link="https://bugs.gentoo.org">Gentoo Bugzilla</uri>, please try to reproduce
128 them using <c>alsa-driver</c> and file the bug report no matter what the
129 result.
130 @@ -210,6 +223,20 @@
131 "Details" and that will take you to the <c>emu10k1</c> specific page.
132 </p>
133
134 +<p>
135 +If you intend to use MIDI, then you should add <c>midi</c> to your USE flags in
136 +<path>/etc/make.conf</path> before emerging any ALSA packages. Later in the
137 +guide, we will show you how to set up <uri link="#midi">MIDI support</uri>.
138 +</p>
139 +
140 +<pre caption="MIDI support in /etc/make.conf">
141 +<comment>(If you want MIDI support)</comment>
142 +USE="midi"
143 +
144 +<comment>(If you don't need MIDI)</comment>
145 +USE="-midi"
146 +</pre>
147 +
148 </body>
149 </section>
150 <section id="kernel">
151 @@ -254,8 +281,8 @@
152 </p>
153
154 <p>
155 -Please note that for the sake of ease, all examples show ALSA built as modules.
156 -It is advisable to follow the same as it then allows the use of <c>alsaconf</c>
157 +Please note that for ease of use, all examples show ALSA built as modules. It
158 +is advisable to follow the same as it then allows the use of <c>alsaconf</c>
159 which is a boon when you want to configure your card. Please do <e>not</e> skip
160 the <uri link="#alsa-config">Configuration</uri> section of this document. If
161 you still like to have options built-in, ensure that you make changes to your
162 @@ -393,8 +420,13 @@
163 </pre>
164
165 <impo>
166 -Please note that you will have to run <c>emerge alsa-driver</c> after every
167 -kernel (re)compile, as the earlier drivers are deleted.
168 +Please note that you will have to run <c>emerge alsa-driver</c> after every
169 +kernel (re)compile, as the earlier drivers are deleted. To make this task
170 +easier, you may want to emerge the <c>module-rebuild</c> package, which will
171 +keep track of module packages and rebuild them for you. First run <c>module
172 +rebuild populate</c> to create the list, and then after every kernel
173 +(re)compile, you just run <c>module-rebuild rebuild</c>, and your external
174 +modules will be rebuilt.
175 </impo>
176
177 </body>
178 @@ -431,14 +463,21 @@
179 <title>Configuration</title>
180 <body>
181
182 +<p>
183 +Recent versions of <c>udev</c> (<c>>=udev-103</c>) provide some degree of
184 +kernel-level autoconfiguration of your sound card. If possible, try to rely on
185 +just letting your kernel automatically setup your sound card for you. Otherwise,
186 +use <c>alsaconf</c> to configure your card, as shown below.
187 +</p>
188 +
189 <note>
190 Please shut down any programs that <e>might</e> access the sound card while
191 running <c>alsaconf</c>.
192 </note>
193
194 <p>
195 -The easiest way to configure your sound card is to run <c>alsaconf</c>. Just
196 -type <c>alsaconf</c> in a shell as root.
197 +Another way to configure your sound card is to run <c>alsaconf</c>. Just type
198 +<c>alsaconf</c> in a shell as root.
199 </p>
200
201 <pre caption="Invoking alsaconf">
202 @@ -511,25 +550,13 @@
203 <body>
204
205 <p>
206 -We've completed all the setups and pre-requisites, so let's fire up ALSA. If
207 +We've completed all the setups and prerequisites, so let's fire up ALSA. If
208 you ran <c>alsaconf</c>, you can skip this step, since <c>alsaconf</c> already
209 does this for you.
210 </p>
211
212 <pre caption="Start the service">
213 -<comment>(ALSA as modules)</comment>
214 -# <i>/etc/init.d/alsasound start</i>
215 - * Loading ALSA modules ...
216 - * Loading: snd-card-0 ... [ ok ]
217 - * Loading: snd-pcm-oss ... [ ok ]
218 - * Loading: snd-seq ... [ ok ]
219 - * Loading: snd-emu10k1-synth ... [ ok ]
220 - * Loading: snd-seq-midi ... [ ok ]
221 - * Restoring Mixer Levels ... [ ok ]
222 -<comment>(ALSA compiled in)</comment>
223 -# <i>/etc/init.d/alsasound start</i>
224 - * Loading ALSA modules ...
225 - * Restoring Mixer Levels ... [ ok ]
226 +# <i>/etc/init.d/alsasound start</i>
227 </pre>
228
229 <p>
230 @@ -815,11 +842,27 @@
231
232 <chapter>
233 <title>Other things ALSA</title>
234 -<section>
235 +<section id="midi">
236 <title>Setting up MIDI support</title>
237 <body>
238
239 <p>
240 +First, check to make sure that you enabled the <c>midi</c> USE flag in
241 +<path>/etc/make.conf</path>.
242 +</p>
243 +
244 +<pre caption="MIDI support in /etc/make.conf">
245 +USE="midi"
246 +</pre>
247 +
248 +<p>
249 +If you didn't previously enable <c>midi</c>, go ahead and add it to
250 +<path>/etc/make.conf</path> now. You will also need to re-emerge any ALSA
251 +packages that use the <c>midi</c> flag, such as <c>alsa-lib</c>,
252 +<c>alsa-utils</c>, and <c>alsa-driver</c>.
253 +</p>
254 +
255 +<p>
256 If your sound card is one of those that come with on-board MIDI synthesizers
257 and you would like to listen to some .mid files, you have to install
258 <c>awesfx</c> which is basically a set of utilities for controlling the AWE32
259 @@ -895,22 +938,23 @@
260 </pre>
261
262 <p>
263 -For timidity to play sounds, it needs a sound font. If you do not have any,
264 -install <c>timidity-eawpatches</c> or <c>timidity-shompatches</c> which will
265 -give you some sound fonts. You can have multiple sound font configurations
266 -installed, and you can place your own in <path>/usr/share/timidity/</path>.
267 -To switch between different timidity configurations, you should use the
268 -<c>timidity-update</c> tool provided in the timidity++ package.
269 +For timidity to play sounds, it needs a sound font. Fortunately, the ebuild will
270 +install some sound font packages for you. There are a few other font packages
271 +available in Portage, such as <c>timidity-freepats</c> and
272 +<c>timidity-eawpatches</c>. You can have multiple sound font configurations
273 +installed, and you can place your own in <path>/usr/share/timidity/</path>. To
274 +switch between different timidity configurations, you should use the
275 +<c>timidity-update</c> tool provided in the timidity++ package. In later
276 +versions of timidity, <c>eselect</c> is used to switch configurations.
277 </p>
278
279 -<pre caption="Installing sound fonts">
280 -# <i>emerge timidity-eawpatches</i>
281 +<pre caption="Changing configurations">
282 +<comment>(replace eawpatches with the name of your sound font package)</comment>
283 # <i>timidity-update -g -s eawpatches</i>
284
285 -<comment>(or)</comment>
286 -
287 -# <i>emerge timidity-shompatches</i>
288 -# <i>timidity-update -g -s shompatches</i>
289 +<comment>(Use eselect if you have installed >=timidity-2.13.2-r3)</comment>
290 +# <i>eselect timidity list</i>
291 +# <i>eselect timidity set eawpatches</i>
292 </pre>
293
294 <p>
295 @@ -934,28 +978,68 @@
296
297 <p>
298 Some specific sound cards can benefit from certain tools provided by the
299 -<c>alsa-tools</c> and <c>alsa-firmware</c> packages. If you need
300 -<c>alsa-tools</c>, be sure to define the ALSA_TOOLS variable in
301 -<path>/etc/make.conf</path> with the tools you require. For instance:
302 +<c>alsa-tools</c> and <c>alsa-firmware</c> packages. You may install either with
303 +a simple <c>emerge</c>.
304 </p>
305
306 -<pre caption="Selecting ALSA Tools in /etc/make.conf">
307 -ALSA_TOOLS="as10k1 ac3dec"
308 +<pre caption="Installing ALSA Tools">
309 +# <i>emerge alsa-tools</i>
310 </pre>
311
312 +</body>
313 +</section>
314 +<section>
315 +<title>Multiple sound cards</title>
316 +<body>
317 +
318 <p>
319 -If the ALSA_TOOLS variable is not set, all available tools will be built.
320 -Now, install the <c>alsa-tools</c> (and/or <c>alsa-firmware</c>) package(s):
321 +You can more than one sound card in your system simultaneously, provided that
322 +you have built ALSA as modules in your kernel (or have installed
323 +<c>alsa-driver</c> instead). You just need to specify which should be started
324 +first in <path>/etc/modules.d/alsa</path>. Your cards are identified by their
325 +driver names inside this file. 0 is the first card, 1 is the second, and so on.
326 +Here's an example for a system with two sound cards.
327 </p>
328
329 -<pre caption="Installing ALSA Tools">
330 -# <i>emerge alsa-tools</i>
331 +<pre caption="Two sound cards in /etc/modules.d/alsa">
332 +options snd-emu10k1 index=0
333 +options snd-via82xx index=1
334 +</pre>
335 +
336 +<p>
337 +Or, if you have two cards that use the same driver, you specify them on the same
338 +line, using comma-separated numbers. Here's an example for a system with three
339 +sound cards, two of which are the same Intel High Definition Audio card.
340 +</p>
341 +
342 +<pre caption="Multiple sound cards in /etc/modules.d/alsa">
343 +options snd-ymfpci index=0
344 +options snd-hda-intel index=1,2
345 +</pre>
346 +
347 +</body>
348 +</section>
349 +<section>
350 +<title>Plugins</title>
351 +<body>
352 +
353 +<p>
354 +You may want to install some plugins for extra functionality.
355 +<c>alsa-plugins</c> is a collection of useful plugins, which include: PulseAudio
356 +output, a sample rate converter, jack (a low-latency audio server), and an
357 +encoder that lets you output 6-channel audio through digital S/PDIF connections
358 +(both optical and coaxial). You can choose which of its plugins you want
359 +installed by adding their USE flags to <path>/etc/portage/package.use</path>.
360 +</p>
361 +
362 +<pre caption="Installing alsa-plugins">
363 +# <i>emerge -avt alsa-plugins</i>
364 </pre>
365
366 </body>
367 </section>
368 <section>
369 -<title>A Big thank you to...</title>
370 +<title>A big thank you to...</title>
371 <body>
372
373 <p>
374
375
376
377 --
378 gentoo-doc-cvs@g.o mailing list