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)
#21
(07-14-2022, 08:35 PM)citro Wrote: I tried moOde 7.6.1 and the results are mixed: it is much better than 8.1.2, but there are times when interruptions are often, and there are times when they are far apart.

I came across the "output rate" information: listening to radio stations on Bluetooth speaker, it shows 1.411Mbps. Is this related to digital transfer rate of data over Bluetooth ? If so, is there any way to lower it ?

Thats the rate that MPD outputs to the audio device. The rate is determined by MPD and ALSA and it depends on what the audio device reports that it accepts.

In the case where the audio device is a remote Bluetooth Speaker MPD is not outputting to a physical audio device but rather to the input side of the Bluetooth stack managing the wireless connection to the Bluetooth Speaker.

My understanding is that the input side of Bluetooth stack requires 16/44.1 PCM which it then feeds into the SBC XQ CODEC that transmits it across the wireless connection to the Bluetooth Speaker at around 450 - 550 kbps. If the Speaker's Bluetooth stack doesn't support SBC XQ CODEC then the standard SBC CODEC will be used and that bitrate is ~320 kbps.

Article
http://soundexpert.org/articles/-/blogs/...udio-codec
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#22
Addendum to Tim's post.

From the Bluetooth A2DP specification,

Quote:4.3.2.1 Sampling Frequency

Table 4.2 shows the value of the Sampling Frequency field for SBC. For the decoder in the SNK, the
sampling frequencies 44.1 kHz and 48 kHz are mandatory to support. The encoder in the SRC shall
support at least one of the sampling frequencies of 44.1 kHz and 48 kHz

Here SNK = sink (the receiver) and SRC = source (the sender)

AIUI, the SBC XQ patch specifies bitrates for both sampling frequencies.

Regards,
Kent

PS - note that I misspoke in my earlier post. I wrote "bitrates" but meant "sampling frequencies". I've edited my post.
Reply
#23
Is there any way (command line, maybe) to check the used codec ? Also, is there any way to force o lower quality codec and a lower bitrate?
Reply
#24
Not that I know of. Feel free to experiment with the commands below for example try checking the link quality when connected to your Bluetooth speaker. Search the net for info on how to use the commands.

Code:
# Get connection info
hcitool con

# Use MAC address from above output
hcitool lq xx:xx:xx:xx:xx:xx

bluetoothctl
help
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#25
Code:
pi@moode:~ $ hcitool con
Connections:
        < ACL xx:xx:xx:xx:xx:xx handle 12 state 1 lm SLAVE AUTH ENCRYPT

pi@moode:~ $ hcitool lq xx:xx:xx:xx:xx:xx
Link quality: 255


bluetoothctl does not work. It runs, but it get no working info:

Code:
pi@moode:~ $ bluetoothctl
[bluetooth]# list                             <-- no output
[bluetooth]# devices
No default controller available
Reply
#26
(07-02-2022, 03:13 PM)Sniglar Wrote: Spookily similar issue reported by @Lukesan when Zero 2 W was new...

https://moodeaudio.org/forum/showthread.php?tid=4418 

...and into moode 8

https://moodeaudio.org/forum/showthread....77&page=10

My Zero 2 W on moode 8.0.2 and 8.1.1 (64 bit) still has these constant regular interrupts when connected to a speaker using bluetooth.

Weird that all of a sudden it gets a lot more attention. I thought it was me only looking at the replies I got back then.

So for me the issue is still there. Tried, hang on, 4 different brands and about 9 BT speaker models (yes, it is that bad).  All have a simular issue with BT on my 2 x pi zero 2 W's.  Constant drop-outs, cutting audio every half a second etc.

It is definitely not a matter of cpu power as the regular pi zero w (which is no fun pairing BT due to the slowness) has been playing live streams here on a solar panel for about 6 hours non stop outside today.  I have 3 of those now and all perform equally good. 

The way I got it to work 'normally' on a pi zero 2 w was to use a separate Wifi usb dongle. But that is no solution as I intended to keep it as compact and using it as less power as it can.  So for me it is a driver issue or the wifi/bt chipset itself. 
Also when it connects you can hardly move the speaker a couple of ft away (from what I remember that is) untill it fully drops connection.  The first gen Zero W I can actually place the speaker and wifi 30 to 40ft away with no issue at all.
The zero 2 w has been a serious letdown for me so far.
Reply
#27
(07-29-2022, 06:04 PM)Lukesan Wrote:
(07-02-2022, 03:13 PM)Sniglar Wrote: Spookily similar issue reported by @Lukesan when Zero 2 W was new...

https://moodeaudio.org/forum/showthread.php?tid=4418 

...and into moode 8

https://moodeaudio.org/forum/showthread....77&page=10

My Zero 2 W on moode 8.0.2 and 8.1.1 (64 bit) still has these constant regular interrupts when connected to a speaker using bluetooth.

Weird that all of a sudden it gets a lot more attention. I thought it was me only looking at the replies I got back then.

So for me the issue is still there. Tried, hang on, 4 different brands and about 9 BT speaker models (yes, it is that bad).  All have a simular issue with BT on my 2 x pi zero 2 W's.  Constant drop-outs, cutting audio every half a second etc.

It is definitely not a matter of cpu power as the regular pi zero w (which is no fun pairing BT due to the slowness) has been playing live streams here on a solar panel for about 6 hours non stop outside today.  I have 3 of those now and all perform equally good. 

The way I got it to work 'normally' on a pi zero 2 w was to use a separate Wifi usb dongle. But that is no solution as I intended to keep it as compact and using it as less power as it can.  So for me it is a driver issue or the wifi/bt chipset itself. 
Also when it connects you can hardly move the speaker a couple of ft away (from what I remember that is) untill it fully drops connection.  The first gen Zero W I can actually place the speaker and wifi 30 to 40ft away with no issue at all.
The zero 2 w has been a serious letdown for me so far.

Right, the issue appears to be unique to the Zero 2 W.

Try posting on the Raspberry Pi support Forum.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#28
(07-29-2022, 06:04 PM)Lukesan Wrote: ...  So for me it is a driver issue or the wifi/bt chipset itself. 
Also when it connects you can hardly move the speaker a couple of ft away (from what I remember that is) untill it fully drops connection.  ...

We seem to be in agreement about the driver/chipset. They are both different for the Zero 2 W versus any of the other Pi models with onboard WiFi/BT hardware. Trouble is, that's the most opaque part of the system. The chipset and firmware (low-level driver) are basically proprietary to Broadcom (well, Synaptics now, actually) and the Raspberry Pi Foundation's documentation about both is essentially nonexistent. It's tiresome trying to characterize a system by wading through the journalctl output.

That this audio "motorboat" effect seems quantitatively different for moOde 7.6.1 and moOde 8.1.2 highlights for me the importance of the driver/firmware but I'm not really interested in comparing the undocumented /lib/firmware/brcm files between the relevant versions of Raspberry Pi OS. Several attempts exercising my Google-fu failed to turn up useful leads. Mostly it finds users with WiFi problems flailing like blindfolded kids swinging for a fiesta piñata. No candy yet.

As for your diminished BT range with the Pi Zero 2 W, that's unexpected. I'm sitting here listening to my JBL BT speaker putt-putting at the far end of my house from my Pi Zero 2 W---some 30 feet and several walls apart and no problem maintaining the connection.

My approach to the Raspberry Pi forum would be to start with a clean install of the current headless Raspberry Pi OS; install just enough to get bluez-alsa running; and test for the same effect using just aplayer. Assuming the effect is still there, one has a basis for discussion with the wizards of the RPF unencumbered by moOde application-layer stuff. (If the effect isn't still there, of course, there is a discussion to be had here!)

Trouble is, my partner is in the midst of her (mild) Covid-19 bout and I'm kind of preoccupied. Maybe I'll get back to the Zero 2 W soon; maybe not.

Regards,
Kent
Reply
#29
My first Moode experience was 8.0.2.
The BT sound was mostly static and there was no music to be heard.

I have no Linux proficiency, but I read some guides about BT issues under Linux and I started to update the bluez module. The BT sound became better (the music became audible, with regular cracks however).
Reply
#30
By any chance, do you know if the issue is still apparent on latest Moode Audio ?
Il lent my BT speaker Smile
Reply


Forum Jump: