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

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

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

 
Thread Tools Display Modes
Old January 21st, 2009   #1
soundcheck
A Carafe of Ubuntu
 
soundcheck's Avatar
 
Join Date: Jul 2007
Location: DUS
Beans: 150
ALSA Upgrade Script

Latest post update 09/19/2009
Latest Alsa-Upgrade-Script update 09/16/2009 Rev. 1.0.21-4
Latest alsa-info.sh update 09/16/2009 (1.0.21)
Latest Alsa-Package update: 09/13/2009 (1.0.21a)


BACKGROUND:

The main idea of upgrading ALSA with attached script, is to bride the huge delay (up to a year) of updates supplied through the official channels.

The huge delay is IMO not at all acceptable.

Somehow the "Linux officials" haven't realized that the audio capabilities of a Linux system belong to the very basic functions of a PC and OS, which have to work from day one.


By running the upgrade there'll be a great chance that you get your soundcard up and running or problems resolved.
The script will get you the latest official stable ALSA release. You can even install the latest driver snapshot, which is again >3 month ahead of the latest stable ALSA release.


GENERAL REMARK (my personal point of view):

Some general comments about ALSA or better Linux Audio and the partial lack of soundcard or soundcard feature support:

ALSA's sometimes limited or restricted soundcard support is first of all a soundcard industry problem.

Many card manufactures neither offer interface descriptions to ALSA, nor they're getting involved in developing the drivers.
Compared to their revenues they are making on the HW side, the effort to prepare and maintain a driver would be neglectable.

So, don't always blame Linux or Alsa if your card is not functioning properly, it's quite often not ALSA's fault.

Quite some issues are also generated by PC manufacturers, who do not write proper BIOSs to get the soundchips properly
integrated. This for sure makes live not easier for ALSA.

The more you all put pressure on the manufactures - by asking for Linux support - the earlier they'll start moving.

If you ask me, soundcard drivers should be handled in a similar way as done with GPU drivers, such as fglrx from AMD.
The opensource variant usually comes with limited functionality and the proprietary driver with usually full functionality.
I am aware that even Linus Torvalds, due to several reasons, is against this.
However - unless the issue won't get better Linux will face huge problems to attract a wider community.

BTW: There is a way to get at least some restricted sound drivers installed on Linux. Have a look at OSS - an ALSA alternative - from 4-Front-Technologies.
For a very limited number of soundcards (e.g. Lynx cards) they offer proprietary non-open drivers.

I personally hope that due to the power of the fast growing number of Linux users the overall situation around this subject will improve in the future.

Lets talk about ALSA quality issues - yes, there are also quite a number of them . The only thing to say here is, that everybody is invited to join the ALSA forces to improve ALSA's performance, documentation, internet presence, asf.
Even reporting your troubles in a proper way will make you a contributor.

If everything what have been written about ALSA in this forum (and the 100s of other forums) would have been jointly put on the ALSA homepage in a structured way, I guess the whole Linux-Audio world would be doing much better today.

Lets talk about the upgrade.


Upgraded packages

Alsa 1.0.21 (stabil)

See: Changelog Alsa 1.0.21

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

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


UPGRADE:

The script is currently 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-id within Synaptic!

The script recognizes 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 manual 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.
Major upgrades can also overwrite some important configuration files such as /etc/modprobe.d/alsa-base.conf .
You need to restore your old configuration manually in this case. Keep always a copy of your modified alsa-base.conf file!

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 .

Of course I rely on your support to improve the script and really appreciate your involvement. You can imagine that I can't cover all kind of setups.

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.21-3.tar
4. sudo ./AlsaUpgrade-1.0.21-4.sh -di
5. sudo shutdown -r 0


Test and Troubleshooting

If you are logged in again 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

AND PLEASE: Before reporting "NO SOUND" problems - check if your alsamixer-channels are activated and unmuted (gnome-mixer/volume-control/preferences)!!
There are quite often headphone-jack, Toslink, SPDIF or microphone issues reported. Usually this has something to do with a wrong alsamixer setting 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.tar.
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 is a quite good chance that further issues are resolved in there.

Use the -snap 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 -snap 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
$ 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 actively contribute to ALSA quality improvements, beside getting your trouble fixed.


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 problems - dependency issues)
Attached Files
File Type: tar alsa-info.tar (30.0 KB, 1387 views)
File Type: tar AlsaUpgrade-1.0.21-4.tar (20.0 KB, 4362 views)

Last edited by soundcheck; September 19th, 2009 at 01:11 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: 2
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
A Carafe of Ubuntu
 
soundcheck's Avatar
 
Join Date: Jul 2007
Location: DUS
Beans: 150
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
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: 94
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 06:53 PM.


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