[Letux-kernel] GTA04 voice routing
H. Nikolaus Schaller
hns at goldelico.com
Mon Feb 6 12:26:44 CET 2017
Hi,
I am working on fixing the voice routing with DT
based kernels and it starts to work partially.
I want to share some log...
root at letux:~# amixer set 'Voice route' 'Voice to SoC'
[ 82.491699] voice ctl route: 0
[ 82.499938] devm_pinctrl_get ed460040
[ 82.503906] twl4030_voice_set_tristate codec=ed0bea00 1
[ 82.513488] pinctrl_lookup_state default error -19
Simple mixer control 'Voice route',0
Capabilities: enum
Items: 'Voice to SoC' 'Voice to twl4030'
Item0: 'Voice to SoC'
root at letux:~# amixer set 'Voice route' 'Voice to SoC'
[ 87.971649] voice ctl route: 0
Simple mixer control 'Voice route',0
Capabilities: enum
Items: 'Voice to SoC' 'Voice to twl4030'
Item0: 'Voice to SoC'
root at letux:~# amixer set 'Voice route' 'Voice to twl4030'
[ 90.949249] voice ctl route: 1
[ 90.953491] devm_pinctrl_get ed460040
[ 90.959991] pinctrl_lookup_state tristate error -19
[ 90.967468] twl4030_voice_set_tristate codec=ed0bea00 0
Simple mixer control 'Voice route',0
Capabilities: enum
Items: 'Voice to SoC' 'Voice to twl4030'
Item0: 'Voice to twl4030'
root at letux:~#
What does not yet work is looking up the pinctrl_lookup_state
"default" and "tristate".
The reason we need this is that we have a shared bus for the
PCM data.
For incoming voice the gtm601 module is the master and either
the twl4030 and the McBSP4-DR of the OMAP are clients (or even both).
For outgoing voice we have to make either the twl4030 (where
the microphone is connected to) of the McBSP-DX line the master.
Both potential masters are connected in parallel to the single
PCM input of the gtm601 module.
To avoid data mix and corruption, we have to tri-state either
one. This is already done by the twl4030-codec driver, but
tristating the McBSP-DX line is not as easy. The best solution
appears to be to provide two different pinmux states in the DT
and make the twl4030-codec choose either one.
Next I have to dig into the code to find out where to specify
it in the DT so that it is really found...
But the code itself seems to compile. I will push it later and
provide a link so that you can look inside (needs some cleanup
first).
BR,
Nikolaus
More information about the Letux-kernel
mailing list