Created onsdag 28 december 2016
Getting Alsa to play over bluetooth proved tricky - and the management/control was terrible.
The sound works out-the-box with PulseAudio and it made bluetooth output a lot easier.
Alsa default device
# By default alsa doesn't detect the correct device for me.
# To correct this, create/edit /etc/modprobe.d/modprobe.conf
# And add the following line. A reboot is required before it'll take effect.
options snd_hda_intel index=1
PulseAudio
# PulseAudio is the sound server that will manage our sound through Alsa.
Installation
$ pacman -S pulseaudio pulseaudio-alsa lib32-libpulse lib32-alsa-plugins
Volume Controls
# CLI Curses controls
$ cower -d pulsemixer
# And if you are in the mood for a GUI tool^
$ pacman -S pavucontrol
Pulseaudio-ctl
# Get CLI controls as well (used for multimedia keys)
$ yaourt -S pulseaudio-ctl
# Control with;
pulseaudio-ctl mute-input # Toggle status of mute for mic
pulseaudio-ctl up # Increase vol by 5 %
pulseaudio-ctl up 25 # Increase vol by 25 %
pulseaudio-ctl down # Decrease vol by 5 %
pulseaudio-ctl down 50 # Decrease vol by 50 %
pulseaudio-ctl set 40 # Set vol to 40%
pulseaudio-ctl atmost 30 # Set vol to 30% if current higher than that
Troubleshoot
# Reset PulseAudio. This worked when daemon failed to start on new installation.
$ rm -rf /tmp/pulse* ~/.pulse* ~/.config/pulse
$ pulseaudio -k
$ pulseaudio --start
Bluetooth Speaker
# This requires you've to have been through bluetooth.
Installation
$ pacman -S pulseaudio-alsa pulseaudio-bluetooth
Usage
# Connect to the device as explained in bluetooth.
# You should now be able to select the output through pavucontrol.
Tips and Tricks
# To autoconnect when starting the bluetooth.service
# First add this to the ~/.config/pulse/default.pa
# automatically switch to newly-connected devices load-module module-switch-on-connect
# Then trust the device through the bluetoothctl shell
# Obtain and pair the device MAC as explained in bluetooth
$ bluetoothctl
$ trust <MAC_ADDRESS>
# The bluetooth adapter does not power on between reboots
# (the bluetoothctl > power on powering on)
# To correct this, create a udev rule in /etc/udev/rules.d/10-local.rules
# Add the following
# Set bluetooth power up ACTION=="add", SUBSYSTEM=="bluetooth", KERNEL=="hci[0-9]*", RUN+="/usr/bin/hciconfig %k up"