Kodi Community Forum

Full Version: Simultaneous audio output on two devices (XBMCBuntu Frodo Rc3)?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
In Settings > System > Audio output I can choose "HDA NVidia, MEI PANASONIC-TV on HDMI" to get audio through HDMI to my TV or "HDA ATI SB, ALC889A Analog" to get audio through the analog stereo jack to my stereo amplifier.

My question is if it's possible to get audio on both devices simultaneously? Sometimes I just want to stream music to my amplifier (through XBMC/AirPlay). It would be nice if I could do that without having to turn on the TV and change audio output device in XBMC.

It that's not possible, is there a way to change audio output device with a one button press on the keyboard/remote?

I'm using XBMCBuntu Rc3 (Frodo).
Is there a way to get this working with the raspberry pi? If not, what would be the best way to "request" it?
(2013-01-26, 15:01)uNiversal Wrote: [ -> ]The wiki is your friend.


Thanks, I thought I read somewhere that asound.conf/.asoundrc wouldn't work with Frodo/AE so I didn't even bother to try (until now).

Tried the asound.conf in the first post in this thread, but I can't get it to work.

This is my "aplay -l" output:
**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: ALC889A Analog [ALC889A Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: SB [HDA ATI SB], device 1: ALC889A Digital [ALC889A Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

This is my .asoundrc file. Hardware settings at the bottom. If I set HDMI to card 1 and device 3 I only get analog output when I select "Default" or "both_digital" in XBMC. If I change HDMI settings to card 1 and device 7, none of the devices created in .asoundrc (default, mutli, both_digital) shows up in XBMC.

# Dual Audio - HDMI (5.1) + Stereo
# This was tricky.
# Currently it works but sounds very very scratchy - not usable
# Modify the bottom 2 things for your hardware

pcm.!default {
        type plug
        slave {
                pcm "both_digital"

# First we create a 'both' route, that has 12 channels
pcm.both_digital {
        type route
        slave {
                pcm multi
                channels 12
        # And we route the channels 1:1
        # 6 inputs (0-5) get mapped into 12 outputs (0-11)
        # (this is how we copy channels)
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.2.2 1.0
        ttable.3.3 1.0
        ttable.4.4 1.0
        ttable.5.5 1.0
        ttable.0.6 1.0
        ttable.1.7 1.0
        ttable.2.8 1.0
        ttable.3.9 1.0
        ttable.4.10 1.0
        ttable.5.11 1.0

# Then define a multi device that splits the 12-channel input
# Into 2x 6 output

pcm.multi {
        type multi
        slaves.a {
                pcm "hdmi_hw"
                channels 6
        slaves.b {
                # virtual dac still has 6 channels
                # although I suppose I could try making it 2
                pcm "dac_virtual"
                channels 6

        # Bind stuff to the HDMI outputs
        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave a
        bindings.2.channel 2
        bindings.3.slave a
        bindings.3.channel 3
        bindings.4.slave a
        bindings.4.channel 4
        bindings.5.slave a
        bindings.5.channel 5

        # And to the DAC outputs
        bindings.6.slave b
        bindings.6.channel 0
        bindings.7.slave b
        bindings.7.channel 1
        bindings.8.slave b
        bindings.8.channel 2
        bindings.9.slave b
        bindings.9.channel 3
        bindings.10.slave b
        bindings.10.channel 4
        bindings.11.slave b
        bindings.11.channel 5

# Since the DAC is 2 channels, we downmix.
  type route
  slave.pcm dac_hw
  slave.channels 2

  # Front and rear, at 33% of original signal strength
  ttable.0.0 0.33
  ttable.1.1 0.33
  ttable.2.0 0.33
  ttable.3.1 0.33

  # Center channel routing (routed to front-left and front-right),
  # 6dB gaindrop (gain half of main channels) per channel
  ttable.4.0 0.16
  ttable.4.1 0.16

  # LFE channel routing (routed to front-left and front-right),
  # 6dB gaindrop (gain half of main channels) per channel
  ttable.5.0 0.16
  ttable.5.1 0.16

# And here is my actual hardware
# HDMI output
pcm.hdmi_hw {
        type hw
        card 1
        device 3
        channels 6

# Analog output
pcm.dac_hw {
        type hw
        card 0
        device 0
        channels 2

Anyone smarter than me that can help me figure out what I'm doing wrong? Maybe I could use a simpler asound configuration file since I only want stereo output?