| 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.37 2004/06/15 07:21:07 bennyc Exp $ --> |
2 | <!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/alsa-guide.xml,v 1.43 2004/11/21 12:35:06 neysx Exp $ --> |
| 3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
3 | <!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 4 | |
4 | |
| 5 | <guide link = "/doc/en/alsa-guide.xml"> |
5 | <guide link="/doc/en/alsa-guide.xml"> |
| 6 | <title>Gentoo Linux ALSA Guide</title> |
6 | <title>Gentoo Linux ALSA Guide</title> |
| 7 | <author title="Author"> |
7 | <author title="Author"> |
| 8 | <mail link="zu@pandora.be">Vincent Verleye</mail> |
8 | <mail link="zu@pandora.be">Vincent Verleye</mail> |
| 9 | </author> |
9 | </author> |
| 10 | <author title="Author"> |
10 | <author title="Author"> |
| … | |
… | |
| 15 | </author> |
15 | </author> |
| 16 | <author title="Author"> |
16 | <author title="Author"> |
| 17 | <mail link="eradicator@gentoo.org">Jeremy Huddleston</mail> |
17 | <mail link="eradicator@gentoo.org">Jeremy Huddleston</mail> |
| 18 | </author> |
18 | </author> |
| 19 | <author title="Editor"><!-- zhen@gentoo.org --> |
19 | <author title="Editor"><!-- zhen@gentoo.org --> |
| 20 | John P. Davis |
20 | John P. Davis |
| 21 | </author> |
21 | </author> |
| 22 | <author title="Editor"> |
22 | <author title="Editor"> |
| 23 | <mail link="swift@gentoo.org">Sven Vermeulen</mail> |
23 | <mail link="swift@gentoo.org">Sven Vermeulen</mail> |
| 24 | </author> |
24 | </author> |
| 25 | <author title="Editor"> |
25 | <author title="Editor"> |
| … | |
… | |
| 31 | <author title="Editor"> |
31 | <author title="Editor"> |
| 32 | <mail link="erwin@gentoo.org">Erwin</mail> |
32 | <mail link="erwin@gentoo.org">Erwin</mail> |
| 33 | </author> |
33 | </author> |
| 34 | |
34 | |
| 35 | <abstract> |
35 | <abstract> |
| 36 | This guide will show you how to set up the Advanced Linux Sound Architecture |
36 | This guide will show you how to set up the Advanced Linux Sound Architecture |
| 37 | (ALSA) on Gentoo Linux. In addition to the Gentoo Linux Desktop Configuration |
37 | (ALSA) on Gentoo Linux. In addition to the Gentoo Linux Desktop Configuration |
| 38 | Guide, this guide is supposed to give you more information on this subject. |
38 | Guide, this guide is supposed to give you more information on this subject. |
| 39 | </abstract> |
39 | </abstract> |
| 40 | |
40 | |
| 41 | <license/> |
41 | <license/> |
| 42 | |
42 | |
| 43 | <version>1.5.0</version> |
43 | <version>1.5.5</version> |
| 44 | <date>May 18, 2004</date> |
44 | <date>2004-10-31</date> |
| 45 | |
45 | |
| 46 | <chapter> |
46 | <chapter> |
| 47 | <title>The Advanced Linux Sound Architecture</title> |
47 | <title>The Advanced Linux Sound Architecture</title> |
| 48 | <section> |
48 | <section> |
| 49 | <title>What is ALSA?</title> |
49 | <title>What is ALSA?</title> |
| … | |
… | |
| 71 | <title>USE Flags</title> |
71 | <title>USE Flags</title> |
| 72 | <body> |
72 | <body> |
| 73 | |
73 | |
| 74 | <p> |
74 | <p> |
| 75 | Gentoo provides an <c>alsa</c> USE flag which you should set in |
75 | Gentoo provides an <c>alsa</c> USE flag which you should set in |
| 76 | <path>/etc/make.conf</path> to allow our available packages to compile with |
76 | <path>/etc/make.conf</path> to allow our available packages to compile with |
| 77 | ALSA support. If you have <c>oss</c> in your USE variable as well, ALSA will |
77 | ALSA support. If you have <c>oss</c> in your USE variable as well, ALSA will |
| 78 | compile with OSS backward compatibility. |
78 | compile with OSS backward compatibility. |
| 79 | </p> |
79 | </p> |
| 80 | |
80 | |
| 81 | </body> |
81 | </body> |
| … | |
… | |
| 98 | </p> |
98 | </p> |
| 99 | |
99 | |
| 100 | <p> |
100 | <p> |
| 101 | Users of 2.4 kernel sources will have to install the necessary ALSA drivers for |
101 | Users of 2.4 kernel sources will have to install the necessary ALSA drivers for |
| 102 | their soundcard. First find out what soundcard you have. An easy trick is to |
102 | their soundcard. First find out what soundcard you have. An easy trick is to |
| 103 | search for "audio" in <path>/proc/pci</path>: |
103 | search for "audio" in the output of the <c>lspci</c> command. You can install |
|
|
104 | it with <c>emerge pciutils</c>. |
| 104 | </p> |
105 | </p> |
| 105 | |
106 | |
| 106 | <pre caption="Finding out the soundcard type"> |
107 | <pre caption="Finding out the soundcard type"> |
| 107 | # <i>grep -i audio /proc/pci</i> |
108 | # <i>lspci | grep -i audio</i> |
| 108 | Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio |
109 | Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 64). |
| 109 | Controller (rev 64). |
|
|
| 110 | </pre> |
110 | </pre> |
| 111 | |
111 | |
| 112 | <p> |
112 | <p> |
| 113 | Now go to the <uri link="http://www.alsa-project.org/alsa-doc">ALSA Soundcard |
113 | Now go to the <uri link="http://www.alsa-project.org/alsa-doc">ALSA Soundcard |
| 114 | Matrix</uri> and search for your soundcard. In the above example you should go |
114 | Matrix</uri> and search for your soundcard. In the above example you should go |
| 115 | to the "VIA" manufacturer. You will receive a table with the known chipsets of |
115 | to the "VIA" manufacturer. You will receive a table with the known chipsets of |
| 116 | that vendor. The chipset in the above example is "via82c686"; the "Details" link |
116 | that vendor. The chipset in the above example is "via82c686"; the "Details" link |
| 117 | then informs me that the driver is called <path>via82xx</path>. |
117 | then informs me that the driver is called <path>via82xx</path>. This is all the |
|
|
118 | information you need, so you can safely discard the rest of that document. |
| 118 | </p> |
119 | </p> |
| 119 | |
120 | |
| 120 | <p> |
121 | <p> |
| 121 | Based on this information we can now install the <c>alsa-driver</c> for our |
122 | Based on this information we can now install the <c>alsa-driver</c> for our |
| 122 | soundcard. First edit <path>/etc/make.conf</path> and <e>add</e> a new option |
123 | soundcard. First edit <path>/etc/make.conf</path> and <e>add</e> a new option |
| … | |
… | |
| 309 | <path>/usr/share/sfbank</path>. For instance, the SBLive has a sound font file |
310 | <path>/usr/share/sfbank</path>. For instance, the SBLive has a sound font file |
| 310 | called <path>8MBGMSFX.SF2</path> or <path>CT4GMSFX.SF2</path>. |
311 | called <path>8MBGMSFX.SF2</path> or <path>CT4GMSFX.SF2</path>. |
| 311 | </p> |
312 | </p> |
| 312 | |
313 | |
| 313 | <p> |
314 | <p> |
| 314 | After copying over the sound font, select them using <c>sfxload</c>: |
315 | After copying over the sound font, select them using <c>asfxload</c>: |
| 315 | </p> |
316 | </p> |
| 316 | |
317 | |
| 317 | <pre caption="Loading the sound font"> |
318 | <pre caption="Loading the sound font"> |
| 318 | # <i>sfxload /usr/share/sfbank/8MBGMSFX.SF2</i> |
319 | # <i>asfxload /usr/share/sfbank/8MBGMSFX.SF2</i> |
| 319 | </pre> |
320 | </pre> |
| 320 | |
321 | |
| 321 | <p> |
322 | <p> |
| 322 | You must have this command run every time you boot, so it is adviseable to add |
323 | You must have this command run every time you boot, so it is adviseable to add |
| 323 | it to <path>/etc/conf.d/local.start</path> as well. |
324 | it to <path>/etc/conf.d/local.start</path> as well. |
| … | |
… | |
| 343 | <pre caption="Installing Timidity++"> |
344 | <pre caption="Installing Timidity++"> |
| 344 | # <i>emerge timidity++</i> |
345 | # <i>emerge timidity++</i> |
| 345 | </pre> |
346 | </pre> |
| 346 | |
347 | |
| 347 | <p> |
348 | <p> |
| 348 | A sample configuration file will be installed for you in |
|
|
| 349 | <path>/usr/share/timidity/config/timidity.cfg</path>. If you don't have a |
|
|
| 350 | timidity++ configuration setup yet, you can just use this one. |
|
|
| 351 | </p> |
|
|
| 352 | |
|
|
| 353 | <pre caption="Using the default Timidity++ configuration file"> |
|
|
| 354 | # <i>cp /usr/share/timidity/config/timidity.cfg /usr/share/timidity</i> |
|
|
| 355 | </pre> |
|
|
| 356 | |
|
|
| 357 | <p> |
|
|
| 358 | For timidity to play sounds, it needs a soundfont. If you do not have any, |
349 | For timidity to play sounds, it needs a soundfont. If you do not have any, |
| 359 | install <c>timidity-eawpatches</c> which will give you some soundfonts. |
350 | install <c>timidity-eawpatches</c> which will give you some soundfonts. |
| 360 | </p> |
351 | </p> |
| 361 | |
352 | |
| 362 | <pre caption="Installing timidity-eawpatches"> |
353 | <pre caption="Installing timidity-eawpatches"> |
| … | |
… | |
| 377 | <section> |
368 | <section> |
| 378 | <title>Testing MIDI Support</title> |
369 | <title>Testing MIDI Support</title> |
| 379 | <body> |
370 | <body> |
| 380 | |
371 | |
| 381 | <p> |
372 | <p> |
| 382 | You can use <c>pmidi</c> to test your MIDI configuration: |
373 | You can use <c>aplaymidi</c> from the ALSA Utils to test your MIDI |
| 383 | </p> |
374 | configuration. |
| 384 | |
|
|
| 385 | <pre caption="Installing pmidi"> |
|
|
| 386 | # <i>emerge pmidi</i> |
|
|
| 387 | </pre> |
375 | </p> |
| 388 | |
376 | |
| 389 | <p> |
377 | <p> |
| 390 | To see what MIDI output ports are available on your system, use the <c>-l</c> |
378 | To see what MIDI output ports are available on your system, use the <c>-l</c> |
| 391 | option: |
379 | option: |
| 392 | </p> |
380 | </p> |
| 393 | |
381 | |
| 394 | <pre caption="Viewing the MIDI output ports"> |
382 | <pre caption="Viewing the MIDI output ports"> |
| 395 | # <i>pmidi -l</i> |
383 | # <i>aplaymidi -l</i> |
| 396 | </pre> |
384 | </pre> |
| 397 | |
385 | |
| 398 | <p> |
386 | <p> |
| 399 | If all looks fine, try playing a MIDI file to make sure everything works. With |
387 | If all looks fine, try playing a MIDI file to make sure everything works. With |
| 400 | the <c>-p</c> option you define what MIDI port you want to use. |
388 | the <c>-p</c> option you define what MIDI port you want to use. |
| 401 | </p> |
389 | </p> |
| 402 | |
390 | |
| 403 | <pre caption="Playing a MIDI file"> |
391 | <pre caption="Playing a MIDI file"> |
| 404 | # <i>pmidi -p 65:0 "Final Fantasy 7 - Aerith' Theme.mid"</i> |
392 | # <i>aplaymidi -p 65:0 "Final Fantasy 7 - Aerith' Theme.mid"</i> |
| 405 | </pre> |
393 | </pre> |
| 406 | |
394 | |
| 407 | </body> |
395 | </body> |
| 408 | </section> |
396 | </section> |
| 409 | </chapter> |
397 | </chapter> |
| … | |
… | |
| 459 | of VIA 82xx bridge." |
447 | of VIA 82xx bridge." |
| 460 | parm: mpu_port long array (min = 1, max = 8), description "MPU-401 port. |
448 | parm: mpu_port long array (min = 1, max = 8), description "MPU-401 port. |
| 461 | (VT82C686x only)" |
449 | (VT82C686x only)" |
| 462 | <i>parm: joystick int array (min = 1, max = 8), description "Enable |
450 | <i>parm: joystick int array (min = 1, max = 8), description "Enable |
| 463 | joystick. (VT82C686x only)"</i> |
451 | joystick. (VT82C686x only)"</i> |
| 464 | parm: ac97_clock int array (min = 1, max = 8), description "AC'97 codec |
452 | parm: ac97_clock int array (min = 1, max = 8), description "AC'97 codec |
| 465 | clock (default 48000Hz)." |
453 | clock (default 48000Hz)." |
| 466 | parm: dxs_support int array (min = 1, max = 8), description "Support for |
454 | parm: dxs_support int array (min = 1, max = 8), description "Support for |
| 467 | DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = |
455 | DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = |
| 468 | no VRA) |
456 | no VRA) |
| 469 | </pre> |
457 | </pre> |
| 470 | |
458 | |
| 471 | <p> |
459 | <p> |
| 472 | If it has the <c>joystick</c> parameter, append <c>joystick=1</c> to your |
460 | If it has the <c>joystick</c> parameter, append <c>joystick=1</c> to your |