mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] V4L/DVB updates
@ 2006-10-05  2:58 mchehab
  2006-10-05  2:59 ` [PATCH 1/2] V4L/DVB (4692): Add WinTV-HVR3000 DVB-T support mchehab
  2006-10-05  2:59 ` [PATCH 2/2] V4L/DVB (4722): Cx88: Add support for VIDIOC_INT_[SR]_REGISTER ioctls mchehab
  0 siblings, 2 replies; 3+ messages in thread
From: mchehab @ 2006-10-05  2:58 UTC (permalink / raw)
  To: torvalds; +Cc: linux-dvb-maintainer, video4linux-list, akpm, linux-kernel

Linus,

Those are the two last patches for the 2-week window.
Please pull these from master branch at:
        kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb.git

It contains the following stuff:

   - Add WinTV-HVR3000 DVB-T support
   - Cx88: Add support for VIDIOC_INT_[SR]_REGISTER ioctls

Cheers,
Mauro.

V4L/DVB development is hosted at http://linuxtv.org
---

 Documentation/video4linux/CARDLIST.cx88 |    2 +-
 drivers/media/video/cx88/cx88-cards.c   |   21 +++++++++++++++++++++
 drivers/media/video/cx88/cx88-dvb.c     |   17 +++++++++++++++++
 drivers/media/video/cx88/cx88-input.c   |    2 ++
 drivers/media/video/cx88/cx88-video.c   |   24 ++++++++++++++++++++++++
 5 files changed, 65 insertions(+), 1 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] V4L/DVB (4722): Cx88: Add support for VIDIOC_INT_[SR]_REGISTER ioctls
  2006-10-05  2:58 [PATCH 0/2] V4L/DVB updates mchehab
  2006-10-05  2:59 ` [PATCH 1/2] V4L/DVB (4692): Add WinTV-HVR3000 DVB-T support mchehab
@ 2006-10-05  2:59 ` mchehab
  1 sibling, 0 replies; 3+ messages in thread
From: mchehab @ 2006-10-05  2:59 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-dvb-maintainer, Trent Piepho, Mauro Carvalho Chehab


From: Trent Piepho <xyzzy@speakeasy.org>

Add support for the advanced debugging ioctls, to allow access to the
cx88 registers from userspace.  Only i2c_id == 0 is supported, for access
to the cx88 adapter itself.  There isn't any support for access to I2C
clients of the adapter.  Most of them don't have R/W registers anyway,
and its necessary to use i2c-dev to talk to them from userspace.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 drivers/media/video/cx88/cx88-video.c |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index cb0c0ee..264cd29 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -1490,6 +1490,30 @@ int cx88_do_ioctl(struct inode *inode, s
 		mutex_unlock(&core->lock);
 		return 0;
 	}
+#ifdef CONFIG_VIDEO_ADV_DEBUG
+	/* ioctls to allow direct acces to the cx2388x registers */
+	case VIDIOC_INT_G_REGISTER:
+	{
+		struct v4l2_register *reg = arg;
+
+		if (reg->i2c_id != 0)
+			return -EINVAL;
+		/* cx2388x has a 24-bit register space */
+		reg->val = cx_read(reg->reg&0xffffff);
+		return 0;
+	}
+	case VIDIOC_INT_S_REGISTER:
+	{
+		struct v4l2_register *reg = arg;
+
+		if (reg->i2c_id != 0)
+			return -EINVAL;
+		if (!capable(CAP_SYS_ADMIN))
+			return -EPERM;
+		cx_write(reg->reg&0xffffff, reg->val);
+		return 0;
+	}
+#endif
 
 	default:
 		return v4l_compat_translate_ioctl(inode,file,cmd,arg,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] V4L/DVB (4692): Add WinTV-HVR3000 DVB-T support
  2006-10-05  2:58 [PATCH 0/2] V4L/DVB updates mchehab
@ 2006-10-05  2:59 ` mchehab
  2006-10-05  2:59 ` [PATCH 2/2] V4L/DVB (4722): Cx88: Add support for VIDIOC_INT_[SR]_REGISTER ioctls mchehab
  1 sibling, 0 replies; 3+ messages in thread
From: mchehab @ 2006-10-05  2:59 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-dvb-maintainer, Steven Toth, Michael Krufky, Mauro Carvalho Chehab


From: Steven Toth <stoth@hauppauge.com>

The WinTV-HVR3000 is currently defined for analog support only. This
patch adds full DVB-T support. (DVB-S support will be added soon)

Signed-off-by: Steven Toth <stoth@hauppauge.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
---

 Documentation/video4linux/CARDLIST.cx88 |    2 +-
 drivers/media/video/cx88/cx88-cards.c   |   21 +++++++++++++++++++++
 drivers/media/video/cx88/cx88-dvb.c     |   17 +++++++++++++++++
 drivers/media/video/cx88/cx88-input.c   |    2 ++
 4 files changed, 41 insertions(+), 1 deletions(-)

diff --git a/Documentation/video4linux/CARDLIST.cx88 b/Documentation/video4linux/CARDLIST.cx88
index 126e59d..8755b3e 100644
--- a/Documentation/video4linux/CARDLIST.cx88
+++ b/Documentation/video4linux/CARDLIST.cx88
@@ -51,7 +51,7 @@
  50 -> NPG Tech Real TV FM Top 10                          [14f1:0842]
  51 -> WinFast DTV2000 H                                   [107d:665e]
  52 -> Geniatech DVB-S                                     [14f1:0084]
- 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T  [0070:1404]
+ 53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T  [0070:1404,0070:1400,0070:1401,0070:1402]
  54 -> Norwood Micro TV Tuner
  55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM  [c180:c980]
  56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder   [0070:9600,0070:9601,0070:9602]
diff --git a/drivers/media/video/cx88/cx88-cards.c b/drivers/media/video/cx88/cx88-cards.c
index af71d42..f764a57 100644
--- a/drivers/media/video/cx88/cx88-cards.c
+++ b/drivers/media/video/cx88/cx88-cards.c
@@ -1230,6 +1230,7 @@ struct cx88_board cx88_boards[] = {
 			.vmux   = 2,
 			.gpio0  = 0x84bf,
 		}},
+		.mpeg           = CX88_MPEG_DVB,
 	},
 	[CX88_BOARD_NORWOOD_MICRO] = {
 		.name           = "Norwood Micro TV Tuner",
@@ -1590,6 +1591,18 @@ struct cx88_subid cx88_subids[] = {
 		.subvendor = 0x0070,
 		.subdevice = 0x9000,
 		.card      = CX88_BOARD_HAUPPAUGE_DVB_T1,
+	},{
+		.subvendor = 0x0070,
+		.subdevice = 0x1400,
+		.card      = CX88_BOARD_HAUPPAUGE_HVR3000,
+	},{
+		.subvendor = 0x0070,
+		.subdevice = 0x1401,
+		.card      = CX88_BOARD_HAUPPAUGE_HVR3000,
+	},{
+		.subvendor = 0x0070,
+		.subdevice = 0x1402,
+		.card      = CX88_BOARD_HAUPPAUGE_HVR3000,
 	},
 };
 const unsigned int cx88_idcount = ARRAY_SIZE(cx88_subids);
@@ -1633,7 +1646,15 @@ static void hauppauge_eeprom(struct cx88
 	/* Make sure we support the board model */
 	switch (tv.model)
 	{
+	case 14009: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in) */
+	case 14019: /* WinTV-HVR3000 (Retail, IR Blaster, b/panel video, 3.5mm audio in) */
+	case 14029: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge) */
+	case 14109: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - low profile) */
+	case 14129: /* WinTV-HVR3000 (Retail, IR, b/panel video, 3.5mm audio in - 880 bridge - LP) */
+	case 14559: /* WinTV-HVR3000 (OEM, no IR, b/panel video, 3.5mm audio in) */
 	case 14569: /* WinTV-HVR3000 (OEM, no IR, no back panel video) */
+	case 14659: /* WinTV-HVR3000 (OEM, no IR, b/panel video, RCA audio in - Low profile) */
+	case 14669: /* WinTV-HVR3000 (OEM, no IR, no b/panel video - Low profile) */
 	case 28552: /* WinTV-PVR 'Roslyn' (No IR) */
 	case 34519: /* WinTV-PCI-FM */
 	case 90002: /* Nova-T-PCI (9002) */
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index bd0c879..0ef13e7 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -315,15 +315,22 @@ static struct cx22702_config hauppauge_n
 	.demod_address = 0x43,
 	.output_mode   = CX22702_SERIAL_OUTPUT,
 };
+
 static struct cx22702_config hauppauge_hvr1100_config = {
 	.demod_address = 0x63,
 	.output_mode   = CX22702_SERIAL_OUTPUT,
 };
+
 static struct cx22702_config hauppauge_hvr1300_config = {
 	.demod_address = 0x63,
 	.output_mode   = CX22702_SERIAL_OUTPUT,
 };
 
+static struct cx22702_config hauppauge_hvr3000_config = {
+	.demod_address = 0x63,
+	.output_mode = CX22702_SERIAL_OUTPUT,
+};
+
 static int or51132_set_ts_param(struct dvb_frontend* fe,
 				int is_punctured)
 {
@@ -558,6 +565,16 @@ static int dvb_register(struct cx8802_de
 				   &dvb_pll_fmd1216me);
 		}
 		break;
+	case CX88_BOARD_HAUPPAUGE_HVR3000:
+		dev->dvb.frontend = dvb_attach(cx22702_attach,
+					       &hauppauge_hvr3000_config,
+					       &dev->core->i2c_adap);
+		if (dev->dvb.frontend != NULL) {
+			dvb_attach(dvb_pll_attach, dev->dvb.frontend, 0x61,
+				   &dev->core->i2c_adap,
+				   &dvb_pll_fmd1216me);
+		}
+		break;
 	case CX88_BOARD_DVICO_FUSIONHDTV_DVB_T_PLUS:
 		dev->dvb.frontend = dvb_attach(mt352_attach,
 					       &dvico_fusionhdtv,
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index 83ebf7a..ee48995 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -196,6 +196,7 @@ int cx88_ir_init(struct cx88_core *core,
 	case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
 	case CX88_BOARD_HAUPPAUGE_HVR1100:
 	case CX88_BOARD_HAUPPAUGE_HVR1300:
+	case CX88_BOARD_HAUPPAUGE_HVR3000:
 		ir_codes = ir_codes_hauppauge_new;
 		ir_type = IR_TYPE_RC5;
 		ir->sampling = 1;
@@ -419,6 +420,7 @@ void cx88_ir_irq(struct cx88_core *core)
 	case CX88_BOARD_HAUPPAUGE_NOVASPLUS_S1:
 	case CX88_BOARD_HAUPPAUGE_HVR1100:
 	case CX88_BOARD_HAUPPAUGE_HVR1300:
+	case CX88_BOARD_HAUPPAUGE_HVR3000:
 		ircode = ir_decode_biphase(ir->samples, ir->scount, 5, 7);
 		ir_dprintk("biphase decoded: %x\n", ircode);
 		if ((ircode & 0xfffff000) != 0x3000)


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-10-05  3:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-05  2:58 [PATCH 0/2] V4L/DVB updates mchehab
2006-10-05  2:59 ` [PATCH 1/2] V4L/DVB (4692): Add WinTV-HVR3000 DVB-T support mchehab
2006-10-05  2:59 ` [PATCH 2/2] V4L/DVB (4722): Cx88: Add support for VIDIOC_INT_[SR]_REGISTER ioctls mchehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®