The Simple Way to Get 5.1 Surround Sound Audio Working in Ubuntu

August 15, 2007 | By: UbuntuLinuxHelp | 22 Comments
Posted in How to..., Installation

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading ... Loading ...

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.

If you like this post, why not share it?
  • StumbleUpon
  • del.icio.us
  • Digg
  • Google Bookmarks
  • Reddit
  • Mixx
  • Yahoo! Bookmarks
  • blogmarks
  • Twitter

Related posts:

  1. Enable 5.1 Surround Sound on Linux – Ubuntu 8.04 Hardy
  2. The Easy Way Save DVD Audio to MP3.
  3. How to Get Network and Video Working in Shuttle Computers.
  4. 10 Things to do After Installing Ubuntu Linux
  5. How to Setup a Wireless Ubuntu Router


Comments

22 Comments so far

  1. UbuntuLinuxHelp UbuntuLinuxHelp on November 25, 2007 2:18 pm

    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?.....X7118.html

  2. rhazor rhazor on January 13, 2008 9:50 am

    Still central speaker doesn’t work. I have Creative A500 5.1 speaker system and Trust 5.1 SC-5100 sound card.

  3. rhazor rhazor on January 13, 2008 9:54 am

    Whoops! Just fixed. Had to change Line-In mode to Rear Output.

    Thanks for all help Roger.

  4. UbuntuLinuxHelp UbuntuLinuxHelp on January 14, 2008 10:34 am

    I have the same issue with the connections. Maybe it’s just me, but I wish the manufacturers would provide better labeling for the speaker connections.

  5. Hot Linkers are Bandwidth Thieves | Ubuntu Linux Help Hot Linkers are Bandwidth Thieves | Ubuntu Linux Help on March 2, 2008 10:11 am

    [...] The specific URL doing the hotlinking is: http://internalforum.circuitci...../index.php and they are linking to: http://ubuntulinuxhelp.com/the.....in-ubuntu/ [...]

  6. Linux and Electronics » Blog Archive » Creative X-Fi Extreme Audio Sound Card in Ubuntu Linux and Electronics » Blog Archive » Creative X-Fi Extreme Audio Sound Card in Ubuntu on March 7, 2008 10:07 am

    [...] should work in stereo mode. If you need get the 5.1 surround work, you can edit your .asoundrc (the original tutorial) [...]

  7. andrewz andrewz on March 11, 2008 5:57 am

    I stil can not make my soundcard 5.1.My sound card is SoundBlastelive

  8. UbuntuLinuxHelp UbuntuLinuxHelp on March 11, 2008 7:58 am

    @ 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?

  9. Michael Michael on March 17, 2008 11:30 pm

    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

  10. UbuntuLinuxHelp UbuntuLinuxHelp on March 18, 2008 8:03 am

    @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!

  11. Robert Robert on June 25, 2008 7:09 pm

    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?

  12. UbuntuLinuxHelp UbuntuLinuxHelp on June 26, 2008 8:08 am

    @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. :)

  13. UbuntuLinuxHelp UbuntuLinuxHelp on June 26, 2008 8:12 am

    @Robert – Also… Look here for some good asound information: http://alsa.opensrc.org/home/w.....=.asoundrc

  14. Travis Place Travis Place on September 2, 2008 10:34 pm

    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.

  15. Travis Place Travis Place on September 2, 2008 10:35 pm

    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.

  16. andrei andrei on December 12, 2008 8:44 pm

    hello,

    i have a terratec aureon 5.1 usb mk2 sound card. it is connected to my notebook. i can’t disable the other sound card from bios. how does it like the .asoundrc file for card 1 ?

  17. UbuntuLinuxHelp UbuntuLinuxHelp on December 15, 2008 10:24 am

    @andrei – Sorry, I’m not sure what you mean. Please can you clarify a bit more? – Thanks.

  18. Ubuntu Linux » Blog Archive » [ubuntu] 5.1 Surround with Sound Blaster Audigy SE Ubuntu Linux » Blog Archive » [ubuntu] 5.1 Surround with Sound Blaster Audigy SE on December 20, 2008 8:40 pm
  19. Enable 5.1 Surround Sound on Linux - Ubuntu 8.04 Hardy | Ubuntu Linux Help Enable 5.1 Surround Sound on Linux - Ubuntu 8.04 Hardy | Ubuntu Linux Help on February 14, 2009 10:42 am

    [...] time ago I wrote a post about the Simple Way to Get 5.1 Surround Sound Audio Working in Ubuntu, and at that time it worked.  However, much to my annoyance, I could not get surround sound to [...]

  20. Linux: Linux-Forum Linux: Linux-Forum on July 17, 2009 1:25 pm

    [...] Als ich beim anschauen von Filmen kein 5.1 sound hatte hab ich das auf dieser Seite Probiert: http://ubuntulinuxhelp.com/the.....in-ubuntu/ Seitdem Funktioniert der 5.1 sound bei Filmen oder Musik von der Platte perfekt doch nun macht der [...]

  21. Maj Maj on August 27, 2009 11:12 pm

    Yeah. This doesn’t give you ‘5.1 audio.’ All it does is make the same audio play through all the speakers. Misleading article title is misleading.

  22. UbuntuLinuxHelp UbuntuLinuxHelp on August 28, 2009 6:45 am

    @Maj

    You may want to double check your sound then. With this fix I got 5.1 working on my system. I can hear sounds behind me and in front, I can hear sounds left and right – Only when I play games or DVD’s and CD’s where they have used the correct channels. So… Please don’t assume something is misleading without getting all the facts. If a CD, DVD, etc. is not using front, back, left, right, etc. channels, then of course the sound will be through all the speakers.

Name (required)

Email (required)

Website

Speak your mind