LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 10-09-2004, 04:15 PM   #1
BedriddenTech
Member
 
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44

Rep: Reputation: 15
Alsa, surround sound and so on....


Hello!

Again, it's me. Like many people before, I want my four analogue speakers to be a surround40 device *and*, whenever I play from a stereo (and not a surround source), they all four playing this sound.

I already had this question, and some member suggested to use the device "surround40"; but this device though enables this capativity, but plays the stereo source only on my front speakers. I played a bit around with the .asoundrc file, and had this solution in the end:

Code:
# Duplicate a stereo source to the rear speakers
pcm.ch40dup {
        type route
        slave.pcm surround40
        slave.channels 4
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 1
        ttable.1.3 1

}

# do a rate conversion since 44100 is played to fast
pcm.rate48000 {
        type rate
        slave.pcm ch40dup
        slave.rate 48000
}
Now, this works, and quite nice, for example when playing mp3's with xmms. But! I'm not sure whether this would "kill" any real surround sound, e.g. when watching a DVD. I cannot test, since I don't know how (the only thing I could do was looking for a surround sound file, but I found none). Could please anybody answer this, and, perhaps, provide a solution that would not overwrite any surround sound source (if my solution does this).

I'm a totally ALSA and am thankful for every piece of help

Last edited by BedriddenTech; 10-09-2004 at 04:17 PM.
 
Old 01-04-2005, 01:05 AM   #2
swatikiss
LQ Newbie
 
Registered: Jan 2005
Location: Michigan
Distribution: debian
Posts: 2

Rep: Reputation: 0
i am confused about the .asoundrc file

what must i specify in xmms to use the fake surround sound settings??

is this under the "Audio device" or "mixer device" settings for ALSA config ??

Thanks!
 
Old 01-04-2005, 03:56 AM   #3
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
You will have to specify rate48000 in the default. Then every program will use it if you use alsa as the sound device. If your sound card does not do any hardware mixing, you have to use dmix. For 6 channel output (5.1), you have specify alsa and the surround51 device. In some programs you may have to specify six channels. No, this will not effect a 6 channel output from a video or audio like a DVD movie. The alsa library ttable just copies the audio, so you are not getting real simulated surround sound. You have to delay and decrease volume for the rear channels. You can use the code below but delay will have to be done by a circuit because the ladpa filter plugins does not support multi-channels. The code below is just a volume change. Instead of 1 or 100% for the volume, it will be 0.75 or 75% of volume for the rears. The front channels will be untouched.

Code:
# Duplicate a stereo source to the rear speakers
pcm.ch40dup {
        type route
        slave.pcm surround40
        slave.channels 4
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 0.75
        ttable.1.3 0.75

}
A primitive of adding delay is to use sealed (acoustic suspension) type speakers for the front and vented (bass reflex) for the rears. The vented box type has about 30 ms or more for the delays. The sealed is about 5 ms to 15 ms. Doing this way, you do not have to worry about adding delays because the different box types will do it for you.

If you are not using bipole (rear) or dipole (side) speakers for the rears, make sure the speakers are not directly pointing at the listening center. The rear channels only gives ambient sound which means the rears should be first bouncing off an diffused material and then at the listening area to get the full effect of surround sound.

Sorry I went off topic, but a lot of people setup surround sound systems wrong.
 
Old 01-04-2005, 08:50 AM   #4
BedriddenTech
Member
 
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44

Original Poster
Rep: Reputation: 15
So, physically, what effect does this have (except that the rear speakers have little lower volume)? I don't get the point, sorry

/EDIT: "0.75" as value doesn't work ("Invalid....")

Last edited by BedriddenTech; 01-04-2005 at 08:52 AM.
 
Old 01-04-2005, 05:47 PM   #5
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The rear channels should not be as loud as the front channel. Think of a lamp shade versus a lamp with out a lamp shade. The lamp with a lamp shade gives out ambient light which will be like the rear channels. The front channels will be like the lamp without a lamp shade that outputs all light .

I used 0.75 for the rear channels and I have no problems with it.
 
Old 01-04-2005, 06:14 PM   #6
SlackerLX
Senior Member
 
Registered: Dec 2004
Location: Herzliyya, Israel
Distribution: SuSE 10.1; Testing Distros
Posts: 1,834

Rep: Reputation: 47
Be sure that all LFE channels is in [off] position if you have 5.1 speaker system!
*LFE channel is to create emulation of 5.1 matrix for 4 speakers systems
 
Old 01-05-2005, 11:02 AM   #7
BedriddenTech
Member
 
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44

Original Poster
Rep: Reputation: 15
Electro: So with 0.75 you create the effect of reflection instead of a 2nd source, like in a concert hall, the music reflects from the wall behind you?
 
Old 01-05-2005, 07:14 PM   #8
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The 0.75 or 75% of volume for the rears makes it easier to hear the audio better instead of most of the frequencies be canceled if 1.0 is used. This is not concert hall because there is no set delay and reverb.

The lines below will simulate theater like setting that A/V Prologic Recieivers will give you.

type route
slave.pcm surround51
slave.channels 6
ttable.0.0 0.9
ttable.1.1 0.9
ttable.0.2 0.75
ttable.1.3 0.75
ttable.0.4 0.5
ttable.1.4 0.5
ttable.0.5 0.5
ttable.1.5 0.5

4 is center channel and 5 is subwoofer. Though there is no low-pass filter for the subwoofer channel, so you have to use an active low-pass filter (op-amp or transistors) on the line out jack or use a passive low-pass filter (capacitors and inductors) on the subwoofer amplifier output. Also you will have to create a device that will do delay and reverb effects for the rear channels.

I have not come up a way to only transfer a channel through a ladpa low-pass and delay filter using ALSA.
 
Old 01-06-2005, 07:40 AM   #9
BedriddenTech
Member
 
Registered: Aug 2003
Distribution: Slackware 9.1, 10; FreeBSD 5.2.1; Fedora Core 2; SuSE 9.1
Posts: 44

Original Poster
Rep: Reputation: 15
Why dont you post those settings on alsa-project.org? I was, like many others, searching for stuff like that before, that's why I posted my solution to this problem
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ALSA Sound Blaster Live! (emu10k1) surround 5.1 Kronoss Linux - Hardware 4 01-17-2005 12:04 PM
ALSA & surround sound *sigh* WillemB Linux - Hardware 1 08-31-2004 09:23 AM
ALSA Surround for EMU10K1 smehi Slackware 2 03-04-2004 10:44 AM
Alsa drivers, no surround vexer Linux - Software 2 11-01-2003 02:18 PM
How to use Surround soud with Alsa... The SIN Raven Slackware 5 10-27-2003 03:13 PM


All times are GMT -5. The time now is 12:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration