diff options
-rw-r--r-- | hardware.c | 5 | ||||
-rw-r--r-- | include/hardware/bt_pan.h | 4 | ||||
-rw-r--r-- | include/hardware/qemu_pipe.h | 2 | ||||
-rw-r--r-- | modules/audio/Android.mk | 2 | ||||
-rw-r--r-- | modules/audio_remote_submix/Android.mk | 1 | ||||
-rw-r--r-- | modules/gralloc/Android.mk | 4 | ||||
-rw-r--r-- | modules/gralloc/framebuffer.cpp | 2 | ||||
-rw-r--r-- | modules/gralloc/gr.h | 6 | ||||
-rw-r--r-- | modules/gralloc/gralloc.cpp | 2 | ||||
-rw-r--r-- | modules/gralloc/gralloc_priv.h | 10 | ||||
-rw-r--r-- | modules/gralloc/mapper.cpp | 14 | ||||
-rw-r--r-- | modules/usbaudio/Android.mk | 1 |
12 files changed, 31 insertions, 22 deletions
@@ -28,8 +28,13 @@ #include <utils/Log.h> /** Base path of the hal modules */ +#if defined(__LP64__) +#define HAL_LIBRARY_PATH1 "/system/lib64/hw" +#define HAL_LIBRARY_PATH2 "/vendor/lib64/hw" +#else #define HAL_LIBRARY_PATH1 "/system/lib/hw" #define HAL_LIBRARY_PATH2 "/vendor/lib/hw" +#endif /** * There are a set of variant filename for modules. The form of the filename diff --git a/include/hardware/bt_pan.h b/include/hardware/bt_pan.h index c8b36b4..83e7949 100644 --- a/include/hardware/bt_pan.h +++ b/include/hardware/bt_pan.h @@ -40,8 +40,8 @@ typedef enum { */ typedef void (*btpan_connection_state_callback)(btpan_connection_state_t state, bt_status_t error, const bt_bdaddr_t *bd_addr, int local_role, int remote_role); -typedef void (*btpan_control_state_callback)(btpan_control_state_t state, bt_status_t error, - int local_role, const char* ifname); +typedef void (*btpan_control_state_callback)(btpan_control_state_t state, int local_role, + bt_status_t error, const char* ifname); typedef struct { size_t size; diff --git a/include/hardware/qemu_pipe.h b/include/hardware/qemu_pipe.h index 1a67022..814b20b 100644 --- a/include/hardware/qemu_pipe.h +++ b/include/hardware/qemu_pipe.h @@ -66,6 +66,8 @@ qemu_pipe_open(const char* pipeName) snprintf(buff, sizeof buff, "pipe:%s", pipeName); fd = open("/dev/qemu_pipe", O_RDWR); + if (fd < 0 && errno == ENOENT) + fd = open("/dev/goldfish_pipe", O_RDWR); if (fd < 0) { D("%s: Could not open /dev/qemu_pipe: %s", __FUNCTION__, strerror(errno)); //errno = ENOSYS; diff --git a/modules/audio/Android.mk b/modules/audio/Android.mk index 49ed312..84d8203 100644 --- a/modules/audio/Android.mk +++ b/modules/audio/Android.mk @@ -27,6 +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 include $(BUILD_SHARED_LIBRARY) @@ -39,5 +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 include $(BUILD_SHARED_LIBRARY) diff --git a/modules/audio_remote_submix/Android.mk b/modules/audio_remote_submix/Android.mk index 50c8cb2..d718c76 100644 --- a/modules/audio_remote_submix/Android.mk +++ b/modules/audio_remote_submix/Android.mk @@ -26,5 +26,6 @@ LOCAL_C_INCLUDES += \ LOCAL_SHARED_LIBRARIES := liblog libcutils libutils libnbaio LOCAL_STATIC_LIBRARIES := libmedia_helper LOCAL_MODULE_TAGS := optional +LOCAL_32_BIT_ONLY := true include $(BUILD_SHARED_LIBRARY) diff --git a/modules/gralloc/Android.mk b/modules/gralloc/Android.mk index e1fd7d4..a4ffd20 100644 --- a/modules/gralloc/Android.mk +++ b/modules/gralloc/Android.mk @@ -26,8 +26,8 @@ LOCAL_SRC_FILES := \ gralloc.cpp \ framebuffer.cpp \ mapper.cpp - + LOCAL_MODULE := gralloc.default -LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" +LOCAL_CFLAGS:= -DLOG_TAG=\"gralloc\" -Wno-missing-field-initializers include $(BUILD_SHARED_LIBRARY) diff --git a/modules/gralloc/framebuffer.cpp b/modules/gralloc/framebuffer.cpp index 326f2ae..9d8513a 100644 --- a/modules/gralloc/framebuffer.cpp +++ b/modules/gralloc/framebuffer.cpp @@ -330,7 +330,7 @@ int fb_device_open(hw_module_t const* module, const char* name, if (status >= 0) { int stride = m->finfo.line_length / (m->info.bits_per_pixel >> 3); int format = (m->info.bits_per_pixel == 32) - ? HAL_PIXEL_FORMAT_RGBX_8888 + ? (m->info.red.offset ? HAL_PIXEL_FORMAT_BGRA_8888 : HAL_PIXEL_FORMAT_RGBX_8888) : HAL_PIXEL_FORMAT_RGB_565; const_cast<uint32_t&>(dev->device.flags) = 0; const_cast<uint32_t&>(dev->device.width) = m->info.xres; diff --git a/modules/gralloc/gr.h b/modules/gralloc/gr.h index 3a43aa7..732b6bc 100644 --- a/modules/gralloc/gr.h +++ b/modules/gralloc/gr.h @@ -18,11 +18,7 @@ #define GR_H_ #include <stdint.h> -#ifdef HAVE_ANDROID_OS // just want PAGE_SIZE define -# include <asm/page.h> -#else -# include <sys/user.h> -#endif +#include <sys/user.h> #include <limits.h> #include <sys/cdefs.h> #include <hardware/gralloc.h> diff --git a/modules/gralloc/gralloc.cpp b/modules/gralloc/gralloc.cpp index f832f35..bdc789d 100644 --- a/modules/gralloc/gralloc.cpp +++ b/modules/gralloc/gralloc.cpp @@ -166,7 +166,7 @@ static int gralloc_alloc_framebuffer(alloc_device_t* dev, } static int gralloc_alloc_buffer(alloc_device_t* dev, - size_t size, int usage, buffer_handle_t* pHandle) + size_t size, int /*usage*/, buffer_handle_t* pHandle) { int err = 0; int fd = -1; diff --git a/modules/gralloc/gralloc_priv.h b/modules/gralloc/gralloc_priv.h index 86a5d52..2cd1007 100644 --- a/modules/gralloc/gralloc_priv.h +++ b/modules/gralloc/gralloc_priv.h @@ -75,11 +75,13 @@ struct private_handle_t { int offset; // FIXME: the attributes below should be out-of-line - int base; + uint64_t base __attribute__((aligned(8))); int pid; #ifdef __cplusplus - static const int sNumInts = 6; + static inline int sNumInts() { + return (((sizeof(private_handle_t) - sizeof(native_handle_t))/sizeof(int)) - sNumFds); + } static const int sNumFds = 1; static const int sMagic = 0x3141592; @@ -88,7 +90,7 @@ struct private_handle_t { base(0), pid(getpid()) { version = sizeof(native_handle); - numInts = sNumInts; + numInts = sNumInts(); numFds = sNumFds; } ~private_handle_t() { @@ -98,7 +100,7 @@ struct private_handle_t { static int validate(const native_handle* h) { const private_handle_t* hnd = (const private_handle_t*)h; if (!h || h->version != sizeof(native_handle) || - h->numInts != sNumInts || h->numFds != sNumFds || + h->numInts != sNumInts() || h->numFds != sNumFds || hnd->magic != sMagic) { ALOGE("invalid gralloc handle (at %p)", h); diff --git a/modules/gralloc/mapper.cpp b/modules/gralloc/mapper.cpp index 13baf2a..5a882e2 100644 --- a/modules/gralloc/mapper.cpp +++ b/modules/gralloc/mapper.cpp @@ -43,7 +43,7 @@ pid_t gettid() { return syscall(__NR_gettid);} /*****************************************************************************/ -static int gralloc_map(gralloc_module_t const* module, +static int gralloc_map(gralloc_module_t const* /*module*/, buffer_handle_t handle, void** vaddr) { @@ -56,7 +56,7 @@ static int gralloc_map(gralloc_module_t const* module, ALOGE("Could not mmap %s", strerror(errno)); return -errno; } - hnd->base = intptr_t(mappedAddress) + hnd->offset; + hnd->base = uintptr_t(mappedAddress) + hnd->offset; //ALOGD("gralloc_map() succeeded fd=%d, off=%d, size=%d, vaddr=%p", // hnd->fd, hnd->offset, hnd->size, mappedAddress); } @@ -64,7 +64,7 @@ static int gralloc_map(gralloc_module_t const* module, return 0; } -static int gralloc_unmap(gralloc_module_t const* module, +static int gralloc_unmap(gralloc_module_t const* /*module*/, buffer_handle_t handle) { private_handle_t* hnd = (private_handle_t*)handle; @@ -163,9 +163,9 @@ int terminateBuffer(gralloc_module_t const* module, return 0; } -int gralloc_lock(gralloc_module_t const* module, - buffer_handle_t handle, int usage, - int l, int t, int w, int h, +int gralloc_lock(gralloc_module_t const* /*module*/, + buffer_handle_t handle, int /*usage*/, + int /*l*/, int /*t*/, int /*w*/, int /*h*/, void** vaddr) { // this is called when a buffer is being locked for software @@ -184,7 +184,7 @@ int gralloc_lock(gralloc_module_t const* module, return 0; } -int gralloc_unlock(gralloc_module_t const* module, +int gralloc_unlock(gralloc_module_t const* /*module*/, buffer_handle_t handle) { // we're done with a software buffer. nothing to do in this diff --git a/modules/usbaudio/Android.mk b/modules/usbaudio/Android.mk index 199eb09..2acd171 100644 --- a/modules/usbaudio/Android.mk +++ b/modules/usbaudio/Android.mk @@ -24,6 +24,7 @@ LOCAL_C_INCLUDES += \ external/tinyalsa/include LOCAL_SHARED_LIBRARIES := liblog libcutils libtinyalsa LOCAL_MODULE_TAGS := optional +LOCAL_32_BIT_ONLY := true include $(BUILD_SHARED_LIBRARY) |