Audio stutter with 24-bit 192kHz stereo FLAC

I experience audio stuttering while playing 24-bit 192kHz stereo FLAC audio files on Odroid-N2Plus running CoreELEC 9.2.5 version (this issue was also existent on older version 9.2.4.2)

Mediainfo report:

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 4 min 55 s
Bit rate mode                            : Variable
Bit rate                                 : 4 078 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 192 kHz
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 144 MiB (99%)
Writing library                          : libFLAC 1.3.1 (UTC 2014-11-25)

My test:

Audio
Format                                   : FLAC
Format/Info                              : Free Lossless Audio Codec
Duration                                 : 4 min 49 s
Bit rate mode                            : Variable
Bit rate                                 : 7 050 kb/s
Channel(s)                               : 2 channels
Channel layout                           : L R
Sampling rate                            : 192 kHz
Bit depth                                : 24 bits
Compression mode                         : Lossless
Stream size                              : 244 MiB (100%)
Writing library                          : libFLAC 1.2.1 (UTC 2007-09-17)

N2:~ # cat /proc/asound/AMLAUGESOUND/pcmp/sub/hw_params
access: MMAP_INTERLEAVED
format: S24_LE
subformat: STD
channels: 2
rate: 192000 (192000/1)
period_size: 8192
buffer_size: 32768

Music file stored on my NAS(GB network)

Result:
No stuttering playing hires on my N2 - itĀ“s the old N2 without ā€˜plusā€™

I must say that Iā€™ve never noticed this. My SACD and DVD-A collection is ripped to FLAC at various bit rates (88.2 and 176.4kHz for SACD) and 96 or 192kHz in the case of my DVD-A, depending on whether they are in stereo or 5.1.
Iā€™ve just played almost all tracks on my Carly Simon ā€œNo Secretsā€ stereo rip at 192kHz and no dropouts. Same with my 176.4kHz rip of DSOTM SACD - no audio glitches.
The only issue Iā€™ve had with audio on CoreElec is the slight audio silence at the start of tracks if I switch from say track 2 to track 4 manually, but that happens on my Venz V10 Pro also. The only build that has always performed flawlessly with audio (and video) was Kzaqā€™s build on Libreelec, but that is very old now.

I have just found out the issue only occurs when outputting audio over the HDMI, analog output is without any issues.

cat /sys/class/amhdmitx/amhdmitx0/aud_cap
CodingType MaxChannels SamplingFreq SampleSize
PCM, 6 ch, 32/44.1/48 kHz, 16 bit
AC-3, 6 ch, 32/44.1/48 kHz, MaxBitRate 640kHz
Dobly_Digital+/ATMOS, 8 ch, 32/44.1/48 kHz, DepVaule 0x1
MAT, 8 ch, 48 kHz, DepVaule 0x3

Just checked the supported audio formats. Could this be a problem?

Could be, see my output

N2:~ # cat /sys/class/amhdmitx/amhdmitx0/aud_cap
CodingType MaxChannels SamplingFreq SampleSize
PCM, 8 ch, 32/44.1/48/88.2/96/176.4/192 kHz, 16/20/24 bit
DTS, 6 ch, 44.1/48/88.2/96 kHz, MaxBitRate 1536kHz
AC-3, 6 ch, 32/44.1/48 kHz, MaxBitRate 640kHz
DTS-HD, 8 ch, 44.1/48/88.2/96/176.4/192 kHz, DepVaule 0x3
Dobly_Digital+/ATMOS, 8 ch, 44.1/48 kHz, DepVaule 0x3
MAT, 8 ch, 44.1/48/88.2/96/176.4/192 kHz, DepVaule 0x3
OneBitAudio, 6 ch, 44.1 kHz, MaxBitRate 0kHz
DTS-HD, 8 ch, 44.1/48/88.2/96/176.4/192 kHz, DepVaule 0x1

So it seems the TV stutters the playback because of unsupported audio format coming in over the HDMI. CoreELEC still outputs 24-bit/192kHz although the client device is not able to properly process it.

Could this be related to the issue Iā€™m trying to resolve?
See N2 HDMI audio dropouts

You could try to compare output from this command when you have the TV on and after the stuttering issue occurs.

cat /sys/class/amhdmitx/amhdmitx0/aud_cap

You could just set kodi to output a fixed rate (say 44.1 or 48kHz) on the HDMI output if itā€™s for a TV. It wonā€™t make any difference to the sound quality coming from TV speakers. I assumed from your original post that you were using an AV amplifier and this issue had occurred recently and had been working ok in the past.

Yes, youā€™re right, but itā€™s more complicated.

I have stereo receiver (without HDMI ports) connected via analog jack ā†’ stereo RCA cable and TV connected over the HDMI.

Thatā€™s why I have analog output set in Kodi by default. It outputs audio over analog and simultaneously over the HDMI. So I donā€™t need to always change the default audio output in case I want to listen to the music from TV or HiFi receiver.

The problem is, there is no such option to limit the output for HDMI audio out to a fixed rate when I have selected analog output as default.

1 Like

Thanks for the suggestion. I get the same aud_cap when I run the command with TV on (no dropouts) and when TV off (lots of dropouts)

CoreELEC:/ # cat /sys/class/amhdmitx/amhdmitx0/aud_cap
CodingType MaxChannels SamplingFreq SampleSize
PCM, 2 ch, 32/44.1/48/88.2/96/176.4/192 kHz, 16/20/24 bit
PCM, 8 ch, 32/44.1/48/88.2/96/176.4/192 kHz, 16/20/24 bit
AC-3, 8 ch, 32/44.1/48 kHz, MaxBitRate 640kHz
DTS, 8 ch, 44.1/48 kHz, MaxBitRate 1536kHz
OneBitAudio, 6 ch, 44.1 kHz, MaxBitRate 0kHz
Dobly_Digital+, 8 ch, 44.1/48 kHz, DepVaule 0x0
DTS-HD, 8 ch, 44.1/48/88.2/96/176.4/192 kHz, DepVaule 0x1
MAT, 8 ch, 48/96/192 kHz, DepVaule 0x0

I noticed the mis-spelling of value in the last line, but donā€™t think it is relevant.

Any further ideas? It was suggested that I should be looking at Hotplug settings, but I canā€™t find anything after much Googling.
Thanks again.

Do you have CEC turned on? Maybe the amp is polling the TV to try and activate it and dropping sync with Corelec. I have CEC turned off in my TV and amp and on my N2 as it causes too many issues. This may be because of the lousy implementation of CEC in my Sony amp or in the Samsung TV.

First up, I have CEC disabled on all of my equipment, since I use a Logitech Harmony remote for everything. In my experience, CEC absolutely does not coexist with the Harmony.

However, your reply has caused me to look more carefully at my AVR setup. Before I bought the N2, I was using various RPis in the same music configuration (Partymode Autostart, HDMI to AVR with TV off) and had this dropout issue from time to time. The common factor in all of this is the Onkyo AVR. I havenā€™t experimented thoroughly with the input signal settings but there are a few things I can try. It bothers me that sometimes music will play perfectly for 30-60mins or more, then start dropping out. It doesnā€™t appear to be related to the song file format, start/mid/end of song, LAN issues, heat, cable fault etc etc. Itā€™s driving me crazy but I will persevere. Ultimately, Iā€™d like to try a different AVR ā€¦

Thanks, and please make further suggestions if you have anything else.
Cheers

I also had an Onkyo AVR but any dropout issues I had with high-res music were down to the early linux builds for Kodi (Libreelec) on the S905/S905X Amlogic boxes. Multichannel PCM support was slow to become available but eventually kzaq nailed it in the Libreelec Amlogic builds. Since then, I really havenā€™t had any dropout problems. When Coreelec continued development on the Amlogic boxes, I switched over and Iā€™ve found the audio to be very stable subsequently. Iā€™m only recently using the N2+ and finding it great. Runs cool and very responsive. I replaced my Onkyo with a Sony AVR mainly to give myself more flexibility with network connectivity and bluetooth support. I preferred the beefier sound of the Onkyo. Like you, I also use a Logitech Harmony remote, so I have no need for CEC. I think some of the cheapo Amlogic boxes had poor CEC implementations and caused issues where you had multiple devices in the CEC chain.

I can only suggest that you turn on debug logging and see if Kodi logs anything specific when you get one of these dropouts. :thinking:

Just out of curiosity, I enabled CEC on the N2, Onkyo (RHID) and Sony TV (Bravia) for a trial. The CoreElec CEC controls are quite detailed, so I was able to have it active but not doing very much. Unfortunately, I still had audio dropouts after a while. And sure enough, mysterious changes to AVR and TV inputs started happening which totally broke my well-sorted Harmony setups. I now have CEC all disabled again.

One thing just occurred to me: I can try listening to some music from my PVR, (also on HDMI and able to output PCM), again with the TV off. Will report back later ā€¦

Thanks for your help and support!

Well that was quick ā€¦ and conclusive. Within minutes the PCM audio from the PVR started dropping out. The signal display on the Onkyo AVR went blank, exactly as it does when the CoreElec N2 audio is dropping out. BREAKTHROUGH!! CoreElec and the Odroid N2 are forgiven herewith!

I will now gracefully depart this thread (and close the other topic I raised last week). Thank you all for the assistance.

Now, where is that Onkyo support forum ā€¦

1 Like

Can you guys try this build and see if it solves the stuttering problem?
https://test.coreelec.org/arthur/CoreELEC-Amlogic-ng.arm-9.2-devel-1606608513.tar

I have tried, same stuttering as with stable version 9.2.5

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.