[Gta04-owner] [PATCH 4/6] HACK: disable gpio186 check
H. Nikolaus Schaller
hns at goldelico.com
Sun Apr 23 12:31:12 CEST 2017
> Am 23.04.2017 um 12:16 schrieb Andreas Kemnade <andreas at kemnade.info>:
> On Sun, 23 Apr 2017 10:23:59 +0200
> "H. Nikolaus Schaller" <hns at goldelico.com> wrote:
>>> Am 23.04.2017 um 09:36 schrieb Andreas Kemnade <andreas at kemnade.info>:
>>> this forcefully enables hw routing
>>> and removes the check for gpio186 which is
>>> hidden in newer kernels
>>> TODO: add a real check for >= GTA04A4
>> either read /proc/device-tree/model and parse the string
>> or use "rfkill unblock wwan" or "rfkill list wwan".
>> Our rfkill extension for newer kernels should hide modem power control completely,
>> so no user-space software should know about gpio186 or have a need to.
> The script is not about rfkill.
> It is about deciding which set of mixer setting to use.
> The presence of gpio186 was tested to detect hw sound routing.
Ah, now I see.
Then, a much better solution is to check which mixer settings
are available than making it depend on presence of some obscure gpio.
The best idea is to check if hw voice routing controls are available.
Then hw routing can be used.
amixer controls | fgrep ...
But I am not sure if our kernel properly hides them on the GTA04A3 board
which does not support hw voice routing... Or if it presents a dead
So the second best strategy is to
case "$(cat /proc/device-tree/model)" in
*GTA04A[1-3]* ) do something;;
*GTA04A[4-9]* ) do something else;;
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Gta04-owner