Accoustic Echo Cancellation: add ec_options to pjmedia_aud_param ???

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

 



Hi Peter,

Thank you so much ! :)
I'll integrate the first patch to CSipSimple trunk and let you know how 
it goes.
I'll probably try to integrate the second patch later after the next 
release of the app ;) since as you said, that's not required in my case.

Thanks again.
Regards,
R?gis

Le 04/05/2011 11:37, Peter Lukac a ?crit :
>
> Hi Regis,
>
> I made patch which should be solve our problem. AEC setting "options" 
> is save
>
> and when device is reopen this setting will be used. But changing AEC with
>
> pjsua_set_ec() while device is open is not safe because module 
> sound_port is not thread safe. Therefore i made second patch which 
> should be solve this problem too...
>
> 01-aec_options.patch
>
> ----------------------------------
>
> - add in file audiodev.h to struct pjmedia_aud_param new member
>
> unsigned ec_options;
>
> - in file sound_port.c is call pjmedia_snd_port_set_ec() with value
>
> "ec_options"
>
> - in pjsua_media.c in method create_aud_param() is load ec_options from
>
> internal pjsua member
>
> - in method pjsua_set_ec() is save ec_options to internal pjsua member
>
> as you see is quite easy patch... i don't add new enum to 
> pjmedia_aud_dev_cap
>
> 02-sound_port_aec_thr_safe.patch
>
> ------------------------------------------------------
>
> recreating new ECHO module while device is open is not thread safe 
> operation because thread from playback or capture use echo module 
> therefore is add
>
> 3 mutex which should be solve this problem.
>
> 1 mutex is for playback thread
>
> 1 mutex is for capture thread
>
> 1 mutex is for setting thread ...for right behaviour if echo is 
> deleteting or creating when is call method 
> pjmedia_snd_port_get_ec_tail() from other thread...if this situation 
> not occured this mutex should be removed
>
> second patch is not needed if you will be adjust AEC before starting 
> application
>
> I hope it will be helpful
>
> regards
>
> > +1
>
> >
>
> > Also did the remark 4 month ago :
>
> > 
> http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/2011-January/012564.
>
> > html - you'll find in this mail the workaround I use with pjsua but 
> I think
>
> > that your problem here is slightly different.
>
> >
>
> > While investigating the problem I found that an evolution adding such an
>
> > extra setting in pjsua would cost a lot of code changes (so the
>
> > workaround was a good solution to solve the problem).
>
> > Adding it to pjmedia_aud_param could be a first step to have it working
>
> > properly in pjsua too :). So +1 for this request ;)
>
> >
>
> > Regards,
>
> > R?gis
>
> >
>
> > Le 29/04/2011 16:49, Peter Lukac a ?crit :
>
> > > hi all,
>
> > > Is possible in future to "pjmedia_aud_param" structure add 
> parameter for
>
> > > "ec_options" ? Because when sound device is open always
>
> > > is call method in sound_port.c start_sound_device() and there is call
>
> > >
>
> > > pjmedia_snd_port_set_ec(snd_port, pool, 
> snd_port->aud_param.ec_tail_ms,
>
> > > 0);
>
> > >
>
> > > with zero options parameter. When application set different algorithm
>
> > > with pjsua_set_ec() this algorithm is not accepted.
>
> > >
>
> > > But in manual is:
>
> > >
>
> > > If the sound device is currently active, and if the device 
> supports AEC,
>
> > > this function will forward the change request to the device and it 
> will
>
> > > be up to the device on whether support the request. If software AEC is
>
> > > being used (the software EC will be used if the device does not 
> support
>
> > > AEC), this function will change the software EC settings. In all 
> cases,
>
> > > the setting will be saved for future opening of the sound device.
>
> > >
>
> > > Setting is saved but is not used.
>
> > >
>
> > >
>
> > > regard
>
>
>
> _______________________________________________
> 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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20110504/13b6f8ac/attachment.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