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

Consistent "[Info] (Alsa) Failed to get chunk error", no sound. #1313

Open
matteobrusa opened this issue Dec 25, 2024 · 0 comments
Open

Consistent "[Info] (Alsa) Failed to get chunk error", no sound. #1313

matteobrusa opened this issue Dec 25, 2024 · 0 comments

Comments

@matteobrusa
Copy link

Describe the bug
The client fails to play the streamed data after the first playback session, and throws [Info] (Alsa) Failed to get chunk.

Steps to Reproduce

  1. Start the server snapserver --logging.filter debug -c /opt/snapserver/snapserver.conf with the following config:
[stream]
source = pipe:///opt/snapserver/snapfifo?name=fifo
sampleformat = 44100:16:2
chunk_ms = 50
buffer = 1000
  1. Start the client snapclient --logfilter debug --host <server ip> --soundcard plughw:0,0
  2. Stream some data to it cat /dev/urandom > /opt/snapserver/snapfifo
  3. the client plays ok
  4. Stop the source, wait for the [Notice] (Alsa) No chunk received for 5000ms. Closing ALSA. message.
  5. restart the streaming
  6. The client produces no audio, throws the following errors:
2024-12-25 22-53-57.439 [Info] (Alsa) PCM name: plughw:0,0, sample rate: 44100 Hz, channels: 2, buffer time: 80000 us, periods: 4, period time: 20000 us, period frames: 882
2024-12-25 22-53-57.439 [Debug] (Stream) age > 0: 53051ms, dropping old chunks
2024-12-25 22-53-57.439 [Debug] (Stream) age: 2913, requested chunk_duration: 80, duration: 26
2024-12-25 22-53-57.439 [Info] (Alsa) Failed to get chunk
2024-12-25 22-53-57.454 [Debug] (Stream) age > 0: 2928ms, dropping old chunks
2024-12-25 22-53-57.455 [Debug] (Stream) age: 2902, requested chunk_duration: 80, duration: 26
2024-12-25 22-53-57.455 [Info] (Alsa) Failed to get chunk
2024-12-25 22-53-57.473 [Debug] (Stream) age > 0: 2921ms, dropping old chunks
2024-12-25 22-53-57.474 [Debug] (Stream) age: 2895, requested chunk_duration: 80, duration: 26
2024-12-25 22-53-57.474 [Info] (Alsa) Failed to get chunk
2024-12-25 22-53-57.494 [Debug] (Stream) age > 0: 2915ms, dropping old chunks
2024-12-25 22-53-57.494 [Debug] (Stream) age: 2889, requested chunk_duration: 80, duration: 26
2024-12-25 22-53-57.494 [Info] (Alsa) Failed to get chunk
2024-12-25 22-53-57.537 [Debug] (Stream) age > 0: 2932ms, dropping old chunks
2024-12-25 22-53-57.537 [Debug] (Stream) age: 2906, requested chunk_duration: 80, duration: 26
2024-12-25 22-53-57.537 [Info] (Alsa) Failed to get chunk
  1. killing and restarting the client fixes the problem and continues the streaming.

Environment details

  • OS: RaspberryOS 64 bit bullseye on both server (RPI 4) and client (RPIZ2W)
  • Snapcast version 0.29 installed from the release .deb arm64 files

what I've tried

  • chunk_ms below 30ms won't work
  • changing codec, changing source from pipe to alsa loopback, using librespot instead of urandom

It seems more like an audio init issue. I'm using the Waveshare WM8960 audio HAT.

Thanks for your effort in creating this non-trivial piece of software. Please let me know if any detail is missing.

@matteobrusa matteobrusa changed the title Consistent [Info] (Alsa) Failed to get chunk error, no sound. Consistent "[Info] (Alsa) Failed to get chunk error", no sound. Dec 25, 2024
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