Merge pull request #4737 from gdachs/amlogic-cec-driver-fixes

major rework
This commit is contained in:
Stephan Raue 2016-02-20 22:48:48 +01:00
commit 1ecc77ad8b
3 changed files with 1159 additions and 1412 deletions

View File

@ -101,8 +101,8 @@ diff -Nur a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFa
}
diff -Nur a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp
--- a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp 1970-01-01 01:00:00.000000000 +0100
+++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp 2016-02-10 13:54:51.298457229 +0100
@@ -0,0 +1,259 @@
+++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp 2016-02-20 12:46:02.458728701 +0100
@@ -0,0 +1,269 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
@ -339,6 +339,16 @@ diff -Nur a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp b/src/
+
+ if (size > 0)
+ {
+ if (buffer[0] == 0xff) // driver wants us to reread the physical address
+ {
+ if (!IsStopped())
+ {
+ uint16_t iNewAddress = GetPhysicalAddress();
+ m_callback->HandlePhysicalAddressChanged(iNewAddress);
+ }
+ continue;
+ }
+
+ initiator = cec_logical_address(buffer[0] >> 4);
+ destination = cec_logical_address(buffer[0] & 0x0f);
+
@ -364,8 +374,8 @@ diff -Nur a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp b/src/
+#endif // HAVE_AMLOGIC_API
diff -Nur a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h
--- a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h 1970-01-01 01:00:00.000000000 +0100
+++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h 2016-02-10 13:49:16.546310466 +0100
@@ -0,0 +1,105 @@
+++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h 2016-02-20 12:46:02.438728945 +0100
@@ -0,0 +1,104 @@
+#pragma once
+/*
+ * This file is part of the libCEC(R) library.
@ -465,8 +475,7 @@ diff -Nur a/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h b/src/li
+
+ bool m_bLogicalAddressChanged;
+ cec_logical_addresses m_logicalAddresses;
+
+ PLATFORM::CMutex m_mutex;
+ PLATFORM::CMutex m_mutex;
+ int m_fd;
+ };
+};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff