Two channel playback not working after multichannel playback

I’m on the 19.3 nightlys:

2022-03-04 19:42:32.501 T:3698 INFO : Starting Kodi (19.3 (19.3.0) Git:6a5726ffa07d25ab7be51b9a92ef4d09aa9b6bc3). Platform: Linux ARM 32-bit
2022-03-04 19:42:32.501 T:3698 INFO : Using Release Kodi x32
2022-03-04 19:42:32.501 T:3698 INFO : Kodi compiled 2022-02-26 by GCC 10.3.0 for Linux ARM 32-bit version 4.9.255 (264703)
2022-03-04 19:42:32.501 T:3698 INFO : Running on Hardkernel ODROID-N2Plus with CoreELEC (official): 19.4-Matrix_nightly_20220226, kernel: Linux ARM 64-bit version 4.9.269
2022-03-04 19:42:32.501 T:3698 INFO : FFmpeg version/source: 4.3.2-Kodi

I’m having an issue where after playing a 5 or 6 channel FLAC audio file successfully, I then get silence when I subsequently play a two channel FLAC file.

My kodi config is for 7.1 audio on HDMI Multi Ch PCM (haven’t changed it).

When playing back a multichannel file:

2022-03-04 19:45:44.672 T:3930    DEBUG <general>: CFileCache::Process - <smb://192.168.0.112/Multimedia/multichannel/The Stranger (SACD 5.1)/07 - She's Always A Woman.flac> cache completely reset for seek to position 83330
2022-03-04 19:45:44.672 T:3921    DEBUG <general>: SeekTime - seek ended up on time 0.000
2022-03-04 19:45:45.087 T:3921     INFO <general>: Skipped 1 duplicate messages..
2022-03-04 19:45:45.087 T:3921     INFO <general>: AudioDecoder: File is queued
2022-03-04 19:45:45.089 T:3704     INFO <general>: CActiveAESink::OpenSink - initialize sink
2022-03-04 19:45:45.089 T:3704    DEBUG <general>: CActiveAESink::OpenSink - trying to open device ALSA:surround71:CARD=AMLAUGESOUND,DEV=0
2022-03-04 19:45:45.089 T:3704     INFO <general>: CAESinkALSA::Initialize - Configure simple control for "AUGESOUND"
2022-03-04 19:45:45.089 T:3704     INFO <general>: CAESinkALSA - Use card "hw:0" and set codec format "8 CH PCM"
2022-03-04 19:45:45.090 T:3704     INFO <general>: CAESinkALSA - Set codec for "Audio spdif format"
2022-03-04 19:45:45.090 T:3704     INFO <general>: CAESinkALSA - Set codec for "Audio spdif_b format"
2022-03-04 19:45:45.090 T:3704     INFO <general>: CAESinkALSA - Set Spdif to HDMITX to "Spdif"
2022-03-04 19:45:45.090 T:3704     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "surround71:CARD=AMLAUGESOUND,DEV=0"
2022-03-04 19:45:45.095 T:3921    DEBUG <general>: AudioDecoder::GetReplayGain - Final Replaygain applied: 1.000000, Track/Album Gain 89.000000, Peak 1.000000
2022-03-04 19:45:45.096 T:3704     INFO <general>: CAESinkALSA::Initialize - Opened device "surround71:CARD=AMLAUGESOUND,DEV=0"
2022-03-04 19:45:45.098 T:3704    DEBUG <general>: CAESinkALSA::SelectALSAChannelMap - Selected ALSA map "FL FR LFE FC RL RR"
2022-03-04 19:45:45.098 T:3704     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2022-03-04 19:45:45.099 T:3704     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4
2022-03-04 19:45:45.099 T:3704    DEBUG <general>: CAESinkALSA::InitializeHW - Request: periodSize 4410, bufferSize 17640
2022-03-04 19:45:45.153 T:3704    DEBUG <general>: CAESinkALSA::InitializeHW - Got: periodSize 4410, bufferSize 17640
2022-03-04 19:45:45.153 T:3704    DEBUG <general>: CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2022-03-04 19:45:45.153 T:3704    DEBUG <general>: CAESinkALSA::GetChannelLayout - Input Channel Count: 6 Output Channel Count: 6
2022-03-04 19:45:45.153 T:3704    DEBUG <general>: CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR, FC, LFE, SL, SR
2022-03-04 19:45:45.153 T:3704    DEBUG <general>: CAESinkALSA::GetChannelLayout - Got Layout: FL, FR, LFE, FC, SL, SR (ALSA: FL FR LFE FC RL RR)
2022-03-04 19:45:45.153 T:3704    DEBUG <general>: CActiveAESink::OpenSink - ALSA Initialized:
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Output Device : AML-AUGESOUND
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Sample Rate   : 88200
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Sample Format : AE_FMT_S24NE4
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Channel Count : 6
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Channel Layout: FL, FR, LFE, FC, SL, SR
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Frames        : 4410
2022-03-04 19:45:45.153 T:3704    DEBUG <general>:   Frame Size    : 24
2022-03-04 19:45:45.166 T:3703    DEBUG <general>: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
2022-03-04 19:45:45.217 T:3921     INFO <general>: Skipped 1 duplicate messages..
2022-03-04 19:45:45.217 T:3921     INFO <general>: PAPlayer::PrepareStream - Ready
2022-03-04 19:45:45.218 T:3929    DEBUG <general>: OnAVStarted: CApplication::OnAVStarted
2022-03-04 19:45:45.256 T:3698    DEBUG <general>: ------ Window Deinit (DialogBusy.xml) ------
2022-03-04 19:46:03.188 T:3722    DEBUG <general>: CLibInputKeyboard::ProcessKey - using delay: 400ms repeat: 80ms
2022-03-04 19:46:03.188 T:3932    DEBUG <general>: Thread Timer start, auto delete: false
2022-03-04 19:46:03.196 T:3698    DEBUG <general>: Keyboard: scancode: 0xa6, sym: 0x00b2, unicode: 0x0000, modifier: 0x0

When I then switch to a normal stereo two channel file:

2022-03-04 19:46:09.313 T:3943 DEBUG : CFileCache::Process - <smb://192.168.0.112/Multimedia/music/Yo-Yo Ma/The Six Unaccompanied Cello Suites (Disc 1)/01 - Suite No. 1 in G major, BWV 1007 I. Prelude.flac> cache completely reset for seek to position 8740
2022-03-04 19:46:09.314 T:3936 DEBUG : SeekTime - seek ended up on time 0.000
2022-03-04 19:46:09.344 T:3698 INFO : Skipped 1 duplicate messages…
2022-03-04 19:46:09.344 T:3698 DEBUG : ------ Window Init (DialogBusy.xml) ------
2022-03-04 19:46:09.398 T:3936 INFO : AudioDecoder: File is queued
2022-03-04 19:46:09.400 T:3936 DEBUG : AudioDecoder::GetReplayGain - Final Replaygain applied: 1.000000, Track/Album Gain 89.000000, Peak 1.000000
2022-03-04 19:46:09.402 T:3703 DEBUG : CActiveAE::ClearDiscardedBuffers - buffer pool deleted
2022-03-04 19:46:09.411 T:3936 INFO : PAPlayer::PrepareStream - Ready
2022-03-04 19:46:09.412 T:3942 DEBUG : OnAVStarted: CApplication::OnAVStarted
2022-03-04 19:46:09.414 T:3704 INFO : CActiveAESink::OpenSink - initialize sink
2022-03-04 19:46:09.414 T:3704 DEBUG : CActiveAESink::OpenSink - trying to open device ALSA:surround71:CARD=AMLAUGESOUND,DEV=0
2022-03-04 19:46:09.414 T:3704 INFO : CAESinkALSA::Initialize - Configure simple control for “AUGESOUND”
2022-03-04 19:46:09.414 T:3704 INFO : CAESinkALSA - Use card “hw:0” and set codec format “2 CH PCM”
2022-03-04 19:46:09.418 T:3704 INFO : CAESinkALSA - Set codec for “Audio spdif format”
2022-03-04 19:46:09.418 T:3704 INFO : CAESinkALSA - Set codec for “Audio spdif_b format”
2022-03-04 19:46:09.418 T:3704 INFO : CAESinkALSA - Set Spdif to HDMITX to “Spdif”
2022-03-04 19:46:09.418 T:3704 INFO : CAESinkALSA::Initialize - Attempting to open device “surround71:CARD=AMLAUGESOUND,DEV=0”
2022-03-04 19:46:09.429 T:3704 INFO : CAESinkALSA::Initialize - Opened device “surround71:CARD=AMLAUGESOUND,DEV=0”
2022-03-04 19:46:09.430 T:3704 DEBUG : CAESinkALSA::SelectALSAChannelMap - Selected ALSA map “FL FR”
2022-03-04 19:46:09.430 T:3704 INFO : CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2022-03-04 19:46:09.431 T:3704 INFO : CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE4
2022-03-04 19:46:09.431 T:3704 DEBUG : CAESinkALSA::InitializeHW - Request: periodSize 2205, bufferSize 8820
2022-03-04 19:46:09.432 T:3704 DEBUG : CAESinkALSA::InitializeHW - Got: periodSize 2205, bufferSize 8820
2022-03-04 19:46:09.432 T:3704 DEBUG : CAESinkALSA::InitializeHW - Setting timeout to 200 ms
2022-03-04 19:46:09.432 T:3704 DEBUG : CAESinkALSA::GetChannelLayout - Input Channel Count: 2 Output Channel Count: 2
2022-03-04 19:46:09.432 T:3704 DEBUG : CAESinkALSA::GetChannelLayout - Requested Layout: FL, FR
2022-03-04 19:46:09.432 T:3704 DEBUG : CAESinkALSA::GetChannelLayout - Got Layout: FL, FR (ALSA: FL FR)
2022-03-04 19:46:09.432 T:3704 DEBUG : CActiveAESink::OpenSink - ALSA Initialized:
2022-03-04 19:46:09.432 T:3704 DEBUG : Output Device : AML-AUGESOUND
2022-03-04 19:46:09.432 T:3704 DEBUG : Sample Rate : 44100
2022-03-04 19:46:09.432 T:3704 DEBUG : Sample Format : AE_FMT_S24NE4
2022-03-04 19:46:09.432 T:3704 DEBUG : Channel Count : 2
2022-03-04 19:46:09.432 T:3704 DEBUG : Channel Layout: FL, FR
2022-03-04 19:46:09.432 T:3704 DEBUG : Frames : 2205
2022-03-04 19:46:09.432 T:3704 DEBUG : Frame Size : 8
2022-03-04 19:46:09.436 T:3698 DEBUG : ------ Window Deinit (DialogBusy.xml) ------
2022-03-04 19:46:11.152 T:3943 DEBUG : CFileCache::Process - <smb://192.168.0.112/Multimedia/music/Yo-Yo Ma/The Six Unaccompanied Cello Suites (Disc 1)/01 - Suite No. 1 in G major, BWV 1007 I. Prelude.flac> source read hit eof
2022-03-04 19:46:39.171 T:3935 DEBUG : Thread JobWorker 3443110528 terminating (autodelete)
2022-03-04 19:46:39.171 T:3921 DEBUG : Thread JobWorker 3509469824 terminating (autodelete)
2022-03-04 19:46:39.171 T:3937 DEBUG : Thread JobWorker 3520012928 terminating (autodelete)
2022-03-04 19:46:39.411 T:3936 DEBUG : Thread JobWorker 3816800896 terminating (autodelete)
2022-03-04 19:46:52.276 T:3722 DEBUG : CLibInputKeyboard::ProcessKey - using delay: 400ms repeat: 80ms
2022-03-04 19:46:52.277 T:3698 DEBUG : Keyboard: scancode: 0xa6, sym: 0x00b2, unicode: 0x0000, modifier: 0x0
2022-03-04 19:46:52.277 T:3698 DEBUG : HandleKey: stop (0xf0bc) pressed, action is Stop
2022-03-04 19:46:52.277 T:3945 DEBUG : Thread Timer start, auto delete: false
2022-03-04 19:46:52.338 T:3943 DEBUG : Thread FileCache 3485409920 terminating
2022-03-04 19:46:52.340 T:3942 DEBUG : CSMBFile::Close closing fd 10000
2022-03-04 19:46:52.357 T:3946 DEBUG : Thread JobWorker start, auto delete: true
2022-03-04 19:46:52.358 T:3703 DEBUG : CActiveAE::DiscardStream - audio stream deleted

and the stream plays silently…
Anyone else with this issue?

Replying to my own post…
I’ve reverted to the “stable” 19.4 release and the problem continues.
Basically, if I play a multichannel FLAC file (5.1 at 88.2/96.0 kHz) with my config set at HDMI Multichannel PCM 7.1 as per normal, it plays perfectly fine as an LPCM stream. However, if I play a normal stereo FLAC file (2.0 at 44.1kHz) after this, then I don’t hear anything through my AVR, although the GUI shows the file play in progress.

If, however, I play a stereo FLAC file encoded at 192kHz or 88.2kHz or 96.0kHz it will play ok and then subsequently normal (2.0 at 44.1kHz) files will play ok. It seems like there is an issue going from multichannel files to normally encoded stereo files. I can’t resolve the problem as I’ve gone from nightlies back to the stable 19.4 release.

I finally have been able to post a logfile (http://ix.io/3RIU). My prior post contained embedded log data as I couldn’t upload a logfile.

EDIT - some more info. I have navigation sounds set on in the UI, so I can hear clicks as I navigate my library.
19:03:22 in logfile I select my 5.1 album track encoded as 24bit 96kHz. Plays properly.
19:03:46 - press STOP and navigate to next album track. No navigation sounds heard.
19:04:01 - select 2.0 track encoded as 24bit 192kHz. Plays properly.
19:04:28 - press STOP and navigate to next track. Navigation sounds heard.
19:04:46 - select 2.0 track encoded as 16bit 44.1kHz. Plays properly.
19:05:13 - press STOP. Navigation sounds heard.

It seems that if I select to play a stereo track (2.0) encoded in a high def format after playing a multichannel track, then normal navigation sounds are heard and standard FLAC files at CD resolutions can be played.

I wonder if the AMLAUGESOUND driver has changed in recent months?

My current surround71 info is displayed in the log as:

2022-03-08 19:02:21.091 T:5359 INFO : Device 3
2022-03-08 19:02:21.091 T:5359 INFO : m_deviceName : surround71:CARD=AMLAUGESOUND,DEV=0
2022-03-08 19:02:21.091 T:5359 INFO : m_displayName : AML-AUGESOUND
2022-03-08 19:02:21.091 T:5359 INFO : m_displayNameExtra: HDMI Multi Ch PCM
2022-03-08 19:02:21.091 T:5359 INFO : m_deviceType : AE_DEVTYPE_PCM
2022-03-08 19:02:21.091 T:5359 INFO : m_channels : FL, FR, LFE, FC, BL, BR, BLOC, BROC
2022-03-08 19:02:21.091 T:5359 INFO : m_sampleRates : 32000,44100,48000,88200,96000,176400,192000
2022-03-08 19:02:21.091 T:5359 INFO : m_dataFormats : AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
2022-03-08 19:02:21.091 T:5359 INFO : m_streamTypes : No passthrough capabilities

A previous logfile from 2021 shows this:

2021-06-14 07:53:07.343 T:4777 INFO : Device 3
2021-06-14 07:53:07.343 T:4777 INFO : m_deviceName : surround71:CARD=AMLAUGESOUND,DEV=0
2021-06-14 07:53:07.343 T:4777 INFO : m_displayName : AML-AUGESOUND
2021-06-14 07:53:07.343 T:4777 INFO : m_displayNameExtra: HDMI Multi Ch PCM
2021-06-14 07:53:07.343 T:4777 INFO : m_deviceType : AE_DEVTYPE_PCM
2021-06-14 07:53:07.343 T:4777 INFO : m_channels : FL, FR, BL, BR, FC, LFE, SL, SR
2021-06-14 07:53:07.343 T:4777 INFO : m_sampleRates : 32000,44100,48000,88200,96000,176400,192000
2021-06-14 07:53:07.343 T:4777 INFO : m_dataFormats : AE_FMT_S24NE4,AE_FMT_S32NE,AE_FMT_S16NE,AE_FMT_S16LE
2021-06-14 07:53:07.343 T:4777 INFO : m_streamTypes : No passthrough capabilities

The m_channels are listed in a different order and have different designations (BLOC instead of SL and BROC instead of SR).

Would this have any bearing on my issue, perhaps?

Could one of the devs please review this. In deperation, I reverted back to an uSD card build of 9.2.8 stable and I have no issue hearing UI navigation sounds and playing 2.0 FLAC files after playing 5.1 FLAC LPCM. Unfortunately, as regards tracking down the issue, all the software is different in 9.2.8 (kernel, Kodi, ffmpeg version etc. etc.).

I think it’s the AML-AUGESOUND driver, though. In 19.4 the enumeration of ALSA devices seems to happen three times when Kodi loads. There are also references to spdif as follows:

2022-03-08 19:03:47.259 T:5360 INFO : CAESinkALSA - Use card “hw:0” and set codec format “2 CH PCM”
2022-03-08 19:03:47.260 T:5360 INFO : CAESinkALSA - Set codec for “Audio spdif format”
2022-03-08 19:03:47.260 T:5360 INFO : CAESinkALSA - Set codec for “Audio spdif_b format”
2022-03-08 19:03:47.260 T:5360 INFO : CAESinkALSA - Set Spdif to HDMITX to “Spdif”

which do not appear in the 9.2.8 log.

For comparison the 19.4 log - http://ix.io/3RIU

The 9.2.8 log - http://ix.io/3Sz1

Fixed in nightly 20220402 (or possibly earlier). hdmitx fixed by @Portisch

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