Commit e2fc00c2 authored by Massimo Piccioni's avatar Massimo Piccioni Committed by Mauro Carvalho Chehab

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: default avatarMassimo Piccioni <alsa@piccio.org>
[mchehab@infradead.org: fixed merge conflicts and a small codingstyle]
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 52b50450
...@@ -143,3 +143,4 @@ ...@@ -143,3 +143,4 @@
142 -> Beholder BeholdTV H6 [5ace:6290] 142 -> Beholder BeholdTV H6 [5ace:6290]
143 -> Beholder BeholdTV M63 [5ace:6191] 143 -> Beholder BeholdTV M63 [5ace:6191]
144 -> Beholder BeholdTV M6 Extra [5ace:6193] 144 -> Beholder BeholdTV M6 Extra [5ace:6193]
145 -> AVerMedia MiniPCI DVB-T Hybrid M103 [1461:f636]
...@@ -1287,6 +1287,22 @@ struct saa7134_board saa7134_boards[] = { ...@@ -1287,6 +1287,22 @@ struct saa7134_board saa7134_boards[] = {
.vmux = 8, .vmux = 8,
}}, }},
}, },
[SAA7134_BOARD_AVERMEDIA_M103] = {
/* Massimo Piccioni <dafastidio@libero.it> */
.name = "AVerMedia MiniPCI DVB-T Hybrid M103",
.audio_clock = 0x187de7,
.tuner_type = TUNER_XC2028,
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
.vmux = 1,
.amux = TV,
.tv = 1,
} },
},
[SAA7134_BOARD_NOVAC_PRIMETV7133] = { [SAA7134_BOARD_NOVAC_PRIMETV7133] = {
/* toshii@netbsd.org */ /* toshii@netbsd.org */
.name = "Noval Prime TV 7133", .name = "Noval Prime TV 7133",
...@@ -5376,6 +5392,12 @@ struct pci_device_id saa7134_pci_tbl[] = { ...@@ -5376,6 +5392,12 @@ struct pci_device_id saa7134_pci_tbl[] = {
.subvendor = 0x5ace, .subvendor = 0x5ace,
.subdevice = 0x6290, .subdevice = 0x6290,
.driver_data = SAA7134_BOARD_BEHOLD_H6, .driver_data = SAA7134_BOARD_BEHOLD_H6,
}, {
.vendor = PCI_VENDOR_ID_PHILIPS,
.device = PCI_DEVICE_ID_PHILIPS_SAA7133,
.subvendor = 0x1461, /* Avermedia Technologies Inc */
.subdevice = 0xf636,
.driver_data = SAA7134_BOARD_AVERMEDIA_M103,
}, { }, {
/* --- boards without eeprom + subsystem ID --- */ /* --- boards without eeprom + subsystem ID --- */
.vendor = PCI_VENDOR_ID_PHILIPS, .vendor = PCI_VENDOR_ID_PHILIPS,
...@@ -5441,6 +5463,7 @@ static int saa7134_xc2028_callback(struct saa7134_dev *dev, ...@@ -5441,6 +5463,7 @@ static int saa7134_xc2028_callback(struct saa7134_dev *dev,
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000); saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x00008000, 0x00008000);
switch (dev->board) { switch (dev->board) {
case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
case SAA7134_BOARD_AVERMEDIA_M103:
saa7134_set_gpio(dev, 23, 0); saa7134_set_gpio(dev, 23, 0);
msleep(10); msleep(10);
saa7134_set_gpio(dev, 23, 1); saa7134_set_gpio(dev, 23, 1);
...@@ -5649,6 +5672,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) ...@@ -5649,6 +5672,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
msleep(10); msleep(10);
break; break;
case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
case SAA7134_BOARD_AVERMEDIA_M103:
saa7134_set_gpio(dev, 23, 0); saa7134_set_gpio(dev, 23, 0);
msleep(10); msleep(10);
saa7134_set_gpio(dev, 23, 1); saa7134_set_gpio(dev, 23, 1);
...@@ -5774,6 +5798,7 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev) ...@@ -5774,6 +5798,7 @@ static void saa7134_tuner_setup(struct saa7134_dev *dev)
switch (dev->board) { switch (dev->board) {
case SAA7134_BOARD_AVERMEDIA_A16D: case SAA7134_BOARD_AVERMEDIA_A16D:
case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: case SAA7134_BOARD_AVERMEDIA_CARDBUS_506:
case SAA7134_BOARD_AVERMEDIA_M103:
ctl.demod = XC3028_FE_ZARLINK456; ctl.demod = XC3028_FE_ZARLINK456;
break; break;
default: default:
......
...@@ -1263,6 +1263,7 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1263,6 +1263,7 @@ static int dvb_init(struct saa7134_dev *dev)
&avermedia_xc3028_mt352_dev, &avermedia_xc3028_mt352_dev,
&dev->i2c_adap); &dev->i2c_adap);
attach_xc3028 = 1; attach_xc3028 = 1;
break;
case SAA7134_BOARD_MD7134_BRIDGE_2: case SAA7134_BOARD_MD7134_BRIDGE_2:
dev->dvb.frontend = dvb_attach(tda10086_attach, dev->dvb.frontend = dvb_attach(tda10086_attach,
&sd1878_4m, &dev->i2c_adap); &sd1878_4m, &dev->i2c_adap);
...@@ -1290,6 +1291,15 @@ static int dvb_init(struct saa7134_dev *dev) ...@@ -1290,6 +1291,15 @@ static int dvb_init(struct saa7134_dev *dev)
fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage; fe->ops.enable_high_lnb_voltage = md8800_set_high_voltage;
} }
break; break;
case SAA7134_BOARD_AVERMEDIA_M103:
saa7134_set_gpio(dev, 25, 0);
msleep(10);
saa7134_set_gpio(dev, 25, 1);
dev->dvb.frontend = dvb_attach(mt352_attach,
&avermedia_xc3028_mt352_dev,
&dev->i2c_adap);
attach_xc3028 = 1;
break;
default: default:
wprintk("Huh? unknown DVB card?\n"); wprintk("Huh? unknown DVB card?\n");
break; break;
......
...@@ -266,6 +266,7 @@ struct saa7134_format { ...@@ -266,6 +266,7 @@ struct saa7134_format {
#define SAA7134_BOARD_BEHOLD_H6 142 #define SAA7134_BOARD_BEHOLD_H6 142
#define SAA7134_BOARD_BEHOLD_M63 143 #define SAA7134_BOARD_BEHOLD_M63 143
#define SAA7134_BOARD_BEHOLD_M6_EXTRA 144 #define SAA7134_BOARD_BEHOLD_M6_EXTRA 144
#define SAA7134_BOARD_AVERMEDIA_M103 145
#define SAA7134_MAXBOARDS 8 #define SAA7134_MAXBOARDS 8
#define SAA7134_INPUT_MAX 8 #define SAA7134_INPUT_MAX 8
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment