Error loading portaudio module
I am new to FreeSWITCH; hence this is the first of what will probably be a number of questions as I learn. I've compiled the latest code from svn trunk under Debian Sid (Linux kernel 2.6.27, x86_64 architecture), with the portaudio19-dev package installed. Whenever I try to load the portaudio module I get the following in the logs. I haven't changed anything in the default portaudio configuration that comes with FreeSWITCH. PortAudio version number = 1899 PortAudio version text = 'PortAudio V19-devel (built Dec 12 2008)' Number of devices = 0 2008-12-12 20:17:51 [ERR] mod_portaudio.c:883 load_config() Cannot find an input device! 2008-12-12 20:17:51 [ERR] mod_portaudio.c:893 load_config() Cannot find an input device! 2008-12-12 20:17:51 [CRIT] switch_loadable_module.c:839 switch_loadable_module_l oad_file() Error Loading module /opt/freeswitch/mod/mod_portaudio.so Other software that uses portaudio is known to work. I would expect FreeSWITCH to detect my Alsa sound devices. Suggestions welcome.
Jason, If I understand correctly software other than PA can lock up the sound card so that PA doesn't "see" it. That might explain why PA reports number of devices = 0. Could you check to see if possibly something else has control of your sound card, perhaps ALSA? Turn off anything that might use the sound card and then restart FS to see if PA can then detect your device. -MC On Fri, Dec 12, 2008 at 1:38 AM, Jason White <jason@jasonjgw.net> wrote:
I am new to FreeSWITCH; hence this is the first of what will probably be a number of questions as I learn.
I've compiled the latest code from svn trunk under Debian Sid (Linux kernel 2.6.27, x86_64 architecture), with the portaudio19-dev package installed.
Whenever I try to load the portaudio module I get the following in the logs. I haven't changed anything in the default portaudio configuration that comes with FreeSWITCH.
PortAudio version number = 1899 PortAudio version text = 'PortAudio V19-devel (built Dec 12 2008)' Number of devices = 0 2008-12-12 20:17:51 [ERR] mod_portaudio.c:883 load_config() Cannot find an input device! 2008-12-12 20:17:51 [ERR] mod_portaudio.c:893 load_config() Cannot find an input device! 2008-12-12 20:17:51 [CRIT] switch_loadable_module.c:839 switch_loadable_module_l oad_file() Error Loading module /opt/freeswitch/mod/mod_portaudio.so
Other software that uses portaudio is known to work. I would expect FreeSWITCH to detect my Alsa sound devices.
Suggestions welcome.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Hi there, you have to use the "default" ALSA audio device to share it, and to have it automatically format and rate converted. the "default" ALSA device is not the default portaudio device (not in the portaudio version used currently by FS). You have to find out what device id it has under portaudio. But in this specific case, no device at all was found. So, maybe portaudio was not commpiled with ALSA support (do you have the ALSA Sincerely, Giovanni Maruzzelli ========================================= Company : Celliax Website: www.celliax.org Address : via Pierlombardo 9, 20135 Milano Country/Territory : Italy Business Email: gmaruzz at celliax dot org Cell : 39-347-2665618 Fax : 39-02-87390039 On Fri, Dec 12, 2008 at 8:58 PM, Michael Collins <msc@freeswitch.org> wrote:
Jason,
If I understand correctly software other than PA can lock up the sound card so that PA doesn't "see" it. That might explain why PA reports number of devices = 0. Could you check to see if possibly something else has control of your sound card, perhaps ALSA? Turn off anything that might use the sound card and then restart FS to see if PA can then detect your device.
-MC
On Fri, Dec 12, 2008 at 1:38 AM, Jason White <jason@jasonjgw.net> wrote:
I am new to FreeSWITCH; hence this is the first of what will probably be a number of questions as I learn.
I've compiled the latest code from svn trunk under Debian Sid (Linux kernel 2.6.27, x86_64 architecture), with the portaudio19-dev package installed.
Whenever I try to load the portaudio module I get the following in the logs. I haven't changed anything in the default portaudio configuration that comes with FreeSWITCH.
PortAudio version number = 1899 PortAudio version text = 'PortAudio V19-devel (built Dec 12 2008)' Number of devices = 0 2008-12-12 20:17:51 [ERR] mod_portaudio.c:883 load_config() Cannot find an input device! 2008-12-12 20:17:51 [ERR] mod_portaudio.c:893 load_config() Cannot find an input device! 2008-12-12 20:17:51 [CRIT] switch_loadable_module.c:839 switch_loadable_module_l oad_file() Error Loading module /opt/freeswitch/mod/mod_portaudio.so
Other software that uses portaudio is known to work. I would expect FreeSWITCH to detect my Alsa sound devices.
Suggestions welcome.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Sorry, the previous one was sent by mistake. This one is complete: Hi there, you have to use the "default" ALSA audio device to share it, and to have it automatically format and rate converted. the "default" ALSA device is not the default portaudio device (not in the portaudio version used currently by FS). You have to find out what device id it has under portaudio. But in this specific case, no device at all was found. So, maybe portaudio was not commpiled with ALSA support (do you have the ALSA development library installed?). Also, after recompiling portaudio and mod_portaudio, you can launch FS giving it the PA_ALSA_PLUGHW=1 environment variable, so portaudio will use the plughw devices (that are automatically converted to the desired rate/format) and not the raw devices. Giovanni Maruzzelli ========================================= Company : Celliax Website: www.celliax.org Address : via Pierlombardo 9, 20135 Milano Country/Territory : Italy Business Email: gmaruzz at celliax dot org Cell : 39-347-2665618 Fax : 39-02-87390039 On Fri, Dec 12, 2008 at 9:25 PM, Giovanni Maruzzelli <gmaruzz@celliax.org> wrote:
Hi there,
you have to use the "default" ALSA audio device to share it, and to have it automatically format and rate converted.
the "default" ALSA device is not the default portaudio device (not in the portaudio version used currently by FS).
You have to find out what device id it has under portaudio.
But in this specific case, no device at all was found.
So, maybe portaudio was not commpiled with ALSA support (do you have the ALSA
Sincerely,
Giovanni Maruzzelli ========================================= Company : Celliax Website: www.celliax.org Address : via Pierlombardo 9, 20135 Milano Country/Territory : Italy Business Email: gmaruzz at celliax dot org Cell : 39-347-2665618 Fax : 39-02-87390039
On Fri, Dec 12, 2008 at 8:58 PM, Michael Collins <msc@freeswitch.org> wrote:
Jason,
If I understand correctly software other than PA can lock up the sound card so that PA doesn't "see" it. That might explain why PA reports number of devices = 0. Could you check to see if possibly something else has control of your sound card, perhaps ALSA? Turn off anything that might use the sound card and then restart FS to see if PA can then detect your device.
-MC
On Fri, Dec 12, 2008 at 1:38 AM, Jason White <jason@jasonjgw.net> wrote:
I am new to FreeSWITCH; hence this is the first of what will probably be a number of questions as I learn.
I've compiled the latest code from svn trunk under Debian Sid (Linux kernel 2.6.27, x86_64 architecture), with the portaudio19-dev package installed.
Whenever I try to load the portaudio module I get the following in the logs. I haven't changed anything in the default portaudio configuration that comes with FreeSWITCH.
PortAudio version number = 1899 PortAudio version text = 'PortAudio V19-devel (built Dec 12 2008)' Number of devices = 0 2008-12-12 20:17:51 [ERR] mod_portaudio.c:883 load_config() Cannot find an input device! 2008-12-12 20:17:51 [ERR] mod_portaudio.c:893 load_config() Cannot find an input device! 2008-12-12 20:17:51 [CRIT] switch_loadable_module.c:839 switch_loadable_module_l oad_file() Error Loading module /opt/freeswitch/mod/mod_portaudio.so
Other software that uses portaudio is known to work. I would expect FreeSWITCH to detect my Alsa sound devices.
Suggestions welcome.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
On Fri, Dec 12, 2008 at 09:30:16PM +0100, Giovanni Maruzzelli wrote:
But in this specific case, no device at all was found.
So, maybe portaudio was not commpiled with ALSA support (do you have the ALSA development library installed?).
Yes, and in any case the version of PortAudio which is installed came from the Debian package. Does FreeSWITCH support PortAudio 19? If not, maybe there are API differences.
Also, after recompiling portaudio and mod_portaudio, you can launch FS giving it the PA_ALSA_PLUGHW=1 environment variable, so portaudio will use the plughw devices (that are automatically converted to the desired rate/format) and not the raw devices.
I'll try that. To answer another question that arose in this thread, I have no other software currently using the audio devices. Alsa is known to work, as is other software that accesses the Alsa devices with PortAudio.
This is interesting... I wrote the following test. #include<stdio.h> #include <portaudio.h> int main(int argc, char **argv) { Pa_Initialize(); printf("Number of devices: %d\n",Pa_GetDeviceCount()); Pa_Terminate(); } then I compiled and executed it: gcc -o pa_test pa_test.c -lportaudio ./portaudio Number of devices: 10
From what I can see, the code in mod_portaudio.c is using exactly the same API call, but it seems to be returning 0 in that case.
With apologies for the noise on the list, I just realized that FreeSWITCH is building its own version of PortAudio. I can confirm that Alsa is being detected and support for it included. So, there must be some difference between the version of PortAudio that comes with FreeSWITCH, and the version installed in my /usr/lib, such that the FreeSWITCH version fails to detect my Alsa devices.
The problem is now solved. It turned out to be permissions: the freeswitch user wasn't added to the audio group in /etc/group, hence didn't have permission to interrogate the audio devices. Perhaps a future version of the Debian package could address this, or at least it should be noted somewhere.
Jason, Thanks for troubleshooting this! At the very least I will add a note to the PA section of the wiki. -MC On Fri, Dec 12, 2008 at 6:01 PM, Jason White <jason@jasonjgw.net> wrote:
The problem is now solved.
It turned out to be permissions: the freeswitch user wasn't added to the audio group in /etc/group, hence didn't have permission to interrogate the audio devices.
Perhaps a future version of the Debian package could address this, or at least it should be noted somewhere.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Please file a bug on Jira.freeswitch.org on this issue so we make sure it gets adressef in the debs. Mike On Dec 12, 2008, at 9:01 PM, Jason White <jason@jasonjgw.net> wrote:
The problem is now solved.
It turned out to be permissions: the freeswitch user wasn't added to the audio group in /etc/group, hence didn't have permission to interrogate the audio devices.
Perhaps a future version of the Debian package could address this, or at least it should be noted somewhere.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
Done: http://jira.freeswitch.org/browse/FSBUILD-95 On Sat, Dec 13, 2008 at 1:51 PM, Michael Jerris <mike@jerris.com> wrote:
Please file a bug on Jira.freeswitch.org on this issue so we make sure it gets adressef in the debs.
Mike
On Dec 12, 2008, at 9:01 PM, Jason White <jason@jasonjgw.net> wrote:
The problem is now solved.
It turned out to be permissions: the freeswitch user wasn't added to the audio group in /etc/group, hence didn't have permission to interrogate the audio devices.
Perhaps a future version of the Debian package could address this, or at least it should be noted somewhere.
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_______________________________________________ Freeswitch-users mailing list Freeswitch-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
participants (4)
-
Giovanni Maruzzelli
-
Jason White
-
Michael Collins
-
Michael Jerris