mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 22:24:09 +08:00
V4L/DVB (10823): saa7134: add DVB support for Avermedia A700 cards
Add DVB support for Avermedia DVB-S Pro and Avermedia DVB-S Hybrid+FM card both labled A700. They use zl10313 demod (driver mt312) and zl10036 tuner. [mchehab@redhat.com: change __FUNCTION__ into __func__] Signed-off-by: Matthias Schwarzott <zzam@gentoo.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
68b3289fdb
commit
04574185aa
@ -37,6 +37,8 @@ config VIDEO_SAA7134_DVB
|
|||||||
select DVB_ISL6421 if !DVB_FE_CUSTOMISE
|
select DVB_ISL6421 if !DVB_FE_CUSTOMISE
|
||||||
select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
|
select MEDIA_TUNER_TDA827X if !MEDIA_TUNER_CUSTOMIZE
|
||||||
select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
|
select MEDIA_TUNER_SIMPLE if !MEDIA_TUNER_CUSTOMIZE
|
||||||
|
select DVB_ZL10036 if !DVB_FE_CUSTOMISE
|
||||||
|
select DVB_MT312 if !DVB_FE_CUSTOMISE
|
||||||
---help---
|
---help---
|
||||||
This adds support for DVB cards based on the
|
This adds support for DVB cards based on the
|
||||||
Philips saa7134 chip.
|
Philips saa7134 chip.
|
||||||
|
@ -4421,8 +4421,7 @@ struct saa7134_board saa7134_boards[] = {
|
|||||||
.radio_type = UNSET,
|
.radio_type = UNSET,
|
||||||
.tuner_addr = ADDR_UNSET,
|
.tuner_addr = ADDR_UNSET,
|
||||||
.radio_addr = ADDR_UNSET,
|
.radio_addr = ADDR_UNSET,
|
||||||
/* no DVB support for now */
|
.mpeg = SAA7134_MPEG_DVB,
|
||||||
/* .mpeg = SAA7134_MPEG_DVB, */
|
|
||||||
.inputs = { {
|
.inputs = { {
|
||||||
.name = name_comp,
|
.name = name_comp,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
@ -4441,8 +4440,7 @@ struct saa7134_board saa7134_boards[] = {
|
|||||||
.radio_type = UNSET,
|
.radio_type = UNSET,
|
||||||
.tuner_addr = ADDR_UNSET,
|
.tuner_addr = ADDR_UNSET,
|
||||||
.radio_addr = ADDR_UNSET,
|
.radio_addr = ADDR_UNSET,
|
||||||
/* no DVB support for now */
|
.mpeg = SAA7134_MPEG_DVB,
|
||||||
/* .mpeg = SAA7134_MPEG_DVB, */
|
|
||||||
.inputs = { {
|
.inputs = { {
|
||||||
.name = name_comp,
|
.name = name_comp,
|
||||||
.vmux = 1,
|
.vmux = 1,
|
||||||
@ -6084,15 +6082,15 @@ int saa7134_board_init1(struct saa7134_dev *dev)
|
|||||||
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x8c040007, 0x8c040007);
|
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x8c040007, 0x8c040007);
|
||||||
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0c0007cd, 0x0c0007cd);
|
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x0c0007cd, 0x0c0007cd);
|
||||||
break;
|
break;
|
||||||
case SAA7134_BOARD_AVERMEDIA_A700_PRO:
|
|
||||||
case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
|
case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
|
||||||
|
printk("%s: %s: hybrid analog/dvb card\n"
|
||||||
|
"%s: Sorry, of the analog inputs, only analog s-video and composite "
|
||||||
|
"are supported for now.\n",
|
||||||
|
dev->name, card(dev).name, dev->name);
|
||||||
|
case SAA7134_BOARD_AVERMEDIA_A700_PRO:
|
||||||
/* write windows gpio values */
|
/* write windows gpio values */
|
||||||
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100);
|
saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0x80040100, 0x80040100);
|
||||||
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
|
saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x80040100, 0x00040100);
|
||||||
printk("%s: %s: hybrid analog/dvb card\n"
|
|
||||||
"%s: Sorry, only analog s-video and composite input "
|
|
||||||
"are supported for now.\n",
|
|
||||||
dev->name, card(dev).name, dev->name);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -51,6 +51,9 @@
|
|||||||
|
|
||||||
#include "zl10353.h"
|
#include "zl10353.h"
|
||||||
|
|
||||||
|
#include "zl10036.h"
|
||||||
|
#include "mt312.h"
|
||||||
|
|
||||||
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
|
MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
@ -950,6 +953,17 @@ static struct nxt200x_config kworldatsc110 = {
|
|||||||
.demod_address = 0x0a,
|
.demod_address = 0x0a,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------ */
|
||||||
|
|
||||||
|
static struct mt312_config avertv_a700_mt312 = {
|
||||||
|
.demod_address = 0x0e,
|
||||||
|
.voltage_inverted = 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
static struct zl10036_config avertv_a700_tuner = {
|
||||||
|
.tuner_address = 0x60,
|
||||||
|
};
|
||||||
|
|
||||||
/* ==================================================================
|
/* ==================================================================
|
||||||
* Core code
|
* Core code
|
||||||
*/
|
*/
|
||||||
@ -1376,6 +1390,19 @@ static int dvb_init(struct saa7134_dev *dev)
|
|||||||
TUNER_PHILIPS_FMD1216ME_MK3);
|
TUNER_PHILIPS_FMD1216ME_MK3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case SAA7134_BOARD_AVERMEDIA_A700_PRO:
|
||||||
|
case SAA7134_BOARD_AVERMEDIA_A700_HYBRID:
|
||||||
|
/* Zarlink ZL10313 */
|
||||||
|
fe0->dvb.frontend = dvb_attach(mt312_attach,
|
||||||
|
&avertv_a700_mt312, &dev->i2c_adap);
|
||||||
|
if (fe0->dvb.frontend) {
|
||||||
|
if (dvb_attach(zl10036_attach, fe0->dvb.frontend,
|
||||||
|
&avertv_a700_tuner, &dev->i2c_adap) == NULL) {
|
||||||
|
wprintk("%s: No zl10036 found!\n",
|
||||||
|
__func__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
wprintk("Huh? unknown DVB card?\n");
|
wprintk("Huh? unknown DVB card?\n");
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user