Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[HOW-TO] Installing ALSA (Kernel 2.6)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Mon May 17, 2004 1:30 am    Post subject: [HOW-TO] Installing ALSA (Kernel 2.6) Reply with quote

Since I've only seen scattered information on how to install ALSA, I decided to reorganize all the information into this HOW-TO.

To install ALSA in a 2.6 kernel, do the following (I am getting this from https://forums.gentoo.org/viewtopic.php?t=97157&highlight=alsa+minihowto , so credit goes there, especially to Helena and agent_jdh):

Code:
<M> Advanced Linux Sound Architecture
<M> Sequencer support
< >  Sequencer dummy client
<*> OSS API emulation
<M> OSS Mixer API
<M> OSS PCM (digital audio) API
<*> OSS Sequencer API
[ ]   Verbose printk
[ ]   Debug
       Generic devices  --->
       PCI devices  --->
       ALSA USB devices  --->


Configure your kernel as shown above.

Now you will need to compile your kernel.

Code:
make && make modules_install
mount /boot
cp /usr/src/linux/arch/i386/boot/bzImage /boot/KERNEL_NAME_HERE
cp System.map /boot/SYSTEM_MAP_NAME_HERE
umount /boot


Reboot your computer.

Code:
emerge alsa-lib alsa-utils


"Edit /etc/modules.d/alsa for your card (see the Gentoo ALSA guide and also the individual card pages on the ALSA website for how to do this)"

Code:
update-modules
rc-update add alsasound boot
alsamixer


"Unmute what you need and set your levels."

Code:
alsactl store
/etc/init.d/alsasound start


Check if your sound works by playing some music or something. If it doesn't work, make sure you unmuted your card:

Code:
# amixer set Master 100 unmute
# amixer set PCM 100 unmute
Only if the above doesn't succeed on its own:
# amixer set Center 100 unmute
# amixer set Surround 100 unmute


If it still doesn't work, here are some tips on what to check for (yes they may sound stupid, but people still don't notice):
-Make sure your speakers/headphones are plugged in.
-If you are using xmms or any other media application, make sure you set the volume there. Usually default is the minimum.

Good luck!
Back to top
View user's profile Send private message
andrewy
l33t
l33t


Joined: 07 Apr 2004
Posts: 602

PostPosted: Mon May 17, 2004 1:45 am    Post subject: Reply with quote

thanks!
If only I had this a few weeks ago when I switched to the 2.6 kernel and ALSA..
Back to top
View user's profile Send private message
Artem
n00b
n00b


Joined: 09 Mar 2004
Posts: 33

PostPosted: Mon May 17, 2004 1:47 am    Post subject: Reply with quote

thnx man, i really needed this! perfect timing too :)
Back to top
View user's profile Send private message
serge
Apprentice
Apprentice


Joined: 05 Jan 2003
Posts: 177

PostPosted: Sun May 30, 2004 7:27 pm    Post subject: Reply with quote

Hi

I compiled the kernel-2.6.5-gentoo-r1.
I did i think all the possibilities to get my audigy card work [alsa compiled in the kernel, as modules] but it was unsuccessful.
Then i went back to my "old" 2.6.4-ck-r2 kernel. Before alsa was compiled in the kernel, this time i decided to use modules instead. The both ways alsa works...

Code:

"Edit /etc/modules.d/alsa for your card (see the Gentoo ALSA guide and also the individual card pages on the ALSA website for how to do this)"


But what i noticed is that my /etc/modules.d/alsa file is actualy empty. [eveything is commented (with a # before each line)].
Then even compiled as modules alsa works without this configuration file...

Serge
Back to top
View user's profile Send private message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Sun May 30, 2004 11:26 pm    Post subject: Reply with quote

I had a little trouble understanding you, so I'm going to break down what you said and what I understood.

serge wrote:
Hi

I compiled the kernel-2.6.5-gentoo-r1.
I did i think all the possibilities to get my audigy card work [alsa compiled in the kernel, as modules] but it was unsuccessful.

ALSA didn't work when you tried kernel-2.6.5-gentoo-r1 and compiled alsa into the kernel as modules.
serge wrote:
Then i went back to my "old" 2.6.4-ck-r2 kernel. Before alsa was compiled in the kernel, this time i decided to use modules instead.

ALSA does work on your "old" 2.6.4-ck-r2 and you went ahead and compiled alsa as modules again.
serge wrote:
The both ways alsa works...

Here I get confused. Both ways worked for you? I'm going to ignore this statement.
serge wrote:
Code:

"Edit /etc/modules.d/alsa for your card (see the Gentoo ALSA guide and also the individual card pages on the ALSA website for how to do this)"


But what i noticed is that my /etc/modules.d/alsa file is actualy empty. [eveything is commented (with a # before each line)].
Then even compiled as modules alsa works without this configuration file...

Serge


As for a proposed solution, try re-emerging alsa-lib and alsa-utils after you have reconfigured your kernel. If /etc/modules.d/alsa exists, then just edit it.

You said when you looked at /etc/modules.d/alsa, everything was commented. Are you sure everything was commented, because a large percentage of the file is originally commented. Anyways, if everything is commented, I've included my /etc/modules.d/alsa below, so you can try and create your own. Right now I don't have internet on gentoo, so I had to copy /etc/modules.d/alsa down on paper, and then go to Windows XP and write it down. For this reason, I did not include any commented lines from the line.

Code:

alias char-major-116 snd
alias char-major-14 soundcore

alias snd-card-0 snd-intel8x0 (change according to your card)

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

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

options snd cards_limit=1
Back to top
View user's profile Send private message
serge
Apprentice
Apprentice


Joined: 05 Jan 2003
Posts: 177

PostPosted: Mon May 31, 2004 5:44 am    Post subject: Reply with quote

Hi Deadaim.

I did a fresh install of gentoo. And i chose the 2.6.4-ck2 kernel. I installed it and alsa was compiled inside [not as modules]. The sound was ok but in kde there was a kind of echo, delay as if i had 2 cards working together.
Then i compiled the 2.6.5-gentoo-r1 kernel. But i could not get alsa [my emu10k1] card work, neither alsa compiled in the kernel. nor alsa as modules [in kernel configuration].
Then i went back to the 2.6.4-ck2 kernel. I followed this how-to and alsa is compiled as modules and not in the kernel.[to be clear M and not Y in the kernel config].

I noticed then i did not edit my alsa config file. As i have the hotplug stuff i supposed it knows what modules to load according to the card i have.

I hope it is a bit clear...

Serge
Back to top
View user's profile Send private message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Mon May 31, 2004 5:56 pm    Post subject: Reply with quote

I'm not quite sure what error you are getting. I understand that you followed this how-to. Did it work? Are you getting any problems with sound? Does it give you any errors? Does your /etc/modules.d/alsa file exist? Is everything commented in the file?

You must edit your /etc/modules.d/alsa file according to your sound card.
Back to top
View user's profile Send private message
serge
Apprentice
Apprentice


Joined: 05 Jan 2003
Posts: 177

PostPosted: Mon May 31, 2004 7:26 pm    Post subject: Reply with quote

Hi Deadaim

My sound works. In kde i get a kind of annoying echo, or rather the second part of the sound gets higher for instance in opening a window. I did not have it in 2.4 kernels. Maybe it comes from kde itself.
Anyway, i wanted to install then the 2.6.5 kernel. There, no matter what i chose [build in the kernel or as modules ( M or Y)], i could not load alsa/emu10k1 because i had errors at boot.
Then i went back to the 2.6.4 kernel and instead of building alsa in the kernel like the first time, i followed this how-to and built alsa as modules.
I forgot to re-adapt the /etc/modules.d/alsa , so this file was all commented [meaning it was as empty], and alsa still works. I kept my alsa file as it and the sound works.
But i have this "echo" in kde yet so i suppose it is a kde problem.

I just wanted to share this experience [not using an alsa file config].
I would like to know if someone has been succesful by compiling the 2.6.5-gentoo-r1 kernel, with alsa and emu10k1..

Serge
Back to top
View user's profile Send private message
wrxjunkie
n00b
n00b


Joined: 31 May 2004
Posts: 6
Location: Sunny California

PostPosted: Mon May 31, 2004 7:35 pm    Post subject: Reply with quote

Great guide for alsa and nforce2: http://www.wlug.org.nz/NForce2Notes
Back to top
View user's profile Send private message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Mon May 31, 2004 8:04 pm    Post subject: Reply with quote

wrxjunkie: Thanks for sharing!

serge: I think that the sound echo is being caused by arts and not because of ALSA. Try disabling arts and see if the echo goes away.
Back to top
View user's profile Send private message
Gogiel
Guru
Guru


Joined: 11 Nov 2004
Posts: 347

PostPosted: Thu Nov 18, 2004 3:48 pm    Post subject: Reply with quote

There's always 2nd way to compile in kernel just 'Sound support' and then download alsa-driver for alsa-project.org and compile it as before on 2.4.
Back to top
View user's profile Send private message
Kerjo
n00b
n00b


Joined: 15 Aug 2004
Posts: 50

PostPosted: Sun Nov 28, 2004 7:11 pm    Post subject: Reply with quote

Okay, I'm having some trouble getting sound going on my Dell 600m laptop.

I followed this guide as best I could, and here's my /etc/modules.d/alsa file:
Code:

# Alsa 0.9.X kernel modules' configuration file.
# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc$

# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore

##
## IMPORTANT:
## You need to customise this section for your specific sound card(s)
## and then run `update-modules' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info.
##
##  ALSA portion
alias snd-card-0 snd-intel8x0
## alias snd-card-1 snd-ens1371
##  OSS/Free portion
alias sound-slot-0 snd-card-0
## alias sound-slot-1 snd-card-1
##

# OSS/Free portion - card #1
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
##  OSS/Free portion - card #2
## alias sound-service-1-0 snd-mixer-oss
## alias sound-service-1-3 snd-pcm-oss
## alias sound-service-1-12 snd-pcm-oss

alias /dev/mixer snd-mixer-oss
alias /dev/dsp snd-pcm-oss
alias /dev/midi snd-seq-oss

# Set this to the correct number of cards.
options snd cards_limit=1


Running "amixer" gives me:
Code:
amixer: Mixer attach default error: No such device

and running "alsamixer" gives me:
Code:
alsamixer: function snd_ctl_open failed for default: No such device


Any ideas?
Back to top
View user's profile Send private message
deadaim
Guru
Guru


Joined: 27 Oct 2003
Posts: 467
Location: Florida

PostPosted: Fri Feb 18, 2005 9:25 pm    Post subject: Reply with quote

Kerjo, I apologize for the delay, but I just read the message.

Go into your kernel and compile the following:
Code:
Device Drivers -->
    Sound -->
        Advanced Linux Sound Architecture -->
            PCI Devices -->
                <*> Intel i8x0/MX440, SiS 7012; Ali 5455; NForce Audio; AMD768/8111

Then go ahead and recompile your kernel and copy it to /boot (remember to mount /boot).
Back to top
View user's profile Send private message
ravloony
n00b
n00b


Joined: 04 Feb 2005
Posts: 54
Location: France

PostPosted: Mon Oct 17, 2005 5:23 pm    Post subject: Reply with quote

Hi all,
So I have got alsa working I think, no probs. I can get static out of the speakers, so I presume it should work (I haven't finished compiling amarok just yet)
There is one thing however: how do I get the midi emulator thing (emu401k?) working? I can't seem to understand where to add it in, or in which configuration file to activate it.
I have alsa compiled into the kernel, and the oss stats are as follows:

Code:
hoshi ~ # cat /proc/asound/oss/sndstat
Sound Driver:3.8.1a-980706 (ALSA v1.0.9b emulation code)
Kernel: Linux hoshi 2.6.13-gentoo-r3 #2 SMP Sun Oct 16 14:16:24 CEST 2005 i686
Config options: 0

Installed drivers:
Type 10: ALSA emulation

Card config:
NVidia nForce2 with ALC650E at 0xe6002000, irq 18

Audio devices:
0: NVidia nForce2 (DUPLEX)

Synth devices: NOT ENABLED IN CONFIG

Midi devices: NOT ENABLED IN CONFIG

Timers:
7: system timer

Mixers:
0: Realtek ALC650E

In all probability I'll never use the midi functionality but I'd like to have it working just in case.
Thanks in advance
ravloony out.
_________________
No sig yet, sig ebuild up soon :-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum