; Unit file from bluealsa wiki by borine
[Unit]
Description=Bluealsa daemon
Documentation=https://github.com/Arkq/bluez-alsa/
After=dbus-org.bluez.service
Requires=dbus-org.bluez.service
StopWhenUnneeded=true
[Service]
Type=dbus
BusName=org.bluealsa
EnvironmentFile=-/etc/default/bluealsa
ExecStart=/usr/bin/bluealsa $OPTIONS
Restart=on-failure
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
RemoveIPC=true
RestrictAddressFamilies=AF_UNIX AF_BLUETOOTH
; Also non-privileged can user be used
;User=bluealsa
;Group=audio
;NoNewPrivileges=true
[Install]
WantedBy=bluetooth.target
This file describes the bluetooth sinks available for Kodi to play to
add lines like the following for each BT device (speaker or headphones)
pcm.mybtdevice {
type bluealsa
device “08:E8:4D:87:64:33”
profile “a2dp”
hint { show on description “E11BT”}
}
pcm.my2ndbtdevice {
type bluealsa
device “5C:FB:7C:31:45:43”
profile “a2dp”
hint { show on description “P22BT”}
}
pcm.my3rdbtdevice {
type bluealsa
device “42:24:56:45:7A:74”
profile “a2dp”
hint { show on description “TWS50”}
}
using the MAC of the device (see bluetoothctl) instead of 12:34:56:78:9A:BC
Use any letters or numbers for the description which will show up in Settings-System-Audio
Thanks. That looks OK. You could try using a plug device for each of your BT devices like so:
osmc@vero4kp2:~$ cat .asoundrc
pcm.jblflip {
type plug
slave.pcm {
type bluealsa
device "FC:A8:9A:B3:42:4F"
profile "a2dp"
}
hint { show on description "JBL Flip 3"}
}
Thanks @grahamh. I just gave it a go with the proposed .asoundrc
but the behaviour of my Nokia BH-905 Headphones is exactly the same as before: no sound, things start to slow down until I need to reboot, which again stops 1m30s on bluealsa when stopping.
[Nokia BH-905]# info
Device 00:0B:E4:3B:DD:3D
Name: Nokia BH-905
Alias: Nokia BH-905
Class: 0x240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
LegacyPairing: no
UUID: Headset (00001108-0000-1000-8000-00805f9b34fb)
UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: Advanced Audio Distribu.. (0000110d-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
I will have some time tomorrow to test everything again using the external BT dongle only.
I have now tested everything again using an external bluetooth dongle, and the results have been 100% identical. I have used both “versions” of .asoundrc
I am happy to run any further tests or get more logs.
I haven’t forgotten you guys. I need to work out some troubleshooting steps. Can we start with uploading some debug logs: reboot->connect BT device->restart Kodi (Power->Exit)->select BT device in Settings->System->Audio then upload logs (may have to use command line if Kodi has slowed down).
We just figured out that the package seems not be pushed to the repository. So you need either install it manually as described in post 1 or wait a few days.
Copy it where ever you want to run dpkg. Normally you would copy it into /home/osmc/.
If you have access with Kodi filemanager to the location where you have the file it is fine to use that.
Streaming audio from Kodi to headphones does not work. The Bluetooth pair is successful, but the audio still plays from the TV.
Streaming from phone to Kodi is working, but there is no visual hint. Many car audio systems can show the track name and data, send next and previous controls and even seek the audio track. It would be nice to have them in Kodi.
Here is my .asoundrc file:
osmc@vero:~$ cat ~/.asoundrc
pcm.mybtdevice {
type bluealsa
device "A4:77:58:73:4D:4C"
profile "a2dp"
hint { show on description "Philips"}
}