Category: How to..., Installation — UbuntuLinuxHelp @ 1:28 pm —

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...

#1

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

Roger wrote on November 25, 2007 - 2:18 pm
#2

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

rhazor wrote on January 13, 2008 - 9:50 am
#3

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

Thanks for all help Roger.

rhazor wrote on January 13, 2008 - 9:54 am
#4

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.

Roger wrote on January 14, 2008 - 10:34 am
#6

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

#7

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

andrewz wrote on March 11, 2008 - 5:57 am
#8

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

Roger wrote on March 11, 2008 - 7:58 am
#9

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 wrote on March 17, 2008 - 11:30 pm
#10

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

Roger wrote on March 18, 2008 - 8:03 am
#11

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 wrote on June 25, 2008 - 7:09 pm
#12

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

UbuntuLinuxHelp wrote on June 26, 2008 - 8:08 am
#13

@Robert - Also… Look here for some good asound information: http://alsa.opensrc.org/home/w/org/opensrc/alsa/index.php?title=.asoundrc

UbuntuLinuxHelp wrote on June 26, 2008 - 8:12 am
#14

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.

Travis Place wrote on September 2, 2008 - 10:34 pm
#15

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.

Travis Place wrote on September 2, 2008 - 10:35 pm
You can leave a response, or trackback from your own site.

Write Your Comment

Comment Guidelines: Basic XHTML is allowed (a href, strong, em, code). All line breaks and paragraphs will be generated automatically.

You should have a name, right? 
Your email address, I promised I won't tell it to anyone. 
If you have a web site or blog, you can type the URL right here. 
This is where you type your comments. 
Remember my information for the next time I visit.