diff options
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/mc1n2/Kconfig | 10 | ||||
-rw-r--r-- | sound/soc/codecs/mc1n2/mcdriver.c | 23 |
2 files changed, 31 insertions, 2 deletions
diff --git a/sound/soc/codecs/mc1n2/Kconfig b/sound/soc/codecs/mc1n2/Kconfig index 2b521c1..91977ee 100644 --- a/sound/soc/codecs/mc1n2/Kconfig +++ b/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. diff --git a/sound/soc/codecs/mc1n2/mcdriver.c b/sound/soc/codecs/mc1n2/mcdriver.c index af3cdc3..417d2ba 100644 --- a/sound/soc/codecs/mc1n2/mcdriver.c +++ b/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,17 @@ 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 +802,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 +824,7 @@ static SINT32 get_path ****************************************************************************/ static SINT32 set_path ( - const MCDRV_PATH_INFO* psPathInfo + MCDRV_PATH_INFO* psPathInfo ) { SINT32 sdRet = MCDRV_SUCCESS; @@ -836,6 +851,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 */ |