Don't do that. Number of channels *must* be set to 2.0 when using spdif/toslink.
Number of channles is only used for multichannel PCM, which is a HDMI feature.
Passthrough will still work with number of channels set to 2.0.
Thanks for your answer. Now i realise, my downloaded video was Dolby Digital Plus, and my soundbar is only working with Dolby Digital.
So if i set RPI3 --> HDMI (5.1, passtrough, ac3 /Dolbi Digital/) --> Soundbar --> TV and i downloaded free soround music from this site: Free surround music download - 5.1 Dolby Digital "5.1 Surround Test File" and i hear the channels sound in the right places. Front Left --> Font Left.. etc. So the HDMI 5.1 is working now. DONE.
But the spdif... So i missed some details in my first post. In my Libreelec / Kodi settings i couldn't set the channel numbers when is use spdif (HifiDigi+).
I could set if i want to passtrough or not. So is that you said is meaning, i can't passtrough 5.1 channel sound in spdif ?? Or i still don't understand, the whole things? Because i hear the sound with this version: (Sound connection): RPI3 --> Spdif(HifDigi+, passtrough, without ace3 /if i set this option, there is no sound/) --> Soundbar, (Video connection): RPI3 --> HDMI --> TV . But this version i just hear 2.0 sound on my 6 speaker.
Spdif = 2.0 ?