[11/12] tm6000: bugfix firmware xc3028L-v36.fw used with Zarlink and DTV78 or DTV8 no shift
Message ID | 1265411214-12231-11-git-send-email-stefan.ringel@arcor.de (mailing list archive) |
---|---|
State | Superseded, archived |
Headers |
Return-path: <linux-media-owner@vger.kernel.org> Envelope-to: mchehab@infradead.org Delivery-date: Fri, 05 Feb 2010 23:07:44 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for <mchehab@localhost> (single-drop); Sat, 06 Feb 2010 23:31:20 -0200 (BRST) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1NdXH6-0002FD-3U; Fri, 05 Feb 2010 23:07:44 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757600Ab0BEXHn (ORCPT <rfc822; kmpark@infradead.org> + 1 other); Fri, 5 Feb 2010 18:07:43 -0500 Received: from mail-in-09.arcor-online.net ([151.189.21.49]:43178 "EHLO mail-in-09.arcor-online.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756249Ab0BEXHl (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 5 Feb 2010 18:07:41 -0500 Received: from mail-in-14-z2.arcor-online.net (mail-in-14-z2.arcor-online.net [151.189.8.31]) by mx.arcor.de (Postfix) with ESMTP id 5C78C1AF5DE; Sat, 6 Feb 2010 00:07:38 +0100 (CET) Received: from mail-in-05.arcor-online.net (mail-in-05.arcor-online.net [151.189.21.45]) by mail-in-14-z2.arcor-online.net (Postfix) with ESMTP id 3359C10118; Sat, 6 Feb 2010 00:07:38 +0100 (CET) Received: from localhost.localdomain (dslb-188-103-200-186.pools.arcor-ip.net [188.103.200.186]) (Authenticated sender: stefan.ringel@arcor.de) by mail-in-05.arcor-online.net (Postfix) with ESMTPA id C8B1033279F; Sat, 6 Feb 2010 00:07:37 +0100 (CET) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-05.arcor-online.net C8B1033279F DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arcor.de; s=mail-in; t=1265411258; bh=jQ5jCWn6JTmWCbyIsUidg9bCXKhvPSCQo5D71mK3AIk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References; b=Kx9RVODNe0raswH+3ZT57mR/0m5fKgfkQKYUIwHRTxVcU13j9NH+5BcGY7+Tq56Mk hhvDUd8LWqXUforqNsAm2/EbqxAIzIbE1BYcZUZGukGyxQ7mMmBMbjXDQtw17aWud/ pXTJ4sNJeMB4XPhTnR3cSQz2jO4436hMDSn3TcUE= From: stefan.ringel@arcor.de To: linux-media@vger.kernel.org Cc: mchehab@redhat.com, dheitmueller@kernellabs.com, Stefan Ringel <stefan.ringel@arcor.de> Subject: [PATCH 11/12] tm6000: bugfix firmware xc3028L-v36.fw used with Zarlink and DTV78 or DTV8 no shift Date: Sat, 6 Feb 2010 00:06:53 +0100 Message-Id: <1265411214-12231-11-git-send-email-stefan.ringel@arcor.de> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1265411214-12231-10-git-send-email-stefan.ringel@arcor.de> References: <1265411214-12231-10-git-send-email-stefan.ringel@arcor.de> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org |
Commit Message
Stefan Ringel
Feb. 5, 2010, 11:06 p.m. UTC
From: Stefan Ringel <stefan.ringel@arcor.de> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> --- drivers/media/common/tuners/tuner-xc2028.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-)
Comments
stefan.ringel@arcor.de wrote: > From: Stefan Ringel <stefan.ringel@arcor.de> > > Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> > --- > drivers/media/common/tuners/tuner-xc2028.c | 7 ++++++- > 1 files changed, 6 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c > index ed50168..fcf19cc 100644 > --- a/drivers/media/common/tuners/tuner-xc2028.c > +++ b/drivers/media/common/tuners/tuner-xc2028.c > @@ -1114,7 +1114,12 @@ static int xc2028_set_params(struct dvb_frontend *fe, > > /* All S-code tables need a 200kHz shift */ > if (priv->ctrl.demod) { > - demod = priv->ctrl.demod + 200; > + if ((strcmp (priv->ctrl.fname, "xc3028L-v36.fw") == 0) && > + (priv->ctrl.demod == XC3028_FE_ZARLINK456) && > + ((type & DTV78) || (type & DTV8))) > + demod = priv->ctrl.demod; > + else > + demod = priv->ctrl.demod + 200; > /* > * The DTV7 S-code table needs a 700 kHz shift. > * Thanks to Terry Wu <terrywu2009@gmail.com> for reporting this The idea behind this patch is right, but you should be testing it against priv->firm_version, instead comparing with a file name. Also, this will likely cause regressions on other drivers, since the offsets for v3.6 firmwares were handled on a different way on other drivers. I prefer to postpone this patch and the discussion behind it after having tm6000 driver ready, since it makes no sense to cause regressions or request changes on existing drivers due to a driver that is not ready yet. So, please hold your patch on your queue for now. My suggestion is that you should use git and have this patch on a separate branch where you do your tests, having a branch without this patch for upstream submission.
Am 08.02.2010 12:27, schrieb Mauro Carvalho Chehab: > stefan.ringel@arcor.de wrote: > >> From: Stefan Ringel <stefan.ringel@arcor.de> >> >> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> >> --- >> drivers/media/common/tuners/tuner-xc2028.c | 7 ++++++- >> 1 files changed, 6 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c >> index ed50168..fcf19cc 100644 >> --- a/drivers/media/common/tuners/tuner-xc2028.c >> +++ b/drivers/media/common/tuners/tuner-xc2028.c >> @@ -1114,7 +1114,12 @@ static int xc2028_set_params(struct dvb_frontend *fe, >> >> /* All S-code tables need a 200kHz shift */ >> if (priv->ctrl.demod) { >> - demod = priv->ctrl.demod + 200; >> + if ((strcmp (priv->ctrl.fname, "xc3028L-v36.fw") == 0) && >> + (priv->ctrl.demod == XC3028_FE_ZARLINK456) && >> + ((type & DTV78) || (type & DTV8))) >> + demod = priv->ctrl.demod; >> + else >> + demod = priv->ctrl.demod + 200; >> /* >> * The DTV7 S-code table needs a 700 kHz shift. >> * Thanks to Terry Wu <terrywu2009@gmail.com> for reporting this >> > The idea behind this patch is right, but you should be testing it against > priv->firm_version, instead comparing with a file name. > > Also, this will likely cause regressions on other drivers, since the offsets for > v3.6 firmwares were handled on a different way on other drivers. I prefer to postpone > this patch and the discussion behind it after having tm6000 driver ready, since > it makes no sense to cause regressions or request changes on existing drivers due > to a driver that is not ready yet. > > So, please hold your patch on your queue for now. > > My suggestion is that you should use git and have this patch on a separate branch where you > do your tests, having a branch without this patch for upstream submission. > > In this firmware is for ZARLINK two parts, first for QAM, DTV6 and DTV7 with shift 200 kHz, and second for DTV78 and DTV8. I check the firmware 2.7 this use for ZARLINK for all this mode a 200 kHz shift. For the next source part it says that DTV7 have 700 kHz shift. That not for all firmware correct.
Stefan Ringel wrote: > Am 08.02.2010 12:27, schrieb Mauro Carvalho Chehab: >> stefan.ringel@arcor.de wrote: >> >>> From: Stefan Ringel <stefan.ringel@arcor.de> >>> >>> Signed-off-by: Stefan Ringel <stefan.ringel@arcor.de> >>> --- >>> drivers/media/common/tuners/tuner-xc2028.c | 7 ++++++- >>> 1 files changed, 6 insertions(+), 1 deletions(-) >>> >>> diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c >>> index ed50168..fcf19cc 100644 >>> --- a/drivers/media/common/tuners/tuner-xc2028.c >>> +++ b/drivers/media/common/tuners/tuner-xc2028.c >>> @@ -1114,7 +1114,12 @@ static int xc2028_set_params(struct dvb_frontend *fe, >>> >>> /* All S-code tables need a 200kHz shift */ >>> if (priv->ctrl.demod) { >>> - demod = priv->ctrl.demod + 200; >>> + if ((strcmp (priv->ctrl.fname, "xc3028L-v36.fw") == 0) && >>> + (priv->ctrl.demod == XC3028_FE_ZARLINK456) && >>> + ((type & DTV78) || (type & DTV8))) >>> + demod = priv->ctrl.demod; >>> + else >>> + demod = priv->ctrl.demod + 200; >>> /* >>> * The DTV7 S-code table needs a 700 kHz shift. >>> * Thanks to Terry Wu <terrywu2009@gmail.com> for reporting this >>> >> The idea behind this patch is right, but you should be testing it against >> priv->firm_version, instead comparing with a file name. >> >> Also, this will likely cause regressions on other drivers, since the offsets for >> v3.6 firmwares were handled on a different way on other drivers. I prefer to postpone >> this patch and the discussion behind it after having tm6000 driver ready, since >> it makes no sense to cause regressions or request changes on existing drivers due >> to a driver that is not ready yet. >> >> So, please hold your patch on your queue for now. >> >> My suggestion is that you should use git and have this patch on a separate branch where you >> do your tests, having a branch without this patch for upstream submission. >> >> > In this firmware is for ZARLINK two parts, first for QAM, DTV6 and DTV7 > with shift 200 kHz, and second for DTV78 and DTV8. I check the firmware > 2.7 this use for ZARLINK for all this mode a 200 kHz shift. For the next > source part it says that DTV7 have 700 kHz shift. > That not for all firmware correct. > > From what we know, the name "zarlink" for the firmware is bogus: the firmware has nothing special to work with zarlink, except for the IF offset. You may or select a firmware with -200 KHz IF offset or to do the adjustment by adding 200 KHz for firmwares up to 2.7. The problem is that the driver that originally added the v3.6 implemented it on a different place. So, we need to fix all the drivers at the patch that we're changing its behavior, to avoid breakages.
diff --git a/drivers/media/common/tuners/tuner-xc2028.c b/drivers/media/common/tuners/tuner-xc2028.c index ed50168..fcf19cc 100644 --- a/drivers/media/common/tuners/tuner-xc2028.c +++ b/drivers/media/common/tuners/tuner-xc2028.c @@ -1114,7 +1114,12 @@ static int xc2028_set_params(struct dvb_frontend *fe, /* All S-code tables need a 200kHz shift */ if (priv->ctrl.demod) { - demod = priv->ctrl.demod + 200; + if ((strcmp (priv->ctrl.fname, "xc3028L-v36.fw") == 0) && + (priv->ctrl.demod == XC3028_FE_ZARLINK456) && + ((type & DTV78) || (type & DTV8))) + demod = priv->ctrl.demod; + else + demod = priv->ctrl.demod + 200; /* * The DTV7 S-code table needs a 700 kHz shift. * Thanks to Terry Wu <terrywu2009@gmail.com> for reporting this