diff options
author | sbrissen <sbrissen@hotmail.com> | 2014-06-02 08:40:02 -0400 |
---|---|---|
committer | sbrissen <sbrissen@hotmail.com> | 2014-06-02 08:41:42 -0400 |
commit | 5b9072dbd377e1c0a1f02b676c29b562b6446621 (patch) | |
tree | 737c48aa5623f96c13136a988a4c84c4eefb2f4a /audio | |
parent | d97054248cdc23aa66b6ede6f2526829849174c0 (diff) | |
download | device_samsung_kona-common-5b9072dbd377e1c0a1f02b676c29b562b6446621.zip device_samsung_kona-common-5b9072dbd377e1c0a1f02b676c29b562b6446621.tar.gz device_samsung_kona-common-5b9072dbd377e1c0a1f02b676c29b562b6446621.tar.bz2 |
kona-common: updates to audio
fixes skype
Change-Id: Ibf15ac3df9273d1bb304f321b7eaf4d5df0ce309
Diffstat (limited to 'audio')
-rwxr-xr-x | audio/audio_hw.c | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/audio/audio_hw.c b/audio/audio_hw.c index eafcd82..66e3d14 100755 --- a/audio/audio_hw.c +++ b/audio/audio_hw.c @@ -324,26 +324,30 @@ void select_devices(struct m0_audio_device *adev) /* Turn on new devices first so we don't glitch due to powerdown... */ for (i = 0; i < adev->num_dev_cfgs; i++) if ((adev->out_device & adev->dev_cfgs[i].mask) && - !(adev->active_out_device & adev->dev_cfgs[i].mask)) + !(adev->active_out_device & adev->dev_cfgs[i].mask) && + !(adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN)) set_route_by_array(adev->mixer, adev->dev_cfgs[i].on, adev->dev_cfgs[i].on_len); for (i = 0; i < adev->num_dev_cfgs; i++) if ((adev->in_device & adev->dev_cfgs[i].mask) && - !(adev->active_in_device & adev->dev_cfgs[i].mask)) + !(adev->active_in_device & adev->dev_cfgs[i].mask) && + (adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN)) set_route_by_array(adev->mixer, adev->dev_cfgs[i].on, adev->dev_cfgs[i].on_len); /* ...then disable old ones. */ for (i = 0; i < adev->num_dev_cfgs; i++) if (!(adev->out_device & adev->dev_cfgs[i].mask) && - (adev->active_out_device & adev->dev_cfgs[i].mask)) + (adev->active_out_device & adev->dev_cfgs[i].mask) && + !(adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN)) set_route_by_array(adev->mixer, adev->dev_cfgs[i].off, adev->dev_cfgs[i].off_len); for (i = 0; i < adev->num_dev_cfgs; i++) if (!(adev->in_device & adev->dev_cfgs[i].mask) && - (adev->active_in_device & adev->dev_cfgs[i].mask)) + (adev->active_in_device & adev->dev_cfgs[i].mask) && + (adev->dev_cfgs[i].mask & AUDIO_DEVICE_BIT_IN)) set_route_by_array(adev->mixer, adev->dev_cfgs[i].off, adev->dev_cfgs[i].off_len); @@ -493,8 +497,9 @@ static void set_incall_device(struct m0_audio_device *adev) device_type = SOUND_AUDIO_PATH_HANDSET; break; case AUDIO_DEVICE_OUT_SPEAKER: - case AUDIO_DEVICE_OUT_AUX_DIGITAL: + case AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET: case AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET: + case AUDIO_DEVICE_OUT_AUX_DIGITAL: device_type = SOUND_AUDIO_PATH_SPEAKER; break; case AUDIO_DEVICE_OUT_WIRED_HEADSET: @@ -587,6 +592,19 @@ static void select_mode(struct m0_audio_device *adev) if (adev->in_call) { adev->in_call = 0; end_call(adev); + + //Force Input Standby + adev->in_device = AUDIO_DEVICE_NONE; + + 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); + force_all_standby(adev); select_output_device(adev); select_input_device(adev); @@ -632,6 +650,12 @@ static void select_output_device(struct m0_audio_device *adev) case AUDIO_DEVICE_OUT_ALL_SCO: ALOGD("%s: AUDIO_DEVICE_OUT_ALL_SCO", __func__); break; + case AUDIO_DEVICE_OUT_USB_ACCESSORY: + ALOGD("%s: AUDIO_DEVICE_OUT_USB_ACCESSORY", __func__); + break; + case AUDIO_DEVICE_OUT_USB_DEVICE: + ALOGD("%s: AUDIO_DEVICE_OUT_USB_DEVICE", __func__); + break; default: ALOGD("%s: AUDIO_DEVICE_OUT_ALL", __func__); break; @@ -2794,7 +2818,7 @@ static const struct { { AUDIO_DEVICE_OUT_SPEAKER, "speaker" }, { AUDIO_DEVICE_OUT_WIRED_HEADSET | AUDIO_DEVICE_OUT_WIRED_HEADPHONE, "headphone" }, { AUDIO_DEVICE_OUT_EARPIECE, "earpiece" }, - { AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET, "analog-dock" }, + { AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET, "analogue-dock" }, { AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, "digital-dock" }, { AUDIO_DEVICE_OUT_ALL_SCO, "sco-out" }, |