Amlogic-NO discussion

Thanks @nissel - I’ll try the Audio Profile add-on. I have found that the video player is very stable as regards handling of different audio codecs from standard 2.0 PCM to any of the Dolby or DTS codecs which use passthrough to send the data to the AVR for decoding. It’s when I switch back from the video player (for movies or concert videos or TV shows) to the audio player to handle the music library that I experience even more issues such as not playing 2.0 stereo PCM audio until I switch to a high-res 5.1 track and then back to 2.0. This is in addition to the issue of 5.0 playback.

I know multichannel PCM audio is a sort of edge case as most users seem to be more interested in the subtleties of Dolby Vision vs 12 bit HDR video playback etc. and not so concerned with pure audio reproduction.

I did some more debugging today and found the place where it sample like 5.0 to 5.1.
Then it does sample it again for an unknown reason from 5.1 to 5.1.

It uses this resampler:

I more think there is something wrong instead in the kernel. PCM frames are straight forward and the resampler must work correct.

Edit:
I really think there is some wrong logic in Kodi.
There is a procession buffer, init by src layout 5.0 to destination layout 5.1. But there is no mapping done, it’s disabled.
Then there is a another sink buffer with src 5.1 and dst 5.1 with mapping enabled. So this looks wrong to me as the buffer is already wrong mapped.

4 Likes

I did a bit more testing, trying various “number of channels” options in fixed mode.

And it’s just all over the place, setting it to 3.0, 4.0 or 5.0 cause the same issues as letting Kodi auto switch. The more common ones seem fine like 2.1, 3.1, 5.1, 7.1 but the others just don’t work right, even the volume of some channels is off, with rear surround playing extra loud on centre in some modes.

1 Like

If we could whitelist audio channel options a bit like the resolution whitelisting that could be a solution but clearly Kodi doesn’t support that currently.

While I think CE is great, the best for video libraries, I don’t care for it for bit perfect music reproduction. There are a few I prefer for library and for streaming music. I’d consider them and check around. A small SBC would be cheaper to run one of them, I think, then putting yourself through this amount of hassle.

And for each setting you go to remove a speaker or add another one? :man_facepalming:

This is not how it works and the main issue as it’s way to complicated setup.

Portisch, would you please consider adding these tv boxes KinHank K9, Dune HD Pro 8K Plus, to support CoreELEC built an S928X-K chipset same as Ugoos am8 and SK1.

Thank you for your continued efforts to update CoreELEC. Your dedication to keeping CoreELEC up to date is greatly appreciated by the community.

KinHank is not supported because of open source rules violation - and other facts.
Search forum for more background.

Our team did not reach any sample - so no dedicated support is possible.

1 Like

This looks like the issue:

Fixed:

2025-12-03 08:25:21.062 T:1607     info <general>: ++++ CActiveAE::Configure(1387) Configure m_processingBuffers
2025-12-03 08:25:21.062 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(99): remapLayout: NULL, m_src_channels: 5, m_dst_channels: 6
2025-12-03 08:25:21.062 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(171): m_pContext: 0x7f5c42aff0 created
2025-12-03 08:25:21.063 T:1607     info <general>: ++++ CActiveAE::Configure(1449) Configure m_sinkBuffers
2025-12-03 08:25:21.064 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(96): remapLayout: FL, FR, LFE, FC, BL, BR, m_src_channels: 6, m_dst_channels: 6
2025-12-03 08:25:21.064 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(171): m_pContext: 0x7f5c591a80 created

2025-12-03 08:25:21.108 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Resample(274): m_pContext: 0x7f5c42aff0, in_layout: FL, FR, FC, SL, SR, out_layout: FL, FR, FC, LFE, BL, BR
2025-12-03 08:25:21.109 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Resample(274): m_pContext: 0x7f5c591a80, in_layout: FL, FR, FC, LFE, BL, BR, out_layout: FL, FR, FC, LFE, BL, BR

Optimized:

2025-12-03 08:25:50.118 T:1607     info <general>: ++++ CActiveAE::Configure(1387) Configure m_processingBuffers
2025-12-03 08:25:50.118 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(99): remapLayout: NULL, m_src_channels: 5, m_dst_channels: 5
2025-12-03 08:25:50.118 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(171): m_pContext: 0x7f5c2f1b30 created
2025-12-03 08:25:50.118 T:1607     info <general>: ++++ CActiveAE::Configure(1449) Configure m_sinkBuffers
2025-12-03 08:25:50.119 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(96): remapLayout: FL, FR, FC, SL, SR, m_src_channels: 5, m_dst_channels: 5
2025-12-03 08:25:50.119 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Init(171): m_pContext: 0x7f5c4d8250 created

2025-12-03 08:25:50.157 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Resample(274): m_pContext: 0x7f5c2f1b30, in_layout: FL, FR, FC, SL, SR, out_layout: FL, FR, FC, SL, SR
2025-12-03 08:25:50.157 T:1607     info <general>: ++++ CActiveAEResampleFFMPEG::Resample(274): m_pContext: 0x7f5c4d8250, in_layout: FL, FR, FC, SL, SR, out_layout: FL, FR, FC, LFE, BL

This is why I do not understand this fixed/optimized at all.
What you will optimize when you have a 5.1 system and it’s adjusted like this in audio settings.

But also in_layout: FL, FR, FC, SL, SR, out_layout: FL, FR, FC, LFE, BL does not sound correct.

1 Like

It’s actually a shame about the Dune HD Pro 8K Plus

The Dolby Vision profiles (P5, P7 MEL and FEL, P8) should probably be supported.

Tell this Dune, not us.
The device do support DV, yes.
But same as all new devices P7 only MEL, not FEL.
Same in Android by convert from P7 to P8 profile.

2 Likes

I didn’t know KinHank isn’t supported open source. But Dune Hd pro 8K Plus I’ve seen a youtuber install CoreELEC by use ugoos SK1 image and work smoothly.

Thank you.

Better now: in_layout: FL, FR, FC, SL, SR, out_layout: FL, FR, FC, SL, SR
Will make a test image.

5 Likes

That’s not really what I meant, but nevermind looking forward to testing your changes.

Yes - that’s the weird issue. The number of speakers and the input file channel layout is correct, but the channels are mapped to the wrong speakers on output. That’s why a couple of us thought that the wrong ALSA mapping was being selected. The fixed layout works (either 5.1 or 7.1) because the input data file does not have any information in the LFE or the SL or SR channels. It doesn’t matter whether the input data has audio either in the SL or BL channels or the SR or BR channels. A true 7.1 speaker system has 4 speakers in the side/back, so SL or BL will come out of different speakers. An AVR running a 5.1 speaker layout has only two speakers in the side/back, so the AVR will mix the SL and BL information and send it to the single side/back left speaker. Same for the SR/BR channels.

Please try with this test image:

2 Likes

Ok - will do!

@Portisch - sorry, but there is no difference in output. The 2.0, 5.1 and 6.1 and 7.1 test files are still working ok, but not the 3.0, 4.0, 5.0. In the 5.0 test file, the RL channel is still coming out of the FC, but the actual FC channel and RR channel are silent.

But when using fixed instead best it’s working?

Please update with this build:

Enable Kodi debug then start for 2-5 seconds your 5.0 sample.
Then switch the choose mode from fixed to best.
Start again the same file short and stop it.

Then share kodi log by: cat /storage/.kodi/temp/kodi.log | paste.

Like this is for fixed and a FLAC 4.0: in_layout: FL, FR, BL, BR, out_layout: FL, FR, FC, LFE, BL, BR.
So I think it must be akways use the ouput config like I have set 5.1.
Independent from the input. The other channels just stay quiet then.