PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

V
Varma
Mon, Apr 7, 2014 3:33 AM

Hi,

I built PJSIP and run on Freescale ARM i.MX53. The video call works well.
The issue is with the audio.

The call gets initiated from the i.MX base board to a mobile running the
csipsimple android app. The audio is heard properly on the mobile but not on
the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to
fade out or distorted. Sometimes audio is both distorted and faded. I tried
all the steps in the audio troubleshooting as mentioned in the PJSIP
website.

I checked my sound output by playing an audio file. It plays well.

Following steps I tried.

  1.   Tried using PCMU and PCMA as the board supports only PCM. SPEEX is
    

disabled on the board.

  1.   Disabled the echo canceller. Did not have any effect on the result.
    
  2.   In-call volume to increased 5.0x, 10.0x and went up to 100.0x.
    

Every time I increased this the audio gets worser.

  1.   Tried forcing 8KHz sample. Still no improvement.
    

Can you suggest what could fix my issue?

I could not get the packet statistics. Somehow the TX and RX packet count
always shows zero when I use the 'dq' while in call.

Thanks & Regards

Varma SVRP

Technical Lead | Orvito Technologies India Pvt Ltd.

M: +91-9032867017

Description: Description: Description: Description:
cid:image002.png@01CDD3CC.69D07270

8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 |
Hyderabad - 500038

http://www.orvito.com/ www.orvito.com

Hi, I built PJSIP and run on Freescale ARM i.MX53. The video call works well. The issue is with the audio. The call gets initiated from the i.MX base board to a mobile running the csipsimple android app. The audio is heard properly on the mobile but not on the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to fade out or distorted. Sometimes audio is both distorted and faded. I tried all the steps in the audio troubleshooting as mentioned in the PJSIP website. I checked my sound output by playing an audio file. It plays well. Following steps I tried. 1. Tried using PCMU and PCMA as the board supports only PCM. SPEEX is disabled on the board. 2. Disabled the echo canceller. Did not have any effect on the result. 3. In-call volume to increased 5.0x, 10.0x and went up to 100.0x. Every time I increased this the audio gets worser. 4. Tried forcing 8KHz sample. Still no improvement. Can you suggest what could fix my issue? I could not get the packet statistics. Somehow the TX and RX packet count always shows zero when I use the 'dq' while in call. Thanks & Regards Varma SVRP Technical Lead | Orvito Technologies India Pvt Ltd. M: +91-9032867017 Description: Description: Description: Description: cid:image002.png@01CDD3CC.69D07270 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 | Hyderabad - 500038 <http://www.orvito.com/> www.orvito.com
V
Varma
Thu, Apr 10, 2014 11:46 AM

Hi,

I ran the sndtest and capture the call dump. Does this say anything about
the audio going bad.

./sndtest

08:13:14.760      sndtest.c !Found 2 devices:

08:13:14.761      sndtest.c  0: default:CARD=imx3stack (capture=1,
playback=1)

08:13:14.761      sndtest.c  1: sysdefault:CARD=imx3stack (capture=1,
playback=1)

08:13:15.220      sndtest.c  Testing playback device default:CARD=imx3stack

08:13:15.220      sndtest.c  Testing capture device default:CARD=imx3stack

08:13:15.424      sndtest.c  Please wait while test is in progress (~11
secs)..

08:13:26.581      sndtest.c  Dumping results:

08:13:26.582      sndtest.c    Parameters: clock rate=8000Hz, 80
samples/frame

08:13:26.582      sndtest.c    Playback stream report:

08:13:26.582      sndtest.c    Duration: 9s.990

08:13:26.582      sndtest.c    Frame interval: min=0.029ms, max=67.945ms

08:13:26.582      sndtest.c    Jitter: min=9.948ms, avg=26.685ms,
max=67.913ms

08:13:26.583      sndtest.c    Capture stream report:

08:13:26.583      sndtest.c    Duration: 9s.980

08:13:26.583      sndtest.c    Frame interval: min=0.092ms, max=63.500ms

08:13:26.583      sndtest.c    Jitter: min=9.893ms, avg=26.536ms,
max=63.406ms

08:13:26.583      sndtest.c    Checking for clock drifts:

08:13:26.583      sndtest.c    Sound capture is 80 samples faster than
playback at the end of the test (average is 8 samples per second)

08:13:26.583      sndtest.c  Test completed with some warnings

---======================

Call statistics:

[DISCONNCTD] To: sip:192.168.1.156;tag=3d928773698d4280957744e929d8aa73

Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms

#0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004

   SRTP status: Not active Crypto-suite:

   RX pt=8, last update:00h:00m:01.465s ago

      total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps

      pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 (0.0%)

            (msec)    min     avg     max     last    dev

      loss period:  20.000  21.652 100.000  20.000   6.131

      jitter     :   0.250   8.685  29.000   7.000   3.389

   TX pt=8, ptime=20, last update:00h:00m:01.318s ago

      total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps

      pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%)

            (msec)    min     avg     max     last    dev

      loss period:  20.000 164.151 1540.000  80.000  41.859

      jitter     :   0.000  14.582  21.875  12.125   4.515

   RTT msec      :   3.082  21.143  73.908  14.831  18.172

00:34:55.055  pjsua_media.c  ......Call 1: deinitializing media..

00:34:55.056  pjsua_media.c  ........Media stream call01:0 is destroyed

00:34:56.055    pjsua_aud.c  Closing sound device after idle for 1 second(s)

00:34:56.055    pjsua_app.c  .Turning sound device OFF

00:34:56.055    pjsua_aud.c  .Closing default:CARD=imx3stack sound playback
device and default:CARD=imx3stack sound capture device

Thanks & Regards

Varma SVRP

From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]
On Behalf Of Varma
Sent: Monday, April 07, 2014 9:04 AM
To: pjsip@lists.pjsip.org
Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

I built PJSIP and run on Freescale ARM i.MX53. The video call works well.
The issue is with the audio.

The call gets initiated from the i.MX base board to a mobile running the
csipsimple android app. The audio is heard properly on the mobile but not on
the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to
fade out or distorted. Sometimes audio is both distorted and faded. I tried
all the steps in the audio troubleshooting as mentioned in the PJSIP
website.

I checked my sound output by playing an audio file. It plays well.

Following steps I tried.

  1.   Tried using PCMU and PCMA as the board supports only PCM. SPEEX is
    

disabled on the board.

  1.   Disabled the echo canceller. Did not have any effect on the result.
    
  2.   In-call volume to increased 5.0x, 10.0x and went up to 100.0x.
    

Every time I increased this the audio gets worser.

  1.   Tried forcing 8KHz sample. Still no improvement.
    

Can you suggest what could fix my issue?

I could not get the packet statistics. Somehow the TX and RX packet count
always shows zero when I use the 'dq' while in call.

Thanks & Regards

Varma SVRP

Technical Lead | Orvito Technologies India Pvt Ltd.

M: +91-9032867017

Description: Description: Description: Description:
cid:image002.png@01CDD3CC.69D07270

8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 |
Hyderabad - 500038

www.orvito.com http://www.orvito.com/

Hi, I ran the sndtest and capture the call dump. Does this say anything about the audio going bad. # ./sndtest 08:13:14.760 sndtest.c !Found 2 devices: 08:13:14.761 sndtest.c 0: default:CARD=imx3stack (capture=1, playback=1) 08:13:14.761 sndtest.c 1: sysdefault:CARD=imx3stack (capture=1, playback=1) 08:13:15.220 sndtest.c Testing playback device default:CARD=imx3stack 08:13:15.220 sndtest.c Testing capture device default:CARD=imx3stack 08:13:15.424 sndtest.c Please wait while test is in progress (~11 secs).. 08:13:26.581 sndtest.c Dumping results: 08:13:26.582 sndtest.c Parameters: clock rate=8000Hz, 80 samples/frame 08:13:26.582 sndtest.c Playback stream report: 08:13:26.582 sndtest.c Duration: 9s.990 08:13:26.582 sndtest.c Frame interval: min=0.029ms, max=67.945ms 08:13:26.582 sndtest.c Jitter: min=9.948ms, avg=26.685ms, max=67.913ms 08:13:26.583 sndtest.c Capture stream report: 08:13:26.583 sndtest.c Duration: 9s.980 08:13:26.583 sndtest.c Frame interval: min=0.092ms, max=63.500ms 08:13:26.583 sndtest.c Jitter: min=9.893ms, avg=26.536ms, max=63.406ms 08:13:26.583 sndtest.c Checking for clock drifts: 08:13:26.583 sndtest.c Sound capture is 80 samples faster than playback at the end of the test (average is 8 samples per second) 08:13:26.583 sndtest.c Test completed with some warnings ======================================================= Call statistics: [DISCONNCTD] To: <sip:192.168.1.156>;tag=3d928773698d4280957744e929d8aa73 Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004 SRTP status: Not active Crypto-suite: RX pt=8, last update:00h:00m:01.465s ago total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 (0.0%) (msec) min avg max last dev loss period: 20.000 21.652 100.000 20.000 6.131 jitter : 0.250 8.685 29.000 7.000 3.389 TX pt=8, ptime=20, last update:00h:00m:01.318s ago total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%) (msec) min avg max last dev loss period: 20.000 164.151 1540.000 80.000 41.859 jitter : 0.000 14.582 21.875 12.125 4.515 RTT msec : 3.082 21.143 73.908 14.831 18.172 00:34:55.055 pjsua_media.c ......Call 1: deinitializing media.. 00:34:55.056 pjsua_media.c ........Media stream call01:0 is destroyed 00:34:56.055 pjsua_aud.c Closing sound device after idle for 1 second(s) 00:34:56.055 pjsua_app.c .Turning sound device OFF 00:34:56.055 pjsua_aud.c .Closing default:CARD=imx3stack sound playback device and default:CARD=imx3stack sound capture device Thanks & Regards Varma SVRP From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Varma Sent: Monday, April 07, 2014 9:04 AM To: pjsip@lists.pjsip.org Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 Hi, I built PJSIP and run on Freescale ARM i.MX53. The video call works well. The issue is with the audio. The call gets initiated from the i.MX base board to a mobile running the csipsimple android app. The audio is heard properly on the mobile but not on the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to fade out or distorted. Sometimes audio is both distorted and faded. I tried all the steps in the audio troubleshooting as mentioned in the PJSIP website. I checked my sound output by playing an audio file. It plays well. Following steps I tried. 1. Tried using PCMU and PCMA as the board supports only PCM. SPEEX is disabled on the board. 2. Disabled the echo canceller. Did not have any effect on the result. 3. In-call volume to increased 5.0x, 10.0x and went up to 100.0x. Every time I increased this the audio gets worser. 4. Tried forcing 8KHz sample. Still no improvement. Can you suggest what could fix my issue? I could not get the packet statistics. Somehow the TX and RX packet count always shows zero when I use the 'dq' while in call. Thanks & Regards Varma SVRP Technical Lead | Orvito Technologies India Pvt Ltd. M: +91-9032867017 Description: Description: Description: Description: cid:image002.png@01CDD3CC.69D07270 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 | Hyderabad - 500038 www.orvito.com <http://www.orvito.com/>
BG
Bill Gardner
Thu, Apr 10, 2014 2:05 PM

Hi,

The packets stats show more loss than one would expect on a LAN, enough
to make it sound a bit garbled, but there's nothing to indicate why your
audio is fading away completely. You could try a wireshark capture to
verify audio is correctly sent from both endpoints, and similarly you
can set your ARM endpoint to automatically record to WAV file. That
should tell you something. Also check the log to see if you are getting
lots of master sound underflows, that would indicate CPU is out of gas.
Or maybe try audio only call without video.

Regards,

Bill

On 4/10/2014 7:46 AM, Varma wrote:

Hi,

I ran the sndtest and capture the call dump. Does this say anything
about the audio going bad.

./sndtest

08:13:14.760      sndtest.c !Found 2 devices:

08:13:14.761      sndtest.c  0: default:CARD=imx3stack (capture=1,
playback=1)

08:13:14.761      sndtest.c  1: sysdefault:CARD=imx3stack (capture=1,
playback=1)

08:13:15.220      sndtest.c  Testing playback device
default:CARD=imx3stack

08:13:15.220      sndtest.c  Testing capture device default:CARD=imx3stack

08:13:15.424      sndtest.c  Please wait while test is in progress
(~11 secs)..

08:13:26.581      sndtest.c  Dumping results:

08:13:26.582      sndtest.c Parameters: clock rate=8000Hz, 80
samples/frame

08:13:26.582      sndtest.c    Playback stream report:

08:13:26.582      sndtest.c Duration: 9s.990

08:13:26.582      sndtest.c    Frame interval: min=0.029ms, max=67.945ms

08:13:26.582      sndtest.c    Jitter: min=9.948ms, avg=26.685ms,
max=67.913ms

08:13:26.583      sndtest.c    Capture stream report:

08:13:26.583      sndtest.c Duration: 9s.980

08:13:26.583      sndtest.c    Frame interval: min=0.092ms, max=63.500ms

08:13:26.583      sndtest.c    Jitter: min=9.893ms, avg=26.536ms,
max=63.406ms

08:13:26.583      sndtest.c    Checking for clock drifts:

08:13:26.583      sndtest.c    Sound capture is 80 samples faster
than playback at the end of the test (average is 8 samples per second)

08:13:26.583      sndtest.c  Test completed with some warnings

---======================

Call statistics:

[DISCONNCTD] To: sip:192.168.1.156;tag=3d928773698d4280957744e929d8aa73

 Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms

 #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004

    SRTP status: Not active Crypto-suite:

    RX pt=8, last update:00h:00m:01.465s ago

       total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps

       pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 

(0.0%)

             (msec)    min avg     max     last    dev

       loss period:  20.000  21.652 100.000  20.000   6.131

       jitter     :   0.250   8.685 29.000   7.000   3.389

    TX pt=8, ptime=20, last update:00h:00m:01.318s ago

       total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps

       pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%)

             (msec)    min avg     max     last    dev

       loss period:  20.000 164.151 1540.000  80.000  41.859

       jitter     :   0.000  14.582 21.875  12.125   4.515

    RTT msec      :   3.082  21.143 73.908  14.831  18.172

00:34:55.055  pjsua_media.c  ......Call 1: deinitializing media..

00:34:55.056  pjsua_media.c ........Media stream call01:0 is destroyed

00:34:56.055    pjsua_aud.c  Closing sound device after idle for 1
second(s)

00:34:56.055    pjsua_app.c  .Turning sound device OFF

00:34:56.055    pjsua_aud.c  .Closing default:CARD=imx3stack sound
playback device and default:CARD=imx3stack sound capture device

Thanks & Regards

Varma SVRP

*From:*pjsip-bounces@lists.pjsip.org
[mailto:pjsip-bounces@lists.pjsip.org] *On Behalf Of *Varma
Sent: Monday, April 07, 2014 9:04 AM
To: pjsip@lists.pjsip.org
Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

I built PJSIP and run on Freescale ARM i.MX53. The video call works
well. The issue is with the audio.

The call gets initiated from the i.MX base board to a mobile running
the csipsimple android app. The audio is heard properly on the mobile
but not on the i.MX board. The audio is heard clearly on for 1-2 secs
and it starts to fade out or distorted. Sometimes audio is both
distorted and faded. I tried all the steps in the audio
troubleshooting as mentioned in the PJSIP website.

I checked my sound output by playing an audio file. It plays well.

Following steps I tried.

1.Tried using PCMU and PCMA as the board supports only PCM. SPEEX is
disabled on the board.

2.Disabled the echo canceller. Did not have any effect on the result.

3.In-call volume to increased 5.0x, 10.0x and went up to 100.0x. Every
time I increased this the audio gets worser.

4.Tried forcing 8KHz sample. Still no improvement.

Can you suggest what could fix my issue?

I could not get the packet statistics. Somehow the TX and RX packet
count always shows zero when I use the 'dq' while in call.

Thanks & Regards

Varma SVRP

Technical Lead | Orvito Technologies India Pvt Ltd.

M: +91-9032867017

Description: Description: Description: Description:
cid:image002.png@01CDD3CC.69D07270**

8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.:
2 | Hyderabad - 500038

www.orvito.com http://www.orvito.com/


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

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

Hi, The packets stats show more loss than one would expect on a LAN, enough to make it sound a bit garbled, but there's nothing to indicate why your audio is fading away completely. You could try a wireshark capture to verify audio is correctly sent from both endpoints, and similarly you can set your ARM endpoint to automatically record to WAV file. That should tell you something. Also check the log to see if you are getting lots of master sound underflows, that would indicate CPU is out of gas. Or maybe try audio only call without video. Regards, Bill On 4/10/2014 7:46 AM, Varma wrote: > > Hi, > > I ran the sndtest and capture the call dump. Does this say anything > about the audio going bad. > > # ./sndtest > > 08:13:14.760 sndtest.c !Found 2 devices: > > 08:13:14.761 sndtest.c 0: default:CARD=imx3stack (capture=1, > playback=1) > > 08:13:14.761 sndtest.c 1: sysdefault:CARD=imx3stack (capture=1, > playback=1) > > 08:13:15.220 sndtest.c Testing playback device > default:CARD=imx3stack > > 08:13:15.220 sndtest.c Testing capture device default:CARD=imx3stack > > 08:13:15.424 sndtest.c Please wait while test is in progress > (~11 secs).. > > 08:13:26.581 sndtest.c Dumping results: > > 08:13:26.582 sndtest.c Parameters: clock rate=8000Hz, 80 > samples/frame > > 08:13:26.582 sndtest.c Playback stream report: > > 08:13:26.582 sndtest.c Duration: 9s.990 > > 08:13:26.582 sndtest.c Frame interval: min=0.029ms, max=67.945ms > > 08:13:26.582 sndtest.c Jitter: min=9.948ms, avg=26.685ms, > max=67.913ms > > 08:13:26.583 sndtest.c Capture stream report: > > 08:13:26.583 sndtest.c Duration: 9s.980 > > 08:13:26.583 sndtest.c Frame interval: min=0.092ms, max=63.500ms > > 08:13:26.583 sndtest.c Jitter: min=9.893ms, avg=26.536ms, > max=63.406ms > > 08:13:26.583 sndtest.c Checking for clock drifts: > > 08:13:26.583 sndtest.c Sound capture is 80 samples faster > than playback at the end of the test (average is 8 samples per second) > > 08:13:26.583 sndtest.c Test completed with some warnings > > ======================================================= > > Call statistics: > > [DISCONNCTD] To: <sip:192.168.1.156>;tag=3d928773698d4280957744e929d8aa73 > > Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms > > #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004 > > SRTP status: Not active Crypto-suite: > > RX pt=8, last update:00h:00m:01.465s ago > > total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps > > pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 > (0.0%) > > (msec) min avg max last dev > > loss period: 20.000 21.652 100.000 20.000 6.131 > > jitter : 0.250 8.685 29.000 7.000 3.389 > > TX pt=8, ptime=20, last update:00h:00m:01.318s ago > > total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps > > pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%) > > (msec) min avg max last dev > > loss period: 20.000 164.151 1540.000 80.000 41.859 > > jitter : 0.000 14.582 21.875 12.125 4.515 > > RTT msec : 3.082 21.143 73.908 14.831 18.172 > > 00:34:55.055 pjsua_media.c ......Call 1: deinitializing media.. > > 00:34:55.056 pjsua_media.c ........Media stream call01:0 is destroyed > > 00:34:56.055 pjsua_aud.c Closing sound device after idle for 1 > second(s) > > 00:34:56.055 pjsua_app.c .Turning sound device OFF > > 00:34:56.055 pjsua_aud.c .Closing default:CARD=imx3stack sound > playback device and default:CARD=imx3stack sound capture device > > Thanks & Regards > > Varma SVRP > > *From:*pjsip-bounces@lists.pjsip.org > [mailto:pjsip-bounces@lists.pjsip.org] *On Behalf Of *Varma > *Sent:* Monday, April 07, 2014 9:04 AM > *To:* pjsip@lists.pjsip.org > *Subject:* [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 > > Hi, > > I built PJSIP and run on Freescale ARM i.MX53. The video call works > well. The issue is with the audio. > > The call gets initiated from the i.MX base board to a mobile running > the csipsimple android app. The audio is heard properly on the mobile > but not on the i.MX board. The audio is heard clearly on for 1-2 secs > and it starts to fade out or distorted. Sometimes audio is both > distorted and faded. I tried all the steps in the audio > troubleshooting as mentioned in the PJSIP website. > > I checked my sound output by playing an audio file. It plays well. > > Following steps I tried. > > 1.Tried using PCMU and PCMA as the board supports only PCM. SPEEX is > disabled on the board. > > 2.Disabled the echo canceller. Did not have any effect on the result. > > 3.In-call volume to increased 5.0x, 10.0x and went up to 100.0x. Every > time I increased this the audio gets worser. > > 4.Tried forcing 8KHz sample. Still no improvement. > > Can you suggest what could fix my issue? > > I could not get the packet statistics. Somehow the TX and RX packet > count always shows zero when I use the 'dq' while in call. > > Thanks & Regards > > Varma SVRP > > Technical Lead | Orvito Technologies India Pvt Ltd. > > M: +91-9032867017 > > Description: Description: Description: Description: > cid:image002.png@01CDD3CC.69D07270** > > 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: > 2 | Hyderabad - 500038 > > www.orvito.com <http://www.orvito.com/> > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
V
Varma
Mon, Apr 21, 2014 3:47 AM

Hi,

I digged deep and found out that the packet loss was due to network issue. I
got that resolved. Now there is minimal packet loss of 1%-3% occasionally.

The audio is actually garbled. It still is. I found out that the
echo-cancellation was not kicking in. I put some debug statements in the
echo_create() function which would've printed on the console if EC was
kicking in. I am running the PJSUA app from the samples.  How do I tell the
app to invoke echo-canceller forcibly?

Thanks & Regards

Varma SVRP

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Bill Gardner
Sent: Thursday, April 10, 2014 7:35 PM
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

The packets stats show more loss than one would expect on a LAN, enough to
make it sound a bit garbled, but there's nothing to indicate why your audio
is fading away completely. You could try a wireshark capture to verify audio
is correctly sent from both endpoints, and similarly you can set your ARM
endpoint to automatically record to WAV file. That should tell you
something. Also check the log to see if you are getting lots of master sound
underflows, that would indicate CPU is out of gas. Or maybe try audio only
call without video.

Regards,

Bill

On 4/10/2014 7:46 AM, Varma wrote:

Hi,

I ran the sndtest and capture the call dump. Does this say anything about
the audio going bad.

./sndtest

08:13:14.760      sndtest.c !Found 2 devices:

08:13:14.761      sndtest.c  0: default:CARD=imx3stack (capture=1,
playback=1)

08:13:14.761      sndtest.c  1: sysdefault:CARD=imx3stack (capture=1,
playback=1)

08:13:15.220      sndtest.c  Testing playback device default:CARD=imx3stack

08:13:15.220      sndtest.c  Testing capture device default:CARD=imx3stack

08:13:15.424      sndtest.c  Please wait while test is in progress (~11
secs)..

08:13:26.581      sndtest.c  Dumping results:

08:13:26.582      sndtest.c    Parameters: clock rate=8000Hz, 80
samples/frame

08:13:26.582      sndtest.c    Playback stream report:

08:13:26.582      sndtest.c    Duration: 9s.990

08:13:26.582      sndtest.c    Frame interval: min=0.029ms, max=67.945ms

08:13:26.582      sndtest.c    Jitter: min=9.948ms, avg=26.685ms,
max=67.913ms

08:13:26.583      sndtest.c    Capture stream report:

08:13:26.583      sndtest.c    Duration: 9s.980

08:13:26.583      sndtest.c    Frame interval: min=0.092ms, max=63.500ms

08:13:26.583      sndtest.c    Jitter: min=9.893ms, avg=26.536ms,
max=63.406ms

08:13:26.583      sndtest.c    Checking for clock drifts:

08:13:26.583      sndtest.c    Sound capture is 80 samples faster than
playback at the end of the test (average is 8 samples per second)

08:13:26.583      sndtest.c  Test completed with some warnings

---======================

Call statistics:

[DISCONNCTD] To: sip:192.168.1.156;tag=3d928773698d4280957744e929d8aa73

Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms

#0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004

   SRTP status: Not active Crypto-suite:

   RX pt=8, last update:00h:00m:01.465s ago

      total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps

      pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 (0.0%)

            (msec)    min     avg     max     last    dev

      loss period:  20.000  21.652 100.000  20.000   6.131

      jitter     :   0.250   8.685  29.000   7.000   3.389

   TX pt=8, ptime=20, last update:00h:00m:01.318s ago

      total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps

      pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%)

            (msec)    min     avg     max     last    dev

      loss period:  20.000 164.151 1540.000  80.000  41.859

      jitter     :   0.000  14.582  21.875  12.125   4.515

   RTT msec      :   3.082  21.143  73.908  14.831  18.172

00:34:55.055  pjsua_media.c  ......Call 1: deinitializing media..

00:34:55.056  pjsua_media.c  ........Media stream call01:0 is destroyed

00:34:56.055    pjsua_aud.c  Closing sound device after idle for 1 second(s)

00:34:56.055    pjsua_app.c  .Turning sound device OFF

00:34:56.055    pjsua_aud.c  .Closing default:CARD=imx3stack sound playback
device and default:CARD=imx3stack sound capture device

Thanks & Regards

Varma SVRP

From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]
On Behalf Of Varma
Sent: Monday, April 07, 2014 9:04 AM
To: pjsip@lists.pjsip.org
Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

I built PJSIP and run on Freescale ARM i.MX53. The video call works well.
The issue is with the audio.

The call gets initiated from the i.MX base board to a mobile running the
csipsimple android app. The audio is heard properly on the mobile but not on
the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to
fade out or distorted. Sometimes audio is both distorted and faded. I tried
all the steps in the audio troubleshooting as mentioned in the PJSIP
website.

I checked my sound output by playing an audio file. It plays well.

Following steps I tried.

  1.   Tried using PCMU and PCMA as the board supports only PCM. SPEEX is
    

disabled on the board.

  1.   Disabled the echo canceller. Did not have any effect on the result.
    
  2.   In-call volume to increased 5.0x, 10.0x and went up to 100.0x.
    

Every time I increased this the audio gets worser.

  1.   Tried forcing 8KHz sample. Still no improvement.
    

Can you suggest what could fix my issue?

I could not get the packet statistics. Somehow the TX and RX packet count
always shows zero when I use the 'dq' while in call.

Thanks & Regards

Varma SVRP

Technical Lead | Orvito Technologies India Pvt Ltd.

M: +91-9032867017

Description: Description: Description: Description:
cid:image002.png@01CDD3CC.69D07270

8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 |
Hyderabad - 500038

www.orvito.com http://www.orvito.com/


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

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

Hi, I digged deep and found out that the packet loss was due to network issue. I got that resolved. Now there is minimal packet loss of 1%-3% occasionally. The audio is actually garbled. It still is. I found out that the echo-cancellation was not kicking in. I put some debug statements in the echo_create() function which would've printed on the console if EC was kicking in. I am running the PJSUA app from the samples. How do I tell the app to invoke echo-canceller forcibly? Thanks & Regards Varma SVRP From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Bill Gardner Sent: Thursday, April 10, 2014 7:35 PM To: pjsip@lists.pjsip.org Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 Hi, The packets stats show more loss than one would expect on a LAN, enough to make it sound a bit garbled, but there's nothing to indicate why your audio is fading away completely. You could try a wireshark capture to verify audio is correctly sent from both endpoints, and similarly you can set your ARM endpoint to automatically record to WAV file. That should tell you something. Also check the log to see if you are getting lots of master sound underflows, that would indicate CPU is out of gas. Or maybe try audio only call without video. Regards, Bill On 4/10/2014 7:46 AM, Varma wrote: Hi, I ran the sndtest and capture the call dump. Does this say anything about the audio going bad. # ./sndtest 08:13:14.760 sndtest.c !Found 2 devices: 08:13:14.761 sndtest.c 0: default:CARD=imx3stack (capture=1, playback=1) 08:13:14.761 sndtest.c 1: sysdefault:CARD=imx3stack (capture=1, playback=1) 08:13:15.220 sndtest.c Testing playback device default:CARD=imx3stack 08:13:15.220 sndtest.c Testing capture device default:CARD=imx3stack 08:13:15.424 sndtest.c Please wait while test is in progress (~11 secs).. 08:13:26.581 sndtest.c Dumping results: 08:13:26.582 sndtest.c Parameters: clock rate=8000Hz, 80 samples/frame 08:13:26.582 sndtest.c Playback stream report: 08:13:26.582 sndtest.c Duration: 9s.990 08:13:26.582 sndtest.c Frame interval: min=0.029ms, max=67.945ms 08:13:26.582 sndtest.c Jitter: min=9.948ms, avg=26.685ms, max=67.913ms 08:13:26.583 sndtest.c Capture stream report: 08:13:26.583 sndtest.c Duration: 9s.980 08:13:26.583 sndtest.c Frame interval: min=0.092ms, max=63.500ms 08:13:26.583 sndtest.c Jitter: min=9.893ms, avg=26.536ms, max=63.406ms 08:13:26.583 sndtest.c Checking for clock drifts: 08:13:26.583 sndtest.c Sound capture is 80 samples faster than playback at the end of the test (average is 8 samples per second) 08:13:26.583 sndtest.c Test completed with some warnings ======================================================= Call statistics: [DISCONNCTD] To: <sip:192.168.1.156>;tag=3d928773698d4280957744e929d8aa73 Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004 SRTP status: Not active Crypto-suite: RX pt=8, last update:00h:00m:01.465s ago total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 (0.0%) (msec) min avg max last dev loss period: 20.000 21.652 100.000 20.000 6.131 jitter : 0.250 8.685 29.000 7.000 3.389 TX pt=8, ptime=20, last update:00h:00m:01.318s ago total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%) (msec) min avg max last dev loss period: 20.000 164.151 1540.000 80.000 41.859 jitter : 0.000 14.582 21.875 12.125 4.515 RTT msec : 3.082 21.143 73.908 14.831 18.172 00:34:55.055 pjsua_media.c ......Call 1: deinitializing media.. 00:34:55.056 pjsua_media.c ........Media stream call01:0 is destroyed 00:34:56.055 pjsua_aud.c Closing sound device after idle for 1 second(s) 00:34:56.055 pjsua_app.c .Turning sound device OFF 00:34:56.055 pjsua_aud.c .Closing default:CARD=imx3stack sound playback device and default:CARD=imx3stack sound capture device Thanks & Regards Varma SVRP From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Varma Sent: Monday, April 07, 2014 9:04 AM To: pjsip@lists.pjsip.org Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 Hi, I built PJSIP and run on Freescale ARM i.MX53. The video call works well. The issue is with the audio. The call gets initiated from the i.MX base board to a mobile running the csipsimple android app. The audio is heard properly on the mobile but not on the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to fade out or distorted. Sometimes audio is both distorted and faded. I tried all the steps in the audio troubleshooting as mentioned in the PJSIP website. I checked my sound output by playing an audio file. It plays well. Following steps I tried. 1. Tried using PCMU and PCMA as the board supports only PCM. SPEEX is disabled on the board. 2. Disabled the echo canceller. Did not have any effect on the result. 3. In-call volume to increased 5.0x, 10.0x and went up to 100.0x. Every time I increased this the audio gets worser. 4. Tried forcing 8KHz sample. Still no improvement. Can you suggest what could fix my issue? I could not get the packet statistics. Somehow the TX and RX packet count always shows zero when I use the 'dq' while in call. Thanks & Regards Varma SVRP Technical Lead | Orvito Technologies India Pvt Ltd. M: +91-9032867017 Description: Description: Description: Description: cid:image002.png@01CDD3CC.69D07270 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 | Hyderabad - 500038 www.orvito.com <http://www.orvito.com/> _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
BG
Bill Gardner
Mon, Apr 21, 2014 6:35 PM

Hi,

The best tool for debugging pjsip is the log file, you should make sure
a log is created somewhere that you can access. EC creation is logged. I
think EC is always created, even if speex is disabled in config file it
will create pjsip echo suppressor.

Identify which audio path is garbled. Mic -> RTP? RTP->speaker? You can
capture RTP stream with wireshark. You can also capture any conference
port entry to WAV file pretty easily. This help narrow down where the
garbling is occurring. I would start by making sure audio playback and
recording works on your device.

Bill

On 4/20/2014 11:47 PM, Varma wrote:

Hi,

I digged deep and found out that the packet loss was due to network
issue. I got that resolved. Now there is minimal packet loss of 1%-3%
occasionally.

The audio is actually garbled. It still is. I found out that the
echo-cancellation was not kicking in. I put some debug statements in
the echo_create() function which would've printed on the console if EC
was kicking in. I am running the PJSUA app from the samples.  How do I
tell the app to invoke echo-canceller forcibly?

Thanks & Regards

Varma SVRP

*From:*pjsip [mailto:pjsip-bounces@lists.pjsip.org] *On Behalf Of
*Bill Gardner
Sent: Thursday, April 10, 2014 7:35 PM
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on
ARM-i.MX53

Hi,

The packets stats show more loss than one would expect on a LAN,
enough to make it sound a bit garbled, but there's nothing to indicate
why your audio is fading away completely. You could try a wireshark
capture to verify audio is correctly sent from both endpoints, and
similarly you can set your ARM endpoint to automatically record to WAV
file. That should tell you something. Also check the log to see if you
are getting lots of master sound underflows, that would indicate CPU
is out of gas. Or maybe try audio only call without video.

Regards,

Bill

On 4/10/2014 7:46 AM, Varma wrote:

 Hi,

 I ran the sndtest and capture the call dump. Does this say
 anything about the audio going bad.

 # ./sndtest

 08:13:14.760      sndtest.c !Found 2 devices:

 08:13:14.761      sndtest.c   0: default:CARD=imx3stack
 (capture=1, playback=1)

 08:13:14.761      sndtest.c   1: sysdefault:CARD=imx3stack
 (capture=1, playback=1)

 08:13:15.220      sndtest.c  Testing playback device
 default:CARD=imx3stack

 08:13:15.220      sndtest.c  Testing capture device
 default:CARD=imx3stack

 08:13:15.424      sndtest.c   Please wait while test is in
 progress (~11 secs)..

 08:13:26.581      sndtest.c   Dumping results:

 08:13:26.582      sndtest.c Parameters: clock rate=8000Hz, 80
 samples/frame

 08:13:26.582      sndtest.c Playback stream report:

 08:13:26.582      sndtest.c Duration: 9s.990

 08:13:26.582      sndtest.c     Frame interval: min=0.029ms,
 max=67.945ms

 08:13:26.582      sndtest.c Jitter: min=9.948ms, avg=26.685ms,
 max=67.913ms

 08:13:26.583      sndtest.c    Capture stream report:

 08:13:26.583      sndtest.c Duration: 9s.980

 08:13:26.583      sndtest.c     Frame interval: min=0.092ms,
 max=63.500ms

 08:13:26.583      sndtest.c Jitter: min=9.893ms, avg=26.536ms,
 max=63.406ms

 08:13:26.583      sndtest.c Checking for clock drifts:

 08:13:26.583      sndtest.c     Sound capture is 80 samples faster
 than playback at the end of the test (average is 8 samples per second)

 08:13:26.583      sndtest.c   Test completed with some warnings

 

---======================

 Call statistics:

 [DISCONNCTD] To:
 <sip:192.168.1.156>;tag=3d928773698d4280957744e929d8aa73

     Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms

     #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004

        SRTP status: Not active Crypto-suite:

        RX pt=8, last update:00h:00m:01.465s ago

           total 12.6Kpkt 2.03MB (2.53MB +IP hdr)
 @avg=57.5Kbps/71.9Kbps

           pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%),
 reord=3 (0.0%)

                 (msec)    min avg     max     last    dev

           loss period:  20.000  21.652 100.000  20.000   6.131

           jitter     :   0.250 8.685  29.000   7.000   3.389

        TX pt=8, ptime=20, last update:00h:00m:01.318s ago

           total 11.8Kpkt 1.89MB (2.37MB +IP hdr)
 @avg=53.7Kbps/67.2Kbps

           pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%)

                 (msec)    min avg     max     last    dev

           loss period:  20.000 164.151 1540.000  80.000  41.859

           jitter     :   0.000 14.582  21.875  12.125   4.515

        RTT msec      :   3.082 21.143  73.908  14.831  18.172

 00:34:55.055  pjsua_media.c ......Call 1: deinitializing media..

 00:34:55.056  pjsua_media.c ........Media stream call01:0 is destroyed

 00:34:56.055    pjsua_aud.c  Closing sound device after idle for 1
 second(s)

 00:34:56.055    pjsua_app.c  .Turning sound device OFF

 00:34:56.055    pjsua_aud.c  .Closing default:CARD=imx3stack sound
 playback device and default:CARD=imx3stack sound capture device

 Thanks & Regards

 Varma SVRP

 *From:*pjsip-bounces@lists.pjsip.org
 <mailto:pjsip-bounces@lists.pjsip.org>
 [mailto:pjsip-bounces@lists.pjsip.org] *On Behalf Of *Varma
 *Sent:* Monday, April 07, 2014 9:04 AM
 *To:* pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org>
 *Subject:* [pjsip] PJSIP Audio fades, distorts and inaudible on
 ARM-i.MX53

 Hi,

 I built PJSIP and run on Freescale ARM i.MX53. The video call
 works well. The issue is with the audio.

 The call gets initiated from the i.MX base board to a mobile
 running the csipsimple android app. The audio is heard properly on
 the mobile but not on the i.MX board. The audio is heard clearly
 on for 1-2 secs and it starts to fade out or distorted. Sometimes
 audio is both distorted and faded. I tried all the steps in the
 audio troubleshooting as mentioned in the PJSIP website.

 I checked my sound output by playing an audio file. It plays well.

 Following steps I tried.

 1.Tried using PCMU and PCMA as the board supports only PCM. SPEEX
 is disabled on the board.

 2.Disabled the echo canceller. Did not have any effect on the result.

 3.In-call volume to increased 5.0x, 10.0x and went up to 100.0x.
 Every time I increased this the audio gets worser.

 4.Tried forcing 8KHz sample. Still no improvement.

 Can you suggest what could fix my issue?

 I could not get the packet statistics. Somehow the TX and RX
 packet count always shows zero when I use the 'dq' while in call.

 Thanks & Regards

 Varma SVRP

 Technical Lead | Orvito Technologies India Pvt Ltd.

 M: +91-9032867017

 Description: Description: Description: Description:
 cid:image002.png@01CDD3CC.69D07270

 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road
 No.: 2 | Hyderabad - 500038

 www.orvito.com <http://www.orvito.com/>




 _______________________________________________

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

   

 pjsip mailing list

 pjsip@lists.pjsip.org  <mailto:pjsip@lists.pjsip.org>

 http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

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

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

Hi, The best tool for debugging pjsip is the log file, you should make sure a log is created somewhere that you can access. EC creation is logged. I think EC is always created, even if speex is disabled in config file it will create pjsip echo suppressor. Identify which audio path is garbled. Mic -> RTP? RTP->speaker? You can capture RTP stream with wireshark. You can also capture any conference port entry to WAV file pretty easily. This help narrow down where the garbling is occurring. I would start by making sure audio playback and recording works on your device. Bill On 4/20/2014 11:47 PM, Varma wrote: > > Hi, > > I digged deep and found out that the packet loss was due to network > issue. I got that resolved. Now there is minimal packet loss of 1%-3% > occasionally. > > The audio is actually garbled. It still is. I found out that the > echo-cancellation was not kicking in. I put some debug statements in > the echo_create() function which would've printed on the console if EC > was kicking in. I am running the PJSUA app from the samples. How do I > tell the app to invoke echo-canceller forcibly? > > Thanks & Regards > > Varma SVRP > > *From:*pjsip [mailto:pjsip-bounces@lists.pjsip.org] *On Behalf Of > *Bill Gardner > *Sent:* Thursday, April 10, 2014 7:35 PM > *To:* pjsip@lists.pjsip.org > *Subject:* Re: [pjsip] PJSIP Audio fades, distorts and inaudible on > ARM-i.MX53 > > Hi, > > The packets stats show more loss than one would expect on a LAN, > enough to make it sound a bit garbled, but there's nothing to indicate > why your audio is fading away completely. You could try a wireshark > capture to verify audio is correctly sent from both endpoints, and > similarly you can set your ARM endpoint to automatically record to WAV > file. That should tell you something. Also check the log to see if you > are getting lots of master sound underflows, that would indicate CPU > is out of gas. Or maybe try audio only call without video. > > Regards, > > Bill > > On 4/10/2014 7:46 AM, Varma wrote: > > Hi, > > I ran the sndtest and capture the call dump. Does this say > anything about the audio going bad. > > # ./sndtest > > 08:13:14.760 sndtest.c !Found 2 devices: > > 08:13:14.761 sndtest.c 0: default:CARD=imx3stack > (capture=1, playback=1) > > 08:13:14.761 sndtest.c 1: sysdefault:CARD=imx3stack > (capture=1, playback=1) > > 08:13:15.220 sndtest.c Testing playback device > default:CARD=imx3stack > > 08:13:15.220 sndtest.c Testing capture device > default:CARD=imx3stack > > 08:13:15.424 sndtest.c Please wait while test is in > progress (~11 secs).. > > 08:13:26.581 sndtest.c Dumping results: > > 08:13:26.582 sndtest.c Parameters: clock rate=8000Hz, 80 > samples/frame > > 08:13:26.582 sndtest.c Playback stream report: > > 08:13:26.582 sndtest.c Duration: 9s.990 > > 08:13:26.582 sndtest.c Frame interval: min=0.029ms, > max=67.945ms > > 08:13:26.582 sndtest.c Jitter: min=9.948ms, avg=26.685ms, > max=67.913ms > > 08:13:26.583 sndtest.c Capture stream report: > > 08:13:26.583 sndtest.c Duration: 9s.980 > > 08:13:26.583 sndtest.c Frame interval: min=0.092ms, > max=63.500ms > > 08:13:26.583 sndtest.c Jitter: min=9.893ms, avg=26.536ms, > max=63.406ms > > 08:13:26.583 sndtest.c Checking for clock drifts: > > 08:13:26.583 sndtest.c Sound capture is 80 samples faster > than playback at the end of the test (average is 8 samples per second) > > 08:13:26.583 sndtest.c Test completed with some warnings > > ======================================================= > > Call statistics: > > [DISCONNCTD] To: > <sip:192.168.1.156>;tag=3d928773698d4280957744e929d8aa73 > > Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms > > #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004 > > SRTP status: Not active Crypto-suite: > > RX pt=8, last update:00h:00m:01.465s ago > > total 12.6Kpkt 2.03MB (2.53MB +IP hdr) > @avg=57.5Kbps/71.9Kbps > > pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), > reord=3 (0.0%) > > (msec) min avg max last dev > > loss period: 20.000 21.652 100.000 20.000 6.131 > > jitter : 0.250 8.685 29.000 7.000 3.389 > > TX pt=8, ptime=20, last update:00h:00m:01.318s ago > > total 11.8Kpkt 1.89MB (2.37MB +IP hdr) > @avg=53.7Kbps/67.2Kbps > > pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%) > > (msec) min avg max last dev > > loss period: 20.000 164.151 1540.000 80.000 41.859 > > jitter : 0.000 14.582 21.875 12.125 4.515 > > RTT msec : 3.082 21.143 73.908 14.831 18.172 > > 00:34:55.055 pjsua_media.c ......Call 1: deinitializing media.. > > 00:34:55.056 pjsua_media.c ........Media stream call01:0 is destroyed > > 00:34:56.055 pjsua_aud.c Closing sound device after idle for 1 > second(s) > > 00:34:56.055 pjsua_app.c .Turning sound device OFF > > 00:34:56.055 pjsua_aud.c .Closing default:CARD=imx3stack sound > playback device and default:CARD=imx3stack sound capture device > > Thanks & Regards > > Varma SVRP > > *From:*pjsip-bounces@lists.pjsip.org > <mailto:pjsip-bounces@lists.pjsip.org> > [mailto:pjsip-bounces@lists.pjsip.org] *On Behalf Of *Varma > *Sent:* Monday, April 07, 2014 9:04 AM > *To:* pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org> > *Subject:* [pjsip] PJSIP Audio fades, distorts and inaudible on > ARM-i.MX53 > > Hi, > > I built PJSIP and run on Freescale ARM i.MX53. The video call > works well. The issue is with the audio. > > The call gets initiated from the i.MX base board to a mobile > running the csipsimple android app. The audio is heard properly on > the mobile but not on the i.MX board. The audio is heard clearly > on for 1-2 secs and it starts to fade out or distorted. Sometimes > audio is both distorted and faded. I tried all the steps in the > audio troubleshooting as mentioned in the PJSIP website. > > I checked my sound output by playing an audio file. It plays well. > > Following steps I tried. > > 1.Tried using PCMU and PCMA as the board supports only PCM. SPEEX > is disabled on the board. > > 2.Disabled the echo canceller. Did not have any effect on the result. > > 3.In-call volume to increased 5.0x, 10.0x and went up to 100.0x. > Every time I increased this the audio gets worser. > > 4.Tried forcing 8KHz sample. Still no improvement. > > Can you suggest what could fix my issue? > > I could not get the packet statistics. Somehow the TX and RX > packet count always shows zero when I use the 'dq' while in call. > > Thanks & Regards > > Varma SVRP > > Technical Lead | Orvito Technologies India Pvt Ltd. > > M: +91-9032867017 > > Description: Description: Description: Description: > cid:image002.png@01CDD3CC.69D07270 > > 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road > No.: 2 | Hyderabad - 500038 > > www.orvito.com <http://www.orvito.com/> > > > > > _______________________________________________ > > Visit our blog:http://blog.pjsip.org > > > > pjsip mailing list > > pjsip@lists.pjsip.org <mailto:pjsip@lists.pjsip.org> > > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
V
Varma
Tue, Apr 29, 2014 2:17 PM

Hi

The problem got fixed. The solution was to use pulseaudio  with the
echo-cancel-module.

Because of echo, the audio appeared like it was distorted and most of the
times there was a howling sound. With the command line #pactl load-module
echo-cancel-module and then running the pjsip app resolved the issue.

Thanks & Regards

Varma SVRP

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Bill Gardner
Sent: Tuesday, April 22, 2014 12:06 AM
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

The best tool for debugging pjsip is the log file, you should make sure a
log is created somewhere that you can access. EC creation is logged. I think
EC is always created, even if speex is disabled in config file it will
create pjsip echo suppressor.

Identify which audio path is garbled. Mic -> RTP? RTP->speaker? You can
capture RTP stream with wireshark. You can also capture any conference port
entry to WAV file pretty easily. This help narrow down where the garbling is
occurring. I would start by making sure audio playback and recording works
on your device.

Bill

On 4/20/2014 11:47 PM, Varma wrote:

Hi,

I digged deep and found out that the packet loss was due to network issue. I
got that resolved. Now there is minimal packet loss of 1%-3% occasionally.

The audio is actually garbled. It still is. I found out that the
echo-cancellation was not kicking in. I put some debug statements in the
echo_create() function which would've printed on the console if EC was
kicking in. I am running the PJSUA app from the samples.  How do I tell the
app to invoke echo-canceller forcibly?

Thanks & Regards

Varma SVRP

From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Bill Gardner
Sent: Thursday, April 10, 2014 7:35 PM
To: pjsip@lists.pjsip.org
Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

The packets stats show more loss than one would expect on a LAN, enough to
make it sound a bit garbled, but there's nothing to indicate why your audio
is fading away completely. You could try a wireshark capture to verify audio
is correctly sent from both endpoints, and similarly you can set your ARM
endpoint to automatically record to WAV file. That should tell you
something. Also check the log to see if you are getting lots of master sound
underflows, that would indicate CPU is out of gas. Or maybe try audio only
call without video.

Regards,

Bill

On 4/10/2014 7:46 AM, Varma wrote:

Hi,

I ran the sndtest and capture the call dump. Does this say anything about
the audio going bad.

./sndtest

08:13:14.760      sndtest.c !Found 2 devices:

08:13:14.761      sndtest.c  0: default:CARD=imx3stack (capture=1,
playback=1)

08:13:14.761      sndtest.c  1: sysdefault:CARD=imx3stack (capture=1,
playback=1)

08:13:15.220      sndtest.c  Testing playback device default:CARD=imx3stack

08:13:15.220      sndtest.c  Testing capture device default:CARD=imx3stack

08:13:15.424      sndtest.c  Please wait while test is in progress (~11
secs)..

08:13:26.581      sndtest.c  Dumping results:

08:13:26.582      sndtest.c    Parameters: clock rate=8000Hz, 80
samples/frame

08:13:26.582      sndtest.c    Playback stream report:

08:13:26.582      sndtest.c    Duration: 9s.990

08:13:26.582      sndtest.c    Frame interval: min=0.029ms, max=67.945ms

08:13:26.582      sndtest.c    Jitter: min=9.948ms, avg=26.685ms,
max=67.913ms

08:13:26.583      sndtest.c    Capture stream report:

08:13:26.583      sndtest.c    Duration: 9s.980

08:13:26.583      sndtest.c    Frame interval: min=0.092ms, max=63.500ms

08:13:26.583      sndtest.c    Jitter: min=9.893ms, avg=26.536ms,
max=63.406ms

08:13:26.583      sndtest.c    Checking for clock drifts:

08:13:26.583      sndtest.c    Sound capture is 80 samples faster than
playback at the end of the test (average is 8 samples per second)

08:13:26.583      sndtest.c  Test completed with some warnings

---======================

Call statistics:

[DISCONNCTD] To: sip:192.168.1.156;tag=3d928773698d4280957744e929d8aa73

Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms

#0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004

   SRTP status: Not active Crypto-suite:

   RX pt=8, last update:00h:00m:01.465s ago

      total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps

      pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 (0.0%)

            (msec)    min     avg     max     last    dev

      loss period:  20.000  21.652 100.000  20.000   6.131

      jitter     :   0.250   8.685  29.000   7.000   3.389

   TX pt=8, ptime=20, last update:00h:00m:01.318s ago

      total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps

      pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%)

            (msec)    min     avg     max     last    dev

      loss period:  20.000 164.151 1540.000  80.000  41.859

      jitter     :   0.000  14.582  21.875  12.125   4.515

   RTT msec      :   3.082  21.143  73.908  14.831  18.172

00:34:55.055  pjsua_media.c  ......Call 1: deinitializing media..

00:34:55.056  pjsua_media.c  ........Media stream call01:0 is destroyed

00:34:56.055    pjsua_aud.c  Closing sound device after idle for 1 second(s)

00:34:56.055    pjsua_app.c  .Turning sound device OFF

00:34:56.055    pjsua_aud.c  .Closing default:CARD=imx3stack sound playback
device and default:CARD=imx3stack sound capture device

Thanks & Regards

Varma SVRP

From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org]
On Behalf Of Varma
Sent: Monday, April 07, 2014 9:04 AM
To: pjsip@lists.pjsip.org
Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53

Hi,

I built PJSIP and run on Freescale ARM i.MX53. The video call works well.
The issue is with the audio.

The call gets initiated from the i.MX base board to a mobile running the
csipsimple android app. The audio is heard properly on the mobile but not on
the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to
fade out or distorted. Sometimes audio is both distorted and faded. I tried
all the steps in the audio troubleshooting as mentioned in the PJSIP
website.

I checked my sound output by playing an audio file. It plays well.

Following steps I tried.

  1.   Tried using PCMU and PCMA as the board supports only PCM. SPEEX is
    

disabled on the board.

  1.   Disabled the echo canceller. Did not have any effect on the result.
    
  2.   In-call volume to increased 5.0x, 10.0x and went up to 100.0x.
    

Every time I increased this the audio gets worser.

  1.   Tried forcing 8KHz sample. Still no improvement.
    

Can you suggest what could fix my issue?

I could not get the packet statistics. Somehow the TX and RX packet count
always shows zero when I use the 'dq' while in call.

Thanks & Regards

Varma SVRP

Technical Lead | Orvito Technologies India Pvt Ltd.

M: +91-9032867017

Description: Description: Description:
Description:
cid:image002.png@01CDD3CC.69D07270

8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 |
Hyderabad - 500038

www.orvito.com http://www.orvito.com/


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

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


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

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

Hi The problem got fixed. The solution was to use pulseaudio with the echo-cancel-module. Because of echo, the audio appeared like it was distorted and most of the times there was a howling sound. With the command line #pactl load-module echo-cancel-module and then running the pjsip app resolved the issue. Thanks & Regards Varma SVRP From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Bill Gardner Sent: Tuesday, April 22, 2014 12:06 AM To: pjsip@lists.pjsip.org Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 Hi, The best tool for debugging pjsip is the log file, you should make sure a log is created somewhere that you can access. EC creation is logged. I think EC is always created, even if speex is disabled in config file it will create pjsip echo suppressor. Identify which audio path is garbled. Mic -> RTP? RTP->speaker? You can capture RTP stream with wireshark. You can also capture any conference port entry to WAV file pretty easily. This help narrow down where the garbling is occurring. I would start by making sure audio playback and recording works on your device. Bill On 4/20/2014 11:47 PM, Varma wrote: Hi, I digged deep and found out that the packet loss was due to network issue. I got that resolved. Now there is minimal packet loss of 1%-3% occasionally. The audio is actually garbled. It still is. I found out that the echo-cancellation was not kicking in. I put some debug statements in the echo_create() function which would've printed on the console if EC was kicking in. I am running the PJSUA app from the samples. How do I tell the app to invoke echo-canceller forcibly? Thanks & Regards Varma SVRP From: pjsip [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Bill Gardner Sent: Thursday, April 10, 2014 7:35 PM To: pjsip@lists.pjsip.org Subject: Re: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 Hi, The packets stats show more loss than one would expect on a LAN, enough to make it sound a bit garbled, but there's nothing to indicate why your audio is fading away completely. You could try a wireshark capture to verify audio is correctly sent from both endpoints, and similarly you can set your ARM endpoint to automatically record to WAV file. That should tell you something. Also check the log to see if you are getting lots of master sound underflows, that would indicate CPU is out of gas. Or maybe try audio only call without video. Regards, Bill On 4/10/2014 7:46 AM, Varma wrote: Hi, I ran the sndtest and capture the call dump. Does this say anything about the audio going bad. # ./sndtest 08:13:14.760 sndtest.c !Found 2 devices: 08:13:14.761 sndtest.c 0: default:CARD=imx3stack (capture=1, playback=1) 08:13:14.761 sndtest.c 1: sysdefault:CARD=imx3stack (capture=1, playback=1) 08:13:15.220 sndtest.c Testing playback device default:CARD=imx3stack 08:13:15.220 sndtest.c Testing capture device default:CARD=imx3stack 08:13:15.424 sndtest.c Please wait while test is in progress (~11 secs).. 08:13:26.581 sndtest.c Dumping results: 08:13:26.582 sndtest.c Parameters: clock rate=8000Hz, 80 samples/frame 08:13:26.582 sndtest.c Playback stream report: 08:13:26.582 sndtest.c Duration: 9s.990 08:13:26.582 sndtest.c Frame interval: min=0.029ms, max=67.945ms 08:13:26.582 sndtest.c Jitter: min=9.948ms, avg=26.685ms, max=67.913ms 08:13:26.583 sndtest.c Capture stream report: 08:13:26.583 sndtest.c Duration: 9s.980 08:13:26.583 sndtest.c Frame interval: min=0.092ms, max=63.500ms 08:13:26.583 sndtest.c Jitter: min=9.893ms, avg=26.536ms, max=63.406ms 08:13:26.583 sndtest.c Checking for clock drifts: 08:13:26.583 sndtest.c Sound capture is 80 samples faster than playback at the end of the test (average is 8 samples per second) 08:13:26.583 sndtest.c Test completed with some warnings ======================================================= Call statistics: [DISCONNCTD] To: <sip:192.168.1.156>;tag=3d928773698d4280957744e929d8aa73 Call time: 00h:04m:42s, 1st res in 4587 ms, conn in 4642ms #0 audio PCMA @8kHz, sendrecv, peer=192.168.1.156:4004 SRTP status: Not active Crypto-suite: RX pt=8, last update:00h:00m:01.465s ago total 12.6Kpkt 2.03MB (2.53MB +IP hdr) @avg=57.5Kbps/71.9Kbps pkt loss=249 (1.9%), discrd=0 (0.0%), dup=0 (0.0%), reord=3 (0.0%) (msec) min avg max last dev loss period: 20.000 21.652 100.000 20.000 6.131 jitter : 0.250 8.685 29.000 7.000 3.389 TX pt=8, ptime=20, last update:00h:00m:01.318s ago total 11.8Kpkt 1.89MB (2.37MB +IP hdr) @avg=53.7Kbps/67.2Kbps pkt loss=435 (3.5%), dup=0 (0.0%), reorder=0 (0.0%) (msec) min avg max last dev loss period: 20.000 164.151 1540.000 80.000 41.859 jitter : 0.000 14.582 21.875 12.125 4.515 RTT msec : 3.082 21.143 73.908 14.831 18.172 00:34:55.055 pjsua_media.c ......Call 1: deinitializing media.. 00:34:55.056 pjsua_media.c ........Media stream call01:0 is destroyed 00:34:56.055 pjsua_aud.c Closing sound device after idle for 1 second(s) 00:34:56.055 pjsua_app.c .Turning sound device OFF 00:34:56.055 pjsua_aud.c .Closing default:CARD=imx3stack sound playback device and default:CARD=imx3stack sound capture device Thanks & Regards Varma SVRP From: pjsip-bounces@lists.pjsip.org [mailto:pjsip-bounces@lists.pjsip.org] On Behalf Of Varma Sent: Monday, April 07, 2014 9:04 AM To: pjsip@lists.pjsip.org Subject: [pjsip] PJSIP Audio fades, distorts and inaudible on ARM-i.MX53 Hi, I built PJSIP and run on Freescale ARM i.MX53. The video call works well. The issue is with the audio. The call gets initiated from the i.MX base board to a mobile running the csipsimple android app. The audio is heard properly on the mobile but not on the i.MX board. The audio is heard clearly on for 1-2 secs and it starts to fade out or distorted. Sometimes audio is both distorted and faded. I tried all the steps in the audio troubleshooting as mentioned in the PJSIP website. I checked my sound output by playing an audio file. It plays well. Following steps I tried. 1. Tried using PCMU and PCMA as the board supports only PCM. SPEEX is disabled on the board. 2. Disabled the echo canceller. Did not have any effect on the result. 3. In-call volume to increased 5.0x, 10.0x and went up to 100.0x. Every time I increased this the audio gets worser. 4. Tried forcing 8KHz sample. Still no improvement. Can you suggest what could fix my issue? I could not get the packet statistics. Somehow the TX and RX packet count always shows zero when I use the 'dq' while in call. Thanks & Regards Varma SVRP Technical Lead | Orvito Technologies India Pvt Ltd. M: +91-9032867017 Description: Description: Description: Description: cid:image002.png@01CDD3CC.69D07270 8-2-269/S/41 | Plot No.: 41 | Sagar Society| Banjara Hills | Road No.: 2 | Hyderabad - 500038 www.orvito.com <http://www.orvito.com/> _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org _______________________________________________ Visit our blog: http://blog.pjsip.org pjsip mailing list pjsip@lists.pjsip.org http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org