TDM sound device to the pjmedia, how?

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

 



Hi All,

I?ve ported pjproject-1.16 on an embedded platform based on Mediatek MT 7620 CPU running OpenWRT.
(Version 1.16 is rather old but I don?t need video and it seems it covers my needs. ) 
On this platform there is SLIC chip supporting FXS interface to an analog phone. 
The  SLIC has TDM interface to the CPU and I have completed the TDM driver (running in the Linux kernel space) 
which works fine with Asterisk.
     
Now I am trying to test pjsua (or some other basic pjsip user agent? ) so I would like to integrate my driver to pjmedia. 
I?ve checked the very clean pjsip documentation but still I am not fully clear how to approach the project. 

I think using PortAudio or ALSA will overcomplicate my experiment. 

My TDM driver expose ioctl interface which I can use from my pjsua application from the user space. 
I think the best would be to derive the application clock from my tdm driver. 
As far as I understand  I should use ?Sound Device Port Framework? so eventually the application hooks
two callbacks rec_cb and play_cb which are called when my TDM driver has frame of data or needs frame of data. 
I am looking at /pjproject-1.16/pjmedia/src/pjmedia-audiodev/null_dev.c which looks as the simplest starting point I could hack.

However sound devices in pjmedia provide lot of stuff which I don?t think I need. 
For example acoustic echo cancelation. I don?t need that. 
I rather use line echo canceler in my TDM driver which is more important I think for my softphone example.     

>From the other hand the ?Media Ports Framework? looks much cleaner than ?Sound Device Port Framework?. 
For example /pjproject-1.16/pjmedia/src/pjmedia/null_port.c looks much simpler than null_dev.c.
But as far as understand using this framework the application calls the functions get_frame and put_frame so what I could do 
is to block the execution of those functions (using linux system call select() for example)
and return when I get/send the frame data from/to my driver. This way I will get the timings provided from my driver to the pjsua. 
However I am not sure how this will fit with the SIP part of my test softphone.

Anyone willing to clarify if I am on or fully out of track? 

Thanks
Dimitar
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150327/6fd82473/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wlEmoticon-smile[1].png
Type: image/png
Size: 1046 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20150327/6fd82473/attachment.png>


[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