Long short story.
I was getting PCM stereo via passthrough even on videos with audio streams that Kodi showed to me as Dolby 6 channel audio.
So i decided to enable all logs and carefully investigate what was happening.
Evidently, my RPI3 was resampling and remapping the 6 channels to stereo even if I had passthrough enabled. In logs I found the answer for this: Multichannel streams in Netflix South America are encoded as Dolby Digital Plus, despite audio characteristics of the streams inside the container could be perfect AC3, they are sending it as E-C3. My receiver can manage Dolby Digital AC3, but not Dolby Digital Plus E-C3, or more commonly knowledged as E-AC3. My RPI3 didn’t found via HDMI an E-C3 capable receiver so there’s the reason for the automatic resampling and remapping to stereo. The poor little thing fights to send you some kind of audio and adapts dynamically to the conditions.
if i enable “E-C3 capable receiver” i lose all audio, because that’s the enconding you’re enforcing to pass to the receiver. In my case, if I do this, my receiver don’t understand what is coming in and then goes totally silent.
So, I have recurred to a last resort: Enabling AC3 encoding and leaving passthrough enabled. In that case the RPI3 just remaps the 6 E-C3 channels to 6 valid AC3 channels to the receiver: Voilá, real Dolby Digital AC3 without costly resampling. This method can’t manage well stereo programs and despite being sended as Dolby Digital 2.0 by Netflix, the receiver keeps receiving stereo PCM audio. i consider this a minor innacuracy, but not a problem.
So, if Netlix globally sends audio streams encoded like Dolby Digital Plus 5.1 like here in South America, you will need a Dolby Digital Plus capable receiver or if you have an older receiver like me you will need to use the method i described here.
PS: HiFi Berry has an optical output an it isn’t capable to transfer audio streams with frecuencies over 96hz. HDMI ports can transfer 192hz. is important to know this, because if a Netflix stream is sampled over 96hz frecuency, there will be resampling to a lower frecuency in addition of a remapping. One of the main ideas to have a digital receiver is to avoid RPI3 to make any audio processing outside demuxing it. If resampling and remapping happens, CPU cycles are lost. If you use GPU Acceleration to resample, also you will have less room to exploit maximum video capabilities. So, is very important to know your gear capabilities to know what to do.