From patchwork Fri Jun 3 15:17:59 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "istvan_v@mailbox.hu" X-Patchwork-Id: 847532 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p53FI9Do013619 for ; Fri, 3 Jun 2011 15:18:09 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755859Ab1FCPSH (ORCPT ); Fri, 3 Jun 2011 11:18:07 -0400 Received: from mail.juropnet.hu ([212.24.188.131]:51718 "EHLO mail.juropnet.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755850Ab1FCPSG (ORCPT ); Fri, 3 Jun 2011 11:18:06 -0400 Received: from [94.248.227.103] by mail.juropnet.hu with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1QSW8P-0002ai-7X for linux-media@vger.kernel.org; Fri, 03 Jun 2011 17:18:03 +0200 Message-ID: <4DE8FB27.5060804@mailbox.hu> Date: Fri, 03 Jun 2011 17:17:59 +0200 From: "istvan_v@mailbox.hu" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.4pre) Gecko/20090915 SUSE/3.0b4-3.6 Thunderbird/3.0b4 MIME-Version: 1.0 To: linux-media@vger.kernel.org Subject: XC4000: added support for 7 MHz DVB-T References: <4D764337.6050109@email.cz> <20110531124843.377a2a80@glory.local> <20110531174323.0f0c45c0@glory.local> In-Reply-To: X-Host-Lookup-Failed: Reverse DNS lookup failed for 94.248.227.103 (failed) X-Spam-Score: -4.2 (----) X-Scan-Signature: 2961f184669d38c5a57319482c8c9ac2 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 03 Jun 2011 15:18:09 +0000 (UTC) The following patch implements support for DVB-T with 7 MHz bandwidth. Signed-off-by: Istvan Varga diff -uNr xc4000_orig/drivers/media/common/tuners/xc4000.c xc4000/drivers/media/common/tuners/xc4000.c --- xc4000_orig/drivers/media/common/tuners/xc4000.c 2011-06-03 15:47:04.000000000 +0200 +++ xc4000/drivers/media/common/tuners/xc4000.c 2011-06-03 16:34:25.000000000 +0200 @@ -1183,15 +1183,28 @@ type = DTV6; break; case BANDWIDTH_7_MHZ: - printk(KERN_ERR "xc4000 bandwidth 7MHz not supported\n"); + priv->bandwidth = BANDWIDTH_7_MHZ; + priv->video_standard = XC4000_DTV7; + priv->freq_hz = params->frequency - 2250000; type = DTV7; - return -EINVAL; + break; case BANDWIDTH_8_MHZ: priv->bandwidth = BANDWIDTH_8_MHZ; priv->video_standard = XC4000_DTV8; priv->freq_hz = params->frequency - 2750000; type = DTV8; break; + case BANDWIDTH_AUTO: + if (params->frequency < 400000000) { + priv->bandwidth = BANDWIDTH_7_MHZ; + priv->freq_hz = params->frequency - 2250000; + } else { + priv->bandwidth = BANDWIDTH_8_MHZ; + priv->freq_hz = params->frequency - 2750000; + } + priv->video_standard = XC4000_DTV7_8; + type = DTV78; + break; default: printk(KERN_ERR "xc4000 bandwidth not set!\n"); return -EINVAL;