Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

Thread Tools Display Modes
Old January 21st, 2009   #1
soundcheck
Gee! These Aren't Roasted!
 
soundcheck's Avatar
 
Join Date: Jul 2007
Location: DUS
Beans: 167
ALSA Upgrade Script

Latest post update 01/11/2010
Latest Alsa-Upgrade-Script update 01/06/2010 Rev. 1.0.22.1-2
Latest alsa-info.sh update 01/05/2010 (1.0.22)
Latest Alsa-Package update: 09/05/2010 (1.0.22.1)


BACKGROUND:

The audio functionality of any computer system belongs to the very basic functions of a PC and OS. No sound, poor sound, limited functionality - No use for such a system!

The main idea behind upgrading ALSA with attached script is to make Linux available to a slightly wider community.

The script bridges the huge delay (up to a year) of Alsa updates supplied through the official channels.
By running the upgrade you'll have a much bigger chance to get your soundcard working or problems resolved.

The script installs the latest official stable ALSA release. ( optional the even more up 2 date driver snapshot will be installed)

Upgraded packages

Alsa 1.0.22.1 (stabil)

See: Changelog Alsa 1.0.22.1

DRIVER=alsa-driver-1.0.22.1
FIRMWARE=alsa-firmware-1.0.20
LIB=alsa-lib-1.0.22
PLUGINS=alsa-plugins-1.0.22
UTILS=alsa-utils-1.0.22
TOOLS=alsa-tools-1.0.22
OSS=alsa-oss-1.0.17

Supported kernels: 2.6.24/26/27/28/29/30/31/32 family (including rt-kernel & NON-Ubuntu ZEN-rt-kernel)

Note: The restore currently does not not work on custom kernels!

UPGRADE:

The script is not in line with Debian/Ubuntu rules for package handling. It just overwrites existing files.
You won't see any changes on the ALSA package-ids within Synaptic!

The script recognises severe problems during the installation and will stop automatically. It shouldn't mess up your setup.
If the script stops with an error-message nothing should have been touched!

In the worst case scenario the -r restore option restores your old system status as good as possible. It'll reinstall kernel, kernel-headers and Alsa related packages.

Ubuntu upgrades/updates might overwrite your Alsa installation once in a while (e.g. Major upgrades, kernel-upgrades or ALSA-package upgrades).
You just need to rerun the upgrade-script using the -i option in this case (if you still have the compiled sources on the disk).

Disclaimer: I won't take any responsibility for mess-ups caused by using the script! -- Of course - I do my best to avoid these and support you as much as I can.

As usual - Make a backup first! - A restore will just take 5 minutes with rsync. That might save you hours of troubleshooting and frustration .

Please consider that I rely on your support to improve the script and really appreciate your involvement.



Short Alsa-Upgrade script install instructions:

1. download the script and save it somewhere
2. cd <your-download-dir>
3. tar xvf AlsaUpgrade-1.0.22.1-2.tar
4. sudo ./AlsaUpgrade-1.0.22.1-2.sh -d
5. sudo ./AlsaUpgrade-1.0.22.1-2.sh -c
6. sudo ./AlsaUpgrade-1.0.22.1-2.sh -i
7. sudo shutdown -r 0

Looging: I recommend to log all the upgrade steps, e.g.

script -a -c "./AlsaUpgrade-1.0.22.1-2.sh -d" /tmp/Alsa_1.0.22.1_upgrade_download.log

Youll find a log file /tmp/Alsa_1.0.22.1_upgrade_download.log as soon as the script is finished.
You need to run this procedure for every single step. Choose whatever logfile names.

Test and Troubleshooting

After reboot you can type:

cat /proc/asound/version

This will let you know if you're running the new version.


The easiest and most reliable test to verify if Alsa is working is "aplay" - the Alsa player application. If aplay won't work -- nothing else will work.

Make sure that all your channels are unmuted and volume is up!

Type in a terminal:
$ aplay -l
(This won't work on e.g. webcams with a microphone only. Here you need to do a $cat /proc/asound/cards to see if it is there"

If you see your soundcards, you're almost there.

To test your first (default-index 0 X=0) soundcard, type e.g.:
$ aplay -Dplughw:X,0 -fcd /<your-music-directory>/<replace-this-with-your-soundfile>.wav
or e.g.
$ speaker-test -Dplughw:X,0 -c2
replace the X with the index of your soundcard index , which you find out by typing "aplay -l" - look for "card X"

Multichannel you can test the following way:
1. Type $aplay -L to find out about your pcm device . e.g "surround51"
2. Type $speaker-test -D surround51 -c6
Note: If the channel mapping should be wrong you need to adjust it in .asoundrc

Before reporting "NO SOUND" problems - check if your alsamixer-channels are activated and unmuted (gnome-mixer/volume-control/preferences)!!
Very often there are headphone-jack, Toslink, SPDIF or microphone issues reported. Usually this has something to do with wrong alsamixer settings or more seldom with a wrong model-id assigned to your sound-driver in /etc/modprobe.d/alsa-base.conf .
If you're lacking certain controls in alsamixer or your driver is not even being loaded, you should check-out your model-id in attached HD-Audio-Models.txt.
I strongly recommend to try similar model-id's matching your codec to checkout if your faulty function gets working.
I'd guess 80% of the reported problems (group: other than alsamixer issues) over here are related to the model setting in alsa-base.

Please also have a look at these sides for further help:

http://ubuntuforums.org/showthread.php?t=843012
https://help.ubuntu.com/community/So...gSoundProblems


To avoid spaming the ALSA mailing list with problems, I strongly recommend to install the very latest driver snapshots taken from the source tree. There'll be a slight chance that issues might be resolved already.

Use the -s option of the upgrade script to get the latest driver snapshot installed.

(NOTE: The snapshot is neither an official driver release nor an official pre-release or release-candidate - however, it reflects an "approved" status by the Alsa main developers. Therefore you don't risk much to install it.)


Alsa provides alsa-info.sh. It is a shell script collecting all kind of data related to the audio environment. The Alsa designers will ask for the log in case we encounter rather severe problems. However before sending the stuff to Alsa the upgrade script should have been run with the -s function. The problem you're running into might be already resolved in the latest drivers snapshot.

Download alsa-info.tar first

$ tar xvvf alsa-info.tar
$ sudo alsa-info.sh --no-upload

You can attach the log-file here or you send the output to the ALSA mailing list.
This way you also actively contribute to ALSA quality improvements.


To make troubleshooting over here a bit more efficient, report:

1. Name your Ubuntu revision
2. Kernel revision
3. Alsa revision
4. Upgrade script revision
5. A bit of background what you've done resp. done before
6. Attach the relevant logs


A bit of statistics since mid of October 2008:

AlsaUpgradeScript rev. 1.14 1500 downloads
AlsaUpgradeScript rev. 1.15 1672 downloads
AlsaUpgradeScript rev. 1.16 8037 downloads
AlsaUpgradeScript rev. 1.17 7204 downloads (Alsa 1.0.20)
AlsaUpgradeScript rev. 1.0.21-3 193 downloads (Alsa 1.0.21) (2 reported (real) problems - dependency issues)
AlsaUpgradeScript rev. 1.0.21-4 6189 downloads (Alsa 1.0.21)
AlsaUpgradeScript rev. 1.0.22.1-1 41 downloads (Alsa 1.0.22.1)
Attached Files
File Type: tar alsa-info.tar (30.0 KB, 570 views)
File Type: tar AlsaUpgrade-1.0.22.1-2.tar (20.0 KB, 1635 views)
File Type: txt HD-Audio-Models.txt (11.3 KB, 643 views)
__________________
Alsa Upgrade Script 1.0.22.1

Last edited by soundcheck; 4 Weeks Ago at 07:18 AM..
soundcheck is offline   Reply With Quote
Old January 22nd, 2009   #2
tmtan
First Cup of Ubuntu
 
Join Date: Apr 2008
Beans: 11
Talking Re: ALSA Upgrade Script

great job. I had been looking and thinking about compiling a script to get this done for a while, but never came around. Im glad you finally did, its mid stream right now, but I've been following it closely and it looks like it will be flawless. great job! thanks!
tmtan is offline   Reply With Quote
Old January 22nd, 2009   #3
sensimilla
5 Cups of Ubuntu
 
sensimilla's Avatar
 
Join Date: Apr 2007
Beans: 20
Talking Re: ALSA Upgrade Script

Many thanks for this.

Now I can finally suspend my PC without losing the sound from my audigy value card (using the CA0106 driver). After only 3 and a half years of waiting!

Much gratitude to all the alsa devs as well.
sensimilla is offline   Reply With Quote
Old January 22nd, 2009   #4
bimbot
First Cup of Ubuntu
 
Join Date: Jan 2009
Beans: 3
Re: ALSA Upgrade Script

I've just started learning about Ubuntu and I can't believe how much I'm picking up just by trying to get a stable install.

First, my ATI card wouldn't work by enabling the proprietary drivers through the gui, so I pretty much had to learn how to install the ATI drivers manually. Now that the display drivers are pretty stable, I have no sound through my HDMI port on my video card. That lead me to this thread.

Thanks for making it easy for us noobs...I will try to upgrade to 1.0.19 to see if that fixes the problem.

I have a feeling I'm going to frequent these forums in the next couple days, so I do appreciate posts like this.
bimbot is offline   Reply With Quote
Old January 22nd, 2009   #5
emuman
Just Give Me the Beans!
 
emuman's Avatar
 
Join Date: Mar 2005
Beans: 53
Re: ALSA Upgrade Script

I can't compile ALSA 1.0.19 on my system. The error message is similar to http://ubuntuforums.org/showthread.php?t=962695 daximus #39 and clarkey45 #34 reply. I'm using kernel 2.6.28 on intrepid on a powerpc (ps3) system. The same problem existed in kernel 2.6.24 and was fixed in ALSA but maybe only for i386 and not for powerpc? Any background / ideas how to fix this?
emuman is offline   Reply With Quote
Old January 22nd, 2009   #6
soundcheck
Gee! These Aren't Roasted!
 
soundcheck's Avatar
 
Join Date: Jul 2007
Location: DUS
Beans: 167
Re: ALSA Upgrade Script

Quote:
Originally Posted by emuman View Post
I can't compile ALSA 1.0.19 on my system. The error message is similar to http://ubuntuforums.org/showthread.php?t=962695 daximus #39 and clarkey45 #34 reply. I'm using kernel 2.6.28 on intrepid on a powerpc (ps3) system. The same problem existed in kernel 2.6.24 and was fixed in ALSA but maybe only for i386 and not for powerpc? Any background / ideas how to fix this?
Of course. I do have an idea: Prepare a proper log, using alsa-info.sh and drop a trouble-ticket to alsa-dev mailing list!

Cheers
__________________
Alsa Upgrade Script 1.0.22.1
soundcheck is offline   Reply With Quote
Old January 22nd, 2009   #7
gkak
First Cup of Ubuntu
 
gkak's Avatar
 
Join Date: Sep 2007
Location: greece
Beans: 2
Wink Re: ALSA Upgrade Script

thanx for the script

worked perfect on my ACER 7720G/ Ubuntu 8.10

solved my problem with the internal mic. now i can sound record, use skype etc

greetings from greece

giorgos

Last edited by gkak; January 22nd, 2009 at 12:20 PM..
gkak is offline   Reply With Quote
Old January 22nd, 2009   #8
sunny_nwho
A Carafe of Ubuntu
 
sunny_nwho's Avatar
 
Join Date: Nov 2005
Location: Bangkok
Beans: 119
Ubuntu 9.04 Jaunty Jackalope
Send a message via MSN to sunny_nwho Send a message via Yahoo to sunny_nwho Send a message via Skype™ to sunny_nwho
Re: ALSA Upgrade Script

Thanks a lot!! I can make sound work now. Still I have a problem playing sound though my laptop speakers. I can only hear it from the headphones jack
sunny_nwho is offline   Reply With Quote
Old January 22nd, 2009   #9
heluani
A Carafe of Ubuntu
 
Join Date: Aug 2008
Beans: 97
Re: ALSA Upgrade Script

Macbook Air 2.1
Alsa 1.0.19
No audio from internal speaker, only audio from headphones.
Attached output from alsa-info.sh and uxchecker.sh -a

R.
uxchecker.log.tar

alsa-info.tar
heluani is offline   Reply With Quote
Old January 22nd, 2009   #10
pike2k
First Cup of Ubuntu
 
Join Date: May 2007
Location: Sweden
Beans: 10
Ubuntu 7.10 Gutsy Gibbon
Send a message via MSN to pike2k
Re: ALSA Upgrade Script

Thank you. I got a 0404 USB2.0 and before with .15/.16 alsa I had pops and scratches on audio. New alsa seems to fix those issues atleast

Now all I miss is working SPDIF (iec95 + ac3/dts passthrough on this card. I'm still rather clueless how to get this to work
__________________
Projectmanager for XBMC
pike2k is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:01 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry