Created
August 5, 2013 20:20
-
-
Save thoemy/6159231 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 8e814e8b6b5980a08d67ef810d0b83115b0a46bc Mon Sep 17 00:00:00 2001 | |
From: Thomas Wendt <[email protected]> | |
Date: Fri, 22 Feb 2013 22:39:17 +0100 | |
Subject: [PATCH] endeavoru: board: Use headset detection voltages from the | |
2.6.29 kernel. | |
This fixes the problem of my HTC not recognized by the phone because the | |
headset "reports" a adc value of 3700 which will be intepreted as | |
HEADSET_UNPLUG. | |
Buttons don't work and mic is not tested. Probably needs more changes from the | |
old kernel. | |
--- | |
arch/arm/mach-tegra/board-endeavoru.c | 23 +++++++++-------------- | |
1 file changed, 9 insertions(+), 14 deletions(-) | |
diff --git a/arch/arm/mach-tegra/board-endeavoru.c b/arch/arm/mach-tegra/board-endeavoru.c | |
index 8e344a1..f4c7ca2 100644 | |
--- a/arch/arm/mach-tegra/board-endeavoru.c | |
+++ b/arch/arm/mach-tegra/board-endeavoru.c | |
@@ -649,7 +649,7 @@ static struct htc_headset_pmic_platform_data htc_headset_pmic_data_xe = { | |
.driver_flag = DRIVER_HS_PMIC_RPC_KEY, | |
.adc_mic_bias = {HS_DEF_MIC_ADC_12_BIT_MIN, | |
HS_DEF_MIC_ADC_12_BIT_MAX}, | |
- .adc_remote = {0, 164, 165, 379, 380, 830}, | |
+ .adc_remote = {0, 125, 126, 330, 331, 710}, | |
}; | |
static struct platform_device htc_headset_pmic_xe = { | |
@@ -664,31 +664,26 @@ static struct headset_adc_config htc_headset_mgr_config_xe[] = { | |
{ | |
.type = HEADSET_UNPLUG, | |
.adc_max = 4095, | |
- .adc_min = 3601, | |
+ .adc_min = 3804, | |
}, | |
{ | |
.type = HEADSET_MIC, | |
- .adc_max = 3600, | |
- .adc_min = 2951, | |
+ .adc_max = 3803, | |
+ .adc_min = 2500, | |
}, | |
{ | |
.type = HEADSET_BEATS, | |
- .adc_max = 2950, | |
- .adc_min = 2101, | |
+ .adc_max = 2499, | |
+ .adc_min = 1800, | |
}, | |
{ | |
.type = HEADSET_BEATS_SOLO, | |
- .adc_max = 2100, | |
- .adc_min = 1500, | |
- }, | |
- { | |
- .type = HEADSET_MIC, | |
- .adc_max = 1499, | |
- .adc_min = 1150, | |
+ .adc_max = 1799, | |
+ .adc_min = 1175, | |
}, | |
{ | |
.type = HEADSET_NO_MIC, | |
- .adc_max = 1149, | |
+ .adc_max = 1174, | |
.adc_min = 0, | |
}, | |
}; | |
-- | |
1.8.4.rc1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment