summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/audioflinger/Android.mk2
-rw-r--r--services/camera/libcameraservice/Camera2Client.cpp11
-rw-r--r--services/camera/libcameraservice/camera2/ZslProcessor.cpp9
3 files changed, 18 insertions, 4 deletions
diff --git a/services/audioflinger/Android.mk b/services/audioflinger/Android.mk
index 85c2dac9..bd9421ca 100644
--- a/services/audioflinger/Android.mk
+++ b/services/audioflinger/Android.mk
@@ -79,3 +79,5 @@ LOCAL_CFLAGS += -UFAST_TRACKS_AT_NON_NATIVE_SAMPLE_RATE
# LOCAL_CFLAGS += -DAUDIO_WATCHDOG
include $(BUILD_SHARED_LIBRARY)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/services/camera/libcameraservice/Camera2Client.cpp b/services/camera/libcameraservice/Camera2Client.cpp
index 90cba46f..32394837 100644
--- a/services/camera/libcameraservice/Camera2Client.cpp
+++ b/services/camera/libcameraservice/Camera2Client.cpp
@@ -378,7 +378,16 @@ void Camera2Client::disconnect() {
ALOGV("Camera %d: Shutting down", mCameraId);
- stopPreviewL();
+ res = mStreamingProcessor->stopStream();
+ if (res != OK) {
+ ALOGE("%s: Problem stopping streaming: %s (%d)",
+ __FUNCTION__, strerror(-res), res);
+ }
+ res = mDevice->waitUntilDrained();
+ if (res != OK) {
+ ALOGE("%s: Problem waiting for HAL: %s (%d)",
+ __FUNCTION__, strerror(-res), res);
+ }
{
SharedParameters::Lock l(mParameters);
diff --git a/services/camera/libcameraservice/camera2/ZslProcessor.cpp b/services/camera/libcameraservice/camera2/ZslProcessor.cpp
index 52085744..1937955a 100644
--- a/services/camera/libcameraservice/camera2/ZslProcessor.cpp
+++ b/services/camera/libcameraservice/camera2/ZslProcessor.cpp
@@ -254,11 +254,14 @@ status_t ZslProcessor::pushToReprocess(int32_t requestId) {
if (mZslQueueTail != mZslQueueHead) {
CameraMetadata request;
size_t index = mZslQueueTail;
- while (request.isEmpty() && index != mZslQueueHead) {
- request = mZslQueue[index].frame;
+ while (index != mZslQueueHead) {
+ if (!mZslQueue[index].frame.isEmpty()) {
+ request = mZslQueue[index].frame;
+ break;
+ }
index = (index + 1) % kZslBufferDepth;
}
- if (request.isEmpty()) {
+ if (index == mZslQueueHead) {
ALOGV("%s: ZSL queue has no valid frames to send yet.",
__FUNCTION__);
return NOT_ENOUGH_DATA;