Merge pull request #1008 from MilhouseVH/kodi17b6

kodi: bump to 17.0-beta6-654f1b7
This commit is contained in:
Christian Hewitt 2016-12-01 08:47:22 +04:00 committed by GitHub
commit cda2246f4e
44 changed files with 3689 additions and 10105 deletions

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="libcec" PKG_NAME="libcec"
PKG_VERSION="6d68d21" PKG_VERSION="209884d"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -1,803 +0,0 @@
diff --git a/README.md b/README.md
index dfaf4d6..87491ef 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,12 @@ To compile in support for Exynos devices, you have to pass the argument -DHAVE_E
cmake -DHAVE_EXYNOS_API=1 ..
```
+### AOCEC
+To compile in support for AOCEC devices, you have to pass the argument -DHAVE_AOCEC_API=1 to cmake:
+```
+cmake -DHAVE_AOCEC_API=1 ..
+```
+
### TDA995x
To compile in support for TDA995x devices, you have to pass the argument -DHAVE_TDA995X_API=1 to cmake:
```
diff --git a/include/cectypes.h b/include/cectypes.h
index 0fdd48e..881a805 100644
--- a/include/cectypes.h
+++ b/include/cectypes.h
@@ -309,6 +309,16 @@ namespace CEC {
#define CEC_EXYNOS_VIRTUAL_COM "Exynos"
/*!
+ * the path to use for the AOCEC HDMI CEC device
+ */
+#define CEC_AOCEC_PATH "/dev/aocec"
+
+/*!
+ * the name of the virtual COM port to use for the AOCEC' CEC wire
+ */
+#define CEC_AOCEC_VIRTUAL_COM "AOCEC"
+
+/*!
* Mimimum client version
*/
#define CEC_MIN_LIB_VERSION 3
@@ -877,7 +887,8 @@ typedef enum cec_adapter_type
ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
ADAPTERTYPE_RPI = 0x100,
ADAPTERTYPE_TDA995x = 0x200,
- ADAPTERTYPE_EXYNOS = 0x300
+ ADAPTERTYPE_EXYNOS = 0x300,
+ ADAPTERTYPE_AOCEC = 0x500
} cec_adapter_type;
/** force exporting through swig */
diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt
index a494533..d3eefa3 100644
--- a/src/libcec/CMakeLists.txt
+++ b/src/libcec/CMakeLists.txt
@@ -87,6 +87,9 @@ set(CEC_HEADERS devices/CECRecordingDevice.h
adapter/Exynos/ExynosCEC.h
adapter/Exynos/ExynosCECAdapterDetection.h
adapter/Exynos/ExynosCECAdapterCommunication.h
+ adapter/AOCEC/AOCEC.h
+ adapter/AOCEC/AOCECAdapterDetection.h
+ adapter/AOCEC/AOCECAdapterCommunication.h
adapter/Pulse-Eight/USBCECAdapterMessageQueue.h
adapter/Pulse-Eight/USBCECAdapterCommunication.h
adapter/Pulse-Eight/USBCECAdapterCommands.h
diff --git a/src/libcec/adapter/AOCEC/AOCEC.h b/src/libcec/adapter/AOCEC/AOCEC.h
new file mode 100644
index 0000000..560fbdd
--- /dev/null
+++ b/src/libcec/adapter/AOCEC/AOCEC.h
@@ -0,0 +1,55 @@
+#pragma once
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC AOCEC Code Copyright (C) 2016 Gerald Dachs
+ * based heavily on:
+ * libCEC Exynos Code Copyright (C) 2014 Valentin Manea
+ * libCEC(R) is Copyright (C) 2011-2015 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing <license@pulse-eight.com>
+ * http://www.pulse-eight.com/
+ * http://www.pulse-eight.net/
+ */
+
+
+#define CEC_DEFAULT_PADDR 0x1000
+
+#define CEC_IOC_MAGIC 'C'
+#define CEC_IOC_GET_PHYSICAL_ADDR _IOR(CEC_IOC_MAGIC, 0x00, uint16_t)
+#define CEC_IOC_GET_VERSION _IOR(CEC_IOC_MAGIC, 0x01, int)
+#define CEC_IOC_GET_VENDOR_ID _IOR(CEC_IOC_MAGIC, 0x02, uint32_t)
+#define CEC_IOC_GET_PORT_INFO _IOR(CEC_IOC_MAGIC, 0x03, int)
+#define CEC_IOC_GET_PORT_NUM _IOR(CEC_IOC_MAGIC, 0x04, int)
+#define CEC_IOC_GET_SEND_FAIL_REASON _IOR(CEC_IOC_MAGIC, 0x05, uint32_t)
+#define CEC_IOC_SET_OPTION_WAKEUP _IOW(CEC_IOC_MAGIC, 0x06, uint32_t)
+#define CEC_IOC_SET_OPTION_ENALBE_CEC _IOW(CEC_IOC_MAGIC, 0x07, uint32_t)
+#define CEC_IOC_SET_OPTION_SYS_CTRL _IOW(CEC_IOC_MAGIC, 0x08, uint32_t)
+#define CEC_IOC_SET_OPTION_SET_LANG _IOW(CEC_IOC_MAGIC, 0x09, uint32_t)
+#define CEC_IOC_GET_CONNECT_STATUS _IOR(CEC_IOC_MAGIC, 0x0A, uint32_t)
+#define CEC_IOC_ADD_LOGICAL_ADDR _IOW(CEC_IOC_MAGIC, 0x0B, uint32_t)
+#define CEC_IOC_CLR_LOGICAL_ADDR _IOW(CEC_IOC_MAGIC, 0x0C, uint32_t)
+
+#define CEC_MAX_FRAME_SIZE 16
diff --git a/src/libcec/adapter/AOCEC/AOCECAdapterCommunication.cpp b/src/libcec/adapter/AOCEC/AOCECAdapterCommunication.cpp
new file mode 100644
index 0000000..8edf981
--- /dev/null
+++ b/src/libcec/adapter/AOCEC/AOCECAdapterCommunication.cpp
@@ -0,0 +1,343 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC AOCEC Code Copyright (C) 2016 Gerald Dachs
+ * based heavily on:
+ * libCEC Exynos Code Copyright (C) 2014 Valentin Manea
+ * libCEC(R) is Copyright (C) 2011-2015 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing <license@pulse-eight.com>
+ * http://www.pulse-eight.com/
+ * http://www.pulse-eight.net/
+ */
+
+#include "env.h"
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+
+#if defined(HAVE_AOCEC_API)
+#include "AOCEC.h"
+#include "AOCECAdapterCommunication.h"
+
+#include "CECTypeUtils.h"
+#include "LibCEC.h"
+#include <p8-platform/util/buffer.h>
+
+using namespace CEC;
+using namespace P8PLATFORM;
+
+#define LIB_CEC m_callback->GetLib()
+
+
+CAOCECAdapterCommunication::CAOCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
+ IAdapterCommunication(callback),
+ m_bLogicalAddressChanged(false)
+{
+ CLockObject lock(m_mutex);
+
+ m_logicalAddresses.Clear();
+ m_fd = INVALID_SOCKET_VALUE;
+}
+
+
+CAOCECAdapterCommunication::~CAOCECAdapterCommunication(void)
+{
+ Close();
+}
+
+
+bool CAOCECAdapterCommunication::IsOpen(void)
+{
+ CLockObject lock(m_mutex);
+ return IsInitialised() && m_fd != INVALID_SOCKET_VALUE;
+}
+
+
+bool CAOCECAdapterCommunication::Open(uint32_t UNUSED(iTimeoutMs), bool UNUSED(bSkipChecks), bool bStartListening)
+{
+ if (IsOpen())
+ Close();
+
+ CLockObject lock(m_mutex);
+
+ if ((m_fd = open(CEC_AOCEC_PATH, O_RDWR)) > 0)
+ {
+ uint32_t enable = true;
+
+ if (ioctl(m_fd, CEC_IOC_SET_OPTION_SYS_CTRL, enable))
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL IOCTL CEC_IOC_SET_OPTION_SYS_CTRL failed !", __func__);
+ return false;
+ }
+
+ if (!bStartListening || CreateThread()) {
+ return true;
+ }
+ close(m_fd);
+ m_fd = INVALID_SOCKET_VALUE;
+ }
+ return false;
+}
+
+
+void CAOCECAdapterCommunication::Close(void)
+{
+ StopThread(0);
+
+ CLockObject lock(m_mutex);
+
+ uint32_t enable = false;
+
+ if (ioctl(m_fd, CEC_IOC_SET_OPTION_SYS_CTRL, enable))
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_SET_OPTION_SYS_CTRL failed !", __func__);
+ }
+
+ close(m_fd);
+ m_fd = INVALID_SOCKET_VALUE;
+}
+
+
+std::string CAOCECAdapterCommunication::GetError(void) const
+{
+ std::string strError(m_strError);
+ return strError;
+}
+
+int CAOCECAdapterCommunication::getFileDescriptor(void)
+{
+ CLockObject lock(m_mutex);
+
+ return m_fd;
+}
+
+
+
+cec_adapter_message_state CAOCECAdapterCommunication::Write(
+ const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply))
+{
+ uint8_t buffer[CEC_MAX_FRAME_SIZE];
+ int32_t size = 1;
+ cec_adapter_message_state rc = ADAPTER_MESSAGE_STATE_ERROR;
+
+ if (!IsOpen())
+ return rc;
+
+ CLockObject lock(m_mutex);
+
+ if ((size_t)data.parameters.size + data.opcode_set > sizeof(buffer))
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: data size too large !", __func__);
+ return ADAPTER_MESSAGE_STATE_ERROR;
+ }
+
+ buffer[0] = (data.initiator << 4) | (data.destination & 0x0f);
+
+ if (data.opcode_set)
+ {
+ buffer[1] = data.opcode;
+ size++;
+
+ memcpy(&buffer[size], data.parameters.data, data.parameters.size);
+ size += data.parameters.size;
+ }
+
+ if (write(m_fd, (void *)buffer, size) == size)
+ {
+ rc = ADAPTER_MESSAGE_STATE_SENT_ACKED;
+ }
+ else
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: write failed !", __func__);
+ }
+
+ return rc;
+}
+
+
+uint16_t CAOCECAdapterCommunication::GetFirmwareVersion(void)
+{
+ int version = 0;
+
+ if (!IsOpen())
+ return version;
+
+ CLockObject lock(m_mutex);
+
+ if (ioctl(m_fd, CEC_IOC_GET_VERSION, &version) < 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_GET_VERSION failed !", __func__);
+ }
+ return (uint16_t)version;
+}
+
+
+cec_vendor_id CAOCECAdapterCommunication::GetVendorId(void)
+{
+ int vendor_id = CEC_VENDOR_UNKNOWN;
+
+ if (!IsOpen())
+ return cec_vendor_id(vendor_id);
+
+ CLockObject lock(m_mutex);
+
+ if (ioctl(m_fd, CEC_IOC_GET_VENDOR_ID, &vendor_id) < 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_GET_VENDOR_ID failed !", __func__);
+ }
+ return cec_vendor_id(vendor_id);
+}
+
+
+uint16_t CAOCECAdapterCommunication::GetPhysicalAddress(void)
+{
+ int phys_addr = CEC_DEFAULT_PADDR;
+
+ if (!IsOpen())
+ return (uint16_t)phys_addr;
+
+ CLockObject lock(m_mutex);
+
+ if (ioctl(m_fd, CEC_IOC_GET_PHYSICAL_ADDR, &phys_addr) < 0)
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_GET_PHYSICAL_ADDR failed !", __func__);
+ phys_addr = CEC_DEFAULT_PADDR;
+ }
+ return (uint16_t)phys_addr;
+}
+
+
+cec_logical_addresses CAOCECAdapterCommunication::GetLogicalAddresses(void)
+{
+ return m_logicalAddresses;
+}
+
+
+bool CAOCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses)
+{
+ unsigned int log_addr = addresses.primary;
+ if (!IsOpen())
+ return false;
+
+ CLockObject lock(m_mutex);
+
+ if (ioctl(m_fd, CEC_IOC_ADD_LOGICAL_ADDR, log_addr))
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_ADD_LOGICAL_ADDR failed !", __func__);
+ return false;
+ }
+ m_logicalAddresses = addresses;
+ m_bLogicalAddressChanged = true;
+
+ return true;
+}
+
+
+void CAOCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress))
+{
+ unsigned int log_addr = CECDEVICE_BROADCAST;
+
+ if (!IsOpen())
+ return;
+
+ CLockObject lock(m_mutex);
+
+ if (ioctl(m_fd, CEC_IOC_ADD_LOGICAL_ADDR, log_addr))
+ {
+ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: IOCTL CEC_IOC_ADD_LOGICAL_ADDR failed !", __func__);
+ }
+}
+
+
+void *CAOCECAdapterCommunication::Process(void)
+{
+ uint8_t buffer[CEC_MAX_FRAME_SIZE];
+ uint32_t size;
+ fd_set rfds;
+ cec_logical_address initiator, destination;
+ struct timeval tv;
+
+ if (!IsOpen())
+ return 0;
+
+ while (!IsStopped())
+ {
+ int fd = getFileDescriptor();
+
+ if (fd == INVALID_SOCKET_VALUE)
+ {
+ break;
+ }
+
+ FD_ZERO(&rfds);
+ FD_SET(fd, &rfds);
+
+ tv.tv_sec = 1;
+ tv.tv_usec = 0;
+
+ if (select(fd + 1, &rfds, NULL, NULL, &tv) >= 0 )
+ {
+
+ if (!FD_ISSET(fd, &rfds))
+ continue;
+
+ size = read(fd, buffer, CEC_MAX_FRAME_SIZE);
+
+ if (size > 0)
+ {
+#if 0 // currently unused
+ if (buffer[0] == 0xff) // driver wants us to reread the physical address
+ {
+ if (!IsStopped())
+ {
+ uint16_t iNewAddress = GetPhysicalAddress();
+ m_callback->HandlePhysicalAddressChanged(iNewAddress);
+ }
+ continue;
+ }
+#endif
+ initiator = cec_logical_address(buffer[0] >> 4);
+ destination = cec_logical_address(buffer[0] & 0x0f);
+
+ cec_command cmd;
+
+ cec_command::Format(
+ cmd, initiator, destination,
+ ( size > 1 ) ? cec_opcode(buffer[1]) : CEC_OPCODE_NONE);
+
+ for( uint8_t i = 2; i < size; i++ )
+ cmd.parameters.PushBack(buffer[i]);
+
+ if (!IsStopped())
+ m_callback->OnCommandReceived(cmd);
+ }
+ }
+ }
+
+ return 0;
+}
+
+#endif // HAVE_AOCEC_API
diff --git a/src/libcec/adapter/AOCEC/AOCECAdapterCommunication.h b/src/libcec/adapter/AOCEC/AOCECAdapterCommunication.h
new file mode 100644
index 0000000..f6a8a4a
--- /dev/null
+++ b/src/libcec/adapter/AOCEC/AOCECAdapterCommunication.h
@@ -0,0 +1,105 @@
+#pragma once
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC AOCEC Code Copyright (C) 2016 Gerald Dachs
+ * based heavily on:
+ * libCEC Exynos Code Copyright (C) 2014 Valentin Manea
+ * libCEC(R) is Copyright (C) 2011-2015 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing <license@pulse-eight.com>
+ * http://www.pulse-eight.com/
+ * http://www.pulse-eight.net/
+ */
+
+#include "env.h"
+
+#if defined(HAVE_AOCEC_API)
+
+#include <p8-platform/threads/mutex.h>
+#include <p8-platform/threads/threads.h>
+#include "../AdapterCommunication.h"
+#include <map>
+
+namespace CEC
+{
+ class CAOCECAdapterCommunication : public IAdapterCommunication, public P8PLATFORM::CThread
+ {
+ public:
+ /*!
+ * @brief Create a new Exynos HDMI CEC communication handler.
+ * @param callback The callback to use for incoming CEC commands.
+ */
+ CAOCECAdapterCommunication(IAdapterCommunicationCallback *callback);
+ virtual ~CAOCECAdapterCommunication(void);
+
+ /** @name IAdapterCommunication implementation */
+ ///{
+ bool Open(uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT, bool bSkipChecks = false, bool bStartListening = true);
+ void Close(void);
+ bool IsOpen(void);
+ std::string GetError(void) const;
+ cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool bIsReply);
+
+ bool SetLineTimeout(uint8_t UNUSED(iTimeout)) { return true; }
+ bool StartBootloader(void) { return false; }
+ bool SetLogicalAddresses(const cec_logical_addresses &addresses);
+ cec_logical_addresses GetLogicalAddresses(void);
+ bool PingAdapter(void) { return IsInitialised(); }
+ uint16_t GetFirmwareVersion(void);
+ uint32_t GetFirmwareBuildDate(void) { return 0; }
+ bool IsRunningLatestFirmware(void) { return true; }
+ bool PersistConfiguration(const libcec_configuration & UNUSED(configuration)) { return false; }
+ bool GetConfiguration(libcec_configuration & UNUSED(configuration)) { return false; }
+ std::string GetPortName(void) { return std::string("AOCEC"); }
+ uint16_t GetPhysicalAddress(void);
+ bool SetControlledMode(bool UNUSED(controlled)) { return true; }
+ cec_vendor_id GetVendorId(void);
+ bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address <= CECDEVICE_BROADCAST; }
+ cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_AOCEC; }
+ uint16_t GetAdapterVendorId(void) const { return 1; }
+ uint16_t GetAdapterProductId(void) const { return 1; }
+ void HandleLogicalAddressLost(cec_logical_address oldAddress);
+ void SetActiveSource(bool UNUSED(bSetTo), bool UNUSED(bClientUnregistered)) {}
+ ///}
+
+ /** @name P8PLATFORM::CThread implementation */
+ ///{
+ void *Process(void);
+ ///}
+
+ private:
+ bool IsInitialised(void) const { return 1; };
+ int getFileDescriptor(void);
+
+ std::string m_strError; /**< current error message */
+
+ bool m_bLogicalAddressChanged;
+ cec_logical_addresses m_logicalAddresses;
+ P8PLATFORM::CMutex m_mutex;
+ int m_fd;
+ };
+};
+#endif
diff --git a/src/libcec/adapter/AOCEC/AOCECAdapterDetection.cpp b/src/libcec/adapter/AOCEC/AOCECAdapterDetection.cpp
new file mode 100644
index 0000000..55f3ee0
--- /dev/null
+++ b/src/libcec/adapter/AOCEC/AOCECAdapterDetection.cpp
@@ -0,0 +1,50 @@
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC AOCEC Code Copyright (C) 2016 Gerald Dachs
+ * based heavily on:
+ * libCEC Exynos Code Copyright (C) 2014 Valentin Manea
+ * libCEC(R) is Copyright (C) 2011-2015 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing <license@pulse-eight.com>
+ * http://www.pulse-eight.com/
+ * http://www.pulse-eight.net/
+ */
+
+#include "env.h"
+#include <stdio.h>
+
+#if defined(HAVE_AOCEC_API)
+#include "AOCECAdapterDetection.h"
+#include "AOCEC.h"
+
+using namespace CEC;
+
+bool CAOCECAdapterDetection::FindAdapter(void)
+{
+ return access(CEC_AOCEC_PATH, 0) == 0;
+}
+
+#endif
diff --git a/src/libcec/adapter/AOCEC/AOCECAdapterDetection.h b/src/libcec/adapter/AOCEC/AOCECAdapterDetection.h
new file mode 100644
index 0000000..cacaa19
--- /dev/null
+++ b/src/libcec/adapter/AOCEC/AOCECAdapterDetection.h
@@ -0,0 +1,46 @@
+#pragma once
+/*
+ * This file is part of the libCEC(R) library.
+ *
+ * libCEC AOCEC Code Copyright (C) 2016 Gerald Dachs
+ * based heavily on:
+ * libCEC Exynos Code Copyright (C) 2014 Valentin Manea
+ * libCEC(R) is Copyright (C) 2011-2015 Pulse-Eight Limited. All rights reserved.
+ * libCEC(R) is an original work, containing original code.
+ *
+ * libCEC(R) is a trademark of Pulse-Eight Limited.
+ *
+ * This program is dual-licensed; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ *
+ * Alternatively, you can license this library under a commercial license,
+ * please contact Pulse-Eight Licensing for more information.
+ *
+ * For more information contact:
+ * Pulse-Eight Licensing <license@pulse-eight.com>
+ * http://www.pulse-eight.com/
+ * http://www.pulse-eight.net/
+ */
+
+#include "env.h"
+
+namespace CEC
+{
+ class CAOCECAdapterDetection
+ {
+ public:
+ static bool FindAdapter(void);
+ };
+}
diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp
index da05725..1e946e6 100644
--- a/src/libcec/adapter/AdapterFactory.cpp
+++ b/src/libcec/adapter/AdapterFactory.cpp
@@ -58,6 +58,11 @@
#include "Exynos/ExynosCECAdapterCommunication.h"
#endif
+#if defined(HAVE_AOCEC_API)
+#include "AOCEC/AOCECAdapterDetection.h"
+#include "AOCEC/AOCECAdapterCommunication.h"
+#endif
+
using namespace CEC;
int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */)
@@ -126,8 +131,20 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
}
#endif
+#if defined(HAVE_AOCEC_API)
+ if (iAdaptersFound < iBufSize && CAOCECAdapterDetection::FindAdapter())
+ {
+ snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_AOCEC_PATH);
+ snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_AOCEC_VIRTUAL_COM);
+ deviceList[iAdaptersFound].iVendorId = 0;
+ deviceList[iAdaptersFound].iProductId = 0;
+ deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_AOCEC;
+ iAdaptersFound++;
+ }
+#endif
+
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API)
+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_AOCEC_API)
#error "libCEC doesn't have support for any type of adapter. please check your build system or configuration"
#endif
@@ -146,6 +163,11 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
return new CExynosCECAdapterCommunication(m_lib->m_cec);
#endif
+#if defined(HAVE_AOCEC_API)
+ if (!strcmp(strPort, CEC_AOCEC_VIRTUAL_COM))
+ return new CAOCECAdapterCommunication(m_lib->m_cec);
+#endif
+
#if defined(HAVE_RPI_API)
if (!strcmp(strPort, CEC_RPI_VIRTUAL_COM))
return new CRPiCECAdapterCommunication(m_lib->m_cec);
diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
index b8a16c8..93a97e6 100644
--- a/src/libcec/cmake/CheckPlatformSupport.cmake
+++ b/src/libcec/cmake/CheckPlatformSupport.cmake
@@ -9,6 +9,7 @@
# HAVE_RPI_API 1 if Raspberry Pi is supported
# HAVE_TDA995X_API 1 if TDA995X is supported
# HAVE_EXYNOS_API 1 if Exynos is supported
+# HAVE_AOCEC_API 1 if AOCEC is supported
# HAVE_P8_USB 1 if Pulse-Eight devices are supported
# HAVE_P8_USB_DETECT 1 if Pulse-Eight devices can be auto-detected
# HAVE_DRM_EDID_PARSER 1 if DRM EDID parsing is supported
@@ -132,6 +133,18 @@ else()
else()
set(HAVE_EXYNOS_API 0)
endif()
+
+ # AOCEC
+ if (${HAVE_AOCEC_API})
+ set(LIB_INFO "${LIB_INFO}, AOCEC")
+ set(HAVE_AOCEC_API 1)
+ set(CEC_SOURCES_ADAPTER_AOCEC adapter/AOCEC/AOCECAdapterDetection.cpp
+ adapter/AOCEC/AOCECAdapterCommunication.cpp)
+ source_group("Source Files\\adapter\\AOCEC" FILES ${CEC_SOURCES_ADAPTER_AOCEC})
+ list(APPEND CEC_SOURCES ${CEC_SOURCES_ADAPTER_AOCEC})
+ else()
+ set(HAVE_AOCEC_API 0)
+ endif()
endif()
# rt
diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake
index 9dcaacf..7ec10f5 100644
--- a/src/libcec/cmake/DisplayPlatformSupport.cmake
+++ b/src/libcec/cmake/DisplayPlatformSupport.cmake
@@ -44,6 +44,12 @@ else()
message(STATUS "DRM support: no")
endif()
+if (HAVE_AOCEC_API)
+ message(STATUS "AOCEC support: yes")
+else()
+ message(STATUS "AOCEC support: no")
+endif()
+
if (HAVE_PYTHON)
message(STATUS "Python support: version ${PYTHONLIBS_VERSION_STRING} (${PYTHON_VERSION})")
else()
diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in
index 0496aa0..fe6c83d 100644
--- a/src/libcec/env.h.in
+++ b/src/libcec/env.h.in
@@ -72,6 +72,9 @@
/* Define to 1 for Exynos support */
#cmakedefine HAVE_EXYNOS_API @HAVE_EXYNOS_API@
+/* Define to 1 for AOCEC support */
+#cmakedefine HAVE_AOCEC_API @HAVE_AOCEC_API@
+
/* Define to 1 for nVidia EDID parsing support (on selected models) */
#cmakedefine HAVE_NVIDIA_EDID_PARSER @HAVE_NVIDIA_EDID_PARSER@

View File

@ -1,38 +0,0 @@
From f70c4d76e1d9c0219a3927b6b66090b7575e7933 Mon Sep 17 00:00:00 2001
From: Gerald Dachs <gda@dachsweb.de>
Date: Thu, 17 Mar 2016 12:12:51 +0100
Subject: [PATCH] use system audio mode request instead of power on to start
AVR reliable
---
src/libcec/devices/CECBusDevice.cpp | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/libcec/devices/CECBusDevice.cpp b/src/libcec/devices/CECBusDevice.cpp
index 55939d1..e2d5ea3 100644
--- a/src/libcec/devices/CECBusDevice.cpp
+++ b/src/libcec/devices/CECBusDevice.cpp
@@ -1025,14 +1025,19 @@ bool CCECBusDevice::ActivateSource(uint64_t iDelay /* = 0 */)
bool bReturn(true);
if (iDelay == 0)
{
- /** some AVRs fail to be powered up by the TV when it powers up. power up the AVR explicitly */
+ /** send system audio mode request if AVR exists */
if (m_iLogicalAddress != CECDEVICE_AUDIOSYSTEM)
{
CCECBusDevice* audioSystem(m_processor->GetDevice(CECDEVICE_AUDIOSYSTEM));
- if (audioSystem && audioSystem->IsPresent() && audioSystem->GetPowerStatus(m_iLogicalAddress) != CEC_POWER_STATUS_ON)
+ if (audioSystem && audioSystem->IsPresent())
{
- LIB_CEC->AddLog(CEC_LOG_DEBUG, "powering up the AVR");
- audioSystem->PowerOn(m_iLogicalAddress);
+ cec_command command;
+
+ LIB_CEC->AddLog(CEC_LOG_DEBUG, "sending system audio mode request for '%s'", ToString(m_iLogicalAddress));
+ cec_command::Format(command, m_iLogicalAddress, CECDEVICE_AUDIOSYSTEM, CEC_OPCODE_SYSTEM_AUDIO_MODE_REQUEST);
+ command.parameters.PushBack((uint8_t) ((m_iPhysicalAddress >> 8) & 0xFF));
+ command.parameters.PushBack((uint8_t) (m_iPhysicalAddress & 0xFF));
+ bReturn = m_handler->Transmit(command, false, false);
}
}

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="adsp.freesurround" PKG_NAME="adsp.freesurround"
PKG_VERSION="34f5040" PKG_VERSION="61568b9"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="audiodecoder.fluidsynth" PKG_NAME="audiodecoder.fluidsynth"
PKG_VERSION="cbd6d80" PKG_VERSION="67fd270"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="audiodecoder.ncsf" PKG_NAME="audiodecoder.ncsf"
PKG_VERSION="cd96c27" PKG_VERSION="8835a04"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="audiodecoder.timidity" PKG_NAME="audiodecoder.timidity"
PKG_VERSION="310e909" PKG_VERSION="20823d2"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="inputstream.rtmp" PKG_NAME="inputstream.rtmp"
PKG_VERSION="76c9041" PKG_VERSION="55437ac"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv" PKG_SITE="http://www.kodi.tv"
PKG_URL="https://github.com/notspiff/inputstream.rtmp/archive/$PKG_VERSION.tar.gz" PKG_URL="https://github.com/notspiff/inputstream.rtmp/archive/$PKG_VERSION.tar.gz"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="peripheral.joystick" PKG_NAME="peripheral.joystick"
PKG_VERSION="ae86732" PKG_VERSION="d09e0c6"
PKG_REV="0" PKG_REV="0"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.argustv" PKG_NAME="pvr.argustv"
PKG_VERSION="87cb678" PKG_VERSION="7d3bdba"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.demo" PKG_NAME="pvr.demo"
PKG_VERSION="01c68c8" PKG_VERSION="9ebc62c"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.dvblink" PKG_NAME="pvr.dvblink"
PKG_VERSION="043aa89" PKG_VERSION="42207a0"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.dvbviewer" PKG_NAME="pvr.dvbviewer"
PKG_VERSION="f72c62f" PKG_VERSION="2449df9"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.filmon" PKG_NAME="pvr.filmon"
PKG_VERSION="e4f9900" PKG_VERSION="ca709b9"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.hdhomerun" PKG_NAME="pvr.hdhomerun"
PKG_VERSION="eef1bd1" PKG_VERSION="ef45d3f"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.hts" PKG_NAME="pvr.hts"
PKG_VERSION="c091da3" PKG_VERSION="4f406f4"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.iptvsimple" PKG_NAME="pvr.iptvsimple"
PKG_VERSION="adee8a7" PKG_VERSION="d69778e"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.mediaportal.tvserver" PKG_NAME="pvr.mediaportal.tvserver"
PKG_VERSION="845479b" PKG_VERSION="8ba6a79"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.mythtv" PKG_NAME="pvr.mythtv"
PKG_VERSION="2f3dfcd" PKG_VERSION="b22cfa0"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.nextpvr" PKG_NAME="pvr.nextpvr"
PKG_VERSION="6a2128d" PKG_VERSION="fe85f2a"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.njoy" PKG_NAME="pvr.njoy"
PKG_VERSION="b5d6565" PKG_VERSION="3a32276"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -0,0 +1,44 @@
################################################################################
# This file is part of LibreELEC - http://www.libreelec.tv
# Copyright (C) 2016 Team LibreELEC
#
# LibreELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# LibreELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with LibreELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="pvr.octonet"
PKG_VERSION="ff2d4a7"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.kodi.tv"
PKG_URL="https://github.com/DigitalDevices/pvr.octonet/archive/$PKG_VERSION.tar.gz"
PKG_DEPENDS_TARGET="toolchain kodi-platform jsoncpp"
PKG_SECTION=""
PKG_SHORTDESC="A pvr plugin for DigitalDevices Octonet Sat>IP servers"
PKG_LONGDESC="A pvr plugin for DigitalDevices Octonet Sat>IP servers"
PKG_AUTORECONF="no"
PKG_IS_ADDON="yes"
PKG_ADDON_TYPE="xbmc.pvrclient"
PKG_CMAKE_OPTS_TARGET="-DCMAKE_MODULE_PATH=$SYSROOT_PREFIX/usr/lib/kodi \
-DCMAKE_PREFIX_PATH=$SYSROOT_PREFIX/usr"
addon() {
mkdir -p $ADDON_BUILD/$PKG_ADDON_ID/
cp -R $PKG_BUILD/.install_pkg/usr/share/kodi/addons/$PKG_NAME/* $ADDON_BUILD/$PKG_ADDON_ID/
ADDONSO=$(xmlstarlet sel -t -v "/addon/extension/@library_linux" $ADDON_BUILD/$PKG_ADDON_ID/addon.xml)
cp -L $PKG_BUILD/.install_pkg/usr/lib/kodi/addons/$PKG_NAME/$ADDONSO $ADDON_BUILD/$PKG_ADDON_ID/
}

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.pctv" PKG_NAME="pvr.pctv"
PKG_VERSION="d6d969f" PKG_VERSION="e829beb"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.stalker" PKG_NAME="pvr.stalker"
PKG_VERSION="168e35f" PKG_VERSION="fd800fd"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.vbox" PKG_NAME="pvr.vbox"
PKG_VERSION="810994a" PKG_VERSION="4bc6f1e"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.vdr.vnsi" PKG_NAME="pvr.vdr.vnsi"
PKG_VERSION="5b47bd0" PKG_VERSION="4b06d83"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.vuplus" PKG_NAME="pvr.vuplus"
PKG_VERSION="7ab30d3" PKG_VERSION="d2c5442"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="pvr.wmc" PKG_NAME="pvr.wmc"
PKG_VERSION="d9eac84" PKG_VERSION="bffb41d"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="visualization.projectm" PKG_NAME="visualization.projectm"
PKG_VERSION="dcd7179" PKG_VERSION="0487ebb"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="visualization.shadertoy" PKG_NAME="visualization.shadertoy"
PKG_VERSION="86ced78" PKG_VERSION="e88fd6e"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="visualization.spectrum" PKG_NAME="visualization.spectrum"
PKG_VERSION="34929f0" PKG_VERSION="b3ed787"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="kodi-theme-Estuary" PKG_NAME="kodi-theme-Estuary"
PKG_VERSION="17.0-beta5-e92818a" PKG_VERSION="17.0-beta6-654f1b7"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
@ -56,7 +56,4 @@ makeinstall_target() {
for theme in themes/*; do for theme in themes/*; do
cp $(basename $theme).xbt $INSTALL/usr/share/kodi/addons/skin.estuary/media cp $(basename $theme).xbt $INSTALL/usr/share/kodi/addons/skin.estuary/media
done done
# Rebrand
sed -e "s,@DISTRONAME@,$DISTRONAME,g" -i $INSTALL/usr/share/kodi/addons/skin.estuary/1080i/Settings.xml
} }

View File

@ -1,15 +0,0 @@
diff --git a/1080i/Settings.xml b/1080i/Settings.xml
--- a/1080i/Settings.xml
+++ b/1080i/Settings.xml
@@ -134,6 +134,11 @@
<icon>icons/settings/system.png</icon>
</item>
<item>
+ <label>@DISTRONAME@</label>
+ <onclick>RunAddon(service.libreelec.settings)</onclick>
+ <icon>icons/settings/libreelec.png</icon>
+ </item>
+ <item>
<label>$LOCALIZE[138]</label>
<onclick>ActivateWindow(systeminfo)</onclick>
<icon>icons/settings/sysinfo.png</icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="kodi" PKG_NAME="kodi"
PKG_VERSION="17.0-beta5-e92818a" PKG_VERSION="17.0-beta6-654f1b7"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"

View File

@ -11,7 +11,7 @@ diff --git a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp b/xbmc/cores/AudioEngin
index 6a9066b..4d7f85d 100644 index 6a9066b..4d7f85d 100644
--- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp --- a/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
+++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +++ b/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp
@@ -535,9 +535,8 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device) @@ -535,8 +535,8 @@ bool CAESinkALSA::Initialize(AEAudioFormat &format, std::string &device)
m_passthrough = false; m_passthrough = false;
} }
#if defined(HAS_LIBAMCODEC) #if defined(HAS_LIBAMCODEC)
@ -19,6 +19,6 @@ index 6a9066b..4d7f85d 100644
+ if (!m_passthrough && device.find("hdmi:CARD=AMLM8AUDIO") != std::string::npos) + if (!m_passthrough && device.find("hdmi:CARD=AMLM8AUDIO") != std::string::npos)
{ {
- aml_set_audio_passthrough(m_passthrough); - aml_set_audio_passthrough(m_passthrough);
device = "default"; + device = "default";
} }
#endif #endif

View File

@ -18,7 +18,7 @@
PKG_NAME="ffmpeg" PKG_NAME="ffmpeg"
# Current branch is: release/3.1-xbmc # Current branch is: release/3.1-xbmc
PKG_VERSION="0cf9269" PKG_VERSION="544eaf0"
PKG_REV="1" PKG_REV="1"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="LGPLv2.1+" PKG_LICENSE="LGPLv2.1+"

File diff suppressed because it is too large Load Diff

View File

@ -1,185 +0,0 @@
From 1fc5cd103a26697df63075953d6fd556f39c02bd Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Wed, 26 Oct 2016 23:21:43 +0100
Subject: [PATCH] squash: Restructure the pll adjust code to avoid adjustment
when sync display is disabled
---
.../AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 25 ++++++++--------------
.../Engines/ActiveAE/ActiveAEStream.cpp | 17 ++++++++++++++-
.../AudioEngine/Engines/ActiveAE/ActiveAEStream.h | 3 ++-
xbmc/linux/RBP.cpp | 17 ++++++++++-----
xbmc/linux/RBP.h | 5 +++--
5 files changed, 42 insertions(+), 25 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index 497b443..68399ab 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -34,10 +34,6 @@ using namespace ActiveAE;
#include "windowing/WindowingFactory.h"
#include "utils/log.h"
-#if defined(TARGET_RASPBERRY_PI)
-#include "linux/RBP.h"
-#endif
-
#define MAX_CACHE_LEVEL 0.4 // total cache time of stream in seconds
#define MAX_WATER_LEVEL 0.2 // buffered time after stream stages in seconds
#define MAX_BUFFER_TIME 0.1 // max time of a buffer in seconds
@@ -2457,21 +2453,18 @@ CSampleBuffer* CActiveAE::SyncStream(CActiveAEStream *stream)
if (!newerror || stream->m_syncState != CAESyncInfo::AESyncState::SYNC_INSYNC)
return ret;
- if (stream->m_pllAdjust > 0) // pll adjust
- {
-#if defined(TARGET_RASPBERRY_PI)
- double e = std::max(std::min(error / 50.0, 1.0), -1.0);
- double m_plladjust = 1.0 + e * stream->m_pllAdjust;
- double m_last_plladjust = g_RBP.AdjustHDMIClock(m_plladjust);
- CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s pll:%.5f (%.5f) error:%.6f e:%.6f a:%f", __FUNCTION__, m_plladjust, m_last_plladjust, error, e * stream->m_pllAdjust, stream->m_pllAdjust );
-#endif
- }
- else if (stream->m_resampleMode)
+ if (stream->m_resampleMode)
{
if (stream->m_processingBuffers)
{
- stream->m_processingBuffers->SetRR(stream->CalcResampleRatio(error), m_settings.atempoThreshold);
- CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s rr:%.5f threshold:%.3f error:%.6f", __FUNCTION__, stream->m_processingBuffers->GetRR(), m_settings.atempoThreshold, error);
+ double pllAdjustRequest = 0.0, pllAdjustActual = 0.0, e = 0.0;
+ if (stream->m_pllAdjust > 0.0)
+ {
+ e = std::max(std::min(error / 50.0, 1.0), - 1.0);
+ pllAdjustRequest = 1.0 + e * stream->m_pllAdjust;
+ }
+ stream->m_processingBuffers->SetRR(stream->CalcResampleRatio(error), m_settings.atempoThreshold, pllAdjustRequest, stream->m_pllAdjust, pllAdjustActual);
+ CLog::Log(LOGDEBUG, "ActiveAE::%s pll:%.5f (act:%.5f lim:%.5f) rr:%.5f threshold:%.3f error:%.6f", __FUNCTION__, pllAdjustRequest, pllAdjustActual, stream->m_pllAdjust, stream->m_processingBuffers->GetRR(), m_settings.atempoThreshold, error );
}
}
else if (stream->m_processingBuffers)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
index 394459a..6b009dc 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -29,6 +29,10 @@
#include "ActiveAE.h"
#include "ActiveAEStream.h"
+#if defined(TARGET_RASPBERRY_PI)
+#include "linux/RBP.h"
+#endif
+
using namespace ActiveAE;
/* typecast AE to CActiveAE */
@@ -71,6 +75,7 @@ CActiveAEStream::CActiveAEStream(AEAudioFormat *format, unsigned int streamid)
m_lastPtsJump = 0;
m_errorInterval = 1000;
m_clockSpeed = 1.0;
+ m_pllAdjust = 0.0f;
}
CActiveAEStream::~CActiveAEStream()
@@ -715,8 +720,18 @@ bool CActiveAEStreamBuffers::IsDrained()
return false;
}
-void CActiveAEStreamBuffers::SetRR(double rr, double atempoThreshold)
+void CActiveAEStreamBuffers::SetRR(double rr, double atempoThreshold, double pllAdjustRequest, double pllThreshold, double &pllAdjustActual)
{
+#if defined(TARGET_RASPBERRY_PI)
+ if (pllAdjustRequest > 0.0f) // pll adjust
+ {
+ pllAdjustActual = g_RBP.AdjustHDMIClock(pllAdjustRequest);
+ rr = 1.0;
+ }
+ else
+ pllAdjustActual = g_RBP.AdjustHDMIClock(1.0);
+#endif
+
if (fabs(rr - 1.0) < atempoThreshold)
{
m_resampleBuffers->SetRR(rr);
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
index 927f93e..80ab096 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
@@ -103,7 +103,8 @@ class CActiveAEStreamBuffers
void Flush();
void SetDrain(bool drain);
bool IsDrained();
- void SetRR(double rr, double atempoThreshold);
+ void SetRR(double rr, double atempoThreshold, double pllAdjustRequest, double pllThreshold, double &pllAdjustActual);
+ void SetRR(double rr, double atempoThreshold) { double pllAdjustActual; SetRR(rr, atempoThreshold, 0.0, 0.0, pllAdjustActual); }
double GetRR();
void FillBuffer();
bool DoesNormalize();
diff --git a/xbmc/linux/RBP.cpp b/xbmc/linux/RBP.cpp
index 2efc281..5c0fbaf 100644
--- a/xbmc/linux/RBP.cpp
+++ b/xbmc/linux/RBP.cpp
@@ -49,7 +49,8 @@ CRBP::CRBP()
m_DllBcmHost = new DllBcmHost();
m_OMX = new COMXCore();
m_display = DISPMANX_NO_HANDLE;
- m_last_pll_adjust = 1.0;
+ m_requested_pll_adjust = -1.0;
+ m_actual_pll_adjust = -1.0;
m_p = NULL;
m_x = 0;
m_y = 0;
@@ -166,7 +167,8 @@ void CRBP::CloseDisplay(DISPMANX_DISPLAY_HANDLE_T display)
assert(s == 0);
vc_dispmanx_display_close(m_display);
m_display = DISPMANX_NO_HANDLE;
- m_last_pll_adjust = 1.0;
+ m_requested_pll_adjust = -1.0;
+ m_actual_pll_adjust = -1.0;
}
void CRBP::GetDisplaySize(int &width, int &height)
@@ -529,12 +531,17 @@ void CRBP::uninit_cursor()
double CRBP::AdjustHDMIClock(double adjust)
{
char response[80];
+
+ if (adjust == m_requested_pll_adjust)
+ return m_actual_pll_adjust;
+
+ m_requested_pll_adjust = adjust;
vc_gencmd(response, sizeof response, "hdmi_adjust_clock %f", adjust);
char *p = strchr(response, '=');
if (p)
- m_last_pll_adjust = atof(p+1);
- CLog::Log(LOGDEBUG, "CRBP::%s(%.4f) = %.4f", __func__, adjust, m_last_pll_adjust);
- return m_last_pll_adjust;
+ m_actual_pll_adjust = atof(p+1);
+ CLog::Log(LOGDEBUG, "CRBP::%s(%.5f) = %.5f", __func__, adjust, m_actual_pll_adjust);
+ return m_actual_pll_adjust;
}
#include "cores/VideoPlayer/DVDClock.h"
diff --git a/xbmc/linux/RBP.h b/xbmc/linux/RBP.h
index 92ed007..9c7f4b1 100644
--- a/xbmc/linux/RBP.h
+++ b/xbmc/linux/RBP.h
@@ -83,7 +83,7 @@ class CRBP
void VSyncCallback();
int GetMBox() { return m_mb; }
double AdjustHDMIClock(double adjust);
- double GetAdjustHDMIClock() { return m_last_pll_adjust; }
+ double GetAdjustHDMIClock() { return m_actual_pll_adjust; }
void SuspendVideoOutput();
void ResumeVideoOutput();
@@ -112,7 +112,8 @@ class CRBP
int m_x;
int m_y;
bool m_enabled;
- double m_last_pll_adjust;
+ double m_requested_pll_adjust;
+ double m_actual_pll_adjust;
public:
void init_cursor();
void set_cursor(const void *pixels, int width, int height, int hotspot_x, int hotspot_y);

File diff suppressed because it is too large Load Diff

View File

@ -1,185 +0,0 @@
From 1fc5cd103a26697df63075953d6fd556f39c02bd Mon Sep 17 00:00:00 2001
From: popcornmix <popcornmix@gmail.com>
Date: Wed, 26 Oct 2016 23:21:43 +0100
Subject: [PATCH] squash: Restructure the pll adjust code to avoid adjustment
when sync display is disabled
---
.../AudioEngine/Engines/ActiveAE/ActiveAE.cpp | 25 ++++++++--------------
.../Engines/ActiveAE/ActiveAEStream.cpp | 17 ++++++++++++++-
.../AudioEngine/Engines/ActiveAE/ActiveAEStream.h | 3 ++-
xbmc/linux/RBP.cpp | 17 ++++++++++-----
xbmc/linux/RBP.h | 5 +++--
5 files changed, 42 insertions(+), 25 deletions(-)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
index 497b443..68399ab 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAE.cpp
@@ -34,10 +34,6 @@ using namespace ActiveAE;
#include "windowing/WindowingFactory.h"
#include "utils/log.h"
-#if defined(TARGET_RASPBERRY_PI)
-#include "linux/RBP.h"
-#endif
-
#define MAX_CACHE_LEVEL 0.4 // total cache time of stream in seconds
#define MAX_WATER_LEVEL 0.2 // buffered time after stream stages in seconds
#define MAX_BUFFER_TIME 0.1 // max time of a buffer in seconds
@@ -2457,21 +2453,18 @@ CSampleBuffer* CActiveAE::SyncStream(CActiveAEStream *stream)
if (!newerror || stream->m_syncState != CAESyncInfo::AESyncState::SYNC_INSYNC)
return ret;
- if (stream->m_pllAdjust > 0) // pll adjust
- {
-#if defined(TARGET_RASPBERRY_PI)
- double e = std::max(std::min(error / 50.0, 1.0), -1.0);
- double m_plladjust = 1.0 + e * stream->m_pllAdjust;
- double m_last_plladjust = g_RBP.AdjustHDMIClock(m_plladjust);
- CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s pll:%.5f (%.5f) error:%.6f e:%.6f a:%f", __FUNCTION__, m_plladjust, m_last_plladjust, error, e * stream->m_pllAdjust, stream->m_pllAdjust );
-#endif
- }
- else if (stream->m_resampleMode)
+ if (stream->m_resampleMode)
{
if (stream->m_processingBuffers)
{
- stream->m_processingBuffers->SetRR(stream->CalcResampleRatio(error), m_settings.atempoThreshold);
- CLog::Log(LOGDEBUG, "CDVDPlayerAudio::%s rr:%.5f threshold:%.3f error:%.6f", __FUNCTION__, stream->m_processingBuffers->GetRR(), m_settings.atempoThreshold, error);
+ double pllAdjustRequest = 0.0, pllAdjustActual = 0.0, e = 0.0;
+ if (stream->m_pllAdjust > 0.0)
+ {
+ e = std::max(std::min(error / 50.0, 1.0), - 1.0);
+ pllAdjustRequest = 1.0 + e * stream->m_pllAdjust;
+ }
+ stream->m_processingBuffers->SetRR(stream->CalcResampleRatio(error), m_settings.atempoThreshold, pllAdjustRequest, stream->m_pllAdjust, pllAdjustActual);
+ CLog::Log(LOGDEBUG, "ActiveAE::%s pll:%.5f (act:%.5f lim:%.5f) rr:%.5f threshold:%.3f error:%.6f", __FUNCTION__, pllAdjustRequest, pllAdjustActual, stream->m_pllAdjust, stream->m_processingBuffers->GetRR(), m_settings.atempoThreshold, error );
}
}
else if (stream->m_processingBuffers)
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
index 394459a..6b009dc 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.cpp
@@ -29,6 +29,10 @@
#include "ActiveAE.h"
#include "ActiveAEStream.h"
+#if defined(TARGET_RASPBERRY_PI)
+#include "linux/RBP.h"
+#endif
+
using namespace ActiveAE;
/* typecast AE to CActiveAE */
@@ -71,6 +75,7 @@ CActiveAEStream::CActiveAEStream(AEAudioFormat *format, unsigned int streamid)
m_lastPtsJump = 0;
m_errorInterval = 1000;
m_clockSpeed = 1.0;
+ m_pllAdjust = 0.0f;
}
CActiveAEStream::~CActiveAEStream()
@@ -715,8 +720,18 @@ bool CActiveAEStreamBuffers::IsDrained()
return false;
}
-void CActiveAEStreamBuffers::SetRR(double rr, double atempoThreshold)
+void CActiveAEStreamBuffers::SetRR(double rr, double atempoThreshold, double pllAdjustRequest, double pllThreshold, double &pllAdjustActual)
{
+#if defined(TARGET_RASPBERRY_PI)
+ if (pllAdjustRequest > 0.0f) // pll adjust
+ {
+ pllAdjustActual = g_RBP.AdjustHDMIClock(pllAdjustRequest);
+ rr = 1.0;
+ }
+ else
+ pllAdjustActual = g_RBP.AdjustHDMIClock(1.0);
+#endif
+
if (fabs(rr - 1.0) < atempoThreshold)
{
m_resampleBuffers->SetRR(rr);
diff --git a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
index 927f93e..80ab096 100644
--- a/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
+++ b/xbmc/cores/AudioEngine/Engines/ActiveAE/ActiveAEStream.h
@@ -103,7 +103,8 @@ class CActiveAEStreamBuffers
void Flush();
void SetDrain(bool drain);
bool IsDrained();
- void SetRR(double rr, double atempoThreshold);
+ void SetRR(double rr, double atempoThreshold, double pllAdjustRequest, double pllThreshold, double &pllAdjustActual);
+ void SetRR(double rr, double atempoThreshold) { double pllAdjustActual; SetRR(rr, atempoThreshold, 0.0, 0.0, pllAdjustActual); }
double GetRR();
void FillBuffer();
bool DoesNormalize();
diff --git a/xbmc/linux/RBP.cpp b/xbmc/linux/RBP.cpp
index 2efc281..5c0fbaf 100644
--- a/xbmc/linux/RBP.cpp
+++ b/xbmc/linux/RBP.cpp
@@ -49,7 +49,8 @@ CRBP::CRBP()
m_DllBcmHost = new DllBcmHost();
m_OMX = new COMXCore();
m_display = DISPMANX_NO_HANDLE;
- m_last_pll_adjust = 1.0;
+ m_requested_pll_adjust = -1.0;
+ m_actual_pll_adjust = -1.0;
m_p = NULL;
m_x = 0;
m_y = 0;
@@ -166,7 +167,8 @@ void CRBP::CloseDisplay(DISPMANX_DISPLAY_HANDLE_T display)
assert(s == 0);
vc_dispmanx_display_close(m_display);
m_display = DISPMANX_NO_HANDLE;
- m_last_pll_adjust = 1.0;
+ m_requested_pll_adjust = -1.0;
+ m_actual_pll_adjust = -1.0;
}
void CRBP::GetDisplaySize(int &width, int &height)
@@ -529,12 +531,17 @@ void CRBP::uninit_cursor()
double CRBP::AdjustHDMIClock(double adjust)
{
char response[80];
+
+ if (adjust == m_requested_pll_adjust)
+ return m_actual_pll_adjust;
+
+ m_requested_pll_adjust = adjust;
vc_gencmd(response, sizeof response, "hdmi_adjust_clock %f", adjust);
char *p = strchr(response, '=');
if (p)
- m_last_pll_adjust = atof(p+1);
- CLog::Log(LOGDEBUG, "CRBP::%s(%.4f) = %.4f", __func__, adjust, m_last_pll_adjust);
- return m_last_pll_adjust;
+ m_actual_pll_adjust = atof(p+1);
+ CLog::Log(LOGDEBUG, "CRBP::%s(%.5f) = %.5f", __func__, adjust, m_actual_pll_adjust);
+ return m_actual_pll_adjust;
}
#include "cores/VideoPlayer/DVDClock.h"
diff --git a/xbmc/linux/RBP.h b/xbmc/linux/RBP.h
index 92ed007..9c7f4b1 100644
--- a/xbmc/linux/RBP.h
+++ b/xbmc/linux/RBP.h
@@ -83,7 +83,7 @@ class CRBP
void VSyncCallback();
int GetMBox() { return m_mb; }
double AdjustHDMIClock(double adjust);
- double GetAdjustHDMIClock() { return m_last_pll_adjust; }
+ double GetAdjustHDMIClock() { return m_actual_pll_adjust; }
void SuspendVideoOutput();
void ResumeVideoOutput();
@@ -112,7 +112,8 @@ class CRBP
int m_x;
int m_y;
bool m_enabled;
- double m_last_pll_adjust;
+ double m_requested_pll_adjust;
+ double m_actual_pll_adjust;
public:
void init_cursor();
void set_cursor(const void *pixels, int width, int height, int hotspot_x, int hotspot_y);

View File

@ -1,67 +1,76 @@
diff --git a/README.md b/README.md From b11257f5821e2f0bde0833d54697aa8ef7085065 Mon Sep 17 00:00:00 2001
index dfaf4d6..0dffdcf 100644 From: Gerald Dachs <gda@dachsweb.de>
--- a/README.md Date: Thu, 3 Mar 2016 09:38:44 +0100
+++ b/README.md Subject: [PATCH] new adapter for amlogic devices
@@ -93,6 +93,12 @@ To compile in support for Exynos devices, you have to pass the argument -DHAVE_E
cmake -DHAVE_EXYNOS_API=1 .. ---
``` include/cectypes.h | 15 +-
src/libcec/CMakeLists.txt | 3 +
+### Amlogic src/libcec/adapter/AdapterFactory.cpp | 24 +-
+To compile in support for Amlogic devices, you have to pass the argument -DHAVE_AMLOGIC_API=1 to cmake: src/libcec/adapter/Amlogic/AmlogicCEC.h | 41 +++
+``` .../Amlogic/AmlogicCECAdapterCommunication.cpp | 305 +++++++++++++++++++++
+cmake -DHAVE_AMLOGIC_API=1 .. .../Amlogic/AmlogicCECAdapterCommunication.h | 105 +++++++
+``` .../adapter/Amlogic/AmlogicCECAdapterDetection.cpp | 50 ++++
+ .../adapter/Amlogic/AmlogicCECAdapterDetection.h | 46 ++++
### TDA995x src/libcec/cmake/CheckPlatformSupport.cmake | 13 +
To compile in support for TDA995x devices, you have to pass the argument -DHAVE_TDA995X_API=1 to cmake: src/libcec/cmake/DisplayPlatformSupport.cmake | 6 +
``` src/libcec/env.h.in | 3 +
11 files changed, 609 insertions(+), 2 deletions(-)
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCEC.h
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterDetection.cpp
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterDetection.h
diff --git a/include/cectypes.h b/include/cectypes.h diff --git a/include/cectypes.h b/include/cectypes.h
index 0fdd48e..b7e1932 100644 index 9c91842..1bc7b52 100644
--- a/include/cectypes.h --- a/include/cectypes.h
+++ b/include/cectypes.h +++ b/include/cectypes.h
@@ -309,6 +309,16 @@ namespace CEC { @@ -276,6 +276,18 @@ namespace CEC {
*/
#define CEC_EXYNOS_VIRTUAL_COM "Exynos" #define CEC_EXYNOS_VIRTUAL_COM "Exynos"
/*! +/*!
+ * the path to use for the Amlogic HDMI CEC device + * the path to use for the Amlogic HDMI CEC device
+ */ + */
+#define CEC_AMLOGIC_PATH "/dev/AmlogicCEC" +#define CEC_AMLOGIC_PATH "/dev/AmlogicCEC"
+ +
+/*! +/*!
+ * the name of the virtual COM port to use for the AMLOGIC' CEC wire + * the name of the virtual COM port to use for the AMLOGIC' CEC wire
+ */ + */
+#define CEC_AMLOGIC_VIRTUAL_COM "Amlogic" +#define CEC_AMLOGIC_VIRTUAL_COM "Amlogic"
+ +
+/*! +/*!
* Mimimum client version +
/**
* Maximum size of a data packet
*/ */
#define CEC_MIN_LIB_VERSION 3 @@ -861,7 +873,8 @@ typedef enum cec_adapter_type
@@ -877,7 +887,8 @@ typedef enum cec_adapter_type
ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
ADAPTERTYPE_RPI = 0x100, ADAPTERTYPE_RPI = 0x100,
ADAPTERTYPE_TDA995x = 0x200, ADAPTERTYPE_TDA995x = 0x200,
- ADAPTERTYPE_EXYNOS = 0x300 ADAPTERTYPE_EXYNOS = 0x300,
+ ADAPTERTYPE_EXYNOS = 0x300, - ADAPTERTYPE_AOCEC = 0x500
+ ADAPTERTYPE_AMLOGIC = 0x500 + ADAPTERTYPE_AOCEC = 0x500,
+ ADAPTERTYPE_AMLOGIC = 0x600
} cec_adapter_type; } cec_adapter_type;
/** force exporting through swig */ /** force exporting through swig */
diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt
index a494533..e94b094 100644 index d3eefa3..125512b 100644
--- a/src/libcec/CMakeLists.txt --- a/src/libcec/CMakeLists.txt
+++ b/src/libcec/CMakeLists.txt +++ b/src/libcec/CMakeLists.txt
@@ -87,6 +87,9 @@ set(CEC_HEADERS devices/CECRecordingDevice.h @@ -87,6 +87,9 @@ set(CEC_HEADERS devices/CECRecordingDevice.h
adapter/Exynos/ExynosCEC.h adapter/Exynos/ExynosCEC.h
adapter/Exynos/ExynosCECAdapterDetection.h adapter/Exynos/ExynosCECAdapterDetection.h
adapter/Exynos/ExynosCECAdapterCommunication.h adapter/Exynos/ExynosCECAdapterCommunication.h
+ adapter/Amlogic/AmlogicCEC.h + adapter/Amlogic/AmlogicCEC.h
+ adapter/Amlogic/AmlogicCECAdapterDetection.h + adapter/Amlogic/AmlogicCECAdapterDetection.h
+ adapter/Amlogic/AmlogicCECAdapterCommunication.h + adapter/Amlogic/AmlogicCECAdapterCommunication.h
adapter/Pulse-Eight/USBCECAdapterMessageQueue.h adapter/AOCEC/AOCEC.h
adapter/Pulse-Eight/USBCECAdapterCommunication.h adapter/AOCEC/AOCECAdapterDetection.h
adapter/Pulse-Eight/USBCECAdapterCommands.h adapter/AOCEC/AOCECAdapterCommunication.h
diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp
index da05725..824c5ff 100644 index 1e946e6..7c26214 100644
--- a/src/libcec/adapter/AdapterFactory.cpp --- a/src/libcec/adapter/AdapterFactory.cpp
+++ b/src/libcec/adapter/AdapterFactory.cpp +++ b/src/libcec/adapter/AdapterFactory.cpp
@@ -58,6 +58,11 @@ @@ -58,6 +58,11 @@
@ -73,10 +82,10 @@ index da05725..824c5ff 100644
+#include "Amlogic/AmlogicCECAdapterCommunication.h" +#include "Amlogic/AmlogicCECAdapterCommunication.h"
+#endif +#endif
+ +
using namespace CEC; #if defined(HAVE_AOCEC_API)
#include "AOCEC/AOCECAdapterDetection.h"
int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */) #include "AOCEC/AOCECAdapterCommunication.h"
@@ -126,8 +131,20 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8 @@ -143,6 +148,18 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
} }
#endif #endif
@ -93,23 +102,22 @@ index da05725..824c5ff 100644
+#endif +#endif
+ +
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) #if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_AOCEC_API)
+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_AMLOGIC_API)
#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"
@@ -177,7 +194,12 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
#endif #endif
@@ -146,6 +163,11 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_ -#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API)
return new CExynosCECAdapterCommunication(m_lib->m_cec);
#endif
+#if defined(HAVE_AMLOGIC_API) +#if defined(HAVE_AMLOGIC_API)
+ if (!strcmp(strPort, CEC_AMLOGIC_VIRTUAL_COM)) + if (!strcmp(strPort, CEC_AMLOGIC_VIRTUAL_COM))
+ return new CAmlogicCECAdapterCommunication(m_lib->m_cec); + return new CAmlogicCECAdapterCommunication(m_lib->m_cec);
+#endif +#endif
+ +
#if defined(HAVE_RPI_API) +#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API) && !defined(HAVE_AMLOGIC_API)
if (!strcmp(strPort, CEC_RPI_VIRTUAL_COM)) return NULL;
return new CRPiCECAdapterCommunication(m_lib->m_cec); #endif
}
diff --git a/src/libcec/adapter/Amlogic/AmlogicCEC.h b/src/libcec/adapter/Amlogic/AmlogicCEC.h diff --git a/src/libcec/adapter/Amlogic/AmlogicCEC.h b/src/libcec/adapter/Amlogic/AmlogicCEC.h
new file mode 100644 new file mode 100644
index 0000000..7b86982 index 0000000..7b86982
@ -162,7 +170,7 @@ new file mode 100644
index 0000000..5aeddda index 0000000..5aeddda
--- /dev/null --- /dev/null
+++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp +++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp
@@ -0,0 +1,305 @@ @@ -0,0 +1,306 @@
+/* +/*
+ * This file is part of the libCEC(R) library. + * This file is part of the libCEC(R) library.
+ * + *
@ -417,7 +425,8 @@ index 0000000..5aeddda
+ +
+ if (fd == INVALID_SOCKET_VALUE) + if (fd == INVALID_SOCKET_VALUE)
+ { + {
+ break; + Sleep(250);
+ continue;
+ } + }
+ +
+ FD_ZERO(&rfds); + FD_ZERO(&rfds);
@ -688,22 +697,21 @@ index 0000000..8a7418d
+ }; + };
+} +}
diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
index b8a16c8..311cb52 100644 index 532f213..382c39c 100644
--- a/src/libcec/cmake/CheckPlatformSupport.cmake --- a/src/libcec/cmake/CheckPlatformSupport.cmake
+++ b/src/libcec/cmake/CheckPlatformSupport.cmake +++ b/src/libcec/cmake/CheckPlatformSupport.cmake
@@ -9,6 +9,7 @@ @@ -11,6 +11,7 @@
# HAVE_RPI_API 1 if Raspberry Pi is supported # HAVE_EXYNOS_API ON if Exynos is supported
# HAVE_TDA995X_API 1 if TDA995X is supported # HAVE_AOCEC_API ON if AOCEC is supported
# HAVE_EXYNOS_API 1 if Exynos is supported # HAVE_P8_USB ON if Pulse-Eight devices are supported
+# HAVE_AMLOGIC_API 1 if Amlogic is supported +# HAVE_AMLOGIC_API 1 if AMLOGIC is supported
# HAVE_P8_USB 1 if Pulse-Eight devices are supported # HAVE_P8_USB_DETECT ON if Pulse-Eight devices can be auto-detected
# HAVE_P8_USB_DETECT 1 if Pulse-Eight devices can be auto-detected # HAVE_DRM_EDID_PARSER ON if DRM EDID parsing is supported
# HAVE_DRM_EDID_PARSER 1 if DRM EDID parsing is supported #
@@ -132,6 +133,18 @@ else() @@ -137,6 +138,18 @@ else()
else() list(APPEND CEC_SOURCES ${CEC_SOURCES_ADAPTER_EXYNOS})
set(HAVE_EXYNOS_API 0)
endif() endif()
+
+ # Amlogic + # Amlogic
+ if (${HAVE_AMLOGIC_API}) + if (${HAVE_AMLOGIC_API})
+ set(LIB_INFO "${LIB_INFO}, Amlogic") + set(LIB_INFO "${LIB_INFO}, Amlogic")
@ -715,15 +723,16 @@ index b8a16c8..311cb52 100644
+ else() + else()
+ set(HAVE_AMLOGIC_API 0) + set(HAVE_AMLOGIC_API 0)
+ endif() + endif()
endif() +
# AOCEC
# rt if (${HAVE_AOCEC_API})
set(LIB_INFO "${LIB_INFO}, AOCEC")
diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake
index 9dcaacf..464252e 100644 index 7ec10f5..7a38d32 100644
--- a/src/libcec/cmake/DisplayPlatformSupport.cmake --- a/src/libcec/cmake/DisplayPlatformSupport.cmake
+++ b/src/libcec/cmake/DisplayPlatformSupport.cmake +++ b/src/libcec/cmake/DisplayPlatformSupport.cmake
@@ -44,6 +44,12 @@ else() @@ -56,5 +56,11 @@ else()
message(STATUS "DRM support: no") message(STATUS "Python support: no")
endif() endif()
+if (HAVE_AMLOGIC_API) +if (HAVE_AMLOGIC_API)
@ -732,20 +741,22 @@ index 9dcaacf..464252e 100644
+ message(STATUS "Amlogic support: no") + message(STATUS "Amlogic support: no")
+endif() +endif()
+ +
if (HAVE_PYTHON) message(STATUS "lib info: ${LIB_INFO}")
message(STATUS "Python support: version ${PYTHONLIBS_VERSION_STRING} (${PYTHON_VERSION})")
else()
diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in
index 0496aa0..971f769 100644 index fe6c83d..09304e1 100644
--- a/src/libcec/env.h.in --- a/src/libcec/env.h.in
+++ b/src/libcec/env.h.in +++ b/src/libcec/env.h.in
@@ -72,6 +72,9 @@ @@ -78,6 +78,9 @@
/* Define to 1 for Exynos support */ /* Define to 1 for nVidia EDID parsing support (on selected models) */
#cmakedefine HAVE_EXYNOS_API @HAVE_EXYNOS_API@ #cmakedefine HAVE_NVIDIA_EDID_PARSER @HAVE_NVIDIA_EDID_PARSER@
+/* Define to 1 for Amlogic support */ +/* Define to 1 for Amlogic support */
+#cmakedefine HAVE_AMLOGIC_API @HAVE_AMLOGIC_API@ +#cmakedefine HAVE_AMLOGIC_API @HAVE_AMLOGIC_API@
+ +
/* Define to 1 for nVidia EDID parsing support (on selected models) */ /* Define to 1 for DRM EDID parsing support */
#cmakedefine HAVE_NVIDIA_EDID_PARSER @HAVE_NVIDIA_EDID_PARSER@ #cmakedefine HAVE_DRM_EDID_PARSER @HAVE_DRM_EDID_PARSER@
--
2.7.4

View File

@ -1,67 +1,76 @@
diff --git a/README.md b/README.md From b11257f5821e2f0bde0833d54697aa8ef7085065 Mon Sep 17 00:00:00 2001
index dfaf4d6..0dffdcf 100644 From: Gerald Dachs <gda@dachsweb.de>
--- a/README.md Date: Thu, 3 Mar 2016 09:38:44 +0100
+++ b/README.md Subject: [PATCH] new adapter for amlogic devices
@@ -93,6 +93,12 @@ To compile in support for Exynos devices, you have to pass the argument -DHAVE_E
cmake -DHAVE_EXYNOS_API=1 .. ---
``` include/cectypes.h | 15 +-
src/libcec/CMakeLists.txt | 3 +
+### Amlogic src/libcec/adapter/AdapterFactory.cpp | 24 +-
+To compile in support for Amlogic devices, you have to pass the argument -DHAVE_AMLOGIC_API=1 to cmake: src/libcec/adapter/Amlogic/AmlogicCEC.h | 41 +++
+``` .../Amlogic/AmlogicCECAdapterCommunication.cpp | 305 +++++++++++++++++++++
+cmake -DHAVE_AMLOGIC_API=1 .. .../Amlogic/AmlogicCECAdapterCommunication.h | 105 +++++++
+``` .../adapter/Amlogic/AmlogicCECAdapterDetection.cpp | 50 ++++
+ .../adapter/Amlogic/AmlogicCECAdapterDetection.h | 46 ++++
### TDA995x src/libcec/cmake/CheckPlatformSupport.cmake | 13 +
To compile in support for TDA995x devices, you have to pass the argument -DHAVE_TDA995X_API=1 to cmake: src/libcec/cmake/DisplayPlatformSupport.cmake | 6 +
``` src/libcec/env.h.in | 3 +
11 files changed, 609 insertions(+), 2 deletions(-)
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCEC.h
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.h
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterDetection.cpp
create mode 100644 src/libcec/adapter/Amlogic/AmlogicCECAdapterDetection.h
diff --git a/include/cectypes.h b/include/cectypes.h diff --git a/include/cectypes.h b/include/cectypes.h
index 0fdd48e..b7e1932 100644 index 9c91842..1bc7b52 100644
--- a/include/cectypes.h --- a/include/cectypes.h
+++ b/include/cectypes.h +++ b/include/cectypes.h
@@ -309,6 +309,16 @@ namespace CEC { @@ -276,6 +276,18 @@ namespace CEC {
*/
#define CEC_EXYNOS_VIRTUAL_COM "Exynos" #define CEC_EXYNOS_VIRTUAL_COM "Exynos"
/*! +/*!
+ * the path to use for the Amlogic HDMI CEC device + * the path to use for the Amlogic HDMI CEC device
+ */ + */
+#define CEC_AMLOGIC_PATH "/dev/AmlogicCEC" +#define CEC_AMLOGIC_PATH "/dev/AmlogicCEC"
+ +
+/*! +/*!
+ * the name of the virtual COM port to use for the AMLOGIC' CEC wire + * the name of the virtual COM port to use for the AMLOGIC' CEC wire
+ */ + */
+#define CEC_AMLOGIC_VIRTUAL_COM "Amlogic" +#define CEC_AMLOGIC_VIRTUAL_COM "Amlogic"
+ +
+/*! +/*!
* Mimimum client version +
/**
* Maximum size of a data packet
*/ */
#define CEC_MIN_LIB_VERSION 3 @@ -861,7 +873,8 @@ typedef enum cec_adapter_type
@@ -877,7 +887,8 @@ typedef enum cec_adapter_type
ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2,
ADAPTERTYPE_RPI = 0x100, ADAPTERTYPE_RPI = 0x100,
ADAPTERTYPE_TDA995x = 0x200, ADAPTERTYPE_TDA995x = 0x200,
- ADAPTERTYPE_EXYNOS = 0x300 ADAPTERTYPE_EXYNOS = 0x300,
+ ADAPTERTYPE_EXYNOS = 0x300, - ADAPTERTYPE_AOCEC = 0x500
+ ADAPTERTYPE_AMLOGIC = 0x500 + ADAPTERTYPE_AOCEC = 0x500,
+ ADAPTERTYPE_AMLOGIC = 0x600
} cec_adapter_type; } cec_adapter_type;
/** force exporting through swig */ /** force exporting through swig */
diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt diff --git a/src/libcec/CMakeLists.txt b/src/libcec/CMakeLists.txt
index a494533..e94b094 100644 index d3eefa3..125512b 100644
--- a/src/libcec/CMakeLists.txt --- a/src/libcec/CMakeLists.txt
+++ b/src/libcec/CMakeLists.txt +++ b/src/libcec/CMakeLists.txt
@@ -87,6 +87,9 @@ set(CEC_HEADERS devices/CECRecordingDevice.h @@ -87,6 +87,9 @@ set(CEC_HEADERS devices/CECRecordingDevice.h
adapter/Exynos/ExynosCEC.h adapter/Exynos/ExynosCEC.h
adapter/Exynos/ExynosCECAdapterDetection.h adapter/Exynos/ExynosCECAdapterDetection.h
adapter/Exynos/ExynosCECAdapterCommunication.h adapter/Exynos/ExynosCECAdapterCommunication.h
+ adapter/Amlogic/AmlogicCEC.h + adapter/Amlogic/AmlogicCEC.h
+ adapter/Amlogic/AmlogicCECAdapterDetection.h + adapter/Amlogic/AmlogicCECAdapterDetection.h
+ adapter/Amlogic/AmlogicCECAdapterCommunication.h + adapter/Amlogic/AmlogicCECAdapterCommunication.h
adapter/Pulse-Eight/USBCECAdapterMessageQueue.h adapter/AOCEC/AOCEC.h
adapter/Pulse-Eight/USBCECAdapterCommunication.h adapter/AOCEC/AOCECAdapterDetection.h
adapter/Pulse-Eight/USBCECAdapterCommands.h adapter/AOCEC/AOCECAdapterCommunication.h
diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp diff --git a/src/libcec/adapter/AdapterFactory.cpp b/src/libcec/adapter/AdapterFactory.cpp
index da05725..824c5ff 100644 index 1e946e6..7c26214 100644
--- a/src/libcec/adapter/AdapterFactory.cpp --- a/src/libcec/adapter/AdapterFactory.cpp
+++ b/src/libcec/adapter/AdapterFactory.cpp +++ b/src/libcec/adapter/AdapterFactory.cpp
@@ -58,6 +58,11 @@ @@ -58,6 +58,11 @@
@ -73,10 +82,10 @@ index da05725..824c5ff 100644
+#include "Amlogic/AmlogicCECAdapterCommunication.h" +#include "Amlogic/AmlogicCECAdapterCommunication.h"
+#endif +#endif
+ +
using namespace CEC; #if defined(HAVE_AOCEC_API)
#include "AOCEC/AOCECAdapterDetection.h"
int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize, const char *strDevicePath /* = NULL */) #include "AOCEC/AOCECAdapterCommunication.h"
@@ -126,8 +131,20 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8 @@ -143,6 +148,18 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8
} }
#endif #endif
@ -93,23 +102,22 @@ index da05725..824c5ff 100644
+#endif +#endif
+ +
-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) #if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_AOCEC_API)
+#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_AMLOGIC_API)
#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"
@@ -177,7 +194,12 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate);
#endif #endif
@@ -146,6 +163,11 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_ -#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API)
return new CExynosCECAdapterCommunication(m_lib->m_cec);
#endif
+#if defined(HAVE_AMLOGIC_API) +#if defined(HAVE_AMLOGIC_API)
+ if (!strcmp(strPort, CEC_AMLOGIC_VIRTUAL_COM)) + if (!strcmp(strPort, CEC_AMLOGIC_VIRTUAL_COM))
+ return new CAmlogicCECAdapterCommunication(m_lib->m_cec); + return new CAmlogicCECAdapterCommunication(m_lib->m_cec);
+#endif +#endif
+ +
#if defined(HAVE_RPI_API) +#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_EXYNOS_API) && !defined(HAVE_AMLOGIC_API)
if (!strcmp(strPort, CEC_RPI_VIRTUAL_COM)) return NULL;
return new CRPiCECAdapterCommunication(m_lib->m_cec); #endif
}
diff --git a/src/libcec/adapter/Amlogic/AmlogicCEC.h b/src/libcec/adapter/Amlogic/AmlogicCEC.h diff --git a/src/libcec/adapter/Amlogic/AmlogicCEC.h b/src/libcec/adapter/Amlogic/AmlogicCEC.h
new file mode 100644 new file mode 100644
index 0000000..7b86982 index 0000000..7b86982
@ -162,7 +170,7 @@ new file mode 100644
index 0000000..5aeddda index 0000000..5aeddda
--- /dev/null --- /dev/null
+++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp +++ b/src/libcec/adapter/Amlogic/AmlogicCECAdapterCommunication.cpp
@@ -0,0 +1,305 @@ @@ -0,0 +1,306 @@
+/* +/*
+ * This file is part of the libCEC(R) library. + * This file is part of the libCEC(R) library.
+ * + *
@ -417,7 +425,8 @@ index 0000000..5aeddda
+ +
+ if (fd == INVALID_SOCKET_VALUE) + if (fd == INVALID_SOCKET_VALUE)
+ { + {
+ break; + Sleep(250);
+ continue;
+ } + }
+ +
+ FD_ZERO(&rfds); + FD_ZERO(&rfds);
@ -688,22 +697,21 @@ index 0000000..8a7418d
+ }; + };
+} +}
diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake diff --git a/src/libcec/cmake/CheckPlatformSupport.cmake b/src/libcec/cmake/CheckPlatformSupport.cmake
index b8a16c8..311cb52 100644 index 532f213..382c39c 100644
--- a/src/libcec/cmake/CheckPlatformSupport.cmake --- a/src/libcec/cmake/CheckPlatformSupport.cmake
+++ b/src/libcec/cmake/CheckPlatformSupport.cmake +++ b/src/libcec/cmake/CheckPlatformSupport.cmake
@@ -9,6 +9,7 @@ @@ -11,6 +11,7 @@
# HAVE_RPI_API 1 if Raspberry Pi is supported # HAVE_EXYNOS_API ON if Exynos is supported
# HAVE_TDA995X_API 1 if TDA995X is supported # HAVE_AOCEC_API ON if AOCEC is supported
# HAVE_EXYNOS_API 1 if Exynos is supported # HAVE_P8_USB ON if Pulse-Eight devices are supported
+# HAVE_AMLOGIC_API 1 if Amlogic is supported +# HAVE_AMLOGIC_API 1 if AMLOGIC is supported
# HAVE_P8_USB 1 if Pulse-Eight devices are supported # HAVE_P8_USB_DETECT ON if Pulse-Eight devices can be auto-detected
# HAVE_P8_USB_DETECT 1 if Pulse-Eight devices can be auto-detected # HAVE_DRM_EDID_PARSER ON if DRM EDID parsing is supported
# HAVE_DRM_EDID_PARSER 1 if DRM EDID parsing is supported #
@@ -132,6 +133,18 @@ else() @@ -137,6 +138,18 @@ else()
else() list(APPEND CEC_SOURCES ${CEC_SOURCES_ADAPTER_EXYNOS})
set(HAVE_EXYNOS_API 0)
endif() endif()
+
+ # Amlogic + # Amlogic
+ if (${HAVE_AMLOGIC_API}) + if (${HAVE_AMLOGIC_API})
+ set(LIB_INFO "${LIB_INFO}, Amlogic") + set(LIB_INFO "${LIB_INFO}, Amlogic")
@ -715,15 +723,16 @@ index b8a16c8..311cb52 100644
+ else() + else()
+ set(HAVE_AMLOGIC_API 0) + set(HAVE_AMLOGIC_API 0)
+ endif() + endif()
endif() +
# AOCEC
# rt if (${HAVE_AOCEC_API})
set(LIB_INFO "${LIB_INFO}, AOCEC")
diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake diff --git a/src/libcec/cmake/DisplayPlatformSupport.cmake b/src/libcec/cmake/DisplayPlatformSupport.cmake
index 9dcaacf..464252e 100644 index 7ec10f5..7a38d32 100644
--- a/src/libcec/cmake/DisplayPlatformSupport.cmake --- a/src/libcec/cmake/DisplayPlatformSupport.cmake
+++ b/src/libcec/cmake/DisplayPlatformSupport.cmake +++ b/src/libcec/cmake/DisplayPlatformSupport.cmake
@@ -44,6 +44,12 @@ else() @@ -56,5 +56,11 @@ else()
message(STATUS "DRM support: no") message(STATUS "Python support: no")
endif() endif()
+if (HAVE_AMLOGIC_API) +if (HAVE_AMLOGIC_API)
@ -732,20 +741,22 @@ index 9dcaacf..464252e 100644
+ message(STATUS "Amlogic support: no") + message(STATUS "Amlogic support: no")
+endif() +endif()
+ +
if (HAVE_PYTHON) message(STATUS "lib info: ${LIB_INFO}")
message(STATUS "Python support: version ${PYTHONLIBS_VERSION_STRING} (${PYTHON_VERSION})")
else()
diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in diff --git a/src/libcec/env.h.in b/src/libcec/env.h.in
index 0496aa0..971f769 100644 index fe6c83d..09304e1 100644
--- a/src/libcec/env.h.in --- a/src/libcec/env.h.in
+++ b/src/libcec/env.h.in +++ b/src/libcec/env.h.in
@@ -72,6 +72,9 @@ @@ -78,6 +78,9 @@
/* Define to 1 for Exynos support */ /* Define to 1 for nVidia EDID parsing support (on selected models) */
#cmakedefine HAVE_EXYNOS_API @HAVE_EXYNOS_API@ #cmakedefine HAVE_NVIDIA_EDID_PARSER @HAVE_NVIDIA_EDID_PARSER@
+/* Define to 1 for Amlogic support */ +/* Define to 1 for Amlogic support */
+#cmakedefine HAVE_AMLOGIC_API @HAVE_AMLOGIC_API@ +#cmakedefine HAVE_AMLOGIC_API @HAVE_AMLOGIC_API@
+ +
/* Define to 1 for nVidia EDID parsing support (on selected models) */ /* Define to 1 for DRM EDID parsing support */
#cmakedefine HAVE_NVIDIA_EDID_PARSER @HAVE_NVIDIA_EDID_PARSER@ #cmakedefine HAVE_DRM_EDID_PARSER @HAVE_DRM_EDID_PARSER@
--
2.7.4

File diff suppressed because it is too large Load Diff