Sources:
Dependencies:
git clone https://github.com/mstorsjo/fdk-aac.git
cd fdk-aac
./configure
make -j4
# sudo make install
git clone https://github.com/Arkq/bluez-alsa.git
cd bluez-alsa
git checkout v1.4.0
autoreconf --install
mkdir build && cd build
# if u intend to stream audio from a linux distribution
# (e.g. using pulse audio) disable payloadcheck
../configure --enable-aac --disable-payloadcheck
make
sudo make install
- copy files
sudo cp -v bluetooth/* /etc/bluetooth/
sudo cp -v services/* /etc/systemd/system/
sudo cp -v bin/* /usr/local/bin
-
Edit
/lib/systemd/system/bluetooth.serviceand append toExecStart:--noplugin=sap -
Enable systemd services
sudo systemctl daemon-reload
sudo systemctl restart bluetooth.service
sudo systemctl enable bluealsa.service
sudo systemctl enable bluealsa-a2dp-playback.service
sudo systemctl enable bluetooth-a2dp-agent.service
sudo systemctl start bluealsa.service
sudo systemctl start bluealsa-a2dp-playback.service
sudo systemctl start bluetooth-a2dp-agent.service
- Start bluetooth:
sudo bluetoothctl. Enter:
power on
discoverable on
If you have multiple sound cards installed (e.g. hifiberry) you need to speciy which one is used. Use aplay -l to identify number of card. Afterwards specify default card for aplay in /etc/asound.conf:
pcm.!default {
type hw card 1
}
ctl.!default {
type hw card 1
}