[LINUX/MAC/WINDOWS] Multiple Sound Outputs Possible?
#1
Question 
I have xbmc running hdmi out to my main receiver. I have another receiver that is used to power two other audio zones in my house. Is it possible to configure xbmc to send the audio out multiple outputs? In other words, if I got another sound card, would I be able to configure things to send the audiot to both receivers or is this a windows limitation? Might not truly be an xbmc question, but if anyone has done this please let me know how? I tried using the coaxial output on my sound card and putting a splitter in the line to send the signal to both receivers, but it seemed to crash things.
Gigabyte Mobo Integrated Nvidia 8200
AMD Athlon 64 X2 6000+ (3.1 Ghz)
4 GB Ram
Windows XP SP3
HDMI Video & SPDIF Audio Output to HK Receiver
Using onboard REALTEK HD AUDIO Drivers
Panasonic AX-200 Projector
Reply
#2
This is something I have planned for a later phase of MasterAudio (the new xbmc audio framework). It's going to be some time, however, before it sees the light of day. My suggestion would be to use the 'analog' outputs from your sound card for the other receiver.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


                                            Image
Reply
#3
phi...
Thanks for that. Does the sound card automatically always push out the analog signal or will I have to switch the output in xbmc to be analog?
Gigabyte Mobo Integrated Nvidia 8200
AMD Athlon 64 X2 6000+ (3.1 Ghz)
4 GB Ram
Windows XP SP3
HDMI Video & SPDIF Audio Output to HK Receiver
Using onboard REALTEK HD AUDIO Drivers
Panasonic AX-200 Projector
Reply
#4
That depends entirely on the card. My SoundBlaster cards seem to push analog whenever the signal is PCM (read: not passthrough). Unfortunately, for AC3/DTS you are out of luck on the 2nd receiver unless you find an S/PDIF repeater of some sort.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


                                            Image
Reply
#5
as a temporary measue you could setup 2 xboxs, you can get them free from nieces and nephews Smile

that would give you 2 additional sound sources for use in other rooms Wink
Reply
#6
Im trying to do something like this as well, amp has two zones and from time to time Id like to send the same sounds to both rooms...for a party for example...but at the moment my current motherboard doesnt allow you to send music to analog and digital (hmdi) at the same time...

Therefore I was wondering if XBMC will let me use two cards together at once...the mian pc and room will always be fed by the HDMI audio pass through...but the AMP will only allow Zone 2 from an Analogue source....

Suggestions on a sound sorry post card please
Reply
#7
i have to up this one.
especially with windows 7.
xbmc native support for multiple audio devices will be an excellent feature.

this is most noted on people who use analog output for their television sets
and digital outputs to their receivers.
Reply
#8
Question 
Hey Everyone,

I am using Ubuntu 9.10 Karmic Koala and XBMC 9.11 Camelot on a HTPC with a PointOfView ION mainboard. In the xbmc settings I chose Digital output on IEC958 (S/PDIF). This works just fine, even with AC3/DTS passthrough and everything.

But here is my Setup:
- IEC958 is connected to a 5.1 surround amplifier (living room)
- HDMI is connected to a TV (living room)
- Stereo jack is connected to a 2.1 system in a different room

What I would like to have is that when I listen to music, I want that it is outputted on at least Stereo Jack and IEC958 so that I can listen to it in both rooms. It can also be outputted on HDMI, I dont care about that, I either mute my TV or shut it off.
Almost the same counts for video playback with just stereo sound, but here the preferred outputs are iec958 and hdmi, again, I do not care for stereo jack.
The best for Surround Sound would be, if it only comes through IEC958.

So, since XBMC is using alsa, I guess I need to configure the /etc/asound.conf
I already have a configuration file, that I got at a different forum, a few months ago, before I had xbmc installed.
I now deleted that file to hear the difference, and they are:
- with config: I got the Menu Sounds over HDMI on my TV
- without config: Surround Sound is not working.

well good thing I backed it up. Anyway, can anyone help me to set up my asound.conf the way I want it?

Here is some more information:
Code:
aplay -l
**** Liste von PLAYBACK Geräten ****
Karte 0: NVidia [HDA NVidia], Gerät 0: ALC662 rev1 Analog [ALC662 rev1 Analog]
  Untergeordnete Geräte: 1/1
  Untergeordnetes Gerät '0: subdevice #0
Karte 0: NVidia [HDA NVidia], Gerät 1: ALC662 rev1 Digital [ALC662 rev1 Digital]
  Untergeordnete Geräte: 0/1
  Untergeordnetes Gerät '0: subdevice #0
Karte 0: NVidia [HDA NVidia], Gerät 3: NVIDIA HDMI [NVIDIA HDMI]
  Untergeordnete Geräte: 1/1
  Untergeordnetes Gerät '0: subdevice #0

Code:
# ~/.asoundrc or /etc/asound.conf
# ALSA configuration file

##### USAGE #####
# Save this file as "~/.asoundrc" (for user-specific sound configuration) or
# "/etc/asound.conf" (for system-wide sound configuration) and specify ALSA
# device names ad described in the next section.


##### DEVICE NAMES #####
# This configuration file defines four devices for use by the user.  Those
# devices are "analog", "mixed-analog", "digital", and "mixed-digital".  The
# user may also re-define "default" to be identical to one of the above-named
# devices (i.e. to send all sound output to the digital output unless otherwise
# specified).  Use the device names as described below:
#  - "analog" outputs to the analog output directly and (at least on software
#  sound cards) blocks other audio output.  After playback completes, "queued"
#  sounds are output in sequence.
#  - "mixed-analog" mixes audio output from multiple programs into the analog
#  output (so you can hear beeps, alerts, and other noises while playing back
#  an audio stream).
#  - "digital" outputs to the digital output directly.  Since most (all?)
#  digital outputs expect 48kHz PCM audio, this may not work for some playback
#  (i.e. CD's--which are 44.1kHz PCM audio--or 32kHz audio streams from TV
#  recordings, etc.).
#  - "mixed-digital"

# All other devices created within this file are used only by the configuration
# file itself and should /not/ be used directly.  In other words, do not use
# the devices "analog-hw", "dmix-analog", "digital-hw", or "dmix-digital".


##### IMPORTANT #####
# To make this ALSA configuration file work with your sound card, you will need
# to define the appropriate card and device information for the "analog-hw" and
# "digital-hw" devices below.  You can find the card and device information
# using "aplay -l".


##### Configuration File #####

# Override the default output used by ALSA.  If you do not override the
# default, your default device is identical to the (unmixed) "analog" device
# shown below.  If you prefer mixed and/or digital output, uncomment the
# appropriate four lines below (only one slave.pcm line).
#
# Note, also, that as of ALSA 1.0.9, "software" sound cards have been modified
# such that their default "default" device is identical to the "mixed-analog"
# device.  Whether using an ALSA version before or after 1.0.9, it does no harm
# and has no affect on performance to redefine the device (even if the
# redefinition does not change anything).  Also, by using this ALSA
# configuration file, you once again have access to unmixed analog output using
# the "analog" device.
pcm.!default {
  type plug
## Uncomment the following to use (unmixed) "analog" by default
#  slave.pcm "analog-hw"
## Uncomment the following to use "mixed-analog" by default
  slave.pcm "dmix-analog"
## Uncomment the following to use (unmixed) "digital" by default
#  slave.pcm "digital-hw"
## Uncomment the following to use "mixed-digital" by default
#  slave.pcm "dmix-digital"
}

# Control device (mixer, etc.) for the card
ctl.!default {
  type hw
  card 0
}

# Alias for (converted) analog output on the card
# - This is identical to the device named "default"--which always exists and
# refers to hw:0,0 (unless overridden)
# - Therefore, we can specify "hw:0,0", "default", or "analog" to access analog
# output on the card
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is different from "default" and
# allows playback while blocking other sound sources (until playback
# completes).
pcm.analog {
  type plug
  slave.pcm "analog-hw"
}

# Control device (mixer, etc.) for the card
ctl.analog {
  type hw
  card 0
}

# Alias for (converted) mixed analog output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the dmix plugin (in this case 48000Hz)
# - Note that as of ALSA 1.0.9, "software" sound card definitions redefine
# "default" to do mixing, meaning this device is identical to "default" for
# "software" sound cards.
pcm.mixed-analog {
  type plug
  slave.pcm "dmix-analog"
}

# Control device (mixer, etc.) for the card
ctl.mixed-analog {
  type hw
  card 0
}

# Alias for (converted) digital (S/PDIF) output on the card
# - This will accept audio input--regardless of rate--and convert to the rate
# required for the S/PDIF hardware (in this case 48000Hz)
pcm.digital {
  type plug
  slave.pcm "digital-hw"
}

# Control device (mixer, etc.) for the card
ctl.digital {
  type hw
  card 0
}

# Alias for mixed (converted) digital (S/PDIF) output on the card
#  - This will accept audio input--regardless of rate--and convert to the rate
#  required for the S/PDIF hardware (in this case 48000Hz)
pcm.mixed-digital {
  type plug
  slave.pcm "dmix-digital"
}

# Control device (mixer, etc.) for the card
ctl.mixed-digital {
  type hw
  card 0
}

# The following devices are not useful by themselves.  They require specific
# rates, channels, and formats.  Therefore, you probably do not want to use
# them directly.  Instead use of of the devices defined above.

# Alias for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.analog-hw {
  type hw
  card 0
  # The default value for device is 0, so no need to specify
#  - Uncomment one of the below or create a new "device N" line as appropriate
#    for your sound card or
#  device 0
#  device 3
}

# Control device (mixer, etc.) for the card
ctl.analog-hw {
  type hw
  card 0
}

# Alias for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.digital-hw {
  type hw
  card 0
#  device 1
  device 3
#  - Comment out "device 1" above and uncomment one of the below or create a
#    new "device N" line as appropriate for your sound card or
#  device 2
#  device 3
}

# Control device (mixer, etc.) for the card
ctl.digital-hw {
  type hw
  card 0
}

# Direct software mixing plugin for analog output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-analog {
  type dmix
  ipc_key 1234
  slave {
    pcm "analog-hw"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}

# Control device (mixer, etc.) for the card
ctl.dmix-analog {
  type hw
  card 0
}

# Direct software mixing plugin for digital (S/PDIF) output on the card
# Do not use this directly--it requires specific rate, channels, and format
pcm.dmix-digital {
  type dmix
  ipc_key 1235
  slave {
    pcm "digital-hw"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 48000
  }
}

# Control device (mixer, etc.) for the card
ctl.dmix-digital {
  type hw
  card 0
}
pcm.!default {
type plug
slave {
pcm multi
rate 48000
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
}

pcm.stereo {
type plug
slave {
pcm multi
rate 48000
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
}

ctl.stereo {
type hw
card 0
}

pcm.multi {
type multi
slaves.a.pcm "analog-hw"
slaves.a.channels 2
slaves.b.pcm "digital-hw"
slaves.b.channels 2
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
}

ctl.multi {
type hw
card 0
}

I am sorry, if this maybe asked before, but I used the search and did not find anything similar to this, maybe I did not type the right keywords, but English is not my native language.

Thank you for your support.

Dexter
Reply
#9
Hello.

I got it working by setting both Digital and Analog output from the dropdown menu in "System settings -> Audio output". Tho, I had some issues with sync between the two outputs in the first 20 seconds.
Reply
#10
hkn_ Wrote:Hello.

I got it working by setting both Digital and Analog output from the dropdown menu in "System settings -> Audio output". Tho, I had some issues with sync between the two outputs in the first 20 seconds.

how did u exactly do this? i cant seem to find what you just did in xbmc.
Reply
#11
Dexter Douglas Wrote:Hey Everyone,

I am using Ubuntu 9.10 Karmic Koala and XBMC 9.11 Camelot on a HTPC with a PointOfView ION mainboard. In the xbmc settings I chose Digital output on IEC958 (S/PDIF). This works just fine, even with AC3/DTS passthrough and everything.

Hi, i'm using Ubuntu 9.10 too, on a Zotac IONITX-A-E (same audio-chipset) and could get all outputs working.

Here's how:

Get rid of ALSA, Pulseaudio and ALSA-Utils by "sudo apt-get autoremove pulseaudio alsa-base alsa-utils".
Then get following packages by apt-get:

- ncurses-dev
- libncursesw5-dev
- xmlto (installs the whole TeX-stuff, abut 500MB)

Next, get the sources of alsa-driver 1.0.21, alsa-utils 1.0.21 and alsa-lib 1.0.21a and compile them.

http://www.alsa-project.org/main/index.php/Download (I've chosen the mirror from cybermirror.org, there are almost all previous versions of alsa)
Don't use the actual v1.0.22, it won't work for this!

If alsa-utils complains about something missing with xgettext (don't remeber exactly), try "./configure --disable-nls" - you won't need it anyway.

When finished, you should get output on all three devices with following .asoundrc:
Code:
pcm.!default {
type plug
slave {
pcm "both"
}
}

pcm.both {
type route
slave {
pcm multi
channels 6
}
ttable.0.0 1.0
ttable.1.1 1.0
ttable.0.2 1.0
ttable.1.3 1.0
ttable.0.4 1.0
ttable.1.5 1.0
}

pcm.multi {
type multi
slaves.a {
pcm "tv"
channels 2
}
slaves.b {
pcm "receiver"
channels 2
}
slaves.c {
pcm "analog"
channels 2
}
bindings.0.slave a
bindings.0.channel 0
bindings.1.slave a
bindings.1.channel 1
bindings.2.slave b
bindings.2.channel 0
bindings.3.slave b
bindings.3.channel 1
bindings.4.slave c
bindings.4.channel 0
bindings.5.slave c
bindings.5.channel 1
}

pcm.tv {
type hw
card 0
device 3
channels 2
}

pcm.receiver {
type hw
card 0
device 1
channels 2
}

pcm.analog {
type hw
card 0
device 0
channels 2
}

In XBMC you have to choose "Digital Audio" with "Audio Output - default", to get it working. "Passthrough" is not needed in that case.

HTH

spacecab
Reply
#12
hkn_ Wrote:Hello.

I got it working by setting both Digital and Analog output from the dropdown menu in "System settings -> Audio output". Tho, I had some issues with sync between the two outputs in the first 20 seconds.

I also don't understand this. I thought it is either Digital or Analog.
Anyway, it seems to make no difference, as long I am using my asound.conf file.
Reply
#13
I just did:

apt-get install gettext

And the make succeeded
Reply
#14
I tried spacecabs instructions and also used "apt-get install gettext", the ./configure and make succeeded. But no sound is working at all.

I downloaded the following files:
1. http://alsa.cybermirror.org/driver/alsa-...21.tar.bz2
2. http://alsa.cybermirror.org/utils/alsa-u...21.tar.bz2
3. http://alsa.cybermirror.org/lib/alsa-lib...1a.tar.bz2

Then I extracted each file and compiled each source by ./configure, make, sudo make install.

After I rebooted my computer, there was no more sound. Even the volumecontrol disappeared from the upper Ubuntu panel.
I started the alsamixer and unmuted all outputs, but it made no difference.

Any ideas how to solve that?
Reply
#15
I tried this a while back

without a dmix isnt crossfading broken?
This is where I got stuck because alsa wont allow multiple dmixers in use at the same time nor will it allow dmix to slave to anything but a hw:0,0 type device
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX/MAC/WINDOWS] Multiple Sound Outputs Possible?0