summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorDheeraj CVR <cvr.dheeraj@gmail.com>2014-03-24 10:15:49 +0530
committerDheeraj CVR <cvr.dheeraj@gmail.com>2014-03-24 10:15:57 +0530
commit6489a2db93143e1f96e42d9e718584f645ab76c8 (patch)
tree85c8c201c3d2c1c5ea71e1ffa56910fbdc8e21d6 /audio
parent0b9ef7aee815199079350c8767b8c31482a05c20 (diff)
downloaddevice_samsung_i9300-6489a2db93143e1f96e42d9e718584f645ab76c8.zip
device_samsung_i9300-6489a2db93143e1f96e42d9e718584f645ab76c8.tar.gz
device_samsung_i9300-6489a2db93143e1f96e42d9e718584f645ab76c8.tar.bz2
i9300: audio: bring back removed microphone fix
http://review.cyanogenmod.org/61104 has reverted http://review.cyanogenmod.org/51085 which has bought back issues with microphone after a voice call. After a voice call, the microphone is either not working or the recorded audio is very faint and not audible. The Input device has to be explicitly set to AUDIO_DEVICE_NONE after a voice call, since force_all_standby() wouldn't work for a voice call usecase. More details about the fix is included in the gerrit comments for the actual patch. Change-Id: I87c63b0ec4390ec3e5703e1de5804c10289ee423
Diffstat (limited to 'audio')
-rw-r--r--audio/audio_hw.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 3376b55..cc09802 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -599,7 +599,19 @@ static void select_mode(struct m0_audio_device *adev)
ril_set_call_clock_sync(&adev->ril, SOUND_CLOCK_STOP);
end_call(adev);
force_all_standby(adev);
+
+ ALOGD("%s: set voicecall route: voicecall_default_disable", __func__);
+ set_bigroute_by_array(adev->mixer, voicecall_default_disable, 1);
+ ALOGD("%s: set voicecall route: default_input_disable", __func__);
+ set_bigroute_by_array(adev->mixer, default_input_disable, 1);
+ ALOGD("%s: set voicecall route: headset_input_disable", __func__);
+ set_bigroute_by_array(adev->mixer, headset_input_disable, 1);
+ ALOGD("%s: set voicecall route: bt_disable", __func__);
+ set_bigroute_by_array(adev->mixer, bt_disable, 1);
+
select_output_device(adev);
+ //Force Input Standby
+ adev->in_device = AUDIO_DEVICE_NONE;
select_input_device(adev);
}
}
@@ -3082,7 +3094,7 @@ static int adev_open(const hw_module_t* module, const char* name,
pthread_mutex_lock(&adev->lock);
adev->mode = AUDIO_MODE_NORMAL;
adev->out_device = AUDIO_DEVICE_OUT_SPEAKER;
- adev->in_device = AUDIO_DEVICE_IN_BUILTIN_MIC & ~AUDIO_DEVICE_BIT_IN;
+ adev->in_device = AUDIO_DEVICE_NONE;
select_devices(adev);
adev->pcm_modem_dl = NULL;