Skip to content

Commit

Permalink
audiopolicy: Fix call recording for legacy qcom HAL
Browse files Browse the repository at this point in the history
Change-Id: I774f75b493c47386ca1eaf004d663432f1041a66
  • Loading branch information
nadlabak committed Mar 23, 2015
1 parent c498eab commit 5a72830
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions services/audiopolicy/AudioPolicyManager.cpp
Expand Up @@ -220,6 +220,11 @@ const StringToEnum sInChannelsNameToEnumTable[] = {
#ifdef AUDIO_EXTN_SSR_ENABLED
STRING_TO_ENUM(AUDIO_CHANNEL_IN_5POINT1),
#endif
#ifdef QCOM_DIRECTTRACK
STRING_TO_ENUM(AUDIO_CHANNEL_IN_VOICE_CALL_MONO),
STRING_TO_ENUM(AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO),
STRING_TO_ENUM(AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO),
#endif
};

const StringToEnum sGainModeNameToEnumTable[] = {
Expand Down Expand Up @@ -1776,28 +1781,22 @@ audio_io_handle_t AudioPolicyManager::getInput(audio_source_t inputSource,
return AUDIO_IO_HANDLE_NONE;
}

/*The below code is intentionally not ported.
It's not needed to update the channel mask based on source because
the source is sent to audio HAL through set_parameters().
For example, if source = VOICE_CALL, does not mean we need to capture two channels.
If the sound recorder app selects AMR as encoding format but source as RX+TX,
we need both in ONE channel. So we use the channels set by the app and use source
to tell the driver what needs to captured (RX only, TX only, or RX+TX ).*/
#ifdef QCOM_DIRECTTRACK
// adapt channel selection to input source
/*switch (inputSource) {
switch (inputSource) {
case AUDIO_SOURCE_VOICE_UPLINK:
channelMask = AUDIO_CHANNEL_IN_VOICE_UPLINK;
channelMask |= AUDIO_CHANNEL_IN_VOICE_UPLINK;
break;
case AUDIO_SOURCE_VOICE_DOWNLINK:
channelMask = AUDIO_CHANNEL_IN_VOICE_DNLINK;
channelMask |= AUDIO_CHANNEL_IN_VOICE_DNLINK;
break;
case AUDIO_SOURCE_VOICE_CALL:
channelMask = AUDIO_CHANNEL_IN_VOICE_UPLINK | AUDIO_CHANNEL_IN_VOICE_DNLINK;
channelMask |= AUDIO_CHANNEL_IN_VOICE_UPLINK | AUDIO_CHANNEL_IN_VOICE_DNLINK;
break;
default:
break;
}
*/
#endif

#ifdef VOICE_CONCURRENCY

Expand Down

0 comments on commit 5a72830

Please sign in to comment.