On Thu, 20 Mar 2008 14:07:15 -0300 Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> wrote: > 100% of rejects??? This is really weird... Maybe your emailer did something bad > with the patches, like converting to DOS end-of-line marks. You may try to use > '-l' option on patch. > > I'll also forward you in priv the patch, as an attachment. Ok, the patch that fixed the callbacks were already applied. For DVB to work, the demod needs to be initialized. From what I saw on bttv-gallery, this board uses an mt352 demod. Hopefully, it will use the same code as AV A16AR. I'm enclosing an experimental patch that will enable DVB support for this board. Please test. Cheers, Mauro --- saa7134: Add DTV support for Avermedia A16D From: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> --- linux/drivers/media/video/saa7134/saa7134-cards.c | 12 +++++++++--- linux/drivers/media/video/saa7134/saa7134-dvb.c | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) --- master.orig/linux/drivers/media/video/saa7134/saa7134-cards.c +++ master/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -5512,6 +5512,7 @@ int saa7134_board_init1(struct saa7134_d case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: case SAA7134_BOARD_AVERMEDIA_M115: case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM: + case SAA7134_BOARD_AVERMEDIA_A16D: /* power-up tuner chip */ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff); @@ -5808,9 +5809,14 @@ int saa7134_board_init2(struct saa7134_d ctl.fname = XC2028_DEFAULT_FIRMWARE; ctl.max_len = 64; - /* FIXME: This should be device-dependent */ - ctl.demod = XC3028_FE_OREN538; - ctl.mts = 1; + switch (dev->board) { + case SAA7134_BOARD_AVERMEDIA_A16D: + ctl.demod = XC3028_FE_ZARLINK456; + break; + default: + ctl.demod = XC3028_FE_OREN538; + ctl.mts = 1; + } xc2028_cfg.tuner = TUNER_XC2028; xc2028_cfg.priv = &ctl; --- master.orig/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ master/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -936,6 +936,12 @@ static int dvb_init(struct saa7134_dev * NULL, DVB_PLL_PHILIPS_TD1316); } break; + case SAA7134_BOARD_AVERMEDIA_A16D: + dprintk("avertv A16D dvb setup\n"); + dev->dvb.frontend = dvb_attach(mt352_attach, &avermedia_777, + &dev->i2c_adap); + attach_xc3028 = 1; + break; case SAA7134_BOARD_MD7134: dev->dvb.frontend = dvb_attach(tda10046_attach, &medion_cardbus,
saa7134: Add DTV support for Avermedia A16D From: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx> --- linux/drivers/media/video/saa7134/saa7134-cards.c | 12 +++++++++--- linux/drivers/media/video/saa7134/saa7134-dvb.c | 6 ++++++ 2 files changed, 15 insertions(+), 3 deletions(-) --- master.orig/linux/drivers/media/video/saa7134/saa7134-cards.c +++ master/linux/drivers/media/video/saa7134/saa7134-cards.c @@ -5512,6 +5512,7 @@ int saa7134_board_init1(struct saa7134_d case SAA7134_BOARD_AVERMEDIA_CARDBUS_506: case SAA7134_BOARD_AVERMEDIA_M115: case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM: + case SAA7134_BOARD_AVERMEDIA_A16D: /* power-up tuner chip */ saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff); @@ -5808,9 +5809,14 @@ int saa7134_board_init2(struct saa7134_d ctl.fname = XC2028_DEFAULT_FIRMWARE; ctl.max_len = 64; - /* FIXME: This should be device-dependent */ - ctl.demod = XC3028_FE_OREN538; - ctl.mts = 1; + switch (dev->board) { + case SAA7134_BOARD_AVERMEDIA_A16D: + ctl.demod = XC3028_FE_ZARLINK456; + break; + default: + ctl.demod = XC3028_FE_OREN538; + ctl.mts = 1; + } xc2028_cfg.tuner = TUNER_XC2028; xc2028_cfg.priv = &ctl; --- master.orig/linux/drivers/media/video/saa7134/saa7134-dvb.c +++ master/linux/drivers/media/video/saa7134/saa7134-dvb.c @@ -936,6 +936,12 @@ static int dvb_init(struct saa7134_dev * NULL, DVB_PLL_PHILIPS_TD1316); } break; + case SAA7134_BOARD_AVERMEDIA_A16D: + dprintk("avertv A16D dvb setup\n"); + dev->dvb.frontend = dvb_attach(mt352_attach, &avermedia_777, + &dev->i2c_adap); + attach_xc3028 = 1; + break; case SAA7134_BOARD_MD7134: dev->dvb.frontend = dvb_attach(tda10046_attach, &medion_cardbus,
_______________________________________________ linux-dvb mailing list linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb