No 5.1 on my receiver incombination rasplex

My setup:

Rasplex -> HDMI -> Samsung TV -> Optical -> Harman Kardon 5.1 reciever

I have read many things already, tried alot but none worked. If i play a 5.1 demo test video directly from my tv, by the file browser, the 5.1 works! I can see on my receiver that it gets dolby digital ect.

When i play the same file on my rasplex the 5.1 wont work. I only get sound with the setting on 2.0 channel.
If i change it to 5.1, its stil stereo, but messed up, so i dont here the voices.

Iv tried turning on the passtrue , within that all the settings, but still no luck…

If i ssh with tvservice -a i get only: PCM supported: Max channels: 2, Max samplerate: 48kHz, Max samplesize 24 bits.

Also on my tv the optical out settings, i can see PCM / Dolby Digital and DTS. Also when i disable the passtrue in rasplex, the Dolby Digital en DTS will disapear.

I dont get why ssh is still showing me only the PCM 2.0 , whilest my receiver is a 5.1, and is working fine directly of tv

Did you read this PDF?
It is still relevant:

Yes i did, but it didnt helped me, because im getting only 2.0 channels, and not the 5.1 i should also get!

If i put an usb with a 5.1 test demo on it in my tv, and play it, my receiver is seing that it 5.1 and works fine.

So TV -> optical -> receiver is working just fine on all my files