[Community] Modify the voice stream of a OpenPhoenux GTA04 mobile phone

Dr. H. Nikolaus Schaller hns at goldelico.com
Fri Aug 10 19:22:41 CEST 2012

Am 10.08.2012 um 19:04 schrieb Wurzer Juergen:

> Hi!
> Has a OpenPhoenux GTA04 mobile phone the possibility to modify/intercept the audio voice stream by an user space process
> for example to realize a answering machine or scramle the voice or hide a message by steganography into the voice
> or anything else.
> For example on an android phone (like galaxy nexus) it seems the voice streams were handled by the baseband processor.
> Since the baseband firmware (radio image) is close sourced and available in binary only, it isn't really possible to
> modify the voice stream.
> Currently I have tried to trace the voice samples on a galaxy nexus with debug messages at kernel and at user space.
> But I only can trace the ring tone, music, ... but not the voice stream.
> Would it be possible with a GTA04 mobile phone to intercept the audio voice stream of a gsm call and modify it?

Yes. The GTA04A3 boards even had only this option to route PCM voice through the CPU.

Basically the audio hardware (microphone, speakers, earpiece, headset) are presented to Linux as a first ALSA sound card. And the PCM audio stream of the phone call as another sound card. Bluetooth headset and FM radio would be two others. Please check with


The latter doing something like:

arecord -fS16_LE -r8000 | aplay -Dhw:1,0 &
arecord -Dhw:1,0 -fS16_LE -r8000 | aplay &

So it is up to user space software to route these streams. So adding an answerphone function is quite simple. Radek had some better code than this arecord|aplay in QtMoko.

The GTA04A4 hardware *can* route PCM directly from the UMTS module to the Audio codec which improves the sound quality, because software routing gave some trouble (delay, echo cancellation, CPU can't easily suspend during a call). I do not know how this is currently handled in the latest 3.x kernels. If there is a ALSA settings switch or something like this to choose between both PCM data paths. The 2.6.32 kernel does not use this direct CPU bypass so far.


More information about the Community mailing list