[Linux] how to get digital audio output through hdmi and spdif simulaneously
#1
Star 
hi all,

i was trying hard to get a working asound.conf that fits my setup. but i didn't make it. accidentally i found the solution that fits my needs perfectly.

background:
i have a 5.1 setup including an ac3/dts avr for watching my movies. also i use an old stereo amp for listening to music. to use both amps with the same front speakers, i connected the preout front outputs of my avr with the poweramp section of my stereo amp. having this in mind, my htpc is connected via hdmi with my avr while spdif (toslink) is connected with my dac/stereo amp. to describe the "audio chains" let's have a look at the following:

first chain:
htpc -> HDMI -> avr -> HDMI -> lcd
[INDENT][INDENT][INDENT]|
-> center/sub/rear
|
-> preout -> CINCH -> stereo amp -> frontspeakers
[/INDENT][/INDENT][/INDENT]


second chain:
htpc -> TOSLINK -> dac -> CINCH -> stereo amp -> frontspeakers

here is some output of my audio device:
Code:
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 0: VT1708S Analog [VT1708S Analog]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
card 0: NVidia [HDA NVidia], device 1: VT1708S Digital [VT1708S Digital]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 3: NVIDIA HDMI [NVIDIA HDMI]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

the following setup gives me great results.

xbmc config:
- audio output: digital
- dolby digital capable receiver: yes
- dts capable receiver: yes
- audio output: default
- passthrough output device: hdmi
- downmix multichannel audio to stereo: yes (i guess this setting does not matter since ac3/dts is getting passed through to the avr anyway)

result:
- non ac3/dts stereo playback (video, audio) over toslink and hdmi at the same time
- passthrough of ac3/dts signals to my external avr. in this case toslink does not output anything. but that's fine and like it should be.
- navigation sounds on both output devices, hdmi and toslink

disadvantages:
- i didn't find any until now

so here we go:
Code:
cat /etc/asound.conf
pcm.!default {
        type plug
        slave {
                pcm "both_digital"
        }
}

pcm.both_digital {
        type route
        slave {
                pcm multi
                channels 4
        }
        ttable.0.0 1.0
        ttable.1.1 1.0
        ttable.0.2 1.0
        ttable.1.3 1.0
}

# Toslink digital_1 output
pcm.digital_1 {
        type hw
        card 0
        device 1
        channels 2
}

# HDMI digital_2 output
pcm.digital_2 {
        type hw
        card 0
        device 3
        channels 2
}

pcm.multi {
        type multi
        slaves.a {
                pcm "digital_1"
                channels 2
        }

        slaves.b {
                pcm "digital_2"
                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
}

source: http://www.vdrportal.de/board/thread.php...post850161


have fun && regards,
einhänder
Reply


Messages In This Thread
[Linux] how to get digital audio output through hdmi and spdif simultaneously - by einhänder - 2009-11-30, 05:50
[No subject] - by burritoboy9984 - 2009-12-30, 06:03
[No subject] - by h3rd3r - 2010-03-19, 00:44
[No subject] - by einhänder - 2010-04-17, 15:05
[No subject] - by arad85 - 2010-04-17, 17:35
[No subject] - by einhänder - 2010-04-17, 21:00
[No subject] - by User 29008 - 2010-04-17, 21:21
[No subject] - by arad85 - 2010-04-18, 00:48
[No subject] - by einhänder - 2010-04-18, 01:09
[No subject] - by arad85 - 2010-04-18, 01:17
[No subject] - by Bobby Blixberg - 2010-05-15, 21:26
[No subject] - by einhänder - 2010-05-20, 11:59
[No subject] - by nigma2k - 2010-05-26, 20:08
[No subject] - by einhänder - 2010-05-26, 20:49
[No subject] - by eggzenbeanz - 2010-05-26, 21:57
[No subject] - by einhänder - 2010-05-26, 22:11
[No subject] - by eggzenbeanz - 2010-05-27, 00:28
[No subject] - by nigma2k - 2010-05-28, 22:03
[No subject] - by bfix - 2010-06-30, 12:29
[No subject] - by htpc guy - 2010-11-13, 00:12
Logout Mark Read Team Forum Stats Members Help
[Linux] how to get digital audio output through hdmi and spdif simulaneously1