

Parent Directory Parent Directory | Revision Log Revision Log

Fri Sep 12 12:11:49 2003 UTC (11 years, 3 months ago) by bennyc
Branch: MAIN
Changes since 1.14: +4 -4 lines
File MIME type: application/xml
replaced insmod with modprobe
and <c> tags replaced with <i> tags

4 <guide link = "/doc/en/alsa-guide.xml">
5 <title>Gentoo Linux ALSA Guide</title>
7 Vincent Verleye</mail>
8 </author>
9 <author title="Author"><mail link="g2boojum@gentoo.org">
10 Grant Goodyear</mail>
11 </author>
12 <author title="Author"><mail link="agenkin@gentoo.org">
13 Arcady Genkin</mail>
14 </author>
16 John P. Davis</mail>
17 </author>
19 Sven Vermeulen</mail>
20 </author>
22 Benny Chuang</mail>
23 </author>
25 <license/>
27 <abstract>
31 <version>1.3.1</version>
32 <date>September 12, 2003</date>
34 <chapter>
35 <title>Introduction</title>
36 <section>
37 <title>What is ALSA?</title>
38 <body>
39 <p>
41 large chunks of it.
43 </p>
45 <p>
46 ALSA provides audio and MIDI functionality for Linux.
47 </p>
49 <p>
52 <li> Fully modularized sound drivers.</li>
53 <li> SMP and thread-safe design.</li>
56 </ul>
59 </p>
60 </body>
61 </section>
62 <section>
63 <title>Why use ALSA?</title>
64 <body>
65 <p>
69 </p>
70 <p>
74 and MIDI sequencing.
75 </p>
76 </body>
77 </section>
78 <section>
79 <title>What cards does ALSA support?</title>
80 <body>
81 <p>
83 However, some vendors may provide binary-only packages.
84 </p>
87 </p>
88 </body>
89 </section>
90 </chapter>
92 <chapter>
93 <title>Installation</title>
94 <section>
95 <title>Kernel modules</title>
96 <body>
97 <p>
99 </p>
100 <p>
101 First we'll make sure that our kernel configuration is ready for use with ALSA.
103 This will build <c>soundcore.o</c>.
104 </p>
105 <p>
106 <note>
109 </note>
110 </p>
113 </p>
114 <pre>
115 # <c>cd /usr/src/linux</c>
116 # <c>cp .config ~/</c>
117 # <c>make mrproper</c>
118 # <c>cp ~/.config .</c>
119 # <c>make menuconfig</c>
120 </pre>
121 <p>
123 Exit and say Y to save your kernel configuration.
124 After that, build the modules:
125 </p>
126 <pre>
127 # <c>make dep clean</c>
128 # <c>make modules modules_install</c>
129 </pre>
130 <p>
131 Before installing your new modules, this last line will delete all your previous modules,
132 even the ones from a previous ALSA installation.
133 </p>
134 <p>
135 <impo>
137 </impo>
138 </p>
139 <p>
142 </note>
143 </p>
144 </body>
145 </section>
147 <section>
148 <title>ALSA modules</title>
149 <body>
151 <p>
153 and type of your soundcard by looking at the output of /proc/pci
154 <pre># <c>grep audio /proc/pci</c></pre>
155 </p>
157 <p>
158 <warn>
161 </warn>
162 </p>
164 <p>
166 </p>
167 <p>
169 <uri link="http://www.alsa-project.org/alsa-doc">ALSA Soundcard Matrix</uri> by following the <e>Details</e> link in the <e>Driver and Docs</e> column in the row of the chipset of your soundcard.
170 Mine is <c>snd-emu10k1</c>, since I have an SBlive! soundcard, with the <e>EMU10K1</e> chipset.
172 </p>
174 <pre>
176 </pre>
177 <note>
178 You can also add this value in <path>/etc/make.conf</path>, so when you have to emerge the alsa-driver later on you can just run <c>emerge alsa-driver</c>.
179 For example, like this: <c>echo 'ALSA_CARDS="emu10k1"' >> /etc/make.conf</c>
180 </note>
182 <note>
185 </note>
188 wrapper. </note>
190 <note>If you plan on recompiling your kernels numerous times, it might
191 be adviseable to emerge <c>alsa-driver</c> with <c>--buildpkg</c>. This
192 will create a binary package for it. Later, after recompiling your kernel,
193 you can just do <c>emerge --usepkg alsa-driver</c> which will install the
194 binary package instead of recompiling it completely.</note>
196 <p>
197 After this, the ALSA modules should be installed on your system.
198 </p>
199 </body>
200 </section>
201 <section>
202 <title>Configuration of ALSA</title>
203 <body>
204 <p>
205 Let's start configuring now to get ALSA working properly.
207 </p>
209 <p>
210 First, install <c>alsa-utils</c> on your system:
211 </p>
213 <pre caption = "Emerging alsa-utils">
214 # <i>emerge alsa-utils</i>
215 </pre>
217 <p>
218 Hereafter, we need to edit <path>/etc/modules.d/alsa</path>.
219 </p>
220 <warn>
222 </warn>
223 <p>
224 Check the ALSA portion <e>at the bottom of the file</e>.
226 </p>
227 <p>
228 <pre caption="At the bottom of /etc/modules.d/alsa">
229 # Set this to the correct number of cards.
230 <c>options snd cards_limit=1</c>
231 </pre>
232 </p>
233 <p>
235 <pre caption="In /etc/modules.d/alsa">
236 ## and then run `modules-update' command.
238 ##
239 ## ALSA portion
240 <c>alias snd-card-0 snd-emu10k1</c>
241 <c>## If you have more than one, add:
242 ## alias snd-card-1 snd-intel8x0
243 ## alias snd-card-2 snd-ens1370</c>
244 ## OSS/Free portion
245 ## alias sound-slot-0 snd-card-0
246 ## alias sound-slot-1 snd-card-1
247 ##
248 </pre>
249 </p>
250 <p>
251 <note>
252 If you have more than one soundcard, adjust the <c>cards_limit</c> value and add more snd-card aliases to the file.
256 </note>
257 </p>
258 <p>
260 <pre caption="Near the end of /etc/modules.d/alsa">
261 alias /dev/mixer snd-mixer-oss
262 alias /dev/dsp snd-pcm-oss
263 alias /dev/midi snd-seq-oss
264 </pre>
265 </p>
266 <p>
267 Now double-check the file <path>/etc/modules.d/alsa</path> and when you're sure everyting is ok, run <c>modules-update</c>.
268 <pre>
269 # <i>modules-update</i>
270 </pre>
271 </p>
272 <note>
273 Running <c>modules-update</c> here will insert the data from <path>/etc/modules.d/alsa</path> into <path>/etc/modules.conf</path>
274 </note>
275 <p>
277 </p>
278 <pre caption="/etc/devfsd.conf">
279 # ALSA/OSS stuff
280 # Comment/change these if you want to change the permissions on
281 # the audio devices
286 REGISTER sound/.* PERMISSIONS root.audio 660
287 REGISTER snd/.* PERMISSIONS root.audio 660
288 </pre>
289 <note>
291 </note>
292 </body>
293 </section>
294 </chapter>
295 <chapter>
296 <title>Starting ALSA</title>
297 <section>
298 <title>Adding alsasound to a runlevel</title>
299 <body>
300 <p>
302 <pre>
303 # <c>rc-update add alsasound boot</c>
304 </pre>
305 </p>
306 <p>
308 </p>
309 </body>
310 </section>
311 <section>
312 <title>Running and unmuting</title>
313 <body>
314 <p>
316 </p>
317 <pre>
318 # <c>/etc/init.d/alsasound start</c>
319 </pre>
320 <p>
322 However, sound won't work yet, because the channels are still muted. We need <c>amixer</c> for this.
323 </p>
324 <pre caption = "Running amixer">
325 # <i>amixer</i>
326 </pre>
327 <p>
328 <warn>
331 </warn>
332 </p>
333 <pre caption="only if you get an error when running amixer">
334 # <i>modprobe snd-mixer-oss</i>
335 # <i>modprobe snd-pcm-oss</i>
336 # <i>amixer</i>
337 </pre>
338 <p>
339 If you got this far, now unmute Master and PCM channels. Some hardware
340 even requires you to unmute the center channel or even the surround
341 channel.
342 </p>
343 <p>
344 <pre caption = "Unmuting channels">
345 # <i>amixer set Master 100 unmute</i>
346 # <i>amixer set PCM 100 unmute</i>
347 <comment>Only if the above doesn't succeed on its own:</comment>
348 # <i>amixer set Center 100 unmute</i>
349 # <i>amixer set Surround 100 unmute</i>
350 <comment>Test the sound:</comment>
351 # <i>aplay $KDEDIR/share/sounds/pop.wav</i> <codenote>(pop.wav is part of KDE)</codenote>
352 </pre>
353 </p>
356 <p>
358 </p>
360 </body>
361 </section>
362 </chapter>
363 <chapter>
364 <title>Final Notes</title>
365 <section>
366 <title>After kernel-upgrades..</title>
367 <body>
370 have to be installed again, since it will put the alsa modules in
372 <pre caption="needed after each kernel compile">
373 # <c>emerge alsa-driver</c>
374 </pre>
375 </body>
376 </section>
377 <section>
378 <title>/etc/modules.autoload</title>
379 <body>
381 load the correct modules at startup.</p>
384 </body>
385 </section>
386 <section>
387 <title>More links..</title>
388 <body>
389 <p>
390 You could check these for additional info:
391 </p>
392 <p>
393 <ul>
394 <li><uri link="http://www.gentoo.org/doc/en/desktop.xml">The Gentoo Linux Desktop Configuration Guide</uri></li>
400 </ul>
401 </p>
402 </body>
403 </section>
404 </chapter>
405 </guide>

  ViewVC Help
Powered by ViewVC 1.1.20