Red Hat/Fedora ALSA mini-HowTo.
So you've finally decided to try out ALSA. The reasons behind your decision may be various, from support of certain features in a given package (like Xine, for instance) or simply to be able to not use artsd or esd. Whichever the reason behind this, the first obstacle though is how do I install this?. The answer is really simple, though not that straight forward. Some people have trouble installing ALSA even if they follow the instructions on the project's site. However the most common problem is that when you try to configure your card after you installed the drivers, you get an error stating that no card was found... quite frustrating. So what's the best way to install ALSA? Well for starters the simplest way to install ALSA in my experience is:
Prerequisites All you need is actually to have your kernel sources installed, and a kernel with audio support either as module or compiled in, though many recommend it as module rather than built in (soundcore module). To make things easier, install the packages in the following order:
The alsa-lib, alsa-oss, alsa-utils packages will get installed all under the /usr/ prefix, so basically you can just type: Code:
# ./configure && make && make install Souncard hardware You should be familiar with what chipset does your sound card use, this is important because you will need to know which module to load and what alias to make in your configuration files (more on this in a bit). And hence load the support for your current sound card. If you currently have a sound enabled system, finding out what drivers/sound card do you have installed may be much easier. Basically there are two ways of finding out what your hardware is, via 'lsmod', to list the currently loaded drivers, and trhough 'lspci', to list the actual pci devices the kernel sees: Drivers loaded: Code:
# /sbin/lsmod | grep soundcore Code:
soundcore 7392 1 emu10k1 Hardware physically attached to the computer: Code:
# /sbin/lspci Code:
00:00.0 Host bridge: Silicon Integrated Systems [SiS] 735 Host (rev 01) Code:
# cat /proc/pci Code:
PCI devices found: So we now know what audio card we need support for with the ALSA modules, but will actually ALSA support the hardware? Fortunately, the configure script for the driver, has a way to tell us what cards does the driver(s) support: Code:
# cd /path/to/alsa-driver-<version> Code:
--with-cards=<list> compile driver for cards in <list>; Before you compile the driver There are some steps you should take in order for your configuration to work just swell at the first try. Among them is the configuration of the file that controls module Dependant options: modules.conf (for 2.4.x kernels, in 2.6.x kernels this is modprobe.conf). You should comment out the lines pertaining your sound configuration: Code:
#alias sound-slot-0 emu10k1 Code:
# ALSA portion [/code Once you've got modules.conf/modprobe.conf configured correctly, get ready to compile and install the driver: Code:
# cd /path/to/alsa-driver-<version> Code:
# ./snddevices Code:
# alsamixer * Requires kernel support for your gameport/MIDI interface, like the sbgp kernel module. Addendum: I forgot to include that in order for Fedora systems to compile right the modules, you should use the same compiler used to build the kernel, in this case gcc 3.2.3, whcih is installed when you install all kernel-source releated packages. To use it, just export the variable CC with the string gcc32 (the name of the command): Code:
# export CC="gcc32" |
This is very good. You should post it on the web where anyone can find it easily. Once you get it posted on the web you can register it with Google at:
http://www.google.com/addurl.html ___________________________________ Be prepared. Create a LifeBoat CD. http://users.rcn.com/srstites/LifeBo...home.page.html Steve Stites |
Thanks for your interest. I'm in fact willing to, as soon as I have the URL I will.
|
After much time searching on the internet, how to install these ALSA drivers properly, I still can get it fixed.... feel like a terrible newbie (well, I am a Linuxnewbie, however I tried just about everything I could think of...).
When following the steps mentioned above, I get the error message Code:
alsamixer: function snd_ctl_open failed for default: No such device Code:
00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio (rev 02) Code:
soundcore 6404 2 [i810_audio snd] Modprobe of the snd-intel8x0 module gives the following error: Code:
/lib/modules/2.4.20-30.9/kernel/sound/pci/snd-intel8x0.o: init_module: No such device Can anybody help? |
Quote:
|
i have almost the same problem:
I have a asus a7n8x with the same onboard soundcard. I'm using fedora core 1 and I'm having the same error when i'm starting alsamixer. My lsmod output: Code:
soundcore 6500 0 (autoclean) [snd] This is my modules.conf: Code:
alias char-major-81 bttv Code:
./configure --with-cards=ac97-codec --with-oss=yes --with-redhat=auto I looked up my soundcard config on the alsa website here: Code:
http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=Nvidia&card=nForce&chip=NM2360&module=intel8x0 I hope you can help me with my problems and I think tkorstanje has the same. thanks in advance! |
Change the driver to intel8x0, that's the one for your card. The AC97 AFAIK is a generic one.
|
ALSA on ASUS P4P800 Deluxe
Well, I tried all of that on Fedora Core 1 using my ASUS P4P800 deluxe mobo, which has the intel SoundMax onboard sound chipset (82801EB AC'97 audio controller), and it went well until the driver install. Then I get
"The file /lib/modules/2.4.22-1.2115.nptl/build/include/linux/version.h does not exist. Please, install the package with full kernel sources for your distribution or use --with-kernel=dir option to specify another directory with kernel sources (default is /usr/src/linux)." This happens every time, and I do not know what to do next? Can anyone help? There are numerous other "version.h" files around, but I guess they are not the right ones. So where does one get those particular "version.h" files" RB |
Just make sure the file exist under you kernel source directory (/usr/src/linux-2.4.22-1.2115.nptl/inlcude/linux/version.h) To me this sounds like you don't have the kenrel-source package installed... please make sure you have this package with the command:
Code:
rpm -qa | grep kernel-source |
That problem I had too. The solution is quite simple (that is IF you have the kernel source installed). As the error message already says, the default directory where it presumes the kernel source to be is /usr/src/linux/. In my case Redhat only created a symbolic link named linux-2.4 (pointing to my actual kernel source linux-2.4.20-30.9) but not the link named linux.
You could do the following: Code:
|
That's odd... I never changed/added the link ot the src directory, but rather to the /lib/modules/<kernel>/build link :)
|
Check....that's propably why your name says:
Thetargos Guru And mine says tkorstanje Newbie :) |
Hi Thetargos, and thanks for the idea. Sadly, it didn't work.
I will just list the whole session - perhaps you can find an error, because I cannot get sound either with the original Fedora/i810_audio setup or with ALSA. [root@localhost root]# /sbin/lsmod | grep soundcore soundcore 6468 2 (autoclean) [i810_audio] [root@localhost root]# /sbin/lspci 00:00.0 Host bridge: Intel Corp. 82865G/PE/P Processor to I/O Controller (rev 02 ) 00:01.0 PCI bridge: Intel Corp. 82865G/PE/P Processor to AGP Controller (rev 02) 00:1d.0 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.1 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.2 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.3 USB Controller: Intel Corp. 82801EB USB (rev 02) 00:1d.7 USB Controller: Intel Corp. 82801EB USB2 (rev 02) 00:1e.0 PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev c2) 00:1f.0 ISA bridge: Intel Corp. 82801EB LPC Interface Controller (rev 02) 00:1f.1 IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 02) 00:1f.2 RAID bus controller: Intel Corp.: Unknown device 24df (rev 02) 00:1f.3 SMBus: Intel Corp. 82801EB SMBus Controller (rev 02) 00:1f.5 Multimedia audio controller: Intel Corp. 82801EB AC'97 Audio Controller (rev 02) 01:00.0 VGA compatible controller: ATI Technologies Inc Radeon R350 [Radeon 9800 ] 01:00.1 Display controller: ATI Technologies Inc Radeon R350 [Radeon 9800] (Seco ndary) 02:03.0 FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller ( rev 80) 02:05.0 Ethernet controller: 3Com Corporation 3c940 1000Base? (rev 12) [root@localhost root]# cat /prof/pci cat: /prof/pci: No such file or directory [root@localhost root]# cat /proc/pci PCI devices found: Bus 0, device 0, function 0: Host bridge: Intel Corp. 82865G/PE/P Processor to I/O Controller (rev 2). Prefetchable 32 bit memory at 0xf8000000 [0xfbffffff]. Bus 0, device 1, function 0: PCI bridge: Intel Corp. 82865G/PE/P Processor to AGP Controller (rev 2). Master Capable. Latency=64. Min Gnt=8. Bus 0, device 29, function 0: USB Controller: Intel Corp. 82801EB USB (rev 2). IRQ 10. I/O at 0xef00 [0xef1f]. Bus 0, device 29, function 1: USB Controller: Intel Corp. 82801EB USB (rev 2). IRQ 5. I/O at 0xef20 [0xef3f]. Bus 0, device 29, function 2: USB Controller: Intel Corp. 82801EB USB (rev 2). IRQ 5. I/O at 0xef40 [0xef5f]. Bus 0, device 29, function 3: USB Controller: Intel Corp. 82801EB USB (rev 2). IRQ 10. I/O at 0xef80 [0xef9f]. Bus 0, device 29, function 7: USB Controller: Intel Corp. 82801EB USB2 (rev 2). IRQ 11. Non-prefetchable 32 bit memory at 0xfebffc00 [0xfebfffff]. Bus 0, device 30, function 0: PCI bridge: Intel Corp. 82801BA/CA/DB/EB PCI Bridge (rev 194). Master Capable. No bursts. Min Gnt=2. Bus 0, device 31, function 0: ISA bridge: Intel Corp. 82801EB LPC Interface Controller (rev 2). Bus 0, device 31, function 1: IDE interface: Intel Corp. 82801EB Ultra ATA Storage Controller (rev 2). IRQ 5. I/O at 0xfc00 [0xfc0f]. Non-prefetchable 32 bit memory at 0x20000000 [0x200003ff]. Bus 0, device 31, function 2: RAID bus controller: PCI device 8086:24df (Intel Corp.) (rev 2). IRQ 5. I/O at 0xefe0 [0xefe7]. I/O at 0xefac [0xefaf]. I/O at 0xefa0 [0xefa7]. I/O at 0xefa8 [0xefab]. I/O at 0xef60 [0xef6f]. Bus 0, device 31, function 3: SMBus: Intel Corp. 82801EB SMBus Controller (rev 2). IRQ 11. I/O at 0x400 [0x41f]. Bus 0, device 31, function 5: Multimedia audio controller: Intel Corp. 82801EB AC'97 Audio Controller (rev 2). IRQ 11. I/O at 0xe800 [0xe8ff]. I/O at 0xee80 [0xeebf]. Non-prefetchable 32 bit memory at 0xfebff800 [0xfebff9ff]. Non-prefetchable 32 bit memory at 0xfebff400 [0xfebff4ff]. Bus 1, device 0, function 0: VGA compatible controller: ATI Technologies Inc Radeon R350 [Radeon 9800] (r ev 0). IRQ 10. Master Capable. Latency=64. Min Gnt=8. Prefetchable 32 bit memory at 0xe8000000 [0xefffffff]. I/O at 0xc000 [0xc0ff]. Non-prefetchable 32 bit memory at 0xfe9f0000 [0xfe9fffff]. Bus 1, device 0, function 1: Display controller: ATI Technologies Inc Radeon R350 [Radeon 9800] (Secondar y) (rev 0). Master Capable. Latency=64. Min Gnt=8. Prefetchable 32 bit memory at 0xe0000000 [0xe7ffffff]. Non-prefetchable 32 bit memory at 0xfe9e0000 [0xfe9effff]. Bus 2, device 3, function 0: FireWire (IEEE 1394): VIA Technologies, Inc. IEEE 1394 Host Controller (rev 128). IRQ 11. Master Capable. Latency=64. Max Lat=32. Non-prefetchable 32 bit memory at 0xfeaff800 [0xfeafffff]. I/O at 0xdc00 [0xdc7f]. Bus 2, device 5, function 0: Ethernet controller: 3Com Corporation Gigabit Ethernet Adapter (rev 18). IRQ 11. Master Capable. Latency=64. Min Gnt=23.Max Lat=31. Non-prefetchable 32 bit memory at 0xfeaf8000 [0xfeafbfff]. I/O at 0xd800 [0xd8ff]. [root@localhost root]# cd /root/packages/alsa-1.0.4/alsa-driver-1.0.4 [root@localhost alsa-driver-1.0.4]# ./configure --help `configure' configures this package to adapt to many kinds of systems. Usage: ./configure [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print `checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for `--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or `..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [/usr] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, `make install' will install all the files in `/usr/bin', `/usr/lib' etc. You can specify an installation prefix other than `/usr' using `--prefix', for instance `--prefix=$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-verbose-printk enables verbose printk (file + line number) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-cross=dir give the cross-compile prefix --with-kernel=dir give the directory with kernel sources /usr/src/linux --with-redhat=no,yes,auto specify Red Hat kernel build --with-moddir=/path give the path for the alsa driver kernel modules /lib/modules/<KVER>/misc --with-debug=level give the debug level (none,basic,full,detect) --with-isapnp=yes,no,auto driver will (not) be compiled with ISA PnP support --with-sequencer=yes,no driver will (not) be compiled with sequencer support --with-oss=no,yes driver will (not) be compiled with OSS/Free emulation --with-pcmcia=kernel,external support kernel PCMCIA driver or external PCMCIA driver --with-pcmcia-root=dir specify the root directory of external PCMCIA source-tree --with-cards=<list> compile driver for cards in <list>; cards may be separated with commas; 'all' compiles all drivers; Possible cards are: seq-dummy, dummy, virmidi, mtpav, serial-u16550, mpu401, serialmidi, ad1816a, ad1848, cs4231, cs4232, cs4236, pc98-cs4232, es968, es1688, es18xx, gusclassic, gusextreme, gusmax, interwave, interwave-stb, opti92x-ad1848, opti92x-cs4231, opti93x, sb8, sb16, sbawe, wavefront, als100, azt2320, cmi8330, dt019x, opl3sa2, sgalaxy, sscape, msnd-pinnacle, ac97-codec, ali5451, atiixp, au8810, au8820, au8830, azt3328, bt87x, cs46xx, cs4281, emu10k1, korg1212, mixart, nm256, rme32, rme96, rme9652, hdsp, trident, ymfpci, als4000, cmipci, ens1370, ens1371, es1938, es1968, maestro3, fm801, fm801-tea575x, ice1712, ice1724, intel8x0, intel8x0m, sonicvibes, via82xx, vx222, pdplus, hdspm, powermac, sa11xx-uda1341, usb-audio, usb-usx2y, vxpocket, vxp440, pdaudiocf, sun-amd7930, sun-cs4231, harmony Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have headers in a nonstandard directory <include dir> CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Modules.conf is alias scsi_hostadapter ata_piix #alias sound-slot-0 i810_audio alias usb-controller usb-uhci alias usb-controller1 ehci-hcd alias ieee1394-controller ohci1394 alias eth0 sk98lin #ALSA native device support alias char-major-116 snd options snd major=116 cards_limit=1 alias snd-card-0 snd-intel8x0 #OSS/Free setup alias char-major-14 soundcore alias sound-slot-0 snd-intel8x0 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 # post-install sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || : # pre-remove sound-slot-0 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || : I compiled alsa-driver-1.0.4 with ./configure - -with-cards=intel8x0 - - with-kernel=/usr (to get over the missing “version.h” problem) - this was apparently successful ran ./snddevices apparently successfully alsamixer returns function and_ctl_open failed for default: No such device The volume control denies the existence of a mixer device. I'm baffled, and would really appreciate help regorbro |
Just a silly idea though... well actually two:
I APPLOGIZE FOR NOT INCLUDING THIS crucial INFORMATION IN THE MAIN HOWTO I simply had no need for that since I moved to kernel 2.6.x (compiled by myself of course)... |
Thank you Thetargos, the gcc32 compilation worked with intel8x0.
I'm not ready to try to install kernel 2.6.x yet, especially if I am still having troubles with something as basic as sound. |
All times are GMT -5. The time now is 10:02 AM. |