Skip to content
Browse files

Smdk4412: Re-add I777 audio hack

  * I777 microphone configuration is swapped compared to I9100
  * It was reverted in the update sound soc and codecs from i9305 drop

Change-Id: Id9260effeb28e383b4a31e76d36a7ccf4b4ef832
Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
  • Loading branch information...
1 parent 827b52d commit c3ed10b39786b90a6720b939d2b1644619092503 @PRJosh PRJosh committed with Gerrit Code Review May 9, 2014
Showing with 32 additions and 2 deletions.
  1. +10 −0 sound/soc/codecs/mc1n2/Kconfig
  2. +22 −2 sound/soc/codecs/mc1n2/mcdriver.c
View
10 sound/soc/codecs/mc1n2/Kconfig
@@ -10,3 +10,13 @@ config SND_SOC_MC1N2_DEBUG
bool "MC-1N2 verbose debug messages while core driver call"
select SND_DEBUG
depends on SND_SOC_MC1N2
+
+config SND_SOC_MC1N2_MIC_ADC_SWAP
+ bool "MC-1N2 Swap microphone ADCs"
+ depends on TARGET_LOCALE_NAATT_TEMP
+ default n
+ help
+ SGH-I777 microphone configuration is swapped compared to GT-I9100.
+ When using I9100 libaudio, this causes the microphones to not
+ work properly in calls. This allows proper microphone operation
+ when SGH-I777 is used with GT-I9100 libaudio.
View
24 sound/soc/codecs/mc1n2/mcdriver.c
@@ -37,7 +37,7 @@ static SINT32 update_clock (const MCDRV_CLOCK_INFO* psClockInfo);
static SINT32 switch_clock (const MCDRV_CLKSW_INFO* psClockInfo);
static SINT32 get_path (MCDRV_PATH_INFO* psPathInfo);
-static SINT32 set_path (const MCDRV_PATH_INFO* psPathInfo);
+static SINT32 set_path (MCDRV_PATH_INFO* psPathInfo);
static SINT32 get_volume (MCDRV_VOL_INFO* psVolInfo);
static SINT32 set_volume (const MCDRV_VOL_INFO *psVolInfo);
@@ -762,6 +762,18 @@ static SINT32 switch_clock
return McDevIf_ExecutePacket();
}
+
+#ifdef CONFIG_SND_SOC_MC1N2_MIC_ADC_SWAP
+void swap_mic_adc_paths(MCDRV_PATH_INFO* psPathInfo)
+{
+ UINT8 temp_state;
+
+ temp_state = psPathInfo->asAdc0[0].abSrcOnOff[0];
+ psPathInfo->asAdc0[0].abSrcOnOff[0] = psPathInfo->asAdc0[1].abSrcOnOff[0];
+ psPathInfo->asAdc0[1].abSrcOnOff[0] = temp_state;
+}
+#endif
+
/****************************************************************************
* get_path
*
@@ -791,6 +803,10 @@ static SINT32 get_path
McResCtrl_GetPathInfoVirtual(psPathInfo);
+#ifdef CONFIG_SND_SOC_MC1N2_MIC_ADC_SWAP
+ swap_mic_adc_paths(psPathInfo);
+#endif
+
return MCDRV_SUCCESS;
}
@@ -809,7 +825,7 @@ static SINT32 get_path
****************************************************************************/
static SINT32 set_path
(
- const MCDRV_PATH_INFO* psPathInfo
+ MCDRV_PATH_INFO* psPathInfo
)
{
SINT32 sdRet = MCDRV_SUCCESS;
@@ -836,6 +852,10 @@ static SINT32 set_path
return sdRet;
}
+#ifdef CONFIG_SND_SOC_MC1N2_MIC_ADC_SWAP
+ swap_mic_adc_paths(psPathInfo);
+#endif
+
McResCtrl_SetPathInfo(psPathInfo);
/* unused analog out volume mute */

0 comments on commit c3ed10b

Please sign in to comment.
Something went wrong with that request. Please try again.