summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmit Pundir <amit.pundir@linaro.org>2014-04-21 12:14:16 +0530
committerAmit Pundir <amit.pundir@linaro.org>2014-04-21 12:14:16 +0530
commit572b8e22d78b072c67536daa361ae5c80c7f6ed9 (patch)
tree4f8bcea01c2e7ae9e35490d37df43447270db07d
parent6d1e3a6a26b7ff02b196b7836498bfb8d52c71a3 (diff)
parentc070bad435799b4febdd2acf6be6c191f15f724e (diff)
downloadlibhardware-linaro-juice-master.tar.gz
* aosp/master: usbaudio: allow compiling for 64-bit audio_remote_submix: allow compiling for 64-bit audio: allow compiling for 64-bit keymaster: add flags indicating feature support
-rw-r--r--include/hardware/keymaster.h31
-rw-r--r--modules/audio/Android.mk4
-rw-r--r--modules/audio_remote_submix/Android.mk3
-rw-r--r--modules/audio_remote_submix/audio_hw.cpp12
-rw-r--r--modules/usbaudio/Android.mk2
5 files changed, 40 insertions, 12 deletions
diff --git a/include/hardware/keymaster.h b/include/hardware/keymaster.h
index 67521461..12158bf0 100644
--- a/include/hardware/keymaster.h
+++ b/include/hardware/keymaster.h
@@ -36,11 +36,14 @@ __BEGIN_DECLS
* Settings for "module_api_version" and "hal_api_version"
* fields in the keymaster_module initialization.
*/
-#define KEYMASTER_HEADER_VERSION 2
+#define KEYMASTER_HEADER_VERSION 3
#define KEYMASTER_MODULE_API_VERSION_0_2 HARDWARE_MODULE_API_VERSION(0, 2)
#define KEYMASTER_DEVICE_API_VERSION_0_2 HARDWARE_DEVICE_API_VERSION_2(0, 2, KEYMASTER_HEADER_VERSION)
+#define KEYMASTER_MODULE_API_VERSION_0_3 HARDWARE_MODULE_API_VERSION(0, 3)
+#define KEYMASTER_DEVICE_API_VERSION_0_3 HARDWARE_DEVICE_API_VERSION_2(0, 3, KEYMASTER_HEADER_VERSION)
+
/**
* Flags for keymaster_device::flags
*/
@@ -52,7 +55,31 @@ enum {
* This should not be implemented on anything other than the default
* implementation.
*/
- KEYMASTER_SOFTWARE_ONLY = 0x00000001,
+ KEYMASTER_SOFTWARE_ONLY = 1 << 0,
+
+ /*
+ * This indicates that the key blobs returned via all the primitives
+ * are sufficient to operate on their own without the trusted OS
+ * querying userspace to retrieve some other data. Key blobs of
+ * this type are normally returned encrypted with a
+ * Key Encryption Key (KEK).
+ *
+ * This is currently used by "vold" to know whether the whole disk
+ * encryption secret can be unwrapped without having some external
+ * service started up beforehand since the "/data" partition will
+ * be unavailable at that point.
+ */
+ KEYMASTER_BLOBS_ARE_STANDALONE = 1 << 1,
+
+ /*
+ * Indicates that the keymaster module supports DSA keys.
+ */
+ KEYMASTER_SUPPORTS_DSA = 1 << 2,
+
+ /*
+ * Indicates that the keymaster module supports EC keys.
+ */
+ KEYMASTER_SUPPORTS_EC = 1 << 3,
};
struct keystore_module {
diff --git a/modules/audio/Android.mk b/modules/audio/Android.mk
index 84d82030..a31c85f3 100644
--- a/modules/audio/Android.mk
+++ b/modules/audio/Android.mk
@@ -27,7 +27,7 @@ LOCAL_MODULE_RELATIVE_PATH := hw
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_MODULE_RELATIVE_PATH := hw
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 d718c76f..90da396f 100644
--- a/modules/audio_remote_submix/Android.mk
+++ b/modules/audio_remote_submix/Android.mk
@@ -26,6 +26,7 @@ LOCAL_C_INCLUDES += \
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 9df17b64..433ef6cd 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -271,7 +271,7 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
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 @@ static ssize_t out_write(struct audio_stream_out *stream, const void* buffer,
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 int in_set_sample_rate(struct audio_stream *stream, uint32_t rate)
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 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
}
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 @@ static ssize_t in_read(struct audio_stream_in *stream, void* buffer,
}
- 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 2acd1718..2af78970 100644
--- a/modules/usbaudio/Android.mk
+++ b/modules/usbaudio/Android.mk
@@ -24,7 +24,7 @@ LOCAL_C_INCLUDES += \
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)