/[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.78 Revision 1.79
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.78 2007/05/06 23:27:46 nightmorph Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.79 2007/05/07 07:08:24 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.21</version> 27<version>2.22</version>
28<date>2007-05-06</date> 28<date>2007-05-07</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
66</section> 66</section>
67</chapter> 67</chapter>
68 68
69<chapter> 69<chapter>
70<title>Installing ALSA</title> 70<title>Installing ALSA</title>
71<section> 71<section>
72<title>Options</title> 72<title>Options</title>
73<body> 73<body>
74 74
75<warn> 75<warn>
76The methods shown below are mutually exclusive. You cannot have ALSA compiled 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. 77in your kernel and use <c>media-sound/alsa-driver</c>. It <e>will</e> fail.
78</warn> 78</warn>
79 79
80<p> 80<p>
81The two options are : 81The two options are:
82</p> 82</p>
83 83
84<ol> 84<ol>
85 <li> 85 <li>
86 Use ALSA provided by your kernel. This is the preferred/recommended method. 86 Use ALSA provided by your kernel. This is the preferred/recommended method.
87 </li> 87 </li>
88 <li>Use Gentoo's <c>media-sound/alsa-driver</c> package.</li> 88 <li>Use Gentoo's <c>media-sound/alsa-driver</c> package.</li>
89</ol> 89</ol>
90 90
91<p> 91<p>
92The in-kernel drivers and the <c>alsa-driver</c> package can vary a little; it's 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 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 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 95effectively separate branches of the ALSA project; they are not entirely
96identical. You should be aware that they might function slightly differently, so 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 97if one doesn't work for you, try the other! We shall take a peek into both
98before finally deciding on one. 98before finally deciding on one.
99</p> 99</p>
100 100
101<p> 101<p>
102If you were to use ALSA provided by the kernel, the following are the pros and 102If you were to use ALSA provided by the kernel, the following are the pros and
103cons : 103cons:
104</p> 104</p>
105 105
106<table> 106<table>
107<tr> 107<tr>
108 <th>Kernel ALSA</th> 108 <th>Kernel ALSA</th>
109 <th>Pros and Cons</th> 109 <th>Pros and Cons</th>
110</tr> 110</tr>
111<tr> 111<tr>
112 <th>+</th> 112 <th>+</th>
113 <ti> 113 <ti>
114 No need to emerge yet another package; drivers are integrated into kernel. 114 No need to emerge yet another package; drivers are integrated into kernel.
115 </ti> 115 </ti>
116</tr> 116</tr>
117<tr> 117<tr>
118 <th>+</th> 118 <th>+</th>
225</p> 225</p>
226 226
227<p> 227<p>
228If you intend to use MIDI, then you should add <c>midi</c> to your USE flags in 228If 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 229<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>. 230guide, we will show you how to set up <uri link="#midi">MIDI support</uri>.
231</p> 231</p>
232 232
233</body> 233</body>
234</section> 234</section>
235<section id="kernel"> 235<section id="kernel">
236<title>Using ALSA provided by your Kernel</title> 236<title>Using ALSA provided by your Kernel</title>
237<body> 237<body>
238 238
239<p> 239<p>
240If you're a person who likes to keep things simple like I do, then this is 240If you're a person who likes to keep things simple, then this is the way to go.
241the way to go.
242</p> 241</p>
243 242
244<note> 243<note>
245Since the 2005.0 release, Gentoo Linux uses 2.6 as the default kernel. Unless 244Since the 2005.0 release, Gentoo Linux uses 2.6 as the default kernel. Please
246you are specifically using the 2.4 profile, <c>gentoo-sources</c> will be a 245check that your kernel is a 2.6 series kernel. This method will <e>not</e> work
2472.6 kernel on <e>most</e> architectures. Please check that your kernel is a 246on a 2.4 kernel.
2482.6 series kernel. This method will <e>not</e> work on a 2.4 kernel.
249</note> 247</note>
250 248
251<p> 249<p>
252Let us now configure the kernel to enable ALSA. 250Let us now configure the kernel to enable ALSA.
253</p> 251</p>
254 252
255<impo> 253<impo>
256<c>genkernel</c> users should now run <c>genkernel --menuconfig all</c> and 254<c>genkernel</c> users should now run <c>genkernel --menuconfig all</c> and
257then follow the instructions in <uri link="#doc_chap2_pre3">Kernel Options for 255then follow the instructions in <uri link="#doc_chap2_pre3">Kernel Options for
258ALSA</uri>. 256ALSA</uri>.
259</impo> 257</impo>
260 258
261<pre caption="Heading over to the source"> 259<pre caption="Heading over to the source">
262# <i>cd /usr/src/linux</i> 260# <i>cd /usr/src/linux</i>
263# <i>make menuconfig</i> 261# <i>make menuconfig</i>
509 507
510<p> 508<p>
511Next, just check the <path>/etc/conf.d/alsasound</path> file and ensure that 509Next, just check the <path>/etc/conf.d/alsasound</path> file and ensure that
512SAVE_ON_STOP variable is set to yes. This saves your sound settings when you 510SAVE_ON_STOP variable is set to yes. This saves your sound settings when you
513shutdown your system. 511shutdown your system.
514</p> 512</p>
515 513
516</body> 514</body>
517</section> 515</section>
518<section> 516<section>
519<title>Audio Group</title> 517<title>Audio Group</title>
520<body> 518<body>
521 519
522<p> 520<p>
523Before we move on to testing, there's one last <e>important</e> thing that needs 521Before we move on to testing, there's one last <e>important</e> thing that needs
524to be setup. Rule of thumb in a *nix OS : Do not run as root unless needed. 522to be setup. Rule of thumb in a *nix OS: Do not run as root unless needed.
525This applies here as well ;) How? Well, most of the times you should be logged 523This applies here as well ;) How? Well, most of the times you should be logged
526in as a user and would like to listen to music or access your soundcard. For 524in as a user and would like to listen to music or access your soundcard. For
527that to happen, you need to be in the "audio" group. At this point, we'll add 525that to happen, you need to be in the "audio" group. At this point, we'll add
528users to the audio group, so that they won't have any issues when they want to 526users to the audio group, so that they won't have any issues when they want to
529access sound devices. We'll use <c>gpasswd</c> here and you need to be logged in 527access sound devices. We'll use <c>gpasswd</c> here and you need to be logged in
530as root for this to work. 528as root for this to work.
531</p> 529</p>
532 530
533<pre caption="Adding users to the audio group"> 531<pre caption="Adding users to the audio group">
534<comment>(Substitute &lt;username&gt; with your user)</comment> 532<comment>(Substitute &lt;username&gt; with your user)</comment>
535# <i>gpasswd -a &lt;username&gt; audio </i> 533# <i>gpasswd -a &lt;username&gt; audio </i>
536Adding user &lt;username&gt; to group audio 534Adding user &lt;username&gt; to group audio
537</pre> 535</pre>
538 536
539</body> 537</body>
695</p> 693</p>
696 694
697<p> 695<p>
698<path>/proc</path> is your friend. And in this case, <path>/proc/asound</path> 696<path>/proc</path> is your friend. And in this case, <path>/proc/asound</path>
699is your best friend. We shall just take a short look at how much info is made 697is your best friend. We shall just take a short look at how much info is made
700available to us there. 698available to us there.
701</p> 699</p>
702 700
703<pre caption="Fun with /proc/asound"> 701<pre caption="Fun with /proc/asound">
704<comment>(First and foremost, if /proc/asound/cards shows your card, ALSA has 702<comment>(First and foremost, if /proc/asound/cards shows your card, ALSA has
705picked up your sound card fine.)</comment> 703picked up your sound card fine.)</comment>
706# <i>cat /proc/asound/cards</i> 704# <i>cat /proc/asound/cards</i>
7070 [Live ]: EMU10K1 - Sound Blaster Live! 7050 [Live ]: EMU10K1 - Sound Blaster Live!
708 Sound Blaster Live! (rev.6, serial:0x80271102) at 0xb800, irq 11 706 Sound Blaster Live! (rev.6, serial:0x80271102) at 0xb800, irq 11
709 707
710<comment>(If you run ALSA off the kernel like I do and wonder how far behind
711you are from alsa-driver, this displays current running ALSA version)</comment> 708<comment>(This displays the current running ALSA version)</comment>
712# <i>cat /proc/asound/version</i> 709# <i>cat /proc/asound/version</i>
713Advanced Linux Sound Architecture Driver Version 1.0.8 (Thu Jan 13 09:39:32 2005 UTC). 710Advanced Linux Sound Architecture Driver Version 1.0.8 (Thu Jan 13 09:39:32 2005 UTC).
714 711
715<comment>(ALSA OSS emulation details)</comment> 712<comment>(ALSA OSS emulation details)</comment>
716# <i>cat /proc/asound/oss/sndstat</i> 713# <i>cat /proc/asound/oss/sndstat</i>
717Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code) 714Sound Driver:3.8.1a-980706 (ALSA v1.0.8 emulation code)
718Kernel: Linux airwolf.zion 2.6.11ac1 #2 Wed May 4 00:35:08 IST 2005 i686 715Kernel: Linux airwolf.zion 2.6.11ac1 #2 Wed May 4 00:35:08 IST 2005 i686
719Config options: 0 716Config options: 0
720 717
721Installed drivers: 718Installed drivers:
722Type 10: ALSA emulation 719Type 10: ALSA emulation
723 720
724Card config: 721Card config:
725Sound Blaster Live! (rev.6, serial:0x80271102) at 0xb800, irq 11 722Sound Blaster Live! (rev.6, serial:0x80271102) at 0xb800, irq 11
726 723

Legend:
Removed from v.1.78  
changed lines
  Added in v.1.79

  ViewVC Help
Powered by ViewVC 1.1.20