[Gta04-owner] Routing UMTS sound

Neil Jerram neil at ossau.homelinux.net
Fri Nov 30 01:29:35 CET 2012

Radek Polak <psonek2 at seznam.cz> writes:

> On Sunday 01 January 2012 09:14:14 NeilBrown wrote:
>> I would suggest trying to set up pulseaudio to do the routing.
>>   pactl load-module module-loopback   \
>>        source=alsa_input.platform-soc-audio.0.analog-stereo  \
>>        sink=alsa_output.platform-soc-audio.1.analog-mono \
>>        rate=8000
>>   pactl load-module module-loopback \
>>        source=alsa_input.platform-soc-audio.1.analog-mono \
>>        sink=alsa_output.platform-soc-audio.0.analog-stereo \
>>        rate=8000

> It prints no error but it does nothing. I think your commands are ok, but 
> maybe there is some problem with pulse audio and the alsa SOC driver.
> I tried it on my PC and after loading loopback module all sounds were routed 
> from mic to speakers so that i could hear echo. For some reason this does not 
> work on GTA04 - even when i tried to connect the internal soundcard input to 
> internal soundcard output.

A mere 10 months after the above emails... :-)

I'm happy to report that I just had this approach working - i.e. using
pulseaudio and those 'pactl ...' lines to route the media during a phone

I think the trick is just to change pulseaudio's default resampling
method.  Normally it's speex-float-3, but that performs very badly on
the ARMEL architecture - meaning that there's basically no sound
transfer at all.  Switching to speex-fixed-3 (in /etc/pulse/daemon.conf)
gives clear sound.

(FWIW, the 'trivial' resampler also gives fairly clear sound, but makes
the voice sound tinny or robotic.)

I say 'I think' because I made some other changes before discovering
that - notably upgrading to the testing version of pulseaudio - so it's
possible that there's something there that is needed as well as the
speex-fixed-3 change.

There's still some work to do to pin that down and to integrate it all
nicely - but I hope this will be the way forward for completely reliable
audio routing for A3 phones.  (In QtMoko.  SHR use alsaloop, which I
presume is also pretty reliable.)


More information about the Gta04-owner mailing list