/[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.58 Revision 1.59
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.58 2005/07/16 11:45:41 alin Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.59 2005/07/26 17:28:11 vanquirius 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 12
13<abstract> 13<abstract>
14This document helps a user setup ALSA on Gentoo Linux. 14This document helps a user setup ALSA on Gentoo Linux.
15</abstract> 15</abstract>
16 16
17<!-- The content of this document is licensed under the CC-BY-SA license --> 17<!-- The content of this document is licensed under the CC-BY-SA license -->
18<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 18<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
19<license/> 19<license/>
20 20
21<version>2.7</version> 21<version>2.7</version>
22<date>2005-07-16</date> 22<date>2005-07-26</date>
23 23
24<chapter> 24<chapter>
25<title>Introduction</title> 25<title>Introduction</title>
26<section> 26<section>
27<title>What is ALSA?</title> 27<title>What is ALSA?</title>
28<body> 28<body>
29 29
30<p> 30<p>
31ALSA, which stands for <e>Advanced Linux Sound Architecture</e>, provides 31ALSA, which stands for <e>Advanced Linux Sound Architecture</e>, provides
32audio and MIDI (<e>Musical Instrument Digital Interface</e>) functionality to 32audio and MIDI (<e>Musical Instrument Digital Interface</e>) functionality to
33the Linux operating system. ALSA is the default sound subsystem in the 2.6 33the Linux operating system. ALSA is the default sound subsystem in the 2.6
34kernel thereby replacing OSS (<e>Open Sound System</e>), which was used in the 34kernel thereby replacing OSS (<e>Open Sound System</e>), which was used in the
352.4 kernels. 352.4 kernels.
36</p> 36</p>
37 37
326There are a few minor things to be done to ensure only the drivers for your 326There are a few minor things to be done to ensure only the drivers for your
327sound card are compiled. Although this is not really necessary, it cuts down 327sound card are compiled. Although this is not really necessary, it cuts down
328on the unnecessary drivers that will be compiled otherwise. 328on the unnecessary drivers that will be compiled otherwise.
329</p> 329</p>
330 330
331<p> 331<p>
332If you don't have an idea of what drivers your sound card might need, please 332If you don't have an idea of what drivers your sound card might need, please
333take a look at the <uri link="#lspci">lspci</uri> section of this guide. Once 333take a look at the <uri link="#lspci">lspci</uri> section of this guide. Once
334you have your driver name (<c>emu10k1</c> in our example), edit 334you have your driver name (<c>emu10k1</c> in our example), edit
335<path>/etc/make.conf</path> and add a variable, <c>ALSA_CARDS</c>. 335<path>/etc/make.conf</path> and add a variable, <c>ALSA_CARDS</c>.
336</p> 336</p>
337 337
338<pre caption="Adding ALSA_CARDS to make.conf"> 338<pre caption="Adding ALSA_CARDS to make.conf">
339<comment>(For one sound card)</comment> 339<comment>(For one sound card)</comment>
340ALSA_CARDS="emu10k1" 340ALSA_CARDS="emu10k1"
341<comment>(For more than one, seperate names with spaces)</comment> 341<comment>(For more than one, separate names with spaces)</comment>
342ALSA_CARDS="emu10k1 via82xx" 342ALSA_CARDS="emu10k1 via82xx"
343</pre> 343</pre>
344 344
345<p> 345<p>
346If you have compiled your kernel and want to use <c>alsa-driver</c>, please 346If you have compiled your kernel and want to use <c>alsa-driver</c>, please
347ensure the following before proceeding, else <c>alsa-driver</c> is likely to 347ensure the following before proceeding, else <c>alsa-driver</c> is likely to
348fail. The next code listing gives you one way of performing the checks. 348fail. The next code listing gives you one way of performing the checks.
349</p> 349</p>
350 350
351<note> 351<note>
352<c>genkernel</c> users can proceed with <uri link="#doc_chap2_pre6">Installing 352<c>genkernel</c> users can proceed with <uri link="#doc_chap2_pre6">Installing
353alsa-driver</uri> as their configuration is in sync with the one shown below by 353alsa-driver</uri> as their configuration is in sync with the one shown below by
354default. 354default.
355</note> 355</note>
356 356
477SAVE_ON_STOP variable is set to yes. This saves your sound settings when you 477SAVE_ON_STOP variable is set to yes. This saves your sound settings when you
478shutdown your system. 478shutdown your system.
479</p> 479</p>
480 480
481</body> 481</body>
482</section> 482</section>
483<section> 483<section>
484<title>Audio Group</title> 484<title>Audio Group</title>
485<body> 485<body>
486 486
487<p> 487<p>
488Before we move on to testing, there's one last <e>important</e> thing that needs 488Before we move on to testing, there's one last <e>important</e> thing that needs
489to be setup. Rule of thumb in a *nix OS : Do not run as root unless needed. 489to be setup. Rule of thumb in a *nix OS : Do not run as root unless needed.
490This applies here as well ;) How? Well, most of the times you should be logged 490This applies here as well ;) How? Well, most of the times you should be logged
491in as a user and would like to listen to music or access your soundcard. For 491in as a user and would like to listen to music or access your soundcard. For
492that to happen, you need to be in the "audio" group. At this point, we'll add 492that to happen, you need to be in the "audio" group. At this point, we'll add
493users to the audio group, so that they won't have any issues when they want to 493users to the audio group, so that they won't have any issues when they want to
494access sound devices. We'll use <c>gpasswd</c> here and you need to be logged in 494access sound devices. We'll use <c>gpasswd</c> here and you need to be logged in
495as root for this to work. 495as root for this to work.
496</p> 496</p>
497 497
498<pre caption="Adding users to the audio group"> 498<pre caption="Adding users to the audio group">
499<comment>(Substitute &lt;username&gt; with your user)</comment> 499<comment>(Substitute &lt;username&gt; with your user)</comment>
500# <i>gpasswd -a &lt;username&gt; audio </i> 500# <i>gpasswd -a &lt;username&gt; audio </i>
501Adding user &lt;username&gt; to group audio 501Adding user &lt;username&gt; to group audio
502</pre> 502</pre>
503 503
504</body> 504</body>
505</section> 505</section>
506<section> 506<section>
507<title>Volume Check!</title> 507<title>Volume Check!</title>
595 595
596<figure link="/images/docs/alsa-mixerunmuted.png" short="AlsaMixer Unmuted" caption="Alsa Mixer ready to roll"/> 596<figure link="/images/docs/alsa-mixerunmuted.png" short="AlsaMixer Unmuted" caption="Alsa Mixer ready to roll"/>
597 597
598</body> 598</body>
599</section> 599</section>
600<section> 600<section>
601<title>Sound Check!</title> 601<title>Sound Check!</title>
602<body> 602<body>
603 603
604<p> 604<p>
605The irritating way to check your soundcard is to see if you can hear static on 605The irritating way to check your soundcard is to see if you can hear static on
606the speakers. This isn't exactly fun, but hey, it tells you the card is 606the speakers. This isn't exactly fun, but hey, it tells you the card is
607configured and working. 607configured and working.
608</p> 608</p>
609 609
610<pre caption="Bring on th static"> 610<pre caption="Bring on the static">
611# <i>cat /dev/urandom > /dev/dsp</i> 611# <i>cat /dev/urandom > /dev/dsp</i>
612</pre> 612</pre>
613 613
614<note> 614<note>
615<path>/dev/dsp</path> is a symlink to <path>/dev/sound/dsp</path> and should be 615<path>/dev/dsp</path> is a symlink to <path>/dev/sound/dsp</path> and should be
616automatically created. Try re-directing the output to 616automatically created. Try re-directing the output to
617<path>/dev/sound/dsp</path> in case you don't get a "No such file or directory" 617<path>/dev/sound/dsp</path> in case you don't get a "No such file or directory"
618error. 618error.
619</note> 619</note>
620 620
621<p> 621<p>
622You should hear static. Press <c>Ctrl + C</c> to stop. If you don't hear 622You should hear static. Press <c>Ctrl + C</c> to stop. If you don't hear
623anything, now is a good time to go back and check/trace out the issue and 623anything, now is a good time to go back and check/trace out the issue and
624rectify it. 624rectify it.
625</p> 625</p>
660 660
661Playing: Paul Oakenfold - Dread Rock.ogg 661Playing: Paul Oakenfold - Dread Rock.ogg
662Ogg Vorbis stream: 2 channel, 44100 Hz 662Ogg Vorbis stream: 2 channel, 44100 Hz
663Genre: Soundtrack 663Genre: Soundtrack
664Transcoded: mp3;160 664Transcoded: mp3;160
665Title: Dread Rock 665Title: Dread Rock
666Artist: Paul Oakenfold 666Artist: Paul Oakenfold
667Date: 2003 667Date: 2003
668Album: Matrix Reloaded 668Album: Matrix Reloaded
669Time: 00:11.31 [04:28.75] of 04:40.06 (200.6 kbps) Output Buffer 96.9% 669Time: 00:11.31 [04:28.75] of 04:40.06 (200.6 kbps) Output Buffer 96.9%
670</pre> 670</pre>
671 671
672</body> 672</body>
673</section> 673</section>
674<section> 674<section>
675<title> ALSA and USE</title> 675<title>ALSA and USE</title>
676<body> 676<body>
677 677
678<p> 678<p>
679You can now add the <c>alsa</c> use flag to <path>/etc/make.conf</path> to 679You can now add the <c>alsa</c> use flag to <path>/etc/make.conf</path> to
680ensure that your applications that support ALSA get built with it. Some 680ensure that your applications that support ALSA get built with it. Some
681architectures like x86 and amd64 have the flag enabled by default. 681architectures like x86 and amd64 have the flag enabled by default.
682</p> 682</p>
683 683
684</body> 684</body>
685</section> 685</section>
686<section> 686<section>
687<title>Issues?</title> 687<title>Issues?</title>
688<body> 688<body>
689 689
690<p> 690<p>

Legend:
Removed from v.1.58  
changed lines
  Added in v.1.59

  ViewVC Help
Powered by ViewVC 1.1.20