  <?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.alsa-project.org/main/index.php?action=history&amp;feed=atom&amp;title=Matrix%3AGenericInstructions</id>
	<title>Matrix:GenericInstructions - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.alsa-project.org/main/index.php?action=history&amp;feed=atom&amp;title=Matrix%3AGenericInstructions"/>
	<link rel="alternate" type="text/html" href="https://www.alsa-project.org/main/index.php?title=Matrix:GenericInstructions&amp;action=history"/>
	<updated>2026-04-12T04:46:57Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>https://www.alsa-project.org/main/index.php?title=Matrix:GenericInstructions&amp;diff=666&amp;oldid=prev</id>
		<title>EliotBlennerhassett: copy and edit from Matrix:Soundcard, ?include this instead of template?</title>
		<link rel="alternate" type="text/html" href="https://www.alsa-project.org/main/index.php?title=Matrix:GenericInstructions&amp;diff=666&amp;oldid=prev"/>
		<updated>2007-08-09T03:26:21Z</updated>

		<summary type="html">&lt;p&gt;copy and edit from Matrix:Soundcard, ?include this instead of template?&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| align=&amp;quot;right&amp;quot;&lt;br /&gt;
 | __TOC__&lt;br /&gt;
 |}&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
There are two ways of getting Linux drivers to work, you can either compile them into the kernel or build them separately as modules. Read the [http://www.tldp.org/ Kernel-HOWTO] for details of how to compile a kernel.&lt;br /&gt;
&lt;br /&gt;
'''You must turn on the sound support soundcore module.''' This is in the kernel. Look in the sound drivers directory and it should be the first option. Most people enable the module setting. That way you can load and unload the module manually if you have multiple soundcards/&amp;amp;#x200B;devices or if you intend to debug or use cutting edge software which may cause your drivers to halt sometimes. Of course it also means you have more control of your system.&lt;br /&gt;
&lt;br /&gt;
Most modern distros come with &amp;lt;tt&amp;gt;soundcore&amp;lt;/tt&amp;gt; compiled as a module. You can check this in numerous ways. The easiest way is to type:&lt;br /&gt;
&lt;br /&gt;
        modinfo soundcore&lt;br /&gt;
&lt;br /&gt;
If this command returns that you have this module, then you don't need to recompile your kernel.&lt;br /&gt;
&lt;br /&gt;
==Quick installation==&lt;br /&gt;
&lt;br /&gt;
In the following, you need to replace '''yourmodule''' with the name of the module for your soundcard.&lt;br /&gt;
&lt;br /&gt;
[[:Category:Module|The module list]] links to pages for each module where you can find out more about '''yourmodule'''.&lt;br /&gt;
&lt;br /&gt;
Type the following commands in the shell of your choice.&lt;br /&gt;
&lt;br /&gt;
{{Note|&lt;br /&gt;
''If you are using Hg ([http://www.selenic.com/mercurial/ Mercurial]) then you need to type:''&lt;br /&gt;
&lt;br /&gt;
         &amp;lt;nowiki&amp;gt;./hgcompile &amp;quot;or&amp;quot; make build&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
''instead of:''&lt;br /&gt;
&lt;br /&gt;
         &amp;lt;nowiki&amp;gt;./configure&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
|NB}}&lt;br /&gt;
&lt;br /&gt;
Make a directory to store the alsa source code in:&lt;br /&gt;
&lt;br /&gt;
        cd ~/src&lt;br /&gt;
        mkdir ~/src/alsa&lt;br /&gt;
        cd ~/src/alsa&lt;br /&gt;
        cp ~/downloads/alsa-* .&lt;br /&gt;
&lt;br /&gt;
Now unzip and install the &amp;lt;tt&amp;gt;alsa-driver&amp;lt;/tt&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
        bunzip2 alsa-driver-xxx&lt;br /&gt;
        tar -xf alsa-driver-xxx&lt;br /&gt;
        cd alsa-driver-xxx&lt;br /&gt;
        ./configure --with-cards='''yourmodule''' --with-sequencer=yes ; make ; make install&lt;br /&gt;
&lt;br /&gt;
Now unzip and install the &amp;lt;tt&amp;gt;alsa-lib&amp;lt;/tt&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
        cd ..&lt;br /&gt;
        bunzip2 alsa-lib-xxx&lt;br /&gt;
        tar -xf alsa-lib-xxx&lt;br /&gt;
        cd alsa-lib-xxx&lt;br /&gt;
        ./configure ; make ; make install&lt;br /&gt;
&lt;br /&gt;
Now unzip and install the &amp;lt;tt&amp;gt;alsa-utils&amp;lt;/tt&amp;gt; package:&lt;br /&gt;
&lt;br /&gt;
        cd ..&lt;br /&gt;
        bunzip2 alsa-utils-xxx&lt;br /&gt;
        tar -xf alsa-utils-xxx&lt;br /&gt;
        cd alsa-utils-xxx&lt;br /&gt;
        ./configure ; make ; make install&lt;br /&gt;
&lt;br /&gt;
Now insert the modules into the kernel:&lt;br /&gt;
&lt;br /&gt;
        modprobe snd-'''yourmodule''' &lt;br /&gt;
&lt;br /&gt;
Now adjust your soundcard's volume levels. All mixer channels are muted by default. You must use a native mixer program to unmute appropriate channels, for example &amp;lt;tt&amp;gt;alsamixer&amp;lt;/tt&amp;gt; from the &amp;lt;tt&amp;gt;alsa-utils&amp;lt;/tt&amp;gt; package. Note that some usb-audio devices do not have internal mixer controls. Run:&lt;br /&gt;
&lt;br /&gt;
        alsamixer&lt;br /&gt;
&lt;br /&gt;
You can also look at the utils/alsasound file. This script is designed for the ''RedHat Linux'' distribution, but it can also be used with other distributions which use SystemV style rc init scripts. This will allow you to load your modules at boot time. If you don't want to do this you can of course compile them into the kernel instead and save yourself the hassle of coming to terms with the rc init scripts.&lt;br /&gt;
&lt;br /&gt;
===Setting up modprobe and kmod support===&lt;br /&gt;
&lt;br /&gt;
Before you send a mail complaining that &amp;quot;I don't have &amp;lt;tt&amp;gt;/etc/modules.conf&amp;lt;/tt&amp;gt;, where do I find it ……&amp;quot; ‒ the &amp;lt;tt&amp;gt;/etc/conf.modules&amp;lt;/tt&amp;gt; has been deprecated with a few distro's, but in your case it may still be &amp;lt;tt&amp;gt;/etc/conf.modules&amp;lt;/tt&amp;gt;. Basically they are both the same, but recent version of &amp;lt;tt&amp;gt;modutils&amp;lt;/tt&amp;gt; use &amp;lt;tt&amp;gt;/etc/modules.conf&amp;lt;/tt&amp;gt; instead. Nothing to worry about as such, optionally please update to the latest version of &amp;lt;tt&amp;gt;modutils&amp;lt;/tt&amp;gt;. This should solve your problem.&lt;br /&gt;
&lt;br /&gt;
Here's the example for this card. Copy and paste this to the bottom of your &amp;lt;tt&amp;gt;/etc/&amp;amp;#x200B;modules.conf&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
{{Note|'''Debian GNU/Linux users''' need to save this information into a file in the &amp;lt;tt&amp;gt;/etc/modutils/&amp;lt;/tt&amp;gt; directory (eg. &amp;lt;tt&amp;gt;/etc/modutils/alsa&amp;lt;/tt&amp;gt;) and run &amp;lt;tt&amp;gt;update-modules&amp;lt;/tt&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
        # ALSA portion&lt;br /&gt;
        alias char-major-116 snd&lt;br /&gt;
        alias snd-card-0 snd-'''yourmodule'''&lt;br /&gt;
        # module options should go here&lt;br /&gt;
        &lt;br /&gt;
        # OSS/Free portion&lt;br /&gt;
        alias char-major-14 soundcore&lt;br /&gt;
        alias sound-slot-0 snd-card-0&lt;br /&gt;
        &lt;br /&gt;
        # card #1&lt;br /&gt;
        alias sound-service-0-0 snd-mixer-oss&lt;br /&gt;
        alias sound-service-0-1 snd-seq-oss&lt;br /&gt;
        alias sound-service-0-3 snd-pcm-oss&lt;br /&gt;
        alias sound-service-0-8 snd-seq-oss&lt;br /&gt;
        alias sound-service-0-12 snd-pcm-oss&lt;br /&gt;
&lt;br /&gt;
To copy and paste the above to your &amp;lt;tt&amp;gt;/etc/modules.conf&amp;lt;/tt&amp;gt; file follow these [http://www.alsa-project.org/alsa-doc/doc-php/file-edit.php instructions].&lt;br /&gt;
&lt;br /&gt;
==modules.conf==&lt;br /&gt;
&lt;br /&gt;
This is a short explanation of what happens in the &amp;lt;tt&amp;gt;/etc/modules.conf&amp;lt;/tt&amp;gt; file.&lt;br /&gt;
&lt;br /&gt;
===Native devices===&lt;br /&gt;
&lt;br /&gt;
After the main multiplexer is loaded, its code automatically requests the top level sound card module. String &amp;lt;tt&amp;gt;snd-card-''%i''&amp;lt;/tt&amp;gt; is requested for native devices where ''%i'' is the sound card number, counted from zero (the first sound card) to seven (the eighth sound card). String &amp;lt;tt&amp;gt;sound-slot-''%i''&amp;lt;/tt&amp;gt; is requested for native devices where ''%i'' is slot number for the corresponding ALSA owner (which is basically the sound card number). The options line allows you to set various configuration options before the module is loaded. String &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt; (or &amp;lt;tt&amp;gt;snd_id&amp;lt;/tt&amp;gt;) lets you set the name of the card which is then returned in the &amp;lt;tt&amp;gt;/proc/asound/cards&amp;lt;/tt&amp;gt; file, i.e. to user space applications. Other options may be available depending on the specific card. Options for these cards are found in the &amp;lt;tt&amp;gt;INSTALL&amp;lt;/tt&amp;gt; file or above.&lt;br /&gt;
&lt;br /&gt;
        username@hostname# pico /etc/modules.conf&lt;br /&gt;
        &lt;br /&gt;
        # ALSA portion&lt;br /&gt;
        alias snd-card-0 snd-hda-intel&lt;br /&gt;
        alias snd-card-1 snd-cmipci&lt;br /&gt;
        options snd-cmipci id=&amp;quot;first&amp;quot; mpu_port=0x330&lt;br /&gt;
        &lt;br /&gt;
        # OSS/Free portion&lt;br /&gt;
        alias sound-slot-0 snd-card-0&lt;br /&gt;
        alias sound-slot-1 snd-card-1&lt;br /&gt;
&lt;br /&gt;
===Autoloading OSS/free emulation===&lt;br /&gt;
&lt;br /&gt;
At this point we are finished with the configuration for ALSA native devices, but you may also need autoloading for the OSS/Free emulation modules, an ALSA add-on. At this time only one module does not depend on any others, thus must be loaded separately: &amp;lt;tt&amp;gt;snd-pcm1-oss&amp;lt;/tt&amp;gt;. String &amp;lt;tt&amp;gt;sound-service-''%i''-''%i''&amp;lt;/tt&amp;gt; is required for OSS/Free service where the first ''%i'' is the slot number/sound card number and the second ''%i'' is the service number.&lt;br /&gt;
&lt;br /&gt;
        username@hostname# pico /etc/modules.conf&lt;br /&gt;
        &lt;br /&gt;
        # OSS/Free portion - card #1&lt;br /&gt;
        alias sound-slot-0 snd-card-0&lt;br /&gt;
        alias sound-service-0-0 snd-mixer-oss&lt;br /&gt;
        alias sound-service-0-1 snd-seq-oss&lt;br /&gt;
        alias sound-service-0-3 snd-pcm-oss&lt;br /&gt;
        alias sound-service-0-8 snd-seq-oss&lt;br /&gt;
        alias sound-service-0-12 snd-pcm-oss&lt;br /&gt;
        &lt;br /&gt;
        # OSS/Free portion - card #2 (cmipci)&lt;br /&gt;
        alias sound-slot-1 snd-card-1&lt;br /&gt;
        alias sound-service-1-0 snd-mixer-oss&lt;br /&gt;
        alias sound-service-1-3 snd-pcm-oss&lt;br /&gt;
        alias sound-service-1-12 snd-pcm-oss&lt;br /&gt;
&lt;br /&gt;
The alias for &amp;lt;tt&amp;gt;snd-seq-oss&amp;lt;/tt&amp;gt; is not necessary on the second device, because there is only one &amp;lt;tt&amp;gt;/dev/sequencer&amp;lt;/tt&amp;gt; regardless how many devices you have.&lt;br /&gt;
&lt;br /&gt;
==Further information==&lt;br /&gt;
&amp;lt;!-- Need to put some relevant links here --&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Copied and edited from [[Matrix:Soundcard]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Module]]&lt;/div&gt;</summary>
		<author><name>EliotBlennerhassett</name></author>
	</entry>
</feed>