Amlogic-NO discussion

When I switched to “fixed” it was working ok. However, I noticed after a reboot, that I was getting “chipmunk” effects as if the resampling rate wasn’t working properly. If I changed the resampling rate in Kodi, then the “chipmunk” effect went away. However, after another reboot, the “chipmunk” effect returned.

I will re-test with your new version, but it will take me several hours to report back as wife wishes to use the TV at the moment!

It will not show any change, it’s only for excessive logging.

For the option fixed it create the processing buffer :srcChLayout: FL, FR, BL, BR, dstChLayout: FL, FR, FC, LFE, BL, BR, no matrix.

Then it create the sink buffer: srcChLayout: FL, FR, FC, LFE, BL, BR, dstChLayout: FL, FR, FC, LFE, BL, BR with the matrix:

m_rematrix: [0]: 1.0 0.0 0.0 0.0 0.0 0.0 
m_rematrix: [1]: 0.0 1.0 0.0 0.0 0.0 0.0 
m_rematrix: [2]: 0.0 0.0 0.0 1.0 0.0 0.0 
m_rematrix: [3]: 0.0 0.0 1.0 0.0 0.0 0.0 
m_rematrix: [4]: 0.0 0.0 0.0 0.0 1.0 0.0 
m_rematrix: [5]: 0.0 0.0 0.0 0.0 0.0 1.0 

grok give this table from it:

Output \ Input 0 (FL) 1 (FR) 2 (FC) 3 (LFE) 4 (BL) 5 (BR)
0 (FL) 1.0 0.0 0.0 0.0 0.0 0.0
1 (FR) 0.0 1.0 0.0 0.0 0.0 0.0
2 (FC) 0.0 0.0 0.0 1.0 0.0 0.0
3 (LFE) 0.0 0.0 1.0 0.0 0.0 0.0
4 (BL) 0.0 0.0 0.0 0.0 1.0 0.0
5 (BR) 0.0 0.0 0.0 0.0 0.0 1.0

While the option best create a processing buffer: srcChLayout: FL, FR, FC, SL, SR, dstChLayout: FL, FR, FC, SL, SR, no matrix.

Then it create the sink buffer: srcChLayout: FL, FR, FC, SL, SR, dstChLayout: FL, FR, FC, SL, SR with the matrix:

Output \ Input 0 (FL) 1 (FR) 2 (FC) 3 (BL) 4 (BR)
0 (FL) 1.0 0.0 0.0 0.0 0.0
1 (FR) 0.0 1.0 0.0 0.0 0.0
2 (FC) 0.0 0.0 1.0 0.0 0.0
3 (BL) 0.0 0.0 0.0 1.0 0.0
4 (BR) 0.0 0.0 0.0 0.0 1.0

So I think the only way is to use only fixed option. Or the option best but with output to 5.1 like adjusted. But I see also the option passthrough is disabled for fixed - no go.

1 Like

Ok - understood regarding logging. System unavailable to me for about an hour. Will report back with debug logs.

Yes- that’s the downside of using “fixed” - passthrough is disabled for my video files.:sob:

I’m not sure why grok (I assume this is AI?) is showing LFE being output on FC in your table. What is happening is that BL is being output on FC in “best” mode.

@Joe_90 I did a new build: 391.36 MB file on MEGA

It should work now for fixed and best match. Also PT should work in best match mode now.
It still include the logging so please make the procedure described here:

1 Like

Ok, thanks. Will update to new build and report back asap. Please stand by…

I tested on my 5.1 system and it’s first time for me I can even adjust 5.1 in audio settings instead 2.0 and still get sound on not passthrough.

2 Likes

@Portisch - that build seems to have done the trick! Works on “best” and “fixed”.

Log link - https://paste.coreelec.org/LearyOlympics

First 5.0 playback in “best” setting at 16:30:19, followed by “fixed” at 16:31:35. There is a snatch of the 5.1 file at 16:30:29 caused by the fact that the folder still has multiple files in it.

1 Like

Just to ensure no ambiguity in what you are seeing in the log. The EDID would be returning a capability of surround71 from my Sony AVR. That is because the physical speaker layout is set for a Dolby Atmos configuration - so it’s actually 5.2.1. But all 5.1 and 7.1 audio (PCM and passthrough) is and always has been handled automatically by the AVR. Side and Back rear channels are merged properly. When I use Dolby Atmos in passthrough mode, the atmos speakers are activated.

Is Optimized fixed too? It’s not much different from Best Match but it is the default and was effected before

I haven’t actually tested Optimised setting. However, I wouldn’t assume any of these test builds will make it into normal nightlies just yet!

@Portisch - what I have tested so far - any of the odd/unusual PCM formats like 3.0/4.0/5.0 are working with your workaround. My AVR is receiving 7.1 from my N2+ over HDMI on any PCM input format whether it is 2.0 or 4.0 or 5.0 or 5.1. This is similar to setting Kodi to “Fixed” except that the sampling rate (44.1kHz/48kHz/88.2kHz/96kHz etc.) of the input is mapped to the output although all are at 7.1. It sounds ok to me. Other folks may not like that their AVRs will always display 7.1.

On the NG build every input format is output in the correct output format. Is it in any way likely that the full answer to this issue lies in common_drivers/sound/soc/amlogic/auge/tdm.c ?

This file (for NO) seems to have some very unlikely speaker channel mappings that you would not encounter in normal music formats. The only music formats I have seen are 2.0/3.0/4.0/5.0 and 5.1

A three speaker layout is always 3.0 (never 2.1) and a four speaker layout is 4.0 (never 3.1) and a five speaker layout is always 5.0 (never 4.1). Maybe the AE_CH_LAYOUT formats for 2.0/3.0/4.0/5.0/5.1 should be at the top of the list? I don’t see this very comprehensive list for drivers in NG. Just a suggestion.

Joe

Yes if this upmixs everything to the selected output format that’s not going to be very good for a lot people including myself. For example with stereo content it’s important to output that at 2.0, allowing my AV receiver to do the upmixing (or not depending on it’s mode) to my actual speaker configuration. The input and output format should just match, assuming the upmixing setting in Kodi is disabled.

It’s not a “upmix”!
It just fill the available channels in the output the user did adjust. Empty channels remain quite then.

What you can try with normal nightly till today. So without the fix. Tomorrow nightly will include this fix already.

Set audio to best match BUT 5.0 audio channels, not 7.1. Then try the 5.0 sample and check if it works. Maybe a reboot before test just to get sure all is set correctly.

CE send the correct audio info frame per HDMI.
But I think this are different parts, the info and the data. But I have no idea how and where the data is transferred to the TV.

Please share also your EDID:
cat /sys/class/amhdmitx/amhdmitx0/rawedid | paste
Is it connected by eARC or directly?
Can you swap it and after reboot cat rawedid again?

1 Like

I’m plugged directly into my receiver no eArc involved. My edid https://paste.coreelec.org/DoveyMonument

Using today’s nightly I tried the 5.0 sample, on best match set to 5.0. AV receiver says it’s recieving 5.0 but I only hear front left and front right out of the correct speakers and then rear left from the centre.

@nissel - you may be stepping on my testing of @Portisch builds today. The normal nightlies don’t include the changes yet - the files uploaded on MEGA are for my testing.

As regards the speaker mapping - it is not an upmix (as @Portisch points out), but a sort of pseudo-fixed output where 5.0 is mapped onto a 5.1 (or 7.1) layout. The unused channels are silent (or quiet).

@Joe_90 sorry wasn’t sure if @Portisch was asking me to try the steps he listed. I’ll shut up, seems we both have the same behaviour and expectations.

I understand about the silent channels, but as you said that is not optimal.

No issue @nissel

@Portisch - here’s the link to my EDID - https://paste.coreelec.org/SaintedSmitten

My AVR is connected directly. There is no way to change the speaker configuration easily.

The fix in today’s nightly works really well for me, best match works as I’d hoped. Crucially 2.0 input still flags correctly as a 2.0 output allowing my receiver to do it’s thing.

All other multi channel input playing correctly and being output at the selected channel count with silent channels as needed. It would be slightly better if these channels were not present instead of silent, other devices seem capable of this over HDMI, but it’s not a problem for me.

The Optimized setting still has the old behaviour, should the fix be applied there as well?

1 Like

What is optimized for?
Fixed, I get the sense.
Best match?
Optimized?

What is optimized for?
Fixed, I get the sense.
Best match?
Optimized?