Merge "Hardware: Fingerprint: Move the HAL to an async model, add some vendor requested functionality."
diff --git a/modules/audio/Android.mk b/modules/audio/Android.mk
index 84d8203..a31c85f 100644
--- a/modules/audio/Android.mk
+++ b/modules/audio/Android.mk
@@ -27,7 +27,7 @@
LOCAL_SRC_FILES := audio_hw.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
-LOCAL_32_BIT_ONLY := true
+LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
@@ -40,6 +40,6 @@
LOCAL_SRC_FILES := audio_policy.c
LOCAL_SHARED_LIBRARIES := liblog libcutils
LOCAL_MODULE_TAGS := optional
-LOCAL_32_BIT_ONLY := true
+LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
diff --git a/modules/audio_remote_submix/Android.mk b/modules/audio_remote_submix/Android.mk
index d718c76..90da396 100644
--- a/modules/audio_remote_submix/Android.mk
+++ b/modules/audio_remote_submix/Android.mk
@@ -26,6 +26,7 @@
LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libnbaio
LOCAL_STATIC_LIBRARIES := libmedia_helper
LOCAL_MODULE_TAGS := optional
-LOCAL_32_BIT_ONLY := true
+LOCAL_CFLAGS := -Wno-unused-parameter
+
include $(BUILD_SHARED_LIBRARY)
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index 6b14aa5..22e2dbf 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -271,7 +271,7 @@
return 0;
} else {
// write() returned UNDERRUN or WOULD_BLOCK, retry
- ALOGE("out_write() write to pipe returned unexpected %d", written_frames);
+ ALOGE("out_write() write to pipe returned unexpected %zd", written_frames);
written_frames = sink->write(buffer, frames);
}
}
@@ -281,10 +281,10 @@
pthread_mutex_unlock(&out->dev->lock);
if (written_frames < 0) {
- ALOGE("out_write() failed writing to pipe with %d", written_frames);
+ ALOGE("out_write() failed writing to pipe with %zd", written_frames);
return 0;
} else {
- ALOGV("out_write() wrote %lu bytes)", written_frames * frame_size);
+ ALOGV("out_write() wrote %zu bytes)", written_frames * frame_size);
return written_frames * frame_size;
}
}
@@ -327,7 +327,7 @@
static size_t in_get_buffer_size(const struct audio_stream *stream)
{
const struct submix_stream_in *in = reinterpret_cast<const struct submix_stream_in *>(stream);
- ALOGV("in_get_buffer_size() returns %u",
+ ALOGV("in_get_buffer_size() returns %zu",
in->dev->config.period_size * audio_stream_frame_size(stream));
return in->dev->config.period_size * audio_stream_frame_size(stream);
}
@@ -449,7 +449,7 @@
}
if (remaining_frames > 0) {
- ALOGV(" remaining_frames = %d", remaining_frames);
+ ALOGV(" remaining_frames = %zu", remaining_frames);
memset(((char*)buffer)+ bytes - (remaining_frames * frame_size), 0,
remaining_frames * frame_size);
}
@@ -488,7 +488,7 @@
}
- ALOGV("in_read returns %d", bytes);
+ ALOGV("in_read returns %zu", bytes);
return bytes;
}
diff --git a/modules/usbaudio/Android.mk b/modules/usbaudio/Android.mk
index 2acd171..2af7897 100644
--- a/modules/usbaudio/Android.mk
+++ b/modules/usbaudio/Android.mk
@@ -24,7 +24,7 @@
external/tinyalsa/include
LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa
LOCAL_MODULE_TAGS := optional
-LOCAL_32_BIT_ONLY := true
+LOCAL_CFLAGS := -Wno-unused-parameter
include $(BUILD_SHARED_LIBRARY)
diff --git a/tests/camera2/CameraBurstTests.cpp b/tests/camera2/CameraBurstTests.cpp
index 51a6b0e..65ff460 100644
--- a/tests/camera2/CameraBurstTests.cpp
+++ b/tests/camera2/CameraBurstTests.cpp
@@ -15,6 +15,7 @@
*/
#include <gtest/gtest.h>
+#include <inttypes.h>
#define LOG_TAG "CameraBurstTest"
//#define LOG_NDEBUG 0
@@ -218,7 +219,7 @@
CameraMetadata tmpRequest = previewRequest;
ASSERT_EQ(OK, tmpRequest.update(ANDROID_SENSOR_EXPOSURE_TIME,
&exposures[i], 1));
- ALOGV("Submitting capture request %d with exposure %lld", i,
+ ALOGV("Submitting capture request %d with exposure %"PRId64, i,
exposures[i]);
dout << "Capture request " << i << " exposure is "
<< (exposures[i]/1e6f) << std::endl;
@@ -230,7 +231,7 @@
float brightnesses[CAMERA_FRAME_BURST_COUNT];
// Get each frame (metadata) and then the buffer. Calculate brightness.
for (int i = 0; i < CAMERA_FRAME_BURST_COUNT; ++i) {
- ALOGV("Reading capture request %d with exposure %lld", i, exposures[i]);
+ ALOGV("Reading capture request %d with exposure %"PRId64, i, exposures[i]);
ASSERT_EQ(OK, mDevice->waitForNextFrame(CAMERA_FRAME_TIMEOUT));
ALOGV("Reading capture request-1 %d", i);
CaptureResult result;
@@ -613,7 +614,7 @@
&durationList[i], 1));
ASSERT_EQ(OK, tmpRequest.update(ANDROID_SENSOR_SENSITIVITY,
&sensitivityList[i], 1));
- ALOGV("Submitting capture %d with exposure %lld, frame duration %lld, sensitivity %d",
+ ALOGV("Submitting capture %zu with exposure %"PRId64", frame duration %"PRId64", sensitivity %d",
i, expList[i], durationList[i], sensitivityList[i]);
dout << "Capture request " << i <<
": exposure is " << (expList[i]/1e6f) << " ms" <<
@@ -631,7 +632,7 @@
// Get each frame (metadata) and then the buffer. Calculate brightness.
for (size_t i = 0; i < expList.size(); ++i) {
- ALOGV("Reading request %d", i);
+ ALOGV("Reading request %zu", i);
dout << "Waiting for capture " << i << ": " <<
" exposure " << (expList[i]/1e6f) << " ms," <<
" frame duration " << (durationList[i]/1e6f) << " ms," <<
@@ -644,10 +645,10 @@
if (durationList[i] * 2 > waitLimit) waitLimit = durationList[i] * 2;
ASSERT_EQ(OK, mDevice->waitForNextFrame(waitLimit));
- ALOGV("Reading capture request-1 %d", i);
+ ALOGV("Reading capture request-1 %zu", i);
CaptureResult result;
ASSERT_EQ(OK, mDevice->getNextResult(&result));
- ALOGV("Reading capture request-2 %d", i);
+ ALOGV("Reading capture request-2 %zu", i);
ASSERT_EQ(OK, mFrameListener->waitForFrame(CAMERA_FRAME_TIMEOUT));
ALOGV("We got the frame now");
@@ -668,7 +669,7 @@
avgBrightness = 255;
}
- ALOGV("Total brightness for frame %d was %lld (underexposed %d, "
+ ALOGV("Total brightness for frame %zu was %lld (underexposed %d, "
"overexposed %d), avg %f", i, brightness, underexposed,
overexposed, avgBrightness);
dout << "Average brightness (frame " << i << ") was " << avgBrightness
@@ -711,7 +712,7 @@
if (dumpFrames) {
String8 dumpName =
- String8::format("/data/local/tmp/camera2_test_variable_burst_frame_%03d.yuv", i);
+ String8::format("/data/local/tmp/camera2_test_variable_burst_frame_%03zu.yuv", i);
dout << " Writing YUV dump to " << dumpName << std::endl;
DumpYuvToFile(dumpName, imgBuffer);
}
diff --git a/tests/camera2/CameraMultiStreamTests.cpp b/tests/camera2/CameraMultiStreamTests.cpp
index c7db679..536b656 100644
--- a/tests/camera2/CameraMultiStreamTests.cpp
+++ b/tests/camera2/CameraMultiStreamTests.cpp
@@ -14,6 +14,7 @@
* limitations under the License.
*/
+#include <inttypes.h>
#define LOG_TAG "CameraMultiStreamTest"
//#define LOG_NDEBUG 0
#include "CameraStreamFixture.h"
@@ -355,7 +356,7 @@
ASSERT_EQ(OK, request.update(ANDROID_SENSOR_EXPOSURE_TIME, &exposures[i], 1));
ASSERT_EQ(OK, request.update(ANDROID_SENSOR_SENSITIVITY, &sensitivities[i], 1));
ASSERT_EQ(OK, mDevice->capture(request));
- ALOGV("Submitting request with: id %d with exposure %lld, sensitivity %d",
+ ALOGV("Submitting request with: id %d with exposure %"PRId64", sensitivity %d",
*requestIdStart, exposures[i], sensitivities[i]);
if (CAMERA_MULTI_STREAM_DEBUGGING) {
request.dump(STDOUT_FILENO);
@@ -370,7 +371,7 @@
// Set wait limit based on expected frame duration.
int64_t waitLimit = CAMERA_FRAME_TIMEOUT;
for (size_t i = 0; i < requestCount; i++) {
- ALOGV("Reading request result %d", i);
+ ALOGV("Reading request result %zu", i);
/**
* Raise the timeout to be at least twice as long as the exposure
@@ -396,7 +397,7 @@
}
} while (resultRequestId != targetRequestId);
targetRequestId++;
- ALOGV("Got capture burst result for request %d", i);
+ ALOGV("Got capture burst result for request %zu", i);
// Validate capture result
if (CAMERA_MULTI_STREAM_DEBUGGING) {
@@ -415,7 +416,7 @@
captureBurstTimes.push_back(systemTime());
CpuConsumer::LockedBuffer imgBuffer;
ASSERT_EQ(OK, consumer->lockNextBuffer(&imgBuffer));
- ALOGV("Got capture buffer for request %d", i);
+ ALOGV("Got capture buffer for request %zu", i);
/**
* TODO: Validate capture buffer. Current brightness calculation
@@ -527,7 +528,7 @@
minFrameDuration = DEFAULT_FRAME_DURATION;
}
- ALOGV("targeted minimal frame duration is: %lldns", minFrameDuration);
+ ALOGV("targeted minimal frame duration is: %"PRId64"ns", minFrameDuration);
data = &(availableJpegSizes.data.i32[0]);
count = availableJpegSizes.count;
@@ -647,7 +648,7 @@
ASSERT_EQ(OK, previewRequest.update(
ANDROID_SENSOR_EXPOSURE_TIME,
&exposures[i], 1));
- ALOGV("Submitting preview request %d with exposure %lld",
+ ALOGV("Submitting preview request %zu with exposure %"PRId64,
i, exposures[i]);
ASSERT_EQ(OK, mDevice->setStreamingRequest(previewRequest));