Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

  1. #1
    Join Date
    Apr 2007
    Beans
    20

    Post HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    There are a lot of HOWTOs which describe how to setup your 5.1 speakers/card, but none of them met my needs, nor they explained what they really did. So here is my little how to.

    For this HOWTO to work:
    1. your sound card should be working and it has to have analog output,
    2. you have to have 5.1 speakers,3. you have to use ALSA.

    1. First problem: When listening to stereo music there are 3 situations I encourted:
    1. only two front speakers work (center, woofer and rear don't work), or
    2. two front speakers, center and woofer work, or
    3. all six speakers work, but then it's not true stereo because the center speaker works, too.

    Solution:
    Create a .asoundrc in your home directory, type this in your console:
    in Ubuntu:
    Code:
    gedit ~/.asoundrc
    in Kubuntu:
    Code:
    kate ~/.asoundrc
    and paste this text in it:
    Code:
    pcm.!default {
        type route
        slave.pcm surround51
        slave.channels 6
        ttable.0.0 1
        ttable.1.1 1
        ttable.0.2 1
        ttable.1.3 1
        ttable.0.5 0.5
        ttable.1.5 0.5
    }
    save it and close it.

    Explanation:
    Whit this we replaced the default alsa device with our own. This basically copies:
    front-left -> rear-left,
    front-right -> rear right,
    0.5*front-left -> LFE (woofer)
    0.5*front-right -> LFE (woofer). The center speaker isn't used, because when you play stereo, you don't need it.

    If anyone is interested here is a more detailed explanation:

    #0=Front-left
    #1=Front-right
    #2=Rear-left
    #3=Rear-right
    #4=Center
    #5=LFE (woofer)
    ttable.0.0 1 (copy from front-left to front-left 100% of volume)
    ttable.1.1 1 (copy from front-right to front-right 100% of volume)
    ttable.0.2 1 (copy from front-left to rear-left 100% of volume)
    ttable.1.3 1 (copy from front-right to rear-right 100% of volume)
    ttable.0.5 0.5 (copy from front-left to LFE 50% of volume)
    ttable.1.5 0.5 (copy from front-right to LFE 50% of volume)

    Start your mp3 player and start playing a stereo mp3 file. You should here music on all speakers except the center one. You don't have to configure anything, because all the players will use alsa default device, which we modified. If you previously selected another device in your player (like for instance "surround51" or "plug:surround51"), just select default (in alsa plugin).

    -----------------

    2. Second problem: While playing AC3/DTS 5.1 movies, only 2 front speakers are working.

    Solution:
    For this to work, you just have to configure your video player.
    Here are some of the player's configurations:

    Mplayer (Updated)
    Mplayer will automatically select the best output if you select driver default in the alsa plugin:
    Preferences->Audio, Select alsa, Configure driver;
    for Device select driver default.

    Xine and derivates
    I recommend Xine player and other players that use xine engine (Kaffeine), because xine can use different alsa devices for different audio files.
    Open Xine Settings->Setup (or in Kaffeine Settings->xine engine parameters), go to audio and configure these parameters:
    driver: alsa
    Speaker arrangement: 5.1 surround
    device used for mono output: default
    device used for stereo output: default
    device used for 5.1-channel output: plug:surround51:0
    Push OK, and everything is setup.

    VLC
    In VLC Settings->Preferences, Audio->Output modules (enable Advanced otpions), for Audio output module select ALSA audio output; then in Output modules select go to ALSA, and make sure that for Default is selected fo ALSA Device Name.


    When playing a stereo file, you don't have to do anything, because VLC automatically selects stereo output, but when playing a 5.1 surround movie, while the movie is playing you have to select: Audio->Audio Device->5.1 (every time you stop and start the playback, you have to do this again).

    Other mp3 players(XMMS, Audacious)
    Just select the ALSA output plugin and make sure that the alsa device selected is default.

    That's the end of this HOWTO, I hope it helps someone out there




    Changelog:
    15.08.2008. Changed configuration of Mplayer
    Last edited by kustodian; August 15th, 2008 at 11:12 AM. Reason: Updated configuration of Mplayer

  2. #2
    Join Date
    Jun 2008
    Location
    Gods own country
    Beans
    10
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Thanks yaar... Man i have been looking for this... Awesome... Cool keep up the good work dude

  3. #3
    Join Date
    Apr 2006
    Location
    Brisbane, Australia
    Beans
    19
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    hey, im still not able to get 5.1 with vlc. When the movies playing there's no 5.1 option in audio device.

    anyone know why this is?

  4. #4
    Join Date
    Apr 2007
    Beans
    20

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Quote Originally Posted by toemos View Post
    hey, im still not able to get 5.1 with vlc. When the movies playing there's no 5.1 option in audio device.

    anyone know why this is?
    The movie must have 6 channel audio, like AC3, DTS or AAC. If it's stereo the option doesn't appear

  5. #5
    Join Date
    Oct 2005
    Location
    Finland
    Beans
    103
    Distro
    Ubuntu 13.04 Raring Ringtail

    Lightbulb Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Quote Originally Posted by kustodian View Post
    Mplayer
    I don't recommend you to use this player for watching stereo movies, because you will always have to change settings for thestereo/5.1 to work correctly
    You don't have to change settings if you put a line ac=hwac3, in your ~/.mplayer/config. That line means that mplayer will try to output AC3 first, and if there is none, then it falls back to stereo. Remember the comma after hwac3!

  6. #6
    Join Date
    Apr 2007
    Beans
    20

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Quote Originally Posted by glaze View Post
    You don't have to change settings if you put a line ac=hwac3, in your ~/.mplayer/config. That line means that mplayer will try to output AC3 first, and if there is none, then it falls back to stereo. Remember the comma after hwac3!
    This didn't work for me, I just got bad sound for movie with AC3, but I found a solution to this.
    You don't have to change anything in settings, look it up in the how to, just made the change

  7. #7
    Join Date
    Sep 2008
    Location
    Sibiu, Romania
    Beans
    9
    Distro
    Kubuntu

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    I created the .asoundrc and after a reboot i get a message that : xine was unable to initialize any audio drivers. and i don't get any sound at all.
    I have a creative audigy ls sound card and system setting is recognized as CA0106. I'm using Kubuntu 8.04.

  8. #8
    Join Date
    Apr 2007
    Beans
    20

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Quote Originally Posted by d.marcu View Post
    I created the .asoundrc and after a reboot i get a message that : xine was unable to initialize any audio drivers. and i don't get any sound at all.
    I have a creative audigy ls sound card and system setting is recognized as CA0106. I'm using Kubuntu 8.04.
    This "How to" is primarily for EMU10K1 driver, and you have Audigy LS which doesn't have this chip, it has Ca0106

  9. #9
    Join Date
    Aug 2008
    Beans
    100

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Hi there. I'd like to say that this worked because i am using a 5.1 channel (not digital, analogue, the coloured plug) and it's working great. All 5 speakers are working great and soudns great on youtube. It's a shame Ubuntu volume section can't enable 5.1 by default. But thanks!!

  10. #10
    Join Date
    May 2007
    Location
    Netherlands
    Beans
    321
    Distro
    Xubuntu 10.10 Maverick Meerkat

    Re: HOWTO: (ALSA) Stereo music and 5.1 surround on 5.1 speakers

    Quote Originally Posted by kustodian View Post
    This "How to" is primarily for EMU10K1 driver, and you have Audigy LS which doesn't have this chip, it has Ca0106
    I have a Create SoundBlaster Live! 24 bit, however, lspci says it's an Audigy (Windows does the same too, even though I installed the latest driver for Live! 24 bit) and it only works with (s)mplayer. No sound for Audacious, flash and any other application.

    Any idea how to solve it? Once I rename the .asoundrc file, I have sound again but only on two speakers and not 4.
    Throw Apples out the Windows, but make sure not to hit the Penguin.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •