linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Hunold (LinuxTV.org CVS maintainer)  <hunold@convergence.de>
To: torvalds@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 16/17] Update the av7110 DVB driver
Date: Tue, 15 Jul 2003 14:21:00 +0200	[thread overview]
Message-ID: <10582716601185@convergence.de> (raw)
In-Reply-To: <10582716601905@convergence.de>

[DVB] - fix DMX_GET_STC to get the msb right
[DVB] - follow changes in saa7146 driver core, separate some data for DVB-C and DVB-S cards
diff -uNrwB --new-file linux-2.6.0-test1.work/drivers/media/dvb/ttpci/av7110.c linux-2.6.0-test1.patch/drivers/media/dvb/ttpci/av7110.c
--- linux-2.6.0-test1.work/drivers/media/dvb/ttpci/av7110.c	2003-07-15 10:59:54.000000000 +0200
+++ linux-2.6.0-test1.patch/drivers/media/dvb/ttpci/av7110.c	2003-07-07 13:28:54.000000000 +0200
@@ -3257,7 +3258,7 @@
 	DEB_EE(("av7110: fwstc = %04hx %04hx %04hx %04hx\n",
 			fwstc[0], fwstc[1], fwstc[2], fwstc[3]));
 
-	*stc =  (((uint64_t)fwstc[2] & 1) << 32) |
+	*stc =  (((uint64_t)(~fwstc[2]) & 1) << 32) |
 		(((uint64_t)fwstc[1])     << 16) | ((uint64_t)fwstc[0]);
 	*base = 1;
 
@@ -4327,6 +4328,9 @@
 	{ 0, 0 }
 };
 
+static struct saa7146_ext_vv av7110_vv_data_st;
+static struct saa7146_ext_vv av7110_vv_data_c;
+
 static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext)
 {
 	struct av7110 *av7110 = NULL;
@@ -4344,7 +4348,16 @@
 
 	DEB_EE(("dev: %p, av7110: %p\n",dev,av7110));
 
-	if (saa7146_vv_init(dev)) {
+	/* special case DVB-C: these cards have an analog tuner
+	   plus need some special handling, so we have separate
+	   saa7146_ext_vv data for these... */
+	if (dev->pci->subsystem_vendor == 0x110a) {
+		ret = saa7146_vv_init(dev, &av7110_vv_data_c);
+	} else {
+		ret = saa7146_vv_init(dev, &av7110_vv_data_st);
+	}
+	
+	if ( 0 != ret) {
 		ERR(("cannot init capture device. skipping.\n"));
 		kfree(av7110);
 		return -1;
@@ -4689,10 +4702,10 @@
 }
 
 
-static struct saa7146_ext_vv av7110_vv_data = {
+static struct saa7146_ext_vv av7110_vv_data_st = {
 	.inputs		= 1,
 	.audios 	= 1,
-	.capabilities	= V4L2_CAP_TUNER,
+	.capabilities	= 0,
 	.flags		= SAA7146_EXT_SWAP_ODD_EVEN,
 
 	.stds		= &standard[0],
@@ -4703,9 +4716,23 @@
 	.ioctl		= av7110_ioctl,
 };
 
+static struct saa7146_ext_vv av7110_vv_data_c = {
+	.inputs		= 1,
+	.audios 	= 1,
+	.capabilities	= V4L2_CAP_TUNER,
+	.flags		= 0,
+
+	.stds		= &standard[0],
+	.num_stds	= sizeof(standard)/sizeof(struct saa7146_standard),
+	.std_callback	= &std_callback, 
+
+	.ioctls		= &ioctls[0],
+	.ioctl		= av7110_ioctl,
+};
+
+
 static struct saa7146_extension av7110_extension = {
 	.name		= "dvb\0",
-	.ext_vv_data	= &av7110_vv_data,
 
 	.module		= THIS_MODULE,
 	.pci_tbl	= &pci_tbl[0],



  reply	other threads:[~2003-07-15 12:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-15 12:20 [PATCH 1/17] Update the saa7146 driver core Michael Hunold
2003-07-15 12:20 ` [PATCH 2/17] Various small fixes in dvb-core Michael Hunold
2003-07-15 12:20   ` [PATCH 3/17] Major dvb net code cleanup, many fixes Michael Hunold
2003-07-15 12:20     ` [PATCH 4/17] Update dvb frontend drivers Michael Hunold
2003-07-15 12:20       ` [PATCH 5/17] Add Zarlink MT312 DVB-T frontend driver Michael Hunold
2003-07-15 12:20         ` [PATCH 6/17] Update the DVB budget drivers Michael Hunold
2003-07-15 12:20           ` [PATCH 7/17] Update the DVB av7110 driver Michael Hunold
2003-07-15 12:20             ` [PATCH 8/17] Update firmware of " Michael Hunold
2003-07-15 12:20               ` [PATCH 9/17] More saa7146 driver core updates Michael Hunold
2003-07-15 12:20                 ` [PATCH 10/17] Various kconfig and Makefile updates Michael Hunold
2003-07-15 12:20                   ` [PATCH 11/17] Add a driver for the Technisat Skystar2 DVB card Michael Hunold
2003-07-15 12:20                     ` [PATCH 12/17] Add two drivers for Hexium frame grabber cards Michael Hunold
2003-07-15 12:20                       ` [PATCH 13/17] More updates for the dvb core Michael Hunold
2003-07-15 12:20                         ` [PATCH 14/17] Add TDA14500x DVB-T frontend driver Michael Hunold
2003-07-15 12:21                           ` [PATCH 15/17] Update various other frontend drivers Michael Hunold
2003-07-15 12:21                             ` Michael Hunold [this message]
2003-07-16  1:28                     ` [PATCH 11/17] Add a driver for the Technisat Skystar2 DVB card Greg KH
2003-07-16  7:41                       ` Michael Hunold
2003-07-16 16:37                         ` Greg KH

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=10582716601185@convergence.de \
    --to=hunold@convergence.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).