Problems with 5.2 playback: Always goes to PCM

Hi,
I have just purchased a new 4K TV and since I have an older receiver which does not use HDMI switching, I am now running the output of my Plex client PC directly to the HDMI input of the TV and not through the receiver. With my previous TV it went through the receiver and I had not issues with 5.1 or DTS content.
With the new TV I now take the optical output from the TV and feed it into my receiver. The problem is that it is only 2 channel PCM now.
To test if this actually works properly, I can run Netflix from the built in TV app and it works fine, I get 5.1.
If I use PlexMediaPlayer instead of OpenPHT, I get 5.1 or DTS. It always works. I tried to see if there were some settings that were different in Plex Media Player and can’t find anything obvious.
So it seems that OpenPHT, sees the TV but thinks it is stereo only and therefore doesn’t pass the 5.1.
Am I missing something or is this a bug?
Thanks

What version of OpenPHT are you running?
On what platform? windows? embedded?

what is your audio output settings you have selected in openpht?