Skip to content

Commit

Permalink
hal: Fix voice call recording for msm8974
Browse files Browse the repository at this point in the history
Voice call recording uses audio-record usecase which causes recording
only devices microphone. Use the correct usecase for call recording.

Change-Id: Iaa9fc30534263c6de9b4b66fa5ffa9a1e2cc8fd4
  • Loading branch information
solk2 authored and intervigilium committed Sep 9, 2014
1 parent f9e14e8 commit aec4394
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions hal/msm8974/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aec4394

Please sign in to comment.