Linux Changing audio output
#1
Hi - I'm just planning to build HTPC based on AMD Hudson or similar - and there's HDMI output + S/PDIF audio output on this board.

I'd like to output audio to HDMI when watching any video (having HDMI cable connected to my TV set), but use S/PDIF when listening to a music - so it can be connected directly to an amplifier.
I only can see one place to configure this in XBMC - would such configuratoin be possible?
(I have more devices connected through HDMI to my TV, so I want audio to go through TV for any video, but I'd like to have my TV off when just listening to a music)

thanks
Reply
#2
would PulseAudio be the right answer?
Reply
#3
I guess it's - unfortunately - not possible.

There seems to be a "dual audio output" hack for xbmc (search the forum) .. but I guess there is no simple switch :-( I miss that feature like in DVBViewer where you have an "Audio A" and "Audio B" configuration that could be switched by simple key press.

I solved it with a "hardware solution" - Y-cable from the analog stereo output - one cable into TV (my TV supports HDMI Video in and, at the same time, analog Audio in), one into AV receiver..

Greetz

LAstCoder
HTPC Specs: Silverstone GD05B Case, ASUS P8H61-M LE/USB3, i5-3470S, GT1030, 8 GB RAM , 2 TB HDD, iHOS104 BluRay Drive, TT DVBS2-1600, Sony PS3 BD Remote control
PS3 BD Remote Control Daemon for Kodi/Linux
UNCHAINED Demo Group
Reply
#4
Thanks. Your hw solution unfortunatelly doesn't work for me ... :-(
I also found some suggestions about virtual sound card in Ubuntu sending the same signal to both outputs - but I had no time to try it out yet.

Or someone can write a simple(?) addon allowing quickly switching audio outputs by pressing a key - as you suggested :-)
Reply
#5
hm .. seems that PulseAudio has the ability to stream audio to more than one audio device at once:

http://en.wikipedia.org/wiki/PulseAudio
http://forums.opensuse.org/english/get-t...pulse.html

ArchWiki rockz again:

https://wiki.archlinux.org/index.php/Pul...log_Output

I'll have to try it ...
HTPC Specs: Silverstone GD05B Case, ASUS P8H61-M LE/USB3, i5-3470S, GT1030, 8 GB RAM , 2 TB HDD, iHOS104 BluRay Drive, TT DVBS2-1600, Sony PS3 BD Remote control
PS3 BD Remote Control Daemon for Kodi/Linux
UNCHAINED Demo Group
Reply
#6
something like that should help ... I'll try as soon as I can.

/etc/pulse/default.pa

load-module module-alsa-sink device=hw:0, sink_name=SPDIF sink_properties=device.description=SPDIF
load-module module-alsa-sink device=hw:0, sink_name=HDMI sink_properties=device.description=HDMI
load-module module-combine-sink slaves=SPDIF,HDMI sink_name=Combined resample_method=copy sink_properties=device.description=Combined
Reply
#7
Lightbulb 
Hi,

so, solved it !

simply apt-get install paprefs [Pulse-Audio preferences]

http://freedesktop.org/software/pulseaudio/paprefs/
... activate "virtual audio device for simultaneous playback on all devices", change XBMC audio settings to this device [after system reboot] .. and now I have simultaneous audio output over HDMI [TV] and amplifier Cool

Quite happy now, a next step to a maximum WAF Rofl

Greetz

Lastcoder
HTPC Specs: Silverstone GD05B Case, ASUS P8H61-M LE/USB3, i5-3470S, GT1030, 8 GB RAM , 2 TB HDD, iHOS104 BluRay Drive, TT DVBS2-1600, Sony PS3 BD Remote control
PS3 BD Remote Control Daemon for Kodi/Linux
UNCHAINED Demo Group
Reply
#8
cool ! :-)
Reply
#9
Have you guys tried this PA setup with pass through audio? Im currently using the dual audio patch to have simultaneous 2ch>HDMI + 2+5.1ch>S/PDIF. I know new versions of pulseaudio support pass through, although Im not sure if xbmc can do PA passthrough...but I havent had the time to try and Im curious to see if works as it looks like the dual audio patch will never become part of xbmc...
Reply

Logout Mark Read Team Forum Stats Members Help
Changing audio output0