Lg C3 only output stereo Sound

My lg C3 only output stereo when the Source is the tv. For example when I run the Amazon prime app or connect an external drive with 5.1 content it is only in stereo.

However the connected ps5 is outputting correctly 3 channels (which is currently what I have)

My setup is as follows: Tv connected to Yamaha rxv-500d via HDMI Tv connected to ps5 via HDMI

tv audiooutput is set to pcm.

What is wrong with the setup, so that only ps5 sound is 3 channels and not when the tv is the source of audio?

UPDATE: I got it working!!

For some reason I need to switch the input on the AVR back and forth. So standard is AV4 which is always activated, but I need to switch to something else and then back to AV4, then it works with passthrough and tv apps.