[LINUX/MAC/WINDOWS] Multiple Sound Outputs Possible?
#16
Adding this feature to XBMC would be quite hard at current, if possible at all.
For now, the solution to use the alsa plug "multi" seems to be the best route.
I also want this ability, but it is not a priority for me, so it will go onto the bottom of my list for now.
I am not scared of SVN - Cutting my hands open on the bleeding edge.
Reply
#17
If I try to undo all these changes I end up on a desktop without panels/taskbars and not able to start xbmc at all.

I found out that Passthrough works, but thats all, no other sound.

Can anyone help me to go back to my previous settings?
Reply
#18
spacecab Wrote: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

Worked perfectly on ubuntu 8.04 on apple tv! I have sound on all outputs now :-)
Reply
#19
Dexter Douglas Wrote:I found out that Passthrough works, but thats all, no other sound.

By now I got it working, I thought I would have posted it here already, the problem was that on each boot all outputs got muted. I only configured the alsamixer once, immediately after the installation before the first reboot. When I checked the alsamixer again, everything was muted again. So for anyone who has the same problem you can work around it by using "alsactl store" to save the settings and "alsactl restore" (e.g. in your /etc/rc.local) to load them.
Reply
#20
This feature gets my vote, I'm using ion 330 hdmi to tv and optical to surround sound.
Reply
#21
Spaff Wrote:Worked perfectly on ubuntu 8.04 on apple tv! I have sound on all outputs now :-)

Spaff - When you say sound is working on all outputs now is that regardless of what source you play? For example if you play a DTS/AC3 file do you get stereo audio out of the line out? If you play analog audio do you get it out of the SPDIF out?
Reply
#22
I've developed such feature support, see this:
http://forum.xbmc.org/showthread.php?tid=86038
Reply
#23
Has anyone tried spacecabs alsa config this with Ubuntu 10.10 Maverick and XBMC Dharma yet?

And has anyone found a softwaremixer, that is working with these settings, any experience? It's just sometimes annoying when I minimize XBMC and open a flashvideo in a browser there is no sound, even if XBMC is not playing anything at that moment, alsa seems to be busy.
When I tried Boxee I have the issue, that I either get menu sounds OR music/video playback, but not both.
So I am looking for a softwaremixer that one could use with this alsa configuration (posted by spacecab).

I found out out that ESD (Enlightened Sound Daemon) is such a softwaremixer but have not tried it yet.
I just got a new SSD and installed Maverick and Dharma, and pulseaudio ist still installed. But on my old HDD ist still the old Ubuntu 9.10 and Camelot, so tomorrow I try to get ESD running on the old system, hope that will work.
Reply
#24
So here I am with a bunch of bad news. First I did not get ESD running on my old system.

Then I tried spacecabs config on Ubuntu 10.10 Maverick, but with no success. The problem is I cannot get the alsa-driver.1.0.21 compiled.
While ./configure it first ended with:

[HTML]checking for kernel linux/autoconf.h... no
The file /lib/modules/2.6.35-24-generic/build/include/linux/autoconf.h does not exist.
Please install the package with full kernel sources for your distribution
or use --with-kernel=dir option to specify another directory with kernel
sources (default is /lib/modules/2.6.35-24-generic/build).[/HTML]

so I found this somewhere:
Quote:Hi

sudo -s
cd /lib/modules/$(uname -r)/build/include/linux
ln -s ../generated/autoconf.h

my problem solved

and ./configure worked. But now make throws out following error:
[HTML]gcc -D__KERNEL__ -DMODULE=1 -I/media/daten/alsa/alsa-driver-1.0.21/include -I/lib/modules/2.6.35-24-generic/build/include -I/lib/modules/2.6.35-24-generic/build/arch/x86/include -O2 -mpreferred-stack-boundary=2 -march=i686 -Wdeclaration-after-statement -Wno-pointer-sign -D__SMP__ -DCONFIG_SMP -DLINUX -Wall -Wstrict-prototypes -fomit-frame-pointer -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -DALSA_BUILD -nostdinc -iwithprefix include -DMODVERSIONS -include /lib/modules/2.6.35-24-generic/build/include/linux/modversions.h -DEXPORT_SYMTAB -c hwdep.c
cc1: fatal error: /lib/modules/2.6.35-24-generic/build/include/linux/modversions.h: File or folder not found
compilation terminated.
make[1]: *** [hwdep.o] Error 1
make[1]: Leaving Path '/media/daten/alsa/alsa-driver-1.0.21/acore'
make: *** [compile] Error 1
[/HTML]

(I translated "File or folder not found" and "Leaving Path", so the real message could differ a bit)
So here I am, having no sound at all. Hope someone can help me again. Wink
Reply
#25
People, I'm looking for something similar to this. I'm getting an Onkyo 7.1 receiver with second zone. I have an HTPC running Mythbuntu 10.04 on a Zotac IONITX-L-E board. This board has HDMI, analog audio (6 channels) and optical output also. What I'm looking is:

1) Have XBMC using the digital HDMI video/sound output to the receiver, for 5.1 sound output.
2) Use one of the other audio outputs my board has, to output a 2.1 sound to 2 stereo speakers.

However, I don't want them in sync/simultaneously. I want to be able to use both audio cards separately and independently. Thus, I would be able to have kids watching a movie at the living room, while I prepare a nice bbq at my porch listening to another music source (MP3 file, streaming from Last.fm, grooveshark, etc...)

Is such setup possible? I was thinking about setting the OS default sound card to the analog and use this source in my receiver for the 2nd zone and have XBMC configured to use HDMI also going through the receiver...

Am I clear on the specs? I wish someone has some light to shed on this...
Reply
#26
Hello, Is this alternative still working on Frodo? I also have the Ion 330 AsRock and would like 3 outputs for HDMI/Optical and AUX for headphones.

(The solution in http://forum.xbmc.org/showthread.php?tid=145430 appears to be working for me, got all 3 outputs there). But in case it fails...
Reply
#27
I use Gotham and was looking for this. My setup is XBMC on a Asus ION-thingy, and I wanted to use HDMI + USB DAC to output sound.

And this is the thread which made it possible for me to get that. Well, I did some modifications because I wanted ALSA to output to both cards and also passthrough to my surround amplifier via HDMI.

So, what are the modifications? Firstly I made so that the DAC has only two channels in the config file, I don't want to downsample to stereo as I am anyway never going to play surround sound on the DAC anyway. Else I skipped the "advancedguisettings.xml"-file inputs and the idea of setting the bitrate to "Fixed", I left it to "Optimized" so I can enjoy passthrough mode to my receiver via HDMI.

Now, when passthough is enabled (like getting sound from dolby or dts), the DAC won't get any input, which is fine by me as I only want it to work for stereo sounds (and it does both for music and video of course, even if it is the music I care about when it comes to the DAC).

I also made a "hint" in the file, so it's showing a little nicer name in XBMC Audio settings.

Note! I only use this file and choose "HDMI Surround 5.1 + DAC Stereo" from XBMC Audio settings, nothing else. It has only been tested with Gotham stable.

Code:
pcm.!default {
        type plug
        slave {
                pcm "both_digital"
        }
        hint {
                show on
                description "HDMI Surround 5.1 + DAC Stereo"
        }
}

# First we create a 'both' route, that has 8 channels
pcm.both_digital {
        type route
        slave {
                pcm multi
                channels 8
        }
        # And we route the channels 1:1
        # 6 inputs (0-5) get mapped into 2 outputs (0-7)
        # (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
}

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

pcm.multi {
        type multi
        slaves.a {
                pcm "hdmi_hw"
                channels 6
        }
        slaves.b {
                # dac usb has 2 channels
                pcm "dac_hw"
                channels 2
        }

    # 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
}

# And here is my actual hardware
# Note that this is linked to the output of 'aplay -l'
# HDMI output
pcm.hdmi_hw {
        type hw
        card 2
        device 7
        channels 6
}

# Stereo output
pcm.dac_hw {
        type hw
        card 1
        device 0
        channels 2
}
Reply

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