So I have this set of speakers with a sub-woofer, and is quite good for music. What it isn't good for is watching movies late at night. Because if I have the volume turned up loud enough to hear the dialog, it's loud enough to feel the explosions (and my neighbors probably don't like that. at 2am.)
What follows is a technical explanation of what I've done to work around this.
So I bought a pair of cheap speakers, and they work great for movies. I can turn them up to hear the dialog properly and they don't have enough power to vibrate walls. I was using two different sound cards, and telling my movie player to play to the second card, but I had a thought. ALSA (the linux sound system) has plugins that will let you route sound from channel to channel. So I took out my second sound card, and plugged both sets of speakers into the same card. The music speakers connected to the "front" jack (usually green) and the movie speakers went in the "rear" jack (usually blue).
Testing this setup, I use:
$ speaker-test -D surround40:CK8 -c 4
...
0 - Front Left
1 - Front Right
3 - Rear Right
2 - Rear Left
CK8 is the name of the sound card, and I'm using surround40 mode to gain access to all 4 speakers. This command plays pink noise out each speaker, one at a time. They all work as expected.
Then I made this ~/.asoundrc:
pcm.backCK8 {
type route
slave.pcm surround40:CK8
slave.channels 4
ttable.0.2 1
ttable.1.3 1
}
Using the ttable statements, I'm routing channel 0 (front left) to channel 2 (rear left) and channel 1 (front right) to channel 3 (rear right).
Now testing my plugin setup:
$ speaker-test -D pcm.backCK8 -c 2
...
0 - Front Left
1 - Front Right
And the "front left" and "front right" play to the speakers I have in the rear jack. So now I just change my speaker device in xine (my movie player) to use the "pcm.backCK8" device in stereo mode. And it all works.
Simple! :)