[Gta04-owner] Replicant: Android Echo Cancellation

Lukas Maerdian luk at slyon.de
Sun May 10 11:45:58 CEST 2015


Am 10.05.2015 um 11:34 schrieb Dr. H. Nikolaus Schaller:
> Hi Adrien,
> 
> Am 09.05.2015 um 21:38 schrieb Adrien Dorsaz <adrien at adorsaz.ch
> <mailto:adrien at adorsaz.ch>>:
> 
>> Hi Lukas / gta04-community,
>>
>> I've begun to read Android HAL documentation and I've seen in the
>> Audio topic [0] some notes which can be useful to avoid voice echo :
>>
>>> hardware/libhardware/include/hardware/audio_effect.h - represents
>>> effects that can be applied to audio such as downmixing, echo, or
>>> noise suppression.
>>
>> Just below this comment, Google says us to refer to the Samsung tuna
>> device. So I've checked the Cyanogenmod repository for this device and
>> I've found their audio_effects.conf file.
>>
>> Many audio effects are activated there, but I think we'll need the
>> "Audio Echo Cancellation" (aec) module to resolve the issue about
>> hearing self during voice call. I've noticed the URL of this
>> configuration in that file [1]. Just below this configuration, the
>> "ns" module can also be interesting (Noise Suppression).
>>
>> These configuration make a reference to the 'libaudiopreprocessing.so'
>> file (in the head of the audio_effects.conf) that I've found in my
>> 'out/target/product/gta04/obj/lib' build directory. Maybe we'll be
>> able to make a similar configuration for the GTA04 ?
>>
>> We've just one issue : it's to find the good UUID to set for the
>> effects (which is used to find the good module). We've only this hint:
>>
>>> # The uuid is the implementation specific UUID as specified by the
>>> effect vendor. This is not the
>>> # generic effect type UUID.
>>
>> I hope it has more meaning for someone here ? I have some hope,
>> because I've seen in the libaudioprocessing.so files strings with
>> 'AEC' and 'NS' refering to the module.s
>> We just need the good UUID “as specified by the effect vendor".
> 
> Interesting infos!
> 
> But what could “UUID” mean in this context?
> 
> Generally echo cancellation might be done by a separate DSP or by software.
> 
> The OMAP3 chip has such a built-in DSP, but AFAIK the DSPbridge driver
> by Linux isn’t supported any more.
> AFAIK, nobody has intensively used the DSP on open OMAP3 devices (not on
> BeagleBoard or OpenPanodra).
> 
> So could UUID refer to some firmware that is run by such a DSP? And the
> UUID identifies the filter module?
> Then we would have to develop and provide it and AOSP [0] / [1] only
> chooses which filter should be selected.
> 
> Or, we do it like Radek when he developed a software echo cancellation
> filter for QtMoko. Since you mention ‘libaudiopreprocessing.so’ it could
> be pure software.
> 
> For hardware routing we do not need it at all since the GTM601 also has
> an echo cancellation filter that covers standard delay if the codec is
> connected directly.
> We only need to do something for the software routing because the ALSA
> system introduces significant delays between module and speaker/microphone.

Hi,

I think in our main usecase - hardware voice routing - it is not needed,
as the CPU is not involved in audio processing. This is all done by the
modem module, where we can select different modes and filters.

For the GTA04A3 devices, which use software voice routing it might be
interesting to try out some of the processing effects. We already use a
'resampler' from audio_utils.h here [0]. But up-/downmixing is right now
implemented manually (in the same file). So it might be worth to try if
the up-/downmixing filters in libaudiopreprocessing.so are more
efficient (probably they are).

Best,
  Lukas

[0]
http://git.goldelico.com/?p=gta04-replicant-device.git;a=blob;f=hayes-ril/device/gta04/gsm-voice-route.c;h=b0e5dd42ffbbdf3f2a4734bcd709ac8941047155;hb=refs/heads/replicant-4.2#l291

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20150510/ad85e44d/attachment.asc>


More information about the Gta04-owner mailing list