Raspbian Linux OS Gets Major Update, Adds Bluetooth Support to Pi 3

"The Raspberry Pi 3 was launched with built-in chip for Bluetooth and Wi-Fi support, however, software support for Bluetooth was lacking until now. The drivers were there, but today's update to the Raspbian Linux distribution adds much-needed GUI tools to help you establish Bluetooth connections. Another cool addition is a new backup tool. There are other improvements as well including the mouse settings, and the ability to empty the wastebasket through right-clicking as seen below (yes, seriously). There is even a new shutdown dialog, something even casual users should notice." -- source: https://hardware.slashdot.org/story/16/05/13/1740218 Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/

<https://www.raspberrypi.org/blog/another-update-raspbian/>Hi, I noticed that the latest release of Raspbian will now include Pulse Audio. I'll be keen to try it out. I've spent many hours pottering around with Raspbian audio on a Raspberry Pi 1, with limited success. The following is my understanding of ALSA and PulseAudio audio systems. It is based on my tinkering around with trying to get audio applications working on Raspbery Pi 1's / Raspbian. I may have got this completely wrong, so please feel free to correct me... If you want "simple audio" on a linux system you use ALSA to accept a digital audio signal from an application, provide a volume control, and to output a pulse width modulated signal to a converter to produce an analog audio signal that can be amplified and then drive a loud speaker. Conversion from pulse width modulation to analog audio is not that complicated and can be done with passive devices (resistors, capacitors and inductors). Thus on a Raspberry Pi the pulse width modulated audio output from the ARM CPU chip goes to some passive components and then to the 3.5mm audio output socket. My definition of "simple audio" is that only one application will send its digitalized audio stream at any one time to ALSA. If multiple applications want to simultaneously send digitized streams of audio to ALSA then this doesn't work. (Well I couldn't get it to work on Raspian / Raspberry Pi). In theory you can install the "PulseAudio" application, which I understand inserts itself between the output of your audio applications and the input to ALSA. This means that ALSA only has one input source, which is the output of PulseAudio. However PulseAudio can have multiple audio sources, and a "PulseAudio Mixer" can be used to balance the volumes of the various audio sources. If the ALSA volume control is still used after PulseAudio has been inserted, then it is the "Master" volume control. In inserting PulseAudio, then your applications have to be aware that PulseAudio has been inserted, and so they need to be told not to try sending their audio to ALSA but to send it to PulseAudio. (...Or maybe they do still go to ALSA and ALSA turns it around and sends it to PulseAudio which then sends it back to ALSA?) Is that about how it works? ...Or did I go off the rails in one of my learning curves? Previous versions of Raspbian only used ALSA. I tried installing PulseAudio, but was unsuccessful in getting audio from multiple sources to produce any output. Maybe someone has succeeded in doing this on a Raspberry Pi? It seems that this latest version of Raspbian now includes PulseAudio as part of supporting Bluetooth audio. So maybe I can get PulseAudio working with my applications. cheers, Ian. FYI: Below are some statements from the Raspbian update blog<https://www.raspberrypi.org/blog/another-update-raspbian/>... To connect an audio device, you pair it as described above – it will then be listed in the audio device menu, accessible by right-clicking the speaker icon on the taskbar. Selecting a Bluetooth device from the audio device menu will cause it to be selected as the default audio output device – there will be a few seconds’ pause while the connection is established. You can then use the volume control on the taskbar to control it, as for standard wired audio devices. There is one issue with the support for Bluetooth audio, however. Due to the way the Bluetooth stack has been written, Bluetooth devices do not appear to the system as standard ALSA audio devices – they require the use of an intermediate audio layer called PulseAudio. The PulseAudio magic is all built into the UI – you don’t need to worry about setting it up – but the problem is that not all applications are able to send audio to the PulseAudio interface, and therefore cannot output audio over Bluetooth. Most applications work just fine – videos and music work in the Epiphany and Iceweasel browsers, as does the command-line mplayer music player and the vlc media player. But at present neither Scratch nor Sonic Pi can output audio over Bluetooth – we are working with the authors of these programs to address this and are hopeful that both can be made compatible, so please bear with us! The use of PulseAudio has one other effect that may cause issues for a small number of users – specifically, if you are already using PulseAudio for anything other than interfacing with Bluetooth devices. This plugin will automatically stop the PulseAudio service whenever a standard ALSA device is selected. If you are using PulseAudio for your own purposes, it would be best to remove the volumealsa plugin from the taskbar completely to avoid this – just right-click anywhere on the taskbar, choose ‘Add/Remove Panel Items’, and remove the “Volume Control (ALSA)” item from the list. In the comments to the posting... Bummer about audio requiring PulseAudio. I’m running jack over alsa and it would have been nice to have the option of outputting to a BT device. Having PulseAudio disabled won’t affect the ability to pair BT keyboard/mice will it? PulseAudio is only started when you connect to a bluetooth audio device (and stopped afterwards). It’s not used or required otherwise, so keyboards and mice will work without problems. ________________________________________ From: wlug-bounces(a)list.waikato.ac.nz <wlug-bounces(a)list.waikato.ac.nz> on behalf of Peter Reutemann <fracpete(a)waikato.ac.nz> Sent: Saturday, 14 May 2016 9:00 a.m. To: wlug List Subject: [wlug] Raspbian Linux OS Gets Major Update, Adds Bluetooth Support to Pi 3 "The Raspberry Pi 3 was launched with built-in chip for Bluetooth and Wi-Fi support, however, software support for Bluetooth was lacking until now. The drivers were there, but today's update to the Raspbian Linux distribution adds much-needed GUI tools to help you establish Bluetooth connections. Another cool addition is a new backup tool. There are other improvements as well including the mouse settings, and the ability to empty the wastebasket through right-clicking as seen below (yes, seriously). There is even a new shutdown dialog, something even casual users should notice." -- source: https://hardware.slashdot.org/story/16/05/13/1740218 Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: https://list.waikato.ac.nz/mailman/listinfo/wlug

I have no idea why they say that Bluetooth support out of the box was added just now. When I got my pi3 in march Bluetooth worked with the latest rasbian. Cheers, William On Saturday, May 14, 2016, Ian Stewart <ianstewart56(a)hotmail.com> wrote:
<https://www.raspberrypi.org/blog/another-update-raspbian/>Hi,
I noticed that the latest release of Raspbian will now include Pulse Audio. I'll be keen to try it out. I've spent many hours pottering around with Raspbian audio on a Raspberry Pi 1, with limited success.
The following is my understanding of ALSA and PulseAudio audio systems. It is based on my tinkering around with trying to get audio applications working on Raspbery Pi 1's / Raspbian. I may have got this completely wrong, so please feel free to correct me...
If you want "simple audio" on a linux system you use ALSA to accept a digital audio signal from an application, provide a volume control, and to output a pulse width modulated signal to a converter to produce an analog audio signal that can be amplified and then drive a loud speaker. Conversion from pulse width modulation to analog audio is not that complicated and can be done with passive devices (resistors, capacitors and inductors). Thus on a Raspberry Pi the pulse width modulated audio output from the ARM CPU chip goes to some passive components and then to the 3.5mm audio output socket.
My definition of "simple audio" is that only one application will send its digitalized audio stream at any one time to ALSA. If multiple applications want to simultaneously send digitized streams of audio to ALSA then this doesn't work. (Well I couldn't get it to work on Raspian / Raspberry Pi).
In theory you can install the "PulseAudio" application, which I understand inserts itself between the output of your audio applications and the input to ALSA. This means that ALSA only has one input source, which is the output of PulseAudio. However PulseAudio can have multiple audio sources, and a "PulseAudio Mixer" can be used to balance the volumes of the various audio sources. If the ALSA volume control is still used after PulseAudio has been inserted, then it is the "Master" volume control.
In inserting PulseAudio, then your applications have to be aware that PulseAudio has been inserted, and so they need to be told not to try sending their audio to ALSA but to send it to PulseAudio. (...Or maybe they do still go to ALSA and ALSA turns it around and sends it to PulseAudio which then sends it back to ALSA?)
Is that about how it works? ...Or did I go off the rails in one of my learning curves?
Previous versions of Raspbian only used ALSA. I tried installing PulseAudio, but was unsuccessful in getting audio from multiple sources to produce any output. Maybe someone has succeeded in doing this on a Raspberry Pi?
It seems that this latest version of Raspbian now includes PulseAudio as part of supporting Bluetooth audio. So maybe I can get PulseAudio working with my applications.
cheers,
Ian.
FYI: Below are some statements from the Raspbian update blog <https://www.raspberrypi.org/blog/another-update-raspbian/>...
To connect an audio device, you pair it as described above – it will then be listed in the audio device menu, accessible by right-clicking the speaker icon on the taskbar.
Selecting a Bluetooth device from the audio device menu will cause it to be selected as the default audio output device – there will be a few seconds’ pause while the connection is established. You can then use the volume control on the taskbar to control it, as for standard wired audio devices.
There is one issue with the support for Bluetooth audio, however. Due to the way the Bluetooth stack has been written, Bluetooth devices do not appear to the system as standard ALSA audio devices – they require the use of an intermediate audio layer called PulseAudio. The PulseAudio magic is all built into the UI – you don’t need to worry about setting it up – but the problem is that not all applications are able to send audio to the PulseAudio interface, and therefore cannot output audio over Bluetooth.
Most applications work just fine – videos and music work in the Epiphany and Iceweasel browsers, as does the command-line mplayer music player and the vlc media player. But at present neither Scratch nor Sonic Pi can output audio over Bluetooth – we are working with the authors of these programs to address this and are hopeful that both can be made compatible, so please bear with us!
The use of PulseAudio has one other effect that may cause issues for a small number of users – specifically, if you are already using PulseAudio for anything other than interfacing with Bluetooth devices. This plugin will automatically stop the PulseAudio service whenever a standard ALSA device is selected. If you are using PulseAudio for your own purposes, it would be best to remove the volumealsa plugin from the taskbar completely to avoid this – just right-click anywhere on the taskbar, choose ‘Add/Remove Panel Items’, and remove the “Volume Control (ALSA)” item from the list.
In the comments to the posting...
Bummer about audio requiring PulseAudio. I’m running jack over alsa and it would have been nice to have the option of outputting to a BT device. Having PulseAudio disabled won’t affect the ability to pair BT keyboard/mice will it?
PulseAudio is only started when you connect to a bluetooth audio device (and stopped afterwards). It’s not used or required otherwise, so keyboards and mice will work without problems.
________________________________________ From: wlug-bounces(a)list.waikato.ac.nz <javascript:_e(%7B%7D,'cvml','wlug-bounces(a)list.waikato.ac.nz');> < wlug-bounces(a)list.waikato.ac.nz <javascript:_e(%7B%7D,'cvml','wlug-bounces(a)list.waikato.ac.nz');>> on behalf of Peter Reutemann <fracpete(a)waikato.ac.nz <javascript:_e(%7B%7D,'cvml','fracpete(a)waikato.ac.nz');>> Sent: Saturday, 14 May 2016 9:00 a.m. To: wlug List Subject: [wlug] Raspbian Linux OS Gets Major Update, Adds Bluetooth Support to Pi 3
"The Raspberry Pi 3 was launched with built-in chip for Bluetooth and Wi-Fi support, however, software support for Bluetooth was lacking until now. The drivers were there, but today's update to the Raspbian Linux distribution adds much-needed GUI tools to help you establish Bluetooth connections. Another cool addition is a new backup tool. There are other improvements as well including the mouse settings, and the ability to empty the wastebasket through right-clicking as seen below (yes, seriously). There is even a new shutdown dialog, something even casual users should notice."
-- source: https://hardware.slashdot.org/story/16/05/13/1740218
Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/ _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz <javascript:_e(%7B%7D,'cvml','wlug(a)list.waikato.ac.nz');> Unsubscribe: https://list.waikato.ac.nz/mailman/listinfo/wlug

I noticed that the latest release of Raspbian will now include Pulse Audio. I'll be keen to try it out.
[...] I'm interpreting this as "volunteering" for the next meeting? ;-) Cheers, Peter -- Peter Reutemann Dept. of Computer Science University of Waikato, NZ +64 (7) 858-5174 http://www.cms.waikato.ac.nz/~fracpete/ http://www.data-mining.co.nz/

On Fri, 13 May 2016 23:01:19 +0000, Ian Stewart wrote:
In inserting PulseAudio, then your applications have to be aware that PulseAudio has been inserted, and so they need to be told not to try sending their audio to ALSA but to send it to PulseAudio. (...Or maybe they do still go to ALSA and ALSA turns it around and sends it to PulseAudio which then sends it back to ALSA?)
I believe that PulseAudio is transparent to applications written to work with ALSA. Basically, PulseAudio redirects all calls to the ALSA client library to itself, which then makes the calls to the “real” ALSA...

William:
When I got my pi3 in march Bluetooth worked with the latest rasbian.
From the Raspbian release notes<http://downloads.raspberrypi.org/raspbian/release_notes.txt> it looks like the wifi and bluetooth support was added in the 2016-02-26 release. The latest release of 2016-05-10 just seems to be adding the bluetooth features to the taskbar.
The R/Pi Ubuntu Mate<http://%20https://ubuntu-mate.org/raspberry-pi/> might also be worth a try. They claim: "Ubuntu MATE 16.04 also has fully working Bluetooth and Wifi on the Raspberry Pi 3". I expect that PulseAudio is included in this Ubuntu distro. Peter:
I'm interpreting this as "volunteering" for the next meeting? ;-)
Hmmmm... So I've got 9 days to get it to work. Bit busy with other things at the mo. Will let you know if I find the time to work on this and have any success stories to present. Lawrence:
I believe that PulseAudio is transparent to applications written to work with ALSA.
Possibly its the installation process of doing the addon of PulseAudio applications to the Raspbian distro that is causing it to be more opaque than transparent. With the latest Raspian distros including PulseAudio, then I might have more success. cheers, Ian. ________________________________________ From: wlug-bounces(a)list.waikato.ac.nz <wlug-bounces(a)list.waikato.ac.nz> on behalf of Lawrence D'Oliveiro <ldo(a)geek-central.gen.nz> Sent: Saturday, 14 May 2016 12:59 p.m. To: wlug List Subject: Re: [wlug] Raspbian Linux OS Gets Major Update, Adds Bluetooth Support to Pi 3 On Fri, 13 May 2016 23:01:19 +0000, Ian Stewart wrote:
In inserting PulseAudio, then your applications have to be aware that PulseAudio has been inserted, and so they need to be told not to try sending their audio to ALSA but to send it to PulseAudio. (...Or maybe they do still go to ALSA and ALSA turns it around and sends it to PulseAudio which then sends it back to ALSA?)
I believe that PulseAudio is transparent to applications written to work with ALSA. Basically, PulseAudio redirects all calls to the ALSA client library to itself, which then makes the calls to the "real" ALSA... _______________________________________________ wlug mailing list | wlug(a)list.waikato.ac.nz Unsubscribe: https://list.waikato.ac.nz/mailman/listinfo/wlug

I stumbled across an advertisement for software developers at the UK Guardian<http://www.theguardian.com/international> newspaper web-site. I'm not sure how often this type of advertising is being done, but I thought it was quite a novel approach. When you view the source code of their home page the first 20 lines currently look like this (note you need to read it with a monospace font)... <!DOCTYPE html> <html id="js-context" class="js-off is-not-modern id--signed-out" data-page-path="/international"> <head> <meta charset="utf-8"/> <!-- __ __ _ _ _ \ \ / /__ __ _ _ __ ___ | |__ (_)_ __(_)_ __ __ _ \ \ /\ / / _ \ / _` | '__/ _ \ | '_ \| | '__| | '_ \ / _` | \ V V / __/ | (_| | | | __/ | | | | | | | | | | | (_| | \_/\_/ \___| \__,_|_| \___| |_| |_|_|_| |_|_| |_|\__, | |___/ Ever thought about joining us? http://developers.theguardian.com/join-the-team.html --> <title>News, sport and opinion from the Guardian's global edition | The Guardian</title> <meta http-equiv="X-UA-Compatible" content="IE=Edge"/> <meta name="format-detection" content="telephone=no"/>
participants (4)
-
Ian Stewart
-
Lawrence D'Oliveiro
-
Peter Reutemann
-
William Mckee