/[gentoo]/xml/htdocs/doc/en/alsa-guide.xml
Gentoo

Diff of /xml/htdocs/doc/en/alsa-guide.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.80 Revision 1.81
1<?xml version='1.0' encoding="UTF-8"?> 1<?xml version='1.0' encoding="UTF-8"?>
2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.80 2007/05/19 03:00:29 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.81 2008/03/05 09:16:49 nightmorph Exp $ -->
3 3
4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> 4<!DOCTYPE guide SYSTEM "/dtd/guide.dtd">
5 5
6<guide link="/doc/en/alsa-guide.xml"> 6<guide link="/doc/en/alsa-guide.xml">
7<title>Gentoo Linux ALSA Guide</title> 7<title>Gentoo Linux ALSA Guide</title>
8 8
9<author title="Author"> 9<author title="Author">
10 <mail link="fox2mike@gentoo.org">Shyam Mani</mail> 10 <mail link="fox2mike@gentoo.org">Shyam Mani</mail>
11</author> 11</author>
12<author title="Author"> 12<author title="Author">
13 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail> 13 <mail link="nightmorph@gentoo.org">Joshua Saddler</mail>
14</author> 14</author>
15<author title="Contributor"> 15<author title="Contributor">
16 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail> 16 <mail link="flameeyes@gentoo.org">Diego Pettenò</mail>
17</author> 17</author>
18 18
19<abstract> 19<abstract>
20This document helps a user setup ALSA on Gentoo Linux. 20This document helps a user setup ALSA on Gentoo Linux.
21</abstract> 21</abstract>
22 22
23<!-- The content of this document is licensed under the CC-BY-SA license --> 23<!-- The content of this document is licensed under the CC-BY-SA license -->
24<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 24<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
25<license/> 25<license/>
26 26
27<version>2.22</version> 27<version>2.23</version>
28<date>2007-05-07</date> 28<date>2008-03-05</date>
29 29
30<chapter> 30<chapter>
31<title>Introduction</title> 31<title>Introduction</title>
32<section> 32<section>
33<title>What is ALSA?</title> 33<title>What is ALSA?</title>
34<body> 34<body>
35 35
36<p> 36<p>
37ALSA, which stands for <e>Advanced Linux Sound Architecture</e>, provides 37ALSA, which stands for <e>Advanced Linux Sound Architecture</e>, provides
38audio and MIDI (<e>Musical Instrument Digital Interface</e>) functionality to 38audio and MIDI (<e>Musical Instrument Digital Interface</e>) functionality to
39the Linux operating system. ALSA is the default sound subsystem in the 2.6 39the Linux operating system. ALSA is the default sound subsystem in the 2.6
40kernel thereby replacing OSS (<e>Open Sound System</e>), which was used in the 40kernel thereby replacing OSS (<e>Open Sound System</e>), which was used in the
412.4 kernels. 412.4 kernels.
42</p> 42</p>
43 43
44<p> 44<p>
45ALSA's main features include efficient support for all types of audio 45ALSA's main features include efficient support for all types of audio
46interfaces ranging from consumer sound cards to professional sound 46interfaces ranging from consumer sound cards to professional sound
47equipment, fully modularized drivers, SMP and thread safety, backward 47equipment, fully modularized drivers, SMP and thread safety, backward
48compatibility with OSS and a user-space library <c>alsa-lib</c> to make 48compatibility with OSS and a user-space library <c>alsa-lib</c> to make
49application development a breeze. 49application development a breeze.
50</p> 50</p>
51 51
52</body> 52</body>
53</section> 53</section>
54<section> 54<section>
55<title>ALSA on Gentoo</title> 55<title>ALSA on Gentoo</title>
56<body> 56<body>
57 57
58<p> 58<p>
59One of Gentoo's main strengths lies in giving the user maximum control over 59Historically, Gentoo offered two ways to get ALSA up and running: the
60how a system is installed/configured. ALSA on Gentoo follows the same 60<e>in-kernel</e> driver and the external <c>alsa-driver</c> package. The two
61principle. There are two ways you can get ALSA support up and running on your 61solutions essentially do the same thing; this made supporting the external
62system. We shall look at them in detail in the next chapter. 62package extremely difficult and time-consuming. The Gentoo maintainers decided
63to discontinue support for the <c>alsa-driver</c> package, concentrating their
64resources on the ALSA drivers available within the Linux kernel. This guide will
65focus solely on configuring ALSA via the in-kernel driver.
66</p>
67
68<p>
69If you still require the <c>alsa-driver</c> package, please email the <mail
70link="alsa-bugs@gentoo.org">Gentoo ALSA maintainers</mail> with why the
71in-kernel drivers don't work for you. Be sure to include detailed error logs.
63</p> 72</p>
64 73
65</body> 74</body>
66</section> 75</section>
67</chapter> 76</chapter>
68 77
69<chapter> 78<chapter>
70<title>Installing ALSA</title> 79<title>Installing ALSA</title>
71<section>
72<title>Options</title>
73<body>
74
75<warn>
76The methods shown below are mutually exclusive. You cannot have ALSA compiled
77in your kernel and use <c>media-sound/alsa-driver</c>. It <e>will</e> fail.
78</warn>
79
80<p>
81The two options are:
82</p>
83
84<ol>
85 <li>
86 Use ALSA provided by your kernel. This is the preferred/recommended method.
87 </li>
88 <li>Use Gentoo's <c>media-sound/alsa-driver</c> package.</li>
89</ol>
90
91<p>
92The in-kernel drivers and the <c>alsa-driver</c> package can vary a little; it's
93possible that features and fixes found in one might not yet be incorporated into
94the other. The upstream developers are aware of this, but the two drivers are
95effectively separate branches of the ALSA project; they are not entirely
96identical. You should be aware that they might function slightly differently, so
97if one doesn't work for you, try the other! We shall take a peek into both
98before finally deciding on one.
99</p>
100
101<p>
102If you were to use ALSA provided by the kernel, the following are the pros and
103cons:
104</p>
105
106<table>
107<tr>
108 <th>Kernel ALSA</th>
109 <th>Pros and Cons</th>
110</tr>
111<tr>
112 <th>+</th>
113 <ti>
114 No need to emerge yet another package; drivers are integrated into kernel.
115 </ti>
116</tr>
117<tr>
118 <th>+</th>
119 <ti>One shot solution, no repeating emerges.</ti>
120</tr>
121<tr>
122 <th>-</th>
123 <ti>Might be a slightly different version than <c>alsa-driver</c>.</ti>
124</tr>
125</table>
126
127<p>
128And, if you were to use <c>alsa-driver</c>,
129</p>
130
131<table>
132<tr>
133 <th>alsa-driver</th>
134 <th>Pros and Cons</th>
135</tr>
136<tr>
137 <th>+</th>
138 <ti>Possibly the latest drivers from the ALSA Project.</ti>
139</tr>
140<tr>
141 <th>+</th>
142 <ti>Useful if you intend to develop audio drivers.</ti>
143</tr>
144<tr>
145 <th>-</th>
146 <ti>Every kernel recompile requires a re-emerge of <c>alsa-driver</c>.</ti>
147</tr>
148<tr>
149 <th>-</th>
150 <ti>Needs certain kernel config options disabled to work correctly.</ti>
151</tr>
152</table>
153
154</body>
155</section>
156<section>
157<title>So...</title>
158<body>
159
160<p>
161The differences between <c>alsa-driver</c> and the in-kernel ALSA drivers are
162quite subtle, as mentioned earlier. Since there are not any huge differences,
163you are encouraged to go through the process of using the ALSA provided by the
164kernel <e>first</e> for ease of use. Before reporting any sound related issues
165to <uri link="https://bugs.gentoo.org">Gentoo Bugzilla</uri>, please try to
166reproduce them using <c>alsa-driver</c> and file the bug report no matter what
167the result.
168</p>
169
170</body>
171</section>
172<section id="lspci"> 80<section id="lspci">
173<title>Before you proceed</title> 81<title>Before you proceed</title>
174<body> 82<body>
175 83
176<p> 84<p>
177Whichever method of install you choose, you need to know what drivers your 85First, you need to know what drivers your sound card uses. In most cases, sound
178sound card uses. In most cases, sound cards (onboard and otherwise) are PCI 86cards (onboard and otherwise) are PCI based and <c>lspci</c> will help you in
179based and <c>lspci</c> will help you in digging out the required information. 87digging out the required information. Please <c>emerge sys-apps/pciutils</c> to
180Please <c>emerge sys-apps/pciutils</c> to get <c>lspci</c>, if you don't have it 88get <c>lspci</c>, if you don't have it installed already. In case you have a USB
181installed already. In case you have a USB sound card, <c>lsusb</c> from 89sound card, <c>lsusb</c> from <c>sys-apps/usbutils</c> <e>might</e> be of help.
182<c>sys-apps/usbutils</c> <e>might</e> be of help. For ISA cards, try using 90For ISA cards, try using <c>sys-apps/isapnptools</c>. Also, the following pages
183<c>sys-apps/isapnptools</c>. Also, the following pages <e>may</e> help users 91<e>may</e> help users with ISA based sound cards:
184with ISA based sound cards:
185</p> 92</p>
186 93
187<ul> 94<ul>
188 <li> 95 <li>
189 <uri link="http://www.roestock.demon.co.uk/isapnptools/">The ISAPNPTOOLS 96 <uri link="http://www.roestock.demon.co.uk/isapnptools/">The ISAPNPTOOLS
190 Page</uri> 97 Page</uri>
191 </li> 98 </li>
192 <li> 99 <li>
193 <uri link="http://www2.linuxjournal.com/article/3269">LinuxJournal PnP 100 <uri link="http://www2.linuxjournal.com/article/3269">LinuxJournal PnP
194 Article</uri> 101 Article</uri>
195 </li> 102 </li>
196 <li> 103 <li>
197 <uri link="http://www.tldp.org/HOWTO/Sound-HOWTO/x320.html">TLDP Sound 104 <uri link="http://www.tldp.org/HOWTO/Sound-HOWTO/x320.html">TLDP Sound
198 HowTo</uri> 105 HowTo</uri>
199 </li> 106 </li>
221be taken to the Creative Labs matrix page where you can see that the SB Live! 128be taken to the Creative Labs matrix page where you can see that the SB Live!
222uses the <c>emu10k1</c> module. That is the information we need for now. If 129uses the <c>emu10k1</c> module. That is the information we need for now. If
223you are interested in detailed information, you can click on the link next to 130you are interested in detailed information, you can click on the link next to
224the "Details" and that will take you to the <c>emu10k1</c> specific page. 131the "Details" and that will take you to the <c>emu10k1</c> specific page.
225</p> 132</p>
226 133
227<p> 134<p>
228If you intend to use MIDI, then you should add <c>midi</c> to your USE flags in 135If you intend to use MIDI, then you should add <c>midi</c> to your USE flags in
229<path>/etc/make.conf</path> before emerging any ALSA packages. Later in the 136<path>/etc/make.conf</path> before emerging any ALSA packages. Later in the
230guide, we will show you how to set up <uri link="#midi">MIDI support</uri>. 137guide, we will show you how to set up <uri link="#midi">MIDI support</uri>.
231</p> 138</p>
232 139
233</body> 140</body>
234</section> 141</section>
235<section id="kernel"> 142<section id="kernel">
236<title>Using ALSA provided by your Kernel</title> 143<title>Configuring the kernel</title>
237<body> 144<body>
238
239<p>
240If you're a person who likes to keep things simple, then this is the way to go.
241</p>
242 145
243<note> 146<note>
244Since the 2005.0 release, Gentoo Linux uses 2.6 as the default kernel. Please 147Since the 2005.0 release, Gentoo Linux uses 2.6 as the default kernel. Please
245check that your kernel is a 2.6 series kernel. This method will <e>not</e> work 148check that your kernel is a 2.6 series kernel. This method will <e>not</e> work
246on a 2.4 kernel. 149on a 2.4 kernel.
247</note> 150</note>
248 151
249<p> 152<p>
250Let us now configure the kernel to enable ALSA. 153Let us now configure the kernel to enable ALSA.
251</p> 154</p>
252 155
253<impo> 156<impo>
254<c>genkernel</c> users should now run <c>genkernel --menuconfig all</c> and 157<c>genkernel</c> users should now run <c>genkernel --menuconfig all</c> and
255then follow the instructions in <uri link="#doc_chap2_pre3">Kernel Options for 158then follow the instructions in <uri link="#doc_chap2_pre3">Kernel Options for
256ALSA</uri>. 159ALSA</uri>.
325 228
326<comment>(Move one level back and select in case you have an USB sound card)</comment> 229<comment>(Move one level back and select in case you have an USB sound card)</comment>
327USB Devices ---&gt; 230USB Devices ---&gt;
328</pre> 231</pre>
329 232
330<p> 233<p>
331Now that your options are set, you can (re)compile the kernel and ALSA support 234Now that your options are set, you can (re)compile the kernel and ALSA support
332for your card should be functional once you reboot into the new kernel. Don't 235for your card should be functional once you reboot into the new kernel. Don't
333forget to update your GRUB configuration to use the newly built kernel. 236forget to update your GRUB configuration to use the newly built kernel.
334You can now proceed to <uri link="#alsa-utilities">ALSA Utilities</uri> and 237You can now proceed to <uri link="#alsa-utilities">ALSA Utilities</uri> and
335see if everything is working as it should. 238see if everything is working as it should.
336</p> 239</p>
337 240
338</body> 241</body>
339</section> 242</section>
340<section id="alsa-driver">
341<title>Using the ALSA Driver package</title>
342<body>
343
344<p>
345So you've decided to go the <c>alsa-driver</c> way. Let's get started then.
346There are a few minor things to be done to ensure only the drivers for your
347sound card are compiled. Although this is not really necessary, it cuts down
348on the unnecessary drivers that will be compiled otherwise.
349</p>
350
351<p>
352If you don't have an idea of what drivers your sound card might need, please
353take a look at the <uri link="#lspci">lspci</uri> section of this guide. Once
354you have your driver name (<c>emu10k1</c> in our example), edit
355<path>/etc/make.conf</path> and add a variable, <c>ALSA_CARDS</c>.
356</p>
357
358<pre caption="Adding ALSA_CARDS to make.conf">
359<comment>(For one sound card)</comment>
360ALSA_CARDS="emu10k1"
361<comment>(For more than one, separate names with spaces)</comment>
362ALSA_CARDS="emu10k1 via82xx"
363</pre>
364
365<p>
366If you have compiled your kernel and want to use <c>alsa-driver</c>, please
367ensure the following before proceeding, else <c>alsa-driver</c> is likely to
368fail. The next code listing gives you one way of performing the checks.
369</p>
370
371<note>
372<c>genkernel</c> users can proceed with <uri link="#doc_chap2_pre6">Installing
373alsa-driver</uri> as their configuration is in sync with the one shown below by
374default.
375</note>
376
377<ol>
378 <li>
379 <c>CONFIG_SOUND</c> is set. (Basic Sound support enabled)
380 </li>
381 <li>
382 <c>CONFIG_SOUND_PRIME</c> is not set. (In-built OSS support disabled)
383 </li>
384 <li>
385 <c>CONFIG_SND</c> is not set. (In-built ALSA support disabled)
386 </li>
387 <li>
388 <path>/usr/src/linux</path> points to the kernel you want ALSA working on.
389 </li>
390</ol>
391
392<pre caption=".config checks">
393<comment>(Assuming the linux symlink points to the correct kernel)</comment>
394# <i>cd /usr/src/linux</i>
395# <i>grep SOUND .config</i>
396<comment>(1. is true)</comment>
397CONFIG_SOUND=y
398<comment>(2. is true)</comment>
399CONFIG_SOUND_PRIME is not set
400# <i>grep SND .config</i>
401<comment>(and 3. is true)</comment>
402CONFIG_SND is not set
403</pre>
404
405<p>
406Now all you have to do is type the magic words... and no, it's not abracadabra.
407</p>
408
409<pre caption="Installing alsa-driver">
410# <i>emerge alsa-driver</i>
411</pre>
412
413<impo>
414Please note that you will have to run <c>emerge alsa-driver</c> after every
415kernel (re)compile, as the earlier drivers are deleted. To make this task
416easier, you may want to emerge the <c>module-rebuild</c> package, which will
417keep track of module packages and rebuild them for you. First run
418<c>module-rebuild populate</c> to create the list, and then after every kernel
419(re)compile, you just run <c>module-rebuild rebuild</c>, and your external
420modules will be rebuilt.
421</impo>
422
423</body>
424</section>
425</chapter> 243</chapter>
426 244
427<chapter> 245<chapter>
428<title>Configuring/Testing ALSA</title> 246<title>Configuring/Testing ALSA</title>
429<section id="alsa-utilities"> 247<section id="alsa-utilities">
430<title>ALSA Utilities</title> 248<title>ALSA Utilities</title>
431<body> 249<body>
432 250
433<p> 251<p>
434<c>alsa-utils</c> forms an integral part of ALSA as it has a truckload of 252<c>alsa-utils</c> forms an integral part of ALSA as it has a truckload of
435programs that are highly useful, including the ALSA Initscripts. Hence we 253programs that are highly useful, including the ALSA Initscripts. Hence we
436strongly recommend that you install <c>alsa-utils</c> 254strongly recommend that you install <c>alsa-utils</c>
437</p> 255</p>
438 256
439<pre caption="Install alsa-utils"> 257<pre caption="Install alsa-utils">
440# <i>emerge alsa-utils</i> 258# <i>emerge alsa-utils</i>
441</pre> 259</pre>
442 260
443<note> 261<note>
444If you activated ALSA in your <uri link="#kernel">kernel</uri> <e>and</e> did
445not compile ALSA as modules, please proceed to the 262If you did <e>not</e> compile ALSA as modules, please proceed to the <uri
446<uri link="#initscript">ALSA Initscript</uri> section. The rest of you need 263link="#initscript">ALSA Initscript</uri> section. The rest of you need to
447to configure ALSA. This is made very easy by the existence of the 264configure ALSA. This is made very easy by the existence of the <c>alsaconf</c>
448<c>alsaconf</c> tool provided by <c>alsa-utils</c>. 265tool provided by <c>alsa-utils</c>.
449</note> 266</note>
450 267
451</body> 268</body>
452</section> 269</section>
453<section id="alsa-config"> 270<section id="alsa-config">
454<title>Configuration</title> 271<title>Configuration</title>
455<body> 272<body>
456 273
457<p> 274<p>
458Recent versions of <c>udev</c> (<c>>=udev-103</c>) provide some degree of 275Recent versions of <c>udev</c> (<c>>=udev-103</c>) provide some degree of
459kernel-level autoconfiguration of your sound card. If possible, try to rely on 276kernel-level autoconfiguration of your sound card. If possible, try to rely on
460just letting your kernel automatically setup your sound card for you. Otherwise, 277just letting your kernel automatically setup your sound card for you. Otherwise,
461use <c>alsaconf</c> to configure your card, as shown below. 278use <c>alsaconf</c> to configure your card, as shown below.
462</p> 279</p>
463 280
722 539
723Audio devices: 540Audio devices:
7240: EMU10K1 (DUPLEX) 5410: EMU10K1 (DUPLEX)
725 542
726Synth devices: NOT ENABLED IN CONFIG 543Synth devices: NOT ENABLED IN CONFIG
727 544
728Midi devices: 545Midi devices:
7290: EMU10K1 MPU-401 (UART) 5460: EMU10K1 MPU-401 (UART)
730 547
731Timers: 548Timers:
7327: system timer 5497: system timer
733 550
734Mixers: 551Mixers:
7350: SigmaTel STAC9721/23 5520: SigmaTel STAC9721/23
736</pre> 553</pre>
554
555<!-- TODO: remove this a few months after alsa-driver leaves the tree -->
737 556
738<p> 557<p>
739The other most common issue users face is the dreaded "Unknown symbol in module" 558The other most common issue users face is the dreaded "Unknown symbol in module"
740error. An example of the same is shown below. 559error. An example of the same is shown below.
741</p> 560</p>
742 561
743<pre caption="Unknown Symbol in module error"> 562<pre caption="Unknown Symbol in module error">
744# <i>/etc/init.d/alsasound start</i> 563# <i>/etc/init.d/alsasound start</i>
745 * Loading ALSA modules ... 564 * Loading ALSA modules ...
746 * Loading: snd-card-0 ... [ ok ] 565 * Loading: snd-card-0 ... [ ok ]
747 * Loading: snd-pcm-oss ... 566 * Loading: snd-pcm-oss ...
748WARNING: Error inserting snd_mixer_oss 567WARNING: Error inserting snd_mixer_oss
749(/lib/modules/2.6.12-gentoo-r6/kernel/sound/core/oss/snd-mixer-oss.ko): Unknown 568(/lib/modules/2.6.12-gentoo-r6/kernel/sound/core/oss/snd-mixer-oss.ko): Unknown
750symbol in module, or unknown parameter (see dmesg) FATAL: Error inserting 569symbol in module, or unknown parameter (see dmesg) FATAL: Error inserting
751snd_pcm_oss 570snd_pcm_oss
775snd_mixer_oss: Unknown symbol snd_unregister_oss_device 594snd_mixer_oss: Unknown symbol snd_unregister_oss_device
776snd_mixer_oss: Unknown symbol snd_register_oss_device 595snd_mixer_oss: Unknown symbol snd_register_oss_device
777snd_mixer_oss: Unknown symbol snd_mixer_oss_notify_callback 596snd_mixer_oss: Unknown symbol snd_mixer_oss_notify_callback
778snd_mixer_oss: Unknown symbol snd_oss_info_register 597snd_mixer_oss: Unknown symbol snd_oss_info_register
779snd_pcm_oss: Unknown symbol snd_unregister_oss_device 598snd_pcm_oss: Unknown symbol snd_unregister_oss_device
780snd_pcm_oss: Unknown symbol snd_register_oss_device 599snd_pcm_oss: Unknown symbol snd_register_oss_device
781snd_pcm_oss: Unknown symbol snd_mixer_oss_ioctl_card 600snd_pcm_oss: Unknown symbol snd_mixer_oss_ioctl_card
782snd_pcm_oss: Unknown symbol snd_oss_info_register 601snd_pcm_oss: Unknown symbol snd_oss_info_register
783snd_mixer_oss: Unknown symbol snd_unregister_oss_device 602snd_mixer_oss: Unknown symbol snd_unregister_oss_device
784snd_mixer_oss: Unknown symbol snd_register_oss_device 603snd_mixer_oss: Unknown symbol snd_register_oss_device
785snd_mixer_oss: Unknown symbol snd_mixer_oss_notify_callback 604snd_mixer_oss: Unknown symbol snd_mixer_oss_notify_callback
786snd_mixer_oss: Unknown symbol snd_oss_info_register 605snd_mixer_oss: Unknown symbol snd_oss_info_register
787</pre> 606</pre>
788 607
789<p> 608<p>
790The above issue is caused when you switch from <c>alsa-driver</c> to in-kernel 609The above issue is caused when you switch from the <c>alsa-driver</c> to in-kernel
791ALSA because when you unmerge <c>alsa-driver</c> the module files are config 610ALSA because when you unmerge <c>alsa-driver</c> the module files are config
792protected and hence get left behind. So, when you switch to in-kernel 611protected and hence get left behind. So, when you switch to in-kernel
793drivers, running <c>modprobe</c> gives you a mix of <c>alsa-driver</c> and 612drivers, running <c>modprobe</c> gives you a mix of <c>alsa-driver</c> and
794in-kernel modules thus causing the above errors. 613in-kernel modules thus causing the above errors.
795</p> 614</p>
796 615
797<p> 616<p>
798The solution is quite easy. We just need to manually remove the problem causing 617The solution is quite easy. We just need to manually remove the problem causing
799directory after you unmerge <c>alsa-driver</c>. Be sure to remove the correct 618directory after you unmerge <c>alsa-driver</c>. Be sure to remove the correct
800kernel version and not the current one! 619kernel version and not the current one!
801</p> 620</p>
802 621
803<pre caption="Removing the alsa-driver modules"> 622<pre caption="Removing the alsa-driver modules">
804# <i>rm -rf /lib/modules/$(uname -r)/alsa-driver</i> 623# <i>rm -rf /lib/modules/$(uname -r)/alsa-driver</i>
805</pre> 624</pre>
809<path>/etc/modules.d</path> supplying a <c>device_mode</c> parameter when it 628<path>/etc/modules.d</path> supplying a <c>device_mode</c> parameter when it
810isn't required. Confirm that this is indeed the issue and find out which file 629isn't required. Confirm that this is indeed the issue and find out which file
811is the culprit. 630is the culprit.
812</p> 631</p>
813 632
814<pre caption="Confirming and searching for device_mode"> 633<pre caption="Confirming and searching for device_mode">
815<comment>(Check dmesg to confirm)</comment> 634<comment>(Check dmesg to confirm)</comment>
816# <i>dmesg | grep device_mode</i> 635# <i>dmesg | grep device_mode</i>
817snd: Unknown parameter `device_mode' 636snd: Unknown parameter `device_mode'
818<comment>(Now, to get to the source of the issue)</comment> 637<comment>(Now, to get to the source of the issue)</comment>
819# <i>grep device_mode /etc/modules.d/*</i> 638# <i>grep device_mode /etc/modules.d/*</i>
820</pre> 639</pre>
821 640
822<p> 641<p>
823Usually it is a file called <path>alsa</path> with the line <c>options snd 642Usually it is a file called <path>alsa</path> with the line <c>options snd
824device_mode=0666</c>. Remove this line and restart the alsasound service and 643device_mode=0666</c>. Remove this line and restart the <c>alsasound</c> service
825that should take care of this issue. 644and that should take care of this issue.
826</p> 645</p>
646
647<!-- End of removal notice -->
827 648
828</body> 649</body>
829</section> 650</section>
830</chapter> 651</chapter>
831 652
832<chapter> 653<chapter>
833<title>Other things ALSA</title> 654<title>Other things ALSA</title>
834<section id="midi"> 655<section id="midi">
835<title>Setting up MIDI support</title> 656<title>Setting up MIDI support</title>
836<body> 657<body>
837 658
838<p> 659<p>
839First, check to make sure that you enabled the <c>midi</c> USE flag in 660First, check to make sure that you enabled the <c>midi</c> USE flag in
840<path>/etc/make.conf</path>. If you didn't, go ahead and add it now. You will 661<path>/etc/make.conf</path>. If you didn't, go ahead and add it now. You will
841also need to re-emerge any ALSA packages that use the <c>midi</c> flag, such as 662also need to re-emerge any ALSA packages that use the <c>midi</c> flag, such as
842<c>alsa-lib</c>, <c>alsa-utils</c>, and <c>alsa-driver</c>. 663<c>alsa-lib</c> and <c>alsa-utils</c>.
843</p> 664</p>
844 665
845<p> 666<p>
846If your sound card is one of those that come with on-board MIDI synthesizers 667If your sound card is one of those that come with on-board MIDI synthesizers
847and you would like to listen to some .mid files, you have to install 668and you would like to listen to some .mid files, you have to install
848<c>awesfx</c> which is basically a set of utilities for controlling the AWE32 669<c>awesfx</c> which is basically a set of utilities for controlling the AWE32
849driver. We need to install it first. If you don't have a hardware synthesizer, 670driver. We need to install it first. If you don't have a hardware synthesizer,
850you can use a virtual one. Please see the section on 671you can use a virtual one. Please see the section on
851<uri link="#vsynth">Virtual Synthesizers</uri> for more information. 672<uri link="#vsynth">Virtual Synthesizers</uri> for more information.
852</p> 673</p>
853 674
854<pre caption="Installing awesfx"> 675<pre caption="Installing awesfx">
855# <i>emerge awesfx</i> 676# <i>emerge awesfx</i>
856</pre> 677</pre>
857 678
957a simple <c>emerge</c>. 778a simple <c>emerge</c>.
958</p> 779</p>
959 780
960<pre caption="Installing ALSA Tools"> 781<pre caption="Installing ALSA Tools">
961# <i>emerge alsa-tools</i> 782# <i>emerge alsa-tools</i>
962</pre> 783</pre>
963 784
964</body> 785</body>
965</section> 786</section>
966<section> 787<section>
967<title>Multiple sound cards</title> 788<title>Multiple sound cards</title>
968<body> 789<body>
969 790
970<p> 791<p>
971You can have more than one sound card in your system simultaneously, provided 792You can have more than one sound card in your system simultaneously, provided
972that you have built ALSA as modules in your kernel (or have installed 793that you have built ALSA as modules in your kernel. You just need to specify
973<c>alsa-driver</c> instead). You just need to specify which should be started 794which should be started first in <path>/etc/modules.d/alsa</path>. Your cards
974first in <path>/etc/modules.d/alsa</path>. Your cards are identified by their 795are identified by their driver names inside this file. 0 is the first card, 1 is
975driver names inside this file. 0 is the first card, 1 is the second, and so on.
976Here's an example for a system with two sound cards. 796the second, and so on. Here's an example for a system with two sound cards.
977</p> 797</p>
978 798
979<pre caption="Two sound cards in /etc/modules.d/alsa"> 799<pre caption="Two sound cards in /etc/modules.d/alsa">
980options snd-emu10k1 index=0 800options snd-emu10k1 index=0
981options snd-via82xx index=1 801options snd-via82xx index=1
982</pre> 802</pre>
983 803
984<p> 804<p>
985Or, if you have two cards that use the same driver, you specify them on the same 805Or, if you have two cards that use the same driver, you specify them on the same
986line, using comma-separated numbers. Here's an example for a system with three 806line, using comma-separated numbers. Here's an example for a system with three
987sound cards, two of which are the same Intel High Definition Audio card. 807sound cards, two of which are the same Intel High Definition Audio card.
988</p> 808</p>
989 809
990<pre caption="Multiple sound cards in /etc/modules.d/alsa"> 810<pre caption="Multiple sound cards in /etc/modules.d/alsa">
991options snd-ymfpci index=0 811options snd-ymfpci index=0

Legend:
Removed from v.1.80  
changed lines
  Added in v.1.81

  ViewVC Help
Powered by ViewVC 1.1.20