View previous topic :: View next topic |
Author |
Message |
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Fri Jan 09, 2004 6:39 pm Post subject: ALSA and gentoo-dev-sources |
|
|
Hey there
I've installed the 2.6 kernel for some time ago, and of course I wanted to try installing alsa-sound modules.. But how does this work?
What do I have to install of applications to get some sound working!
For now, I've tried compiling the kernel with support for the VIA sound controller I have on my motherboard.
I've installed nothing else, what do I need to install to be able to fx. play a CD? (It does not work in Gnome 2.4 yet)!
Thanks
Preben |
|
Back to top |
|
|
sparks Guru
Joined: 05 Mar 2003 Posts: 331 Location: Nashville, TN
|
Posted: Fri Jan 09, 2004 6:41 pm Post subject: |
|
|
Just follow the Alsa install guide, the only difference wit the 2.6 kernels is that you already have the modules built into the kernel.
http://www.gentoo.org/doc/en/alsa-guide.xml _________________ True trade is honest, but not merciful. Politics is dishonest, no matter how merciful... and war is neither honest nor merciful.... therefore, choose trade above politics, but politics above war. |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Fri Jan 09, 2004 7:03 pm Post subject: |
|
|
That means - I should also install alsa-lib actually??? |
|
Back to top |
|
|
frenkel Veteran
Joined: 13 May 2003 Posts: 1034 Location: .nl
|
Posted: Fri Jan 09, 2004 7:09 pm Post subject: |
|
|
I'm using 2.6 with alsa, the only things I've installed are alsa-lib and alsa-utils. I don't think it will work without alsa-lib.
Good luck,
Frank |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Fri Jan 09, 2004 7:41 pm Post subject: |
|
|
What does this mean in the /etc/modules.d/alsa:
# ALSA portion
alias char-major-116 snd
# OSS/Free portion
alias char-major-14 soundcore
It's in the beginning of the file!
Thanks..
Preben |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Fri Jan 09, 2004 7:42 pm Post subject: |
|
|
Should I compile the kernel alsa-parts as modules or as "built-in".. I've compiled the modules as built in! |
|
Back to top |
|
|
Andersson Guru
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Fri Jan 09, 2004 8:04 pm Post subject: |
|
|
Yeah, built-in unless you don't use the soundcard a lot and don't want it loaded by default.
You don't need to bother about modules.d/alsa. Just, from the top of my head, compile the kernel with alsa support, boot new kernel, emerge alsa-utils and alsa-lib, unmute the channels using alsamixer or alsamixergui, and rc-update add alsasound boot && /etc/init.d/alsasound start.
The last part saves your mixerlevels so you don't have to unmute all the channels every time you start the computer. |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Fri Jan 09, 2004 8:26 pm Post subject: |
|
|
I'm sorry to tell you, but that doesn't work... |
|
Back to top |
|
|
glaskows Tux's lil' helper
Joined: 05 Jan 2004 Posts: 77 Location: Chile
|
Posted: Fri Jan 09, 2004 8:32 pm Post subject: Mmm... |
|
|
Look, i would choose building modules. Because:
1) You get a litle more control. You can unload them when you want and try other modules of your choise.
2) A smaller kernel fit better into your cpu cache, so there is less comunication betwen your memory(RAM) and the cpu. Of course, only the critical and most used part of the kernel should survive a lot of time in the cache.
P.S: i'm not an expert... if i'm wrong please correct me, so all of us can learn.
P.S.2: i am not a native english speaker... so sorry about my gramathical faults. |
|
Back to top |
|
|
Andersson Guru
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Fri Jan 09, 2004 9:16 pm Post subject: |
|
|
LostInGentoo wrote: | I'm sorry to tell you, but that doesn't work... |
Then what is the problem exactly? |
|
Back to top |
|
|
fafhrd Retired Dev
Joined: 14 May 2002 Posts: 431 Location: Williamstown, MA
|
Posted: Fri Jan 09, 2004 10:06 pm Post subject: okay ... |
|
|
for most setups using 2.6, you'd probably want ..
media-libs/alsa-lib
media-sound/alsa-tools
media-sound/alsa-utils
utils or tools (i forgot) now has the /etc/init.d/alsasound script
If you want OSS emulation (why not?), then emerge
media-libs/alsa-oss
if you want to use xmms through alsa, then emerge
media-plugins/alsa-xmms
you DON'T need
** DON'T NEED **
media-sound/alsa-driver
** DON'T NEED **
... and there you go.
And remeber from all the wonderful docs you read (you read the docs, right?)
You MUST unmute the mixer channels to hear anthing ("alsamixer") and if you want to store those settings permanently then "alsactl store". _________________ jñanam bandha |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Sat Jan 10, 2004 6:53 am Post subject: |
|
|
Yes, I know all that stuff, but it still doesn't work. I'll try installing a new kernel today and then I'll write exactly what I do from then on - please help - maybe I'm missing something.
I see a lot of people is having trouble with the 2.6-kernel with alsa-support!!! Has anybody found a fixing method???
Thanks
Preben |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Sat Jan 10, 2004 1:12 pm Post subject: |
|
|
Now I've compiled the gentoo-dev-sources again and the sound-card support as modules, which means:
Standard ALSA Build In kernel support
[*] Advanced Linux Sound Architecture
[*] Sequencer support
[*] OSS API emulation
[*] OSS Mixer API
[*] OSS Sequencer API
No Generic devices selected
Disabled all ISA-Devices
Disabled all PCI-Devices and enabled:
[M] VIA 82C686A/B, 8233 South Bridge
No ALSA USB Devices selected
So, I get these modules in /lib/modules/2.6.1-gentoo/kernel/sound/:
./core/seq/snd-seq-midi.ko
./core/snd-rawmidi.ko
./drivers/mpu401/snd-mpu401-uart.ko
./pci/ac97/snd-ac97-codec.ko
./pci/snd-via82xx.ko
This is my /etc/modules.d/alsa configuration file (what is char-major-116 snd and char-major-14 soundcore?):
-------------------------
# Alsa 0.9.X kernel modules' configuration file.
# $Header: /home/cvsroot/gentoo-x86/media-sound/alsa-utils/files/alsa-modules.conf-rc,v 1.1 2003/08/05 21:07:55 johnm Exp $
# 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-via82xx
## alias snd-card-0 snd-interwave
## 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
-------------------------
end of configuration file
After having run update-modules:
When booting and loading the snd-seq-oss it complains that the module doesn't exist - well, it probably doesn't - should I correct this to snd-seq-midi?
Well, this shouldn't have anything to do with that aplay cannot play a wav-file.
I must admit that I'm very annoyed about this and would really like this to work...
See - it's all installed:
-------------------------
root@echelon preben # emerge -p alsa-lib alsa-utils alsa-tools
These are the packages that I would merge, in order:
Calculating dependencies ...done!
[ebuild R ] media-libs/alsa-lib-0.9.8
[ebuild R ] media-sound/alsa-utils-0.9.8
[ebuild R ] media-sound/alsa-tools-0.9.8
root@echelon preben #
-------------------------
And for those who don't believe that I really have enabled sound, here it is:
-------------------------
root@echelon preben # amixer
Simple mixer control 'Master',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 31 [100%] [on]
Front Right: Playback 31 [100%] [on]
Simple mixer control 'Master Mono',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [on]
Simple mixer control 'Headphone',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off]
Front Right: Playback 0 [0%] [off]
Simple mixer control '3D Control - Center',0
Capabilities: volume volume-joined
Playback channels: Mono
Limits: 0 - 15
Mono: 0 [0%]
Simple mixer control '3D Control - Depth',0
Capabilities: volume volume-joined
Playback channels: Mono
Limits: 0 - 15
Mono: 0 [0%]
Simple mixer control '3D Control - Switch',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'PCM',0
Capabilities: pvolume pswitch pswitch-joined
Playback channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 31 [100%] [on]
Front Right: Playback 31 [100%] [on]
Simple mixer control 'Line',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'CD',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 0 [0%] [off]
Front Left: Capture [on]
Front Right: Capture [on]
Simple mixer control 'Mic Boost (+20dB)',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
Simple mixer control 'Mic Select',0
Capabilities:
Mono:
Simple mixer control 'Video',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Phone',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 0 [0%] [off]
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'PC Speaker',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Playback channels: Mono
Limits: Playback 0 - 15
Mono: Playback 0 [0%] [off]
Simple mixer control 'Aux',0
Capabilities: pvolume pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Front Left - Front Right
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Front Left: Playback 0 [0%] [off] Capture [off]
Front Right: Playback 0 [0%] [off] Capture [off]
Simple mixer control 'Mono Output Select',0
Capabilities:
Mono:
Simple mixer control 'Capture',0
Capabilities: cvolume cswitch cswitch-joined
Capture channels: Front Left - Front Right
Limits: Capture 0 - 15
Front Left: Capture 0 [0%] [on]
Front Right: Capture 0 [0%] [on]
Simple mixer control 'Mix',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Front Left - Front Right
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'Mix Mono',0
Capabilities: cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Capture channels: Front Left - Front Right
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'External Amplifier Power Down',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
root@echelon preben #
-------------------------
I really hope somebody can help me |
|
Back to top |
|
|
Andersson Guru
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Sat Jan 10, 2004 5:31 pm Post subject: |
|
|
LostInGentoo wrote: | After having run update-modules:
When booting and loading the snd-seq-oss it complains that the module doesn't exist - well, it probably doesn't - should I correct this to snd-seq-midi? |
I don't think so, you compiled everything OSS into the kernel. OSS API emulation, OSS Mixer API and OSS Sequencer API. That should be all, but I have to admit I don't know much about modules.
I compile everything into the kernel so I never had to look at the modules. If you're sure you want it modularized, perhaps you could get it working built-in first? At least you'll get rid of one error...
LostInGentoo wrote: | Well, this shouldn't have anything to do with that aplay cannot play a wav-file. |
Do you get any error message or do you get the "playing wave..."? |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Sat Jan 10, 2004 6:03 pm Post subject: |
|
|
Hi there...
This is what I've tried... Building everything into kernel - without any modules and runnning lspci seams to be ok - the hardware is recogniced and is probably working - just not any sound!!! No sound at all (and yes - I did double-check the connections)!!!
So maybe people out there is gonna think it's hardware-related.. Probably!!! But hey... I have a ASUS A7V 133 motherboard with VIA chipset... Hardware specs can be seen here:
http://www.asus.com/prog/spec.asp?m=A7V133&langs=01
please tell me what precisely to compile into the kernel then... I just think I've been right choosing the module via82xx...
I've never had all these problems before... It's really anoying actually.
Thanks for helping
Preben Holm |
|
Back to top |
|
|
Andersson Guru
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Sat Jan 10, 2004 6:33 pm Post subject: |
|
|
If you don't get any error messages about missing /dev/something, then it might be set up correctly. Are you sure you unmuted all channels?
In alsamixer/alsamixergui, I need to unmute all the following (and set the volume of them to about 90% if they have one):
Master
Master mono
Headphone LFE 1
Headphone 1
Wave (most of them)
And Sigmatel surround (easy to miss, second from the right) |
|
Back to top |
|
|
polle Veteran
Joined: 28 Feb 2003 Posts: 1498 Location: Belgium
|
Posted: Sat Jan 10, 2004 6:42 pm Post subject: |
|
|
I got that problem also, my problem was that I compiled a virtual device or dummy (I don't remember exactly) and so linux was thinking I had two soundcards and it didn't work
I found out by looking carefully at dmesg and after compiling a new kernel everything went fine
maybe you can look what dmesg says about your soundcard and post it here? |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Sat Jan 10, 2004 8:48 pm Post subject: |
|
|
Well, maybe it has been working all time - the funny thing is, that I've commented out the lines in /etc/modules.d/alsa which should load the module, but the module loads automatically - why?
But hey - the sounds work great now. I don't know why, but it does and maybe it has been working the last couple of times when I built in kernel support..
Tried changing to oss and then back to alsa, and then everything worked nice, but I've been testing on a CD, which still won't play - why? I use the gnome cd player and the cd-lamp is blinking which indicates playing a cd, but no sound.. I have sound when playing with aplay now, so that's very nice
But the CD is still a problem to me.. I can't remember but I don't think there's a cable connecting the CD-player to the sound-card. Either the build in sound-card doesn't have a connector or it could be the cd-drive!! How can I play CD's in my computer without this cable?
Thanks
Preben |
|
Back to top |
|
|
baetis n00b
Joined: 25 Apr 2002 Posts: 19
|
Posted: Sat Jan 10, 2004 8:52 pm Post subject: Wrong driver? |
|
|
Edit: I must have been writing my reply as you were. Glad to see you got it working. Ignore the below message, but it might help some people with an nforce board.
Hey LostInLinux,
Is it possible that you actually have an nforce board and checked lspci and saw the VIA82c686B message and thought that is what driver you should use? check lspci and see if it says nforce multimedia audio. If it does, start over and use the Intel8x0 (or some such, it says nforce on it to) driver in the kernel config (in Device Drivers->Sound->PCI Devices iirc). I've got alsa going fine with the 2.6.0 mm kernel and everything compiled into the kernel (will work with modules too, but you gota setup your /etc/modules.d/alsa properly in that case, i'd just compile it in). If you do compile it in, you can (and should?) comment every line in /etc/modules.d/alsa.
I've got alsa-lib and alsa-utils, no alsa-driver.
trico usr # lspci
<snip>
00:05.0 Multimedia audio controller: nVidia Corporation nForce MultiMedia audio [Via VT82C686B] (rev a2)
00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
<snip>
trico src # cat /proc/asound/cards
0 [nForce2 ]: NFORCE - NVidia nForce2
NVidia nForce2 at 0xec081000, irq 5
trico src # cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 0.9.7 (Thu Sep 25 19:16:36 2003 UTC).
Compiled on Jan 7 2004 for kernel 2.6.0-mm2.
trico src # uname -a
Linux trico 2.6.0-mm2 #6 Wed Jan 7 00:09:58 Local time zone must be set--see zic manua i686 AMD Athlon(tm) XP 2100+ AuthenticAMD GNU/Linux
Good Luck.
Luke |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Sun Jan 11, 2004 4:46 pm Post subject: |
|
|
Hi
Thanx anyway beatis...
But I still wonder if anybody can tell me why my sound-modules is loading automatically... This is really not understood... The /etc/modules.d/alsa had masked out the lines containing the module name of the sound-card, but hey - it still worked!!! Why? Why did the kernel/software load the modules automatically - I took a look at the lsmod which indicated the modules as loaded!
When booting:
Code: |
* Loading ALSA drivers...
* Loading ALSA OSS emulation
* Loading: snd_via82xx
* Loading: snd_seq_oss
FATAL: module snd_seq_oss not found.
* Running card-dependent scripts
* Restoring Mixer Levels
|
How do I fix the FATAL error.. It's still annoying that it's there! |
|
Back to top |
|
|
Andersson Guru
Joined: 12 Jul 2003 Posts: 525 Location: Göteborg, Sweden
|
Posted: Sun Jan 11, 2004 6:31 pm Post subject: |
|
|
LostInGentoo wrote: | But I still wonder if anybody can tell me why my sound-modules is loading automatically... |
There's an option in the kernel to load modules automatically. Think you could have that enabled? It's somewhere with the options for module support and module unloading and so on. |
|
Back to top |
|
|
LostInGentoo Apprentice
Joined: 27 Jun 2002 Posts: 269 Location: Denmark
|
Posted: Sun Jan 11, 2004 6:39 pm Post subject: |
|
|
Ahh, that's actually smart then.. How does the kernel know when and where to load the modules.. it doesn't load the other modules automatically?
Thanks |
|
Back to top |
|
|
|