From: Anders Thomson <aeriksson2@gmail.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: tda8290 regression fix
Date: Wed, 19 Sep 2012 21:25:10 +0200 [thread overview]
Message-ID: <505A1C16.40507@gmail.com> (raw)
In-Reply-To: <5059F68F.4050009@redhat.com>
On 2012-09-19 18:45, Mauro Carvalho Chehab wrote:
> Em 19-09-2012 10:01, Anders Thomson escreveu:
> > On 2012-09-18 11:53, Mauro Carvalho Chehab wrote:
> >> Em 16-09-2012 05:48, Anders Thomson escreveu:
> >> > It doesn't make any difference though :-( I still have the layer of noise...
> >>
> >> That's weird. Hmm... perhaps priv->cfg.config is being initialized
> >> latter. Maybe you can then do, instead:
> >>
> >> return -EREMOTEIO;
> >> }
> >>
> >> + priv->cfg.switch_addr = priv->i2c_props.addr;
> >> if ((data == 0x83) || (data == 0x84)) {
> >> priv->ver |= TDA18271;
> >> tda829x_tda18271_config.config = priv->cfg.config;
> >>
> >>
> > No dice:
> > $ git diff | cat
> > diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c
> > index 8c48521..16d7ff7 100644
> > --- a/drivers/media/common/tuners/tda8290.c
> > +++ b/drivers/media/common/tuners/tda8290.c
> > @@ -627,6 +627,9 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
> > return -EREMOTEIO;
> > }
> >
> > + tuner_info("ANDERS: old priv->cfg.switch_addr %x\n", priv->cfg.switch_addr);
> > + priv->cfg.switch_addr = priv->i2c_props.addr;
> > + tuner_info("ANDERS: new priv->cfg.switch_addr %x\n", priv->cfg.switch_addr);
> > if ((data == 0x83) || (data == 0x84)) {
> > priv->ver |= TDA18271;
> > tda829x_tda18271_config.config = priv->cfg.config;
> > @@ -640,7 +643,6 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
> >
> > dvb_attach(tda827x_attach, fe, priv->tda827x_addr,
> > priv->i2c_props.adap,&priv->cfg);
> > - priv->cfg.switch_addr = priv->i2c_props.addr;
> > }
> > if (fe->ops.tuner_ops.init)
> > fe->ops.tuner_ops.init(fe);
> > anders@tv /usr/src/linux $ dmesg | grep ANDERS
> > [ 5.667022] tda829x 4-004b: ANDERS: old priv->cfg.switch_addr 0
> > [ 5.667025] tda829x 4-004b: ANDERS: new priv->cfg.switch_addr 4b
>
> switch_addr got properly filled here.
Well, it got filled with 4b, but that it not what is needed. Recall my
own patch:
# cat /TV_CARD.diff
diff --git a/drivers/media/common/tuners/tda8290.c
b/drivers/media/common/tuners/tda8290.c
index 064d14c..498cc7b 100644
--- a/drivers/media/common/tuners/tda8290.c
+++ b/drivers/media/common/tuners/tda8290.c
@@ -635,7 +635,11 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
dvb_attach(tda827x_attach, fe, priv->tda827x_addr,
priv->i2c_props.adap, &priv->cfg);
+ tuner_info("ANDERS: setting switch_addr. was 0x%02x, new
0x%02x\n",priv->cfg.switch_addr,priv->i2c_props.addr);
priv->cfg.switch_addr = priv->i2c_props.addr;
+ priv->cfg.switch_addr = 0xc2 / 2;
+ tuner_info("ANDERS: new 0x%02x\n",priv->cfg.switch_addr);
+
}
if (fe->ops.tuner_ops.init)
fe->ops.tuner_ops.init(fe);
It needs to be filled with 0xc2 / 2. I'm not sure where I got that
expression from, but it is the sum of my efforts tracing code changes
around 2.6.26.
> >
> > Whereas to work, I need:
> > anders@tv /usr/src/linux $ grep ANDERS /3.3.8-d.patched
> > [ 6.565254] tda829x 5-004b: ANDERS: setting switch_addr. was 0x00, new 0x4b
>
> What looks weird here is that the device number changed from 4 to 5.
I have a webcam permanently on USB, so it ends up as two v4l2 devices
(with device enumeration changing between boots)
>
> Do you have more than one board on your machine?
>
> > [ 6.565265] tda829x 5-004b: ANDERS: new 0x61
>
>
> The 0x61 address should be filled already by the existing code, otherwise
> you wouldn't be able to switch from one channel to another one.
>
> If you're in doubt, you could add an extra printk at the initialization code,
> in order to see what's happening there.
Not sure I follow here. Which code should set the ox61 address? I'd be
more than happy to add printks. Where? I recall getting lost in how this
stuff uses the i2c code in the past.
next prev parent reply other threads:[~2012-09-19 19:25 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-30 11:27 tda8290 regression fix Anders Thomson
2012-09-15 16:34 ` Mauro Carvalho Chehab
2012-09-15 17:39 ` Anders Thomson
2012-09-15 17:44 ` Anders Thomson
2012-09-15 17:58 ` Mauro Carvalho Chehab
2012-09-15 18:12 ` Anders Thomson
2012-09-15 22:25 ` Mauro Carvalho Chehab
2012-09-16 8:48 ` Anders Thomson
2012-09-18 9:53 ` Mauro Carvalho Chehab
2012-09-19 13:01 ` Anders Thomson
2012-09-19 16:45 ` Mauro Carvalho Chehab
2012-09-19 19:25 ` Anders Thomson [this message]
[not found] ` <CAGncdOae+VoAAUWz3x84zUA-TCMeMmNONf_ktNFd1p7c-o5H_A@mail.gmail.com>
2012-09-21 14:49 ` Mauro Carvalho Chehab
[not found] ` <8ed8c988-fa8c-41fc-9f33-cccdceb1b232@email.android.com>
2012-09-23 11:36 ` Mauro Carvalho Chehab
2012-09-23 17:54 ` Anders Thomson
2012-09-23 18:14 ` Mauro Carvalho Chehab
2012-09-23 18:39 ` Anders Thomson
2012-09-23 21:06 ` Anders Thomson
2012-10-01 16:56 ` Anders Thomson
2012-11-15 20:43 ` Anders Thomson
2012-12-04 11:00 ` Anders Thomson
2012-09-15 18:28 ` Anders Thomson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505A1C16.40507@gmail.com \
--to=aeriksson2@gmail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.