/[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.62 Revision 1.69
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.62 2005/09/10 18:02:53 swift Exp $ --> 2<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.69 2006/07/07 14:40:08 rane 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>
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.10</version> 21<version>2.14</version>
22<date>2005-09-10</date> 22<date>2006-07-06</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>
83 <li> 83 <li>
84 Use Gentoo's <c>media-sound/alsa-driver</c> package. 84 Use Gentoo's <c>media-sound/alsa-driver</c> package.
85 </li> 85 </li>
86</ol> 86</ol>
87 87
88<p> 88<p>
89We shall take a peek into both before finally deciding on one. 89We shall take a peek into both before finally deciding on one.
90</p> 90</p>
91 91
92<p> 92<p>
93If you were to use ALSA provided by the kernel, the following are the pros and 93If you were to use ALSA provided by the kernel, the following are the pros and
231<p> 231<p>
232Let us now configure the kernel to enable ALSA. 232Let us now configure the kernel to enable ALSA.
233</p> 233</p>
234 234
235<impo> 235<impo>
236<c>genkernel</c> users should now run <c>genkernel --menuconfig all</c> and then follow 236<c>genkernel</c> users should now run <c>genkernel --menuconfig all</c> and
237the instructions in <uri link="#doc_chap2_pre3">Kernel Options for ALSA</uri>. 237then follow the instructions in <uri link="#doc_chap2_pre3">Kernel Options for
238ALSA</uri>.
238</impo> 239</impo>
239 240
240<pre caption="Heading over to the source"> 241<pre caption="Heading over to the source">
241# <i>cd /usr/src/linux</i> 242# <i>cd /usr/src/linux</i>
242# <i>make menuconfig</i> 243# <i>make menuconfig</i>
253</p> 254</p>
254 255
255<p> 256<p>
256Please note that for the sake of ease, all examples show ALSA built as modules. 257Please note that for the sake of ease, all examples show ALSA built as modules.
257It is advisable to follow the same as it then allows the use of <c>alsaconf</c> 258It is advisable to follow the same as it then allows the use of <c>alsaconf</c>
258which is a boon when you want to configure your card. Please do <e>not</e> skip the <uri 259which is a boon when you want to configure your card. Please do <e>not</e> skip
259link="#alsa-config">Configuration</uri> section of this document. If you still 260the <uri link="#alsa-config">Configuration</uri> section of this document. If
260like to have options built-in, ensure that you make changes to your config 261you still like to have options built-in, ensure that you make changes to your
261accordingly. 262config accordingly.
262</p> 263</p>
263 264
264<pre caption="Kernel Options for ALSA"> 265<pre caption="Kernel Options for ALSA">
265Device Drivers ---&gt; 266Device Drivers ---&gt;
266 Sound ---&gt; 267 Sound ---&gt;
449your devices and try to find out your sound card. You will be asked to pick 450your devices and try to find out your sound card. You will be asked to pick
450your sound card from a list. Once that's done, it will ask you permission to 451your sound card from a list. Once that's done, it will ask you permission to
451automatically make required changes to <path>/etc/modules.d/alsa</path>. 452automatically make required changes to <path>/etc/modules.d/alsa</path>.
452It will then adjust your volume settings to optimum levels, run 453It will then adjust your volume settings to optimum levels, run
453<c>modules-update</c> and start the <path>/etc/init.d/alsasound</path> service. 454<c>modules-update</c> and start the <path>/etc/init.d/alsasound</path> service.
454Once <c>alsaconf</c> exits, you can proceed with setting up the ALSA initscript. 455Once <c>alsaconf</c> exits, you can proceed with setting up the ALSA
456initscript.
455</p> 457</p>
456 458
457</body> 459</body>
458</section> 460</section>
459<section id="initscript"> 461<section id="initscript">
518<comment>(ALSA as modules)</comment> 520<comment>(ALSA as modules)</comment>
519# <i>/etc/init.d/alsasound start</i> 521# <i>/etc/init.d/alsasound start</i>
520 * Loading ALSA modules ... 522 * Loading ALSA modules ...
521 * Loading: snd-card-0 ... [ ok ] 523 * Loading: snd-card-0 ... [ ok ]
522 * Loading: snd-pcm-oss ... [ ok ] 524 * Loading: snd-pcm-oss ... [ ok ]
523 * Loading: snd-seq ... [ ok ] 525 * Loading: snd-seq ... [ ok ]
524 * Loading: snd-emu10k1-synth ... [ ok ] 526 * Loading: snd-emu10k1-synth ... [ ok ]
525 * Loading: snd-seq-midi ... [ ok ] 527 * Loading: snd-seq-midi ... [ ok ]
526 * Restoring Mixer Levels ... [ ok ] 528 * Restoring Mixer Levels ... [ ok ]
527<comment>(ALSA compiled in)</comment> 529<comment>(ALSA compiled in)</comment>
528# <i>/etc/init.d/alsasound start</i> 530# <i>/etc/init.d/alsasound start</i>
529 * Loading ALSA modules ... 531 * Loading ALSA modules ...
530 * Restoring Mixer Levels ... [ ok ] 532 * Restoring Mixer Levels ... [ ok ]
599</body> 601</body>
600</section> 602</section>
601<section> 603<section>
602<title>Sound Check!</title> 604<title>Sound Check!</title>
603<body> 605<body>
604
605<p>
606The irritating way to check your soundcard is to see if you can hear static on
607the speakers. This isn't exactly fun, but hey, it tells you the card is
608configured and working.
609</p>
610
611<pre caption="Bring on the static">
612# <i>cat /dev/urandom > /dev/dsp</i>
613</pre>
614
615<note>
616<path>/dev/dsp</path> is a symlink to <path>/dev/sound/dsp</path> and should be
617automatically created. Try re-directing the output to
618<path>/dev/sound/dsp</path> in case you don't get a "No such file or directory"
619error.
620</note>
621
622<p>
623You should hear static. Press <c>Ctrl + C</c> to stop. If you don't hear
624anything, now is a good time to go back and check/trace out the issue and
625rectify it.
626</p>
627 606
628<p> 607<p>
629Finally. Some music. If everything above is perfect, you should now be able to 608Finally. Some music. If everything above is perfect, you should now be able to
630listen to some good music. A quick way to test is to use a command line tool 609listen to some good music. A quick way to test is to use a command line tool
631like <c>media-sound/madplay</c>. You could also use something more well known 610like <c>media-sound/madplay</c>. You could also use something more well known
804directory after you unmerge <c>alsa-driver</c>. Be sure to remove the correct 783directory after you unmerge <c>alsa-driver</c>. Be sure to remove the correct
805kernel version and not the current one! 784kernel version and not the current one!
806</p> 785</p>
807 786
808<pre caption="Removing the alsa-driver modules"> 787<pre caption="Removing the alsa-driver modules">
809<comment>(Replace KERNELVER with your kernel version)</comment>
810# <i>rm -rf /lib/modules/KERNELVER/alsa-driver</i> 788# <i>rm -rf /lib/modules/$(uname -r)/alsa-driver</i>
789</pre>
790
791<p>
792Another reason for error messages similar to the ones above could be a file in
793<path>/etc/modules.d</path> supplying a <c>device_mode</c> parameter when it
794isn't required. Confirm that this is indeed the issue and find out which file
795is the culprit.
811</pre> 796</p>
797
798<pre caption="Confirming and searching for device_mode">
799<comment>(Check dmesg to confirm)</comment>
800# <i>dmesg | grep device_mode</i>
801snd: Unknown parameter `device_mode'
802<comment>(Now, to get to the source of the issue)</comment>
803# <i>grep device_mode /etc/modules.d/*</i>
804</pre>
805
806<p>
807Usually it is a file called <path>alsa</path> with the line <c>options snd
808device_mode=0666</c>. Remove this line and restart the alsasound service and
809that should take care of this issue.
810</p>
812 811
813</body> 812</body>
814</section> 813</section>
815</chapter> 814</chapter>
816 815

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.69

  ViewVC Help
Powered by ViewVC 1.1.20