[RPi4][LE9.95.4] Incorrect 7.1 audio layout

  • Playing 7.1 audio and video content encoded with AAC LC, FLAC, or Vorbis, output only 7 channels (6.1) and two are out of wrong channels. When playing 8-channel content:

    Code
    CAESinkALSA::Initialize - Opened device "hdmi:CARD=vc4hdmi0,DEV=0,AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02"
    CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
    CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE3
    
    CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
    CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, BL, BR, SL, SR
    CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, BL, BR, BC, UNKNOWN1 (ALSA: FL FR LFE FC RL RR RC NA)

    I have a 9.1 setup: FL, FC, FR, LFE, BL, BR, SL, SR, TRL, and TRR. However, that is not how ALSA sees thing:

    Content with TrueHD or DTS HD with 8 channels are passed through as RAW and the streams are mapped correctly.

    Code
    CAESinkALSA::Initialize - Opened device "hdmi:CARD=vc4hdmi0,DEV=0,AES0=0x06,AES1=0x82,AES2=0x00,AES3=0x09"
    CAESinkALSA::GetChannelLayout - Input Channel Count: 8 Output Channel Count: 8
    CAESinkALSA::GetChannelLayout - Requested Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW
    CAESinkALSA::GetChannelLayout - Got Layout: RAW, RAW, RAW, RAW, RAW, RAW, RAW, RAW (ALSA: none)

    The full log is available here.

    I did a speaker-test which just like LE, sent out one stream to a non-existent RC channel and one channel misfired which I presume is the UNKNOWN1 one.

    To make sure this was not purely a problem with ALSA, I installed RaspiOS and checked HDMI playback with ALSA; the audio was put out from the correct speakers.