Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Intel ALC892 and a Nvidia GT 520m connected to speakers via HDMI.

On lspci, I see

00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 02)
    Subsystem: ZOTAC International (MCO) Ltd. Device a218
    Flags: bus master, fast devsel, latency 0, IRQ 47
    Memory at db400000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: [50] Power Management version 2
    Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
    Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00
    Capabilities: [100] Virtual Channel


02:00.1 Audio device: NVIDIA Corporation HDMI Audio stub (rev a1)
    Subsystem: ZOTAC International (MCO) Ltd. Device 2180
    Flags: bus master, fast devsel, latency 0, IRQ 18
    Memory at db080000 (32-bit, non-prefetchable) [size=16K]
    Capabilities: [60] Power Management version 3
    Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
    Capabilities: [78] Express Endpoint, MSI 00
    Kernel driver in use: snd_hda_intel

My alsamixer looks like enter image description here

I enabled pulseaudio configuration file to have 6 channels. My sound setting looks like

enter image description here

When I use the test dialog, only front left and right have sounds. If I use alsa in XBMC on a 5.1 video, there's no sound. If I use pulseaudio, only front right and left have sound. I can barely hear any speech since I'm guessing it's mapped to front center. Any clues?

Update: on what I'm hearing on Ubuntu's IRC, I can't do 5.1 over HDMI and my best bet is to encode AC3 live over S/PDIF using A52 but I can't compile alsa-plugins... it gives an error somewhere while building oss. Any second opinions?

share|improve this question
add comment

5 Answers 5

I solved this by changing a couple of lines in /etc/pulse/daemon.conf First, open the file for editing:

sudo gedit /etc/pulse/daemon.conf

Then make sure the following line is uncommented and set to 6

default-sample-channels = 6 

also uncomment and edit the following line to yes

enable-lfe-remixing = yes

This enabled 5.1 audio on my Intel soundcard in 12.04

share|improve this answer
add comment
up vote 1 down vote accepted

I ended solving this with the following:

  • In pulse audio manager, on the tab with the output devices, there's a list of compression methods like dts etc. I enabled all of them.
  • I connected the audio to the home theatre with S/PDIF.
  • In XBMC, I set the output to optical, the output device to PulseAudio and the passthrough device to PulseAudio as well

And in 5.1 movies, it magically started playing in 5.1. Only one process can play sound at once but since I only use it for XBMC, it's not so bad.

share|improve this answer
add comment

This is the solution that worked for me and it solved my Microphone issues as well.

sudo apt-get remove --purge alsa-base
sudo apt-get remove --purge pulseaudio
sudo apt-get install alsa-base
sudo apt-get install pulseaudio
sudo apt-get install gnome-alsamixer
sudo apt-get install indicator-sound
sudo alsa force-reload

Reboot computer after this point.. you will get 5.1 surround sound. To test it type

sudo speaker-test -c6

Oh and after you reboot if you don't hear surround sound you might need to type

alsamixer

and change the setting there from 2 channel ( ch2 ) to 6 channel ( ch6 ). You will even need to edit the daemon.conf file to set it there too.

gksu gedit /etc/pulse/daemon.conf

Change the setting of default-sample-channels = 2

to : default-sample-channels = 6 ( This might be commented out with ; or #, uncomment it )

You might need to reboot a second time after you edit that file and setup the alsamixer to 6 channels.

UPDATE : Keep in mind, before you reboot that second time, make sure in alsamixer that you chose the correct sound card. You can do that in alsamixer first then you can use the tiny indicator speaker from that point on after the 2nd reboot.

EDIT UPDATE 2 : I reread your comments and realized just now that you are speaking about sending 5.1 over HDMI. My apologies. I should have read it closer.

share|improve this answer
    
I did everything according to your description and sound indicator in my Ubuntu 12.04 does not work any more. –  tommyk Aug 1 '12 at 21:01
add comment
sudo add-apt-repository ppa:ubuntu-audio-dev/ppa
sudo apt-get update

Install the linux-alsa-driver-modules package:

sudo apt-get install linux-alsa-driver-modules-$(uname -r)

Note: After installing the linux-alsa-driver-modules package, your system needs to be rebooted.

share|improve this answer
    
will this work for 5.1 sound through HDMI? –  xster Jun 6 '12 at 18:43
    
Yes, it will... –  Frantique Jun 7 '12 at 7:44
1  
apt-get couldn't find this package on 12.04 –  tommyk Aug 1 '12 at 20:40
add comment

Although I don't have 5.1 audio, I noticed that your alsamixer screen is showing settings for your Intel ALC892 audio and your second screenshot is trying to configure the sound through your HDMI port (Nvidia GT 520m). In order to switch the controls in alsamixer to your NVidia HDMI audio you have to press F6 (as it's written in the top right corner of alsamixer).

If everything is ok with the alsamixer settings and you still can't get any sound, I would try installing the paman package- Pulse Audio Manager. After you install it, open your console and write paman as the package is not installed with an menu entry. After you start the program you'll see 5 tabs - Server Information, Devices, Clients, Modules, Sample Cache. Go to the Devices tab. You'll see a list of Sinks and Sources. You should have 2 sinks by the way, one for your analog Intel output and one for the NVidia HDMI. At this point you should start your audio/video application that uses Pulse Audio for the output and that is configured to output 5.1 volume. Play a file that has a surround sound and you'll notice that new entry appears below one of your sinks in the form of #some_number (eg. #6) . If everything is configured properly in your audio/video application, the entry will appear below your HDMI sink entry. Click on the entry and press the properties button. A new panel appears. What you are trying to do whit all this is make sure that the volume is not set at 0%. Adjust the volume manually with the slider or press reset so that it's set at 100%. Also click on properties for the HDMI sink itself and check that the volume is also set at 100%.

I don't know if this will help you, but it's worth trying it. I discovered Pulse Audio Manager 2 days ago while trying to solve a problem with a muted test sound in Skype- the test call was producing audio, while the test sound was completely silent.

share|improve this answer
add comment

protected by Community Sep 27 '12 at 7:41

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.