Page 1 of 11 123 ... LastLast
Results 1 to 10 of 101

Thread: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomeness)

  1. #1
    Join Date
    Oct 2005
    Beans
    44

    Talking Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomeness)

    Here is the update to the old thread that somehow disappeared "HOWTO: A52 Encoded 5.1 Surround Sound Awesomeness with PulseAudio and ALSA on Hardy" thread (archived here). See also this bug report.

    There are two steps here: add the a52 plugin, and tell pulseaudio to use it.

    Step 1:
    Go to a terminal and do the following:
    Code:
    sudo bash
    echo "pcm.a52 {
      @args [CARD]
      @args.CARD {
        type string
      }
      type rate
      slave {
        pcm {
          type a52
          bitrate 448
          channels 6
          card $CARD
        }
      rate 48000 #required somehow, otherwise nothing happens in PulseAudio
      }
    }
    " > /etc/asound.conf
    cd /tmp
    apt-get source libasound2-plugins
    apt-get build-dep libasound2-plugins
    apt-get install libavcodec-dev
    cd alsa-plugins-*
    ./configure
    make
    cd a52/.libs
    cp libasound_module_pcm_a52.la libasound_module_pcm_a52.so /usr/lib/alsa-lib/
    cd /tmp
    rm alsa-plugins-* -rf
    Step 2:
    Either reboot or type the following (while still root):
    Code:
    alsa reload
    killall pulseaudio
    Pulse should come back on its own unless you disabled autospawn.

    Now pulse should be aware of your digital surround output. Go to System -> Preferences -> Sound. Click on the "Hardware" tab and change the profile to one of the 'Digital Surround 5.1' profiles. Play some sound (I like to test with www.pandora.com) and enjoy!

    If it doesn't show up, it probably means that alsa didn't create it correctly. To test if alsa sees the a52 device, type:
    Code:
    aplay -D a52:0
    If it errors out (audio open error: No such file or directory) then that means it did not like your asound.conf settings. You might learn something by looking at the output of 'sudo alsa reload' or just 'aplay'.

    To see if it works, you can test with this command:
    Code:
    speaker-test -Da52:0 -c6
    One other useful debug tool is to disable autospawn in /etc/pulseaudio/client.conf (uncomment the autospawn line) and kill pulseaudio. Then if you run 'pulseaudio -vv' you can see what pulse is doing. Change the number of 'v's for more information.

    Always double check alsamixer if things seem weird.
    Last edited by oblib; November 3rd, 2010 at 03:00 AM. Reason: remove false advice on aplay -L, bold last instruction :)

  2. #2
    Join Date
    Nov 2010
    Beans
    3

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    This seems to be exactly what I'm looking for but I'm unsure as to whether I am to replace CARD with the card number, name or hw:0 or what? Also unsure as to whether all instances need to be replaced.

    --
    craig

  3. #3
    Join Date
    Jan 2009
    Beans
    2

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    oblib! You are amazing! Your instructions worked perfectly for my ALC888 on-board sound connected via s/pdif (optical) to my Yamaha.

    I followed your instructions verbatim on a freshly installed Ubuntu 10.10. 1 reboot later, digital 5.1 working.

    You have really made my day! I hope you are enjoying the beverage of your choice right now!

    -Mike

  4. #4
    Join Date
    Nov 2010
    Beans
    3

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    Still no joy here. If I leave the asound.conf file verbatim as above, I do see the 5.1 surround setting appear in my pulseaudio configuration, but attempting to play any sound with either audacious or xine simply crashes pulseaudio & alsa. I have to do a alsa reload & kill pulseaudio & let it respawn. But still no sound.

    Trying these items before crashing pulseaudio:

    aplay -D a52:0 gives no errors (or any output at all)

    speaker-test -D a52:0 -c6 likewise gives no errors, but produces no sounds.

    syslog does show these errors:

    Nov 2 06:32:09 sirguy pulseaudio[2258]: module-alsa-card.c: Failed to find a working profile.
    Nov 2 06:32:09 sirguy pulseaudio[2258]: module.c: Failed to load module "module-alsa-card" (argument: "device_id="1" name="pci-0000_04_00.1" card_name="alsa_card.pci-0000_04_00.1" tsched=yes ignore_dB=no card_properties="module-udev-detect.discovered=1""): initialization failed.

  5. #5
    Join Date
    Nov 2010
    Beans
    3

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    Alright,I figured out that the alsa side of thing WAS working.. after enabling the digital output in the alsamixer, I could hear the 5 speaker test fine. However, pulse audio still crashes if set to the new setting of Digital 5.1 surround.

    Using audacious as my player, I am able to get SOME files to play directly to ALSA & I do hear 5.1 output there.. I gather that is a file-specification issue on the files that will not play.

    I really would like to get pulse-audio to use the new setting though. Appreciate any follow-up ideas any one might have.

  6. #6
    Join Date
    Oct 2005
    Beans
    44

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    I've bolded the final advice I had, to check alsa mixer settings. craigcoffman, your next step should be to tell pulse to stop autospawning and run it verbosley from the terminal. See the second to last tip on how to do that. Hopefully pulse will tell you why it's crashing before it crashes.

  7. #7
    Join Date
    Oct 2010
    Beans
    17

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    i tried to follow your guide;but it informed me the need to download 29MB file.when i pressed 'y' and enter,the process aborted.and now after rebooting ubuntu has no sound at all.please help me.thanks in advance

    here is the terminal response:

    Code:
    root@som-laptop:~# echo "pcm.a52 {
    >   @args [CARD]
    >   @args.CARD {
    >     type string
    >   }
    >   type rate
    >   slave {
    >     pcm {
    >       type a52
    >       bitrate 448
    >       channels 6
    >       card $CARD
    >     }
    >   rate 48000 #required somehow, otherwise nothing happens in PulseAudio
    >   }
    > }
    > " > /etc/asound.conf
    root@som-laptop:~# cd /tmp
    root@som-laptop:/tmp# apt-get source libasound2-plugins
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Picking 'alsa-plugins' as source package instead of 'libasound2-plugins'
    NOTICE: 'alsa-plugins' packaging is maintained in the 'Bzr' version control system at:
    https://code.launchpad.net/~ubuntu-core-dev/alsa-plugins/ubuntu
    Please use:
    bzr get https://code.launchpad.net/~ubuntu-core-dev/alsa-plugins/ubuntu
    to retrieve the latest (possibly unreleased) updates to the package.
    Need to get 474kB of source archives.
    Get:1 http://in.archive.ubuntu.com/ubuntu/ lucid/main alsa-plugins 1.0.22-0ubuntu6 (dsc) [2,181B]
    Get:2 http://in.archive.ubuntu.com/ubuntu/ lucid/main alsa-plugins 1.0.22-0ubuntu6 (tar) [456kB]
    Get:3 http://in.archive.ubuntu.com/ubuntu/ lucid/main alsa-plugins 1.0.22-0ubuntu6 (diff) [15.5kB]
    Fetched 474kB in 1min 13s (6,417B/s)                                           
    sh: dpkg-source: not found
    Unpack command 'dpkg-source -x alsa-plugins_1.0.22-0ubuntu6.dsc' failed.
    Check if the 'dpkg-dev' package is installed.
    E: Child process failed
    root@som-laptop:/tmp# apt-get build-dep libasound2-plugins
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Picking 'alsa-plugins' as source package instead of 'libasound2-plugins'
    The following NEW packages will be installed:
      autotools-dev build-essential cvs debhelper diffstat dpkg-dev g++ g++-4.4
      gcc-4.4-multilib gcc-multilib gettext html2text intltool-debian lib64asound2
      lib64asound2-dev lib64gcc1 lib64gomp1 libasound2-dev libavahi-client-dev
      libavahi-common-dev libc6-amd64 libc6-dev-amd64 libdbus-1-dev libglib2.0-dev
      libice-dev libjack-dev libmail-sendmail-perl libpthread-stubs0
      libpthread-stubs0-dev libpulse-dev libsamplerate0-dev libsm-dev libspeex-dev
      libspeexdsp-dev libstdc++6-4.4-dev libsys-hostname-long-perl libx11-dev
      libxau-dev libxcb1-dev libxdmcp-dev libxt-dev po-debconf quilt
      x11proto-core-dev x11proto-input-dev x11proto-kb-dev xtrans-dev xz-utils
      zlib1g-dev
    0 upgraded, 49 newly installed, 0 to remove and 0 not upgraded.
    Need to get 29.5MB of archives.
    After this operation, 84.6MB of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    Abort.
    please help me.there is no sound at all.i just now want to get back the sound.is it possible?or do i have to go for a fresh install?

  8. #8
    Join Date
    Oct 2005
    Beans
    44

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    som21, try deleting the asound.conf file and rebooting.
    Code:
    sudo rm /etc/asound.conf
    That's the only system change you made, otherwise I can't imagine what went wrong.

  9. #9
    Join Date
    Oct 2010
    Beans
    17

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    ok;i'll try and let you know.but why did it abort?any idea?

  10. #10
    Join Date
    Oct 2010
    Beans
    17

    Re: Finally: Digital AC-3 surround sound with pulseaudio (aka Surround Sound Awesomen

    ok;i'll try and let you know.but why did it abort?any idea?

Page 1 of 11 123 ... 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
  •