]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: ams-delta: Take control over audio mute GPIO pins
authorJanusz Krzysztofik <jmkrzyszt@gmail.com>
Sat, 7 Sep 2019 11:16:50 +0000 (13:16 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 9 Sep 2019 09:47:24 +0000 (10:47 +0100)
commitc77472c67930c0683697ed8101c3f7010b3c96c2
treed33afa13587d7917f93d1ba49fe9a6140bd96504
parent37fe15228d1eb835618d9b19acfbb50881e67319
ASoC: ams-delta: Take control over audio mute GPIO pins

Since commit 0b37dce0d8a1 ("ARM: OMAP1: ams-delta: Don't request unused
GPIOs"), on-board audio has appeared muted.  It has been discovered that
believed to be unused GPIO pins "hookflash1" and "hookflash2" need to be
set low for audible sound in handsfree and handset mode respectively.

According to Amstrad E3 wiki, the purpose of both pins hasn't been
clearly identified.  Original Amstrad software used to produce a high
pulse on them when the phone was taken off hook or recall was pressed.
With the current findings, we can assume the pins provide a kind of
audio mute function, separately for handset and handsfree operation
modes.

Commit c8cbe0f48937 ("ARM: OMAP1: ams-delta: Fix audio permanently
muted") attempted to fix the issue temporarily by hogging the GPIO pin
"hookflash1" renamed to "audio_mute", however the fix occurred
incomplete as it restored audible sound only for handsfree mode.

Stop hogging that pin, rename the pins to "handsfree_mute" and
"handset_mute" respectively and implement appropriate DAPM event
callbacks for "Speaker" and "Earpiece" DAPM widgets.

Fixes: 0b37dce0d8a1 ("ARM: OMAP1: ams-delta: Don't request unused GPIOs")
Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20190907111650.15440-1-jmkrzyszt@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
arch/arm/mach-omap1/board-ams-delta.c
sound/soc/ti/ams-delta.c