Thank you for your donation!


Cloudsmith graciously provides open-source package management and distribution for our project.


Solved: Choppy sound using Bluetooth (Zero 2 W)
#31
Same problem on release 8.2.3 (64 bit).
Reply
#32
(12-25-2022, 06:18 PM)citro Wrote: Same problem on release 8.2.3 (64 bit).

Have a look at this post and the one following it, then:

https://moodeaudio.org/forum/showthread....6#pid42056
Reply
#33
I decided to experiment a little.

Simple setup: Raspberry Pi Zero 2 W and a bluetooth speaker.

I am not savvy on linux / command line and I get a lot of help from here: https://www.sigmdel.ca/michel/ha/rpi/blu...02_en.html

Tonight I did the following:
1. fresh Raspberry Pi OS Lite 64bit install (using the official Raspberry Pi Imager)
2.
Code:
sudo apt update && sudo apt upgrade -y

3. reboot
4. I don't know why, but it was included in the guide above
Code:
sudo adduser pi bluetooth

5. add pulseaudio package
Code:
sudo apt install pulseaudio-module-bluetooth

6. reboot
7. connect to BT speaker using bluetoothctl (scan for spearker / connect to speaker)
8. install mpg123

Code:
sudo apt install mpg123

9. mount a Samba share from my NAS
10. play an MP3 from the share, using mpg123

Code:
mpg123 path_to_samba_mount/mp3_file

The music sounds decent. Some choppy output, but way ahead of Moode.
Reply
#34
(12-25-2022, 09:34 PM)citro Wrote: I decided to experiment a little.

Simple setup: Raspberry Pi Zero 2 W and a bluetooth speaker.

I am not savvy on linux / command line and I get a lot of help from here: https://www.sigmdel.ca/michel/ha/rpi/blu...02_en.html

Tonight I did the following:
1. fresh Raspberry Pi OS Lite 64bit install (using the official Raspberry Pi Imager)
2.
Code:
sudo apt update && sudo apt upgrade -y

3. reboot
4. I don't know why, but it was included in the guide above
Code:
sudo adduser pi bluetooth

5. add pulseaudio package
Code:
sudo apt install pulseaudio-module-bluetooth

6. reboot
7. connect to BT speaker using bluetoothctl (scan for spearker / connect to speaker)
8. install mpg123

Code:
sudo apt install mpg123

9. mount a Samba share from my NAS
10. play an MP3 from the share, using mpg123

Code:
mpg123 path_to_samba_mount/mp3_file

The music sounds decent. Some choppy output, but way ahead of Moode.

It's always good to hear somebody experiments with audio on the Pi.

Few key points, though:

moOde uses ALSA, and not PulseAudio, also uses MPD as audio renderer instead of mpg123.

Although your audio glitches did not entirely disappear (which is why I pointed you to the posts underlining that it is likely a Zero 2 W issue, rather than a moOde one) but got considerably reduced should be checked also against overall sound quality requested to the system. As you are playing back from a samba share; it would be interesting to see how the playback from a locally stored file (I believe you can attach an external ssd to it, not sure though) results.
I know up to the Pi3 models, the USB, NETWORK and BT shared the same bus; the thing is not true any more for the Pi4 models, but I don't know anything about the Zero.

Have you also tried different audio files? I mean, some low-res vs some hi-res, to eventually rule out the decoding workload impact?
Have you tried the HDMI out? Being the device not big on the memory side, requiring additional buffers for wireless data transport could have a negative impact.

I'd suggest having a look in the Raspberry forums about BT issues with the Zero 2 W specifically, anyway.
Reply
#35
You have some fine points.

I copied a file from NAS to home directory / the internal SD card, and played it using mpg123. The result: less stuttering, over bluetooth. I'll have to redo the test at a proper hour, during the day.

I don't have the hardware to experiment with HDMI out. I experimented with a USB sound card and there is no stutter.
I experimented with a 256kbps MP3. The Pi, the BT speaker and the router are in the same room.

LE: I posted the issue on https://github.com/RPi-Distro/firmware-nonfree/issues
Reply
#36
I managed to run a test and didn't experience any audio glitches. Below are some screen shots and command output.

               

Code:
pi@moode:~ $ bluealsa-aplay -l
**** List of PLAYBACK Bluetooth Devices ****
hci0: A4:77:58:09:EE:C8 [Anker SoundCore], trusted audio-card
A2DP (SBC): S16_LE 2 channels 48000 Hz
**** List of CAPTURE Bluetooth Devices ****
*** stack smashing detected ***: terminated
Aborted
pi@moode:~ $
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#37
I'm using Pi Zero 2 W. I think you are using the first Zero W.
Reply
#38
I opened a case about Raspberry Pi 2 W BT / WiFi issues on https://github.com/RPi-Distro/firmware-n.../issues/33

@Tim Curtis , @TheOldPresbyope - your input might matter.
Reply
#39
(12-30-2022, 01:29 PM)citro Wrote: I opened a case about Raspberry Pi 2 W BT / WiFi issues on https://github.com/RPi-Distro/firmware-n.../issues/33

@Tim Curtis , @TheOldPresbyope - your input might matter.

You stated your issue well and already have a response from pelwell which seems to fit my own conception of the Raspberry Pi world Cool  and yet doesn't advance toward a solution  Sad

I don't think I have anything I can add. Sorry, I'm not in a position at the moment to compare the Pi W and Pi 2 W behavior.

Good luck.

Regards,
Kent
Reply
#40
Thank you, Kent. I appreciate you thought about my request Smile
Reply


Forum Jump: