From patchwork Sun Jan 2 12:03:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Igor M. Liplianin" X-Patchwork-Id: 446141 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p02CgmSb001542 for ; Sun, 2 Jan 2011 12:42:48 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753235Ab1ABMk2 (ORCPT ); Sun, 2 Jan 2011 07:40:28 -0500 Received: from mail-ey0-f174.google.com ([209.85.215.174]:59800 "EHLO mail-ey0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752532Ab1ABMk1 (ORCPT ); Sun, 2 Jan 2011 07:40:27 -0500 Received: by eye27 with SMTP id 27so5662553eye.19 for ; Sun, 02 Jan 2011 04:40:25 -0800 (PST) Received: by 10.213.104.143 with SMTP id p15mr1054683ebo.68.1293972023624; Sun, 02 Jan 2011 04:40:23 -0800 (PST) Received: from useri.localnet ([93.125.74.3]) by mx.google.com with ESMTPS id b52sm13899177eei.7.2011.01.02.04.40.22 (version=SSLv3 cipher=RC4-MD5); Sun, 02 Jan 2011 04:40:22 -0800 (PST) Message-ID: <4d207236.cc7e0e0a.6f59.3760@mx.google.com> From: "Igor M. Liplianin" Date: Sun, 2 Jan 2011 14:03:00 +0200 Subject: [PATCH 4/9 v2] xc5000: add support for DVB-C tuning. To: , , 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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 02 Jan 2011 12:43:10 +0000 (UTC) diff --git a/drivers/media/common/tuners/xc5000.c b/drivers/media/common/tuners/xc5000.c index 76ac5cd..e3218c9 100644 --- a/drivers/media/common/tuners/xc5000.c +++ b/drivers/media/common/tuners/xc5000.c @@ -683,6 +683,24 @@ static int xc5000_set_params(struct dvb_frontend *fe, return -EINVAL; } priv->rf_mode = XC_RF_MODE_AIR; + } else if (fe->ops.info.type == FE_QAM) { + dprintk(1, "%s() QAM\n", __func__); + switch (params->u.qam.modulation) { + case QAM_16: + case QAM_32: + case QAM_64: + case QAM_128: + case QAM_256: + case QAM_AUTO: + dprintk(1, "%s() QAM modulation\n", __func__); + priv->bandwidth = BANDWIDTH_8_MHZ; + priv->video_standard = DTV7_8; + priv->freq_hz = params->frequency - 2750000; + priv->rf_mode = XC_RF_MODE_CABLE; + break; + default: + return -EINVAL; + } } else { printk(KERN_ERR "xc5000 modulation type not supported!\n"); return -EINVAL;