summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
Diffstat (limited to 'services')
-rw-r--r--services/audiopolicy/AudioPolicyManager.cpp20
-rw-r--r--services/camera/libcameraservice/api1/client2/Parameters.cpp6
-rw-r--r--services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp2
3 files changed, 27 insertions, 1 deletions
diff --git a/services/audiopolicy/AudioPolicyManager.cpp b/services/audiopolicy/AudioPolicyManager.cpp
index 76acc41..8bb35f9 100644
--- a/services/audiopolicy/AudioPolicyManager.cpp
+++ b/services/audiopolicy/AudioPolicyManager.cpp
@@ -6322,6 +6322,10 @@ void AudioPolicyManager::AudioPort::loadGains(cnode *root)
status_t AudioPolicyManager::AudioPort::checkExactSamplingRate(uint32_t samplingRate) const
{
+ if (mSamplingRates.isEmpty()) {
+ return NO_ERROR;
+ }
+
for (size_t i = 0; i < mSamplingRates.size(); i ++) {
if (mSamplingRates[i] == samplingRate) {
return NO_ERROR;
@@ -6333,6 +6337,10 @@ status_t AudioPolicyManager::AudioPort::checkExactSamplingRate(uint32_t sampling
status_t AudioPolicyManager::AudioPort::checkCompatibleSamplingRate(uint32_t samplingRate,
uint32_t *updatedSamplingRate) const
{
+ if (mSamplingRates.isEmpty()) {
+ return NO_ERROR;
+ }
+
// Search for the closest supported sampling rate that is above (preferred)
// or below (acceptable) the desired sampling rate, within a permitted ratio.
// The sampling rates do not need to be sorted in ascending order.
@@ -6391,6 +6399,10 @@ status_t AudioPolicyManager::AudioPort::checkCompatibleSamplingRate(uint32_t sam
status_t AudioPolicyManager::AudioPort::checkExactChannelMask(audio_channel_mask_t channelMask) const
{
+ if (mChannelMasks.isEmpty()) {
+ return NO_ERROR;
+ }
+
for (size_t i = 0; i < mChannelMasks.size(); i++) {
if (mChannelMasks[i] == channelMask) {
return NO_ERROR;
@@ -6402,6 +6414,10 @@ status_t AudioPolicyManager::AudioPort::checkExactChannelMask(audio_channel_mask
status_t AudioPolicyManager::AudioPort::checkCompatibleChannelMask(audio_channel_mask_t channelMask)
const
{
+ if (mChannelMasks.isEmpty()) {
+ return NO_ERROR;
+ }
+
const bool isRecordThread = mType == AUDIO_PORT_TYPE_MIX && mRole == AUDIO_PORT_ROLE_SINK;
for (size_t i = 0; i < mChannelMasks.size(); i ++) {
// FIXME Does not handle multi-channel automatic conversions yet
@@ -6425,6 +6441,10 @@ status_t AudioPolicyManager::AudioPort::checkCompatibleChannelMask(audio_channel
status_t AudioPolicyManager::AudioPort::checkFormat(audio_format_t format) const
{
+ if (mFormats.isEmpty()) {
+ return NO_ERROR;
+ }
+
for (size_t i = 0; i < mFormats.size(); i ++) {
if (mFormats[i] == format) {
return NO_ERROR;
diff --git a/services/camera/libcameraservice/api1/client2/Parameters.cpp b/services/camera/libcameraservice/api1/client2/Parameters.cpp
index 234247b..4f4cfb0 100644
--- a/services/camera/libcameraservice/api1/client2/Parameters.cpp
+++ b/services/camera/libcameraservice/api1/client2/Parameters.cpp
@@ -596,6 +596,10 @@ status_t Parameters::initialize(const CameraMetadata *info, int deviceVersion) {
supportedSceneModes +=
CameraParameters::SCENE_MODE_BARCODE;
break;
+ case ANDROID_CONTROL_SCENE_MODE_HDR:
+ supportedSceneModes +=
+ CameraParameters::SCENE_MODE_HDR;
+ break;
default:
ALOGW("%s: Camera %d: Unknown scene mode value: %d",
__FUNCTION__, cameraId,
@@ -2386,6 +2390,8 @@ int Parameters::sceneModeStringToEnum(const char *sceneMode) {
ANDROID_CONTROL_SCENE_MODE_CANDLELIGHT :
!strcmp(sceneMode, CameraParameters::SCENE_MODE_BARCODE) ?
ANDROID_CONTROL_SCENE_MODE_BARCODE:
+ !strcmp(sceneMode, CameraParameters::SCENE_MODE_HDR) ?
+ ANDROID_CONTROL_SCENE_MODE_HDR:
-1;
}
diff --git a/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp b/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp
index f110b66..470a6d6 100644
--- a/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp
+++ b/services/camera/libcameraservice/api1/client2/ZslProcessor3.cpp
@@ -592,7 +592,7 @@ nsecs_t ZslProcessor3::getCandidateTimestampLocked(size_t* metadataIdx) const {
if (afState != ANDROID_CONTROL_AF_STATE_PASSIVE_FOCUSED &&
afState != ANDROID_CONTROL_AF_STATE_FOCUSED_LOCKED &&
afState != ANDROID_CONTROL_AF_STATE_NOT_FOCUSED_LOCKED) {
- ALOGW("%s: ZSL queue frame AF state is %d is not good for capture, skip it",
+ ALOGVV("%s: ZSL queue frame AF state is %d is not good for capture, skip it",
__FUNCTION__, afState);
continue;
}