renamed CuBox and NXP* to TDA995x
authorLars Op den Kamp <lars@opdenkamp.eu>
Wed, 31 Oct 2012 14:45:14 +0000 (15:45 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Wed, 31 Oct 2012 14:48:52 +0000 (15:48 +0100)
README
configure.ac
src/lib/Makefile.am
src/lib/adapter/AdapterFactory.cpp
src/lib/adapter/TDA995x/AdapterMessageQueue.h [moved from src/lib/adapter/CuBox/AdapterMessageQueue.h with 100% similarity]
src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp [moved from src/lib/adapter/CuBox/NxpCECAdapterCommunication.cpp with 89% similarity]
src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.h [moved from src/lib/adapter/CuBox/NxpCECAdapterCommunication.h with 88% similarity]
src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.cpp [moved from src/lib/adapter/CuBox/NxpCECAdapterDetection.cpp with 94% similarity]
src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.h [moved from src/lib/adapter/CuBox/NxpCECAdapterDetection.h with 97% similarity]

diff --git a/README b/README
index 46c30d209aad56ca4644ad1ff36180709382ba95..f25c53946cbc5d64fd1772c48977a9fa3f0f191d 100644 (file)
--- a/README
+++ b/README
@@ -100,15 +100,15 @@ for 'configure':
 --with-rpi-lib-path="/path/to/libbcm_host.so"
 
 ===============================================================================
-                           === CuBox ===
+                           === CuBox / TDA995x ===
 ===============================================================================
 
 Solid-Run's CuBox uses a combined HDMI tranceiver / CEC controller by NXP. The
 device driver for it is based on an SDK by the chip vendor and is compiled into
 the Linux kernel. The following options for 'configure' have been introduced:
 
-To enable support for the CuBox:
---enable-cubox
+To enable support for the CuBox / TDA995x:
+--enable-tda995x
 
 To specify the path to the SDK part of the kernel driver:
 --with-tda995x-toolkit-path='path/to/linux/drivers/video/dovefb/nxp_hdmi'
index df63c2d3f86e7df4b1aee298020fff1c4d98f378..45d969b7aba2e56e259b53fc90cf468312d9f434 100644 (file)
@@ -43,10 +43,10 @@ AC_ARG_ENABLE([optimisation],
   [use_optimisation=$enableval],
   [use_optimisation=yes])
 
-## CuBox support
+## TDA995x support
 AC_ARG_ENABLE([cubox],
-  [AS_HELP_STRING([--enable-cubox],
-  [enable support for the CuBox (default is no)])],
+  [AS_HELP_STRING([--enable-tda995x],
+  [enable support for the TDA995x (default is no)])],
   [use_tda995x=$enableval],
   [use_tda995x=no])
 
@@ -250,16 +250,16 @@ else
   features="$features\n  Raspberry Pi support :\t\tno"
 fi
 
-## mark CuBox support as available
+## mark TDA995x support as available
 if test "x$use_tda995x" != "xno"; then
   AC_DEFINE([HAVE_TDA995X_API],[1],[Define to 1 to include CuBox support])
   AM_CONDITIONAL(USE_TDA995X_API, true)
-  features="$features\n  CuBox support :\t\t\tyes"
-  LIB_INFO="$LIB_INFO 'CuBox'"
+  features="$features\n  TDA995x support :\t\t\tyes"
+  LIB_INFO="$LIB_INFO 'TDA995x'"
   CPPFLAGS="$CPPFLAGS $TDA995X_CFLAGS"
 else
   AM_CONDITIONAL(USE_TDA995X_API, false)
-  features="$features\n  CuBox support :\t\t\tno"
+  features="$features\n  TDA995x support :\t\t\tno"
 fi
 
 ## check if our build system is complete
index b88b02baf1ac1be7f3389fc07ada17d64ee0274c..ab00f1bb04d4ab1c0df120d10e19016d2aed0de9 100644 (file)
@@ -52,8 +52,8 @@ endif
 
 ## CuBox (NXP) support
 if USE_TDA995X_API
-libcec_la_SOURCES += adapter/CuBox/NxpCECAdapterDetection.cpp \
-                     adapter/CuBox/NxpCECAdapterCommunication.cpp
+libcec_la_SOURCES += adapter/TDA995x/TDA995xCECAdapterDetection.cpp \
+                     adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
 endif
 
 
index d1dae84ac69b0de80e7f0ceebcbaeefe272277ab..02b6200e1616674964f34af5459cc9955ffe6a22 100644 (file)
@@ -48,8 +48,8 @@
 #endif
 
 #if defined(HAVE_TDA995X_API)
-#include "CuBox/NxpCECAdapterDetection.h"
-#include "CuBox/NxpCECAdapterCommunication.h"
+#include "TDA995x/TDA995xCECAdapterDetection.h"
+#include "TDA995x/TDA995xCECAdapterCommunication.h"
 #endif
 
 using namespace std;
@@ -81,7 +81,7 @@ int8_t CAdapterFactory::FindAdapters(cec_adapter *deviceList, uint8_t iBufSize,
 #endif
 
 #if defined(HAVE_TDA995X_API)
-  if (iAdaptersFound < iBufSize && CNxpCECAdapterDetection::FindAdapter() &&
+  if (iAdaptersFound < iBufSize && CTDA995xCECAdapterDetection::FindAdapter() &&
       (!strDevicePath || !strcmp(strDevicePath, CEC_TDA995x_VIRTUAL_COM)))
   {
     snprintf(deviceList[iAdaptersFound].path, 1024, CEC_TDA995x_PATH);
@@ -100,7 +100,7 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_
 {
 #if defined(HAVE_TDA995X_API)
   if (!strcmp(strPort, CEC_TDA995x_VIRTUAL_COM))
-    return new CNxpCECAdapterCommunication(m_lib->m_cec);
+    return new CTDA995xCECAdapterCommunication(m_lib->m_cec);
 #endif
 
 #if defined(HAVE_RPI_API)
similarity index 89%
rename from src/lib/adapter/CuBox/NxpCECAdapterCommunication.cpp
rename to src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp
index e46f94e63055f24f322e75f6b14a0866311600a7..83df1199b26a9fe0a801c1cb02b01761eac6c5e1 100644 (file)
@@ -33,7 +33,7 @@
 #include "env.h"
 
 #if defined(HAVE_TDA995X_API)
-#include "NxpCECAdapterCommunication.h"
+#include "TDA995xCECAdapterCommunication.h"
 
 #include "lib/CECTypeUtils.h"
 #include "lib/LibCEC.h"
@@ -66,7 +66,7 @@ using namespace PLATFORM;
 #define CEC_MSG_FAIL_DATA_NOT_ACK       0x86   /*Message transmisson failed: Databyte not acknowledged*/
 
 
-CNxpCECAdapterCommunication::CNxpCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
+CTDA995xCECAdapterCommunication::CTDA995xCECAdapterCommunication(IAdapterCommunicationCallback *callback) :
     IAdapterCommunication(callback),
     m_bLogicalAddressChanged(false)
 { 
@@ -78,7 +78,7 @@ CNxpCECAdapterCommunication::CNxpCECAdapterCommunication(IAdapterCommunicationCa
 }
 
 
-CNxpCECAdapterCommunication::~CNxpCECAdapterCommunication(void)
+CTDA995xCECAdapterCommunication::~CTDA995xCECAdapterCommunication(void)
 {
   Close();
 
@@ -88,13 +88,13 @@ CNxpCECAdapterCommunication::~CNxpCECAdapterCommunication(void)
 }
 
 
-bool CNxpCECAdapterCommunication::IsOpen(void)
+bool CTDA995xCECAdapterCommunication::IsOpen(void)
 {
   return IsInitialised() && m_dev->IsOpen();
 }
 
     
-bool CNxpCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChecks), bool bStartListening)
+bool CTDA995xCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChecks), bool bStartListening)
 {
   if (m_dev->Open(iTimeoutMs))
   {
@@ -129,7 +129,7 @@ bool CNxpCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChe
 }
 
 
-void CNxpCECAdapterCommunication::Close(void)
+void CTDA995xCECAdapterCommunication::Close(void)
 {
   StopThread(0);
 
@@ -140,14 +140,14 @@ void CNxpCECAdapterCommunication::Close(void)
 }
 
 
-std::string CNxpCECAdapterCommunication::GetError(void) const
+std::string CTDA995xCECAdapterCommunication::GetError(void) const
 {
   std::string strError(m_strError);
   return strError;
 }
 
 
-cec_adapter_message_state CNxpCECAdapterCommunication::Write(
+cec_adapter_message_state CTDA995xCECAdapterCommunication::Write(
   const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply))
 {
   cec_frame frame;
@@ -211,7 +211,7 @@ cec_adapter_message_state CNxpCECAdapterCommunication::Write(
 }
 
 
-uint16_t CNxpCECAdapterCommunication::GetFirmwareVersion(void)
+uint16_t CTDA995xCECAdapterCommunication::GetFirmwareVersion(void)
 {
   cec_sw_version  vers = { 0 };
 
@@ -221,7 +221,7 @@ uint16_t CNxpCECAdapterCommunication::GetFirmwareVersion(void)
 }
 
 
-cec_vendor_id CNxpCECAdapterCommunication::GetVendorId(void)
+cec_vendor_id CTDA995xCECAdapterCommunication::GetVendorId(void)
 {
   cec_raw_info info;
  
@@ -235,7 +235,7 @@ cec_vendor_id CNxpCECAdapterCommunication::GetVendorId(void)
 }
 
 
-uint16_t CNxpCECAdapterCommunication::GetPhysicalAddress(void)
+uint16_t CTDA995xCECAdapterCommunication::GetPhysicalAddress(void)
 {
   cec_raw_info info;
  
@@ -249,7 +249,7 @@ uint16_t CNxpCECAdapterCommunication::GetPhysicalAddress(void)
 }
 
 
-cec_logical_addresses CNxpCECAdapterCommunication::GetLogicalAddresses(void)
+cec_logical_addresses CTDA995xCECAdapterCommunication::GetLogicalAddresses(void)
 {
   CLockObject lock(m_mutex);
 
@@ -280,7 +280,7 @@ cec_logical_addresses CNxpCECAdapterCommunication::GetLogicalAddresses(void)
 }
 
 
-bool CNxpCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses)
+bool CTDA995xCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses)
 {
   unsigned char log_addr = addresses.primary;
   
@@ -308,7 +308,7 @@ bool CNxpCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresse
 }
 
 
-void CNxpCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress))
+void CTDA995xCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address UNUSED(oldAddress))
 {
   unsigned char log_addr = CECDEVICE_BROADCAST;
 
@@ -319,7 +319,7 @@ void CNxpCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address U
 }
 
 
-void *CNxpCECAdapterCommunication::Process(void)
+void *CTDA995xCECAdapterCommunication::Process(void)
 {
   bool bHandled;
   cec_frame frame;
similarity index 88%
rename from src/lib/adapter/CuBox/NxpCECAdapterCommunication.h
rename to src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.h
index 42e611a0f687df5270dd724f2b3c7ab9e5534d5a..9476383d2edf7bb9b63f3ea48a993ca37bdc4d93 100644 (file)
@@ -39,8 +39,8 @@
 #include "lib/adapter/AdapterCommunication.h"
 #include <map>
 
-#define NXP_ADAPTER_VID 0x0471
-#define NXP_ADAPTER_PID 0x1001
+#define TDA995X_ADAPTER_VID 0x0471
+#define TDA995X_ADAPTER_PID 0x1001
 
 namespace PLATFORM
 {
@@ -52,15 +52,15 @@ namespace CEC
 {
   class CAdapterMessageQueueEntry;
 
-  class CNxpCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread
+  class CTDA995xCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread
   {
   public:
     /*!
      * @brief Create a new USB-CEC communication handler.
      * @param callback The callback to use for incoming CEC commands.
      */
-    CNxpCECAdapterCommunication(IAdapterCommunicationCallback *callback);
-    virtual ~CNxpCECAdapterCommunication(void);
+    CTDA995xCECAdapterCommunication(IAdapterCommunicationCallback *callback);
+    virtual ~CTDA995xCECAdapterCommunication(void);
 
     /** @name IAdapterCommunication implementation */
     ///{
@@ -80,14 +80,14 @@ namespace CEC
     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("NXP"); }
+    std::string GetPortName(void) { return std::string("TDA995X"); }
     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_TDA995x; }
-    uint16_t GetAdapterVendorId(void) const { return NXP_ADAPTER_VID; }
-    uint16_t GetAdapterProductId(void) const { return NXP_ADAPTER_PID; }
+    uint16_t GetAdapterVendorId(void) const { return TDA995X_ADAPTER_VID; }
+    uint16_t GetAdapterProductId(void) const { return TDA995X_ADAPTER_PID; }
     void HandleLogicalAddressLost(cec_logical_address oldAddress);
     ///}
 
similarity index 94%
rename from src/lib/adapter/CuBox/NxpCECAdapterDetection.cpp
rename to src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.cpp
index b4b7495a908f8efecc55a961032b934d313a8def..a355f78b99d4d558b040bb9a2c144976c5eab89c 100644 (file)
@@ -34,7 +34,7 @@
 #include <stdio.h>
 
 #if defined(HAVE_TDA995X_API)
-#include "NxpCECAdapterDetection.h"
+#include "TDA995xCECAdapterDetection.h"
 
 extern "C" {
 #define __cec_h__
@@ -44,7 +44,7 @@ extern "C" {
 
 using namespace CEC;
 
-bool CNxpCECAdapterDetection::FindAdapter(void)
+bool CTDA995xCECAdapterDetection::FindAdapter(void)
 {
   return access(CEC_TDA995x_PATH, 0) == 0;
 }
similarity index 97%
rename from src/lib/adapter/CuBox/NxpCECAdapterDetection.h
rename to src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.h
index dde82a239713af2aeaa18d8e618571d263f8420a..5380663fd8bf1db967bd2dabd6cb7c92c758a7fb 100644 (file)
@@ -33,7 +33,7 @@
 
 namespace CEC
 {
-  class CNxpCECAdapterDetection
+  class CTDA995xCECAdapterDetection
   {
   public:
     static bool FindAdapter(void);