[linux-dvb] Re: [Patch] Adding support for the Hauppage HVR1100
stoth at hauppauge.com
Tue Nov 29 19:20:58 CET 2005
Johannes Stezenbach wrote:
> On Tue, Nov 29, 2005, Steve Toth wrote:
>> Two very different parts of the kernel need to use the same PLL. When
>> you're inside the cx22702 driver it's a no brainer, you can toggle the
>> gate. When you're outside of the 702 driver, in tuner.ko, you have no
>> concept of the 702, you only have an I2C bus to operate on. I could not
>> see a nice solution to the problem without a lot of re-engineering.of
>> the kernel tuner support in V4L.
>> Please, I'm open to ideas.
> In the DVB drivers, the PLL is not directly accessed by the
> demod driver. It is done by the card driver.
The cx22702 driver currently issues the i2c_master commands to the pll,
nobody else does that (for DVB). Albeit, the pll address and some other
settings are driven by the card driver (in the cx88 code).
> I.e. the cx88 driver knows from the PCI ids and eeprom
> that the PLL is behind the cx22702 i2c gate. So it could
> do the right thing.
Yes, that what the patch currently does - albeit the gate is left open
for HVR1100 products only.
> But I assume the tuner.ko design makes this more difficult?
> I don't have much knowledge about analog, but can the cx88
> driver not hook the v4l ioctl and open the gate before
> calling into tuner.ko?
Yes. More difficult. I can pollute tuner.ko with cx88 stuff, and have
the specific 'gate' flag passed in tuner_setup, or added to cx88_core,
but it didn't seem to make any sense when tuner.ko only knows about I2C
clients and tuner types (not demods and specific demod behavior, or even
DVB related things for that matter).
I assumed I'd get flamed for suggesting such a thing.
>> Question: In it's current form (1) will you accept the patch? If not, we
>> need to come to a consensus on the best approach and begin implementation.
> I would like to discuss and try to find a better way first. If we cannot
> come up with a simple and good solution we may commit your patch as-is.
OK. I'll try a couple of things.
1) Patrick had some interesting comments on virtual I2C busses which
I'll look into this evening. I'll look into this.
2) I'll see how bad it would be to construct a gate open/close callback
in the card setup and see if that can be passed to tuner.ko with some
(but minimal) cx88 and DVB awareness.
More information about the linux-dvb