Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Alsa routing of center of LFE
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
halfgaar
l33t
l33t


Joined: 22 Feb 2004
Posts: 781
Location: Netherlands

PostPosted: Sat Jun 26, 2004 8:41 pm    Post subject: Alsa routing of center of LFE Reply with quote

To my suprise, I noticed that when mplayer gets the order to play in surround sound, it actually plays in surround sound. I thought I was never gonna get anything more than a mirror of the frontspeakers out of my rear speakers in Linux :). Anyway, I do have problem.

I need the front and subwoofer channels mixed in front left and front right, because I have a 4.0 setup and my frontspeakers can act as decent subwoofers. When mplayer is ordered to play into 4 channels, it routes the center to front, but ignores the LFE (subwoofer). When ordered to play in 6 channels, the center and LFE are both ignored. Now, I can fix mplayer to properly route the LFE channel, but a better setup would be to have ALSA route the center and LFE the way I want, so that all apps which use 6 channel setup have proper sound. As I understand it, this can be done by modifing asound.conf, by adding routes. The problem is, I'm completely confused how to go about this.

I need the following: mix 50% of center in left and 50% of center in right. The same goes for the LFE channel. How do I modify the asound.conf for this? This is my surround51 configpart (as assume it should be added here):

Code:

EMU10K1.pcm.surround51.0 {
    @args [ CARD ]
    @args.CARD {
        type string
    }
    type multi
    slaves [
        {
            pcm {
                @func concat
                strings [

                    "cards.EMU10K1.pcm.front.0:CARD=" $CARD
                ]
            }
            channels 2
        }
        {
            pcm {
                @func concat
                strings [
                    "cards.EMU10K1.pcm.rear.0:CARD=" $CARD
                ]
            }
            channels 2
        }
        {
            pcm {
                @func concat
                strings [
                    "cards.EMU10K1.pcm.center_lfe.0:CARD=" $CARD
                ]
            }
            channels 2
        }
    ]
    bindings [
        { slave 0 channel 0 }
        { slave 0 channel 1 }
        { slave 1 channel 0 }
        { slave 1 channel 1 }
        { slave 2 channel 0 }
        { slave 2 channel 1 }
    ]
    type route
}


Thanks
Back to top
View user's profile Send private message
halfgaar
l33t
l33t


Joined: 22 Feb 2004
Posts: 781
Location: Netherlands

PostPosted: Sat Jun 26, 2004 10:43 pm    Post subject: Reply with quote

I'm almost there. There was a big error in my configuration. My /etc/asound.conf was the same as /usr/share/alsa/cards/EMU10k1.conf, which was useless. My asound.conf is now like this:

Code:

pcm.surround6 {
    type route
    slave.pcm surround51
    ttable.0.0 1
    ttable.1.1 1
    ttable.2.2 1
    ttable.3.3 1
    ttable.4.0 0.5
    ttable.4.1 0.5
    ttable.5.0 0.5
    ttable.5.1 0.5
}


When I start mplayer with "mplayer -ao alsa1x:surround6 filewithac3stream.avi" it works perfectly. But, this still requires special application setup. Is there a way to call pcm.surround6 pcm.surround51, without causing a conflict (it can't be called pcm.surround51 because it already exists)?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum