[PATCH] Compro VideoMate T750

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch add support for Compro VideoMate T750 to the saa7134 driver in v4l-dvb-experimental
Analog TV is working
Digital is detected but not yet working

Signed-off-by: John Newbigin <jn@xxxxxxxxxxxxxx>

diff -r e4f0c12cacc3 linux/drivers/media/video/saa7134/saa7134-cards.c
--- a/linux/drivers/media/video/saa7134/saa7134-cards.c Fri Apr 20 21:08:52 2007 +0200 +++ b/linux/drivers/media/video/saa7134/saa7134-cards.c Wed Apr 25 18:27:00 2007 +1000
@@ -3513,6 +3513,34 @@ struct saa7134_board saa7134_boards[] =
                       .gpio = 0x0200000,
               },
       },
+       [SAA7134_BOARD_VIDEOMATE_T750] = {
+               /* John Newbigin <jn@xxxxxxxxxxxxxx> */
+               .name           = "Compro VideoMate T750",
+               .audio_clock    = 0x00187de7,
+               .tuner_type     = TUNER_XCEIVE_XC3028,
+               .radio_type     = UNSET,
+               .tuner_addr     = 0x61,
+               .radio_addr     = ADDR_UNSET,
+               .mpeg           = SAA7134_MPEG_DVB,
+               .inputs = {{
+                       .name   = name_tv,
+                       .vmux   = 3,
+                       .amux   = TV,
+                       .tv     = 1,
+               },{
+                       .name   = name_comp1,
+                       .vmux   = 1,
+                       .amux   = LINE2,
+               },{
+                       .name   = name_svideo,
+                       .vmux   = 8,
+                       .amux   = LINE2,
+               }},
+               .radio = {
+                       .name = name_radio,
+                       .amux = TV,
+               },
+       },
};

const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -3929,6 +3957,12 @@ struct pci_device_id saa7134_pci_tbl[] =
               .subvendor    = 0x185b,
               .subdevice    = 0xc900,
               .driver_data  = SAA7134_BOARD_VIDEOMATE_DVBT_300,
+       },{
+               .vendor       = PCI_VENDOR_ID_PHILIPS,
+               .device       = PCI_DEVICE_ID_PHILIPS_SAA7133,
+               .subvendor    = 0x185b,
+               .subdevice    = 0xc900,
+               .driver_data  = SAA7134_BOARD_VIDEOMATE_T750,
       },{
               .vendor       = PCI_VENDOR_ID_PHILIPS,
               .device       = PCI_DEVICE_ID_PHILIPS_SAA7130,
@@ -4356,6 +4390,7 @@ int saa7134_board_init1(struct saa7134_d
       case SAA7134_BOARD_VIDEOMATE_DVBT_300:
       case SAA7134_BOARD_VIDEOMATE_DVBT_200:
       case SAA7134_BOARD_VIDEOMATE_DVBT_200A:
+       case SAA7134_BOARD_VIDEOMATE_T750:
       case SAA7134_BOARD_MANLI_MTV001:
       case SAA7134_BOARD_MANLI_MTV002:
       case SAA7134_BOARD_BEHOLD_409FM:
diff -r e4f0c12cacc3 linux/drivers/media/video/saa7134/saa7134-core.c
--- a/linux/drivers/media/video/saa7134/saa7134-core.c Fri Apr 20 21:08:52 2007 +0200 +++ b/linux/drivers/media/video/saa7134/saa7134-core.c Wed Apr 25 18:27:00 2007 +1000
@@ -39,6 +39,11 @@
#include "saa7134-reg.h"
#include "saa7134.h"

+/* These should go into a header, and perhaps some docs */
+#define TUNER_RESET1 0
+#define TUNER_RESET2 1
+#define TUNER_RESET3 2
+
MODULE_DESCRIPTION("v4l2 driver module for saa7130/34 based TV cards");
MODULE_AUTHOR("Gerd Knorr <kraxel@xxxxxxxxxxx> [SuSE Labs]");
MODULE_LICENSE("GPL");
@@ -187,6 +192,20 @@ int saa7134_tuner_callback(void *ptr, in
                       break;
               default:
                       return -EINVAL;
+               }
+               break;
+       case TUNER_XCEIVE_XC3028:
+ dprintk(KERN_INFO "saa7134_tuner_callback TUNER_XCEIVE_XC3028 command %d\n", command);
+               switch(command) {
+               case TUNER_RESET1:
+               case TUNER_RESET2:
+                       /* this seems to be to correct bit */
+ saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00000000); + saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
+                       break;
+
+               case TUNER_RESET3:
+                       break;
               }
               break;
       default:
diff -r e4f0c12cacc3 linux/drivers/media/video/saa7134/saa7134-dvb.c
--- a/linux/drivers/media/video/saa7134/saa7134-dvb.c Fri Apr 20 21:08:52 2007 +0200 +++ b/linux/drivers/media/video/saa7134/saa7134-dvb.c Wed Apr 25 18:27:00 2007 +1000
@@ -39,6 +39,8 @@
#include "mt352_priv.h" /* FIXME */
#include "tda1004x.h"
#include "nxt200x.h"
+#include "zl10353.h"
+#include "qt1010.h"

#include "tda10086.h"
#include "tda826x.h"
@@ -969,6 +971,17 @@ static struct nxt200x_config kworldatsc1
       .set_pll_input    = nxt200x_set_pll_input,
};

+static struct zl10353_config videomate_t750_zl10353_config = {
+       .demod_address = 0x0f,
+       .parallel_ts = 1,
+       .no_tuner = 0,
+};
+
+static struct qt1010_config videomate_t750_qt1010_config = {
+       .i2c_address = 0x62
+};
+
+
/* ==================================================================
 * Core code
 */
@@ -995,6 +1008,30 @@ static int dvb_init(struct saa7134_dev *
               if (dev->dvb.frontend) {
dev->dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params;
               }
+               break;
+       case SAA7134_BOARD_VIDEOMATE_T750:
+               dprintk("Compro VideoMate T750 DVB setup\n");
+                dev->dvb.frontend = dvb_attach(zl10353_attach,
+ &videomate_t750_zl10353_config,
+                                               &dev->i2c_adap);
+                if (dev->dvb.frontend != NULL) {
+                       dprintk("Attaching pll\n");
+
+ /* gate function is not required TODO What is setting this? */
+                       dev->dvb.frontend->ops.i2c_gate_ctrl = 0;
+
+ dev->dvb.frontend->ops.tuner_ops.fe = dev->dvb.frontend;
+                       dev->dvb.frontend->ops.tuner_ops.dev = dev;
+
+                       if (dvb_attach(qt1010_attach,
+                                      &dev->dvb.frontend->ops.tuner_ops,
+                                      &dev->i2c_adap,
+ &videomate_t750_qt1010_config) == NULL)
+                       {
+                               wprintk("error attaching QT1010\n");
+                       }
+                }
+
               break;
       case SAA7134_BOARD_AVERMEDIA_777:
       case SAA7134_BOARD_AVERMEDIA_A16AR:
diff -r e4f0c12cacc3 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c Fri Apr 20 21:08:52 2007 +0200 +++ b/linux/drivers/media/video/saa7134/saa7134-input.c Wed Apr 25 18:27:00 2007 +1000
@@ -309,6 +309,7 @@ int saa7134_input_init1(struct saa7134_d
               mask_keyup   = 0x000080;
               polling      = 50; // ms
               break;
+       case SAA7134_BOARD_VIDEOMATE_T750:
       case SAA7134_BOARD_VIDEOMATE_DVBT_300:
       case SAA7134_BOARD_VIDEOMATE_DVBT_200:
               ir_codes     = ir_codes_videomate_tv_pvr;
diff -r e4f0c12cacc3 linux/drivers/media/video/saa7134/saa7134.h
--- a/linux/drivers/media/video/saa7134/saa7134.h Fri Apr 20 21:08:52 2007 +0200 +++ b/linux/drivers/media/video/saa7134/saa7134.h Wed Apr 25 18:27:00 2007 +1000
@@ -245,6 +245,7 @@ struct saa7134_format {
#define SAA7134_BOARD_AVERMEDIA_CARDBUS_506  113
#define SAA7134_BOARD_AVERMEDIA_A16D   114
#define SAA7134_BOARD_AVERMEDIA_M115   115
+#define SAA7134_BOARD_VIDEOMATE_T750  116

#define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux