Skip to content

Commit

Permalink
renamed CuBox and NXP* to TDA995x
Browse files Browse the repository at this point in the history
  • Loading branch information
opdenkamp committed Oct 31, 2012
1 parent 3828093 commit 79e5002
Show file tree
Hide file tree
Showing 9 changed files with 42 additions and 42 deletions.
6 changes: 3 additions & 3 deletions README
Expand Up @@ -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'
Expand Down
14 changes: 7 additions & 7 deletions configure.ac
Expand Up @@ -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])

Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/lib/Makefile.am
Expand Up @@ -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


Expand Down
8 changes: 4 additions & 4 deletions src/lib/adapter/AdapterFactory.cpp
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand All @@ -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)
Expand Down
File renamed without changes.
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
{
Expand All @@ -78,7 +78,7 @@ CNxpCECAdapterCommunication::CNxpCECAdapterCommunication(IAdapterCommunicationCa
}


CNxpCECAdapterCommunication::~CNxpCECAdapterCommunication(void)
CTDA995xCECAdapterCommunication::~CTDA995xCECAdapterCommunication(void)
{
Close();

Expand All @@ -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))
{
Expand Down Expand Up @@ -129,7 +129,7 @@ bool CNxpCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChe
}


void CNxpCECAdapterCommunication::Close(void)
void CTDA995xCECAdapterCommunication::Close(void)
{
StopThread(0);

Expand All @@ -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;
Expand Down Expand Up @@ -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 };

Expand All @@ -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;

Expand All @@ -235,7 +235,7 @@ cec_vendor_id CNxpCECAdapterCommunication::GetVendorId(void)
}


uint16_t CNxpCECAdapterCommunication::GetPhysicalAddress(void)
uint16_t CTDA995xCECAdapterCommunication::GetPhysicalAddress(void)
{
cec_raw_info info;

Expand All @@ -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);

Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand All @@ -319,7 +319,7 @@ void CNxpCECAdapterCommunication::HandleLogicalAddressLost(cec_logical_address U
}


void *CNxpCECAdapterCommunication::Process(void)
void *CTDA995xCECAdapterCommunication::Process(void)
{
bool bHandled;
cec_frame frame;
Expand Down
Expand Up @@ -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
{
Expand All @@ -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 */
///{
Expand All @@ -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);
///}

Expand Down
Expand Up @@ -34,7 +34,7 @@
#include <stdio.h>

#if defined(HAVE_TDA995X_API)
#include "NxpCECAdapterDetection.h"
#include "TDA995xCECAdapterDetection.h"

extern "C" {
#define __cec_h__
Expand All @@ -44,7 +44,7 @@ extern "C" {

using namespace CEC;

bool CNxpCECAdapterDetection::FindAdapter(void)
bool CTDA995xCECAdapterDetection::FindAdapter(void)
{
return access(CEC_TDA995x_PATH, 0) == 0;
}
Expand Down
Expand Up @@ -33,7 +33,7 @@

namespace CEC
{
class CNxpCECAdapterDetection
class CTDA995xCECAdapterDetection
{
public:
static bool FindAdapter(void);
Expand Down

0 comments on commit 79e5002

Please sign in to comment.