mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 07:51:11 +02:00
Merge branch 'master' into pu/fb-setmode
Origin commit data
------------------
Branch: ni/coolstream
Commit: 87cb1b514a
Author: Michael Liebmann <tuxcode.bbg@gmail.com>
Date: 2017-03-10 (Fri, 10 Mar 2017)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1,12 +1,9 @@
|
|||||||
noinst_LIBRARIES = libhwcaps.a
|
|
||||||
|
|
||||||
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
|
AM_CXXFLAGS = -fno-rtti -fno-exceptions -fno-strict-aliasing
|
||||||
|
|
||||||
if BOXMODEL_CS_HD2
|
AM_CPPFLAGS = \
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/lib/hardware/coolstream/hd2/libcoolstream
|
@HWLIB_CFLAGS@
|
||||||
else
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/lib/hardware/coolstream/hd1/libcoolstream
|
noinst_LIBRARIES = libhwcaps.a
|
||||||
endif
|
|
||||||
|
|
||||||
libhwcaps_a_SOURCES = \
|
libhwcaps_a_SOURCES = \
|
||||||
hardware_caps.cpp
|
hardware_caps.cpp
|
||||||
|
@@ -18,6 +18,7 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
if (initialized)
|
if (initialized)
|
||||||
return ∩︀
|
return ∩︀
|
||||||
int rev = cs_get_revision();
|
int rev = cs_get_revision();
|
||||||
|
int chip = cs_get_chip_type();
|
||||||
caps.has_fan = (rev < 8);
|
caps.has_fan = (rev < 8);
|
||||||
caps.has_HDMI = 1;
|
caps.has_HDMI = 1;
|
||||||
caps.has_SCART = (rev != 10);
|
caps.has_SCART = (rev != 10);
|
||||||
@@ -33,7 +34,6 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
caps.can_ps_14_9 = 1;
|
caps.can_ps_14_9 = 1;
|
||||||
caps.force_tuner_2G = 0;
|
caps.force_tuner_2G = 0;
|
||||||
strcpy(caps.boxvendor, "Coolstream");
|
strcpy(caps.boxvendor, "Coolstream");
|
||||||
/* list of boxnames from neutrinoyparser.cpp */
|
|
||||||
strcpy(caps.boxarch, "Nevis");
|
strcpy(caps.boxarch, "Nevis");
|
||||||
switch (rev) {
|
switch (rev) {
|
||||||
case 6:
|
case 6:
|
||||||
@@ -41,7 +41,7 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
strcpy(caps.boxname, "HD1");
|
strcpy(caps.boxname, "HD1");
|
||||||
caps.force_tuner_2G = 1;
|
caps.force_tuner_2G = 1;
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8: // TODO: Neo2 - Twin
|
||||||
strcpy(caps.boxname, "Neo");
|
strcpy(caps.boxname, "Neo");
|
||||||
caps.force_tuner_2G = 1;
|
caps.force_tuner_2G = 1;
|
||||||
break;
|
break;
|
||||||
@@ -53,9 +53,8 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
strcpy(caps.boxname, "Zee");
|
strcpy(caps.boxname, "Zee");
|
||||||
caps.force_tuner_2G = 1;
|
caps.force_tuner_2G = 1;
|
||||||
break;
|
break;
|
||||||
#ifdef BOXMODEL_CS_HD2
|
|
||||||
case 11:
|
case 11:
|
||||||
if (cs_get_chip_type() == CS_CHIP_SHINER)
|
if (chip == CS_CHIP_SHINER)
|
||||||
{
|
{
|
||||||
strcpy(caps.boxname, "Trinity");
|
strcpy(caps.boxname, "Trinity");
|
||||||
strcpy(caps.boxarch, "Shiner");
|
strcpy(caps.boxarch, "Shiner");
|
||||||
@@ -78,7 +77,6 @@ hw_caps_t *get_hwcaps(void) {
|
|||||||
strcpy(caps.boxname, "Trinity Duo");
|
strcpy(caps.boxname, "Trinity Duo");
|
||||||
strcpy(caps.boxarch, "Kronos");
|
strcpy(caps.boxarch, "Kronos");
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
default:
|
default:
|
||||||
strcpy(caps.boxname, "UNKNOWN_BOX");
|
strcpy(caps.boxname, "UNKNOWN_BOX");
|
||||||
strcpy(caps.boxarch, "Unknown");
|
strcpy(caps.boxarch, "Unknown");
|
||||||
|
@@ -786,14 +786,14 @@ void CControlAPI::MessageCGI(CyhookHandler *hh)
|
|||||||
void CControlAPI::InfoCGI(CyhookHandler *hh)
|
void CControlAPI::InfoCGI(CyhookHandler *hh)
|
||||||
{
|
{
|
||||||
if (hh->ParamList.empty())
|
if (hh->ParamList.empty())
|
||||||
hh->Write("Neutrino HD\n");
|
hh->Write(PACKAGE_NAME " " PACKAGE_VERSION "\n");
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
|
if (hh->ParamList["1"] == "streaminfo") // print streaminfo
|
||||||
SendStreamInfo(hh);
|
SendStreamInfo(hh);
|
||||||
else if (hh->ParamList["1"] == "version") // send version file
|
else if (hh->ParamList["1"] == "version") // send version file
|
||||||
hh->SendFile(TARGET_PREFIX "/.version");
|
hh->SendFile(TARGET_PREFIX "/.version");
|
||||||
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (only ffor comptibility)
|
else if (hh->ParamList["1"] == "httpdversion") // print httpd version typ (just for compatibility)
|
||||||
hh->Write("3");
|
hh->Write("3");
|
||||||
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
|
else if (hh->ParamList["1"] == "nhttpd_version")// print nhttpd version
|
||||||
hh->printf("%s\n", HTTPD_VERSION);
|
hh->printf("%s\n", HTTPD_VERSION);
|
||||||
@@ -806,14 +806,11 @@ void CControlAPI::InfoCGI(CyhookHandler *hh)
|
|||||||
|
|
||||||
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
void CControlAPI::HWInfoCGI(CyhookHandler *hh)
|
||||||
{
|
{
|
||||||
std::string boxname = NeutrinoAPI->NeutrinoYParser->func_get_boxtype(hh, "");
|
|
||||||
std::string boxmodel = NeutrinoAPI->NeutrinoYParser->func_get_boxmodel(hh, "");
|
|
||||||
|
|
||||||
static CNetAdapter netadapter;
|
static CNetAdapter netadapter;
|
||||||
std::string eth_id = netadapter.getMacAddr();
|
std::string eth_id = netadapter.getMacAddr();
|
||||||
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
|
std::transform(eth_id.begin(), eth_id.end(), eth_id.begin(), ::tolower);
|
||||||
|
|
||||||
hh->printf("%s (%s)\nMAC:%s\n", boxname.c_str(), boxmodel.c_str(), eth_id.c_str());
|
hh->printf("%s %s (%s)\nMAC:%s\n", g_info.hw_caps->boxvendor, g_info.hw_caps->boxname, g_info.hw_caps->boxarch, eth_id.c_str());
|
||||||
}
|
}
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
void CControlAPI::ShutdownCGI(CyhookHandler *hh)
|
||||||
|
@@ -838,103 +838,21 @@ std::string CNeutrinoYParser::func_get_partition_list(CyhookHandler *, std::str
|
|||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
std::string CNeutrinoYParser::func_get_boxtype(CyhookHandler *, std::string)
|
||||||
{
|
{
|
||||||
unsigned int system_rev = cs_get_revision();
|
std::string boxvendor(g_info.hw_caps->boxvendor);
|
||||||
std::string boxname = "CST ";
|
std::string boxname(g_info.hw_caps->boxname);
|
||||||
|
|
||||||
#if HAVE_TRIPLEDRAGON
|
/* workaround for Neo2 */
|
||||||
boxname = "Armas ";
|
if ((boxname.compare("Neo") == 0) && (CFEManager::getInstance()->getFrontendCount() > 1))
|
||||||
#endif
|
|
||||||
|
|
||||||
switch(system_rev)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
if( boxname == "Armas ")
|
|
||||||
boxname += "TripleDragon";
|
|
||||||
break;
|
|
||||||
#ifdef BOXMODEL_CS_HD1
|
|
||||||
case 6:
|
|
||||||
boxname += "HD1";
|
|
||||||
break;
|
|
||||||
case 7:
|
|
||||||
boxname += "BSE";
|
|
||||||
break;
|
|
||||||
case 8:
|
|
||||||
boxname += "Neo";
|
|
||||||
if (CFEManager::getInstance()->getFrontendCount() > 1)
|
|
||||||
boxname += " Twin";
|
boxname += " Twin";
|
||||||
break;
|
|
||||||
case 10:
|
|
||||||
boxname += "Zee";
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef BOXMODEL_CS_HD2
|
|
||||||
case 9:
|
|
||||||
boxname += "Tank";
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
boxname += "Trinity";
|
|
||||||
if (cs_get_chip_type() != 33904 /*0x8470*/)
|
|
||||||
boxname += " V2";
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
boxname += "Zee2";
|
|
||||||
break;
|
|
||||||
case 13:
|
|
||||||
boxname += "Link";
|
|
||||||
break;
|
|
||||||
case 14:
|
|
||||||
boxname += "Trinity Duo";
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
char buffer[10];
|
|
||||||
snprintf(buffer, sizeof(buffer), "%u\n", system_rev);
|
|
||||||
boxname += "Unknown nr. ";
|
|
||||||
boxname += buffer;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return boxname;
|
return boxvendor + " " + boxname;
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// y-func : get boxmodel
|
// y-func : get boxmodel
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
std::string CNeutrinoYParser::func_get_boxmodel(CyhookHandler *, std::string)
|
std::string CNeutrinoYParser::func_get_boxmodel(CyhookHandler *, std::string)
|
||||||
{
|
{
|
||||||
unsigned int system_rev = cs_get_revision();
|
return g_info.hw_caps->boxarch;
|
||||||
std::string boxmodel = "Unknown";
|
|
||||||
|
|
||||||
switch(system_rev)
|
|
||||||
{
|
|
||||||
#ifdef BOXMODEL_CS_HD1
|
|
||||||
case 6:
|
|
||||||
case 7:
|
|
||||||
case 8:
|
|
||||||
case 10:
|
|
||||||
boxmodel = "Nevis";
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
#ifdef BOXMODEL_CS_HD2
|
|
||||||
case 9:
|
|
||||||
boxmodel = "Apollo";
|
|
||||||
break;
|
|
||||||
case 11:
|
|
||||||
if (cs_get_chip_type() == 33904 /*0x8470*/)
|
|
||||||
boxmodel = "Shiner";
|
|
||||||
else
|
|
||||||
boxmodel = "Kronos";
|
|
||||||
break;
|
|
||||||
case 12:
|
|
||||||
case 13:
|
|
||||||
case 14:
|
|
||||||
boxmodel = "Kronos";
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return boxmodel;
|
|
||||||
}
|
}
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
// y-func : get stream info
|
// y-func : get stream info
|
||||||
|
Reference in New Issue
Block a user