From 79e500268a9468468f800b7d5723787d1d1dc83a Mon Sep 17 00:00:00 2001 From: Lars Op den Kamp Date: Wed, 31 Oct 2012 15:45:14 +0100 Subject: [PATCH] renamed CuBox and NXP* to TDA995x --- README | 6 ++-- configure.ac | 14 ++++----- src/lib/Makefile.am | 4 +-- src/lib/adapter/AdapterFactory.cpp | 8 ++--- .../{CuBox => TDA995x}/AdapterMessageQueue.h | 0 .../TDA995xCECAdapterCommunication.cpp} | 30 +++++++++---------- .../TDA995xCECAdapterCommunication.h} | 16 +++++----- .../TDA995xCECAdapterDetection.cpp} | 4 +-- .../TDA995xCECAdapterDetection.h} | 2 +- 9 files changed, 42 insertions(+), 42 deletions(-) rename src/lib/adapter/{CuBox => TDA995x}/AdapterMessageQueue.h (100%) rename src/lib/adapter/{CuBox/NxpCECAdapterCommunication.cpp => TDA995x/TDA995xCECAdapterCommunication.cpp} (89%) rename src/lib/adapter/{CuBox/NxpCECAdapterCommunication.h => TDA995x/TDA995xCECAdapterCommunication.h} (88%) rename src/lib/adapter/{CuBox/NxpCECAdapterDetection.cpp => TDA995x/TDA995xCECAdapterDetection.cpp} (94%) rename src/lib/adapter/{CuBox/NxpCECAdapterDetection.h => TDA995x/TDA995xCECAdapterDetection.h} (97%) diff --git a/README b/README index 46c30d2..f25c539 100644 --- 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' diff --git a/configure.ac b/configure.ac index df63c2d..45d969b 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index b88b02b..ab00f1b 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -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 diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp index d1dae84..02b6200 100644 --- a/src/lib/adapter/AdapterFactory.cpp +++ b/src/lib/adapter/AdapterFactory.cpp @@ -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) diff --git a/src/lib/adapter/CuBox/AdapterMessageQueue.h b/src/lib/adapter/TDA995x/AdapterMessageQueue.h similarity index 100% rename from src/lib/adapter/CuBox/AdapterMessageQueue.h rename to src/lib/adapter/TDA995x/AdapterMessageQueue.h diff --git a/src/lib/adapter/CuBox/NxpCECAdapterCommunication.cpp b/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp similarity index 89% rename from src/lib/adapter/CuBox/NxpCECAdapterCommunication.cpp rename to src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp index e46f94e..83df119 100644 --- a/src/lib/adapter/CuBox/NxpCECAdapterCommunication.cpp +++ b/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.cpp @@ -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; diff --git a/src/lib/adapter/CuBox/NxpCECAdapterCommunication.h b/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.h similarity index 88% rename from src/lib/adapter/CuBox/NxpCECAdapterCommunication.h rename to src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.h index 42e611a..9476383 100644 --- a/src/lib/adapter/CuBox/NxpCECAdapterCommunication.h +++ b/src/lib/adapter/TDA995x/TDA995xCECAdapterCommunication.h @@ -39,8 +39,8 @@ #include "lib/adapter/AdapterCommunication.h" #include -#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); ///} diff --git a/src/lib/adapter/CuBox/NxpCECAdapterDetection.cpp b/src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.cpp similarity index 94% rename from src/lib/adapter/CuBox/NxpCECAdapterDetection.cpp rename to src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.cpp index b4b7495..a355f78 100644 --- a/src/lib/adapter/CuBox/NxpCECAdapterDetection.cpp +++ b/src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.cpp @@ -34,7 +34,7 @@ #include #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; } diff --git a/src/lib/adapter/CuBox/NxpCECAdapterDetection.h b/src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.h similarity index 97% rename from src/lib/adapter/CuBox/NxpCECAdapterDetection.h rename to src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.h index dde82a2..5380663 100644 --- a/src/lib/adapter/CuBox/NxpCECAdapterDetection.h +++ b/src/lib/adapter/TDA995x/TDA995xCECAdapterDetection.h @@ -33,7 +33,7 @@ namespace CEC { - class CNxpCECAdapterDetection + class CTDA995xCECAdapterDetection { public: static bool FindAdapter(void); -- 2.34.1