Replacing sound device with a DS

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

 



 
Hi,
Thanks for ur help actually right now m stuck with sm otr wrk bt I will
definitely try ur idea and reply u bak.
Thanks & Regards,
Dinesh Dua
Re: [pjsip] Replacing sound device with a DSRe: [pjsip] Replacing sound
device with a DS
-----Original Message-----
From: pjsip-bounces@xxxxxxxxxxxxxxx [mailto:pjsip-bounces at lists.pjsip.org]
On Behalf Of pjsip-request at lists.pjsip.org
Sent: Tuesday, June 10, 2008 3:47 PM
To: pjsip at lists.pjsip.org
Subject: [!! SPAM] pjsip Digest, Vol 10, Issue 20
 
Send pjsip mailing list submissions to
      pjsip at lists.pjsip.org
 
To subscribe or unsubscribe via the World Wide Web, visit
      http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
or, via email, send a message with subject or body 'help' to
      pjsip-request at lists.pjsip.org
 
You can reach the person managing the list at
      pjsip-owner at lists.pjsip.org
 
When replying, please edit your Subject line so it is more specific
than "Re: Contents of pjsip digest..."
 
 
Today's Topics:
 
   1. Re: Sound Device Iteration (Esben Stien)
   2. Audio Drop Outs with JACK Output (Esben Stien)
   3. Re: Audio Drop Outs with JACK Output (Benny Prijono)
   4. PJSUA: Problems to talk with a PocketPC (Paul Chen)
   5. kofshower wants to keep up with you on Twitter (kofshower)
   6. Re: Replacing sound device with a DSP (Nigel Hsiung)
   7. Re: PJSUA: Problems to talk with a PocketPC (Benny Prijono)
 
 
----------------------------------------------------------------------
 
Message: 1
Date: Mon, 09 Jun 2008 22:30:52 +0200
From: Esben Stien <b0ef@xxxxxxxxxxxxxxxx>
Subject: Re: Sound Device Iteration
To: pjsip at lists.pjsip.org
Message-ID: <87wskyz6yr.fsf at quasar.esben-stien.name>
Content-Type: text/plain; charset=us-ascii
 
"Nanang Izzuddin" <nanang at pjsip.org> writes:
 
> including this file in the makefile 
 
Right. Found the right makefile and placed pa_ringbuffer.o into it. It
now compiled and I had pjsua start up using a JACK device;).
 
Thank you. This very trivial fix should go into SVN.
 
I still have some serious problems now, that I'll address in a new
mail.
 
Thank you.
 
-- 
Esben Stien is b0ef at e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e 
           jid:b0ef@    n     n
 
 
 
------------------------------
 
Message: 2
Date: Mon, 09 Jun 2008 22:53:23 +0200
From: Esben Stien <b0ef@xxxxxxxxxxxxxxxx>
Subject: Audio Drop Outs with JACK Output
To: pjsip at lists.pjsip.org
Message-ID: <87skvmz5x8.fsf at quasar.esben-stien.name>
Content-Type: text/plain; charset=us-ascii
 
As I recently got the portaudio JACK output driver to start up, I see
very heavy CPU usage and hear lots of crackles and pops when I
initiate a call.
 
I start up pjsua with a JACK module and everything is running fine. I
then connect to a server and the CPU load sky rockets to 99%, making
the system very unresponsive and making it hard to kill pjsua. I also
hear lots of audio drop outs.
 
In the terminal I see a whole bunch of messages, like these: 
 
22:36:45.682  strm0x82aa9e4 JB shrinking 1 frame(s), size=16
22:36:46.066  strm0x82aa9e4 Jitter buffer empty (prefetch=14)
22:36:46.173  strm0x82aa9e4 jb updated(2), prefetch=14, size=17
22:36:46.173  strm0x82aa9e4 JB shrinking 1 frame(s), size=16
22:36:46.300  strm0x82aa9e4 JB shrinking 1 frame(s), size=16
22:36:47.665  strm0x82aa9e4 Jitter buffer empty (prefetch=14)
22:36:47.750  strm0x82aa9e4 jb updated(2), prefetch=14, size=16
22:36:47.899  strm0x82aa9e4 JB shrinking 1 frame(s), size=16
22:36:49.274  strm0x82aa9e4 Jitter buffer empty (prefetch=14)
22:36:49.330  strm0x82aa9e4 jb updated(2), prefetch=14, size=15
22:36:53.361  strm0x82aa9e4 jb updated(1), prefetch=13, size=16
22:36:53.361  strm0x82aa9e4 JB shrinking 1 frame(s), size=15
22:36:55.798  strm0x82aa9e4 Lost frame recovered
22:36:55.817  strm0x82aa9e4 Lost frame recovered
22:36:55.835  strm0x82aa9e4 Lost frame recovered
22:36:55.877  strm0x82aa9e4 Lost frame recovered
22:36:57.456  strm0x82aa9e4 jb updated(1), prefetch=12, size=14
22:36:57.498  strm0x82aa9e4 JB shrinking 1 frame(s), size=14
22:37:00.784  strm0x82aa9e4 Jitter buffer empty (prefetch=12)
22:37:00.805  strm0x82aa9e4 jb updated(2), prefetch=14, size=15
 
I also tried using the --play-file command and the same thing happens
here. The CPU load jumps to a high level when I connect the file to
the device with the cc command and drops when I disconnect with the cd
command.
 
I'm also using wengophone with portaudio/JACK and it works close to
perfect.
 
Any pointers as to what I can try?. 
 
-- 
Esben Stien is b0ef at e     s      a             
         http://www. s     t    n m
          irc://irc.  b  -  i  .   e/%23contact
           sip:b0ef@   e     e 
           jid:b0ef@    n     n
 
 
 
------------------------------
 
Message: 3
Date: Mon, 9 Jun 2008 22:40:42 +0100
From: "Benny Prijono" <bennylp@xxxxxxxxx>
Subject: Re: Audio Drop Outs with JACK Output
To: "pjsip list" <pjsip at lists.pjsip.org>
Message-ID:
      <1879720d0806091440u49e8fb98k24d0d098eeec52b at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
 
On Mon, Jun 9, 2008 at 9:53 PM, Esben Stien <b0ef at esben-stien.name> wrote:
> As I recently got the portaudio JACK output driver to start up, I see
> very heavy CPU usage and hear lots of crackles and pops when I
> initiate a call.
> 
 
We have a bit of info on how to optimize CPU usage here:
http://trac.pjsip.org/repos/wiki/audio-check-cpu
 
Cheers
 Benny
 
 
 
------------------------------
 
Message: 4
Date: Mon, 9 Jun 2008 18:19:03 -0700 (PDT)
From: Paul Chen <pocketpc_1@xxxxxxxxx>
Subject: PJSUA: Problems to talk with a PocketPC
To: pjsip at lists.pjsip.org
Message-ID: <993449.73019.qm at web59806.mail.ac4.yahoo.com>
Content-Type: text/plain; charset="iso-8859-1"
 
Hi Benny and others,
When I test the latest PJSUA on a PC (Window XP) with talking to a softphone
on a PocketPC (WinMobile 6), I have the following problems.
?
1. If PocketPC calls the PJSUA, I can hear from the PocketPC side but not
the PJSUA side. (I use SIP calls. To answer the call, I type "a" and then
222 for the code.) After a short period, the connection is closed and get
the msg:
"pjsua_app.c Call 0 is DISCONNECTED [reason=408 (request Time out)]"
?
Do I need to configure PJSUA to hear the audio?
How can I increase the Time out period?
(I already used the "V" command to increase the audio volume.)
?
2. If PJSUA calls the PocketPC, both sides can not hear the audio. I got the
error messages like
"strm00E0378C RTP recv() error Connection reset by peer <WSAECONNRESET>
[err:130054]"
But the PocketPC receives the call.
?
If I use another softphone instead of PJSUA on the PC, above two problems do
not appear.
Thanks your helps in advance.
Paul
 
 
      
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080609/
8dd4e609/attachment-0001.html 
 
------------------------------
 
Message: 5
Date: Tue, 10 Jun 2008 03:45:32 +0000
From: kofshower <kofshower@xxxxxxxxx>
Subject: kofshower wants to keep up with you on Twitter
To: pjsip at pjsip.org
Message-ID:
      <484df8dc8e55_6e39155558e744c04857 at web066.twitter.com.tmail>
Content-Type: text/plain; charset=utf-8
 
To find out more about Twitter, visit the link below:
 
http://twitter.com/i/69dc863a2b1944d7251926d82bfdd4156974a258
 
Thanks,
-The Twitter Team
 
About Twitter
 
Twitter is a unique approach to communication and networking based on the
simple concept of status. What are you doing? What are your friends
doing?right now? With Twitter, you may answer this question over SMS, IM, or
the Web and the responses are shared between contacts.
 
This message was sent by a Twitter user who entered your email address. If
you'd prefer not to receive emails when other people invite you to Twitter,
click here:
http://twitter.com/i/optout/036d3462dd9adcf49a9d773d9a44e6aa1037de9b
 
 
 
------------------------------
 
Message: 6
Date: Tue, 10 Jun 2008 07:31:30 +0000
From: Nigel Hsiung <nigelcz@xxxxxxxxxxx>
Subject: Re: Replacing sound device with a DSP
To: pjsip list <pjsip at lists.pjsip.org>
Message-ID: <BAY119-W52816C2FCE51C5C5BD20F5BFB30 at phx.gbl>
Content-Type: text/plain; charset="big5"
 
 
Hi Dinesh,
 
Is ur DSP running as a separate process?
If yes, u can try these hacks- its ugly but it works.
 
Option A - work with rtp packets,  ur dsp need to be able to encode/decode
rtp packets
Stream.c (pjproject-0.8.0\pjmedia\src\pjmedia)
 
#define MY_DSP
#ifdef MY_DSP
pjmedia_transport *my_rtp_tp = NULL;
 
// callback func called by my IPC client interface to send rtp via pjmedia
// data = 1 rtp packet
void  my_dsp_send_RTP_pkt_to_remote_cb(const void *data, int len){
    if(my_rtp_tp)
         pjmedia_transport_send_rtp(my_rtp_tp, data, len);
}
#endif
 
pjmedia_stream_create(){
 
.......
    /* Success! */
    *p_stream = stream;
#ifdef MY_DSP
       my_dsp_register_send_RTP_pkt_to_remote_cb_func(
&send_RTP_pkt_to_remote_cb )
       my_rtp_tp = pjmedia_stream_get_transport(*p_stream);
#endif
 
    PJ_LOG(5,(THIS_FILE, "Stream %s created", stream->port.info.name.ptr));
    return PJ_SUCCESS;
}
 
pjmedia_stream_destroy( ){
 
    PJ_ASSERT_RETURN(stream != NULL, PJ_EINVAL);
 
#ifdef MY_DSP
    my_dsp_deregister_send_RTP_pkt_to_remote_cb_func();
    my_rtp_tp=NULL; 
#endif
 
.....
}
 
on_rx_rtp( void *data, const void *pkt,  pj_ssize_t bytes_read){
#ifdef MY_DSP
    send_RTP_pkt_to_my_dsp_over_IPC(pkt, bytes_read); 
    return;
#endif
 
....
}
 
Option B -  working with raw pcm, let pjmedia handle rtp and pcm
encoding/decoding. We'll only handle hardware read/write
Null_port.c (pjproject-0.8.0\pjmedia\src\pjmedia)   
 
#ifdef MY_DSP_RAW
void my_dsp_raw_write(void* data, int len){
    // implement ur hardware write 
}
void my_dsp_raw_read(void* data, int len){
     // implement ur hardware read
}
#endif
 
 
null_put_frame(){
 
#ifdef MY_DSP_RAW
    my_dsp_raw_write(frame->buf, frame->size);
#endif
    return PJ_SUCCESS;
}
 
null_get_frame(){
    char stereo_rec_data[320];
    frame->type = PJMEDIA_FRAME_TYPE_AUDIO;
    frame->size = this_port->info.samples_per_frame * 2;
    frame->timestamp.u32.lo += this_port->info.samples_per_frame;
 
#ifdef MY_DSP_RAW
    my_dsp_raw_read(frame->buf, frame->size);
#else
     pjmedia_zero_samples((pj_int16_t*)frame->buf, 
             this_port->info.samples_per_frame);
#endif
 
    return PJ_SUCCESS;
}
 
best,
Nigel
 
ps: Run pjsua with the --null-audio option
 
 
 
 
From: dinesh.dua@xxxxxxxxxxxxx
To: pjsip at lists.pjsip.org
Date: Fri, 6 Jun 2008 10:42:33 +0530
Subject: Replacing sound device with a DSP
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Hi,
 
 
 
I am using JSIP on embedded system in LINUX
having no sound device in which I have to replace sound device with DSP (tdm
which communicate with a slic and analog phone).So voice has to be taken and
passed to this DSP.
 
Please tell me desired modification for this purpose and I will be best
served with source code.
 
 
 
 
 
Thanks,
 
Dinesh Dua
 
 
 
 
 
 
 
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live
Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&;
mkt=en-us
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080610/
21d212cc/attachment-0001.html 
 
------------------------------
 
Message: 7
Date: Tue, 10 Jun 2008 11:17:11 +0100
From: "Benny Prijono" <bennylp@xxxxxxxxx>
Subject: Re: PJSUA: Problems to talk with a PocketPC
To: "pjsip list" <pjsip at lists.pjsip.org>
Message-ID:
      <1879720d0806100317p417a1c00ye4da6269543dbd09 at mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
 
On Tue, Jun 10, 2008 at 2:19 AM, Paul Chen <pocketpc_1 at yahoo.com> wrote:
> Hi Benny and others,
> When I test the latest PJSUA on a PC (Window XP) with talking to a
softphone
> on a PocketPC (WinMobile 6), I have the following problems.
> 
> 1. If PocketPC calls the PJSUA, I can hear from the PocketPC side but not
> the PJSUA side. (I use SIP calls. To answer the call, I type "a" and then
> 222 for the code.) After a short period, the connection is closed and get
> the msg:
> "pjsua_app.c Call 0 is DISCONNECTED [reason=408 (request Time out)]"
> 
> Do I need to configure PJSUA to hear the audio?
> How can I increase the Time out period?
> (I already used the "V" command to increase the audio volume.)
> 
 
Regarding the disconnection, my guess is it's because pjsua doesn't
receive ACK from the PocketPC softphone, so it hangs up the call after
retransmission timeout (about 32 seconds). Is NAT involved with this
scenario? In any case a pjsua log file will certainly help.
 
> 2. If PJSUA calls the PocketPC, both sides can not hear the audio. I got
the
> error messages like
> "strm00E0378C RTP recv() error Connection reset by peer <WSAECONNRESET>
> [err:130054]"
> But the PocketPC receives the call.
> 
 
Not sure why either, but in both cases I guess it must have something
to do with the IP address selection. But if you can show the pjsua log
file I can give it a look.
 
 
> If I use another softphone instead of PJSUA on the PC, above two problems
do
> not appear.
 
Is this with *exactly* the same settings?
 
Cheers
 Benny
 
> Thanks your helps in advance.
> Paul
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
> 
> 
 
 
 
------------------------------
 
_______________________________________________
pjsip mailing list
pjsip at lists.pjsip.org
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
 
 
End of pjsip Digest, Vol 10, Issue 20
*************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20080610/a642a492/attachment-0001.html 


[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