View previous topic :: View next topic |
Author |
Message |
b1c1l1 n00b
Joined: 24 May 2003 Posts: 39
|
Posted: Tue Aug 24, 2004 7:32 pm Post subject: HOWTO: Update ALSA in a 2.6 Kernel |
|
|
ChangeLog:
- 2004/08/28 - Logic and grammar corrections. New ALSA patch.
- 2004/08/24 - Initial release.
HOWTO: Update ALSA in a 2.6 Kernel
Introduction
This HOWTO is relatively simple. I made this HOWTO primarily for my friend, who has very little experience with Linux and needed to update his ALSA to 1.0.6, since it is the first release to support his Dell CT0200 (a fake Sound Blaster Live! card made by Dell that is NOT supported by snd-emu10k1). I couldn't find any clear guides on the internet, so I searched around until I found out everything that I needed to know. Hopefully this will help out any other newbies out there trying to update ALSA in their kernel. Feedback is greatly appreciated!
Overview
1. Check your current ALSA version.
2. Grab the latest patch from ALSA's FTP server.
3. Patch your kernel with the patch file.
4. Rebuild your kernel and reboot.
5. Check your new ALSA version.
1. Check your current ALSA version.
You should find out what version of ALSA you already have before deciding to patch it, mainly so you don't try to patch a kernel that already has the latest version. Go ahead and run:
Code: | cat /proc/asound/version |
and you should see something like this:
Code: | Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004 UTC).
Compiled on Aug 28 2004 for kernel 2.6.8-nitro6. |
As you can see, I started off with ALSA 1.0.4 in my kernel.
2. Grab the latest patch from ALSA's FTP server.
The ALSA FTP server has kernel patches available to everyone, and they're available at ftp://ftp.alsa-project.org/pub/kernel-patches. The patches are arranged by release date, so you can go there and browse for the latest one. The latest patch at the time of this writing is dated 2004/08/26. I would save it to your kernel source directory, for example:
Code: | wget ftp://ftp.alsa-project.org/pub/kernel-patches/alsa-bk-2004-08-26.patch.gz -O /usr/src/linux/alsa-bk-2004-08-26.patch.gz |
3. Patch your kernel with the patch file.
Change to the directory of the kernel that you want to patch, for example:
Then do the actual patching:
Code: | zcat alsa-bk-2004-08-26.patch.gz | patch -p1 |
If the patch applied successfully and you want to get rid of it, go ahead:
Code: | rm alsa-bk-2004-08-26.patch.gz |
The patch applied cleanly on my 2.6.8.1-nitro6 kernel.
4. Rebuild your kernel and reboot.
Generally, it's a good idea to check the configuration of the kernel after applying any patch, since some configuration options could have been added, changed, or removed. So run:
and make sure your ALSA configuration is still OK. Then rebuild your kernel:
Code: | make && make modules_install |
and copy the updated files to your boot partition. You might want to re-emerge any kernel modules as well, for example in my case:
Code: | emerge -av ndiswrapper nvidia-kernel |
You're going to have to reboot into your new kernel to utilize the new ALSA version.
5. Check your new ALSA version.
Now repeat step 1:
Code: | cat /proc/asound/version |
and you should see something like this:
Code: | Advanced Linux Sound Architecture Driver Version 1.0.6 (Sun Aug 15 07:17:53 2004 UTC).
Compiled on Aug 28 2004 for kernel 2.6.8-nitro6. |
If you see a new ALSA version listed, congratulations!
Last edited by b1c1l1 on Sun Aug 29, 2004 4:23 am; edited 2 times in total |
|
Back to top |
|
|
rush_ad l33t
Joined: 22 Jul 2004 Posts: 863 Location: New Jersey, USA
|
Posted: Tue Aug 24, 2004 7:45 pm Post subject: |
|
|
thanks, nice work. |
|
Back to top |
|
|
max4ever Tux's lil' helper
Joined: 29 Jul 2004 Posts: 87 Location: almost in hell
|
Posted: Thu Sep 02, 2004 8:18 pm Post subject: |
|
|
umm i have Linux linuxoid 2.6.7-gentoo-r14 #3 SMP Wed Aug 25 03:13:28 CEST 2004 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux
and this is what i got Code: | linuxoid linux # cat /home/max/Desktop/File\ di\ testo2 | grep FAIL
Hunk #1 FAILED at 1077.
1 out of 1 hunk FAILED -- saving rejects to file include/linux/pci_ids.h.rej
Hunk #13 FAILED at 1147.
1 out of 16 hunks FAILED -- saving rejects to file sound/core/control.c.rej
Hunk #1 FAILED at 17.
1 out of 1 hunk FAILED -- saving rejects to file sound/core/seq/instr/Makefile.rej
Hunk #2 FAILED at 35.
1 out of 2 hunks FAILED -- saving rejects to file sound/core/seq/Makefile.rej
Hunk #3 FAILED at 55.
1 out of 5 hunks FAILED -- saving rejects to file sound/drivers/mpu401/mpu401.c.rej
Hunk #12 FAILED at 1030.
1 out of 14 hunks FAILED -- saving rejects to file sound/drivers/vx/vx_pcm.c.rej
Hunk #2 FAILED at 76.
1 out of 8 hunks FAILED -- saving rejects to file sound/isa/gus/interwave.c.rej
Hunk #2 FAILED at 862.
Hunk #3 FAILED at 873.
Hunk #4 FAILED at 884.
Hunk #5 FAILED at 895.
4 out of 5 hunks FAILED -- saving rejects to file sound/pci/au88x0/au88x0_a3d.c.rej
Hunk #7 FAILED at 824.
Hunk #13 FAILED at 913.
Hunk #16 FAILED at 975.
Hunk #17 FAILED at 995.
4 out of 24 hunks FAILED -- saving rejects to file sound/pci/azt3328.c.rej
Hunk #36 FAILED at 1967.
1 out of 44 hunks FAILED -- saving rejects to file sound/pci/es1968.c.rej
Hunk #32 FAILED at 1100.
Hunk #43 FAILED at 1862.
2 out of 50 hunks FAILED -- saving rejects to file sound/pci/ice1712/ice1724.c.rej
Hunk #107 FAILED at 4880.
1 out of 110 hunks FAILED -- saving rejects to file sound/pci/rme9652/hdsp.c.rej
Hunk #1 FAILED at 6.
1 out of 1 hunk FAILED -- saving rejects to file sound/ppc/Kconfig.rej
Hunk #7 FAILED at 573.
Hunk #24 FAILED at 1315.
2 out of 28 hunks FAILED -- saving rejects to file sound/usb/usbmixer.c.rej
|
it says failed... , can i undone the patch or i have to reemerge the kernel?
P.S. the only reason i'm doining this cose i can't get my mic to work... Code: | CC [M] sound/pci/ac97/ac97_codec.o
sound/pci/ac97/ac97_codec.c:218: error: `AC97_SHARED_TYPES' undeclared here (not in a function)
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_write':
sound/pci/ac97/ac97_codec.c:285: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:287: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_read':
sound/pci/ac97/ac97_codec.c:305: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_read_cache':
sound/pci/ac97/ac97_codec.c:312: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_write_cache':
sound/pci/ac97/ac97_codec.c:335: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_update':
sound/pci/ac97/ac97_codec.c:362: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_update_bits':
sound/pci/ac97/ac97_codec.c:395: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_ad18xx_update_pcm_bits':
sound/pci/ac97/ac97_codec.c:406: error: structure has no member named `mutex'
sound/pci/ac97/ac97_codec.c:416: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:420: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:422: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:426: error: structure has no member named `mutex'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_get_mux':
sound/pci/ac97/ac97_codec.c:452: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:452: error: (Each undeclared identifier is reported only once
sound/pci/ac97/ac97_codec.c:452: error: for each function it appears in.)
sound/pci/ac97/ac97_codec.c:452: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_put_mux':
sound/pci/ac97/ac97_codec.c:463: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:463: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_get_enum_double':
sound/pci/ac97/ac97_codec.c:507: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:507: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_put_enum_double':
sound/pci/ac97/ac97_codec.c:522: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:522: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_get_single':
sound/pci/ac97/ac97_codec.c:549: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:549: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_put_single':
sound/pci/ac97/ac97_codec.c:563: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:563: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_get_double':
sound/pci/ac97/ac97_codec.c:594: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:594: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_put_double':
sound/pci/ac97/ac97_codec.c:614: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:614: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_getput_page':
sound/pci/ac97/ac97_codec.c:636: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:636: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c:644: error: structure has no member named `mutex'
sound/pci/ac97/ac97_codec.c:649: error: structure has no member named `mutex'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_spdif_default_get':
sound/pci/ac97/ac97_codec.c:783: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:783: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_spdif_default_put':
sound/pci/ac97/ac97_codec.c:796: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:796: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_put_spsa':
sound/pci/ac97/ac97_codec.c:864: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:864: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_ad18xx_pcm_info_bits':
sound/pci/ac97/ac97_codec.c:933: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:933: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_ad18xx_pcm_get_bits':
sound/pci/ac97/ac97_codec.c:950: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:950: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_ad18xx_pcm_put_bits':
sound/pci/ac97/ac97_codec.c:964: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:964: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_ad18xx_pcm_get_volume':
sound/pci/ac97/ac97_codec.c:996: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:996: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_ad18xx_pcm_put_volume':
sound/pci/ac97/ac97_codec.c:1008: error: `chip_t' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1008: error: syntax error before ')' token
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_free':
sound/pci/ac97/ac97_codec.c:1068: error: structure has no member named `shared_type'
sound/pci/ac97/ac97_codec.c:1070: error: structure has no member named `shared_type'
sound/pci/ac97/ac97_codec.c: At top level:
sound/pci/ac97/ac97_codec.c:1785: error: syntax error before "ac97_bus_ops_t"
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_bus':
sound/pci/ac97/ac97_codec.c:1787: error: number of arguments doesn't match prototype
include/sound/ac97_codec.h:489: error: prototype declaration
sound/pci/ac97/ac97_codec.c:1794: error: `card' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1795: error: `rbus' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1796: warning: implicit declaration of function `kcalloc'
sound/pci/ac97/ac97_codec.c:1796: warning: assignment makes pointer from integer without a cast
sound/pci/ac97/ac97_codec.c:1800: error: `num' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1801: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:1801: error: `ops' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1802: error: `private_data' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c: At top level:
sound/pci/ac97/ac97_codec.c:1833: error: syntax error before "ac97_template_t"
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_mixer':
sound/pci/ac97/ac97_codec.c:1834: error: number of arguments doesn't match prototype
include/sound/ac97_codec.h:490: error: prototype declaration
sound/pci/ac97/ac97_codec.c:1845: error: `rac97' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1847: error: `bus' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1847: error: `template' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1850: error: `AC97_SHARED_TYPES' undeclared (first use in this function)
sound/pci/ac97/ac97_codec.c:1866: warning: assignment makes pointer from integer without a cast
sound/pci/ac97/ac97_codec.c:1880: error: structure has no member named `mutex'
sound/pci/ac97/ac97_codec.c: In function `snd_ac97_resume':
sound/pci/ac97/ac97_codec.c:2155: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2156: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2168: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2176: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2192: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2193: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2204: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c:2229: error: structure has no member named `ops'
sound/pci/ac97/ac97_codec.c: At top level:
sound/pci/ac97/ac97_codec.c:218: error: storage size of `shared_codec' isn't known
sound/pci/ac97/ac97_codec.c:218: warning: `shared_codec' defined but not used
make[3]: *** [sound/pci/ac97/ac97_codec.o] Error 1
make[2]: *** [sound/pci/ac97] Error 2
make[1]: *** [sound/pci] Error 2
make: *** [sound] Error 2
linuxoid linux # |
_________________ Stop posting your PC's hardware as your signature. |
|
Back to top |
|
|
black hole sun Apprentice
Joined: 14 Aug 2004 Posts: 245
|
Posted: Sat Sep 04, 2004 4:49 pm Post subject: |
|
|
Thanks a ton, b1c1! I was wondering how to update ALSA! |
|
Back to top |
|
|
jp_math54 n00b
Joined: 07 Sep 2004 Posts: 12 Location: France - Metz
|
Posted: Wed Sep 15, 2004 4:43 pm Post subject: |
|
|
Hello,
I managed to install ALSA 1.0.6 on my 2.6.7.r8 kernel (using emu10k1 for SBlive!), but had to change a goto line in the file control.c or the kernel failed to compile (using genkernel)...
I had to change "goto __end_(Ican'tremenberwhat)"
for "goto __end" when I tried to compile after applying the patch
(((I'm sorry for lack of precision but I'm writing from my office, and do not have any internet at home...)))
Is that normal?
Still, my kernel compiled, and now is my big dummy question:
How do I get alsa to start, and a sound going out from my speakers? I mean I dont have this "start ALSA" line I used to have on startup with mandrake... I don't even see it in my KDE sound configuration tools... _________________ I said don't throw me any stones... |
|
Back to top |
|
|
k:arel Tux's lil' helper
Joined: 14 Oct 2003 Posts: 91 Location: Belgium
|
Posted: Sat Sep 18, 2004 8:40 am Post subject: |
|
|
thx for howto
worked really fine here (kernel 2.6.8.1), now running ALSA 1.0.6
before this howto i got ALSA module load erros while booting and also local gave a fault
*all solved now* _________________ The fastest way to speed up a Windows machine is at 9.81 meters per second per second. |
|
Back to top |
|
|
discomfitor l33t
Joined: 21 Feb 2003 Posts: 927 Location: None
|
Posted: Sun Sep 19, 2004 4:16 am Post subject: |
|
|
Generally when you're using one of the alsa-bk patches, they're meant for the most recent kernel that is out at that point (because that's the most recent alsa). If you have a kernel newer than the latest bk patch, then chances are it already includes the latest bk (NOT always true, but usually true).
max4ever: You're having problems patching that because you're most likely using the wrong bk for your kernel version. Either upgrade your kernel (which will probably have newer alsa anyway) or use an older bk patch. _________________ There is no substitute for experience.
Imperfection indicates a lack of effort. |
|
Back to top |
|
|
dwblas Guru
Joined: 14 Jul 2003 Posts: 525 Location: Southern California (No jokes please)
|
|
Back to top |
|
|
|