OK, here they are, I only removed the timestamps when I posted the previous message earlier but no line is missing besides that. I don’t have the timestamps anymore.
CE-NO 20250625 https://paste.coreelec.org/BoilerLegal
LE-x86 12.0.2 https://paste.coreelec.org/MerchantAttached
Interesting. I see that on line 1939 the struct members are iterated in sequence to search for a match and I suspect this could be the source of the mapping problem unless I missed something. The thing is that most of these channel layouts are extremely rare and probably never used at all in the wild.
Currently, all the mapping problems I encountered as well as Joe_90 are mappings without LFE. If you look at the struct members from top to bottom, you’ll see that the first 4ch layout is AE_CH_LAYOUT_3_1, the first 5ch is 4.1 and the first 7ch is 6.1 which all have a very different mapping from actual 4ch/5ch/7ch found in real usage.
I wonder what would happen if the struct members were reordered like this
static struct channel_speaker_allocation channel_allocations[] = {
// channel: 7, 6, 5, 4, 3, 2, 1, 0
// => Most common layouts
{ .channels = 2, .speakers = { FR, FL } }, // AE_CH_LAYOUT_2_0 0x00
{ .channels = 3, .speakers = { LFE, FR, FL } }, // AE_CH_LAYOUT_2_1 0x01
{ .channels = 4, .speakers = { RR, RL, FR, FL } }, // AE_CH_LAYOUT_4_0 0x08
{ .channels = 5, .speakers = { RR, RL, FC, FR, FL } }, // AE_CH_LAYOUT_5_0 0x0a
{ .channels = 6, .speakers = { RR, RL, FC, LFE, FR, FL } }, // AE_CH_LAYOUT_5_1 0x0b
{ .channels = 7, .speakers = { RRC, RLC, RR, RL, FC, FR, FL } }, // AE_CH_LAYOUT_7_0 0x12
{ .channels = 8, .speakers = { RRC, RLC, RR, RL, FC, LFE, FR, FL } }, // AE_CH_LAYOUT_7_1 0x13
// => Rarities
{ .channels = 3, .speakers = { FC, FR, FL } }, // AE_CH_LAYOUT_3_0 0x02
{ .channels = 4, .speakers = { FC, LFE, FR, FL } }, // AE_CH_LAYOUT_3_1 0x03
{ .channels = 3, .speakers = { RC, FR, FL } }, // 3.0 0x04
{ .channels = 4, .speakers = { RC, LFE, FR, FL } }, // 3.1 0x05
{ .channels = 4, .speakers = { RC, FC, FR, FL } }, // 4.0 0x06
{ .channels = 5, .speakers = { RC, FC, LFE, FR, FL } }, // 4.1 0x07
{ .channels = 5, .speakers = { RR, RL, LFE, FR, FL } }, // AE_CH_LAYOUT_4_1 0x09
{ .channels = 5, .speakers = { RC, RR, RL, FR, FL } }, // 5.0 0x0c
{ .channels = 6, .speakers = { RC, RR, RL, LFE, FR, FL } }, // 5.1 0x0d
{ .channels = 6, .speakers = { RC, RR, RL, FC, FR, FL } }, // 6.0 0x0e
{ .channels = 7, .speakers = { RC, RR, RL, FC, LFE, FR, FL } }, // 6.1 0x0f
{ .channels = 6, .speakers = { RRC, RLC, RR, RL, FR, FL } }, // 6.0 0x10
{ .channels = 7, .speakers = { RRC, RLC, RR, RL, LFE, FR, FL } }, // 6.1 0x11
{ .channels = 4, .speakers = { FRC, FLC, FR, FL } }, // 4.0 0x14
{ .channels = 5, .speakers = { FRC, FLC, LFE, FR, FL } }, // 4.1 0x15
{ .channels = 5, .speakers = { FRC, FLC, FC, FR, FL } }, // 5.0 0x16
{ .channels = 6, .speakers = { FRC, FLC, FC, LFE, FR, FL } }, // 5.1 0x17
{ .channels = 5, .speakers = { FRC, FLC, RC, FR, FL } }, // 5.0 0x18
{ .channels = 6, .speakers = { FRC, FLC, RC, LFE, FR, FL } }, // 5.1 0x19
{ .channels = 6, .speakers = { FRC, FLC, RC, FC, FR, FL } }, // 6.0 0x1A
{ .channels = 7, .speakers = { FRC, FLC, RC, FC, LFE, FR, FL } }, // 6.1 0x1B
{ .channels = 6, .speakers = { FRC, FLC, RR, RL, FR, FL } }, // 6.0 0x1C
{ .channels = 7, .speakers = { FRC, FLC, RR, RL, LFE, FR, FL } }, // 6.1 0x1D
{ .channels = 7, .speakers = { FRC, FLC, RR, RL, FC, FR, FL } }, // 7.0 0x1E
{ .channels = 8, .speakers = { FRC, FLC, RR, RL, FC, LFE, FR, FL } }, // 7.1 0x1F
};
Am I wrong to think that?