From patchwork Sun Sep 11 10:44:30 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Lucke X-Patchwork-Id: 12016 Received: from einhorn.in-berlin.de ([192.109.42.8] ident=root) by www.linuxtv.org with esmtp (Exim 4.34) id 1EEPKD-00059Q-Fs for vdr@linuxtv.org; Sun, 11 Sep 2005 12:44:41 +0200 X-Envelope-From: stefan@lucke.in-berlin.de X-Envelope-To: Received: from jarada.farpoint.de (p54BF732C.dip.t-dialin.net [84.191.115.44]) by einhorn.in-berlin.de (8.12.10/8.12.10/Debian-4) with ESMTP id j8BAiVt7015463 for ; Sun, 11 Sep 2005 12:44:32 +0200 Received: from localhost (localhost [127.0.0.1]) by jarada.farpoint.de (Postfix) with ESMTP id 2933E6A56E for ; Sun, 11 Sep 2005 12:44:31 +0200 (CEST) From: Stefan Lucke To: vdr@linuxtv.org Date: Sun, 11 Sep 2005 12:44:30 +0200 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Message-Id: <200509111244.30873.stefan@lucke.in-berlin.de> X-Spam-Score: (-0.646) AWL,BAYES_40,FORGED_RCVD_HELO X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 Subject: [vdr] [PATCH] dvb-t, avoid retune on coderateL change X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2005 10:44:41 -0000 Status: O X-Status: X-Keywords: X-UID: 4861 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 --- 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;