summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2016-05-28 15:40:04 +0100
committerAmaury Pouly <amaury.pouly@gmail.com>2016-05-28 17:12:01 +0200
commit423c64770c04a62e34775c37a7e09a60f6ccbc4c (patch)
tree452df2262be4b56b6b319c479fdbebaf36c76cfa
parent7e00be9a1e149e2ef2f64ff8acae9ebce8169526 (diff)
downloadrockbox-423c647.tar.gz
rockbox-423c647.zip
zenxfi3: fix headphone detection
The adc channel monitored for jack detection does not really have a fixed value when plugged. Instead use the same logic as the OF and simply use a threshold. Change-Id: I1d5270d83eb14decce29a39d8201ea1d1fb4436c
-rw-r--r--firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
index 7d657a1c6a..756231a042 100644
--- a/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
+++ b/firmware/target/arm/imx233/creative-zenxfi3/button-zenxfi3.c
@@ -34,10 +34,10 @@
struct imx233_button_map_t imx233_button_map[] =
{
[I_VDDIO] = IMX233_BUTTON_(VDDIO, VDDIO(3640), "vddio"), /* we need VDDIO for relative */
- IMX233_BUTTON_(HOLD, GPIO(0, 4), "jack", INVERTED),
+ IMX233_BUTTON_(HOLD, GPIO(0, 4), "hold", INVERTED),
IMX233_BUTTON(VOL_DOWN, GPIO(2, 7), "vol_down", INVERTED),
IMX233_BUTTON(VOL_UP, GPIO(2, 8), "vol_up", INVERTED),
- IMX233_BUTTON_(JACK, LRADC_REL(5, 3520, I_VDDIO), "jack"),
+ IMX233_BUTTON_(JACK, LRADC_EX(5, GT, 2000, I_VDDIO, 0), "jack"),
IMX233_BUTTON(POWER, PSWITCH(1), "power"),
IMX233_BUTTON_(END, END(), "")
};