Skip to content

HDMI sound broken with kernel 5.15.36 #5016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pejobo opened this issue Apr 29, 2022 · 14 comments
Closed

HDMI sound broken with kernel 5.15.36 #5016

pejobo opened this issue Apr 29, 2022 · 14 comments

Comments

@pejobo
Copy link

pejobo commented Apr 29, 2022

Describe the bug

HDMI sound is distorted with 5.15.36 on Pi 3B. See also https://archlinuxarm.org/forum/viewtopic.php?f=57&t=16012

Rolling back to 5.15.34 fixed the issue for me.

Steps to reproduce the behaviour

Play sound over HDMI using pulse audio (tested with mp3, aac) and check for distortion, skips, etc.

Device (s)

Raspberry Pi 3 Mod. B

System

Operating System: Arch Linux ARM
Kernel: Linux 5.15.36-1-rpi-ARCH
Architecture: arm

Logs

Nothing shows up in dmsg

Additional context

Sounds over audio jack is fine.

@coffeinflash
Copy link

coffeinflash commented Apr 30, 2022

Just some logs running kodi-standalone with plain alsa - no pulseaudio, pipewire etc.:

System:
OS: Arch Linux ARM armv7l Host: Raspberry Pi 3 Model B Rev 1.

Kernel:
Linux Kleinerbaer 5.15.36-1-rpi-ARCH #1 SMP Thu Apr 28 18:45:07 UTC 2022 armv7l GNU/Linux

kodi.log (playing Livestream):

    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

@neo1973
Copy link

neo1973 commented May 2, 2022

I can confirm the issue. CEC also stopped working after 5.15.34.

@popcornmix
Copy link
Collaborator

@neo1973 are you also on arch and rpi3?

@popcornmix
Copy link
Collaborator

It looks like it started with raspberrypi/rpi-firmware@1edb1cc
(i.e. the clock framework improvements).
I see cec failure on pi3 but not pi4.

@neo1973
Copy link

neo1973 commented May 3, 2022

@neo1973 are you also on arch and rpi3?

Yes, I have the same setup as the other two commenters.

@popcornmix
Copy link
Collaborator

Narrowed down to: #5006
but I think that commit is okay and the issue is on firmware side.

@popcornmix
Copy link
Collaborator

@pejobo @neo1973 @coffeinflash can you test this firmware and confirm if it fixes issue?

@coffeinflash
Copy link

@popcornmix
Thank you! Works for me :-)

popcornmix added a commit to raspberrypi/firmware that referenced this issue May 6, 2022
See: raspberrypi/linux#5016

firmware: dtblob: Use a cached alias to reduce boot time

firmware: hdmi: Reduce the number of EDID retries if hotplug is not detected
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this issue May 6, 2022
See: raspberrypi/linux#5016

firmware: dtblob: Use a cached alias to reduce boot time

firmware: hdmi: Reduce the number of EDID retries if hotplug is not detected
@neo1973
Copy link

neo1973 commented May 7, 2022

Today I did full update of my Raspberry Pi and the issue is gone. I downgraded the kernel and firmware packages but can't reproduce the error anymore. I have no idea what change fixed it :(

@popcornmix
Copy link
Collaborator

The stable kernel (5.15.32) doesn't have the issue.
The issue only for appeared for users running the testing rpi-update kernel.
And it has now been fixed with latest rpi-update kernel.

@neo1973
Copy link

neo1973 commented May 7, 2022

I'm on 5.15.36. But my mistake was to downgrade the raspberrypi-firmware package and not raspberrypi-bootloader which contains the relevant files. After downgrading raspberrypi-bootloader the issue was back. The current raspberrypi-bootloader on Arch contains the "firmware: arm_loader_dvfs: Support CLOCK_HDMI as boostable clock" commit and with that everything is back to normal 👍

@popcornmix
Copy link
Collaborator

@pejobo is this resolved for you with latest firmware?

@pejobo
Copy link
Author

pejobo commented May 10, 2022

I could try this weekend.

@pejobo
Copy link
Author

pejobo commented May 10, 2022

I was able to test earlier as expected. Works for me, too.
Thank you for the quick fix 👍

mkreisl added a commit to xbianonpi/xbian-package-firmware that referenced this issue Jul 1, 2023
- firmware: board_info: Handle misprogrammed 3B rev 1.2s

- firmware: mmal: Add mapping for IL OMX_IndexParamBrcmEnableIJGTableScaling param

- firmware: Handle overlay parameters embedded in overlay_map.dtb
  See: raspberrypi/linux#4860

- firmware: firmware: Add HDMI_PORTS trait

- firmware: arm_dt: Fix rpi-poe overlay parameters
  See: #1689

- firmware: jpeghw: Skip APP0 AVI1 headers, regardless of length
  See: https://forums.raspberrypi.com/viewtopic.php?p=1975448

- firmware: camera_subsystem: Report ignored interfaces due to libcamera
- See: #1679

- firmware: Export os_prefix, overlay_prefix, rsts and boot-mode on all models

- firmware: vcfw/hdmi_i2c: Initialise all instances from hdmi_i2c_init

- firmware: dtoverlay: Add support for string escape sequences
  See: https://forums.raspberrypi.com/viewtopic.php?t=330792

- firmware: isp: R and B order must be swapped when reading VC_IMAGE_RGBA32 into the ISP
  See: http://git/vc4/vc4/-/merge_requests/1430

- firmware: dtoverlay: Fix path rebasing and exports

- firmware: dtoverlay: Fix clang warnings

- firmware: arm_loader_dvfs: Make arm only see its own boosts, fixed and min clocks

- firmware: arm_loader: Support longer file paths
  See: #1720

- firmware: arm_loader_dvfs: Support CLOCK_HDMI as boostable clock
  See: raspberrypi/linux#5016

- firmware: dtblob: Use a cached alias to reduce boot time

- firmware: hdmi: Reduce the number of EDID retries if hotplug is not detected

- firmware: variants: Add mjpg_encode to the standard firmware image

- firmware: vcgencmd display_power and camera_auto_detect fixes

- firmware: arm_loader_dvfs: Only add clocks to boostable list when they have been boosted
  See: #1726

- firmware: arm_dt: Try upstream DTB files if downstream absent

- firmware: arm_loader: Delay the USB controller switchover

- firmware: Fix for vc_image YUYV family to YUV422 planar conversion function

- firmware: arm_loader_dvfs: Only add clocks to boostable list when they have been boosted
  See: #1726

- firmware: arm_dt: Try upstream DTB files if downstream absent

- firmware: arm_loader: Delay the USB controller switchover

- firmware: Fix for vc_image YUYV family to YUV422 planar conversion function

- firmware: arm_dt: camera_auto_detect cam0 flag needs to look at Unicam instance, not port

- firmware: platform: over-voltage Zero 2 W by two pips
  See: #1723

- firmware: hello_pi: Fix some build issues
  See: #1728

- firmware: video_decode: Stop decode on a colourspace change
  See: raspberrypi/linux#5059

- firmware: video_encode: Fix subsample image alignment assert

- firmware: tc358762_DSI: Don't start the PV and DSI before the HVS

- firmware: arm-dt: Export log buffer addresses to /proc/chosen/log

- firmware: arm_loader: Fix GET_CLOCKS to not overwrite client buffer
  See: #1688

- firmware: arm_loader: Declare program_sdhost_use_dma

- firmware: arm_loader: initramfs over NVME fix
  See: #1731

- firmware: Disable BT flow control pins for Pi3 rev1.3

- firmware: power: Fix failover to secondary PMIC interface functions
  See: https://forums.raspberrypi.com/viewtopic.php?t=338429

- firmware: arm_loader: Correct GPIO expander initial state via SET_GPIO_CONFIG
  See: raspberrypi/linux#5107

- firmware: platform: Set min_frequency for HDMI SM clock on Pi0-3

- firmware: arm_loader: Never set warranty bit
  See: #1741

- firmware: vcfw: camera_subsystem: Fix loop counter for powering up devices
  See: https://forums.raspberrypi.com/viewtopic.php?t=338917

- firmware: ldconfig: Add [cm4s] conditional

- firmware: Fix USB boot
  See: #1744

- firmware: video decode/MJPEG fixes
  See: http://git/vc4/vc4/-/merge_requests/1548

- firmware: power: Restore VEC and PIXEL clocks after HDMI domain power cycle
  See: raspberrypi/linux#4962

- firmware: isp: Workaround for very unpleasant artifacts in the sharpening block

- firmware: arm_loader: Raise maximum gzipped kernel size

- firmware: arm-loader: Indicate tryboot status via /proc/device-tree/chosen/bootloader/tryboot

- firmware: arm_loader: Increase TFTP block size to 1468 bytes
  See: raspberrypi/rpi-eeprom#375

- firmware: Add kernel= logging

- firmware: camera_auto_detect changes
  See: #1750

- firmware: board_info: Fix Pi 400 PHY addresses
  See: #1754

- firmware: il: isp: Correct order buffers were returned in

- firmware: isp: Run ISP without hi-res output buffer

- firmware: arm_dt: Export the bootloader EEPROM RSA public key via device-tree

- firmware: Add tryboot A_B mode

- firmware: ldconfig: Add all, none, tryboot section support to autoboot.txt for start.elf

- firmware: arm-dt: bootloader: Pass the original partition number when booting a ramdisk

- firmware: arm_loader: HAT EEPROM support for GPIO bank 1
  See: #1756

- firmware: arm_loader: Add vcmailbox support for 256bit OTP customer device key
  See: raspberrypi/usbboot#163

- firmware: il: video_encode: MJPEG is not conditional on being RASPBERRYPI_FULL

- firmware: arm_loader: Improvements to Compute Module audio
  See: https://forums.raspberrypi.com/viewtopic.php?p=2052680

- firmware: arm_loader: Fix GPIO bank 1 support
  See: #1756

- firmware: arm_loader: PWM1 is not available on GPIO 45

- firmware: power: Always read the uncached voltage for AIN and USB_PD
  See: https://forums.raspberrypi.com/viewtopic.php?p=2059832#p2059832

- firmware: Use new SDHCI controller instead of legacy arasan
  See: #1763

- firmware: Add D flag to video= cmdline option when hotplug is forced

- firmware: Actually rebuild firmware described in previous commit

- firmware: hdmi_2711: Make some clock setup unconditional so booting without hdmi setup is possible

- firmware: arm_dispmanx: Correct support for NV21, and add support for YV16
  See: #1767

- firmware: arm_dispmanx: Fix FKMS to adopt pre-multiplied alpha
  See: #1773

- firmware: il isp: Correct histogram masks for updated group 2 regions

- firmware: video_decode: Convert the active lines, not the padded buffer

- firmware: bootloader: Raise CMA cap to 512MB on a 64-bit Pi4

- firmware: bootloader: Prefer 64-bit kernels on Pi 4s
  See: https://forums.raspberrypi.com/viewtopic.php?p=2088935#p2088935

- firmware: platform: clocks: Replace m2mc with hdmi for state machine clock on 2711

- firmware: bootloader: Fix automatic 64bit selection on Pi3s
  See: https://forums.raspberrypi.com/viewtopic.php?p=2089764#p2089764

- firmware: Handle 64-bitness of named kernels
  See: #1792

- firmware: gencmd: Add a fallback to mailbox interface if vchiq is not available

- firmware: arm_loader: Set local-bd-address if 6 zeroes found

- firmware: arm_loader: Really check for a zero local-bd-address
  See: raspberrypi/linux#5437

- firmware: arm_dt: Don't overwrite existing i2c aliases
  See: raspberrypi/linux#5428

- firmware: arm_loader: Reduce CMA warning severity
  See: #1807
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants