summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-cards.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-core.c26
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h3
-rw-r--r--linux/drivers/media/video/tuner-core.c33
-rw-r--r--linux/include/media/tuner.h3
-rw-r--r--v4l/ChangeLog15
6 files changed, 61 insertions, 25 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-cards.c b/linux/drivers/media/video/saa7134/saa7134-cards.c
index b14c73be5..63d3e36e0 100644
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c
+++ b/linux/drivers/media/video/saa7134/saa7134-cards.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-cards.c,v 1.75 2005/06/28 23:41:47 mkrufky Exp $
+ * $Id: saa7134-cards.c,v 1.76 2005/07/01 08:22:24 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* card-specific stuff.
@@ -2503,10 +2503,6 @@ int saa7134_board_init1(struct saa7134_dev *dev)
msleep(1);
break;
}
- if (dev->has_remote)
- dev->irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 |
- SAA7134_IRQ2_INTE_GPIO18A |
- SAA7134_IRQ2_INTE_GPIO16 );
return 0;
}
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c
index 8fed24e6a..4b53c7f32 100644
--- a/linux/drivers/media/video/saa7134/saa7134-core.c
+++ b/linux/drivers/media/video/saa7134/saa7134-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-core.c,v 1.34 2005/06/28 23:41:47 mkrufky Exp $
+ * $Id: saa7134-core.c,v 1.35 2005/07/01 08:22:24 nsh Exp $
*
* device driver for philips saa7134 based TV cards
* driver core
@@ -736,14 +736,29 @@ static int saa7134_hwinit1(struct saa7134_dev *dev)
/* late init (with i2c + irq) */
static int saa7134_hwinit2(struct saa7134_dev *dev)
{
+ unsigned int irq2_mask;
dprintk("hwinit2\n");
saa7134_video_init2(dev);
saa7134_tvaudio_init2(dev);
/* enable IRQ's */
+ irq2_mask =
+ SAA7134_IRQ2_INTE_DEC3 |
+ SAA7134_IRQ2_INTE_DEC2 |
+ SAA7134_IRQ2_INTE_DEC1 |
+ SAA7134_IRQ2_INTE_DEC0 |
+ SAA7134_IRQ2_INTE_PE |
+ SAA7134_IRQ2_INTE_AR;
+ /*XXX mjt: is this really needed?
+ * can we enable all them unconditionally? */
+ if (dev->has_remote)
+ irq2_mask |= (SAA7134_IRQ2_INTE_GPIO18 |
+ SAA7134_IRQ2_INTE_GPIO18A |
+ SAA7134_IRQ2_INTE_GPIO16 );
+
saa_writel(SAA7134_IRQ1, 0);
- saa_writel(SAA7134_IRQ2, dev->irq2_mask);
+ saa_writel(SAA7134_IRQ2, irq2_mask);
return 0;
}
@@ -966,13 +981,6 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
}
/* initialize hardware #1 */
- dev->irq2_mask =
- SAA7134_IRQ2_INTE_DEC3 |
- SAA7134_IRQ2_INTE_DEC2 |
- SAA7134_IRQ2_INTE_DEC1 |
- SAA7134_IRQ2_INTE_DEC0 |
- SAA7134_IRQ2_INTE_PE |
- SAA7134_IRQ2_INTE_AR;
saa7134_board_init1(dev);
saa7134_hwinit1(dev);
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 5bebc236d..370c47608 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134.h,v 1.47 2005/06/21 03:10:31 mkrufky Exp $
+ * $Id: saa7134.h,v 1.48 2005/07/01 08:22:24 nsh Exp $
*
* v4l2 device driver for philips saa7134 based TV cards
*
@@ -425,7 +425,6 @@ struct saa7134_dev {
unsigned int tda9887_conf;
unsigned int gpio_value;
- unsigned int irq2_mask;
/* i2c i/o */
struct i2c_adapter i2c_adap;
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index ae5c0ceb6..e71e8df6b 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -1,5 +1,5 @@
/*
- * $Id: tuner-core.c,v 1.35 2005/06/30 21:46:28 mchehab Exp $
+ * $Id: tuner-core.c,v 1.36 2005/07/01 08:22:24 nsh Exp $
*
* i2c tv tuner chip device driver
* core core, i.e. kernel interfaces, registering and so on
@@ -243,43 +243,62 @@ static inline int check_mode(struct tuner *t, char *cmd)
static char pal[] = "-";
module_param_string(pal, pal, sizeof(pal), 0644);
+static char secam[] = "-";
+module_param_string(secam, secam, sizeof(secam), 0644);
+/* get more precise norm info from insmod option */
static int tuner_fixup_std(struct tuner *t)
{
if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) {
- /* get more precise norm info from insmod option */
switch (pal[0]) {
case 'b':
case 'B':
case 'g':
case 'G':
- tuner_dbg("insmod fixup: PAL => PAL-BG\n");
+ tuner_dbg ("insmod fixup: PAL => PAL-BG\n");
t->std = V4L2_STD_PAL_BG;
break;
case 'i':
case 'I':
- tuner_dbg("insmod fixup: PAL => PAL-I\n");
+ tuner_dbg ("insmod fixup: PAL => PAL-I\n");
t->std = V4L2_STD_PAL_I;
break;
case 'd':
case 'D':
case 'k':
case 'K':
- tuner_dbg("insmod fixup: PAL => PAL-DK\n");
+ tuner_dbg ("insmod fixup: PAL => PAL-DK\n");
t->std = V4L2_STD_PAL_DK;
break;
case 'M':
case 'm':
- tuner_dbg("insmod fixup: PAL => PAL-M\n");
+ tuner_dbg ("insmod fixup: PAL => PAL-M\n");
t->std = V4L2_STD_PAL_M;
break;
case 'N':
case 'n':
- tuner_dbg("insmod fixup: PAL => PAL-N\n");
+ tuner_dbg ("insmod fixup: PAL => PAL-N\n");
t->std = V4L2_STD_PAL_N;
break;
}
}
+ if ((t->std & V4L2_STD_SECAM) == V4L2_STD_SECAM) {
+ switch (secam[0]) {
+ case 'd':
+ case 'D':
+ case 'k':
+ case 'K':
+ tuner_dbg ("insmod fixup: SECAM => SECAM-DK\n");
+ t->std = V4L2_STD_SECAM_DK;
+ break;
+ case 'l':
+ case 'L':
+ tuner_dbg ("insmod fixup: SECAM => SECAM-L\n");
+ t->std = V4L2_STD_SECAM_L;
+ break;
+ }
+ }
+
return 0;
}
diff --git a/linux/include/media/tuner.h b/linux/include/media/tuner.h
index bee807930..7c1921f98 100644
--- a/linux/include/media/tuner.h
+++ b/linux/include/media/tuner.h
@@ -1,5 +1,5 @@
-/* $Id: tuner.h,v 1.36 2005/06/30 16:37:17 mchehab Exp $
+/* $Id: tuner.h,v 1.37 2005/07/01 08:22:24 nsh Exp $
*
tuner.h - definition for different tuners
@@ -195,7 +195,6 @@ struct tuner {
int using_v4l2;
enum v4l2_tuner_type mode;
- unsigned int input;
/* used by MT2032 */
unsigned int xogc;
diff --git a/v4l/ChangeLog b/v4l/ChangeLog
index 3a726de74..8a9e15744 100644
--- a/v4l/ChangeLog
+++ b/v4l/ChangeLog
@@ -1,3 +1,18 @@
+2005-07-01 12:12 nshmyrev
+ * tuner-core.c:
+
+ - Add option to resolve secam norm in tuner.
+
+ Signed-Off-By: Nickolay V. Shmyrev <nshmyrev@yandex.ru>
+
+2005-07-01 12:09 nshmyrev
+ * saa7134-cards.c, saa7134-core.c, saa7134.h:
+
+ - Remove irq2_mask field from saa7134_dev structure.
+ Collect all the bits needed in saa7134_hwinit2() instead.
+
+ Signed-Off-By: Michael Tokarev <mjt@tls.msk.ru>
+
2005-06-29 17:18 mchehab
* tuner-core.c: