[LIVE] Dual audio out (analog+HDMI)?
#1
So, I have a slightly old fashioned setup using a plain 2.0 stereo amp for movie sound via a 3.5 mm TRS ("mini-jack/mini-stereo") to RCA adapter cable. Alternative to this, I can also route audio over HDMI directly to the TV, but with a rather plain sound experience as a result.

Thing is, I would be quite content with plain TV sound for everyday TV-series watching and it would be good not having to use the amp just to get sound at all, but XBMC only let's me choose one or the other (at least as far as I've been able to get).

The question:
Is the any way to somehow trick XBMC (or the underlying OS) to feed sound to both analogue and digital/HDMI out simultaneously?

EDIT:

If it's of any help/makes any difference :
Plain analogue headphone out is via "IDT92HD81 Audio Codec" (as from System specification)
Digital out is via "HDA Nvidia hdmi" (as presented in XBMC/System/Sound)
Reply
#2
Possibly not helpful, since I'm not able to answer your question directly... but can you split the audio in some way? Either use a (external?) sound card with multiple outputs, or something like Toslink out into some kind of splitter?
Reply
#3
Orclas Wrote:The question:
Is the any way to somehow trick XBMC (or the underlying OS) to feed sound to both analogue and digital/HDMI out simultaneously?

This should be possible by using a custom alsa sound device that duplicates a stream to two devices (i.e. iec958 and surround51) at the same time.

I don't know the deep details here, you need to dive into this topic for yourself.

This device needs to be set in the <audiodevice> tag in guisettings.xml then.

For example, if you want to use analog 5.1 output of your soundcard, you can use:

Code:
<audiodevice>alsa:surround51:CARD=SB</audiodevice>
with in the <audiooutput> tags.

(You can show your available devices with aplay -L)
Reply
#4
A patch has been developed that implements exactly this on Dharma - see this thread.
Reply
#5
Prof Yaffle Wrote:Possibly not helpful, since I'm not able to answer your question directly... but can you split the audio in some way? Either use a (external?) sound card with multiple outputs, or something like Toslink out into some kind of splitter?

Then I could just as well use a single => dual 3.5 mm adapter and split one analogue stream to the amp (3.5 mm to RCA) and one to the TV (3.5 mm to 3.5 mm line-in on TV). I do want to keep the number of cables down though and since the HDMI cable is already there...

Input much appreciated though Smile


chemical Wrote:This should be possible by using a custom alsa sound device that duplicates a stream to two devices (i.e. iec958 and surround51) at the same time.

I don't know the deep details here, you need to dive into this topic for yourself.

This device needs to be set in the <audiodevice> tag in guisettings.xml then.

For example, if you want to use analog 5.1 output of your soundcard, you can use:

Code:
<audiodevice>alsa:surround51:CARD=SB</audiodevice>
with in the <audiooutput> tags.

(You can show your available devices with aplay -L)

Thanks. I have no problem doing some digging into the topic myself, but as my Linux knowledge stand, I don't even quite know where to start. Your post is at least pointing me in the right direction Smile
HTPC: LibreELEC 7 on Shuttle XS35GTv2 & Raspberry Pi 3
NAS: NAS4Free 2x 3TB Raid1
Reply
#6
That patch looks very interesting ... didn't have time to read the entire thread, but it looks like it would be best to wait for the new Audio hotness before digging into that.

In the meantime, for Ubuntu (and I guess for Live too) here http://forum.xbmc.org/showthread.php?tid=70754 is a method of doing what you want with no XBMC modifications, changing just the Linux sound configuration setup.

I have used this on both my XBMC machines for a while. Works fine for me.
Reply
#7
"New Audio hotness" won't be in Eden and Will NOT support dual audio out.

Which means the Dual Audio Patch should be easily updated for Eden. (hurray)
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#8
Interesting again ... have not been keeping up with Eden features really, am quite happy with Dharma on a couple of nettops.

I had a browse of that dual audio thread. So sequence would be Eden comes out, dual audio patch dude patches the patch for Eden compatibility, we can apply that and remove asound.conf workaround for this sort of dual audio thing if we want to?

Not overly sure I want to though: possibly by accident (I sure didn't do it on purpose) with my alsa asound.conf configuration I already have HDMI, optical and analog audio out all working fine at the same time (Linux/eMachines 1401). Different sync on optical of course, but that's inevitable. If I want to listen to optical I turn off the volume on the TV, and so on.

What additional hotness would I get from the dual audio patch mechanism?
Reply
#9
Can the asound trick dump analog to one output and passthrough to another?
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
Reply
#10
darkscout Wrote:Can the asound trick dump analog to one output and passthrough to another?

Hmm. Dunno, it's over a year since I set it up.

I'm going to guess the answer is "no" but I'd have to check. It's quite possible that audio on optical is just PCM, the amp is super old and rescued from a skip.
Reply
#11
Thanks all for input.

When life permits again (work's killing me right now) I'll dig into setting it up.
HTPC: LibreELEC 7 on Shuttle XS35GTv2 & Raspberry Pi 3
NAS: NAS4Free 2x 3TB Raid1
Reply

Logout Mark Read Team Forum Stats Members Help
[LIVE] Dual audio out (analog+HDMI)?0