Loading tv/cec/1.0/default/HdmiCec.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,7 @@ IHdmiCec* HIDL_FETCH_IHdmiCec(const char* hal) { int ret = 0; const hw_module_t* hw_module = nullptr; ret = hw_get_module (hal, &hw_module); ret = hw_get_module (HDMI_CEC_HARDWARE_MODULE_ID, &hw_module); if (ret == 0) { ret = hdmi_cec_open (hw_module, &hdmi_cec_device); if (ret != 0) { Loading tv/cec/1.0/default/HdmiCec.h +3 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ namespace implementation { using ::android::hardware::tv::cec::V1_0::CecLogicalAddress; using ::android::hardware::tv::cec::V1_0::CecMessage; using ::android::hardware::tv::cec::V1_0::MaxLength; using ::android::hardware::tv::cec::V1_0::HdmiPortInfo; using ::android::hardware::tv::cec::V1_0::IHdmiCec; using ::android::hardware::tv::cec::V1_0::IHdmiCecCallback; Loading Loading @@ -65,7 +66,8 @@ struct HdmiCec : public IHdmiCec { static void eventCallback(const hdmi_event_t* event, void* arg) { if (mCallback != nullptr && event != nullptr) { if (event->type == HDMI_EVENT_CEC_MESSAGE) { size_t length = std::min(event->cec.length, static_cast<size_t>(15)); size_t length = std::min(event->cec.length, static_cast<size_t>(MaxLength::MESSAGE_BODY)); CecMessage cecMessage { .initiator = static_cast<CecLogicalAddress>(event->cec.initiator), .destination = static_cast<CecLogicalAddress>(event->cec.destination), Loading tv/cec/1.0/types.hal +6 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,10 @@ package android.hardware.tv.cec@1.0; enum MaxLength : int32_t { MESSAGE_BODY = 15, }; enum CecDeviceType : int32_t { INACTIVE = -1, TV = 0, Loading Loading @@ -196,8 +200,8 @@ struct CecMessage { /* logical address of receiver */ CecLogicalAddress destination; /* The maximum size of body is 15 as specified in the section 6 of the CEC * Spec 1.4b. Overflowed data must be ignored. */ /* The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in * the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored. */ vec<uint8_t> body; }; Loading Loading
tv/cec/1.0/default/HdmiCec.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -389,7 +389,7 @@ IHdmiCec* HIDL_FETCH_IHdmiCec(const char* hal) { int ret = 0; const hw_module_t* hw_module = nullptr; ret = hw_get_module (hal, &hw_module); ret = hw_get_module (HDMI_CEC_HARDWARE_MODULE_ID, &hw_module); if (ret == 0) { ret = hdmi_cec_open (hw_module, &hdmi_cec_device); if (ret != 0) { Loading
tv/cec/1.0/default/HdmiCec.h +3 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ namespace implementation { using ::android::hardware::tv::cec::V1_0::CecLogicalAddress; using ::android::hardware::tv::cec::V1_0::CecMessage; using ::android::hardware::tv::cec::V1_0::MaxLength; using ::android::hardware::tv::cec::V1_0::HdmiPortInfo; using ::android::hardware::tv::cec::V1_0::IHdmiCec; using ::android::hardware::tv::cec::V1_0::IHdmiCecCallback; Loading Loading @@ -65,7 +66,8 @@ struct HdmiCec : public IHdmiCec { static void eventCallback(const hdmi_event_t* event, void* arg) { if (mCallback != nullptr && event != nullptr) { if (event->type == HDMI_EVENT_CEC_MESSAGE) { size_t length = std::min(event->cec.length, static_cast<size_t>(15)); size_t length = std::min(event->cec.length, static_cast<size_t>(MaxLength::MESSAGE_BODY)); CecMessage cecMessage { .initiator = static_cast<CecLogicalAddress>(event->cec.initiator), .destination = static_cast<CecLogicalAddress>(event->cec.destination), Loading
tv/cec/1.0/types.hal +6 −2 Original line number Diff line number Diff line Loading @@ -16,6 +16,10 @@ package android.hardware.tv.cec@1.0; enum MaxLength : int32_t { MESSAGE_BODY = 15, }; enum CecDeviceType : int32_t { INACTIVE = -1, TV = 0, Loading Loading @@ -196,8 +200,8 @@ struct CecMessage { /* logical address of receiver */ CecLogicalAddress destination; /* The maximum size of body is 15 as specified in the section 6 of the CEC * Spec 1.4b. Overflowed data must be ignored. */ /* The maximum size of body is 15 (MaxLength::MESSAGE_BODY) as specified in * the section 6 of the CEC Spec 1.4b. Overflowed data must be ignored. */ vec<uint8_t> body; }; Loading