mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-27 20:56:55 +00:00
projects/Cuboxi/patches/libcec: update imx6 patch
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
4c2a944928
commit
a29909a816
@ -1,20 +1,21 @@
|
|||||||
From 90b994705ee2492afa00f914e0a070a0f0929f21 Mon Sep 17 00:00:00 2001
|
From 4cf83161dbedfa2d3487841a1bfec4e38fa6939b Mon Sep 17 00:00:00 2001
|
||||||
From: wolfgar <stephan.rafin@laposte.net>
|
From: wolfgar <stephan.rafin@laposte.net>
|
||||||
Date: Sat, 28 Sep 2013 13:31:13 +0200
|
Date: Thu, 13 Mar 2014 16:03:58 +0100
|
||||||
Subject: [PATCH] Early support for i.MX6
|
Subject: [PATCH] Add iMX6 support Requires specific kernel driver. Check
|
||||||
|
http://stephan-rafin.net/blog/2013/09/30/i-mx6-cec/
|
||||||
|
|
||||||
---
|
---
|
||||||
configure.ac | 19 ++
|
configure.ac | 19 ++
|
||||||
include/cectypes.h | 14 +-
|
include/cectypes.h | 14 +-
|
||||||
src/lib/CECTypeUtils.h | 2 +
|
src/lib/CECTypeUtils.h | 2 +
|
||||||
src/lib/Makefile.am | 5 +
|
src/lib/Makefile.am | 5 +
|
||||||
src/lib/adapter/AdapterFactory.cpp | 28 +-
|
src/lib/adapter/AdapterFactory.cpp | 29 ++-
|
||||||
src/lib/adapter/IMX/AdapterMessageQueue.h | 134 ++++++++++
|
src/lib/adapter/IMX/AdapterMessageQueue.h | 134 ++++++++++
|
||||||
src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp | 281 +++++++++++++++++++++
|
src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp | 279 +++++++++++++++++++++
|
||||||
src/lib/adapter/IMX/IMXCECAdapterCommunication.h | 114 +++++++++
|
src/lib/adapter/IMX/IMXCECAdapterCommunication.h | 114 +++++++++
|
||||||
src/lib/adapter/IMX/IMXCECAdapterDetection.cpp | 42 +++
|
src/lib/adapter/IMX/IMXCECAdapterDetection.cpp | 42 ++++
|
||||||
src/lib/adapter/IMX/IMXCECAdapterDetection.h | 36 +++
|
src/lib/adapter/IMX/IMXCECAdapterDetection.h | 36 +++
|
||||||
10 files changed, 672 insertions(+), 3 deletions(-)
|
10 files changed, 671 insertions(+), 3 deletions(-)
|
||||||
create mode 100644 src/lib/adapter/IMX/AdapterMessageQueue.h
|
create mode 100644 src/lib/adapter/IMX/AdapterMessageQueue.h
|
||||||
create mode 100644 src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
create mode 100644 src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||||
create mode 100644 src/lib/adapter/IMX/IMXCECAdapterCommunication.h
|
create mode 100644 src/lib/adapter/IMX/IMXCECAdapterCommunication.h
|
||||||
@ -22,7 +23,7 @@ Subject: [PATCH] Early support for i.MX6
|
|||||||
create mode 100644 src/lib/adapter/IMX/IMXCECAdapterDetection.h
|
create mode 100644 src/lib/adapter/IMX/IMXCECAdapterDetection.h
|
||||||
|
|
||||||
diff --git a/configure.ac b/configure.ac
|
diff --git a/configure.ac b/configure.ac
|
||||||
index 9b2ac34..7875155 100644
|
index 510d851..923d7e5 100644
|
||||||
--- a/configure.ac
|
--- a/configure.ac
|
||||||
+++ b/configure.ac
|
+++ b/configure.ac
|
||||||
@@ -93,6 +93,14 @@ if test "x$use_rpi" != "xno"; then
|
@@ -93,6 +93,14 @@ if test "x$use_rpi" != "xno"; then
|
||||||
@ -40,7 +41,7 @@ index 9b2ac34..7875155 100644
|
|||||||
## add the top dir and include to the include path, so we can include config.h and cec.h
|
## add the top dir and include to the include path, so we can include config.h and cec.h
|
||||||
CPPFLAGS="$CPPFLAGS -I\$(abs_top_srcdir)/src -I\$(abs_top_srcdir)/include"
|
CPPFLAGS="$CPPFLAGS -I\$(abs_top_srcdir)/src -I\$(abs_top_srcdir)/include"
|
||||||
|
|
||||||
@@ -268,6 +276,17 @@ else
|
@@ -270,6 +278,17 @@ else
|
||||||
features="$features\n TDA995x support :\t\t\tno"
|
features="$features\n TDA995x support :\t\t\tno"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -59,10 +60,10 @@ index 9b2ac34..7875155 100644
|
|||||||
AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR($msg_required_header_missing))
|
AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR($msg_required_header_missing))
|
||||||
AC_CHECK_HEADER(ctype.h,,AC_MSG_ERROR($msg_required_header_missing))
|
AC_CHECK_HEADER(ctype.h,,AC_MSG_ERROR($msg_required_header_missing))
|
||||||
diff --git a/include/cectypes.h b/include/cectypes.h
|
diff --git a/include/cectypes.h b/include/cectypes.h
|
||||||
index a95243c..5c55283 100644
|
index 9f86253..7fabf00 100644
|
||||||
--- a/include/cectypes.h
|
--- a/include/cectypes.h
|
||||||
+++ b/include/cectypes.h
|
+++ b/include/cectypes.h
|
||||||
@@ -295,6 +295,17 @@
|
@@ -295,6 +295,17 @@ namespace CEC {
|
||||||
#define CEC_TDA995x_VIRTUAL_COM "CuBox"
|
#define CEC_TDA995x_VIRTUAL_COM "CuBox"
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -80,7 +81,7 @@ index a95243c..5c55283 100644
|
|||||||
* Mimimum client version
|
* Mimimum client version
|
||||||
*/
|
*/
|
||||||
#define CEC_MIN_LIB_VERSION 2
|
#define CEC_MIN_LIB_VERSION 2
|
||||||
@@ -857,7 +868,8 @@
|
@@ -858,7 +869,8 @@ typedef enum cec_adapter_type
|
||||||
ADAPTERTYPE_P8_EXTERNAL = 0x1,
|
ADAPTERTYPE_P8_EXTERNAL = 0x1,
|
||||||
ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
|
ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
|
||||||
ADAPTERTYPE_RPI = 0x100,
|
ADAPTERTYPE_RPI = 0x100,
|
||||||
@ -91,10 +92,10 @@ index a95243c..5c55283 100644
|
|||||||
|
|
||||||
typedef struct cec_menu_language
|
typedef struct cec_menu_language
|
||||||
diff --git a/src/lib/CECTypeUtils.h b/src/lib/CECTypeUtils.h
|
diff --git a/src/lib/CECTypeUtils.h b/src/lib/CECTypeUtils.h
|
||||||
index 20e318b..dbb72b2 100644
|
index dc4e5f1..1cf7ef1 100644
|
||||||
--- a/src/lib/CECTypeUtils.h
|
--- a/src/lib/CECTypeUtils.h
|
||||||
+++ b/src/lib/CECTypeUtils.h
|
+++ b/src/lib/CECTypeUtils.h
|
||||||
@@ -852,6 +852,8 @@
|
@@ -858,6 +858,8 @@ namespace CEC
|
||||||
return "Raspberry Pi";
|
return "Raspberry Pi";
|
||||||
case ADAPTERTYPE_TDA995x:
|
case ADAPTERTYPE_TDA995x:
|
||||||
return "TDA995x";
|
return "TDA995x";
|
||||||
@ -104,10 +105,10 @@ index 20e318b..dbb72b2 100644
|
|||||||
return "unknown";
|
return "unknown";
|
||||||
}
|
}
|
||||||
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
|
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
|
||||||
index 35166f2..fbae7ad 100644
|
index 9117d8e..6788303 100644
|
||||||
--- a/src/lib/Makefile.am
|
--- a/src/lib/Makefile.am
|
||||||
+++ b/src/lib/Makefile.am
|
+++ b/src/lib/Makefile.am
|
||||||
@@ -57,5 +57,10 @@ libcec_la_SOURCES += adapter/TDA995x/TDA995xCECAdapterDetection.cpp \
|
@@ -59,5 +59,10 @@ libcec_la_SOURCES += adapter/TDA995x/TDA995xCECAdapterDetection.cpp \
|
||||||
adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
|
adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@ -119,7 +120,7 @@ index 35166f2..fbae7ad 100644
|
|||||||
|
|
||||||
libcec_la_LDFLAGS = @LIBS_LIBCEC@ -version-info @VERSION@
|
libcec_la_LDFLAGS = @LIBS_LIBCEC@ -version-info @VERSION@
|
||||||
diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp
|
diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp
|
||||||
index 42cdd0b..3c83805 100644
|
index 42cdd0b..576589f 100644
|
||||||
--- a/src/lib/adapter/AdapterFactory.cpp
|
--- a/src/lib/adapter/AdapterFactory.cpp
|
||||||
+++ b/src/lib/adapter/AdapterFactory.cpp
|
+++ b/src/lib/adapter/AdapterFactory.cpp
|
||||||
@@ -52,6 +52,11 @@
|
@@ -52,6 +52,11 @@
|
||||||
@ -158,11 +159,12 @@ index 42cdd0b..3c83805 100644
|
|||||||
#error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
|
#error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -128,11 +148,15 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
|
@@ -128,11 +148,16 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
|
||||||
return new CRPiCECAdapterCommunication(m_lib->m_cec);
|
return new CRPiCECAdapterCommunication(m_lib->m_cec);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
+#if defined(HAVE_IMX_API)
|
+#if defined(HAVE_IMX_API)
|
||||||
|
+ if (!strcmp(strPort, CEC_IMX_VIRTUAL_COM))
|
||||||
+ return new CIMXCECAdapterCommunication(m_lib->m_cec);
|
+ return new CIMXCECAdapterCommunication(m_lib->m_cec);
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
@ -317,10 +319,10 @@ index 0000000..c8bcf71
|
|||||||
+};
|
+};
|
||||||
diff --git a/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
diff --git a/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 0000000..f4783df
|
index 0000000..54e5662
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
+++ b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp
|
||||||
@@ -0,0 +1,281 @@
|
@@ -0,0 +1,279 @@
|
||||||
+/*
|
+/*
|
||||||
+ * This file is part of the libCEC(R) library.
|
+ * This file is part of the libCEC(R) library.
|
||||||
+ *
|
+ *
|
||||||
@ -505,8 +507,7 @@ index 0000000..f4783df
|
|||||||
+
|
+
|
||||||
+cec_vendor_id CIMXCECAdapterCommunication::GetVendorId(void)
|
+cec_vendor_id CIMXCECAdapterCommunication::GetVendorId(void)
|
||||||
+{
|
+{
|
||||||
+ /* FIXME TO be implemented : check how */
|
+ return CEC_VENDOR_UNKNOWN;
|
||||||
+ return CEC_VENDOR_PANASONIC;
|
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
@ -545,8 +546,7 @@ index 0000000..f4783df
|
|||||||
+ if (m_logicalAddress == log_addr)
|
+ if (m_logicalAddress == log_addr)
|
||||||
+ return true;
|
+ return true;
|
||||||
+
|
+
|
||||||
+
|
+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)log_addr) != 0)
|
||||||
+ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, log_addr) != 0)
|
|
||||||
+ {
|
+ {
|
||||||
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
|
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__);
|
||||||
+ return false;
|
+ return false;
|
||||||
@ -813,5 +813,5 @@ index 0000000..d54891d
|
|||||||
+ };
|
+ };
|
||||||
+}
|
+}
|
||||||
--
|
--
|
||||||
1.8.5.1
|
1.9.1
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user