dvb-t, avoid retune on coderateL change

Message ID 200509111244.30873.stefan@lucke.in-berlin.de
State New
Headers

Commit Message

Stefan Lucke Sept. 11, 2005, 10:44 a.m. UTC
  Hi,

retuning on coderateL change, comes here in Berlin quite often. The attached
diff fixes that. It could be that this is an error on provider side, but usual
set top boxes don't show this behavior.

With my diff and debugging enabled I get the following messages in syslog:
Sep 11 11:16:24 jarada vdr[6566]: channel 14 (MDR FERNSEHEN) event 11:00 'Das Haus in Montevideo' status 4
Sep 11 11:16:24 jarada vdr[6566]: channel 18 (arte) event 11:15 'Karambolage' status 4
Sep 11 11:16:41 jarada vdr[6566]:  old check would switch channel
Sep 11 11:16:41 jarada vdr[6566]:  new code would ignore this change
Sep 11 11:16:41 jarada vdr[6566]:  old check would switch channel

instead of these when using old code:
Sep 11 11:10:22 jarada vdr[6478]:  old check would switch channel
Sep 11 11:10:22 jarada vdr[6478]:  new code would ignore this change
Sep 11 11:10:22 jarada vdr[6478]: changing transponder data of channel 1 from T:522000000:0:1:0:2:2:2:1 to T:522000000:0:1:0:2:1:2:1

Sep 11 11:10:25 jarada vdr[6543]: [softdevice-audio]: xrun
Sep 11 11:10:38 jarada vdr[6476]:  old check would switch channel
Sep 11 11:10:38 jarada vdr[6476]:  new code would ignore this change
Sep 11 11:10:38 jarada vdr[6476]: changing transponder data of channel 1 from T:522000000:0:1:0:2:1:2:1 to T:522000000:0:1:0:2:2:2:1
  

Comments

Stefan Lucke Oct. 1, 2005, 10:59 a.m. UTC | #1
On Sonntag, 11. September 2005 12:44, Stefan Lucke wrote:
> Hi,
> 
> retuning on coderateL change, comes here in Berlin quite often. The attached
> diff fixes that. It could be that this is an error on provider side, but usual
> set top boxes don't show this behavior.

Anyone how tested this ?
If noone needs this, I guess there is none who is recording or viewing ARD
via DVB-T here in Berlin area, or thats only related to my cinergyT2.

> 
> With my diff and debugging enabled I get the following messages in syslog:
> Sep 11 11:16:24 jarada vdr[6566]: channel 14 (MDR FERNSEHEN) event 11:00 'Das Haus in Montevideo' status 4
> Sep 11 11:16:24 jarada vdr[6566]: channel 18 (arte) event 11:15 'Karambolage' status 4
> Sep 11 11:16:41 jarada vdr[6566]:  old check would switch channel
> Sep 11 11:16:41 jarada vdr[6566]:  new code would ignore this change
> Sep 11 11:16:41 jarada vdr[6566]:  old check would switch channel
> 
> instead of these when using old code:
> Sep 11 11:10:22 jarada vdr[6478]:  old check would switch channel
> Sep 11 11:10:22 jarada vdr[6478]:  new code would ignore this change
> Sep 11 11:10:22 jarada vdr[6478]: changing transponder data of channel 1 from T:522000000:0:1:0:2:2:2:1 to T:522000000:0:1:0:2:1:2:1
> 
> Sep 11 11:10:25 jarada vdr[6543]: [softdevice-audio]: xrun
> Sep 11 11:10:38 jarada vdr[6476]:  old check would switch channel
> Sep 11 11:10:38 jarada vdr[6476]:  new code would ignore this change
> Sep 11 11:10:38 jarada vdr[6476]: changing transponder data of channel 1 from T:522000000:0:1:0:2:1:2:1 to T:522000000:0:1:0:2:2:2:1
  

Patch

--- channels.c.orig	2005-09-03 23:13:05.000000000 +0200
+++ channels.c	2005-09-11 12:33:57.000000000 +0200
@@ -315,7 +315,26 @@ 
 
 bool cChannel::SetTerrTransponderData(int Source, int Frequency, int Bandwidth, int Modulation, int Hierarchy, int CoderateH, int CoderateL, int Guard, int Transmission)
 {
+#define DEBUG_COMPARE 1
+#define USE_OLD_COMPARE 0
+
+#if DEBUG_COMPARE
+  /* --------------------------------------------------------------------------
+   * old and new code for testing/debugging
+   */
+  if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission) {
+    dsyslog (" old check would switch channel");
+    if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || (Hierarchy && coderateL != CoderateL) || guard != Guard || transmission != Transmission)
+      dsyslog (" new code would change too");
+    else
+      dsyslog (" new code would ignore this change");
+    }
+#endif
+#if USE_OLD_COMPARE
   if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || coderateL != CoderateL || guard != Guard || transmission != Transmission) {
+#else
+  if (source != Source || frequency != Frequency || bandwidth != Bandwidth || modulation != Modulation || hierarchy != Hierarchy || coderateH != CoderateH || (Hierarchy && coderateL != CoderateL) || guard != Guard || transmission != Transmission) {
+#endif
      if (Number()) {
         dsyslog("changing transponder data of channel %d from %s:%d:%d:%d:%d:%d:%d:%d:%d to %s:%d:%d:%d:%d:%d:%d:%d:%d", Number(), *cSource::ToString(source), frequency, bandwidth, modulation, hierarchy, coderateH, coderateL, guard, transmission, *cSource::ToString(Source), Frequency, Bandwidth, Modulation, Hierarchy, CoderateH, CoderateL, Guard, Transmission);
         modification |= CHANNELMOD_TRANSP;