OSDN Git Service

ASoC: rt5645: add inv_hp_det flag
authorChris Chiu <chiu@endlessos.org>
Mon, 11 Jan 2021 05:41:40 +0000 (13:41 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 11 Jan 2021 14:03:09 +0000 (14:03 +0000)
commit28c988492cf65626d06ae32d7f20f1596c080667
tree85aed589e8a8035d5514164ff68998d8eda9ffd2
parenta4dae468cfdd90cdb08d96161482c23739dd636a
ASoC: rt5645: add inv_hp_det flag

The ECS EF20EA laptop use gpio for jack detection instead of rt5645
rt5645 JD. However, the GPIO polarity is inverse for hp-detect based
on the _DSD property of the RTK2 device.

Name (_DSD, Package () {
    ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
    Package () {
        Package () {"hp-detect-gpio", Package() {^RTK2, 0, 0, 1 }},
    }
})

This flag will invert the hp-detect gpio polarity.

Signed-off-by: Chris Chiu <chiu@endlessos.org>
Link: https://lore.kernel.org/r/20210111054141.4668-4-chiu@endlessos.org
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/rt5645.h
sound/soc/codecs/rt5645.c