From da0b7d776844f3ddbfbc7c82ed802af33e78c4fe Mon Sep 17 00:00:00 2001 From: Karthik Reddy Katta Date: Mon, 24 Aug 2015 16:11:07 +0530 Subject: audiopolicy: do not update channelMask for voice input source It's not needed to update the channel mask based on source because the source is sent to audio HAL through set_parameters() and if source equal to VOICE_CALL does not mean that two channels need to capture. If recorder app selects AMR as encoding format but source as RX+TX means both RX and TX are captured in ONE channel. So use channels set by the app and use source for the type of capture (RX only, TX only, or RX+TX). Change-Id: Iedf23318356480ba939fc06df4ae4f12906322b3 --- services/audiopolicy/managerdefault/AudioPolicyManager.cpp | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'services') diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp index e7f6864..55c7225 100644 --- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp +++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp @@ -1356,20 +1356,6 @@ status_t AudioPolicyManager::getInputForAttr(const audio_attributes_t *attr, } else { *inputType = API_INPUT_LEGACY; } - // adapt channel selection to input source - switch (inputSource) { - case AUDIO_SOURCE_VOICE_UPLINK: - channelMask = AUDIO_CHANNEL_IN_VOICE_UPLINK; - break; - case AUDIO_SOURCE_VOICE_DOWNLINK: - channelMask = AUDIO_CHANNEL_IN_VOICE_DNLINK; - break; - case AUDIO_SOURCE_VOICE_CALL: - channelMask = AUDIO_CHANNEL_IN_VOICE_UPLINK | AUDIO_CHANNEL_IN_VOICE_DNLINK; - break; - default: - break; - } if (inputSource == AUDIO_SOURCE_HOTWORD) { ssize_t index = mSoundTriggerSessions.indexOfKey(session); if (index >= 0) { -- cgit v1.1