[Deprecated] [TESTING] Bluetooth audio streaming (A2DP)

I’m having issues with connecting to the headphones from a Vero4K.
From the bluetooth discovery menu when I choose the headphones the pairing fails with no useful message.
This some system information (which should probably also be in the grab-logs script, but couldn’t find):

Linux osmc 3.14.29-51-osmc #1 SMP Tue Jan 2 09:35:33 UTC 2018 aarch64 GNU/Linux

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
osmc@osmc:~$ cat /etc/os-release
PRETTY_NAME="Open Source Media Center"
NAME="OSMC"
VERSION="December 2017"
VERSION_ID="2017.12-1"
ID=osmc
ID_LIKE=debian

ANSI_COLOR="1;31"
HOME_URL="http://www.osmc.tv"
SUPPORT_URL="http://www.osmc.tv"
BUG_REPORT_URL="http://www.osmc.tv"

How should I proceed?

Ok i am getting a little bit further by starting pulseaudio i now do get connected. But there is still no audio coming through my headset but my nexus 4 can stream audio to osmc.

Still need to understand how to get osmc stream to my headphones.

OK i am getting there, my headset is not set to a a2dp profile what ever i am trying it fails

pacmd set-card-profile 1 a2dp_sink
Failed to set card profile to ‘a2dp_sink’

This is the profile of my headset

       index: 1
name: <bluez_card.04_5D_4B_A5_9C_E4>
driver: <module-bluez5-device.c>
owner module: 24
properties:
	device.description = "MDR-ZX770BN"
	device.string = "04:5D:4B:A5:9C:E4"
	device.api = "bluez"
	device.class = "sound"
	device.bus = "bluetooth"
	device.form_factor = "headset"
	bluez.path = "/org/bluez/hci0/dev_04_5D_4B_A5_9C_E4"
	bluez.class = "0x240404"
	bluez.alias = "MDR-ZX770BN"
	device.icon_name = "audio-headset-bluetooth"
	device.intended_roles = "phone"
profiles:
	headset_head_unit: Headset Head Unit (HSP/HFP) (priority 20, available: unknown)
	a2dp_sink: High Fidelity Playback (A2DP Sink) (priority 10, available: no)
	off: Off (priority 0, available: yes)
active profile: <off>
ports:
	headset-output: Headset (priority 0, latency offset 0 usec, available: unknown)
		properties:
			
	headset-input: Headset (priority 0, latency offset 0 usec, available: unknown)
		properties:

Ok i have managed to get my a2dp headset working once and do not manage to get it workin again. Looks like i am not the only one having a problem

https://bugs.freedesktop.org/show_bug.cgi?id=92102

The solution seems to download the python script but unfortunately is python3.5

Hi.
I have the same problem too After dicember update. Bluetooth headphones pair up but I can not hear any audio.

Also appears to be broken since the December update, using the Pi as a Bluetooth speaker. When pairing with my phone it just appears as a generic Bluetooth device so there’s no option to stream to it. Hasn’t worked on the 2 Pis I’ve tested it on but it worked on both before the update.

I have RPI3 and bluetooth headset JBL e25bt. My device after few attempts connect but one seconds after id disconnects :frowning:

I use this command to disable internal bluetooth module:
I use dtoverlay=pi3-disable-bt

I use this adapter:
http://www.delock.com/produkt/61889/pdf.html?sprache=en

I think it is still working it’s pulseaudio which does not start.

You could try launching it by putting pulseaudio --start in osmc

Where do I put that line of code?

in this article it say that on stretch pusleaudio is not installed.

quote:
we are using the bluez-alsa package to make Bluetooth audio work with ALSA itself.

It is not installed by default. The a2dp-app-osmc package installs it.

Can you give me instructions how to do that please?

All the instructions in this thread are outdated. In theory, all you need to do is

sudo apt-get update
sudo apt-get install a2dp-app-osmc

However since the update to stretch/17.6 at the beginning of this month, bluetooth audio is not working as it used to. The exact reason is still being looked into.

The thread is now closed until we have a new solution

Sam

4 Likes

I’m re-opening this – as we resolved the issues here some time ago.
After Kodi v18 is released, we will likely integrate this so no additional steps are needed.

Sam

4 Likes

I have installed this a2dp solution and it works almost great. The only problem is after I reboot OSMC sounds of GUI are very high pitched and loud. I have to change audio settings in Kodi from “AML-M8AUDIO,HDMI” to default PulseAudio and again to “AML-M8AUDIO,HDMI” to get rid of these strange sounds.

My configuration is: PulseAudio connected to BT audio receiver is default and I’m using it for Raspotify to stream my music wirelessly. Still I want Kodi to send audio through HDMI and not default PulseAudio and it works… until I reboot when it gets distorted.

Any idea how to resolve this issue? Maybe by changing default audio device from PulseAudio to HDMI? But I don’t know how to do it. And even if I do I guess I will not know what to put in raspotify as the “–device ???” (now it’s “–device default”).

Hey Sam, that’s great news to read! Thanks, waiting impatiently for it :slight_smile:

Can you post a log when the audio is distorted?

Sam

Of course: https://paste.osmc.tv/eqalamuxos