[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:
> Am 13.11.2013 um 16:46 schrieb Andreas Kemnade:
>> On Wed, 2013-11-13 at 12:12 +0100, Dr. H. Nikolaus Schaller wrote:
>>> I have started to analyse the voice routing patch for the 3.12.0 kernel
>>> because routing to SoC did not work any more .
>>> 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?
>> 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
Here is the patched 3.12.0 master tree: 
Here the latest dial script (missing some mixer settings): 
There was also a report b< Ben Deering that the headset jack detection is broken .
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.
More information about the Gta04-owner