Re: About RFC of HDMI-CEC

2011-05-31 Thread Hans Verkuil
On Thursday, May 26, 2011 14:16:58 vipul kumar samar wrote:
> On 05/26/2011 12:05 PM, Hans Verkuil wrote:
> > On Thursday, May 26, 2011 07:09:30 vipul kumar samar wrote:
> >> Hello,
> >>
> >> On 05/25/2011 06:13 PM, Martin Bugge (marbugge) wrote:
> >>> Hello
> >>>
> >>> To be honest I became a bit disengaded after all the discussion.
> >>>
> >>> What caused me a lot of problems was the request for AV link support
> >>> (which is used in SCART connectors).
> >>> Something I never plan to implement.
> >>>
> >>> But after the "v4l2 Warsaw Brainstroming meeting" it was sort of approved.
> >>>
> >>> It only need to be reworked to be a subdev level api.
> >>> (for that I need some help from Hans Verkuil)
> >>>
> >>> But it is great that someone else also need an API for this.
> >>> I include the latest version here so you can see if you agree, and
> >>> together we will get it in.
> >>>
> >>
> >> Yes, sure.
> >>
> >>> We currently have two drivers which uses this API for CEC.
> >>>
> >>> * Analog Devices adv7604
> >>>
> >>> * TMS320DM8x
> >>>
> >>
> >> i want to see source code of these two drivers.From where i can get
> >> source code of these drivers??
> >
> > The adv7604 driver is here:
> >
> > http://git.linuxtv.org/hverkuil/cisco.git?a=shortlog;h=refs/heads/cobalt
> >
> > But this tree hasn't been updated in quite some time and doesn't contain the
> > CEC support. I need to work on this anyway today so I'll see if I can get
> > this tree in sync with our internal tree.
> >
> > The other driver we can't release as open source. It will eventually become
> > available, though.
> >
> > Regards,
> >
> >Hans
> 
> Hello Hans,
> 
> Once i go through this driver then we will discuss it in more detail.
> Thanks for your support.

Hi Vipul,

I updated the adv7604 driver yesterday to the latest version. Be aware that it
is work in progress, so there are still loose ends and TODOs. But at least the
CEC support is in.

Regards,

Hans
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: About RFC of HDMI-CEC

2011-05-26 Thread vipul kumar samar

On 05/26/2011 12:05 PM, Hans Verkuil wrote:

On Thursday, May 26, 2011 07:09:30 vipul kumar samar wrote:

Hello,

On 05/25/2011 06:13 PM, Martin Bugge (marbugge) wrote:

Hello

To be honest I became a bit disengaded after all the discussion.

What caused me a lot of problems was the request for AV link support
(which is used in SCART connectors).
Something I never plan to implement.

But after the "v4l2 Warsaw Brainstroming meeting" it was sort of approved.

It only need to be reworked to be a subdev level api.
(for that I need some help from Hans Verkuil)

But it is great that someone else also need an API for this.
I include the latest version here so you can see if you agree, and
together we will get it in.



Yes, sure.


We currently have two drivers which uses this API for CEC.

* Analog Devices adv7604

* TMS320DM8x



i want to see source code of these two drivers.From where i can get
source code of these drivers??


The adv7604 driver is here:

http://git.linuxtv.org/hverkuil/cisco.git?a=shortlog;h=refs/heads/cobalt

But this tree hasn't been updated in quite some time and doesn't contain the
CEC support. I need to work on this anyway today so I'll see if I can get
this tree in sync with our internal tree.

The other driver we can't release as open source. It will eventually become
available, though.

Regards,

   Hans


Hello Hans,

Once i go through this driver then we will discuss it in more detail.
Thanks for your support.

Regards
Vipul Kumar Samar





Thanks and Regards
Vipul Kumar Samar


At least the adv7604 is planned to be upstreamed.

Best regards
Martin Bugge


On 05/25/2011 01:52 PM, vipul kumar samar wrote:

Hello,

I am working on HDMI-CEC and planning to implement it in v4l2
framework.I came to know that a RFC is going on for the same driver.

I want to know is their any friezed version of that RFC or discussion
is still going on?? Is it included in kernel??

Thanks and Regards
Vipul Kumar Samar








.


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: About RFC of HDMI-CEC

2011-05-25 Thread Hans Verkuil
On Thursday, May 26, 2011 07:09:30 vipul kumar samar wrote:
> Hello,
> 
> On 05/25/2011 06:13 PM, Martin Bugge (marbugge) wrote:
> > Hello
> >
> > To be honest I became a bit disengaded after all the discussion.
> >
> > What caused me a lot of problems was the request for AV link support
> > (which is used in SCART connectors).
> > Something I never plan to implement.
> >
> > But after the "v4l2 Warsaw Brainstroming meeting" it was sort of approved.
> >
> > It only need to be reworked to be a subdev level api.
> > (for that I need some help from Hans Verkuil)
> >
> > But it is great that someone else also need an API for this.
> > I include the latest version here so you can see if you agree, and
> > together we will get it in.
> >
> 
> Yes, sure.
> 
> > We currently have two drivers which uses this API for CEC.
> >
> > * Analog Devices adv7604
> >
> > * TMS320DM8x
> >
> 
> i want to see source code of these two drivers.From where i can get 
> source code of these drivers??

The adv7604 driver is here:

http://git.linuxtv.org/hverkuil/cisco.git?a=shortlog;h=refs/heads/cobalt

But this tree hasn't been updated in quite some time and doesn't contain the
CEC support. I need to work on this anyway today so I'll see if I can get
this tree in sync with our internal tree.

The other driver we can't release as open source. It will eventually become
available, though.

Regards,

  Hans

> 
> Thanks and Regards
> Vipul Kumar Samar
> 
> > At least the adv7604 is planned to be upstreamed.
> >
> > Best regards
> > Martin Bugge
> >
> >
> > On 05/25/2011 01:52 PM, vipul kumar samar wrote:
> >> Hello,
> >>
> >> I am working on HDMI-CEC and planning to implement it in v4l2
> >> framework.I came to know that a RFC is going on for the same driver.
> >>
> >> I want to know is their any friezed version of that RFC or discussion
> >> is still going on?? Is it included in kernel??
> >>
> >> Thanks and Regards
> >> Vipul Kumar Samar
> >
> >
> 
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: About RFC of HDMI-CEC

2011-05-25 Thread vipul kumar samar

Hello,

On 05/25/2011 06:13 PM, Martin Bugge (marbugge) wrote:

Hello

To be honest I became a bit disengaded after all the discussion.

What caused me a lot of problems was the request for AV link support
(which is used in SCART connectors).
Something I never plan to implement.

But after the "v4l2 Warsaw Brainstroming meeting" it was sort of approved.

It only need to be reworked to be a subdev level api.
(for that I need some help from Hans Verkuil)

But it is great that someone else also need an API for this.
I include the latest version here so you can see if you agree, and
together we will get it in.



Yes, sure.


We currently have two drivers which uses this API for CEC.

* Analog Devices adv7604

* TMS320DM8x



i want to see source code of these two drivers.From where i can get 
source code of these drivers??


Thanks and Regards
Vipul Kumar Samar


At least the adv7604 is planned to be upstreamed.

Best regards
Martin Bugge


On 05/25/2011 01:52 PM, vipul kumar samar wrote:

Hello,

I am working on HDMI-CEC and planning to implement it in v4l2
framework.I came to know that a RFC is going on for the same driver.

I want to know is their any friezed version of that RFC or discussion
is still going on?? Is it included in kernel??

Thanks and Regards
Vipul Kumar Samar






--
You won't skid if you stay in a rut. -- Frank Hubbard
Author: Martin Bugge 
Date:  Thu, 17th of March 2011
==

This is a proposal for adding a Consumer Electronic Control (CEC) API to V4L2.
This document describes the changes and new ioctls needed.

Version 1.
   Initial version.

Version 2.
  Added support for AV.link EN 50157-2-[123].

Version 3.
  Rework of mode 1.
  Mode 3 is to be decided (TDB).
  Minor cleanup.

Background
==
CEC is a protocol that provides high-level control functions between various 
audiovisual products.
It is an optional supplement to the High-Definition Multimedia Interface 
Specification (HDMI).

In short: CEC uses pin 13 on the HDMI connector to transmit and receive small 
data-packets
  (maximum 16 bytes including a 1 byte header) at low data rates (~400 
bits/s).

A CEC device may have any of 15 logical addresses (0 - 14).
(address 15 is broadcast and some addresses are reserved)

Physical layer is a one-wire bidirectional serial bus that uses the
industry-standard AV.link, see [3].
Due to this the proposed ioctls and events are meant to cover expansion for the 
protocols in [3].

Note that AV.link mode 3 is still TBD.


References
==
[1] High-Definition Multimedia Interface Specification version 1.3a,
Supplement 1 Consumer Electronic Control (CEC).
http://www.hdmi.org/manufacturer/specification.aspx

[2] http://www.hdmi.org/pdf/whitepaper/DesigningCECintoYourNextHDMIProduct.pdf

[3] Domestic and similar electronic equipment interconnection requirements
AV.link. EN 50157-2-[123]


Proposed solution
=

Two new ioctls:
VIDIOC_AV_LINK_CAP (read)
VIDIOC_AV_LINK_CMD (read/write)


VIDIOC_AV_LINK_CAP:
---

#define AV_LINK_CAP_MODE_CEC (1 << 0)
#define AV_LINK_CAP_MODE_1   (1 << 1)
#define AV_LINK_CAP_MODE_2   (1 << 2)
#define AV_LINK_CAP_MODE_3   (1 << 3)

Note about AV.Link Mode 3: TBD
Different manufactures might have different implementations and an option is to
have a mode per implementation.

struct vl2_av_link_cap {
   __u32 capabilities;
   __u32 logicaldevices;
   __u32 reserved[14];
};

The capabilities field will indicate which protocols/formats this HW supports.

* AV link mode CEC:
 logicaldevices: 1 -> 14, this HW supports n logical devices simultaneously.

* AV link mode 1:
 logicaldevices: not used.

* AV link mode 2:
 Same as AV link mode CEC.

* AV link mode 3: TBD

 reserved: for future use.


VIDIOC_AV_LINK_CMD:
---
The command ioctl is used both for configuration and to receive/transmit data.

/* mode 1 */
struct avl_mode1_conf {
   __u32 enable;
   __u32 upstream_arb_mask;
   __u32 downstream_arb_mask;
};
struct avl_mode1 {
   __u32 ctrl_signal_frame;
   __u32 tx_frame_arb;
   __u32 tx_status;
};

/* mode 2, CEC and possible mode 3 */
struct avl_conf {
__u32 enable;
__u32 index;
__u32 addr;
};
struct avl {
   __u32 len;
   __u8  msg[16];
   __u32 tx_status;
};

struct v4l2_av_link_cmd {
__u32 command;
__u32 mode;
__u32 reserved[2];
union {
struct avl_mode1_conf avlm1_conf;
struct avl_mode1 avlm1;
struct avl_conf conf;
struct avl avl;
__u32 raw[12];
};
};

/* command */
#define V4L2_AV_LINK_CMD_CONF (1)
#define V4L2_AV_LINK_CMD_TX   (2)
#define V4L2_AV_LINK_CMD_RX   (3)

/* mode */
#define AV_LINK_CMD_MODE_CEC (1)
#define AV_LINK_CMD_MODE_1   (2)
#define AV_LINK_CMD_MODE_2   (3)
#define AV_LINK_CMD_MODE_3   (4)

/* Tx status */
#define V4L2_AV_LINK_STAT_TX_OK (0