I've managed to get it work.
The problem wasn't with Linux, Alsa or PulseAudio, the problem was with my setup.
My PC is capable of 7.1 audio on-board, but I have an 5.1 speaker set directly hooked into my computer (analogue out). Also, under Windows, real sound from the rear speakers only heard if I plug the rear jack into the side plug. Under Ubuntu, Alsa or pulse correctly recognizes my machine's 7.1 capability and assumes that I have a 7.1 speaker system. The speakers are recognized correctly, but real surround rear stream is flowing into the side speakers, instead of rear, even if choose the 5.1 analogue output in the sound settings applet. Then rear speakers are mapped as side speakers.
To get real surround sound, I've also had to do the following:
- Set Totem Media Player to 5.1 output
Edit | Settings | Sound tab
- Install the Pulse Audio Volume Control. (
sudo apt-get install pavucontrol
) and adjust the side speaker's volume. Real surround sound, especially the rear channels, is usually low volume. It's recommended to first start the movie/audio and seek to a loud part before you do this, though.
- Also, you have to adjust volume in the output tab, because you can only adjust rear speakers there.
- DO NOT touch the regular volume control indicator while pavucontrol is running, or even after you ran it. it'll behave erratically!
Edit 15 aug 2015: Since then, I've mustered the courage and plugged the rear speakers' jack into the correct plug, and set mode to 5.1. It works flawlessly with the test file. The problem was with 7.1 mode with rear speakers plugged into the side plug is that that in that mode side speakers gets a mixed channel from the front and back channels via pulse. With this physical correction, Ubuntu's sound settings applet also becomes more useful, so you may not need pavucontrol.