[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On Thursday 01 November 2007 20:59, Trent Piepho wrote:
> On Thu, 1 Nov 2007, Hans Verkuil wrote:
> > Please review and pull from
> > for:
> >
> > - tuner: replace default_mode_mask
> In this patch, it says "Initializes only the first adapter found."
> Is this right?  It sounds like what's is desired is to initialize the
> first *client* found on each adapter.  Is just the comment wrong?

The comment is wrong. I've updated it and it now says:

"Initializes only the first TV tuner on this adapter."

> /* static vars: used only in tuner_attach and tuner_probe */
> It doesn't like like these vars are used in tuner_probe.

You mean tuner_attach, I assume, since tuner_attach is gone. I've 
updated this comment as well.

> It looks like the tv_adapter code in tuner_attach assume that each
> adapter will be probed in order, before moving on to the next
> adapter.  Is that a safe assumption?

I sincerely hope so. It has always been the case and should this break 
then this whole piece of code has to be rewritten. For now I just want 
to keep the old functionality while allowing me to convert the tuner to 
the bus-based I2C API.

> If a second chip is found on the same adapter, then t->mode_mask is
> left as T_UNINITIALIZED which means t->mode will be set to
> T_DIGITAL_TV.  The client is attached anyway.  So if a tuner shows up
> under two I2C addresses, the solution is to attach it twice, but set
> the second one to DIGITAL_TV mode???  Wouldn't it make more sense to
> not register the duplicate client?

Good question. My intent was keep the same functionality, and not to 
improve it. All my hardware behaves 'normally' with respect to tuners, 
so I can't even test these weird situations. I don't dare change it, to 
be honest.

> Does the radio_adapter thing always work correctly?  It looks like
> the goal is to add T_RADIO to the tuner's mode mask if a radio tuner
> hasn't been found (yet) on the same adapter.  What if the radio tuner
> is attached _after_ the video tuner?  Like say TEA5767 which is at
> address 0x60, and so will probably get attached later, unlike TEA5761
> which is at address 0x10.

The i2c addresses are probed in the order of the normal_i2c list, which 
ensures that radio tuners are probed before TV tuners, so yes, this 
actually works.

But does it deserve the first price in a coding competition? Only if it 
is for ugliness. But I think the new method is at least slightly better 
and it makes the i2c changes possible (the main reason for doing this).



[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [Linux USB]

Add to Google Powered by Linux

Google PageRank Checking tool