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

Well, I thing if you don’t need bluetooth speaker but want to use bluetooth devices as a source with your HiFi card it’s acceptable to do next thing:

  1. In Settings>System>Audio Output select output audio to “ALSA: OSMC streaming to Bluetooth”.
  2. Execute “pactl list sinks”. You’ll see several sinks. In one of them you’ll see description with something like “snd_rpi_hifiberry_dacplus Analog Stereo”. Copy the value of it’s Name field.
  3. Execute “pactl set-default-sink name”, where name is the name you’ve copied in previos step.
  4. Reboot (?)

Now all the sounds will be available through your HiFi device.
But I’m not shure that this is a realy good scenario, so it’s just a temporary work-around if you want to use your HiFi card with bluetooth source device now. But maybe it’s better to wait until official support will be added.

Hi,
bluetooth audio streaming is not supported in release 2015.12-4? I can’t find ALSA: OSMC streaming to Bluetooth audio output.

Did you follow the instructions in my first post?

These are still necessary for now to get Bluetooth audio streaming operational

Sam

Aaa, I’m sorry. I understood, that bluetooth streaming will be already in new release, so no additional installation would be required. Thanks.

We will let you know when BT is merged in to OSMC. We are developing BTPlayer, which will let you see and control playback information in Kodi.

Cheers

Sam

I wanted to buy a HiFiBerry AMP (not the DAC) for my parents to have less hardware in their living room (they dont use their old hifi set at all) but bluetooth as source is a requirement for them since they prefer playing music via phone or tablet. Now I wonder: does the HiFiBerry AMP also require ALSA? Or is this only required for the Hifiberry DAC?
Your workaround makes sense but with DSP coming to Kodi it might not work in a few months.

I believe all HifiBerry products use ALSA.

I have not looked in to this in detail, but I think there is a CAESinkSource (or some equivalent class) which is provided to a sink as output after some given set of DSP operations have taken place. I know that the dual audio patch will be broken by this, but I have not looked in to this much farther.

Sam

I think that HiFiBerry AMP also has embedded DAC. So there shouldn’t be a big difference in settings when using AMP or DAC HiFiBerry module with OSMC.

Colud you please give me a link with description of this DSP?
If it works as Sam notes than DSP setting will apply to all OSMC sounds but will not apply to sounds from Bluetooth source I suppose.

Check: Adding Audio DSP Plugin to AddonManager
Wisler is the Kodi dev to talk to. Perhaps his post 212 is useful to you. I am no expert, things like CAESinkSource are magic to me.

I try BT2. It work same as BT4.

[ 5.804818] Bluetooth: Core ver 2.20
[ 5.804918] NET: Registered protocol family 31
[ 5.804929] Bluetooth: HCI device and connection manager initialized
[ 5.804957] Bluetooth: HCI socket layer initialized
[ 5.804974] Bluetooth: L2CAP socket layer initialized
[ 5.805009] Bluetooth: SCO socket layer initialized
[ 5.852574] usbcore: registered new interface driver btusb

Hi,

I had a CSR 4.0 BT adapter lying around and thought could use OSMC as a BT sink, so followed through all the posts and replies in this thread. I could make it work thanks to Sam and all the guys who replied. But am facing a issue which am not able to figure out. I was able to connect and play the audio on my tablet over through OSMC but the sound always comes to the TV via the HDMI. I changed the Audio output to PI:Analog, and edited the config.txt file, still the same. Though now the system sounds come through the speakers connected to the PI but when i try streaming the Audio it still plays through the TV Speakers.

Any help on the issue??

Hi

Bluetooth audio is working for me. The problem came when I install ps3 driver in RetrOsmc. Gamepad works great but bluetooth audio streaming in Kodi stop working

Ps3 drivers installed the following packages: bluetooth joystick libbluetooth-dev libbluetooth3 libusb-dev

Bluetooth.service enter in failed state. I run journalctl -xn:

sudo journalctl -xn
– Logs begin at lun 2016-01-18 19:40:17 CET, end at lun 2016-01-18 20:25:26 CET. –
ene 18 19:57:46 osmc sudo[664]: pam_unix(sudo:session): session opened for user root by osmc(uid=0)
ene 18 19:57:46 osmc systemd[667]: Failed at step EXEC spawning /usr/lib/bluetooth/bluetoothd: Permission denied
– Subject: Process /usr/lib/bluetooth/bluetoothd could not be executed
– Defined-By: systemd
– Support: systemd-devel Info Page

– The process /usr/lib/bluetooth/bluetoothd could not be executed and failed.

– The error number returned while executing this process is 13.
ene 18 19:57:46 osmc systemd[1]: bluetooth.service: main process exited, code=exited, status=203/EXEC
ene 18 19:57:46 osmc systemd[1]: Failed to start Bluetooth service.
– Subject: Unit bluetooth.service has failed
– Defined-By: systemd
– Support: systemd-devel Info Page

– Unit bluetooth.service has failed.

– The result is failed.
ene 18 19:57:46 osmc systemd[1]: Unit bluetooth.service entered failed state.
ene 18 19:57:46 osmc sudo[664]: pam_unix(sudo:session): session closed for user root
ene 18 20:14:32 osmc sudo[683]: osmc : TTY=pts/0 ; PWD=/usr/lib/bluetooth ; USER=root ; COMMAND=/bin/journalctl -xn
ene 18 20:14:32 osmc sudo[683]: pam_unix(sudo:session): session opened for user root by osmc(uid=0)
ene 18 20:25:26 osmc sudo[688]: osmc : TTY=pts/0 ; PWD=/usr/lib/bluetooth ; USER=root ; COMMAND=/bin/journalctl -xn
ene 18 20:25:26 osmc sudo[688]: pam_unix(sudo:session): session opened for user root by osmc(uid=0)

It seems a permission problem, I am a novice, any help to get working a2dp on kodi again and keep working ps3-pad on retrosmc?

Thank in advance

Hey Guys,
using the Asus USB-BT400 (as Bluetooth stick on the PI2) to connect to the TP-Link HA100 (as audio sink) to listen with headphones.
Works like a charm!
Thanks Guys!

Hello again,
I had BT audio stream to work from my CSR8510 A10 to a bluetooth enable amp today (BC Acoustique EX 202.2). It works just fine.
However, there is a little delay due to the bluetooth. When I play a video, I have to correct audio sync manually (-300ms). I assume this delay is added by the bluetooth streaming and will be the same with all movies with audio via bluetooth. I wonder if it could be a good idea to add an option to tune the bluetooth audio delay when a video is played.

It would be great if BTPlayer could automatically detect if bluetooth speakers are switched on and if they are switched on it could automatically start streaming to bluetooth speakers.

That is already working with the current solution switching from Bluetooth speakers to HDMI based on the Bluetooth status

Having the following problem after installing the a2dp app:

osmc ~ $ sudo systemctl status shairport-sync -l

  • shairport-sync.service - ShairportSync AirTunes receiver
    Loaded: loaded (/lib/systemd/system/shairport-sync.service; enabled)
    Active: failed (Result: exit-code) since Tue 2016-01-26 18:06:40 CET; 58min ago
    Process: 735 ExecStart=/usr/local/bin/shairport-sync (code=exited, status=1/FAILURE)
    Main PID: 735 (code=exited, status=1/FAILURE)

Jan 26 18:06:40 indri shairport-sync[735]: Failed to create secure directory (/home/shairport-sync/.config/pulse): No such file or directory
Jan 26 18:06:40 indri shairport-sync[735]: Failed to create secure directory (/home/shairport-sync/.config/pulse): No such file or directory
Jan 26 18:06:40 indri shairport-sync[735]: ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Access denied
Jan 26 18:06:40 indri shairport-sync[735]: Failed to attach mixer
Jan 26 18:06:40 indri systemd[1]: shairport-sync.service: main process exited, code=exited, status=1/FAILURE
Jan 26 18:06:40 indri systemd[1]: Unit shairport-sync.service entered failed state.

Any help on how to solve it?

Some info:

osmc ~ $ aplay -l | grep card
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]

Thought on manually forcing source/sink in /etc/pulse/default.pa but when trying to find out the names got this:

osmc ~ $ sudo pacmd list-sinks | grep -e ‘name:’ -e ‘index’
No PulseAudio daemon running, or not running as session daemon.

I haven’t touched pulseaudio configs yet.

I don’t know what’s shairport-sync is. It is not part of OSMC, so you may want to revert any changes you have made there

Sam

ok makes sense, thanks anyway :wink:

just connected to a newly purchased bt adapter(Oehlbach BTX 1000) in order to make my current sound output device (bose sounddock speaker), bluetooth capable.

Works fine so far :slightly_smiling:

Will report after reboot if autoconnection works…

Thanks a lot Sam!

Hi Sam and community,
I installed the bluetooth upgrade and everything works fine so far. But now my usb soundcard won’t be detected and doesn’t appear in the audio output list. It isn’t that dramatically, but IMO the sound quality is not as good as like with the sc. Is there a way get it back? (I tried the search function but didn’t find sth.)
Greetings
Kai