Thank you for your donation!


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


Problem: Bluetooth - only SBC codec listed
#1
Hi Everyone,

Ive successfully set up moode 8.3.7 on a Pi 4 8GB and got it playing to a set of sound core Space One headphones which support LDAC but on looking at the information about bluetooth codecs in this version it only lists sbc.

Any ideas why the others aren't listed / active? More output data below - 

Via SSH -

RPiOS: 11.8 Bullseye 64-bit | Linux: 6.1.21 64-bit
Model: Pi-4B 8GB
Audio: Pi HDMI 1


        m o O d e   a u d i o   p l a y e r

              Release 8.3.7 2023-12-07
                © 2014 Tim Curtis


The programs included with moOde are free software; the
exact distribution terms for each program are described
in the individual files in /usr/share/doc/*/copyright or
in the moOde source files. moOde comes with absolutely
no warranties either expressed or implied, or any other
such guarantees.

** To set a new password for your userid type 'passwd'.

Last login: Thu Feb  8 15:51:45 2024 from 192.168.68.115

When I Cat the config file for bluealsa - 
marke@moode:~ $ cat /etc/systemd/system/bluealsa.service
[Unit]
Description=Bluealsa proxy
Requires=bluetooth.service
After=bluetooth.service

[Service]
Type=simple
ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink -c aptx -c aptx-hd -c ldac --sbc-quality=xq+

[Install]
WantedBy=multi-user.target


But when I query what Codecs are available - 

marke@moode:~ $ bluealsa-aplay -L
bluealsaBig GrinEV=E8:EE:CC:B6:17:80,PROFILE=a2dp,SRV=org.bluealsa
    soundcore Space One, trusted audio-card, playback
    A2DP (SBC): S16_LE 2 channels 44100 Hz
marke@moode:~ $ bluealsa-cli --verbose list-pcms
/org/bluealsa/hci0/dev_E8_EE_CC_B6_17_80/a2dpsrc/sink
Device: /org/bluez/hci0/dev_E8_EE_CC_B6_17_80
Sequence: 1
Transport: A2DP-source
Mode: sink
Running: true
Format: S16_LE
Channels: 2
Sampling: 44100 Hz
Available codecs: SBC:2fff0227
Selected codec: SBC:24150227
Delay: 150.2 ms
SoftVolume: true
Volume: L: 127 R: 127
Muted: L: false R: false

marke@moode:~ $ bluealsa-cli --verbose
Service: org.bluealsa
Version: v4.1.0
Adapters: hci0
Profiles:
  A2DP-source : SBC aptX aptX-HD LDAC
  A2DP-sink   : SBC aptX aptX-HD

So this lists the LDAC profile as available but how do I ask it to use LDAC. Sorry if I'm being a bit dumb here. Is there anything I'm missing or didn't set up properly?

Any help gratefully appreciated. Thanks.
Reply
#2
(02-08-2024, 06:30 PM)markmizu Wrote: ExecStart=/usr/bin/bluealsa -p a2dp-source -p a2dp-sink -c aptx -c aptx-hd -c ldac --sbc-quality=xq+

The above just tells bluealsa what codecs to enable

Quote:So this lists the LDAC profile as available but...

Where did you see in your output that LDAC was available? I only see (various) SBC
Reply
#3
Hi Al,

Thanks for the reply. So I'm new to the software and my understanding is that the current version of moode is able to stream ldac.

So how do I go about enabling the faster codecs? - it appears as though only SBC is available but that contradicts the documentation.

I managed to get bluetooth working easily enough on my headphones and the connection has been solid and they are capable of SBC, aptX, aptXHD, AAC , and LDAC so am I missing some config or settings needed to use a better codec over BT?

Thanks, Mark.
Reply
#4
(02-08-2024, 09:30 PM)markmizu Wrote: Hi Al,

Thanks for the reply. So I'm new to the software and my understanding is that the current version of moode is able to stream ldac.

So how do I go about enabling the faster codecs? - it appears as though only SBC is available but that contradicts the documentation.

I managed to get bluetooth working easily enough on my headphones and the connection has been solid and they are capable of SBC, aptX, aptXHD, AAC , and LDAC so am I missing some config or settings needed to use a better codec over BT?

Thanks, Mark.

I am sure the codec selection depends on reported capabilities / handshake (by the devices involved) and signal strength.
I kdon't know, OTOH, if there is some sort of priority, so that a good SBC takes always over a (possibly) switching back and forth LDAC.
Some gurus here will surely jump in and clarify it.

P.S.
I was just referring to what the tools you invoked were reporting, and I didn't see any LDAC, hence the question.
Reply
#5
Open Source LDAC is supported for encoding but not decoding.
https://moodeaudio.org/forum/showthread....c#pid47441

In your case there is prolly an incompatibility between open Source LDAC in bluez-alsa and LDAC implementation in the headphones. Here's some git issues https://github.com/arkq/bluez-alsa/issues?q=ldac
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#6
(02-08-2024, 10:04 PM)Tim Curtis Wrote: Open Source LDAC is supported for encoding but not decoding.
https://moodeaudio.org/forum/showthread....c#pid47441

In your case there is prolly an incompatibility between open Source LDAC in bluez-alsa and LDAC implementation in the headphones. Here's some git issues https://github.com/arkq/bluez-alsa/issues?q=ldac

Hi Tim,

Thanks for the info. Yes I can certainly understand the situational limitations with regard to the devices handshaking and negotiating a viable connection protocol / speed etc.

So I am still exploring Moode and loving it so far - and on that newb note - is a new Moode install AptX, AAC, and LDAC capable right out of the box - because my headphones are capable of playing all the other codecs but I only ever see SBC.

Or am I being dumb and I need to download and install a load of libs for those codecs so that Bluez-alsa can use them?

Cheers,

Mark.
Reply
#7
(02-09-2024, 03:58 PM)markmizu Wrote:
(02-08-2024, 10:04 PM)Tim Curtis Wrote: Open Source LDAC is supported for encoding but not decoding.
https://moodeaudio.org/forum/showthread....c#pid47441

In your case there is prolly an incompatibility between open Source LDAC in bluez-alsa and LDAC implementation in the headphones. Here's some git issues https://github.com/arkq/bluez-alsa/issues?q=ldac

Hi Tim,

Thanks for the info. Yes I can certainly understand the situational limitations with regard to the devices handshaking and negotiating a viable connection protocol / speed etc.

So I am still exploring Moode and loving it so far - and on that newb note - is a new Moode install AptX, AAC, and LDAC capable right out of the box - because my headphones are capable of playing all the other codecs but I only ever see SBC.

Or am I being dumb and I need to download and install a load of libs for those codecs so that Bluez-alsa can use them?

Cheers,

Mark.

The codecs are compiled into Bluez-alsa. No downloads are necessary. 

if you scroll down to the end of that first link I provided, @phorize confirmed LDAC codec selected for output to his audio device.
Enjoy the Music!
moodeaudio.org | Mastodon Feed | GitHub
Reply
#8
Hi Tim,

Brilliant, thanks for the clarification. Yes I did see that post yesterday when I was researching a solution and got the impression all the codecs were ready to roll, hence my slight confusion.

Much appreciated
Reply
#9
@markmizu 

I'm not sure at this point if you are establishing a BT/LDAC connection or not.

I have no gear that claims LDAC support. I do have several headphones which support aptX.

Here's some command-line output with my Sennheiser True Momentum 3 earbuds paired and connected to a moOde 8.3.7 player.


Code:
pi@pi3bpluslcd:~ $ bluealsa-cli --verbose list-pcms
/org/bluealsa/hci0/dev_80_C3_BA_24_D2_70/a2dpsrc/sink
Device: /org/bluez/hci0/dev_80_C3_BA_24_D2_70
Sequence: 0
Transport: A2DP-source
Mode: sink
Running: true
Format: S16_LE
Channels: 2
Sampling: 44100 H
Available codecs: SBC:2fff0235 aptX:4f000000010032
Selected codec: aptX:4f000000010022
Delay: 200.4 ms
SoftVolume: true
Volume: L: 127 R: 127
Muted: L: false R: false

pi@pi3bpluslcd:~ $ bluealsa-aplay -L
bluealsa:DEV=80:C3:BA:24:D2:70,PROFILE=a2dp,SRV=org.bluealsa
    MOMENTUM TW 3, trusted audio-card, playback
    A2DP (aptX): S16_LE 2 channels 44100 Hz


As you can see, in the list-pcms output, the earbuds support SBC (as must all BT audio devices) and aptX.

As you can see in the bluealsa-aplay output, bluealsa connected to the earbuds using aptX automagically.

As Al pointed out, your comparable output does not include LDAC This leaves me suspicious about the BT implementation on your headphones. Seek advice on the bluezalsa site if you have questions about the bluealsa/device handshake.

As an aside, LDAC is a proprietary protocol owned by Sony. It's problematic in the world of open-source developers.

Regards,
Kent
Reply
#10
Hi Kent,

Thanks. Yes it does seem like it's the headphones defaulting to SBC. I've connected them to a MacOS device and in the console log I can see it establishes an AAC connection with the headphones. So I'll keep on playing around and see what I can get working.

The bluetooth experience in general has been great with Moode - very stable and solid so I don't think it's a signal issue.

Yes LDAC is troublesome in general. And the headphones are a relatively new release so could very well have teething issues.

Have a good weekend.

Mark.
Reply


Forum Jump: