Bug kodi-rpi 19.1-4 crackling audio on analog output (jack)
#1
@popcornmix

There's an issue with playing movies with aac audio on the analog jack output using kodi-rpi 19.1-4 (popcornmix's gbm_matrix branch) on an RPi4 with armv7l. With the default HW decoding the sound is crackling and speech is distorted. When I select "Only allow acceleration for HEVC" the movie is software decoded and the sound is ok.

See the post on arch arm forum for details. The problem is confirmed by graysky. It has been confirmed by using following test clip "wget http://commondatastorage.googleapis.com/...kBunny.mp4".
Reply
#2
Does audio_pwm_mode=1 in config.txt help?
Reply
#3
(2021-05-17, 17:36)popcornmix Wrote: Does audio_pwm_mode=1 in config.txt help?

Yes that makes the crackling and the speech distortion disappear but now there is constant (low) noise, kind of white noise.
Reply
#4
(2021-05-17, 17:48)unformatted Wrote:
(2021-05-17, 17:36)popcornmix Wrote: Does audio_pwm_mode=1 in config.txt help?

Yes that makes the crackling and the speech distortion disappear but now there is constant (low) noise, kind of white noise.
Sorry the noise is from my speaker, was on high volume, same noise as with SW decoding so yes audio_pwm_mode=1 did the trick.
Reply
#5
(2021-05-17, 17:52)unformatted Wrote:
(2021-05-17, 17:48)unformatted Wrote:
(2021-05-17, 17:36)popcornmix Wrote: Does audio_pwm_mode=1 in config.txt help?

Yes that makes the crackling and the speech distortion disappear but now there is constant (low) noise, kind of white noise.
Sorry the noise is from my speaker, was on high volume, same noise as with SW decoding so yes audio_pwm_mode=1 did the trick.
More information:
I already tried audio_pwm_mode=2 before because that was on the raspberry pi documentation pages at least years ago, but that setting does not work. I just read 326206 (thread) and that mentions audio_pwm_mode=1, 2 and 3. So I gave it a go:

audio_pwm_mode=1 > sound ok
audio_pwm_mode=2 > crackling and distorted speech
audio_pwm_mode=3 > sound ok
audio_pwm_mode=4 > sound ok
audio_pwm_mode=5 > sound ok
..

Just how many more modes are there? All working except mode=2?
Reply
#6
There is only 1 and 2. Not specifying anything gets you 2.
2 improves quality but has issues when sdram is very busy (HW h264 decode causes that).
Reply
#7
(2021-05-17, 18:32)popcornmix Wrote: There is only 1 and 2. Not specifying anything gets you 2.
2 improves quality but has issues when sdram is very busy (HW h264 decode causes that).

Ok but before 19.1-4, I believe until 19.1-1 but I'm not sure, analog audio on jack was fine. Are you going to improve this in the next kodi version or do we have to include audio_pwm_mode=1 from now on in config.txt?
Reply
#8
(2021-05-17, 18:51)unformatted Wrote:
(2021-05-17, 18:32)popcornmix Wrote: I There is only 1 and 2. Not specifying anything gets you 2.
2 improves quality but has issues when sdram is very busy (HW h264 decode causes that).

Ok but before 19.1-4, I believe until 19.1-1 but I'm not sure, analog audio on jack was fine. Are you going to improve this in the next kodi version or do we have to include audio_pwm_mode=1 from now on in config.txt?
I just saw that graysky answered that on the arch arm forum. Thank you guys.
Reply
#9
(2021-05-17, 18:57)unformatted Wrote:
(2021-05-17, 18:51)unformatted Wrote:
(2021-05-17, 18:32)popcornmix Wrote: I There is only 1 and 2. Not specifying anything gets you 2.
2 improves quality but has issues when sdram is very busy (HW h264 decode causes that).

Ok but before 19.1-4, I believe until 19.1-1 but I'm not sure, analog audio on jack was fine. Are you going to improve this in the next kodi version or do we have to include audio_pwm_mode=1 from now on in config.txt?
I just saw that graysky answered that on the arch arm forum. Thank you guys.
To be clear, I just added those commented lines based on the info in this thread.  I am not sure if this is the intended behavior but wanted to provide some work-around.
Need help programming a Streamzap remote?
Reply
#10
@popcornmix 

I reported that audio_pwm_mode=1 did the trick but unfortunately there's another problem introduced with this setting.

On my test setup (analog speaker connected to jack) I reported a constant noise which I suspected to be in the high volume setting of the speaker. I updated my daughter's Pi after that and thought it was ok then.

Yesterday she complained about a loud hissing sound comming out of her speaker (another type then my test speaker) and I can confirm that putting her speaker on my test setup indeed produces a loud hissing sound. So I took a good quality headphone and connected it and there's also this loud hissing sound. So it appeared that I tested with a cheap speaker apparently which cuts of the higher frequencies rather sharply thus masking the hissing sound.

Summarizing it, playing aac audio on the analog (jack) output does not work:
  • audio_pwm_mode=1 produces a loud hissing sound,
  • audio_pwm_mode=2 produces crackling noises and disturbed speech,
  • disabling HW decoding gives clean sound but increases CPU temperatures dramatically.
Reply
#11
no news?
Reply



Logout Mark Read Team Forum Stats Members Help
kodi-rpi 19.1-4 crackling audio on analog output (jack)0
This forum uses Lukasz Tkacz MyBB addons.