[TESTING] Bluetooth audio streaming (A2DP)


#1

Hi,

We’d like to add Bluetooth audio streaming to the App Store shortly, but first we’d like to get some feedback and testing done.

Make sure your system is fully up to date, and then run the following commands:

echo "deb http://apt.osmc.tv jessie-devel main" | sudo tee /etc/apt/sources.list.d/a2dp.list
sudo apt-get update
sudo apt-get install a2dp-app-osmc
sudo rm /etc/apt/sources.list.d/a2dp.list

Note:

  • Pairing is sometimes problematic. This is being worked on.
  • If you experience stutters or dropouts, it may be your dongle. I personally experienced this with a couple of Bluetooth dongles and had better luck with other ones. We sell an official dongle here which works well.
  • Users often report problems with stuttering / dropouts using the Raspberry Pi 3’s internal Bluetooth adapter. While we hope this changes in the future and we plan to support as much hardware as possible, we can’t guarantee a good experience with this adapter at this time. Our development and testing is involved around [this] (https://store.osmc.tv/product/bluetooth-dongle/) dongle, and this is the one we officially support.
  • This is testing, so the usual warnings apply

22nd April 2017: getting closer to a stable release; but this still only works with a limited number of adapters/dongles. If you experience stuttering or dropouts, please read the above advice first.

Sam


Bluetooth audio
OSMC is developing Bluetooth streaming capabilities
Bluetooth Streaming to Headphones
OSMC Bluetooth Dongle
Mindsensors.com (formerly OpenElectrons) Bluetooth Module
Raspberry Pi 3 - **BlueTooth Mega Thread **
Raspberry Pi 3 - **BlueTooth Mega Thread **
Using OSMC on Raspberry Pi B to Play music on bluetooth speakers
Bluetooth troubles with Pi3 and Android
OSMC - Streaming audio via bluetooth TO OSMC
rPi 3: Bluetooth headset not connecting
Stream audio from android to osmc
Can't connect bluetooth devices (RPi 3)
Bluetooth Audio to OSMC
I finally found a way to stream audio from OSMC (RPi) to your smartphone (Android) over WiFi/LAN
Blutooth
Connecting Bluetooth Headphones to OSMC
Connecting A Bluetooth Device
Trying to connect UE Boom 2 via Bluetooth to OSMC on RPi 3
Stream audio from osmc KODI to Jabra bluetooth headset. Failed to connect: org.bluez.Error.NotAvailable
No "Bluetooth" setting in audio output options
No sound out via headphone jack
Errors were encountered while processing: armv7-diskmount-osmc
Using OSMC on RP3 as a Bkuetooth Speaker
Bluetooth Audio on OnePlus 3T
ALSA audio through 3.5mm jack instead of HDMI
Vero 4K Question
Rasbperry PI 3 OSMC A2DP install failed
VERO 4K Bluetooth sound issues
[HowTo] RetroPie and OSMC: Retrosmc - Retrogaming on OSMC
Stream audio from osmc KODI to bluetooth audio device
Stream audio from osmc KODI to bluetooth audio device
[HowTo] Use OSMC as a Bluetooth Speaker (a2dp sink)
Streaming Audio via Vero from laptop possible?
Audio via Bluetooth - is it possible?
Bluetooth Hardware Question
Connect Bose Mini Soundlink to OSMC using bluetooth
Bluetooth fails to connect
Pairing Apple Airpods with Vero 1
Raspberry Pi 3 connect to Bose SoundLink Mini failed
PulseAudio
Offset sound
Weird problem with Bluetooth audio streaming (Pause and Stop)
Bluetooth dongle purchased from OSMC not working
Minor Bluetooth/Audio Issues
Vero 4k - First Impressions
Bluetooth Connection fails (A2DP)
Bluetooth dongle from the OSMC store does not work on Vero 2
OSMC With Bluetooth Streaming from Android Phone
OSMC With Bluetooth Streaming from Android Phone
UE Roll speaker will not connect
Pvr client wontload after reboot
Bluetooth audio streaming issue
Bluetooth problems
#2

It’s working fine for me.
No pairing issues and just changed my audio output for it to start.
Surprisingly and happily it is better quality then I ever got from A2DP from a phone before and for a second I thought it was using apt-x but even though both my dongle and headphones support it I know it is not.


#3

Good stuff.

You might notice that it just ‘plays’ and Kodi isn’t aware of that. I’m hoping to add a Bluetooth player to Kodi soon (it may miss this month’s update) as some of our team are away and we’ve been quite busy focusing on other things. This will allow you to see the artist name, track name, and any of the built-in Kodi visualisations.

Cheers

Sam


#4

I do like that I can leave my “Number of channels” at 7.1 and it auto down mixes to 2.0 then if I turn my headphones off when audio is playing it auto switches back to HDMI outputting the correct 7.1 channels.

Sadly and unrelated to this setup but when testing it with a 8 channel test file (I wanted to see if it was going to drop channels or downmix) I learned that Kodi is not outputting the surround right channel either to the downmixed A2DP or even straight regular HDMI (Receivers built in sound test works so it is the Pi specifically even though it worked previously when I tested the first time you released 8 channel support)
Since it is unrelated to this test I will start a new post with a debug log after I wake-up since I’m going to bed now.


#5

If pairing is sometimes problematic because of some bt dongles, maybe its a good idea people that have no problems report what kind of dongle they bought.

That might be a good idea in the long run, having a list of dongles that fully are compatible/ fully supported.

By the way Really thank you @sam_nazarko


#6

@sam_nazarko,

installation went fine
Pairing went fine
Connecting went fine
But no sound comes out
Anything I am missing?

I used bluetoothctl to pair and here is the output

[bluetooth]# info 08:DF:1F:21:CB:03
Device 08:DF:1F:21:CB:03
Name: Bose Mini SoundLink
Alias: Bose Mini SoundLink
Class: 0x240428
Icon: audio-card
Paired: yes
Trusted: no
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)


#7

Ok, it is working now. I needed to change audio output to pulseserver
Must have misunderstood when you wrote

thought that means no need to change audio output.

BTW: Didn’t you in the past objected pulseaudio as a resource killer?


#8

I think Sam’s comment was regarding using OSMC as an audio sink in receiving audio. In our testing so far, some devices are able to send audio via BT for output via OSMC.


#9

Yeah, thanks went I read it again I understood. If was too much focus on getting my speaker going to understood that his intention was OSMC as an audio-sink.

Anyhow I got it working, all fine now only remaining issue I have that after a reboot I get the speakers only connected when I unplug and re-plug the bluetooth stick otherwise I get Failed to connect: org.bluez.Error.NotReady


#10

Thanks, all info on behavior for sending audio in either direction will be helpful.


#11

yeah can confirm that the following dongle

[ 141.191687] usb 1-1.2: new full-speed USB device number 7 using dwc_otg
[ 141.322574] usb 1-1.2: New USB device found, idVendor=1131, idProduct=1004
[ 141.322597] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 141.322609] usb 1-1.2: Product: ISSCEDRBTA
[ 141.322620] usb 1-1.2: Manufacturer: ISSC

works with the

Bose Mini SoundLink

as audio sink


#12

Are you saying that you are streaming from OSMC to a speaker? I have not tested this and it’s not supported at the moment. I am actually going to remove the ability to select a Bluetooth output via Kodi, because PulseAudio can badly break sound, especially for things like Passthrough. I must think of a nice way to allow PulseAudio sinks in Kodi without breaking things by default. For now the focus is on making OSMC an A2DP sink.

It can be tamed. By making it an App, you have full control over when it’s running (My OSMC -> Services); and it only uses real resources when it’s handling a BT stream, so you should be OK.


#13

I thought streaming from OSMC to speakers was the whole point and was all I tested. It worked great. I will also use the other direction but you shouldn’t get rid of the ability for OSMC to output that way.


#14

It causes significant regressions in HD audio, so I will remove the feature in the next update unless I can find a good way to deal with it. The A2DP app and Kodi are tightly coupled: the current Kodi builds in staging do not permit this anymore.

Pi works by fluke (CAEPiSink is brought up before ALSA sinks), but this will cause issues on a Vero, Apple TV, PC etc unless the user manually selects HDMI or SPDIF again.

I’m sure I’ll think of something…

The problem here is a lot of them look the same, but have different chipsets and you only discover this once you plug them in. I have three that look the same; only one worked. I will be sourcing some of these to sell in our store for users that are unsure.

Sam


#15

You’re right on the regressions, that is what was causing my right rear surround channel not to work. I have it working again now. Thanks for all the hard work.


#16

Hi @sam_nazarko,

yes that was my only intend (similar to @shadow). I am sorry that I misunderstood your post and intention. But as you might have seen over the last couple of months there are many posts in the forum where people ask about using their Bluetooth speakers with OSMC.
I understand the challenges you have specially with the HD audio. But I would assume as soon as people switch back to PI:HDMI there are no issues with the HD audio evenso the Alsa/Pulseserver option remains in audio output, or?

For me the current setup works perfect, when I choose Alsa/Pulseserver as the Audio Output the sound normally goes out via HDMI to my TV and when I switch on my bluetooth speaker my TV get’s silent and the bluetooth speakers are playing.
I don’t use any surround sound solution so for me it works like a charm.
As mentioned the intention is to have OSMC to play to the bluetooth speaker to listen to Internet Radio.

Cheers

Fred


#17

Only for Raspberry Pi, but other systems that use the ALSA sink will be negatively affected. I will need to think about this.

Sam


#18

Understand, the multiplatform compatibility of OSMC is a great feature which I guess requires many more thoughts and testing.


#19

Testing. I am using a BMC2045 Broadcom based dongle. Paired with my Samsung Galaxy S4 and a pair of Beats wireless. Audio ouput set to PulseAudio Sound Server. I am streaming Music to the Beats.

The first 20 seconds was a bit choppy. Then settled down to a nice stream. I have been streaming for 30 mins so far, no issues.

I then turned the headphones off and the music switched to the HDMI connected TV. Turned the Beats back on and it reconnected and resumed playing through the headphones. Again, roughly 15 seconds of choppy play then settled in just fine!


#20

This is probably specific to the BCM2045 itself. I will see if we can improve buffering.

Sam