-
BLUETOOTH
Here you find a manual to configure bluetooth with ALSA or Pulseaudio:
————————————————————————————————————–
HOW TO MAKE ALSA AND BLUETOOTH WORK TOGETHER WITHOUT PA
————————————————————————————————————–
This part is for pure ALSA-based systems without Pulseaudio like QS64!
Be sure that Pulseaudio is deinstalled and your soundcards
configured right in ALSA!
- delete pulse-audio cookies and files in
/home/USERNAME/.config/pulse
——————————————————————-
1. Modify your bluetooth-audio.conf:
type:
gksudo pluma /etc/bluetooth/audio.conf
Set
# This section contains options which are not specific to any
# particular interface
[General]
Enable=Socket
Save the file.
2. setup ~/.asoundrc file
type:
sudo hcitool scan
Scanning …
XX:XX:XX:XX:XX:XX Stereo Headset
Create a hidden-file named .asoundrc in your home-folder!
and write:
pcm.!default {
type plug
slave.pcm {
type bluetooth
device “XX:XX:XX:XX:XX:XX”
profile “auto”
}
}
Replace “XX:XX..” with the adress of your device.
Save the file!
Run these after you change the asoundrc or audio.conf files:
sudo service bluetooth restart
sudo alsa force-reload
or reboot your computer!
———————————————————————————————————–—-
Go to your blueman-applet at your taskbar, search & setup your new device!
Note: Some bluetooth-devices need a passphrase (eg. 0000) by default
- while some others takes shuffle-pairing.
Keep your found and paired device to “trust”!
Connect your device as AUDIO via A2DP!
————————————————————————————————————
If the bluetooth-device is connected with system you have sound with:
totem, mplayer, qmmp, banshee, vlc-player* and browser (e.g. firefox)
over bluetooth now! :-)
NOTE: If you hear no sound, set the output in players to “default”!
—————————————————————————————————–———
RENAME THE .ASOUNDRC IN HOME-FOLDER TO “.ASOUNDRC_OFF”
TO GET YOUR OLD SOUND-SETTINGS AND TO DISABLE BLUETOOTH!
type: mv /home/USERNAME/.asoundrc /home/USERNAME/.asoundrcOFF
->to disable the bluetooth-specific asoundrc
type: mv /home/USERNAME/.asoundrcOFF /home/USERNAME/.asoundrc
-> to enable it!
Alternative:
Make two “script-buttons” to activate/deactivate bluetooth with .asoundrc:
Create an empty file and write/paste:
#!/bin/bash
mv /home/USERNAME/.asoundrc /home/USERNAME/.asoundrcOFF
or:
#!/bin/bash
cd /home/USERNAME/
mv .asoundrc .asoundrcOFF
to disable bluetooth-alsa-sound!
To activate your .asoundrc for bluetooth again, create another file with following entry:
#!/bin/bash
mv /home/USERNAME/.asoundrcOFF /home/USERNAME/.asoundrc
or:
#!/bin/bash
cd /home/USERNAME/
mv .asoundrcOFF .asoundrc
Make the files executable and run them with “open with terminal”!
Now you have two “buttons” to switch bluetooth-sound On or Off.
Give them individual-icons:
;-)
————————————————————————————————————-
GUI-PLAYERS
————–——-
It’s recommend to use totem, Qmmp or Banshee-player - because there is nothing more to do than play and listen! Also totem-player shows videos too.VLC-player needs the “default” sounddriver for bluetooth to working right!
Check in: /home/USERNAME/.config/vlc/vlcrc
that alsa-audio-device
in >>line1666<<
is:
# ALSA Device Name (string)
alsa-audio-device=default
Use this commands to use players with terminal:
To play music, type:
MPlayer
———––
mplayer /home/USERNAME/Music/1.mp3
If you hear no sound or get errors try:
mplayer -ao alsa:device=default /home/USERNAME/Music/1.mp3
VLC-Player
—————-
cvlc /home/USERNAME/Music/1.mp3
vlc /home/USERNAME/Music/1.mp3
rvlc /home/USERNAME/Music/1.mp3
To add whole directories type:
rvlc add /home/USERNAME/Music/
type: start/stop/next… to navigate!
or use the vlc-gui.
—————————————————————————————————–——-
To use mplayer with graphical-interface you have to install the gui-package:
type:
sudo apt-get install mplayer-gui
Open a terminal via Ctrl-Alt-T and use the commands below.
Use the lines and type/copy one by one to avoid confusion(!):
cd /usr/share/mplayer/skins/default
for FILE in *.png; do sudo convert “$FILE” -define png:format=png24 “$FILE”; done
cd /usr/share/mplayer/skins; sudo rm default; sudo ln -s Blue default
———————————————————————————————————–
Now you can start the mplayer-gui without errors!
If you prefer the terminal, use:
gmplayer /home/USERNAME/Music/1.mp3
or
gmplayer -ao alsa:device=default /home/USERNAME/Music/1.mp3
if you have problems!
Available Output-Modules and Drivers:
mplayer -vo help
more: https://wiki.ubuntuusers.de/MPlayer/
Firefox-ALSA-commands:
Firefox (and others browsers) will auto-choose the „default“-settings for bt!
If you hear no sound you can try to start firefox with following commands:
ALSAPCM=default firefox
ALSAPCM=bluetooth firefox
firefox –alsa-output-device=default
firefox –alsa-output-device=bluetooth
firefox –alsa-output-device=XX:XX:XX:… #MAC of BT-device
If you set up your devices right – Linux will auto-connect to bluetooth
next time while playing sound in apps or browsers!
———————————————————————–
based on: https://wiki.debian.org/Bluetooth/Alsa
and: https://wiki.ubuntuusers.de/.asoundrc/https://stackoverflow.com/a2dp-sink-without-pulseaudio
———————————————————————-
BLUETOOTH WITH PULSEAUDIO
————————————————–NOTE: QStudio64 prefers ALSA without Pulseaudio for many reasons!
If you want/need Pulseaudio back again:
Install all the KXStudio-Pulseaudio .deb files from /home/USERNAME/README
and ignore the message that there are older ones in the sources!
(1.) Edit /etc/bluetooth/audio.conf and uncomment the following line:
AutoConnect=true
2. Run the following command to install latest packages for blueman and related modules:
sudo add-apt-repository ppa:blueman/ppa
sudo apt-get update
sudo apt-get upgrade blueman
(3.) Check if the following lines are added in /etc/pulse/default.pa:
.ifexists module-bluetooth-discover.so
load-module module-bluetooth-discover
.endif
If not, add the lines.
REBOOT!
4. Run the new blueman-applet.
Right click on the panel applet and turn bluetooth on.
The old profie of you bluetooth device would still be there, remove it.
Right click on the blueman-panel applet and select Setup New Device.
Complete the wizard for your device.
(If you have problems with “pairing” restart your system and skip this step!)
Now you get a connected bluetooth device!
To send/hear audio over it just follow these 2 steps:
* Open Mate-volume control-settings (or pavucontrol) with rightclick in taskbar,
browse to “HARDWARE” -
and use the dropdown to turn the Built-in audio profiles of all other soundcards “off”
- so that the bluetooth-device gets active!
* use the other dropdown to set the bluetooth device to use A2DP
Now start the totem-player or vlc (with pulseaudio-output) to send audio to bluetooth!
Enjoy your sound!
;-)
WLAN-ISSUES:
——————–—
In case you see a WiFi connection drop after connecting to the bluetooth device run the following command:
$ echo “options iwlwifi 11n_disable=1 bt_coex_active=0 power_save=0 auto_agg=0 swcrypto=1” | sudo tee -a /etc/modprobe.d/iwlwifi.conf > /dev/null
_______________________________________________________________
modified and tested for LM 17.3 (Rosa) MATE and Ubuntu 14.04 from:
http://tuxdiary.com/2015/07/05/fix-stream-setup-failed-error-with-blueman/