Message ID | CAA9z4LYNHuORA+QnO_3NBj4mwBxSMFY8pXoF2y-iYjJD+Xqteg@mail.gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 10.01.2014 05:08, Chris Lee wrote: > Im not sure exactly when it broke but alot of changes have happened in > em28xx lately and they've broken my Kworld 330u. The issue is that > > ctl->demod = XC3028_FE_CHINA; > ctl->fname = XC2028_DEFAULT_FIRMWARE; > cfg.ctrl = &ctl; > > are no longer being set, this causes xc2028_attach > > if (cfg->ctrl) > xc2028_set_config(fe, cfg->ctrl); > > to never get called. Therefore never load the firmware. Ive attached > my logs to show you what I mean. > > I quickly hacked up a patch, my tree is quite different from V4L's now > so the line numbers may not lineup anymore, and Im sure you guys wont > like it anyhow lol > > Chris Lee Hi Chris, thank you for testing and the patch ! The suggested changes in em28xx_attach_xc3028() look good, but instead of introducing a second copy of em28xx_setup_xc3028() in em28xx-dvb, we should just move this function from the v4l extension back to the core. Mauro, I can create a patch, but I assume there is already enough pending em28xx stuff that requires rebasing, so I assume it's easier for you to do it yourself. Let me know if I can assist you. Regards, Frank -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Em Sun, 12 Jan 2014 17:43:28 +0100 Frank Schäfer <fschaefer.oss@googlemail.com> escreveu: > On 10.01.2014 05:08, Chris Lee wrote: > > Im not sure exactly when it broke but alot of changes have happened in > > em28xx lately and they've broken my Kworld 330u. The issue is that > > > > ctl->demod = XC3028_FE_CHINA; > > ctl->fname = XC2028_DEFAULT_FIRMWARE; > > cfg.ctrl = &ctl; > > > > are no longer being set, this causes xc2028_attach > > > > if (cfg->ctrl) > > xc2028_set_config(fe, cfg->ctrl); > > > > to never get called. Therefore never load the firmware. Ive attached > > my logs to show you what I mean. > > > > I quickly hacked up a patch, my tree is quite different from V4L's now > > so the line numbers may not lineup anymore, and Im sure you guys wont > > like it anyhow lol > > > > Chris Lee > > Hi Chris, > > thank you for testing and the patch ! > The suggested changes in em28xx_attach_xc3028() look good, but instead > of introducing a second copy of em28xx_setup_xc3028() in em28xx-dvb, > we should just move this function from the v4l extension back to the core. > > Mauro, I can create a patch, but I assume there is already enough > pending em28xx stuff that requires rebasing, so I assume it's easier for > you to do it yourself. > Let me know if I can assist you. Yes, I can handle it. Regards, Mauro -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
--- drivers/media/usb/em28xx/em28xx-dvb.c.old.c 2014-01-09 21:04:56.315258353 -0700 +++ drivers/media/usb/em28xx/em28xx-dvb.c 2014-01-09 20:42:27.631224930 -0700 @@ -829,12 +829,61 @@ .agc = 0x99, }; +static void em28xx_setup_xc3028(struct em28xx *dev, struct xc2028_ctrl *ctl) +{ + memset(ctl, 0, sizeof(*ctl)); + + ctl->fname = XC2028_DEFAULT_FIRMWARE; + ctl->max_len = 64; + ctl->mts = em28xx_boards[dev->model].mts_firmware; + + switch (dev->model) { + case EM2880_BOARD_EMPIRE_DUAL_TV: + case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: + case EM2882_BOARD_TERRATEC_HYBRID_XS: + ctl->demod = XC3028_FE_ZARLINK456; + break; + case EM2880_BOARD_TERRATEC_HYBRID_XS: + case EM2880_BOARD_TERRATEC_HYBRID_XS_FR: + case EM2881_BOARD_PINNACLE_HYBRID_PRO: + ctl->demod = XC3028_FE_ZARLINK456; + break; + case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: + case EM2882_BOARD_PINNACLE_HYBRID_PRO_330E: + ctl->demod = XC3028_FE_DEFAULT; + break; + case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: + ctl->demod = XC3028_FE_DEFAULT; + ctl->fname = XC3028L_DEFAULT_FIRMWARE; + break; + case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_850: + case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: + case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: + /* FIXME: Better to specify the needed IF */ + ctl->demod = XC3028_FE_DEFAULT; + break; + case EM2883_BOARD_KWORLD_HYBRID_330U: + case EM2882_BOARD_DIKOM_DK300: + case EM2882_BOARD_KWORLD_VS_DVBT: + ctl->demod = XC3028_FE_CHINA; + ctl->fname = XC2028_DEFAULT_FIRMWARE; + break; + case EM2882_BOARD_EVGA_INDTUBE: + ctl->demod = XC3028_FE_CHINA; + ctl->fname = XC3028L_DEFAULT_FIRMWARE; + break; + default: + ctl->demod = XC3028_FE_OREN538; + } +} + /* ------------------------------------------------------------------ */ static int em28xx_attach_xc3028(u8 addr, struct em28xx *dev) { struct dvb_frontend *fe; struct xc2028_config cfg; + struct xc2028_ctrl ctl; memset(&cfg, 0, sizeof(cfg)); cfg.i2c_adap = &dev->i2c_adap[dev->def_i2c_bus]; @@ -846,6 +895,10 @@ return -EINVAL; } + memset(&ctl, 0, sizeof(ctl)); + em28xx_setup_xc3028(dev, &ctl); + cfg.ctrl = &ctl; + fe = dvb_attach(xc2028_attach, dev->dvb->fe[0], &cfg); if (!fe) { em28xx_errdev("/2: xc3028 attach failed\n");