]> asedeno.scripts.mit.edu Git - linux.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)
commit73681f4f1426847b421649c6aa6c2dc303acc7c8
treed33afa13587d7917f93d1ba49fe9a6140bd96504
parent2ec42f3147e1610716f184b02e65d7f493eed925
ASoC: ams-delta: Take control over audio mute GPIO pins

Since commit 1137ceee76ba ("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 2afdb4c41d78 ("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: 1137ceee76ba ("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