Linux [SOLVED] Configuring for an AC-3/DTS decoder plus HDMI tv
#1
Hello all,

just created a small Asrock QC5000-ITX/PH AMD A4-5000-based solution and installed OpenELEC 5.0.5 on it. Kodi is a beauty, it's been more than 10 years since the last time I enjoyed tinkering with a free platform full of features. Congratulations to the developer team!!!!

Some questions I had in mind. My audio setup comprises of the following:
* A tv, connected over HDMI to the pc
* a Yamaha A2 ac-3/dts (and PCM iirc) capable amp, connected over S/PDIF

Based with my tinkering yesterday, I might have run into a bug or into a feature here. Not sure Smile My goals were the following, sorted from more important to less important:

1) Be able to play everything on the amplifier over S/PDIF, appropriately transcoded to multichannel AC-3. For example, I'd like my AAC 5.1 to be played as multichannel AC-3 5.1.I understand that I can not play the HD audio formats, however if I could play them retaining as much as possible of the original multichannel information.

2) (OPTIONALLY): In addition to what is played on the amp in a multichannel fashion, I'd like, if possible to have everything played in 2-channels on the tv as well.

After reading the wiki at http://kodi.wiki/view/Settings/System#Audio_output I was not sure if I could accomplish both things above. At the moment I am somewhat clueless on how to configure the audio. I initially thought I have been able to attain (1) above, by configuring as follows:
* audio output device: ALC892 Digital S/PDIF
* Output config: optimized
* (until passthrough all used are the defaults)
* Enable passthrough: enaled
* Passthrough output device: exactly the same device as in teh start, ALC892 Digital S/PDIF
* AC-3 capable receiver, Enable Dolby Digital transcoding and DTS capable receiver: all enabled

With this setting I believed I was hearing multichannel sound ok... Seems that was not the case. Debug log is here: http://xbmclogs.com/pbrwfijrx#

This log contains three movies:
(1) One with AAC 5.1 (http://xbmclogs.com/pbrwfijrx#line-667 )
======================
The AAC 5.1 movie, seems that it could not passthrough ( http://xbmclogs.com/pbrwfijrx#line-671 ). Perhaps due to the fact that my amp is not AAC-enabled. However, I expected that since I enabled transcoding to AC-3 I'd have AAC 5.1 switched to AC-3 5.1. Wrong perhaps?

I am not a developer, so I can not tell what happens next. At xbmclogs.com/pbrwfijrx#line-707 it seems that a 6 channel stream is created, but at http://xbmclogs.com/pbrwfijrx#line-749 ALSA is opened for 2 channels.

Can I presume that all works as intended, ie AAC 5.1 transcodes to same-channel AC-3 5.1?

(2) One with AC-3 5.1 - http://xbmclogs.com/pbrwfijrx#line-959
================
Looks this one is just fine


(3) One with AAC 2.0
===================
http://xbmclogs.com/pbrwfijrx#line-1380

All in all, I believe this works like a charm, when I set the audio output device to be the S/PDIF one.

Question (1): is this a "correct" setup? That is do you see anything funny?

Taking it a bit further, I'd like, if possible, to be able to have sound also on my tv. I don't care if it simple stereo, I could live with that. So I embarked into a series of tests in which I left the passthrough options untouched and changed the default audio output device, to be something like "HD-Audio,@@@".

When that was done I could hear the remote clicks from the tv, but not the movie audio. Perhaps reasonable, considering that I have selected passthrough AND AC-3 transcode. So the AAC 5.1 movie above is still heard from the amp, as well as the AC-3 one and a FLAC 5.1. However, the last movie which contained AAC2.0 is heard from the tv and not from the amp? Log: http://xbmclogs.com/pob3va4kz#line-1793 and http://xbmclogs.com/pob3va4kz#line-1895

You can see that the hdmi is accessed for this purpose.

Question (2): Bug or feature, considering I have elected everything to go through an AC-3 transcoding?

Question (3): COnsidering that I might want to hear movies through either the tv or the amp, which would be the easiest way to switch configuration for audio? Toggle the passthrough on/off switch?

Thank you in advance for taking the time to read my lengthy post Smile

PS: By the time I finished this post I understood some of the things regarding decoding and answered some of my own questions. So if some things do not seem to make sense here, it was this out of order self-answering Smile
Reply
#2
Quote:I am not a developer, so I can not tell what happens next. At xbmclogs.com/pbrwfijrx#line-707 it seems that a 6 channel stream is created, but at http://xbmclogs.com/pbrwfijrx#line-749 ALSA is opened for 2 channels.

All fine. 2 PCM channels are needed to output 5.1 AC3, DTS, which is a format transmitting 6(7) channels via just two pcm channels. You can verify that with e.g. : https://dl.dropboxusercontent.com/u/5572...20Test.avi
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#3
Thank you fritsch. Any idea why vids with 2-channel audio do not get transcoded, but instead go the HDMI route (that is, when the audio output device is the default and passthrough is enabled)?
Reply
#4
There is no need to transcode 2 channel audio as it can be passed as pcm stream - you have enough channels to do so. If you have the PCM device (handling 2 channel non passthrough / transcode formarts) and the passthrough device set to your SPDIF - then I don't understand why your hdmi comes into the game at all.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#5
I am not sure exactly (pardon my understanding of English) what you mean here.

I presume you mean that this might be a bug? If so, should the debug log be used to open a problem report?
Reply
#6
No - I said: it's not a bug. There is no reason at all to send 2 non AC3 channels as a AC3 signal.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#7
I was about to ask "what about those that have only S/PDIF to send", but then the logical answer would be to utilize S/PDIF as the default sound output too..

Thank you for all the information provided, much obliged.

<OffTopic>Say, would you happen to know whether the analog stereo downmix is made in a manner that transcodes multichannel digital to multichannel analog (Dolby Prologic)? Or is it "plain" sterero?<OffTopic>
Reply
#8
It decodes and mixes to 2 channel PCM - no Dolby Prologic involved.
First decide what functions / features you expect from a system. Then decide for the hardware. Don't waste your money on crap.
Reply
#9
Thanks again!
Reply

Logout Mark Read Team Forum Stats Members Help
[SOLVED] Configuring for an AC-3/DTS decoder plus HDMI tv0