diff --git a/hal/msm8974/platform.c b/hal/msm8974/platform.c index e4dd19f..7749743 100644 --- a/hal/msm8974/platform.c +++ b/hal/msm8974/platform.c @@ -1868,9 +1868,18 @@ int64_t platform_render_latency(audio_usecase_t usecase) int platform_update_usecase_from_source(int source, int usecase) { ALOGV("%s: input source :%d", __func__, source); - if(source == AUDIO_SOURCE_FM_RX_A2DP) - usecase = USECASE_AUDIO_RECORD_FM_VIRTUAL; - return usecase; + switch(source) { + case AUDIO_SOURCE_VOICE_UPLINK: + return USECASE_INCALL_REC_UPLINK; + case AUDIO_SOURCE_VOICE_DOWNLINK: + return USECASE_INCALL_REC_DOWNLINK; + case AUDIO_SOURCE_VOICE_CALL: + return USECASE_INCALL_REC_UPLINK_AND_DOWNLINK; + case AUDIO_SOURCE_FM_RX_A2DP: + return USECASE_AUDIO_RECORD_FM_VIRTUAL; + default: + return usecase; + } } bool platform_listen_update_status(snd_device_t snd_device)