OSDN Git Service

ASoC: rt5677: Enable jack detect while DSP is running
authorBen Zhang <benzh@chromium.org>
Wed, 6 Nov 2019 01:13:28 +0000 (17:13 -0800)
committerMark Brown <broonie@kernel.org>
Mon, 11 Nov 2019 13:02:00 +0000 (13:02 +0000)
commit21c00e5df4397870ee835c974bf50570f9d24253
tree1c6abff0adae400cd4d9f0534811bab699e534cc
parent157b006f6be46be833b2941856b86e0a9d8bfb0e
ASoC: rt5677: Enable jack detect while DSP is running

Before a hotword is detected, GPIO1 pin is configured as IRQ
output so that jack detect works. When a hotword is detected,
the DSP firmware configures the GPIO1 pin as GPIO1 and
drives a 1. rt5677_irq() is called after a rising edge on
the GPIO1 pin, due to either jack detect event or hotword
event, or both. All possible events are checked and handled
in rt5677_irq() where GPIO1 pin is configured back to IRQ
output if a hotword is detected.

Signed-off-by: Ben Zhang <benzh@chromium.org>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20191106011335.223061-4-cujomalainey@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/rt5677.c