I had a quite complex setup with an old panasonic plasma TV (it didn't support passthrough) connected to an HDMI switch with Toslink output (to Sonos 5.1 with Playbar) and some players as inputs (Kodi in RPi, Apple TV 4th ge, fire Tv,...) . Last week I received my new Xiaomi Mi Laser 4k projector with MIUI TV soft inside, and I have to change the whole setup.
At this moment I have a new Apple TV 4k connected directly to the projector, and from that, audio connected to Playbar via Toslink. Tests:
With the projector as the source/player and configured to send "raw" audio via toslink, when I play something local or remote (from a NAS) using the projector, I get perfect audio (DD5.1). No occidental streaming apps like Netflix or Prime Video in MIUI TV soft, so I can't test streaming.
With the Apple TV 4k as source and configured to use DD5.1 and projector configured to send "raw" audio via toslink:, when I play a remote (from NAS) video or streaming app using Apple TV, I get DD5.1 but there is an audio delay (1seg approx). With Apple TV 4k configured to use stereo and projector configured to send "raw" (or PCM, it doesn't matter) audio via toslink, I get stereo sound without delay.
I was surfing the web looking for a way to set up a video delay in MIUI TV (xiaomi modified Android TV). No success. I played with different apps/configurations in AppleTV, but I´m quite sure delay is produced by the projector, while processing its HDMI input to extract audio and send it to Playbar via toslink.
I have just ordered a new HDMI 4K switch with audio output... :(
Any other suggestion?