[Gta04-owner] Voice routing

Dr. H. Nikolaus Schaller hns at goldelico.com
Thu Nov 14 17:10:49 CET 2013

Am 14.11.2013 um 13:39 schrieb Dr. H. Nikolaus Schaller:

> Hi,
> Am 13.11.2013 um 16:46 schrieb Andreas Kemnade:
>> Hi,
>> On Wed, 2013-11-13 at 12:12 +0100, Dr. H. Nikolaus Schaller wrote: 
>>> Hi,
>>> I have started to analyse the voice routing patch for the 3.12.0 kernel
>>> because routing to SoC did not work any more [1].
>>> After removing the patch it worked fine.
>>> With the patch it appears that I have to switch to hw-routing
>>> once and back to SoC to make it work.
>>> This indicates an initialization issue.
>>> What I have done is to replace writing directly to the twl registers
>>> by a call to twl4030_voice_set_tristate() which tries to preserve
>>> as much as possible of the original register contents.
>>> Now, SW routing works in the dial script.
>>> But HW routing does not (neither with old nor new patch). Maybe
>>> I am also just missing something in the mixer settings?
>> http://misc.andi.de1.cc/voice
>> tested with 3.12.0-wip (did uname -a to check what i am running on)
>> hw routing works.
> Hm. First of all I had a problem that 3.12.0-wip / master has a bug in the .config
> so that our gta04 specific and the generic twl4030-audio drivers were compiled into the kernel.
> The result was that we had 5 instead of 4 audio devices.
> But it still does not work.
>> Possible problem: One path (mic->modem or
>> modem->speaker) is not completely in the DAPM route system, so not
>> everything is powered on properly if not enough things are powered on.
> Ah, that is a good hint.
> Maybe nothing is powered on at all unless I run an arecord >/dev/null in the
> background? I.e. the ALSA system does not know that the TWL4030 codec
> and the microphone voltage etc. is to be activated.
> Such a mechanism is certainly available in QtMoko and SHR/FSO code but
> hidden so deeply that one would not find...
>> I think Neil has improved my patch in his kernel to fix that.
> Well, we should have it in the 3.12 since its was a rebase of the 3.7-plus which was
> a rebase on Neil's 3.7 kernel.
> But I don't know...

Now I know. I had removed the code that enables the voice interface correctly.

It works now! Except that there is a lot of echo, but that comes from improper
mixer settings.

Here is the patched 3.12.0 master tree: [1]
Here the latest dial script (missing some mixer settings): [2]

There was also a report b< Ben Deering that the headset jack detection is broken [3].
This may have been fixed in the meantime, but I don't know. Please test.

Generally the 3.12.0 kernel is now almost as useable as the 2.6.32 and
the 3.7 together.

If we finally can improve the power management, we will very soon have
the best kernel we ever had, even a variant for Replicant.


[1]: http://git.goldelico.com/?p=gta04-kernel.git;a=shortlog;h=refs/heads/master
[2]: http://git.goldelico.com/?p=gta04-rootfs.git;a=blob;f=debian/config/root/dial;hb=HEAD
[3]: http://projects.goldelico.com/p/gta04-kernel/issues/482/

More information about the Gta04-owner mailing list