Jump to content

Tips&Tricks ALSA installtion instructions


aru
 Share

Recommended Posts

 

kunderdog

Frequent user

Joined: 21 Aug 2002

Posts: 100

 

Post Posted: Fri Sep 06, 2002 8:10 pm Post subject: ALSA installtion instructions

_________________________________________________________________

 

 

I have read a lot of frustrated sound installation postings, and since it looks like ALSA will be the default sound API for MDK in the future, I thought I would layout how to get it working on MDK 8.2. First of all, heck the alsa-project.org page to make sure your card is supported (see the soundcard matrix).

 

1. Download the latest "unstable" (0.9rc3) alsa-drivers, libs, utils, oss ("tools" are useful for some cards)

2. untar the files (tar -xjvf alsa-*.bz2, etc).

3. Build and install them in this order: drivers, libs, utils:

 

For the drivers:

 

cd alsa-driver

./configure --with-cards=<your-card-chipset>

make

make install

 

The "--with-cards" thing is important. As an example, my SBLive has the chipset "emu10k1", so I do "--with-cards=emu10k1". If you have more than one card, separate them wih a comma.

 

Once the driver "make install" is done, DO NOT run ./snddevices at this point, though the README says to. Mandrake's default "devfs" can create devices on the fly, with one slight modification for audio (see below my append to /etc/devfsd.conf). If you have turned off devfs for some oher reason, then that is another isue...

 

For the libs, utils, and oss, etc:

 

cd alsa-*

./configure

make

make install

 

Great, now add the following block to your modules.conf, here I have again used the emu10k1 by example, just put in the chipset name for your card in all places where it appears:

 

####################################################

### ALSA configuration block (with OSS/free modules enabled) ###

 

alias char-major-116 snd

alias char-major-14 soundcore

 

# card alias for the SBLive!

 

alias snd-card-0 snd-emu10k1

 

# OSS Free emulation for snd-card-0

 

alias sound-slot-0 snd-card-0

alias sound-service-0-0 snd-mixer-oss

alias sound-service-0-1 snd-seq-oss

alias sound-service-0-3 snd-pcm-oss

alias sound-service-0-8 snd-seq-oss

alias sound-service-0-12 snd-pcm-oss

 

# Options for cards (see 'INSTALL' in alsa-driver directory)

# See the alsa 'INSTALL' for the options available on your card

 

options snd snd_major=116 snd_cards_limit=1

options snd-emu10k1 snd_index=0 snd_id=emu10k1

 

#####################################################

 

Now, put a comment marker (#) in front of the line in this same modules.conf file which pointed to your old driver. It is listed somewhere in the first few lines (not pictued above), mine looks like this when it is commented out:

 

# alias sound-slot-0 emu10k1

 

Lastly, add this block to the bottom of you /etc/devfsd.conf file:

 

# added for ALSA permissions, etc

LOOKUP snd MODLOAD ACTION snd

REGISTER ^sound/.* PERMISSIONS root.audio 660

REGISTER ^snd/.* PERMISSIONS root.audio 660

 

This assumes that your users are in the group "audio", which you can add them to in the user manager (in the K menu at "Configuration->Other->UserManager). Now devfs will work.

 

And now reboot and you should have sound. One troubleshooting tip, there may be conflicts on some cards with the OLD Mandrake preinstalled ALSA modules. Once you have a clean install of the lastest ALSA, you can simple throw the old ones away...they are all named snd-card-*).

 

Good luck.

 

K

 

 

kevmccor

Newbie

Joined: 14 May 2002

Posts: 9

Location: Tyler, TX

Post Posted: Sun Oct 06, 2002 2:33 pm Post subject:

_________________________________________________________________

 

 

Thanks for a great post. Following the directions, I was actually able to get sound again! I had done something like this before, but forgot what I did. When I installed 8.2, I tried the alsa rpm's, but couldn't get it to work. Perhaps my problem was the mixer, but now it is working. For all those like myself, who are not sound program programmers, there are three parts to installation: the alsa program(s), the mixer setup, and the player. The directions for installing alsa work great. After the ./install --with-cards=ens1371 (my card), make, and make install for each of alsa-drivers, alsa-libs, and alsa-utils, one must use a mixer program to "enable" the sound. I added the following to my /etc/rc.d/rc.local:

 

# added for sound

amixer set Master 28 on

amixer set PCM 16 on

amixer set CD 16 on

 

From a terminal window, enter: amixer > ~/amixer.txt

Then type: nedit ~/amixer.txt &

Then enter:

amixer set Master 28 on

amixer set PCM 16 on

amixer set CD 16 on

Then, again enter: amixer > ~/amixer.txt

and enter: nedit ~/amixer.txt &

 

compare the Master, PCM, and CD sections

 

Then, after trying alsamixer unsuccessfully, I loaded the xmms rpm's and, from the menu accessed by the leftmost button on xmms, I added to the Playlist the directory /dev/cdroms.

 

Put a music cdrom in the cdrom drive and play. Gee! if only the documentation were there to begin with.

 

Of course, there are other ways to do this, but I hope someone who understands the process --and also how to write directions-- would put a complete post of the whole procedure and get it into the mandrakeuser.org documentation.

 

Thanks again!

 

 

DOlson

Moderator

Joined: 16 Apr 2002

Posts: 2393

Location: Canada

Post Posted: Sun Oct 06, 2002 6:25 pm Post subject:

_________________________________________________________________

 

 

I think that making ALSA the only sound system is quote stupid... For SB Live! and Audigy cards, ALSA has nothing on the OSS drivers. They sound tinny, and are delayed, and the only advantage is the soundfonts.

 

I hope this situation REALLY improves. And soon.

 

 

bvc81

Eric

Joined: 04 Jun 2002

Posts: 1014

Location: Houston, Texas

Post Posted: Sun Oct 06, 2002 8:19 pm Post subject:

_________________________________________________________________

 

 

DOlson wrote:

I hope this situation REALLY improves. And soon.

 

What sit? I heard something about alsa being the default for 9.0, and there's a alsa and a oss driver for my card (the alsa stinks for me), but the oss is the one being used. What sit?

 

 

DOlson

Moderator

Joined: 16 Apr 2002

Posts: 2393

Location: Canada

Post Posted: Sun Oct 06, 2002 10:28 pm Post subject:

_________________________________________________________________

 

 

The situation that SOUND SUCKS ASS in Linux.

 

Show me ONE card that has decent driver support, that has all the features of the Windows drivers, that even supports TRUE surround sound or TRUE 4-speaker output. None that I am aware of.

 

If you think Linux is NOT lacking in the sound area, you're sick.

 

 

bvc81

Eric

Joined: 04 Jun 2002

Posts: 1014

Location: Houston, Texas

Post Posted: Mon Oct 07, 2002 12:00 am Post subject:

_________________________________________________________________

 

 

DOlson wrote:

The situation that SOUND SUCKS ASS in Linux.

 

I caught that part. Mine's noticably better in linux but I just have a cheap onboard CS4281,, I've never tried the surround sound stuff.

 

DOlson wrote:

If you think Linux is NOT lacking in the sound area, you're sick.

 

Add it to list of areas. I'm not suprised. Hell, if people have to spend days getting their mouse, and keyboard to work right, why should we expect sound to be fabulous. Razz

 

 

DOlson

Moderator

Joined: 16 Apr 2002

Posts: 2393

Location: Canada

Post Posted: Mon Oct 07, 2002 12:25 am Post subject:

_________________________________________________________________

 

 

bvc81 wrote:

 

DOlson wrote:

The situation that SOUND SUCKS ASS in Linux.

 

I caught that part. Mine's noticably better in linux but I just have a

cheap onboard CS4281,, I've never tried the surround sound stuff.

 

DOlson wrote:

If you think Linux is NOT lacking in the sound area, you're sick.

 

 

Add it to list of areas. I'm not suprised. Hell, if people have to

spend days getting their mouse, and keyboard to work right, why should

we expect sound to be fabulous. Razz

 

I didn't say that we should EXPECT it, I said that it HAS to improve. How could Linux be taken seriously by gamers, pro audio users, or huge music enthusiasts if there are no good sound cards?

 

That said, my card (SB Live! 5.1) runs beautifully with the OSS drivers, and I even get bass and treble controls.

 

 

kunderdog

Frequent user

Joined: 21 Aug 2002

Posts: 100

Post Posted: Thu Oct 10, 2002 5:42 am Post subject: CARDS

_________________________________________________________________

 

 

Fortunately, there are pro-level cards for Linux (though not for gaming, etc), with ALSA support only (and for use with an API called JACK for low-latency situations lilke harddisk recording). Two companies have gotten their act together on this, RME (check ou their page to see the 9652 PCI card, and a very nice HDSP multiface box...18 channels in and out, 96K sampling rate support, 112 dB dynamic range, whoa!), and M-audio.

 

The M-audio cards are cheaper, and have a nice graphical configuration utility (again, ALSA only). I would suggest the Audiophile 2496 for starters.

 

Yes, there are problems, but for my money, Linux has too many other advantages to worry about dolby's latest BS or support for propietary compression CODECS. What make linux great is what makes it unique (sophistacated sound manipulation tools like PD, vspace, SMS, Csound, Cecilia, MixViews...look them up if you are interested).

 

K

 

 

kunderdog

Frequent user

Joined: 21 Aug 2002

Posts: 100

Post Posted: Sun Nov 10, 2002 7:15 pm Post subject: Update

_________________________________________________________________

 

 

Mandrake 9.0 now includes ALSA by default, and the modules.conf layout is a little different (simpler) than it was in 8.2 where all modules needed to be loaded individually. You may also want to install the alsa-lib and alsa-utils rpm. Just do" urpmi alsa-utils alsa-lib".

 

So just to be clear, if you are running 8.2, my directions above will still work, but if you are running 9, please do the following.

 

NOTE-1: If you have sound with OSS and have no need for some of the benefits of ALSA (it allows for multiple cards [clock sync], lower-latency opperation [useful for MIDI, etc], and support for the latest pro audio quality applications), don't bother with ALSA just yet. Eventually, ALSA will replace OSS, but for now both are available and useful.

 

NOTE-2: Many users have had excellent results with autodetection, either during the install, or with the Hardware configuration tools in the Mandrake Control panel (or with sndconfig or alsaconfig). Always look for the simplest solution...your problem may be more easily managed than you think.

 

Here's the manual route.

 

1. Find out the modules name for your card, usually snd-<chipet_name>, for example, the SBLive's emu10k1 becomes snd-emu10k1. Often, you can simply look at your /etc/modules.conf file and look for references to you sound card. ALL ALSA MODULES USE THE "SND-* PREFIX. See the "sound card matrix" at www.alsa-project.org.

 

2. Place the following lines in your /etc/modules.conf ( ALWAYS backup these important configuration files before editing!)

 

Code:

alias sound-slot-0 <chipset_name>

above snd-<chipset_name> snd-pcm-oss



 

 

So for my Sony's onboard Neomagic 256 card, which uses the driver "snd-nm256" I have:

 

Code:

alias sound-slot-0 snd-nm256

above snd-nm256 snd-pcm-oss

 

The "above" line automatically loads OSS emulation, which will create a /dev/dsp and make sound avalibale to OSS dependent apps.

 

If there are old references to sound or to your sound-slots, you may comment them out with "#". Some cards may also have addtional options available. Multi-card setups are possible with additional alias blocks for snd-slot-1,2,3, etc.

 

3. Place all users in the group "audio" using the user manager in the Mandrake control panel, or with KDE's user manager. This is uneccesarry in some situations, but in multi-user environments this can be useful.

 

4. Remove any loaded sound modules (list with /sbin/lsmod) with "rmmod <module>", and start/restart ALSA with "service alsa restart".

 

You can also load the modules manually with "modprobe". You will load the main snd-* driver, as well as the "snd-pcm-oss" if you wish to have OSS emulation. Once your /etc/modules.conf is editied, rebooting will accomplish the same thing if, but this is an old M$ habit, best to unlearn.

 

That's it. ALSA mutes all devices by default, so you have to bring up levels with your favorite mixer. If you are having trouble with the new volumes being reset on reboot, you can store the levels manually with "alsactl store <card#>". In most cases this is done automatically.

 

Note that alsactl is a part of the alsa-utils rpm.

 

K

 

 

scrat

Frequent user

Joined: 14 Jun 2002

Posts: 28

Post Posted: Mon Nov 11, 2002 12:52 pm Post subject:

_________________________________________________________________

 

 

Hi Kunderdog, I know there is a way to set up ALSA to use Timidity as a sort of virtual MIDI device, so that apps (Brahms e.g. or the like) speak to ALSA thinking it will forward to the soundcard sequencer, while it's instead using Timidity. Good for people who don't have a soundcard with sequencer, obviously Smile Do you have any hints on this subject ? I am going to try this sooner or later, but any wizardry-tricky-hint would be welcome before I go... Scrat

 

 

kunderdog

Frequent user

Joined: 21 Aug 2002

Posts: 100

Post Posted: Mon Nov 11, 2002 3:46 pm Post subject: Some links

_________________________________________________________________

 

 

Here are a a number of excellent tutorials on setting up MIDI stuff.

 

The second half of this one is good, ignore the ALSA setup section at the beginning since it deals with and older, unsupported version of ALSA. It addresses timidity directly:

 

http://www.linuxfocus.org/English/Septembe...rticle259.shtml

 

And here's one on an app called Muse, very much like Brahms...actually it is my choice over Brahms, have a look and see what you think.

 

http://linux-sound.org/quick-toots/2-muse/...-toot-muse.html

 

And a tutorial on sequancers and softsynths if you are futher interested:

 

http://linux-sound.org/quick-toots/4-seque...tsynths/quick-t

oot-midisynth_howto.html

 

These las two are taken from the excellent and ongoing "Quicktoots" hosted at the venerable "linux-sound.org", hosted by Dave Phillips, a rather centrally important person to the Linux Audio community, and a nice as hell guy.

 

K

 

 

 

Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...