I recently upgraded the audio card on my Ubuntu (7.10) system, which was an “issue” simply because I created it (instead of looking at the issue and jumping to conclusions instead of analyzing possible causes). Suffice it to say, a word to the wise… If your motherboard comes with a soundcard embedded and you want to use an enhanced or better quality sound card in one of your PCI slots… Make your life easy, simply disable the on-board audio in the BIOS setting of your motherboard. I did not do this initially. The two were not compatible and I spent countless hours trying to troubleshoot the issue that took less that 30 seconds to fix! Needless to say, next time I won’t be as foolish.
However, the primary purpose of today’s post is enabling 5.1 surround sound. During the upgrade I was also able to grab an almost new set of Creative Inspire 5.1 5200 series speakers. When I plugged them in I was only hearing audio from the front speakers.
While troubleshooting the earlier sound card issue, I remembered that ALSA was one of the components in the configuration. After lots of research, here is the solution that worked (below).
Edit the configuration file like this:
gedit .asoundrc
(You can use vi or nano to edit it if you don’t have gedit).
Then add the following:
pcm.!default {
type plug
slave.pcm “surround51″
slave.channels 6
route_policy duplicate
}
I think however, that it might be helpful to include some of the sound card related issues…
In my case the above 5.1 solution worked well (ONLY after I disabled the onboard audio of the motherboard!)
You can check to ensure that an issue is the sound card (and not the speakers) by using the following command in a terminal.
aplay -l
This will list the sound card installed. (If you see others, just remove or disable them).
If using the “aplay -l” command does not show your sound card, then try listing the sound card (PCI) device by entering:
lspci -v
If you see your card, then (most likely) the drivers are not installed, so just install them. More information for this can be found here: ubuntuforums.org/showthread.php?t=205449
Update: The edit to asoundrc is to configure the surround output so that it duplicates the stereo output to all 6 channels, instead of only through the front channel speakers.



There are 15 comment(s) added so far...
When Ubuntu Linux is loaded on many laptops, the sound does not work initially. So what’s up? Well, it’s pretty simple. Linux is sending the sound to an external speaker. The problem is that you don’t have an external speaker. So here is how to fix the issue: http://techloaf.com/index.php?/archives/61-Making-Sound-Work-in-Ubuntu-7.10-on-Laptops,-even-the-MX7118.html
Still central speaker doesn’t work. I have Creative A500 5.1 speaker system and Trust 5.1 SC-5100 sound card.
Whoops! Just fixed. Had to change Line-In mode to Rear Output.
Thanks for all help Roger.
[…] The specific URL doing the hotlinking is: http://internalforum.circuitcity.com/index.php and they are linking to: http://ubuntulinuxhelp.com/the-simple-way-to-get-51-surround-sound-audio-working-in-ubuntu/ […]
[…] should work in stereo mode. If you need get the 5.1 surround work, you can edit your .asoundrc (the original tutorial) […]
I stil can not make my soundcard 5.1.My sound card is SoundBlastelive
@ andrewz - Have you disabled on-board sound for the motherboard? I found that was part of my issue. Creative Audigy 2 ZS with Creative Inspire 5.1 5200 speakers is working on Ubuntu Feisty 7.10 at this end. Working on Amarok, Ekiga and Adobe Flash 3 (Firefox browser). Maybe some of your troubleshooting is application based?
What if i dont have the .asoundrc file to edit how do I create one! This is really not step by step instructions someone please help. Explain it to me as you would a child. –Thanks in advance
LINUX ROCKS
@Michael - You’re right, this is not step-by-step (it never was).
This is primarily for those upgrading a sound card or trying to get 5.1 surround sound working with an existing sound card.
It would be difficult for me to provide a step-by-step. Why?…
What is the sound card?
What are the speakers (how are they connected)?
Is ALSA being used?
What version of Linux?
Drivers?
And so on…
To answer your immediate question however, you can create the .asoundrc in your home directory. Caution here! It might already be there!
The “.” (”dot”) in front of the file name means the file is hidden and you will not see it via casual directory observation. (Enable the viewing of hidden files).
If you edit that “hidden” file, you may be able to continue.
Let me know okay? And have a great day!
I have Alsa on Ubuntu 8.04 with an external Soundblaster card. I can get the card to work, but would like 5.1. Where should the asoundrc file be located?
@Robert - If I remember correctly, there are two places you will find the file.
For system wide configuration, it will be: /etc/asound.conf
For user specific configuration, it will be: /home/[username]/.asound.conf
I hope this helps you.
@Robert - Also… Look here for some good asound information: http://alsa.opensrc.org/home/w/org/opensrc/alsa/index.php?title=.asoundrc
For a more complete upmixing solution, where dmix will still work, and surround sounds aswell as stereo sounds can be ‘upmixed’ at once.. check out - http://pastebin.ca/1192204 - This config can be used as a template for many other cards.. by changing sample format etc.
Also note, for the EMU10K1 based cards (Sound Blaster Live! and some Audigy cards) no .asoundrc is needed for playing stereo sounds on 5.1 speakers. You just need to adjust the “Wave Center” and “Wave LFE” and “Wave Surround” controls in alsamixer.