kodi-rpi HDMI audio stutter

This forum is for discussion about general software issues.

kodi-rpi HDMI audio stutter

Postby pejobo » Thu Apr 28, 2022 10:12 pm

[Hardware: Raspberry 3B (not plus)]

Hi,
I've got audio stutter on my kodi during audio playback over hdmi (over audio jack everything is fine, with audio_pwm_mode=1). I tried multiple formats and so far each one has the same effect. It's roughly once a second and very very annoying.
In addition to stutter audio seems to get worse over time (some distortion noise builds up) - but that may be an unrelated problem.
Because of an rebuild from backup due to SD card failure and vacation I cannot pinpoint it to a specific change of any package or rollback different packages to narrow down the cause (but I suspect the firmware). Currently all packages are up-to-date.

My question: Does anybody experiences a similar issue? Or has any tips how to tackle this?

This is an arbitrary example of kodi.log playing a video:
$this->bbcode_second_pass_code('', '
2022-04-28 22:40:45.940 T:938 INFO <general>: CDVDVideoCodecDRMPRIME::Open - using decoder V4L2 mem2mem H.264 decoder wrapper
2022-04-28 22:40:45.987 T:938 INFO <general>: Creating video thread
2022-04-28 22:40:45.988 T:961 INFO <general>: running thread: video_thread
2022-04-28 22:40:45.989 T:938 INFO <general>: Opening stream: 1002 source: 256
2022-04-28 22:40:46.024 T:938 INFO <general>: Finding audio codec for: 86018
2022-04-28 22:40:46.026 T:938 INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2022-04-28 22:40:46.027 T:938 INFO <general>: Creating audio thread
2022-04-28 22:40:46.027 T:963 INFO <general>: running thread: CVideoPlayerAudio::Process()
2022-04-28 22:40:46.316 T:963 INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2022-04-28 22:40:46.317 T:963 INFO <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2022-04-28 22:40:46.347 T:477 INFO <general>: CActiveAESink::OpenSink - initialize sink
2022-04-28 22:40:46.569 T:477 INFO <general>: PulseAudio: Opened device Default in pcm mode with Buffersize 150 ms Periodsize 50 ms
')

I played with the video settings "Adjust display refresh rate" and "Sync playback to display" (and various others) but got no improvements.
pejobo
 
Posts: 50
Joined: Tue Apr 07, 2015 5:42 pm

Re: kodi-rpi HDMI audio stutter

Postby Coffeinflash » Fri Apr 29, 2022 8:55 am

Not sure if this is related...
Since update of linux-rpi to 5.15.35.x I have issues with sound on my Pi3B. The sound runs too fast using kodi-rpi-git, it sounds like the jamba frog from earlier days.

I downgraded linux-rpi to 5.15.34-3 and it runs fine again.
Coffeinflash
 
Posts: 6
Joined: Fri Apr 29, 2022 8:47 am

Re: kodi-rpi HDMI audio stutter

Postby pejobo » Fri Apr 29, 2022 9:19 am

Thank you for the tip, found a local backup of linux-rpi-5.15.34-1. I will downgrade and report back here.
pejobo
 
Posts: 50
Joined: Tue Apr 07, 2015 5:42 pm

Re: kodi-rpi HDMI audio stutter

Postby graysky » Fri Apr 29, 2022 5:53 pm

If you're experiencing audio issues that you believe to be kernel related, please open a ticket on github against the kernel so the RPi guys can be made aware of it. They have been quick to engage in the past.

https://github.com/raspberrypi/linux/is ... report.yml
graysky
Developer
 
Posts: 1728
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: kodi-rpi HDMI audio stutter

Postby pejobo » Fri Apr 29, 2022 9:38 pm

Downgrade to linux-rpi-5.15.34-1 fixed it.
I'm currently reporting upstream.
UPDATE: https://github.com/raspberrypi/linux/issues/5016

Thanks for the support (y)
pejobo
 
Posts: 50
Joined: Tue Apr 07, 2015 5:42 pm

Re: kodi-rpi HDMI audio stutter

Postby Coffeinflash » Sat Apr 30, 2022 7:03 am

Just did the kernel-update again for cross checking with the same results:

Kernel:
$this->bbcode_second_pass_code('', 'Linux Kleinerbaer 5.15.36-1-rpi-ARCH #1 SMP Thu Apr 28 18:45:07 UTC 2022 armv7l GNU/Linux')

System:
$this->bbcode_second_pass_code('', 'OS: Arch Linux ARM armv7l
Host: Raspberry Pi 3 Model B Rev 1.')

kodi.log (playing Livestream):
$this->bbcode_second_pass_code('', '2022-04-30 08:43:42.228 T:595 info <general>: VideoPlayer::OpenFile: pvr://channels/tv/Alle%20Kan%c3%a4le/pvr.waipu_1142741733.pvr
2022-04-30 08:43:42.233 T:1000 info <general>: Creating InputStream
2022-04-30 08:43:42.500 T:1000 info <general>: AddOnLog: inputstream.adaptive: SetVideoResolution (1920x1080)
2022-04-30 08:43:42.710 T:1000 info <general>: AddOnLog: inputstream.adaptive: Successfully parsed manifest file. #Periods: 1, #Streams in first period: 2, Type: live, Download speed: 988745.7895 Bytes/s
2022-04-30 08:43:43.464 T:1000 info <general>: Creating Demuxer
2022-04-30 08:43:43.472 T:1000 info <general>: Opening stream: 1001 source: 256
2022-04-30 08:43:43.673 T:1000 info <general>: [WHITELIST] Searching the whitelist for: width: 720, height: 540, fps: 25.000, 3D: false
2022-04-30 08:43:43.682 T:1000 info <general>: Display resolution ADJUST : 1920x1080 @ 25.000000 Hz (46) (weight: 0.000)
2022-04-30 08:43:43.734 T:595 info <general>: VideoPlayer: OnLostDisplay received
2022-04-30 08:43:43.734 T:595 warning <general>: CDVDMessageQueue(audio)::Put MSGQ_NOT_INITIALIZED
2022-04-30 08:43:43.734 T:595 warning <general>: CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED
2022-04-30 08:43:43.734 T:595 info <general>: GLES: Maximum texture width: 2048
2022-04-30 08:43:43.736 T:1000 info <general>: Creating video codec with codec id: 27
2022-04-30 08:43:43.744 T:1000 info <general>: CDVDVideoCodecDRMPRIME::Open - using decoder V4L2 mem2mem H.264 decoder wrapper
2022-04-30 08:43:43.844 T:595 info <general>: VideoPlayer: OnResetDisplay received
2022-04-30 08:43:43.949 T:595 warning <general>: CDVDMessageQueue(audio)::Put MSGQ_NOT_INITIALIZED
2022-04-30 08:43:43.950 T:595 warning <general>: CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED
2022-04-30 08:43:43.950 T:595 warning <general>: CDVDMessageQueue(audio)::Put MSGQ_NOT_INITIALIZED
2022-04-30 08:43:43.991 T:1000 info <general>: Creating video thread
2022-04-30 08:43:43.992 T:1010 info <general>: running thread: video_thread
2022-04-30 08:43:43.996 T:1000 info <general>: Opening stream: 1002 source: 256
2022-04-30 08:43:43.997 T:1000 info <general>: Finding audio codec for: 86018
2022-04-30 08:43:44.029 T:1000 info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2022-04-30 08:43:44.029 T:1000 info <general>: Creating audio thread
2022-04-30 08:43:44.030 T:1011 info <general>: running thread: CVideoPlayerAudio::Process()
2022-04-30 08:43:44.043 T:1011 info <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2022-04-30 08:43:44.046 T:1011 info <general>: Skipped 1 duplicate messages..
2022-04-30 08:43:44.046 T:1011 info <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2022-04-30 08:43:44.107 T:609 info <general>: CActiveAESink::OpenSink - initialize sink
2022-04-30 08:43:44.289 T:609 info <general>: CAESinkALSA::Initialize - Attempting to open device "@:CARD=vc4hdmi,DEV=0"
2022-04-30 08:43:44.312 T:609 info <general>: CAESinkALSA - Unable to open device "sysdefault:CARD=vc4hdmi" for playback
2022-04-30 08:43:44.318 T:609 info <general>: CAESinkALSA - Unable to open device "default:CARD=vc4hdmi" for playback
2022-04-30 08:43:44.319 T:609 info <general>: CAESinkALSA::Initialize - Opened device "front:CARD=vc4hdmi,DEV=0"
2022-04-30 08:43:44.320 T:609 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2022-04-30 08:43:44.320 T:609 error <general>: CAESinkALSA::InitializeHW - Unable to find a suitable output format
2022-04-30 08:43:44.320 T:609 info <general>: CAESinkALSA::Initialize - Attempting to open device "iec958"
2022-04-30 08:43:44.327 T:609 info <general>: CAESinkALSA::Initialize - Opened device "iec958:AES0=0x04,AES1=0x82,AES2=0x00,AES3=0x02"
2022-04-30 08:43:44.329 T:609 info <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2022-04-30 08:43:44.329 T:609 info <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE3
2022-04-30 08:43:44.644 T:595 info <general>: Loading skin file: VideoFullScreen.xml, load type: KEEP_IN_MEMORY
2022-04-30 08:43:44.653 T:595 info <general>: [WHITELIST] Searching the whitelist for: width: 720, height: 540, fps: 25.000, 3D: false
2022-04-30 08:43:44.664 T:595 info <general>: Display resolution ADJUST : 1920x1080 @ 25.000000 Hz (46) (weight: 0.000)
2022-04-30 08:43:44.782 T:1000 info <general>: AddOnLog: inputstream.adaptive: PosTime (100744)
2022-04-30 08:43:44.954 T:1000 info <general>: AddOnLog: inputstream.adaptive: Seek time (100.7) for stream: 196609 continues at 100.8 (PTS: 29249864533)
2022-04-30 08:43:44.954 T:1000 error <general>: AddOnLog: inputstream.adaptive: SeekTime: Cannot get the stream sample reader
2022-04-30 08:43:44.965 T:1010 warning <general>: OutputPicture - timeout waiting for buffer
2022-04-30 08:43:52.619 T:608 info <general>: Skipped 1 duplicate messages..
2022-04-30 08:43:52.619 T:608 warning <general>: ActiveAE - large audio sync error: 1004.955031
2022-04-30 08:43:52.656 T:608 warning <general>: ActiveAE - large audio sync error: 1013.319614
2022-04-30 08:43:52.692 T:608 warning <general>: ActiveAE - large audio sync error: 1022.663990
2022-04-30 08:43:52.729 T:608 warning <general>: ActiveAE - large audio sync error: 1031.017323
2022-04-30 08:43:52.766 T:608 warning <general>: ActiveAE - large audio sync error: 1039.359510
2022-04-30 08:43:52.804 T:608 warning <general>: ActiveAE - large audio sync error: 1046.710603
2022-04-30 08:43:52.839 T:608 warning <general>: ActiveAE - large audio sync error: 1057.026646')

dmesg:
https://paste.opensuse.org/65040553
Coffeinflash
 
Posts: 6
Joined: Fri Apr 29, 2022 8:47 am

Re: kodi-rpi HDMI audio stutter

Postby Coffeinflash » Sun May 08, 2022 6:03 am

jfyi:
Issue is fixed meanwhile.
Coffeinflash
 
Posts: 6
Joined: Fri Apr 29, 2022 8:47 am


Return to General

Who is online

Users browsing this forum: No registered users and 10 guests