5 https://raw.githubusercontent.com/automotive-grade-linux/docs-sources/master/docs/audio/bluez-alsa.md
8 <!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/audio-developer-guides-audio-book.yml -->
14 Bluetooth Audio ALSA Backend allow bluetooth audio without PulseAudio.
16 This project is a rebirth of a direct integration between Bluez and ALSA. Since Bluez >= 5, the build-in integration has been removed in favor of 3rd party audio applications. From now on, Bluez acts as a middleware between an audio application, which implements Bluetooth audio profile, and a Bluetooth audio device.
18 github source : [bluez-alsa](https://github.com/Arkq/bluez-alsa)
20 ## Add bluez-alsa to an AGL image
22 You can add bluez-alsa to your image
25 IMAGE_INSTALL_append = "bluez-alsa"
28 ## Check bluez-alsa status
30 You can check the bluez-alsa status by running:
33 systemctl status bluez-alsa.service
38 You must disable pulseaudio if you want to use bluez-alsa
41 systemctl --user stop pulseaudio
44 or disable pulseaudio bluetooth support
47 vi /etc/pulse/default.pa
48 #.ifexists module-bluetooth-policy.so
49 #load-module module-bluetooth-policy
52 #.ifexists module-bluetooth-discover.so
53 #load-module module-bluetooth-discover
57 ## Connect your Bluetooth device
59 You need to connect a bluetooth device
63 [bluetooth]# pair ${BT_ADDR}
64 [bluetooth]# connect ${BT_ADDR}
65 [bluetooth]# info ${BT_ADDR}
68 Here somes documentation links:
70 * [Bluetooth headset from archlinux](https://wiki.archlinux.org/index.php/Bluetooth_headset)
71 * [Bluetooth Headset from gentoo](https://wiki.gentoo.org/wiki/Bluetooth_Headset)
72 * [Bluez A2DP AudioSink for ALSA](http://www.lightofdawn.org/blog/?viewDetailed=00032)
73 * [Bluez A2DP](http://www.lightofdawn.org/wiki/wiki.cgi/BluezA2DP)
75 ## Test bluez-alsa speacker
78 wget http://www.kozco.com/tech/piano2.wav
80 aplay -D bluealsa:HCI=hci0,DEV=${BT_ADDR},PROFILE=a2dp ./piano2.wav
83 ## Add bluez-alsa pcm config to alsa
97 description "Bluetooth Audio ALSA Backend"
102 Doc [asoundrc](https://alsa.opensrc.org/Asoundrc)
107 aplay -D btheadset ./piano2.wav
110 ## Test gstreamer player
113 gst-launch-1.0 uridecodebin uri=file:///mnt/Holy-Mountain.mp3 ! alsasink device=btheadset
116 ## Test bluez-alsa phone
118 After connected your phone with bluez:
121 bluealsa-aplay ${BT_ADDR}