[LINUX] HOW-TO get Digital Audio Pass-Through Output working on Linux with XBMC
#31
draggy Wrote:I wanted to add my experience and thank the OP for this awesome thread!

Following the directions in Ubuntu 10.10 produced the expected results. I could get audio and passthrough, but no menu sounds. Also Mupen64Plus did not work at all after removing pulse (it didn't have sound in the first place).

The magic touch was this:
Code:
sudo apt-get install libsdl1.2debian-alsa
Note: Installing that will also remove libsdl1.2debian-pulseaudio

But once libsdl1.2debian-alsa was installed, mupen64plus worked, and so did all of the xbmc menu sounds, as well as mp3s, and digital passthrough. Amazing!!!!



Under Ubuntu 10.10, here were my steps to get my SPDIF passthrough (to hdmi) working with all sounds:
removed ~/.asoundrc
sudo apt-get purge pulseaudio gstreamer0.10-pulseaudio
sudo apt-get autoremove
sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss linux-sound-base alsamixergui
sudo apt-get install esound esound-clients esound-common libesd0 gnome-alsamixer
sudo apt-get install libsdl1.2debian-alsa

reboot

run gstreamer-properties
Plugin: alsa
Device: default

xbmc settingsOptical/Coax
Audio Device: Defaults
Audio Passthrough: plughw:0,0

THANK YOU!
With that magic line: sudo apt-get install libsdl1.2debian-alsa
I got HDMI menu Sounds!

My setup: Zotac h55-xti. Ubuntu 10.04
HDMI 5.1 movie and menu sounds on XBMC and ubuntu sounds as well
(HDMI goes to Onkyo TX-SR508 receiver. directly to TV (samsung 40'') I only hear surround sounds with 5.1 settings. have to set 2.0 on XBMC obviously)

What I did:

sudo apt-get purge pulseaudio gstreamer0.10-pulseaudio
sudo apt-get autoremove
sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss linux-sound-base alsamixergui
sudo apt-get install esound esound-clients esound-common libesd0 gnome-alsamixer
Set default alsa on gstreamer-properties
XBMC config: 5.1 HDMI. Audio Device: Default. Passthrough: HDMI
But HDMI audio not working on ubuntu 10.04 (it worked on 11.04 though)
So I did an ALSA Upgrade with this: http://ubuntuforums.org/showthread.php?t=1681577
I then got XBMC movie sounds and Ubuntu intro sounds working, but no Menu sounds.
got the .asoundrc with pcm.dmixer and pcm.!default lines: http://pastebin.com/0xbrkAye
explained here: http://wiki.xbmc.org/index.php?title=XBM...ecific_FAQ
Then the magic line: sudo apt-get install libsdl1.2debian-alsa
reboot

BINGO!

Hope it helps people using this motherboard or strugling with Ubuntu Digital 5.1 sound

Edit Note:
I made some further testing and I realized that:
- menu sounds are not enabled without the .asoundrc
- if you put pasthrough in HDMI you get a delay of 1 or 2 seconds everytime you play or fastforward
- if you set pasthrough to plug:dmixer you get only delay the first time (probably because the Amplifier changes to DTS) and then you can fastforward without delays.
- you never hear the XBMC intro audio because its inside the delay time.
- I don't get audio if I open xbmc while another app is using audio (like firefox)
- If I am playing a Movie and try to use firefox audio I get static (but when am I going to do that?)
- Other than that everything is good. No weird sounds when playing, fastforwarding, changing sources: MP3, DTS, Dolby or anything like that.
Reply
#32
Hello

i have a motherboard asus at3iont-deluxe i configure alsa 1.0.24 but haven't 5.1 surraund.
I add this line options

snd-hda-intel model=3stack-6ch-dig

in alsa-base.conf but have always 2.1 surraund (front,left and LFE).
The strange thing is my surraund amp Yamaha 5630 with a simple dvd player have 5.1 and the amp write "digital".
But with my HTPC my amp write "Pcm" and have 2.1
The cable is optical cable.
What is wrong?

Sorry for my bad English

Bye
Reply
#33
@fabridelo: did you actually read my first post in this topic?
Reply
#34
Hello

I read your fist post

I partly solved, now in Vlc i have front,center and rear but no dolby 5.1.
In xbmc I ear only effect on front and rear when to flag 5.1
and good when flag 2.1 but no surraund.
but no have a solution any suggestion?

bye
Reply
#35
Bump Smile

Apparently (according the bug on pulseaudio's bug tracker) the passthrough code was added a week ago (7 days ago today according to the tracker)

Hopefully we will see this come downstream soon and we wont have to stuff around, im in a position right now where i have to choose between OS and menu sounds (including TVtunes) and having no passthrough (hence all HD audio fails) or have all files play, but no OS or menu audio.

In a way im lucky, cause pulseaudio didnt work properly with my card, so i can specify the hardware as a custom interface without pulse locking it out Smile

FYI - I'm using a Shuttle XS35GTv2 w/ Fedora 15, it seems to recognise the HDMI audio as 4 different pieces of hardware....

PS - Heres the link to the tracker if anybody wanted to see. Funny its been open for 4-5 years, but the second it gives me trouble and i do some research, its just been fixed! Laugh
http://www.pulseaudio.org/ticket/167
Reply
#36
fabridelo Wrote:Hello
In xbmc I ear only effect on front and rear when to flag 5.1
Don't understand the problem exactly. There are 3 speakers in the front and two on the rear in a 5.1 setup. And you have sound from the front AND the rear? That's exactly what Dolby Surround 5.1 is supposed to do.
Reply
#37
Ezzemo Wrote:THANK YOU!
With that magic line: sudo apt-get install libsdl1.2debian-alsa
I got HDMI menu Sounds!

My setup: Zotac h55-xti. Ubuntu 10.04
HDMI 5.1 movie and menu sounds on XBMC and ubuntu sounds as well
(HDMI goes to Onkyo TX-SR508 receiver. directly to TV (samsung 40'') I only hear surround sounds with 5.1 settings. have to set 2.0 on XBMC obviously)

What I did:

sudo apt-get purge pulseaudio gstreamer0.10-pulseaudio
sudo apt-get autoremove
sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss linux-sound-base alsamixergui
sudo apt-get install esound esound-clients esound-common libesd0 gnome-alsamixer
Set default alsa on gstreamer-properties
XBMC config: 5.1 HDMI. Audio Device: Default. Passthrough: HDMI
But HDMI audio not working on ubuntu 10.04 (it worked on 11.04 though)
So I did an ALSA Upgrade with this: http://ubuntuforums.org/showthread.php?t=1681577
I then got XBMC movie sounds and Ubuntu intro sounds working, but no Menu sounds.
got the .asoundrc with pcm.dmixer and pcm.!default lines: http://pastebin.com/0xbrkAye
explained here: http://wiki.xbmc.org/index.php?title=XBM...ecific_FAQ
Then the magic line: sudo apt-get install libsdl1.2debian-alsa
reboot

BINGO!

Hope it helps people using this motherboard or strugling with Ubuntu Digital 5.1 sound

Edit Note:
I made some further testing and I realized that:
- menu sounds are not enabled without the .asoundrc
- if you put pasthrough in HDMI you get a delay of 1 or 2 seconds everytime you play or fastforward
- if you set pasthrough to plug:dmixer you get only delay the first time (probably because the Amplifier changes to DTS) and then you can fastforward without delays.
- you never hear the XBMC intro audio because its inside the delay time.
- I don't get audio if I open xbmc while another app is using audio (like firefox)
- If I am playing a Movie and try to use firefox audio I get static (but when am I going to do that?)
- Other than that everything is good. No weird sounds when playing, fastforwarding, changing sources: MP3, DTS, Dolby or anything like that.

This ended up working for me as well in 11.04 but now in Ubuntu there is no speaker or sound module. Sounds still works, I just can't adjust volume. Any answers why?

Thanks!
Reply
#38
Quote:@Asphalt

This ended up working for me as well in 11.04 but now in Ubuntu there is no speaker or sound module. Sounds still works, I just can't adjust volume. Any answers why?

Thanks!

Y used this to get the volume bar in ubuntu desktop:
http://howto.blbosti.com/2010/04/ubuntu-...ulseaudio/

I'm glad the last thing worked.
Ezzemo
Reply
#39
Ok.. so used this guide to get my DD & DTS passthru working under 64bit oneiric... thanks for the post xbmcuser01

Only thing I am still struggling with is the menu sounds. When I follow the rest of the advice, i cannot install the esound libs as it looks as if it wants to put pulseaudio bits back. So I've omitted them and carried on and even run the magaic line.

But alas.. with or without the .asoundrc file I still cant get the menu sounds.


Any other suggestions?
Reply
#40
After removing pulse, messing around with .asoundrc and alsamixer:

sudo apt-get install libsdl1.2debian-alsa

was the missing piece for me. Menu sounds, AC3 & DTS all working over HDMI now. Perfect! Smile
XBMC Eden / Maverick Meerkat (Ubuntu 10.10)
Acer AspireRevo 3610 (Atom N330/ION/4GB RAM+500GB HD), PS3 BD Remote, HDMI to Vizio M320VT
Reply
#41
Blegh.. I really dont want to go back to an older build of Ubuntu Sad

Is your .asoundrc file the same as the others around here? And you just stick it in your ~ folder right?
Reply
#42
Laugh WOOT!!!! I got my menu sounds!!!! Laugh

added this for my .asoundrc file

Code:
pcm.!default {
        type plug
        slave {
                pcm "iec958"
        }
}

I did all the suggestions in the previous posts.. but the magic card for me was the contents of my .asoundrc file

So now I got AC3, DTS and some stero menu sounds all rocking through my optical port under Ubuntu 11.10
Reply
#43
Thumbs Up 
Thanks xbmcuser01!

After hours searching i around different forums my problem is solved.
Works nicely for both system sound music and pass-trough on 11.10.
Reply
#44
https://help.ubuntu.com/community/SoundT...gProcedure

running the commands listed there for my distro i was able to get optical out working properly

without running those commands i could only ever get 2 of the 3 audios i needed (XBMC digital, XBMC analog, Ubunutu audio).

tested and working on 10.04 LTS

no file changes needed for me. but it is a large total download (150+MB)
iOS XBMC users PLEASE use the advanced search function before starting a new thread. Make sure to click on 'XBMC for iOS Specific Support' so your results are narrowed down correctly.

Please make sure to visit the Sticky section for common issues/questions/etc. Also, XBMC for iOS information
Reply
#45
It worked perfectly for me. I'm using the XBMCbuntu 11.00 running on a netbook HP DM13260 with a "USB 2.0 External Sound Card Box with 7.1-Speaker SPDIF Optical Output". This external USB sound card is a cheap one using the CM6206 (cm106) integrated circuit.

It was not passing the sound though SPDIF optical connector, but after executing the command lines explained by user draggy, it worked perfectly for me!

I just did the below:
-------------------------------------
sudo apt-get purge pulseaudio gstreamer0.10-pulseaudio
sudo apt-get autoremove
sudo apt-get install alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss linux-sound-base alsamixergui
sudo apt-get install esound esound-clients esound-common libesd0 gnome-alsamixer
sudo apt-get install libsdl1.2debian-alsa

reboot
--------------------------------------

And then changed at Settings->System->"Audio Output" on both "Audio Output Device" and "Passthough Output Device" to:
USB Sound Device - IEC958 - 0 (Alsa)
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO get Digital Audio Pass-Through Output working on Linux with XBMC2