Re: Accoustic echo cancelation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Other raspberry users have encountered this issue. I think it's either a buffer issue with ALSA device, or you're running out of CPU. In my experience with PJSIP, one of the most useful debugging statistics is to see a count of audio recording and playback callbacks. That will tell you if media is flowing in both directions to from device, and also if PJSIP is keeping up or running out of CPU. But it is not built-in. - Bill



On 4/12/2016 10:32 AM, Alexandre Gonçalves wrote:
Running with root privilegies, the warning went away:

14:18:12.516     alsa_dev.c !ca_thread_func(2765): Set thread priority for audio capture thread.
14:18:12.517          speex !warning: discarded first playback frame
14:18:12.521          speex  warning: discarded first playback frame
14:18:12.524          speex  warning: discarded first playback frame
14:18:12.526          speex !warning: discarded first playback frame


But the speex warning continues. 

In my code, I have this callback function defined:

static void on_call_media_state(pjsua_call_id call_id) {
    pjsua_call_info ci;

    pjsua_call_get_info(call_id, &ci);

    if (ci.media_status == PJSUA_CALL_MEDIA_ACTIVE) {
        // When media is active, connect call to sound device.
        pjsua_conf_connect(ci.conf_slot, 0);
        pjsua_conf_connect(0, ci.conf_slot);
    }
}


The connection with pjsua_conf_connect, shouldn't be with the frames after being processed by the aec?


Thanks.

Alexandre Gonçalves

............................................................................................................................


2016-04-12 15:04 GMT+01:00 Bill Gardner <billg@xxxxxxxxxxxx>:
Oh, ALSA dev. I don't have much of any experience with this, but it is a frequent topic on the list. You might want to browse through the archives. I note the following in the log:

On 4/12/2016 9:56 AM, Alexandre Gonçalves wrote:
13:53:51.963     alsa_dev.c !ca_thread_func(2733): Set thread priority for audio capture thread.
13:53:51.965     alsa_dev.c  Unable to increase thread priority, root access needed.

If the audio thread priority isn't high enough, you could get underruns which would cause the speex warnings you see.

Bill


_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org



_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux