aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorMassimo Piccioni <alsa@piccio.org>2008-07-11 12:48:02 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:18:29 -0400
commite2fc00c21124d9d9a8d4f396e5498ea27ddfc8fd (patch)
tree01bb16551bf0c17077d9595e25edf621bb469c60 /drivers/media/video/saa7134
parent52b5045078b76ee86e210210601d45670eab22f1 (diff)
V4L/DVB (8244): saa7134: add support for AVerMedia M103
The following patch updates saa7134 driver to add support for AVerMedia M103 MiniPCI DVB-T Hybrid card. Signed-off-by: Massimo Piccioni <alsa@piccio.org> [mchehab@infradead.org: fixed merge conflicts and a small codingstyle] Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c25
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c10
-rw-r--r--drivers/media/video/saa7134/saa7134.h1
3 files changed, 36 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index 2511d0679c58..4e6e5ccaa35e 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -1287,6 +1287,22 @@ struct saa7134_board saa7134_boards[] = {
1287 .vmux = 8, 1287 .vmux = 8,
1288 }}, 1288 }},
1289 }, 1289 },
1290 [SAA7134_BOARD_AVERMEDIA_M103] = {
1291 /* Massimo Piccioni <dafastidio@libero.it> */
1292 .name = "AVerMedia MiniPCI DVB-T Hybrid M103",
1293 .audio_clock = 0x187de7,
1294 .tuner_type = TUNER_XC2028,
1295 .radio_type = UNSET,
1296 .tuner_addr = ADDR_UNSET,
1297 .radio_addr = ADDR_UNSET,
1298 .mpeg = SAA7134_MPEG_DVB,
1299 .inputs = {{
1300 .name = name_tv,
1301 .vmux = 1,
1302 .amux = TV,
1303 .tv = 1,
1304 } },
1305 },
1290 [SAA7134_BOARD_NOVAC_PRIMETV7133] = { 1306 [SAA7134_BOARD_NOVAC_PRIMETV7133] = {
1291 /* toshii@netbsd.org */ 1307 /* toshii@netbsd.org */
1292 .name = "Noval Prime TV 7133", 1308 .name = "Noval Prime TV 7133",
@@ -5377,6 +5393,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
5377 .subdevice = 0x6290, 5393 .subdevice = 0x6290,
5378 .driver_data = SAA7134_BOARD_BEHOLD_H6, 5394 .driver_data = SAA7134_BOARD_BEHOLD_H6,
5379 }, { 5395 }, {
5396 .vendor = PCI_VENDOR_ID_PHILIPS,
5397 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
5398 .subvendor = 0x1461, /* Avermedia Technologies Inc */
5399 .subdevice = 0xf636,
5400 .driver_data = SAA7134_BOARD_AVERMEDIA_M103,
5401 }, {
5380 /* --- boards without eeprom + subsystem ID --- */ 5402 /* --- boards without eeprom + subsystem ID --- */
5381 .vendor = PCI_VENDOR_ID_PHILIPS, 5403 .vendor = PCI_VENDOR_ID_PHILIPS,
5382 .device = PCI_DEVICE_ID_PHILIPS_SAA7134, 5404 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
@@ -5441,6 +5463,7 @@ static int saa7134_xc2028_callback(struct saa7134_dev *dev,
5441 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000); 5463 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
5442 switch (dev->board) { 5464 switch (dev->board) {
5443 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: 5465 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5466 case SAA7134_BOARD_AVERMEDIA_M103:
5444 saa7134_set_gpio(dev, 23, 0); 5467 saa7134_set_gpio(dev, 23, 0);
5445 msleep(10); 5468 msleep(10);
5446 saa7134_set_gpio(dev, 23, 1); 5469 saa7134_set_gpio(dev, 23, 1);
@@ -5649,6 +5672,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
5649 msleep(10); 5672 msleep(10);
5650 break; 5673 break;
5651 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: 5674 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5675 case SAA7134_BOARD_AVERMEDIA_M103:
5652 saa7134_set_gpio(dev, 23, 0); 5676 saa7134_set_gpio(dev, 23, 0);
5653 msleep(10); 5677 msleep(10);
5654 saa7134_set_gpio(dev, 23, 1); 5678 saa7134_set_gpio(dev, 23, 1);
@@ -5774,6 +5798,7 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev)
5774 switch (dev->board) { 5798 switch (dev->board) {
5775 case SAA7134_BOARD_AVERMEDIA_A16D: 5799 case SAA7134_BOARD_AVERMEDIA_A16D:
5776 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: 5800 case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
5801 case SAA7134_BOARD_AVERMEDIA_M103:
5777 ctl.demod = XC3028_FE_ZARLINK456; 5802 ctl.demod = XC3028_FE_ZARLINK456;
5778 break; 5803 break;
5779 default: 5804 default:
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 341b101b0357..be48b9b66a67 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -1263,6 +1263,7 @@ static int dvb_init(struct saa7134_dev *dev)
1263 &avermedia_xc3028_mt352_dev, 1263 &avermedia_xc3028_mt352_dev,
1264 &dev->i2c_adap); 1264 &dev->i2c_adap);
1265 attach_xc3028 = 1; 1265 attach_xc3028 = 1;
1266 break;
1266 case SAA7134_BOARD_MD7134_BRIDGE_2: 1267 case SAA7134_BOARD_MD7134_BRIDGE_2:
1267 dev->dvb.frontend = dvb_attach(tda10086_attach, 1268 dev->dvb.frontend = dvb_attach(tda10086_attach,
1268 &sd1878_4m, &dev->i2c_adap); 1269 &sd1878_4m, &dev->i2c_adap);
@@ -1290,6 +1291,15 @@ static int dvb_init(struct saa7134_dev *dev)
1290 fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage; 1291 fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage;
1291 } 1292 }
1292 break; 1293 break;
1294 case SAA7134_BOARD_AVERMEDIA_M103:
1295 saa7134_set_gpio(dev, 25, 0);
1296 msleep(10);
1297 saa7134_set_gpio(dev, 25, 1);
1298 dev->dvb.frontend = dvb_attach(mt352_attach,
1299 &avermedia_xc3028_mt352_dev,
1300 &dev->i2c_adap);
1301 attach_xc3028 = 1;
1302 break;
1293 default: 1303 default:
1294 wprintk("Huh? unknown DVB card?\n"); 1304 wprintk("Huh? unknown DVB card?\n");
1295 break; 1305 break;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 4e491ad389ac..6e5a4094d6be 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -266,6 +266,7 @@ struct saa7134_format {
266#define SAA7134_BOARD_BEHOLD_H6 142 266#define SAA7134_BOARD_BEHOLD_H6 142
267#define SAA7134_BOARD_BEHOLD_M63 143 267#define SAA7134_BOARD_BEHOLD_M63 143
268#define SAA7134_BOARD_BEHOLD_M6_EXTRA 144 268#define SAA7134_BOARD_BEHOLD_M6_EXTRA 144
269#define SAA7134_BOARD_AVERMEDIA_M103 145
269 270
270#define SAA7134_MAXBOARDS 8 271#define SAA7134_MAXBOARDS 8
271#define SAA7134_INPUT_MAX 8 272#define SAA7134_INPUT_MAX 8