LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
LinkBack Search this Thread
Old 01-12-2006, 07:09 AM   #31
Electro
Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled

Quote:
Originally Posted by JorisBurger
I found it!
This /etc/asound.conf file is ajusted for my 7.1 surround, but if you only have 5.1 surround then do the following:
  • change channels to 6
  • remove all refrences to the 7th an 8th channels (6 and 7) (the last 2 in all bindings and ttable)
  • remove s71
  • change 0.707945 to 1
  • change 0.501187 to 0.707945
  • change 0.501187 to 0.501187
  • set !default to whatever you want (except 71 ofcourse)
This way all upmixing go as they should without too loud channels because of multiple speakers.
(5.1 on my 7.1 sounds like in dolby's specifications because it creates fantom speakers between side and rear, which happens to be the place where the surround speakers in 5.1 should be.
Code:
pcm_slave.the_card{
        pcm "hw:0,0"
        rate 48000
        channels 8
        period_time 0
        period_size 4096
        buffer_time 0
        buffer_size 16384
}

pcm.dmix_part {
        type dmix
        ipc_key 1024
        ipc_key_add_uid false # let multiple users share
        ipc_perm 0660 # IPC permissions (octal, default 0600)
        slave "the_card"
        bindings {
                0 0
                1 1
                2 2
                3 3
                4 4
                5 5
                6 6
                7 7
        }
}

                #7.1 surround
pcm.s71 {
        type plug
        slave {
                pcm "dmix_part"
                channels 8
        }
        ttable.0.0 1
        ttable.1.1 1
        ttable.2.2 1
        ttable.3.3 1
        ttable.4.4 1
        ttable.5.5 1
        ttable.6.6 1
        ttable.7.7 1
}

ctl.s71 {
        type hw
        card 0
}

                #5.1 surround
pcm.s51 {
        type plug
        slave {
                pcm "dmix_part"
                channels 8
        }
        ttable.0.0 1
        ttable.1.1 1
        ttable.2.2 0.707945
        ttable.3.3 0.707945
        ttable.4.4 1
        ttable.5.5 1
        ttable.2.6 0.707945
        ttable.3.7 0.707945
}

ctl.s51 {
        type hw
        card 0
}

                #4.0 and 4.1 surround
pcm.s40 {
        type plug
        slave {
                pcm "dmix_part"
                channels 8
        }
        ttable.0.0 1
        ttable.1.1 1
        ttable.2.2 0.707945
        ttable.3.3 0.707945
        ttable.4.4 1
        ttable.5.5 1
        ttable.2.6 0.707945
        ttable.3.7 0.707945
}

ctl.s40 {
        type hw
        card 0
}

                #2.0 and 2.1 (Stereo)
pcm.s20 {
        type plug
        slave {
                pcm "dmix_part"
                channels 8
        }
        ttable.0.0 0.501187
        ttable.1.1 0.501187
        ttable.0.2 0.501187
        ttable.1.3 0.501187
        ttable.4.4 1
        ttable.5.5 1
        ttable.0.6 0.501187
        ttable.1.7 0.501187
}

ctl.s20 {
        type hw
        card 0
}

                #1.0 and 1.1(??) (Mono)
pcm.s10 {
        type plug
        slave {
                pcm "dmix_part"
                channels 8
        }
        ttable.0.0 0.354813
        ttable.0.1 0.354813
        ttable.0.2 0.354813
        ttable.0.3 0.354813
        ttable.0.4 0.354813
        ttable.5.5 1
        ttable.0.6 0.354813
        ttable.0.7 0.354813
}

ctl.s10 {
        type hw
        card 0
}

pcm.!default {
    type plug
    slave.pcm "s71"
}

ctl.!default {
        type hw
        card 0
}
You could add any custom device you want this way.
The above is wrong and you will not experience surround sound well. The best 5.1 sound is:
90% volume for front left and right
75% volume for rear left and right
100% volume for center
100% volume for subwoofer
This sets the vocals to the center with out using any special effects. If there are any explosions or a door opens occuring in the left or right channels, you will definately hear them even if people are talking which will be in the center. If directional speakers are used for rear speakers, they have to be pointed away from the listening area towards a sound diffusing material. It is recommended to use bipole speakers for the rears that are mounted on the back wall. If you are mounting rears to the sides, you need dipole speakers.

Setting up a 7.1 surround sound is different but the same volume settings that I mention above can be used. The side channels can be set to about 60% to 70% volume. The speakers have to be a dipole type, so using directional speakers pointed at a diffused material will not work well.

Most people that set surround sound system do not know that rear and side speakers should have null area effect towards the listening area. Bipole and dipole speakers was designed to do this. Also directing directional speakers (only for the rears on the back wall) away from the listening area, but towards a diffused material will work. The side and rear speakers should only create ambient sound. All rear and side speakers should be above ear level while standing.

There is no point to have an entry for mono because it will always output to two channels anyways.

Already tested ttable lines for 5.1 surround sound from two channel source:
ttable.0.0 0.90
ttable.1.1 0.90
ttable.0.2 0.75
ttable.1.3 0.75
ttable.0.4 0.50
ttable.1.4 0.50
ttable.0.5 0.50
ttable.1.5 0.50

Experimental ttable lines for 7.1 surround sound from two channel source:
ttable.0.0 0.90
ttable.1.1 0.90
ttable.0.2 0.75
ttable.1.3 0.75
ttable.0.4 0.50
ttable.1.4 0.50
ttable.0.5 0.50
ttable.1.5 0.50
ttable.0.6 0.70
ttable.1.7 0.70

Experimental ttable lines for 7.1 surround sound from 6 channel source:
ttable.0.0 1.00
ttable.1.1 1.00
ttable.2.2 1.00
ttable.3.3 1.00
ttable.4.4 1.00
ttable.5.5 1.00
ttable.2.6 0.90
ttable.3.7 0.90

ttables lines for 4.1 surround sound from two channel source:
ttable.0.0 1.00
ttable.1.1 1.00
ttable.1.2 0.85
ttable.0.3 0.85
ttable.4.4 0.00
ttable.0.5 0.50
ttable.1.5 0.50
 
Old 01-12-2006, 10:53 AM   #32
JorisBurger
LQ Newbie
 
Registered: Oct 2005
Location: The Netherlands
Distribution: Suse 10.0
Posts: 6

Rep: Reputation: 0
I don't have much experience in surround sound, but my idea was keep the volumes equal to the original and equal to all other sound. So I looked up decibel in Wikipedia and found a formula to convert sound intensity to decibel. I inserted intensity 1 in formula and got 240, then substracted 3 dB (because twice the same sound is 3 dB louder) and reversed the formula and got 0.7079, the same value they use to encode the center channel to the front left and right channels in dolby surround (according to Wikipedia on pro logic).
I did the same with 6 dB less and 9 dB less for 2.0 and 1.0 to get perfectly equal volumes (tested with speaker-test). Besides, Dolby's official speaker positioning graphs always show the 5.1 rear slightly behind the viewer and 7.1 rear more to the back with the sides at straight 90 degrees, so it sounds exactly as if I'd have a 5.1 setup. (This should also work in a theatre setup with speakers on the side walls to be side and speakers on the rear wall to be rear and in 5.1 they are always merged together)

Speaking of pro logic, my HP pavilion t3060.nl has a built in pro-logic IIx decoder I couldn't realy find any info on how to get that working, that would be a lot better then manual upmixing.

About the speakers. My system isn't realy the most perfect sound system the world, because I collected some (very) different speakers and amplifiers to fill all the audio connectors:
  • For front I have 2 normal (pretty good) desktop speakers.
  • For side I use the speakers of my stereo (or hifi, or cd/tape/radio player, how do you call those things) and amplify them with the stereo's 'video/aux' (Which is not directly connected to the computer but first to a switch box to choose between computer and tv (I have a very old tv that doesn't have a headphone connector)). These are full range speakers (with bass hole), and they are on two cabinets besides me (at ear level).
  • For rear I use the surround speakers that came with my stereo (it has a crapy custom 4.0 surround system), amplified with the amplifier of some spare desktop speakers (still in it's original housing (the speaker) for safety), these satalites are mounted on the wall above (standing) ear level. They slope a bit downwards and are mounted in the corner behind me so they still point directly to me.
  • Center and LFE is pretty much the same story as rear, but with (very old wooden, but very good) full range speakers, stacked behind my desk (LFE on the bottem and center right behind my monitor)(I first used the speakers under the monitor for center with a special (homemade) cable, but that made voices sound like computer voices). So that's also the reason I didn't send the stereo sound to LFE because it would sound like a very loud normal speaker, and I don't know of any bass management system or something.
The speakers are all ajusted to my seat with speaker-test so they sound equaly loud (but not all of the same sound ).

Last edited by JorisBurger; 01-12-2006 at 03:41 PM.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get 5.1/4.1 channel sound working (Alsa) ? Wynand1 Fedora 1 10-03-2005 12:42 AM
ALSA Gentoo amd64 nforce3 5.1 only sound through one channel necrophage Linux - Hardware 1 08-08-2005 09:44 AM
How to make 4/6-channel sound with ALSA? kornerr Linux - General 2 07-31-2005 03:19 AM
How to tell mplayer to use diff alsa channel? bruno buys Linux - Software 1 04-02-2005 09:48 AM
ALSA can only accept one channel natalinasmpf Linux - General 2 02-09-2004 01:53 AM


All times are GMT -5. The time now is 01:24 PM.

Main Menu
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