-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Pi3 bluetooth audio stutters with Wifi enabled #1402
Comments
I've been having the exact same issue. Disabling WLAN0 fixed the audio issues. However, I would very much like to be able to use the wifi... |
Same is here. Took me 3 days, 2 distros to figure out it was the build in WiFi. Same error appears when i use a WiFi stick direktly at the USB Ports. When i use a USB connection cable with the USB stick everything works fine. So i simply think it comes from the build in antenna that the two 2.4 GHz services interfer each other. :-/ |
I was able to get A2DP to work by disabling the on-board wifi and using a Wi-Pi USB adapter, without any extension cable. |
This brings up a rather interesting question: Does the on-board WiFi chip support Bluetooth co-existence, does the driver support this, and does it work correctly? Based on what I've seen from multiple sources, there's considerably better latency when you either disable the on-board WiFi or disable the on-board Bluetooth and use a USB adapter instead, and that sounds to me like either the on-board chip doesn't correctly implement BT co-existence, or the driver doesn't properly support it. |
The BCM43438 has a co-existence interface between the WiFi and Bluetooth interfaces - no software support is required. |
@Ferroin From my experience I would say /fundamentally/ yes it does, although I'm not an authoritative source and I do not demand much on the Bluetooth side.... Whilst developing Bluetooth LE central and peripheral applications on a Pi 3 I run a VNC X session, 2x SSH sessions and have NFS share mounted all via WiFi and all are ok. |
+1 on this, as I've just discovered tonight. Took wlan0 down and the audio played just fine. Has anyone gotten any new word since August on what's going on here and if there's a fix? |
+1 me too, "ifdown wlan0" and pulseaudio streams fine via a2dp |
+1, just updated today, using an Anker Sound Core bluetooth speaker. Plays beautifully if I turn off wifi, but that's a pretty big workaround. It's annoying but workable for this project (OKAY FINE, I'll connect via hdmi instead of vncserver I GUESS ) but I too am waiting on a fix because it seriously limits my ability to make my projects mobile. VNCserver is a must. |
+1 that gave me headaches finding this problem out ! I needed WiFi so I just:
No more sound problems. |
I'm excited to see any progress on this, but as a reminder, you can Subscribe to this thread and add a reaction to the original post. It is not recommended to post a response of +1. |
Agreed that no WiFi is crippling to the base Pi3. Adding a usb dongle defeats one of the big gains w/ the Pi3 of onboard WiFi/BT. :-( |
I have also tested the behavior and facing same issue as reported here. Planning to add additional USB WiFi adapter to overcome the problem. Hope pi would support second WiFi without much problems. |
I guess the Zero W will suffer from the same issues regarding Bluetooth and WLAN, as its using the same chip? |
Is this happening to everyones Raspberry Pi? How is the music being played? (Pi hat DACs, sound cards, BCM?) What are you using the Wifi for? Because, I haven't had any issues with my Pi3 |
Only an issue when both are going. WiFi actively transmitting and then try to use Bluetooth. Bluetooth + LAN is no problem. So most people and applications won't see the issue. |
I have added secondary WiFi receiver and made it primary and using embedded WiFi as bluetooth receiver. This is a cheapest way to get this working. |
Please show me the LAN-port on the Pi0W. |
Has anyone tried renicing pulseaudio to have a higher priority? |
Yes, I tried with with higher priority with no discernible difference in the outcome. |
Hi,
Can you please let me know a workable-configuration if you have one for
the above problem i.e Wifi - needed, Bluetooth Speaker pairing in A2DP
mode.
From your profile, It looks like you have extensively played around in that
area.
Thanks.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Cheers,
Pradeep
http://pradeepclicks.com/
…On Mon, Mar 6, 2017 at 9:29 PM, Brett Reinhard ***@***.***> wrote:
Has anyone tried renicing pulseaudio to have a higher priority?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1402 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADb1rV3_oFd2_qM8-2yHoDdLGeFK3d5dks5rjC1ngaJpZM4IExoX>
.
|
I am also trying to solve this problem. The choppiness seems to change a bit among different BT speakers/headphones, but it's still there using a WiFi dongle and disabling the onboard WiFi. Even using a BT dongle, the choppiness is still there while playing a local mp3 or using Pithos (Pandora). I also used a lower bitrate mp3 file, and the choppiness improved. I downloaded a couple of sample files from 16 to 64kbps and played them using VLC on RPi3. I am running pulseaudio and connecting to some cheap bluetooth earbuds. With only background WiFi activity, each file played, but did exhibit some choppiness with the increasing bitrate. Then, I ran an apt-get update and while it was running played the 16k file. Very choppy. Same for the others. In fact, the wifi activity had more of an effect than the bitrate of the file. Now attach a WiFi dongle and disable the onboard Wifi (sudo ifdown wlan0). Try again. |
I experience the same issue. I resolved it by using a Bluetooth dongle wich is a complete success. Still not happy with this though, what is the point of having features that cannot be used. |
One thing you have to make sure is that you turn off bluetooth scanning (scan off) while in the bluetoothctl prompt. That resolved my issue and I was able to stream nicely with a Pi Zero W, Pi3, using the built-in wifi/BT and Pi Zero + redbear IoT PiHat. |
@Michiman : I'm 100% sure that i tried it without scanning on at the same time. still had the issue. I'm using rpi3 though. |
The updated NVRAM files have been in Raspbian updates since August 2018. Alternatively you can download them directly:
Copy them into the /lib/firmware/brcm folder (you will need to |
Sorry but that doesn't work. Still have stuttering with Wifi. |
That's a shame. Did you reboot after installing? Unfortunately there are limits to what can be achieved with a shared antenna. Have you tried changing the distance from the Pi to the AP and/or the BT device? |
Yes, have struggled with this for some months now. I switched to the network cable and no problems any more. |
The bluetoothctl sometimes needs to be turned on 3 times in order to make it run. The wlan0 is not disable in this code, but it should be because there is audio stutters with Wifi enabled: raspberrypi/linux#1402
Hi, If on the otherhand I do ifconfig wlan0 down first, then all is fine...! |
You're reporting stuttering USB audio with Ethernet in an issue about Bluetooth audio with WiFi? |
oops! |
This Bluetooth + WiFi issue is causing issues with my keyboard doing multiple keystrokes for 1 key down up. |
@pratt-jeremy Is that a wireless keyboard? |
I have the same problem. Running Arch on a Pi B3, B3+ and Zero. All exhibit the same symptoms: Choppy play with a2dp. Arch has not updated the firmware as listed here, but I did that manually first. If I use the onboard BT on these 3 machines, Bluealsa complains of buffer under runs and it plays music in spurts. The journal shows a buffer under run. If I use a USB dongle it all works as expected. Can we try anything else? fwiw, my kernel is 4.19.32 |
It seems clear to me that putting bluetooth and wifi on a RPi is like making a silk purse out of a sow's ear. The Raspberry Pi development team should state that playing audio over bluetooth whilst playing a video over wifi is simply unsupported thanks to a lack of horsepower / bandwidth. Since day one the Pi has been touted as an updated replacement for the BBC micro, for teaching kids in schools. Kodi was a major bonus. I have just given up on this idea. I wanted to serve films to a pi-top with a bluetooth link to my caravan's audio system, but now I just plug a movie hard drive into a usb port. No Wifi, no stuttering. Sad, but not too inconvenient. |
Is this the appropriate command to run to get the onboard BT working? |
So I have streaming audio to a B3+ with wifi enabled and active (I am logged in via ssh). I am running Arch Linux. I had to install bluez-utils-compat to get the hciattach command installed. I believe Raspian has this already...
The default Bluez 5.50 package has btattach which Arch uses to turn on the BT adapter. This did not work. All I got was stuttering sound. This the Arch pi-bluetooth package calls for the command to be: |
Just to avoid confusions. Broadcom WiFi tech was bought by Cypress back in June 2016. Since then
|
@JamesH65 yes, it's a bluetooth keyboard I see this was for audio, but thought i'd mention it. Once I turned off the wifi the bluetooth keyboard worked perfectly. No repeated characters i didn't press. |
Presumably your distro is fully up to date? |
It was up to date when I posted here, it's probably out of date by now since it was in Mar. I'll update and see if it still is happening. |
On an RPI4 with WiFi soft blocked in rfkill. Still choppy on Pulseaudio A2DP. |
A little offtopic, but I'm having the same issue with Raspberry Pi Zero 2 W |
Hello,
I'm testing with streaming music using a2dp over bluetooth on the Pi3. When Wifi is enabled, I get constant buffer underruns wit Pulseaudio (Blueman shows a downstream of around 34kB/s). As soon as I disable the Wifi interface (ifdown wlan0), the audio starts to play normally and the downstream is around 42kB/s (which is correct high quality stereo audio if I see http://soundexpert.org/news/-/blogs/bluetooth-audio-quality-a2dp).
Also tried making the buffer much larger, changing resampling type, realtime-scheduling etc. Also tried latest Pulseaudio, no difference. Seems like it is a Raspberry problem.
First thought it was because the Wifi and Bluetooth both use UART, but the is not true (and would be too slow if Wifi was over the 921600 baud if I see it correctly). They still share the same chip (BCM43438). Is there a known reason why I (and also heard others) have this problem?
The text was updated successfully, but these errors were encountered: