Pulseaudio

From Blue-IT.org Wiki

Revision as of 08:55, 22 February 2016 by Apos (talk | contribs) (= Ubuntu 14.04)

Connect bluetooth headset

Ubuntu 14.04

Add the following ppa:

sudo add-apt-repository ppa:blueman/ppa
sudo apt-get update
sudo apt-get upgrade blueman

Further reading:

Script for a simple bluetooth headset:

#!/bin/bash
# switches automatically between bluetooth headset and loutspeaker
# be sure you have checked that the device is enabled 
# in the "configurations" section of puvcontrol AND
# in /etc/bluetooth/audio.conf auncomment the line
# like this: "# AutoConnect=true"

###################################################
# EDIT
# use this command to find out:
# pacmd list-sinks | grep "name:"

myBTHeadSetSinkName="bluez_sink.xx_xx_xx_xx_xx"
myDefaultSinkName="alsa_output.usb-name_of_device.analog-stereo"
###################################################

while (true)
do

if pacmd list-sinks | grep "${myBTHeadSetSinkName}"
then
	pacmd set-default-sink "${myBTHeadSetSinkName}"

else
	pacmd set-default-sink "${myDefaultSinkName}"

fi


sleep 5

done