[Freeswitch-users] mod_portaudio on Raspberry Pi currently broken?
Tazari, Mohammad Reza
saied.tazari at gmail.com
Fri Sep 4 21:42:29 UTC 2020
Hi,
I have to correct myself with regard to my two posts on Aug 21:
1.
I was testing with my headset and had successful "pa looptest"
indicating both indev & outdev were working
2.
Then, when I tested that in the context of my application for
auto-answering incoming calls (I called with my mobile phone while
putting it in front of a tv so that I can test if I would hear
anything on my headset), I didn't notice that in that case the mic
was not working because I had the headset on my ears and was hearing
the tv (because of successful looptest, I was just assuming that the
mic would also be working)
3.
But when I finally got a Plantronics Calisto 620-M Bluetooth
Speakerphone, even the looptest failed. At this moment, I tested
more carefully my headset again, and there I found out that the mic
was not working.
4.
Because it seemed that something device-specific should be the
reason for failure, I also tested with my bluetooth earphones; there
the effect was equivalent to Calisto speakerphone.
5.
I finally got a USB speakerphone and tried that one, but in that
case I was again back to earlier situation where "pa rescan" failed
to find any devices...
With all four devices, always arecord and aplay were working perfectly,
and the above issues appeared only with mod_portaudio.
I don't have any idea what the issue could be with the usb, but with the
three bluetooth devices, I still believe that something device-specific
should be causing the problems here, e.g. the sample rate. But,
currently I am lacking time to further work on this...
KR,
-- Saied
Tazari, Mohammad Reza wrote on 21-Aug-20 18:44:
> 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
> "*0;btAudioIO(ALSA);128;128;r,i,o*"
> 2. Like the test at the level of shell, the actual test can be the
> loop test: "*pa looptest*"
>
>
> KR,
>
>
> -- Saied
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20200904/7071cecc/attachment.html>
More information about the FreeSWITCH-users
mailing list