diff options
author | Naseer Ahmed <naseer@codeaurora.org> | 2014-07-23 17:56:26 -0400 |
---|---|---|
committer | Naseer Ahmed <naseer@codeaurora.org> | 2015-03-02 14:54:49 -0500 |
commit | 7a7b66d1f03997b19ddc0b630dc36850c7826d97 (patch) | |
tree | 721f17316cc829a8009368ca5dc465c135a52a3c /libqservice/QService.cpp | |
parent | 361b88f0c31d90b1966bc7371c2aee3e089185cb (diff) | |
download | display-7a7b66d1f03997b19ddc0b630dc36850c7826d97.tar.gz |
display: Add HDMI CEC HAL
Implement the spec as per
hardware/libhardware/include/hardware/hdmi_cec.h
Change-Id: I02e1ba9deee1007b7e5922c363b9f5d6c6ad82a9
Diffstat (limited to 'libqservice/QService.cpp')
-rw-r--r-- | libqservice/QService.cpp | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/libqservice/QService.cpp b/libqservice/QService.cpp index 12dd9956..52766953 100644 --- a/libqservice/QService.cpp +++ b/libqservice/QService.cpp @@ -50,10 +50,15 @@ QService::~QService() } void QService::connect(const sp<qClient::IQClient>& client) { - ALOGD_IF(QSERVICE_DEBUG,"client connected"); + ALOGD_IF(QSERVICE_DEBUG,"HWC client connected"); mClient = client; } +void QService::connect(const sp<qClient::IQHDMIClient>& client) { + ALOGD_IF(QSERVICE_DEBUG,"HWC client connected"); + mHDMIClient = client; +} + status_t QService::dispatch(uint32_t command, const Parcel* inParcel, Parcel* outParcel) { status_t err = (status_t) FAILED_TRANSACTION; @@ -68,6 +73,25 @@ status_t QService::dispatch(uint32_t command, const Parcel* inParcel, return err; } +void QService::onHdmiHotplug(int connected) { + if(mHDMIClient.get()) { + ALOGD_IF(QSERVICE_DEBUG, "%s: HDMI hotplug", __FUNCTION__); + mHDMIClient->onHdmiHotplug(connected); + } else { + ALOGE("%s: Failed to get a valid HDMI client", __FUNCTION__); + } +} + +void QService::onCECMessageReceived(char *msg, ssize_t len) { + if(mHDMIClient.get()) { + ALOGD_IF(QSERVICE_DEBUG, "%s: CEC message received", __FUNCTION__); + mHDMIClient->onCECMessageRecieved(msg, len); + } else { + ALOGE("%s: Failed to get a valid HDMI client", __FUNCTION__); + } +} + + void QService::init() { if(!sQService) { |