Skip to content
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

[KMS DRM][rpi zero 2w] - crackle sound, ALSA lib pcm.c:8570:(snd_pcm_recover) underrun occurred 0B f=0/0 #265

Open
qrp73 opened this issue Jun 21, 2024 · 1 comment

Comments

@qrp73
Copy link

qrp73 commented Jun 21, 2024

This issue appears on Raspberry Pi Zero 2W running on latest Raspi Bookworm Lite aarch64.

Steps to reproduce:

  1. Use Raspberry Pi Zero 2W at default clock, running on Linux rpi2w 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
  2. Connect HDMI display (I'm using 1280x1024@60 resolution)
  3. Connect USB hub with keyboard and USB sound card
  4. sudo reboot
  5. mkdir TEST && cd TEST
  6. wget https://www.mediacollege.com/audio/tone/files/1kHz_44100Hz_16bit_05sec.wav
  7. aplay 1kHz_44100Hz_16bit_05sec.wav

Notice sound is played ok, as expected

  1. SDL_VIDEODRIVER=kmsdrm ffplay 1kHz_44100Hz_16bit_05sec.wav

Expected result: sound is played ok

Actual result: sound is played with crackles and a bunch of errors appears in console output:

ALSA lib pcm.c:8570:(snd_pcm_recover) underrun occurred  0B f=0/0
ALSA lib pcm.c:8570:(snd_pcm_recover) underrun occurred  0B f=0/0
ALSA lib pcm.c:8570:(snd_pcm_recover) underrun occurred  0B f=0/0
...

The same issue on attempt to play any sound/video file with SDL_VIDEODRIVER=kmsdrm ffplay. The video is played ok, and sound is played but for some unknown reason the sound periodically breaks for 0.1 second and then resumes again.

I tested it on Raspberry Pi 4 rev 1.5 and it works ok. So the issue happens only when running on Raspberry Pi Zero 2W.

@qrp73
Copy link
Author

qrp73 commented Jun 22, 2024

Some more findings.
It appears that this issue happens with CX31993 USB sound card.

When I use different type USB sound card dongle it plays sound with no crackle.
It seems that this is an issue in USB driver for CX31993 chip or for RPI Zero 2W USB chipset in general.

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

1 participant