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

ALSA driver snd_bcm2835 issue #33

Closed
timnugent opened this issue Jun 6, 2012 · 4 comments
Closed

ALSA driver snd_bcm2835 issue #33

timnugent opened this issue Jun 6, 2012 · 4 comments

Comments

@timnugent
Copy link

Hi gang,

I'm experiencing a crash in pulseaudio which seems to be related to the bcm2835 driver. I'm attempting to stream audio from my android phone over bluetooth using A2DP (doing exactly the same thing with an Ubuntu laptop works as expected). I can connect my phone to the Pi over bluetooth, then issue the following command to connect the A2DP stream up using pulse:

sudo pactl load-module module-loopback source=bluez_source.XX_XX_XX_XX_XX_XX sink=alsa_output.platform-bcm2835_AUD0.0.analog-stereo

This seems to work ok. However, as soon as I hit play on the phone, I get these errors from pulseaudio which then conks out:

pi@raspberrypi:~$ sudo pulseaudio
W: main.c: This program is not intended to be run as root (unless --system is specified).
X11 connection rejected because of wrong authentication.
X11 connection rejected because of wrong authentication.
E: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
E: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_bcm2835'. Please report this issue to the ALSA developers.
E: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.

In /var/log/messages I get:

Jun 6 22:08:48 raspberrypi kernel: snd_bcm2835_playback_open:97 Alsa open (0) <--- when I call the pactl command
Jun 6 22:09:08 raspberrypi kernel: snd_bcm2835_playback_close:167 Alsa close <--- when I hit play on the phone

I'm using the 19-04-12 Debian image with firmware updated today using Hexxeh's script.

Cheers,

Tim

@popcornmix
Copy link
Contributor

There's been a firmware update that could help ALSA issues. Please update and test.

@popcornmix
Copy link
Contributor

I believe this was fixed in recent firmware updates. Please reopen if there is still a problem.

@groe
Copy link

groe commented Jun 29, 2012

I am experiencing the same problem using the newest firmware (updated with Hexxeh's script a few moments ago + reboot).

I use ALSA and pulseaudio to play local mp3/wav files with mplayer (mplayer -ao pulse whatever.mp3). Some files can be played without any problems, however, when I play very short files (like sound effects; about 1 or 2 seconds) the driver seems to crash.

/var/log/syslog

Jun 29 21:40:06 raspberrypi kernel: [  537.062061] snd_bcm2835_playback_close:167 Alsa close
Jun 29 21:40:49 raspberrypi kernel: [  580.100043] snd_bcm2835_playback_open:97 Alsa open (0)
Jun 29 21:40:49 raspberrypi pulseaudio[1586]: alsa-sink.c: ALSA woke us up to write new data to the device, but there was actually nothing to write!
Jun 29 21:40:49 raspberrypi pulseaudio[1586]: alsa-sink.c: Most likely this is a bug in the ALSA driver 'snd_bcm2835'. Please report this issue to the ALSA developers.
Jun 29 21:40:49 raspberrypi pulseaudio[1586]: alsa-sink.c: We were woken up with POLLOUT set -- however a subsequent snd_pcm_avail() returned 0 or another value < min_avail.
Jun 29 21:41:24 raspberrypi kernel: [  615.240573] snd_bcm2835_playback_close:167 Alsa close
Jun 29 21:41:29 raspberrypi kernel: [  620.181534] snd_bcm2835_playback_open:97 Alsa open (0)

uname -a

Linux raspberrypi 3.1.9+ #138 PREEMPT Tue Jun 26 16:27:52 BST 2012 armv6l GNU/Linux

$ date && sudo rpi-update
Fri Jun 29 21:54:35 CEST 2012
Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS
Performing self-update
Autodetecting memory split
Using ARM/GPU memory split of 192MB/64MB
Updating firmware (this will take a few minutes)
Your firmware is already up to date

Running debian6-19-04-2012.

Could that be a problem with the driver?

Regards,
groe

@groe
Copy link

groe commented Jul 3, 2012

I just nailed my problem down to sample rates being the cause; opened ticket #62 since that seems to be a different issue than this one.

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

3 participants