overcome the sound device

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

 



> Message: 2
> Date: Sat, 14 Apr 2012 09:35:54 +0700
> From: Benny Prijono<bennylp@xxxxxxxxx>
> To: pjsip list<pjsip at lists.pjsip.org>
> Subject: Re: overcome the sound device
> Message-ID:
> 	<CAN6v_a_FikUMh7mUnba1-NGRNMgUWA53nK6pwJxzT+fWFjGArg at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> 2012/4/12 Mario Raffin<raffin at ermes-cctv.com>
>
> Dear All,
>    I trying to use pjsip with an ARM9 architecture with sound device and
> co-processor for echo cancellation and a-law and u-law.
>
> In order to use the co-processor features (echo, a-law, u-law) I see
> different choices:
>
> 1) use audio driver and modify the Sound Device Port to use my echo lib
> and pjmedia for the codecs;
>
> 2) work at the Audio device API abstraction level as for the APS and VAS;
>
> 3) work at the Sound Device port level implementing my own port with
> get_frame and put_frame functions which provide echo cancelled PCM audio
> frames to the conference bridge obtained through the co-processor lib I
> have. Eventually I can the modify pjmedia perform u-law and a-law with the
> coprocessor library;
>
> This last solution appears the simplest but I am not sure about the
> timings. Since the timings are defined by the audio device, how can I make
> sure that the Conference bridge receives frames with a correct cadence? Is
> it sufficent to make a blocking function "get_frame" which for instance
> provides 160 samples each 20ms (at 8Khz)?
>
>
> Yes that should be sufficient. But the problem with solution 1 and 3 is
> they all require modification to pjmedia, with more modifications in
> solution 3 than solution 1. This is not good in the long run and I always
> discourage this. Solution 2 is then the cleanest, you can bunde the
> audio_dev code with your app and register the devices to the audio_dev
> manager at run-time.
>
>   -Benny




Thank you for your detailed answer, Benny.

The idea was to use the strategy 3 with no modifications to pjmedia but it seems not possible since pjmedia try to open the audio driver I have already opened and it returns an error (Unable to find default audio device).

So I would opt for the cleanest solution. While the way to register a new device is well documented, it is still not clear how manage the audio_dev code. Have I to build a new audio driver? It is not clear to me, for instance, how can be used the null_dev.c device in pjmedia-audiodev.
I also wonder if in order to create my new device I have to follow the procedure descibed here:
https://trac.pjsip.org/repos/wiki/External_Sound_Device

Thank you,
mario


-------------- next part --------------
A non-text attachment was scrubbed...
Name: raffin.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20120419/63676fd6/attachment.vcf>


[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