diff options
author | Hochi Huang <hochi.huang@mediatek.com> | 2014-10-09 11:36:22 +0800 |
---|---|---|
committer | leozwang <leozwang@google.com> | 2014-10-14 10:38:08 -0700 |
commit | f53eaf49df1e1e1c01708919e9e0a046543de9b6 (patch) | |
tree | 01274169d31d750a0a0e08c59aa56bd5b84f3ff2 /services/audiopolicy | |
parent | e86f4be598b1d2c521e2b3fcd05101c3848e93e2 (diff) | |
download | frameworks_av-f53eaf49df1e1e1c01708919e9e0a046543de9b6.zip frameworks_av-f53eaf49df1e1e1c01708919e9e0a046543de9b6.tar.gz frameworks_av-f53eaf49df1e1e1c01708919e9e0a046543de9b6.tar.bz2 |
fix FM no sound issue
Review: https://partner-android-review.git.corp.google.com/#/c/184276
Signed-off-by: Carson Liao <carson.liao@mediatek.com>
Change-Id: I0847c8a6e6d054a9258b52402c914105d902c573
Diffstat (limited to 'services/audiopolicy')
-rw-r--r-- | services/audiopolicy/AudioPolicyInterfaceImpl.cpp | 6 | ||||
-rw-r--r-- | services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/services/audiopolicy/AudioPolicyInterfaceImpl.cpp b/services/audiopolicy/AudioPolicyInterfaceImpl.cpp index 6cd0ac8..dceda97 100644 --- a/services/audiopolicy/AudioPolicyInterfaceImpl.cpp +++ b/services/audiopolicy/AudioPolicyInterfaceImpl.cpp @@ -238,11 +238,13 @@ audio_io_handle_t AudioPolicyService::getInput(audio_source_t inputSource, return 0; } // already checked by client, but double-check in case the client wrapper is bypassed - if (inputSource >= AUDIO_SOURCE_CNT && inputSource != AUDIO_SOURCE_HOTWORD) { + if (inputSource >= AUDIO_SOURCE_CNT && inputSource != AUDIO_SOURCE_HOTWORD && + inputSource != AUDIO_SOURCE_FM_TUNER) { return 0; } - if ((inputSource == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) { + if (((inputSource == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) || + ((inputSource == AUDIO_SOURCE_FM_TUNER) && !captureFmTunerAllowed())) { return 0; } audio_io_handle_t input; diff --git a/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp b/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp index e1e81e1..ac41968 100644 --- a/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp +++ b/services/audiopolicy/AudioPolicyInterfaceImplLegacy.cpp @@ -228,11 +228,13 @@ audio_io_handle_t AudioPolicyService::getInput(audio_source_t inputSource, return 0; } // already checked by client, but double-check in case the client wrapper is bypassed - if (inputSource >= AUDIO_SOURCE_CNT && inputSource != AUDIO_SOURCE_HOTWORD) { + if (inputSource >= AUDIO_SOURCE_CNT && inputSource != AUDIO_SOURCE_HOTWORD && + inputSource != AUDIO_SOURCE_FM_TUNER) { return 0; } - if ((inputSource == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) { + if (((inputSource == AUDIO_SOURCE_HOTWORD) && !captureHotwordAllowed()) || + ((inputSource == AUDIO_SOURCE_FM_TUNER) && !captureFmTunerAllowed())) { return 0; } |