| 1 | <?xml version='1.0' encoding="UTF-8"?> |
1 | <?xml version='1.0' encoding="UTF-8"?> |
| 2 | <?xml-stylesheet href="/xsl/guide.xsl" type="text/xsl"?> |
|
|
| 3 | |
|
|
| 4 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
2 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 5 | |
3 | |
| 6 | <guide link = "/doc/en/alsa-guide.xml"> |
4 | <guide link = "/doc/en/alsa-guide.xml"> |
| 7 | <title>Gentoo Linux ALSA Guide</title> |
5 | <title>Gentoo Linux ALSA Guide</title> |
| 8 | <author title="Author"><mail link="zu@pandora.be"> |
6 | <author title="Author"><mail link="zu@pandora.be"> |
| 9 | Vincent Verleye</mail> |
7 | Vincent Verleye</mail> |
| 10 | </author> |
8 | </author> |
| 11 | |
9 | |
| 12 | <author title="Editor"><mail link="zhen@gentoo.org"> |
10 | <author title="Editor"><mail link="zhen@gentoo.org"> |
| 13 | John P. Davis</mail> |
11 | John P. Davis</mail> |
| 14 | </author> |
12 | </author> |
| 15 | |
13 | |
| 16 | <abstract> |
14 | <abstract> |
| 17 | This guide will show you how to set up the Advanced Linux Sound Architecture (ALSA) on Gentoo Linux. |
15 | This guide will show you how to set up the Advanced Linux Sound Architecture (ALSA) on Gentoo Linux. |
| 18 | In addition to the Gentoo Linux Desktop Configuration Guide, this guide is supposed to give you more information on this subject. </abstract> |
16 | In addition to the Gentoo Linux Desktop Configuration Guide, this guide is supposed to give you more information on this subject. </abstract> |
| 19 | |
17 | |
| 20 | <version>1.0</version> |
18 | <version>1.1</version> |
| 21 | <date>30 Oct 2002</date> |
19 | <date>12 January 2002</date> |
| 22 | |
20 | |
| 23 | <chapter> |
21 | <chapter> |
| 24 | <title>Introduction</title> |
22 | <title>Introduction</title> |
| 25 | <section> |
23 | <section> |
| 26 | <title>What is ALSA?</title> |
24 | <title>What is ALSA?</title> |
| 27 | <body> |
25 | <body> |
| 28 | <p> |
26 | <p> |
| 29 | The Advanced Linux Sound Architecture (ALSA) is a project to improve the Linux sound subsystem by rewriting |
27 | The Advanced Linux Sound Architecture (ALSA) is a project to improve the Linux sound subsystem by rewriting |
| 30 | large chunks of it. |
28 | large chunks of it. |
| 31 | It is anticipated that ALSA will make it into Linux kernel 2.6.x (or 3.x.x -- whichever comes first) as it becomes ready. |
29 | It is anticipated that ALSA will make it into Linux kernel 2.6.x (or 3.x.x -- whichever comes first) as it becomes ready. |
| 32 | </p> |
30 | </p> |
| 33 | |
31 | |
| 34 | <p> |
32 | <p> |
| 35 | ALSA provides audio and MIDI functionality for Linux. |
33 | ALSA provides audio and MIDI functionality for Linux. |
| 36 | </p> |
34 | </p> |
| … | |
… | |
| 90 | First we'll make sure that our kernel configuration is ready for use with ALSA. |
88 | First we'll make sure that our kernel configuration is ready for use with ALSA. |
| 91 | All you need in your kernel configuration is having Sound Card Support set to be built as a module (M). |
89 | All you need in your kernel configuration is having Sound Card Support set to be built as a module (M). |
| 92 | This will build <c>soundcore.o</c>. |
90 | This will build <c>soundcore.o</c>. |
| 93 | </p> |
91 | </p> |
| 94 | <p> |
92 | <p> |
| 95 | <note> |
93 | <note> |
| 96 | Possibly, this will also work when you built Sound Card Support in the kernel (Y) instead of building it as a module (M). |
94 | Possibly, this will also work when you built Sound Card Support in the kernel (Y) instead of building it as a module (M). |
| 97 | However, the official ALSA documentation suggests building it as a module, since ALSA will try loading it. |
95 | However, the official ALSA documentation suggests building it as a module, since ALSA will try loading it. |
| 98 | </note> |
96 | </note> |
| 99 | </p> |
97 | </p> |
| 100 | <p>If you already have a working kernel configuration, make sure you remove all sound drivers (except for Sound Card Support). |
98 | <p>If you already have a working kernel configuration, make sure you remove all sound drivers (except for Sound Card Support). |
| 101 | If you wish to do this without having to reboot, you could do like this: |
99 | If you wish to do this without having to reboot, you could do like this: |
| 102 | </p> |
100 | </p> |
| 103 | <pre> |
101 | <pre> |
| 104 | # <c>cd /usr/src/linux</c> |
102 | # <c>cd /usr/src/linux</c> |
| 105 | # <c>cp .config ~</c> |
103 | # <c>cp .config ~/</c> |
| 106 | # <c>make mrproper</c> |
104 | # <c>make mrproper</c> |
| 107 | # <c>cp ~/.config .</c> |
105 | # <c>cp ~/.config .</c> |
| 108 | # <c>make menuconfig</c> |
106 | # <c>make menuconfig</c> |
| 109 | </pre> |
107 | </pre> |
| 110 | <p> |
108 | <p> |
| 111 | Now select <e>Sound Card Support</e> as Module (M) and deselect all other sound drivers. |
109 | Now select <e>Sound Card Support</e> as Module (M) and deselect all other sound drivers. |
| 112 | Exit and say Y to save your kernel configuration. |
110 | Exit and say Y to save your kernel configuration. |
| 113 | After that, build the modules: |
111 | After that, build the modules: |
| 114 | </p> |
112 | </p> |
| 115 | <pre> |
113 | <pre> |
| 116 | # <c>make dep clean</c> |
114 | # <c>make dep clean</c> |
| 117 | # <c>make modules modules_install</c> |
115 | # <c>make modules modules_install</c> |
| 118 | </pre> |
116 | </pre> |
| 119 | <p> |
117 | <p> |
| 120 | Before installing your new modules, this last line will delete all your previous modules, |
118 | Before installing your new modules, this last line will delete all your previous modules, |
| … | |
… | |
| 188 | We'll need to edit some files, to let our system know about the freshly installed ALSA modules. |
186 | We'll need to edit some files, to let our system know about the freshly installed ALSA modules. |
| 189 | </p> |
187 | </p> |
| 190 | <p> |
188 | <p> |
| 191 | First file to edit is <path>/etc/modules.d/alsa</path>. |
189 | First file to edit is <path>/etc/modules.d/alsa</path>. |
| 192 | </p> |
190 | </p> |
| 193 | <warn> |
191 | <warn> |
| 194 | There is no need to edit <path>/etc/modules.conf</path>. Instead, always edit files in <path>/etc/modules.d</path>. |
192 | There is no need to edit <path>/etc/modules.conf</path>. Instead, always edit files in <path>/etc/modules.d</path>. |
| 195 | </warn> |
193 | </warn> |
| 196 | <p> |
194 | <p> |
| 197 | Check the ALSA portion <e>at the top of the file</e>. |
195 | Check the ALSA portion <e>at the top of the file</e>. |
| 198 | By adding this line you can specify the max number of soundcards you have (generally, just one). |
196 | By adding this line you can specify the max number of soundcards you have (generally, just one). |
| 199 | </p> |
197 | </p> |
| 200 | <p> |
198 | <p> |
| 201 | <pre caption="At the top of /etc/modules.d/alsa"> |
199 | <pre caption="At the top of /etc/modules.d/alsa"> |
| 202 | # Alsa 0.9.X kernel modules' configuration file. |
200 | # Alsa 0.9.X kernel modules' configuration file. |
| 203 | # $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.3 2002/11/16 23:39:34 zhen Exp $ |
201 | # $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.4 2003/01/12 19:43:05 zhen Exp $ |
| 204 | |
202 | |
| 205 | # ALSA portion |
203 | # ALSA portion |
| 206 | alias char-major-116 snd |
204 | alias char-major-116 snd |
| 207 | <c>options snd snd_major=116 snd_cards_limit=1</c> |
205 | <c>options snd snd_major=116 snd_cards_limit=1</c> |
| 208 | # OSS/Free portion |
206 | # OSS/Free portion |
| 209 | alias char-major-14 soundcore |
207 | alias char-major-14 soundcore |
| 210 | |
208 | |
| 211 | ## |
209 | ## |
| 212 | ## IMPORTANT: |
210 | ## IMPORTANT: |
| 213 | </pre> |
211 | </pre> |
| 214 | </p> |
212 | </p> |
| 215 | <p> |
213 | <p> |
| 216 | Now we'll specify the sounddriver(s) ALSA should use. In the same file, edit like this: |
214 | Now we'll specify the sounddriver(s) ALSA should use. In the same file, edit like this: |
| 217 | <pre caption="A bit lower in /etc/modules.d/alsa"> |
215 | <pre caption="A bit lower in /etc/modules.d/alsa"> |
| 218 | ## and then run `update-modules' command. |
216 | ## and then run `update-modules' command. |