snd_bcm2835 and Pulseaudio 5 do not get along

Aperta
#688 44 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
linux

Direzione di ricerca

Start by reproducing the reported command sequence with a four-second delay and review the linked bcm2835_snd debug output. The issue is resolved when the second aplay invocation completes and produces audio with PulseAudio 5, without regressing playback after a delay of at least five seconds.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Bug

I am having unreliable audio on a system that has Pulseaudio 5.0 installed.
It seems that when Pulseaudio is installed, and an application has finished playing audio, Pulseaudio doesn't close the audio device straight away, but waits 5 seconds.
If another application shows up that wants to play audio within that time, it re-uses the same connection.
However it seems that does not work properly on the Pi.

If I do:

aplay /usr/share/sounds/alsa/Front_Center.wav ; sleep 4 ; aplay /usr/share/sounds/alsa/Front_Center.wav

The file plays correctly the first time, but the second time there is no sound, and the program never finishes executing.
It just prints "Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono", and sits there.
Problem doesn't happen when sleeping at least 5 seconds.

No idea how to debug this, and if the problem is in the ALSA module or in Pulseaudio.
But here is the output of bcm2835_snd with debugging enabled in case that is useful to anyone: https://paste.ee/r/soht7

Was able to reproduce the issue with both my own custom Linux distribution, and with Arch Linux (installed Pulse with: "pacman -Sy pulseaudio pulseaudio-alsa alsa-utils ; pulseaudio --start")
Doesn't seem to happen with very old versions of Pulse, like 2.0 which you get when you install it through Raspbian.

Lingua principale
C
Stelle
13.2k
Fork
5.5k
Merge medio
2g 21h
PR unite (30g)
21

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raspberrypi/linux

Tutte le issue di raspberrypi/linux

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.