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

bluealsa and bluealsa-aplay sound is non constant #193

Closed
flatmax opened this issue Mar 12, 2019 · 4 comments
Closed

bluealsa and bluealsa-aplay sound is non constant #193

flatmax opened this issue Mar 12, 2019 · 4 comments

Comments

@flatmax
Copy link

flatmax commented Mar 12, 2019

I'm using the system as a way to play audio from my phone to a Pi with an I2S sound card.

Bluez5 is setup and I have the following commands for bluez-alsa :

  • bluealsa -i hci0 -p a2dp-sink
  • bluealsa-aplay -d hw:0 -v 00:00:00:00:00:00
    Selected configuration:
    HCI device: hci0
    PCM device: hw:0
    PCM buffer time: 500000 us
    PCM period time: 100000 us
    Bluetooth device(s): ANY
    Profile: A2DP

My android phone connects and the audio is routed to the Pi. I can hear the audio coming through in patches from the phone, however long gaps between. It is stereo.

You can listen here :
https://drive.google.com/file/d/1922x6iXofnortUnxkr511fsLj8-GjROn/view?usp=sharing

The audio sounds like playback is much too fast.

I have tried using the plughw:0 device, but get the same problem.

@flatmax flatmax changed the title bluealsas and bluealsa-aplay sound is non constant bluealsa and bluealsa-aplay sound is non constant Mar 12, 2019
@flatmax
Copy link
Author

flatmax commented Mar 12, 2019

I've also done a test with altering the buffer and period time :

bluealsa-aplay -d hw:0 --profile-a2dp --pcm-period-time=100 --pcm-buffer-time
=200 -v 00:00:00:00:00:00

Still sounds patchy ...

https://drive.google.com/file/d/1PRboBiSfkXn7xHEXbU5e_cuOYtjHkz4u/view?usp=sharing

@flatmax
Copy link
Author

flatmax commented Mar 21, 2019

I tested with a USB bluetooth dongle. It works well.

Turns out the problem is with the Pi3 inbuilt bluetooth hardware. I have tried turning wifi off and playing with flow control - but nothing comes of it.

Anyone who has setup the Pi3 using buildroot (not raspbian) with suggestions are welcome.

@mbrebion
Copy link

I've encountered similar problems with Bluetooth streaming from devices to RPIs 3B and 3 zero (I use a hifiberry sound card for decent audio).
I've found two working solutions :

  • Using a Bluetooth dongle (and disconnect the onboard Bluetooth)
  • disconnecting Wifi as soon as Bluetooth stream is coming. This works well but implies ssh disconnections and so on

Apparently, newer RPIs do not suffer from this problem

@borine
Copy link
Collaborator

borine commented Jun 21, 2021

This appears to be an issue with RPi firmware and/or UART config. It is very likely fixed by updating firmware and OS. I think it is not a bluez-alsa issue.

@borine borine closed this as completed Jun 21, 2021
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