diff options
author | Naseer Ahmed <naseer@codeaurora.org> | 2015-02-24 15:33:23 -0500 |
---|---|---|
committer | Naseer Ahmed <naseer@codeaurora.org> | 2015-03-02 14:54:50 -0500 |
commit | 44e8a9a492285bb84536f07e97b06b9ddadc0b3a (patch) | |
tree | 495d911ad7ce54dccda6ece9aebcaadb96485f31 /hdmi_cec | |
parent | f51812cc9d2d55a37c2e3e59a68797ddd0bb8dcd (diff) | |
download | display-44e8a9a492285bb84536f07e97b06b9ddadc0b3a.tar.gz |
cec: Fixes for 8994
* 64-bit - Use LOCAL_MODULE_RELATIVE_PATH to copy the hal lib to lib64
* Reduce logspam
Change-Id: I50c6eb5814eb1b1a2b4c9ef2d1fca3604bb32a8c
Diffstat (limited to 'hdmi_cec')
-rw-r--r-- | hdmi_cec/Android.mk | 2 | ||||
-rw-r--r-- | hdmi_cec/qhdmi_cec.cpp | 10 |
2 files changed, 8 insertions, 4 deletions
diff --git a/hdmi_cec/Android.mk b/hdmi_cec/Android.mk index a605b6b1..ed06da17 100644 --- a/hdmi_cec/Android.mk +++ b/hdmi_cec/Android.mk @@ -3,7 +3,7 @@ include $(LOCAL_PATH)/../common.mk include $(CLEAR_VARS) LOCAL_MODULE := hdmi_cec.$(TARGET_BOARD_PLATFORM) -LOCAL_MODULE_PATH := $(TARGET_OUT_SHARED_LIBRARIES)/hw +LOCAL_MODULE_RELATIVE_PATH := hw LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES := $(common_includes) LOCAL_SHARED_LIBRARIES := $(common_libs) libqservice libbinder libqdutils diff --git a/hdmi_cec/qhdmi_cec.cpp b/hdmi_cec/qhdmi_cec.cpp index c6ae97b0..6e46254b 100644 --- a/hdmi_cec/qhdmi_cec.cpp +++ b/hdmi_cec/qhdmi_cec.cpp @@ -27,7 +27,7 @@ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#define DEBUG 1 +#define DEBUG 0 #define ATRACE_TAG (ATRACE_TAG_GRAPHICS | ATRACE_TAG_HAL) #include <cstdlib> #include <cutils/log.h> @@ -65,6 +65,7 @@ enum { //Forward declarations static void cec_close_context(cec_context_t* ctx __unused); static int cec_enable(cec_context_t *ctx, int enable); +static int cec_is_connected(const struct hdmi_cec_device* dev, int port_id); static ssize_t read_node(const char *path, char *data) { @@ -171,7 +172,7 @@ static int cec_add_logical_address(const struct hdmi_cec_device* dev, //XXX: We can get multiple logical addresses here but we can only send one //to the driver. Store locally for now ssize_t err = write_int_to_node(ctx, "cec/logical_addr", addr); - ALOGD_IF(DEBUG, "%s: Allocated logical address: %d ", __FUNCTION__, addr); + ALOGI("%s: Allocated logical address: %d ", __FUNCTION__, addr); return (int) err; } @@ -206,6 +207,9 @@ static int cec_send_message(const struct hdmi_cec_device* dev, const cec_message_t* msg) { ATRACE_CALL(); + if(cec_is_connected(dev, 0) <= 0) + return HDMI_RESULT_FAIL; + cec_context_t* ctx = (cec_context_t*)(dev); ALOGD_IF(DEBUG, "%s: initiator: %d destination: %d length: %u", __FUNCTION__, msg->initiator, msg->destination, @@ -254,7 +258,7 @@ static int cec_send_message(const struct hdmi_cec_device* dev, if (err < 0) { if (err == -ENXIO) { - ALOGE("%s: No device exists with the destination address", + ALOGI("%s: No device exists with the destination address", __FUNCTION__); return HDMI_RESULT_NACK; } else if (err == -EAGAIN) { |