[Freeswitch-users] mod_portaudio on Raspberry Pi currently broken?

Tazari, Mohammad Reza saied.tazari at gmail.com
Fri Aug 21 16:44:53 UTC 2020

Tazari, Saied wrote on 21-Aug-20 03:37:
>  6. Created a new file by _*sudo vi /etc/asound.conf*_ and added the
>     following as its sole content (if you know the MAC address of your
>     Bluetooth device, substitute it already now; otherwise you can
>     change it also later in step 9):

This was a very important reason why "pa rescan " had failed for me 
previously: I had defined the devices in the .asoundrc of the user pi, 
but freeswitch was running with the user "freeswitch" who has no login 
shell and hence cannot have any .asoundrc --> device configuration had 
to go to a user-independent level.

The suggested content for this file tried to get a better output quality 
by making use of the "a2dp" profile whereas for the mic you have to use 
the "sco" profile. However, in this combination pa is eventually working 
in a pretty unstable way. Therefore, we can simplify the content the 
following way:

    pcm.btAudioIO {
             type plug
             slave.pcm {
                     type bluealsa
                     service "org.bluealsa"
                     device "00:11:09:94:14:3D"
                     profile "sco"
                     delay 10000
             hint {
                     show on
                     description "Bluetooth Audio Input/Output Dvice"

    ctl.btAudioIO {
             type bluealsa
             service "org.bluealsa"
             battery yes

> 10. Test your device with the following two commands (five seconds
>     recording):
>     *arecord -D btAudioIO -d 5 test.wav
>     aplay ***-D btAudioIO test.wav
>     **

You may also perform a loop test:

    *arecord -D btAudioIO | aplay -D btAudioIO*

> After a reboot, after which also FreeSwitch and my application start, 
> everything was working for me just fine :-)

I forgot to say that you can test the working of the setup in fs_cli the 
following way:

 1. "*pa devlist*" should generate an output like
 2. Like the test at the level of shell, the actual test can be the loop
    test: "*pa looptest*"


-- Saied

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200821/fc8c0b91/attachment.html>

More information about the FreeSWITCH-users mailing list