From ce11b5cb774eb8ad43f27796aaecfdd70ca9c273 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Fri, 18 May 2018 12:50:12 +0200 Subject: [PATCH 1/2] use SetCECState in deepstandby Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/f5ecac70266348b2789869755300d76f325582c9 Author: Jacek Jendrzej Date: 2018-05-18 (Fri, 18 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index 3b1f244..b7cf3c2 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -323,6 +323,9 @@ cVideo::cVideo(int, void *, void *, unsigned int unit) cVideo::~cVideo(void) { + if (standby_cec_activ && fd >= 0) + SetCECState(true); + closeDevice(); } From 92c71a8b6d36a1e7213e6eae60870f6bf5478c85 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Sat, 19 May 2018 18:34:26 +0200 Subject: [PATCH 2/2] add av input switch in deep/standby Origin commit data ------------------ Branch: master Commit: https://github.com/neutrino-images/ni-libstb-hal/commit/9b5012d2ac6238f5f826a94a7adf69ae946adaf7 Author: Jacek Jendrzej Date: 2018-05-19 (Sat, 19 May 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- libarmbox/video.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/libarmbox/video.cpp b/libarmbox/video.cpp index b7cf3c2..2af8e7b 100644 --- a/libarmbox/video.cpp +++ b/libarmbox/video.cpp @@ -301,6 +301,19 @@ int image_to_mpeg2(const char *image_name, int fd) return ret; } +void setAVInput(int val) +{ + if (val != 0 && val != 1) + return; + + int input_fd = open("/proc/stb/avs/0/input", O_WRONLY); + if(input_fd){ + const char *input[] = {"encoder", "aux"}; + write(input_fd, input[val], strlen(input[val])); + close(input_fd); + } +} + cVideo::cVideo(int, void *, void *, unsigned int unit) { lt_debug("%s unit %u\n", __func__, unit); @@ -323,6 +336,8 @@ cVideo::cVideo(int, void *, void *, unsigned int unit) cVideo::~cVideo(void) { + if(fd >= 0) + setAVInput(1); if (standby_cec_activ && fd >= 0) SetCECState(true); @@ -619,10 +634,14 @@ void cVideo::Standby(unsigned int bOn) if (bOn) { closeDevice(); + if(fd < 0) + setAVInput(1); } else { openDevice(); + if(fd >= 0) + setAVInput(0); } video_standby = bOn; SetCECState(video_standby);