From patchwork Fri Jul 31 16:40:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julian Scheel X-Patchwork-Id: 38535 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6VGpvPR001478 for ; Fri, 31 Jul 2009 16:51:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752451AbZGaQv4 (ORCPT ); Fri, 31 Jul 2009 12:51:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752427AbZGaQv4 (ORCPT ); Fri, 31 Jul 2009 12:51:56 -0400 Received: from smtp.work.de ([212.12.32.49]:56213 "EHLO smtp.work.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752451AbZGaQvz (ORCPT ); Fri, 31 Jul 2009 12:51:55 -0400 X-Greylist: delayed 671 seconds by postgrey-1.27 at vger.kernel.org; Fri, 31 Jul 2009 12:51:54 EDT Received: from [82.83.146.110] (helo=[192.168.0.106]) by smtp.work.de with esmtpa (Exim 4.63) (envelope-from ) id 1MWv9v-00019o-65 for linux-media@vger.kernel.org; Fri, 31 Jul 2009 18:40:43 +0200 Message-ID: <4A731E8B.4030005@jusst.de> Date: Fri, 31 Jul 2009 18:40:43 +0200 From: Julian Scheel User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: linux-media@vger.kernel.org Subject: [PATCH] Fix lowband tuning with tda8261 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Attached is a patch which fixes tuning to low frequency channels with stb0899+tda8261 cards like the KNC TV-Station DVB-S2. The cause of the issue was a broken if construct, which should have been an if/else if, so that the setting for the lowest matching frequency is applied. Without this patch for example tuning to "arte" on Astra 19.2, 10744MHz SR22000 failed most times and when it failed the communication between driver and tda8261 was completely broken. This problem disappears with the attached patch. Signed-off-by: Julian Scheel diff -r 6477aa1782d5 linux/drivers/media/dvb/frontends/tda8261.c --- a/linux/drivers/media/dvb/frontends/tda8261.c Tue Jul 21 09:17:24 2009 -0300 +++ b/linux/drivers/media/dvb/frontends/tda8261.c Fri Jul 31 18:36:07 2009 +0200 @@ -136,9 +136,9 @@ if (frequency < 1450000) buf[3] = 0x00; - if (frequency < 2000000) + else if (frequency < 2000000) buf[3] = 0x40; - if (frequency < 2150000) + else if (frequency < 2150000) buf[3] = 0x80; /* Set params */