Thanks for your comments. It seems the problem might lie with my TV, which would be annoying as it is a brand new top range Samsung Q90. It appears that when external sources are connected by HDMI into the TV and Toslink audio out, then there is no option but to have the audio in PCM format. Other sources are enabled for Dolby Digital. I need to play with it for while. This article is useful:
https://www.rtings.com/tv/tests/inputs/5-1-surround-audio-passthrough
https://www.rtings.com/tv/tests/inputs/5-1-surround-audio-passthrough