Config sound over bluetooth

Preparing OpenELEC 2.0 (it will not work on 3.x) system from linux machine
First, what you need to do is add some Bluez scripts and files into your OpenELEC system by "unsquashing" it.

Mount your SYSTEM file on some linux machine sudo mkdir /media/oe sudo mount -t squashfs -o loop SYSTEM /media/oe Make a directory and copy all files from mounted read-only fs mkdir openelec-bluetooth cp -a /media/oe/* openelec-bluetooth sudo umount /media/oe I've prepaired all Bluez script and files here: http://www.filefactory.com/file/66t9tdf2d7pr/n/openelec-bluetooth.tar or here http://depositfiles.com/files/9d5j5fy1q

Untar archive into your openelec-bluetooth directory tar pxvf openelec-bluetooth.tar -C openelec-bluetooth/ Modify /etc/bluetooth/audio.conf file (without this, your audio transfer probably will be lagging) nano openelec-bluetooth/etc/bluetooth/audio.conf add these lines Disable=Media Enable=Socket Now your oe system is prepaired for "mkqsuashing" back into file mksquashfs openelec-bluetooth SYSTEM_BLUETOOTH

Configure OpenELEC 2.0
Copy SYSTEM_BLUETOOTH file into your Update folder. Copy also KERNEL file there, you find this file into your original current release archive. Rename mv SYSTEM_BLUETOOTH SYSTEM Reboot your device. After booting up your system will be capable of bluetooth connecting. Plug your bluetooth adapter into USB port and connect to your device via SSH Make sure the bluetooth daemon is running bluetoothd Try to run hciconfig command, you should get something similar hciconfig hci0:	Type: BR/EDR Bus: USB BD Address: 00:27:13:87:6A:B9 ACL MTU: 1021:8  SCO MTU: 64:1 UP RUNNING PSCAN ISCAN RX bytes:1414 acl:0 sco:0 events:49 errors:0 TX bytes:1437 acl:0 sco:0 commands:49 errors:0 Get your MAC address of A2DP device from hcitool command (i have Sony HWS-BTA2W Bluetooth Transmitter & Receiver) hcitool -i hci0 scan Scanning ... 00:13:A9:62:FF:74	HWS-BTA2W Connect to your A2DP device (use your A2DP device MAC address and your PIN code) echo "0000" | bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX Set device as trusted bluez-test-device trusted XX:XX:XX:XX:XX:XX yes Try to connect device to the audio sink bluez-test-input connect XX:XX:XX:XX:XX:XX If this command fails, instead of that command run this (don't forget to correct your MAC address!!) default_adapter=$(dbus-send --system --print-reply --dest=org.bluez / org.bluez.Manager.DefaultAdapter | awk '/object path/ {print $3}' | sed 's/"//g') dbus-send --system --dest=org.bluez --print-reply $default_adapter/dev_XX_XX_XX_XX_XX_XX org.bluez.Audio.Connect Now your adapter should be connected. After reboot if device won't connect automaticaly, just repeat last two commands above.

Configure .asound.conf
Add these lines to ~/.config/asound.conf pcm.!default { type bluetooth device "XX:XX:XX:XX:XX:XX" } or you can create slave devices something like in ~/.config/asound.conf.sample/asound.conf_double-xs35gt.sample for multiple audio outputs. Set audio settings in OpenELEC to "ALSA (defaults)".

Successfully tested on * OpenELEC-ION.x86_64-devel-20120402151138-r10416 * OpenELEC-ION.x86_64-1.95.1

Big thanks for helping figure it out belongs to users ancalex and kallerosenbaum