All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Krufky <mkrufky@m1k.net>
To: Andrew Morton <akpm@osdl.org>
Cc: mkrufky@m1k.net, linux-dvb-maintainer@linuxtv.org,
	Mauro Carvalho Chehab <mchehab@brturbo.com.br>,
	Mac Michaels <wmichaels1@earthlink.net>,
	LKML <linux-kernel@vger.kernel.org>,
	Linux and Kernel Video <video4linux-list@redhat.com>
Subject: [2.6.13 PATCH 2/4] 02-lgdt3302-rf-input.patch
Date: Thu, 21 Jul 2005 00:21:01 -0400	[thread overview]
Message-ID: <42DF22AD.9090601@m1k.net> (raw)
In-Reply-To: <42DF2196.5040503@m1k.net>

[-- Attachment #1: Type: text/plain, Size: 831 bytes --]

Michael Krufky wrote:

> This patch series spans both video4linux and linux-dvb trees.
> Remove the dvb_pll_desc from the lgdt3302 frontend and replace with a 
> pll_set-callback to isolate the tuner programming from the frontend.
>
> Select the RF input connector based upon the type of demodulation 
> selected. ANT RF connector is selected for 8-VSB and CABLE RF 
> connector is selected for QAM64/QAM256. Implement this along the lines 
> posted to linux-dvb list (subscribers only) by Patrick Boettcher. ( 
> http://linuxtv.org/pipermail/linux-dvb/2005-July/003557.html ) This 
> only affects the cards that use the Microtune 4042 tuner. This is not 
> ideal, but there is no current specification for selecting RF inputs. 
> It makes the card work the same way as the Windows driver thus it may 
> reduce user confusion.
>



[-- Attachment #2: 02-lgdt3302-rf-input.patch --]
[-- Type: text/plain, Size: 3677 bytes --]

Select the RF input connector based upon the type of
demodulation selected. ANT RF connector is selected for
8-VSB and CABLE RF connector is selected for QAM64/QAM256.
This only affects the cards that use the Microtune 4042 tuner.

Signed-off-by: Mac Michaels <wmichaels1@earthlink.net>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>

 linux/drivers/media/dvb/frontends/lgdt3302.c |   12 +++++++++++
 linux/drivers/media/dvb/frontends/lgdt3302.h |    1 
 linux/drivers/media/video/cx88/cx88-dvb.c    |   20 +++++++++++++++++--
 3 files changed, 31 insertions(+), 2 deletions(-)

diff -u linux-2.6.13/drivers/media/dvb/frontends/lgdt3302.c linux/drivers/media/dvb/frontends/lgdt3302.c
--- linux-2.6.13/drivers/media/dvb/frontends/lgdt3302.c	2005-07-20 22:50:39.000000000 +0000
+++ linux/drivers/media/dvb/frontends/lgdt3302.c	2005-07-20 22:53:29.000000000 +0000
@@ -214,6 +214,10 @@
 
 			/* Select VSB mode and serial MPEG interface */
 			top_ctrl_cfg[1] = 0x07;
+
+			/* Select ANT connector if supported by card */
+			if (state->config->pll_rf_set)
+				state->config->pll_rf_set(fe, 1);
 			break;
 
 		case QAM_64:
@@ -221,6 +225,10 @@
 
 			/* Select QAM_64 mode and serial MPEG interface */
 			top_ctrl_cfg[1] = 0x04;
+
+			/* Select CABLE connector if supported by card */
+			if (state->config->pll_rf_set)
+				state->config->pll_rf_set(fe, 0);
 			break;
 
 		case QAM_256:
@@ -228,6 +236,10 @@
 
 			/* Select QAM_256 mode and serial MPEG interface */
 			top_ctrl_cfg[1] = 0x05;
+
+			/* Select CABLE connector if supported by card */
+			if (state->config->pll_rf_set)
+				state->config->pll_rf_set(fe, 0);
 			break;
 		default:
 			printk(KERN_WARNING "lgdt3302: %s: Modulation type(%d) UNSUPPORTED\n", __FUNCTION__, param->u.vsb.modulation);
diff -u linux-2.6.13/drivers/media/dvb/frontends/lgdt3302.h linux/drivers/media/dvb/frontends/lgdt3302.h
--- linux-2.6.13/drivers/media/dvb/frontends/lgdt3302.h	2005-07-20 22:50:39.000000000 +0000
+++ linux/drivers/media/dvb/frontends/lgdt3302.h	2005-07-20 22:53:29.000000000 +0000
@@ -30,6 +30,7 @@
 	u8 demod_address;
 
 	/* PLL interface */
+	int (*pll_rf_set) (struct dvb_frontend* fe, int index);
 	int (*pll_set)(struct dvb_frontend* fe, struct dvb_frontend_parameters* params, u8* pll_address);
 
 	/* Need to set device param for start_dma */
diff -u linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c linux/drivers/media/video/cx88/cx88-dvb.c
--- linux-2.6.13/drivers/media/video/cx88/cx88-dvb.c	2005-07-20 22:50:39.000000000 +0000
+++ linux/drivers/media/video/cx88/cx88-dvb.c	2005-07-20 22:53:29.000000000 +0000
@@ -1,5 +1,5 @@
 /*
- * $Id: cx88-dvb.c,v 1.47 2005/07/20 05:20:37 mkrufky Exp $
+ * $Id: cx88-dvb.c,v 1.48 2005/07/20 05:33:33 mkrufky Exp $
  *
  * device driver for Conexant 2388x based TV cards
  * MPEG Transport Stream (DVB) routines
@@ -223,6 +223,19 @@
 	return 0;
 }
 
+static int lgdt3302_pll_rf_set(struct dvb_frontend* fe, int index)
+{
+	struct cx8802_dev *dev= fe->dvb->priv;
+	struct cx88_core *core = dev->core;
+
+	dprintk(1, "%s: index = %d\n", __FUNCTION__, index);
+	if (index == 0)
+		cx_clear(MO_GP0_IO, 8);
+	else
+		cx_set(MO_GP0_IO, 8);
+	return 0;
+}
+
 static int lgdt3302_set_ts_param(struct dvb_frontend* fe, int is_punctured)
 {
 	struct cx8802_dev *dev= fe->dvb->priv;
@@ -296,8 +309,11 @@
 
 		cx_clear(MO_GP0_IO, 1);
 		mdelay(100);
-		cx_set(MO_GP0_IO, 9); // ANT connector too FIXME
+		cx_set(MO_GP0_IO, 1);
 		mdelay(200);
+
+		/* Select RF connector callback */
+		fusionhdtv_3_gold.pll_rf_set = lgdt3302_pll_rf_set;
 		dev->core->pll_addr = 0x61;
 		dev->core->pll_desc = &dvb_pll_microtune_4042;
 		dev->dvb.frontend = lgdt3302_attach(&fusionhdtv_3_gold,

  parent reply	other threads:[~2005-07-21  4:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-21  4:16 [2.6.13 PATCH 0/4] Michael Krufky
2005-07-21  4:20 ` [2.6.13 PATCH 1/4] 01-lgdt3302-isolate-tuner.patch Michael Krufky
2005-07-21  4:21 ` Michael Krufky [this message]
2005-07-21  4:23 ` [2.6.13 PATCH 3/4] 03-lgdt3302-suppress-compile-warning.patch Michael Krufky
2005-07-21  4:23 ` [2.6.13 PATCH 4/4] 04-cx88-dvb-cleanup.patch Michael Krufky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=42DF22AD.9090601@m1k.net \
    --to=mkrufky@m1k.net \
    --cc=akpm@osdl.org \
    --cc=linux-dvb-maintainer@linuxtv.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@brturbo.com.br \
    --cc=video4linux-list@redhat.com \
    --cc=wmichaels1@earthlink.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.