My pulse audio mapping.
It works with 5.1 surround, all channels are correct with the config.
I am using this config on an orange pi 5.
[Mapping hdmi-surround]
description = Digital Surround 5.1 (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
#channel-map = front-left,front-right,rear-left,rear-right,lfe,front-center
channel-map = front-left,front-right,lfe,front-center,rear-left,rear-right
priority = 8
direction = output