When I migrated one of my desktops from Windows XP to Ubuntu Feisty (7.04), my 5.1 speakers that were working really great with XP were now only outputting in 2.1 mode.
Prejudices about the lack of hardware support by Linux didn’t really encourage me to look into the issue.
Well I was wrong: not only Linux is perfectly able (thanks to ALSA) to handle the 5.1 mode of a nForce chipset, it also allows you to do more tweaking than with XP.
A desktop running Feisty, with an Abit NF7 Series motherboard.
This is the integrated chipset of the motherboard that handles 5.1. Here is the result of the lspci command:
$ lspci | grep audio
00:05.0 Multimedia audio controller: nVidia Corporation nForce Audio Processing Unit (rev a2)
00:06.0 Multimedia audio controller: nVidia Corporation nForce2 AC97 Audio Controler (MCP) (rev a1)
My 5.1 speakers are Logitech X-530 with three jacks (green, orange, black).
My ALSA configuration file will let you obtain a 5.1 sound from a 5.1 track, and pseudo-5.1 (channel mix) from a stereo track, all automatically.
You have to modify the configuration file for ALSA,
asound.conf. Open the file:
$ sudo gedit /etc/asound.conf
Copy and paste the whole content of my ALSA configuration file within the editor. Save and close gedit.
In order for ALSA to take into account your modifications, it must be restarted. This can be done by the command:
$ sudo /etc/init.d/alsa-utils restart
It is necessary to input this command after each modification of asound.conf file.
If all went fine, 5.1 mode should be enabled. Before you test, make sure the channels for 5.1 are not muted.
Open the volume controller Alsa-mixer (double-click on the sound applet), then Edition, Preferences and tick the boxes concerning 5.1.
These channels should now appear in the window, with their volume bar.
Testing the “Stereo to 5.1” mix
Just playing a simple stereo MP3 file with XMMS or RythmBox should produce sound on all speakers.
Stereo channels are duplicated on the front and rear speakers, and mixed for the center speaker and the subwoofer.
Testing the “Real 5.1”
To do so we will use Amarok (because it handles perfectly 5.1 audio files). Install it if you don’t have already, this player is really impressive.
In Amarok configuration panel, activate the Surround 5.1 mode:
Download the following file for the test, it contains 5 audio tracks:
–> WAV 5.1 sound file
When you play it with Amarok, you should hear:
“Front Left ; Front Right ; Center ; Rear Left ; Rear Right”
Since the sound is 5.1, each speaker should output only once.
If the channels are not correctly mapped with the speakers…
You can hear distinct sounds on each speaker, but the right track is played on the left speaker or the subwoofer is outputting the center channel?
Don’t worry, this is very easy to fix, you just need to do a correct mapping of the channels.
My asound.conf file works when the cables are plugged this way:
You can see the orange jack is connected to the black output, and the black to the orange. I agree this is not very logical but it is the only way I could make it work