From 2ce694beb73bfb13aaa03faf9fbcaf0159adc7bd Mon Sep 17 00:00:00 2001 From: TangoCash Date: Fri, 19 Oct 2018 16:42:45 +0200 Subject: [PATCH 1/2] liabarmbox: hdmi_cec return volume in percent, correct msg length Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/a571786f334816323a7ded80c1f45444f97a3ec8 Author: TangoCash Date: 2018-10-19 (Fri, 19 Oct 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/hdmi_cec.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libarmbox/hdmi_cec.cpp b/libarmbox/hdmi_cec.cpp index c34c2a5..8fda736 100644 --- a/libarmbox/hdmi_cec.cpp +++ b/libarmbox/hdmi_cec.cpp @@ -528,7 +528,7 @@ void hdmi_cec::Receive() case CEC_OPCODE_REPORT_AUDIO_STATUS: { muted = ((rxmessage.data[1] & 0x80) == 0x80); - volume = rxmessage.data[1] & 0x7F; + volume = ((rxmessage.data[1] & 0x7F) / 127.0) * 100.0; if (muted) lt_debug("[CEC] %s volume muted\n", ToString((cec_logical_address)rxmessage.initiator)); else @@ -634,8 +634,7 @@ void hdmi_cec::send_key(unsigned char key, unsigned char destination) txmessage.destination = destination; txmessage.initiator = logicalAddress; txmessage.data[0] = CEC_OPCODE_USER_CONTROL_RELEASE; - txmessage.data[1] = key; - txmessage.length = 2; + txmessage.length = 1; SendCECMessage(txmessage); } From 82c102b09c6ee40bbd4ee9c9b80c23cb675304a7 Mon Sep 17 00:00:00 2001 From: TangoCash Date: Wed, 31 Oct 2018 23:29:51 +0100 Subject: [PATCH 2/2] add first experimental support for ax hd60 Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/00c2ae02d8a9dda541686fd47aa5c65395532fab Author: TangoCash Date: 2018-10-31 (Wed, 31 Oct 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- acinclude.m4 | 16 +++++++++++++++- libarmbox/hardware_caps.c | 19 ++++++++++++++++++- 2 files changed, 33 insertions(+), 2 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 6b9232b..5d68143 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -219,6 +219,10 @@ AC_ARG_WITH(boxtype, BOXTYPE="armbox" BOXMODEL="$withval" ;; + hd60) + BOXTYPE="armbox" + BOXMODEL="$withval" + ;; *) AC_MSG_ERROR([bad value $withval for --with-boxtype]) ;; @@ -229,7 +233,7 @@ AC_ARG_WITH(boxmodel, AS_HELP_STRING([--with-boxmodel], [valid for generic: raspi]) AS_HELP_STRING([], [valid for duckbox: ufs910, ufs912, ufs913, ufs922, atevio7500, fortis_hdbox, octagon1008, hs7110, hs7810a, hs7119, hs7819, dp7000, cuberevo, cuberevo_mini, cuberevo_mini2, cuberevo_250hd, cuberevo_2000hd, cuberevo_3000hd, ipbox9900, ipbox99, ipbox55, arivalink200, tf7700, hl101]) AS_HELP_STRING([], [valid for spark: spark, spark7162]) -AS_HELP_STRING([], [valid for armbox: hd51, vusolo4k]), +AS_HELP_STRING([], [valid for armbox: hd51, hd60, vusolo4k]), [case "${withval}" in ufs910|ufs912|ufs913|ufs922|atevio7500|fortis_hdbox|octagon1008|hs7110|hs7810a|hs7119|hs7819|dp7000|cuberevo|cuberevo_mini|cuberevo_mini2|cuberevo_250hd|cuberevo_2000hd|cuberevo_3000hd|ipbox9900|ipbox99|ipbox55|arivalink200|tf7700|hl101) if test "$BOXTYPE" = "duckbox"; then @@ -259,6 +263,13 @@ AS_HELP_STRING([], [valid for armbox: hd51, vusolo4k]), AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) fi ;; + hd60) + if test "$BOXTYPE" = "armbox"; then + BOXMODEL="$withval" + else + AC_MSG_ERROR([unknown model $withval for boxtype $BOXTYPE]) + fi + ;; raspi) if test "$BOXTYPE" = "generic"; then BOXMODEL="$withval" @@ -310,6 +321,7 @@ AM_CONDITIONAL(BOXMODEL_TF7700, test "$BOXMODEL" = "tf7700") AM_CONDITIONAL(BOXMODEL_HL101, test "$BOXMODEL" = "hl101") AM_CONDITIONAL(BOXMODEL_HD51, test "$BOXMODEL" = "hd51") +AM_CONDITIONAL(BOXMODEL_HD60, test "$BOXMODEL" = "hd60") AM_CONDITIONAL(BOXMODEL_VUSOLO4K, test "$BOXMODEL" = "vusolo4k") AM_CONDITIONAL(BOXMODEL_RASPI, test "$BOXMODEL" = "raspi") @@ -385,6 +397,8 @@ elif test "$BOXMODEL" = "hl101"; then AC_DEFINE(BOXMODEL_HL101, 1, [hl101]) elif test "$BOXMODEL" = "hd51"; then AC_DEFINE(BOXMODEL_HD51, 1, [hd51]) +elif test "$BOXMODEL" = "hd60"; then + AC_DEFINE(BOXMODEL_HD60, 1, [hd60]) elif test "$BOXMODEL" = "vusolo4k"; then AC_DEFINE(BOXMODEL_VUSOLO4K, 1, [vusolo4k]) elif test "$BOXMODEL" = "raspi"; then diff --git a/libarmbox/hardware_caps.c b/libarmbox/hardware_caps.c index 782e35d..919499c 100644 --- a/libarmbox/hardware_caps.c +++ b/libarmbox/hardware_caps.c @@ -45,7 +45,8 @@ hw_caps_t *get_hwcaps(void) strcpy(caps.boxvendor, "VU"); strcpy(caps.boxname, "SOLO4K"); strcpy(caps.boxarch, "BCM7376"); -#else +#endif +#if BOXMODEL_HD51 initialized = 1; caps.has_CI = 1; caps.can_cec = 1; @@ -60,6 +61,22 @@ hw_caps_t *get_hwcaps(void) strcpy(caps.boxvendor, "AX-Technologies"); strcpy(caps.boxname, "HD51"); strcpy(caps.boxarch, "BCM7251S"); +#endif +#if BOXMODEL_HD60 + initialized = 1; + caps.has_CI = 0; + caps.can_cec = 1; + caps.can_shutdown = 1; + caps.display_xres = 4; + caps.display_type = HW_DISPLAY_LED_NUM; + caps.display_can_deepstandby = 0; + caps.display_can_set_brightness = 1; + caps.display_has_statusline = 0; + caps.has_button_timer = 1; + caps.has_HDMI = 1; + strcpy(caps.boxvendor, "AX-Technologies"); + strcpy(caps.boxname, "HD60"); + strcpy(caps.boxarch, "HI3798M"); #endif return ∩︀ }