public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* i2c_gate_ctrl question
@ 2011-03-07  9:52 Steve Kerrison
  2011-03-07 10:31 ` adq
  0 siblings, 1 reply; 2+ messages in thread
From: Steve Kerrison @ 2011-03-07  9:52 UTC (permalink / raw)
  To: linux-media@vger.kernel.org

Hi media men & women,

I have a question regarding the cxd2820r I'm working on with a couple of
other people.

In my naivety I implemented i2c gate control for the device (to access
the tuner behind it) as a separate i2c device that did the passthrough.
Now that I realise this, it would make sense to use the gate_ctrl
features.

However, picking apart the USB data it looks as though the way the
cxd2820r implements "gate control" isn't immediately compatible with the
implementation seen in other devices.

Example, and I2C send to the tuner at (addr << 1) of:
{ xx, xx, ..., xx}

becomes a write to (demod_addr << 1) of :
{ 09, (addr << 1) | flags, xx, xx, ..., xx}

And an i2c receive is implemented to a receive from the demod address,
not from the tuner address.

So, unless there are open and close gate commands that aren't apparent
from the snoop, or there's something I've missed, all i2c transfers to
the tuner have to be mangled - sorry I mean encapsulated - prior to
sending. To my understanding this doesn't fit in with the gate_ctrl
implementation for i2c.

I haven't had time to examine all other gate control implementations in
the media modules, so if anyone knows any good examples that might work
in a similar way, I'd appreciate the tip-off. Otherwise, would there be
any objections to my implementation of a dummy i2c device that does the
encapsulation?

Regards,
-- 
Steve Kerrison MEng Hons.
http://www.stevekerrison.com/ 



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: i2c_gate_ctrl question
  2011-03-07  9:52 i2c_gate_ctrl question Steve Kerrison
@ 2011-03-07 10:31 ` adq
  0 siblings, 0 replies; 2+ messages in thread
From: adq @ 2011-03-07 10:31 UTC (permalink / raw)
  To: Steve Kerrison; +Cc: linux-media@vger.kernel.org

On 7 March 2011 09:52, Steve Kerrison <steve@stevekerrison.com> wrote:
> Hi media men & women,
>
> I have a question regarding the cxd2820r I'm working on with a couple of
> other people.
>
> In my naivety I implemented i2c gate control for the device (to access
> the tuner behind it) as a separate i2c device that did the passthrough.
> Now that I realise this, it would make sense to use the gate_ctrl
> features.
>
> However, picking apart the USB data it looks as though the way the
> cxd2820r implements "gate control" isn't immediately compatible with the
> implementation seen in other devices.
>
> Example, and I2C send to the tuner at (addr << 1) of:
> { xx, xx, ..., xx}
>
> becomes a write to (demod_addr << 1) of :
> { 09, (addr << 1) | flags, xx, xx, ..., xx}
>
> And an i2c receive is implemented to a receive from the demod address,
> not from the tuner address.
>
> So, unless there are open and close gate commands that aren't apparent
> from the snoop, or there's something I've missed, all i2c transfers to
> the tuner have to be mangled - sorry I mean encapsulated - prior to
> sending. To my understanding this doesn't fit in with the gate_ctrl
> implementation for i2c.
>
> I haven't had time to examine all other gate control implementations in
> the media modules, so if anyone knows any good examples that might work
> in a similar way, I'd appreciate the tip-off. Otherwise, would there be
> any objections to my implementation of a dummy i2c device that does the
> encapsulation?

Yup, it sounds like the gate_ctrl code won't work in this case and
you'll need a seperate i2c bus.

An example is the cx24123 demod, which creates its own i2c tuner bus.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-07 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07  9:52 i2c_gate_ctrl question Steve Kerrison
2011-03-07 10:31 ` adq

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox