XBMC Community Forum
[PATCH] Dual Audio Output support for XBMC (Eden Updated) - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Development (/forumdisplay.php?fid=32)
+--- Forum: Development (/forumdisplay.php?fid=93)
+--- Thread: [PATCH] Dual Audio Output support for XBMC (Eden Updated) (/showthread.php?tid=86038)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48


Dual Audio output - ivonovak - 2011-04-14 14:13

I'm using dual audio output on OpenSuse and Mandriva . It works very good without any patches

- Any PCM sound goes to HDMI and simultaneously to optical/coaxial otput(SPDIF) onboard card and AC3/DTS Receiver
- AC3/DTS sound goes only to receiver "

DON'T use pulse audio !! - problem with AC3/DTS patthrough to SPDIF output !
- Uninstall pulse audio and use only alsa !!!!

I have 2 soundcard + Intel + NVidia HDMI

video@HTPC-XBMC-VDR:~> aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Intel [HDA Intel], device 0: ALC887 Analog [ALC887 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC887 Digital [ALC887 Digital]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
Subdevices: 0/1
Subdevice #0: subdevice #0

1.create file /etc/asound.conf - section corresponds to devices form aplay -l and aplay -L
2. reboot alsa or reboot PC
3. XBMC : set coax or hdmi output and AC3 / DTS compatible receiver and use only default cards ...


####/etc/asound.conf
pcm.!default plug:both
#pcm:iec958 hdmi:NVidia
#pcm:iec958 iec958:Intel

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 "hdmi_hw"
channels 2
}
slaves.b {
# pcm "digital_hw"
pcm "iec958"
channels 2
}
slaves.c {
pcm "analog_hw"
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.hdmi_hw {
type hw
card 1
device 3
channels 2
}

pcm.hdmi_formatted {
type plug
slave {
pcm hdmi_hw
rate 48000
channels 2
}
}

pcm.hdmi_complete {
type softvol
slave.pcm hdmi_formatted
control.name hdmi_volume
control.card 1
}

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

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


- falconchips - 2011-04-15 14:51

I´ve just registered to say THANKS!!!!

I was going mad with simultaneous sound through SPDIF and analog and your patch saved my life. Now I can listen 5.1 in my living room (RXV463 Yamaha receiver) and stereo on my 32" Sony lcd in bedroom. I only missed gui sounds in the lcd, but it´s no big deal.

Many thanks!!!!! (and keep improving, please)


- methcat - 2011-04-16 03:34

all i can say is BOMB!

thanks for this!


- digzz - 2011-04-16 12:54

How do I get this to work on XBMC Live ? Anybody Confused??


- ZOiD - 2011-05-03 16:21

Hi,
i can't compile against acb1223 because of multiple definitions and conflicting declarations:
Code:
make -C xbmc
make[1]: Betrete Verzeichnis '/usr/src/xbmc_dual/xbmc'
CPP     Application.o
In file included from settings/GUIWindowSettingsCategory.h:27,
                 from Application.cpp:148:
settings/GUISettings.h:169: error: multiple definition of ‘enum PowerState’
/usr/src/xbmc_dual/settings/GUISettings.h:170: error: previous definition here
settings/GUISettings.h:171: error: conflicting declaration ‘POWERSTATE_QUIT’
/usr/src/xbmc_dual/settings/GUISettings.h:172: error: ‘POWERSTATE_QUIT’ has a previous declaration as ‘PowerState POWERSTATE_QUIT’
settings/GUISettings.h:172: error: conflicting declaration ‘POWERSTATE_SHUTDOWN’
/usr/src/xbmc_dual/settings/GUISettings.h:173: error: ‘POWERSTATE_SHUTDOWN’ has a previous declaration as ‘PowerState POWERSTATE_SHUTDOWN’
settings/GUISettings.h:173: error: conflicting declaration ‘POWERSTATE_HIBERNATE’
/usr/src/xbmc_dual/settings/GUISettings.h:174: error: ‘POWERSTATE_HIBERNATE’ has a previous declaration as ‘PowerState POWERSTATE_HIBERNATE’
settings/GUISettings.h:174: error: conflicting declaration ‘POWERSTATE_SUSPEND’
/usr/src/xbmc_dual/settings/GUISettings.h:175: error: ‘POWERSTATE_SUSPEND’ has a previous declaration as ‘PowerState POWERSTATE_SUSPEND’
settings/GUISettings.h:175: error: conflicting declaration ‘POWERSTATE_REBOOT’
/usr/src/xbmc_dual/settings/GUISettings.h:176: error: ‘POWERSTATE_REBOOT’ has a previous declaration as ‘PowerState POWERSTATE_REBOOT’
settings/GUISettings.h:176: error: conflicting declaration ‘POWERSTATE_MINIMIZE’
/usr/src/xbmc_dual/settings/GUISettings.h:177: error: ‘POWERSTATE_MINIMIZE’ has a previous declaration as ‘PowerState POWERSTATE_MINIMIZE’
settings/GUISettings.h:177: error: conflicting declaration ‘POWERSTATE_NONE’
/usr/src/xbmc_dual/settings/GUISettings.h:178: error: ‘POWERSTATE_NONE’ has a previous declaration as ‘PowerState POWERSTATE_NONE’
settings/GUISettings.h:178: error: conflicting declaration ‘POWERSTATE_ASK’
/usr/src/xbmc_dual/settings/GUISettings.h:179: error: ‘POWERSTATE_ASK’ has a previous declaration as ‘PowerState POWERSTATE_ASK’
settings/GUISettings.h:181: error: multiple definition of ‘enum VideoSelectAction’
/usr/src/xbmc_dual/settings/GUISettings.h:182: error: previous definition here
settings/GUISettings.h:183: error: conflicting declaration ‘SELECT_ACTION_CHOOSE’
/usr/src/xbmc_dual/settings/GUISettings.h:184: error: ‘SELECT_ACTION_CHOOSE’ has a previous declaration as ‘VideoSelectAction SELECT_ACTION_CHOOSE’
settings/GUISettings.h:184: error: conflicting declaration ‘SELECT_ACTION_PLAY_OR_RESUME’
/usr/src/xbmc_dual/settings/GUISettings.h:185: error: ‘SELECT_ACTION_PLAY_OR_RESUME’ has a previous declaration as ‘VideoSelectAction SELECT_ACTION_PLAY_OR_RESUME’
settings/GUISettings.h:185: error: conflicting declaration ‘SELECT_ACTION_RESUME’
/usr/src/xbmc_dual/settings/GUISettings.h:186: error: ‘SELECT_ACTION_RESUME’ has a previous declaration as ‘VideoSelectAction SELECT_ACTION_RESUME’
settings/GUISettings.h:186: error: conflicting declaration ‘SELECT_ACTION_INFO’
/usr/src/xbmc_dual/settings/GUISettings.h:187: error: ‘SELECT_ACTION_INFO’ has a previous declaration as ‘VideoSelectAction SELECT_ACTION_INFO’
settings/GUISettings.h:187: error: conflicting declaration ‘SELECT_ACTION_MORE’
/usr/src/xbmc_dual/settings/GUISettings.h:188: error: ‘SELECT_ACTION_MORE’ has a previous declaration as ‘VideoSelectAction SELECT_ACTION_MORE’
settings/GUISettings.h:188: error: conflicting declaration ‘SELECT_ACTION_PLAY’
/usr/src/xbmc_dual/settings/GUISettings.h:189: error: ‘SELECT_ACTION_PLAY’ has a previous declaration as ‘VideoSelectAction SELECT_ACTION_PLAY’
settings/GUISettings.h:194: error: redefinition of ‘struct ReplayGainSettings’
/usr/src/xbmc_dual/settings/GUISettings.h:195: error: previous definition of ‘struct ReplayGainSettings’
settings/GUISettings.h:205: error: redefinition of ‘class CSetting’
/usr/src/xbmc_dual/settings/GUISettings.h:204: error: previous definition of ‘class CSetting’
settings/GUISettings.h:239: error: redefinition of ‘class CSettingBool’
/usr/src/xbmc_dual/settings/GUISettings.h:238: error: previous definition of ‘class CSettingBool’
In file included from settings/GUIWindowSettingsCategory.h:27,
                 from Application.cpp:148:
settings/GUISettings.h:256: error: redefinition of ‘class CSettingFloat’
/usr/src/xbmc_dual/settings/GUISettings.h:255: error: previous definition of ‘class CSettingFloat’
settings/GUISettings.h:277: error: redefinition of ‘class CSettingInt’
/usr/src/xbmc_dual/settings/GUISettings.h:276: error: previous definition of ‘class CSettingInt’
settings/GUISettings.h:324: error: redefinition of ‘class CSettingHex’
/usr/src/xbmc_dual/settings/GUISettings.h:323: error: previous definition of ‘class CSettingHex’
settings/GUISettings.h:335: error: redefinition of ‘class CSettingString’
/usr/src/xbmc_dual/settings/GUISettings.h:334: error: previous definition of ‘class CSettingString’
settings/GUISettings.h:354: error: redefinition of ‘class CSettingPath’
/usr/src/xbmc_dual/settings/GUISettings.h:353: error: previous definition of ‘class CSettingPath’
settings/GUISettings.h:363: error: redefinition of ‘class CSettingAddon’
/usr/src/xbmc_dual/settings/GUISettings.h:362: error: previous definition of ‘class CSettingAddon’
settings/GUISettings.h:373: error: redefinition of ‘class CSettingSeparator’
/usr/src/xbmc_dual/settings/GUISettings.h:372: error: previous definition of ‘class CSettingSeparator’
settings/GUISettings.h:382: error: redefinition of ‘class CSettingsCategory’
/usr/src/xbmc_dual/settings/GUISettings.h:381: error: previous definition of ‘class CSettingsCategory’
settings/GUISettings.h:400: error: redefinition of ‘class CSettingsGroup’
/usr/src/xbmc_dual/settings/GUISettings.h:399: error: previous definition of ‘class CSettingsGroup’
settings/GUISettings.h:433: error: redefinition of ‘class CGUISettings’
/usr/src/xbmc_dual/settings/GUISettings.h:432: error: previous definition of ‘class CGUISettings’
make[1]: *** [Application.o] Fehler 1
make[1]: Verlasse Verzeichnis '/usr/src/xbmc_dual/xbmc'
make: *** [xbmc/xbmc.a] Fehler 2
Any advice?
(i think its included twice or something.)

tia
zoid


- sirkonsta - 2011-05-07 02:18

Many many thanks my friend everything works great in windows 7

Its 3.00 am in the morning and i am CRAZY HAPPY


- sirkonsta - 2011-05-07 13:38

Two problems,
1. from my tv i cant hear the menus sound
2. while i listening music if a close the tv, the music plays 1sec and stop and again from the beginning 1sec and stop from my amp


- terr1 - 2011-05-08 12:58

Will you be able to output surrround sound using optical and analog 2.0 using this??

The ALSA solution also mentioned seems only to use stereo across optical and analog?


- x23piracy - 2011-05-08 13:11

Hi,

terr1 Wrote:Will you be able to output surrround sound using optical and analog 2.0 using this??

as you can see on the screenshots both outputs can work with different channels (2.0 & 5.1)
A way to get sure is testing Wink


Greetz X23


- terr1 - 2011-05-08 13:23

x23piracy Wrote:Hi,



as you can see on the screenshots both outputs can work with different channels (2.0 & 5.1)
A way to get sure is testing Wink


Greetz X23

Yeah I'm trying to compile now Smile

Thats a VERY nice feature.. Include this in the main build please.. Also if I can get this working.. where do I paypal donate ? Smile


- teeedubb - 2011-05-08 14:29

Could someone please explain how to pull the master-20110331-acb1223 version on xbmc from git? Ive compiled xbmc before, but pulling a particular version has me stumped. Im dying to try this patch, Ive been waiting for something like this for ages as my TV doesnt play DTS audio.

I have been trying:
Quote:git clone git://github.com/xbmc/xbmc.git
cd xbmc
git checkout master-20110331-acb1223
But i get:
Quote:error: pathspec 'master-20110331-acb1223' did not match any file(s) known to git.

Any help is greatly appreciated!


- veens34 - 2011-05-08 20:18

x23piracy Wrote:Hi,



as you can see on the screenshots both outputs can work with different channels (2.0 & 5.1)
A way to get sure is testing Wink


Greetz X23

For me, when an output has DTS/AC3 activated and the other output doesn't, the vidéo is jerking (2 or 3 frame per sec, with 1 second of sound sometimes...)

Any idea?

And sorry for my english...


- macsat - 2011-05-11 14:23

veens34 Wrote:For me, when an output has DTS/AC3 activated and the other output doesn't, the vidéo is jerking (2 or 3 frame per sec, with 1 second of sound sometimes...)

Any idea?

And sorry for my english...

On my ION330 based machine on Windows 7, updating to the latest Nvidia ION graphics drivers (which also includes HDMI audio drivers) helped me.


- veens34 - 2011-05-11 15:13

macsat Wrote:On my ION330 based machine on Windows 7, updating to the latest Nvidia ION graphics drivers (which also includes HDMI audio drivers) helped me.

I've forgot to mentionned my motherbord. It's a brazos, so it's an ATI.
And i'm on Ubuntu 10.10.

I will try to reinstall my sytem with ubuntu 11.04...


- sirkonsta - 2011-05-14 14:06

veens34 Wrote:For me, when an output has DTS/AC3 activated and the other output doesn't, the vidéo is jerking (2 or 3 frame per sec, with 1 second of sound sometimes...)

Any idea?

And sorry for my english...

+1