Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm encountering an issue with surround sound on Ubuntu 11.04. I managed to play sound trough HDMI but the channels are inverted. For example when Pulse Audio plays on the center speaker, it goes through my LFE. Same thing on the speaker test included in the sound preferences channel.

While searching topics about this issue I tried editing /etc/pulse/daemon.conf by changing the channel-map setting - to no avail. Maybe I didnt use it correctly ?

Any idea to swap those channels and have my 5.1 working correctly?

System specs :
Ubuntu 11.04
AsRock aion330
HDMI amp

Thanks in advance!

aplay -L gives this result:

    Playback/recording through the PulseAudio sound server
    Playback/recording through the PulseAudio sound server
    HDA NVidia, VT1708S Analog
    Front speakers
    HDA NVidia, VT1708S Analog
    4.0 Surround output to Front and Rear speakers
    HDA NVidia, VT1708S Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
    HDA NVidia, VT1708S Analog
    5.0 Surround output to Front, Center and Rear speakers
    HDA NVidia, VT1708S Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
    HDA NVidia, VT1708S Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
    HDA NVidia, VT1708S Digital
    IEC958 (S/PDIF) Digital Audio Output
    HDA NVidia, HDMI 0
    HDMI Audio Output
    HDA NVidia, VT1708S Analog
    Direct sample mixing device
    HDA NVidia, VT1708S Digital
    Direct sample mixing device
    HDA NVidia, HDMI 0
    Direct sample mixing device
    HDA NVidia, VT1708S Analog
    Direct sample snooping device
    HDA NVidia, VT1708S Digital
    Direct sample snooping device
    HDA NVidia, HDMI 0
    Direct sample snooping device
    HDA NVidia, VT1708S Analog
    Direct hardware device without any conversions
    HDA NVidia, VT1708S Digital
    Direct hardware device without any conversions
    HDA NVidia, HDMI 0
    Direct hardware device without any conversions
    HDA NVidia, VT1708S Analog
    Hardware device with all software conversions
    HDA NVidia, VT1708S Digital
    Hardware device with all software conversions
    HDA NVidia, HDMI 0
    Hardware device with all software conversions

gnome-volume-control is indeed set to Digital Surround 5.1 HDMI Output. The speaker test is affected by the channels issue, though.

share|improve this question

To set up the correct mapping in HDMI 5.1 sound when the channels are configured incorrectly you should try the following in the command line

  1. pulseaudio -k
  2. gksu gedit /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf
  3. Find the HDMI-surround section there in that file. Switch the incorrect speakers in channel-mapping and save the file.
  4. Run speaker-test -c6 -twav
  5. If it is still incorrect, go back to step 1.

Tested on Ubuntu 12.04 with an NVIDIA ION (zotac motherboard).

share|improve this answer

Without knowlegde on your present ALSA and PulseAudio settings we can only guess what might be wrong here.

To troubleshoot sound output please

  • check if ALSA mapping is correct (by invoking aplay -L in a terminal)
  • make sure your hardware profile is set to 5.1. in gnome-volume-control Audio Settings -> Hardware
  • try to change remixing settings in /etc/pulse/daemon.conf to:

    enable-remixing = yes try also with no

    enable-lfe-remixing = no try also with yes

Channel mapping in daemon.conf are only working in case there is no other channel map present (see also pulseaudio ticket #825).

ALSA HDMI sound output may be digital and thus - unlike analog channels - mixing for 5.1. surround output is done by the hardware attached.

share|improve this answer
hey thanks for the answer I edited my first post. For the edits in daemon.conf, stupid question but : shall i un-comment first ? everything seems commented in the file and begins with a ; ... shall i try enable-remixing = yes AND enable-lfe-remixing = yes at the same time ? Thanks for the explanation about channel mapping. I must admit I still dont understand how pulseaudio and alsa work : I mean for example, when I change the settings in sound prefere'nces through Gnome, am I overriding settings such as "default-sample-channels" in daemon.conf ? (which is set at 2 currently) – letraitplat Jun 12 '11 at 21:16
I was just guessing if settings may help you here. You may find out by trial and error. Make a backup of the original custom.cońf to restore later. Yes, lines need uncommenting by removing ;. Try all combinations yes and no and restart pulseaudio with pulseaudio -k. GNOME/ALSA settings and PulseAudio settings don't play consistently but as for mixing ALSA/GNOME should override settings from daemon.conf. Try it out, you can always restore your backup to default settings. HDMI sound is digital, i.e. not mixed in your case. 5.1. mixing is done to analog output only. – Takkat Jun 13 '11 at 6:40

@Takkat : NVM I Found the solution.

I tried your suggestions to no avail... Then I searched for more info on conf files for cards. In the end I ended up looking at presets files loaded by pulseaudio, found out there was an Nvidia profile loaded from nvidia.conf.

I found many hdmi surround 5.1 presets in this nvidia.conf file.

Inverted some channels (eg lfe and front left), saved the file, killed pulseaudio, worked like a charm.

Thanks for the help :)

share|improve this answer

I was able to remap the channels of my analog card like this

cp /usr/share/pulseaudio/alsa-mixer/profile-sets/default.conf ~/.pulse/rotatedProfile.conf

I edited that file so that the channel map for my configuration is as I wanted

[Mapping analog-surround-51]
device-strings = surround51:%f
channel-map = front-right,rear-right,front-left,rear-left,front-center,lfe
paths-output = analog-output analog-output-speaker analog-output-desktop-speaker   analog-output-lfe-on-mono
priority = 8
direction = output

then I had to force pulseaudio to load the alsa card by hand, not automatically, and set the profile to the file I just created. I don't know if there is a way to force a profile to autodetected cards, or force only one card to be manually detected. I commented out #load-module module-udev-detect and #load-module module-detect in /etc/pulse/ and added the following line to the end of the file

load-module module-alsa-card device_id=Intel profile_set=/home/silent/.pulse/rotatedProfile.conf

where device_id can be either a number or string. You can see your card names and id's by doing

cat /proc/asound/cards

for reference, my output was like this

  0 [Intel          ]: HDA-Intel - HDA Intel
                       HDA Intel at 0xf9ff8000 irq 44

so device_id=0 worked as well as device_id=Intel

I have seen reports of numeric id's switching places after reboot so if you don't have different cards with the same name I would go for the string representation.

Edit: in 13.04 modifying extra-hdmi.conf instead of default.conf without messing with did the trick. On the other hand this has the risk (does it?) of being overwritten during an upgrade.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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