Add support for DVB part of Avermedia A700 DVB-S cards
cover Add support for DVB part of Avermedia A700 DVB-S cards
Hello all!
These patches finally add support for the DVB part of the Avermedia A700 DVB-S cards.
The first adds the tuner-driver for the Zarlink zl10036. The second adds the glue code to saa7134-dvb to use it.
After having them lying around a long time I now did a bit of cleanup and send them out now.
Regards
Matthias
PATCH 1/2 Add support for Zarlink ZL10036 DVB-S tuner.
This driver is based on initial work by Tino Reichardt and was heavily changed. The datasheet of the zl10036 can be found here and on other places on the net:
http://www.mcmilk.de/projects/dvb-card/datasheets/ZL10036.pdf
The zl10038 is similar to the zl10036, so it is maybe possible to write a common driver of necessary.
linux/drivers/media/dvb/frontends/Kconfig +7 -0
@@ -55,6 +55,13 @@ config DVB_MT312 help A DVB-S tuner module. Say Y when you want to support this frontend. +config DVB_ZL10036 + tristate "Zarlink ZL10036 silicon tuner" + depends on DVB_CORE && I2C + default m if DVB_FE_CUSTOMISE + help + A DVB-S tuner module. Say Y when you want to support this frontend. + config DVB_S5H1420 tristate "Samsung S5H1420 based" depends on DVB_CORE && I2C
linux/drivers/media/dvb/frontends/Makefile +1 -0
@@ -28,6 +28,7 @@ obj-$(CONFIG_DVB_TDA1004X) += tda1004x.o obj-$(CONFIG_DVB_SP887X) += sp887x.o obj-$(CONFIG_DVB_NXT6000) += nxt6000.o obj-$(CONFIG_DVB_MT352) += mt352.o +obj-$(CONFIG_DVB_ZL10036) += zl10036.o obj-$(CONFIG_DVB_ZL10353) += zl10353.o obj-$(CONFIG_DVB_CX22702) += cx22702.o obj-$(CONFIG_DVB_DRX397XD) += drx397xD.o
linux/drivers/media/dvb/frontends/zl10036.c new file +519 -0
519 lines not on this page · raw message
linux/drivers/media/dvb/frontends/zl10036.h new file +53 -0
53 lines not on this page · raw message
PATCH 2/2 saa7134: add DVB support for Avermedia A700 cards
In reply to Matthias SchwarzottAdd 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.
linux/drivers/media/video/saa7134/Kconfig +2 -0
@@ -37,6 +37,8 @@ config VIDEO_SAA7134_DVB select DVB_ISL6421 if !DVB_FE_CUSTOMISE select MEDIA_TUNER_TDA827X 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--- This adds support for DVB cards based on the Philips saa7134 chip.
linux/drivers/media/video/saa7134/saa7134-cards.c +7 -9
@@ -4460,8 +4460,7 @@ struct saa7134_board saa7134_boards[] = .radio_type = UNSET, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, - /* no DVB support for now */ - /* .mpeg = SAA7134_MPEG_DVB, */ + .mpeg = SAA7134_MPEG_DVB, .inputs = { { .name = name_comp, .vmux = 1,
@@ -4480,8 +4479,7 @@ struct saa7134_board saa7134_boards[] = .radio_type = UNSET, .tuner_addr = ADDR_UNSET, .radio_addr = ADDR_UNSET, - /* no DVB support for now */ - /* .mpeg = SAA7134_MPEG_DVB, */ + .mpeg = SAA7134_MPEG_DVB, .inputs = { { .name = name_comp, .vmux = 1,
@@ -6187,15 +6185,15 @@ int saa7134_board_init1(struct saa7134_dsaa_andorl (SAA7134_GPIO_GPMODE0 >>2 ,0x8c040007 ,0x8c040007 );saa_andorl (SAA7134_GPIO_GPSTATUS0 >>2 ,0x0c0007cd ,0x0c0007cd );break ; -case SAA7134_BOARD_AVERMEDIA_A700_PRO :case SAA7134_BOARD_AVERMEDIA_A700_HYBRID : -/* write windows gpio values */ -saa_andorl (SAA7134_GPIO_GPMODE0 >>2 ,0x80040100 ,0x80040100 ); -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 " +"%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 */ +saa_andorl (SAA7134_GPIO_GPMODE0 >>2 ,0x80040100 ,0x80040100 ); +saa_andorl (SAA7134_GPIO_GPSTATUS0 >>2 ,0x80040100 ,0x00040100 );break ; }return 0 ;
linux/drivers/media/video/saa7134/saa7134-dvb.c +27 -0
@@ -51,6 +51,9 @@#include "zl10353.h" +#include "zl10036.h" +#include "mt312.h" +MODULE_AUTHOR ("Gerd Knorr <[email protected]> [SuSE Labs]" );MODULE_LICENSE ("GPL" );
@@ -949,6 +952,17 @@ static struct nxt200x_config kworldatsc1 .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 */
@@ -1379,6 +1393,19 @@ static int dvb_init(struct saa7134_dev * TUNER_PHILIPS_FMD1216ME_MK3); }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" , + __FUNCTION__); + } + } +break ;default :wprintk ("Huh? unknown DVB card?\n" );break ;
That's great, I really hope your patches finally find their way into the main tree. I'm just tired of manually downloading & patching HG sources everytime I needed to recompile the kernel...
Anyway, I've been using the card for some time now (almost a year, IIRC...) and it runs very well in DVB-S mode. I was using your a700_full_xxxx patches, I hope you still leave them available until these patches are merged...
Best regards,
Eduard
2009/2/24 Matthias Schwarzott <[email protected]>:
Quoted 19 lines
Hello all!
These patches finally add support for the DVB part of the Avermedia A700 DVB-S cards.
The first adds the tuner-driver for the Zarlink zl10036. The second adds the glue code to saa7134-dvb to use it.
After having them lying around a long time I now did a bit of cleanup and send them out now.
Regards
Matthias--
To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html