Bluetooth headset, A2DP possible workaround

Hi,

friend of mine looked into it and got Marhshall Monitor Bluetooth headphones working with Vero4K (2018.4-2)

  1. Update you system
    apt update
    apt dist-upgrade

and install

apt install a2dp-app-osmc

After that pair you headphones via OSMC GUI.
Or from console with bluetoothctl

and now:

osmc@osmc:~$ pactl list cards <— list of audio cards on vero
shared memfd open() failed: Function not implemented
Card #0 <---- default Vero4K card
Name: alsa_card.platform-aml_m8_snd.46
Driver: module-alsa-card.c
Owner Module: 1
Properties:
alsa.card = “0”
alsa.card_name = “AML-M8AUDIO”
alsa.long_card_name = “AML-M8AUDIO”
device.bus_path = “platform-aml_m8_snd.46”
sysfs.path = “/devices/aml_m8_snd.46/sound/card0”
device.string = “0”
device.description = “AML-M8AUDIO”
module-udev-detect.discovered = “1”
device.icon_name = “audio-card”
Profiles:
input:analog-stereo: Analog Stereo Input (sinks: 0, sources: 1, priority: 60, available: yes)
output:analog-stereo: Analog Stereo Output (sinks: 1, sources: 0, priority: 6000, available: yes)
output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (sinks: 1, sources: 1, priority: 6060, available: yes)
output:hdmi-stereo: Digital Stereo (HDMI) Output (sinks: 1, sources: 0, priority: 5400, available: yes)
output:hdmi-stereo+input:analog-stereo: Digital Stereo (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 5460, available: yes)
output:hdmi-surround71: Digital Surround 7.1 (HDMI) Output (sinks: 1, sources: 0, priority: 300, available: yes)
output:hdmi-surround71+input:analog-stereo: Digital Surround 7.1 (HDMI) Output + Analog Stereo Input (sinks: 1, sources: 1, priority: 360, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: output:analog-stereo+input:analog-stereo
Ports:
analog-input: Analog Input (priority: 10000, latency offset: 0 usec)
Part of profile(s): input:analog-stereo, output:analog-stereo+input:analog-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround71+input:analog-stereo
analog-output: Analog Output (priority: 9900, latency offset: 0 usec)
Part of profile(s): output:analog-stereo, output:analog-stereo+input:analog-stereo
hdmi-output-0: HDMI / DisplayPort (priority: 5900, latency offset: 0 usec)
Properties:
device.icon_name = “video-display”
Part of profile(s): output:hdmi-stereo, output:hdmi-stereo+input:analog-stereo, output:hdmi-surround71, output:hdmi-surround71+input:analog-stereo

Card #1 <— Bluetooth headphones
Name: bluez_card.5C_EB_68_xx_xx_xx
Driver: module-bluez5-device.c
Owner Module: 17
Properties:
device.description = “MONITOR BLUETOOTH”
device.string = “5C:EB:68:xx:xx:xx”
device.api = “bluez”
device.class = “sound”
device.bus = “bluetooth”
device.form_factor = “headset”
bluez.path = “/org/bluez/hci0/dev_5C_EB_68_xx_xx_xx”
bluez.class = “0x240404”
bluez.alias = “MONITOR BLUETOOTH”
device.icon_name = “audio-headset-bluetooth”
device.intended_roles = “phone”
Profiles:
headset_head_unit: Headset Head Unit (HSP/HFP) (sinks: 1, sources: 1, priority: 20, available: yes)
a2dp_sink: High Fidelity Playback (A2DP Sink) (sinks: 1, sources: 0, priority: 10, available: yes)
off: Off (sinks: 0, sources: 0, priority: 0, available: yes)
Active Profile: headset_head_unit <— should be A2DP
Ports:
headset-output: Headset (priority: 0, latency offset: 0 usec)
Part of profile(s): headset_head_unit, a2dp_sink
headset-input: Headset (priority: 0, latency offset: 0 usec)
Part of profile(s): headset_head_unit
osmc@osmc:~$ pactl set-card-profile bluez_card.5C_EB_68_xx_xx_xx a2dp_sink <— this will switch active card to bluetooth headset a to correct profile
shared memfd open() failed: Function not implemented
osmc@osmc:~$

Can somebody confirm it besides me?

Juraj

For me a2dp is working fine since April Update.
Yes you need sudo apt install a2dp-app-osmc and then configure it via bluetoothctl but all the pactl stuff is not needed. You can switch in Kodi via Settings -> System -> Audio

that was not working in this case. Maybe the headset profile is blocking it too.

Well haven’t tested with headphones (only speakers) but may try it on the weekend to confirm.

I wonder if there is a consistent difference between headphones and speakers. It’s possible the cheaper ‘headsets’ default to profiles typical for use with mobile phones, while speakers and ‘hifi’ headphones seek out a2dp and AptX. The Marshalls aspire to be in the second category, though.

Those Marshalls have build in microphone, that’s why they have 2 BT profiles…

But lots of speakers have microphones - like my JBL Flip. That works with the OSMC BT app. It seems there is no rule, here.

So you confirm that you switched to Bluetooth in Settings -> System -> Audio and it did not switch to your headsets when you connected them?

nope there is no bluetooth option

Sorry, my mistake that was renamed in recent versions. So if you choose the one you have chosen it ddidn’t automatically switched between HDMI and the Headphones anytime you connected the headphones?

No there was no sound at all in headphones. After reading forum i tought that a2dp on vero is still not working. And in this case bluetooth profile on headphones needs to be switched when using with vero. So there was probably only problem with headphones agter all

this worked for me!

any way to adjust/set a general delay/latency for the headphones as a device?

I’ve got a minor audio delay to fix and it would be nice to set this an forget it instead of adjusting audio offset for every video.

thanks

edit: this command worked for me

pactl set-port-latency-offset INTERFACE headset-output 200000

found here: https://askubuntu.com/a/711883