summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDheeraj CVR <cvr.dheeraj@gmail.com>2013-09-28 18:24:01 +0530
committertilaksidduram <tilaksidduram@gmail.com>2013-12-03 00:12:01 +0530
commitf841fe4fddbb05a5359299d61feb45e8483f01bd (patch)
treeda3f1075a65a28fd44e40a1d85b17e53343581c1
parentb2342e73b0c319dc028ea807e280c52f70a1806b (diff)
downloaddevice_samsung_n7100-f841fe4fddbb05a5359299d61feb45e8483f01bd.zip
device_samsung_n7100-f841fe4fddbb05a5359299d61feb45e8483f01bd.tar.gz
device_samsung_n7100-f841fe4fddbb05a5359299d61feb45e8483f01bd.tar.bz2
n7100: audio: properly set routing and standby after voice call
Disabling the voice call route using voicecall_default_disable is not sufficient since there are additional routes which are used during a voice call, which have to be properly disabled. Also, set the input device to standy which prevents the mic from not working for the first time after a voice call. This could also serve a potential fix for battery drain issues after voice call. Original Change-Id in i9300 tree: I0acd41deafd49da50857d6fe6396c3b5270d911c Change-Id: Id2a0e4f22baca54b0ae7cf775aff6cf5c5b0bd14
-rw-r--r--audio/audio_hw.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c
index 9ddfeb1..1775acc 100644
--- a/audio/audio_hw.c
+++ b/audio/audio_hw.c
@@ -589,11 +589,18 @@ static void select_mode(struct m0_audio_device *adev)
end_call(adev);
force_all_standby(adev);
- /* Disable voicecall route */
- ALOGE("Disabling voicecall route");
+ ALOGD("%s: set voicecall route: voicecall_default_disable", __func__);
set_voicecall_route_by_array(adev->mixer, voicecall_default_disable, 1);
+ ALOGD("%s: set voicecall route: default_input_disable", __func__);
+ set_voicecall_route_by_array(adev->mixer, default_input_disable, 1);
+ ALOGD("%s: set voicecall route: headset_input_disable", __func__);
+ set_voicecall_route_by_array(adev->mixer, headset_input_disable, 1);
+ ALOGD("%s: set voicecall route: bt_disable", __func__);
+ set_voicecall_route_by_array(adev->mixer, bt_disable, 1);
select_output_device(adev);
+ //Force Input Standby
+ adev->in_device = AUDIO_DEVICE_NONE;
select_input_device(adev);
}
}
@@ -3066,16 +3073,13 @@ 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);
/* +30db boost for mics */
adev->mixer_ctls.mixinl_in1l_volume = mixer_get_ctl_by_name(adev->mixer, "MIXINL IN1L Volume");
adev->mixer_ctls.mixinl_in2l_volume = mixer_get_ctl_by_name(adev->mixer, "MIXINL IN2L Volume");
- /* Disable voicecall route */
- set_voicecall_route_by_array(adev->mixer, voicecall_default_disable, 1);
-
adev->pcm_modem_dl = NULL;
adev->pcm_modem_ul = NULL;
adev->pcm_bt_dl = NULL;