Thank you for providing the additional image.
Only for sureness, I have tested with different KODI LPCM audio and video sample files: https://kodi.wiki/view/Samples
With the official 12.0.0 image the mapping was wrong (6.1 -> RC)
2024-05-02 18:02:15.012 T:991 debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
2024-05-02 18:02:15.012 T:991 debug <general>: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, BL, BR, SL, SR
2024-05-02 18:02:15.012 T:991 debug <general>: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, BL, BR, BC, UNKNOWN1 (ALSA: FL FR LFE FC RL RR RC NA)
2024-05-02 18:02:15.012 T:991 debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2024-05-02 18:02:15.012 T:991 debug <general>: Output Device : vc4-hdmi-0 (vc4hdmi0)
2024-05-02 18:02:15.012 T:991 debug <general>: Sample Rate : 48000
2024-05-02 18:02:15.012 T:991 debug <general>: Sample Format : AE_FMT_S24NE3
2024-05-02 18:02:15.012 T:991 debug <general>: Channel Count : 8
2024-05-02 18:02:15.012 T:991 debug <general>: Channel Layout: FL, FR, LFE, FC, BL, BR, BC, UNKNOWN1
2024-05-02 18:02:15.012 T:991 debug <general>: Frames : 2400
2024-05-02 18:02:15.012 T:991 debug <general>: Frame Size : 24
Display More
and after update to the image with the patch provided by you it's now correct 7.1 (RLC/RRC):
2024-05-02 18:17:20.223 T:986 debug <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
2024-05-02 18:17:20.223 T:986 debug <general>: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, BL, BR, SL, SR
2024-05-02 18:17:20.223 T:986 debug <general>: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, SL, SR, BL, BR (ALSA: FL FR LFE FC RL RR RLC RRC)
2024-05-02 18:17:20.223 T:986 debug <general>: CActiveAESink::OpenSink - ALSA Initialized:
2024-05-02 18:17:20.223 T:986 debug <general>: Output Device : vc4-hdmi-0 (vc4hdmi0)
2024-05-02 18:17:20.223 T:986 debug <general>: Sample Rate : 48000
2024-05-02 18:17:20.223 T:986 debug <general>: Sample Format : AE_FMT_S24NE3
2024-05-02 18:17:20.223 T:986 debug <general>: Channel Count : 8
2024-05-02 18:17:20.223 T:986 debug <general>: Channel Layout: FL, FR, LFE, FC, SL, SR, BL, BR
2024-05-02 18:17:20.223 T:986 debug <general>: Frames : 2400
2024-05-02 18:17:20.223 T:986 debug <general>: Frame Size : 24
Display More