Kodi Community Forum

Full Version: Changing audio output
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
would PulseAudio be the right answer?
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
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 :-)
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 ...
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
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
cool ! :-)
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...