Message ID | 1251418607-16091-1-git-send-email-santiago.nunez@ridgerun.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
I think you should have sent these patches to linux-media@vger.kernel.org as well. > -----Original Message----- > From: davinci-linux-open-source-bounces@linux.davincidsp.com > [mailto:davinci-linux-open-source-bounces@linux.davincidsp.com] On Behalf > Of santiago.nunez@ridgerun.com > Sent: Thursday, August 27, 2009 8:17 PM > To: Karicheri, Muralidharan > Cc: davinci-linux-open-source@linux.davincidsp.com; > clark.becker@ridgerun.com; Santiago Nunez-Corrales; > todd.fischer@ridgerun.com > Subject: [PATCH 1/6] Support for TVP7002 in v4l2 definitions > > From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> > > This patch provides required std and control definitions in TVP7002 > within v4l2. > > Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> > --- > include/linux/videodev2.h | 87 > +++++++++++++++++++++++++++++++++++++- > include/media/v4l2-chip-ident.h | 3 + > 2 files changed, 87 insertions(+), 3 deletions(-) > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h > index 74f1687..5a735be 100644 > --- a/include/linux/videodev2.h > +++ b/include/linux/videodev2.h > @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; > V4L2_STD_PAL_Nc |\ > V4L2_STD_SECAM) > #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ > - V4L2_STD_ATSC_16_VSB) > + V4L2_STD_ATSC_16_VSB) > > +/* Frequency for HD (i.e. 60 vs 50) */ > +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) > +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) > + > +/* interlaced vs progressive for HD */ > +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) > +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) > + > +/* 720 vs 1080 HD modes */ > +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) > +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) > + > +/* FIXME: > + * > + * Definitions equal to zero are listed for clarity. In general, > + * definitions of standards should be improved by using bits to > + * denote properties, not specific standards and forcing the use > + * of unnatural combinatorics tricks. Otherwise, as such is the > + * current case, the descriptor bit space gets exhausted very > + * rapidly. > + */ > + > +/* some standards for SDTV and HDTV */ > +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ > + V4L2_STD_HDTV_P) > +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ > + V4L2_STD_HDTV_I) > +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ > + V4L2_STD_HDTV_P) > +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ > + V4L2_STD_HDTV_I) > +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_50 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_720) > +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_60 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_720) > +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_50 |\ > + V4L2_STD_HDTV_I |\ > + V4L2_STD_HDTV_1080) > +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_60 |\ > + V4L2_STD_HDTV_I |\ > + V4L2_STD_HDTV_1080) > +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_50 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_1080) > +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_60 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_1080) > + > + > #define V4L2_STD_UNKNOWN 0 > -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ > - V4L2_STD_625_50) > > struct v4l2_standard { > __u32 index; > @@ -808,6 +863,7 @@ struct v4l2_ext_controls { > #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ > #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ > #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls > */ > +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls > */ > > #define V4L2_CTRL_ID_MASK (0x0fffffff) > #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) > @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { > > #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) > > + > +/* tvp7002 control IDs*/ > +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER > +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + > 1) > +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + > 2) > +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + > 3) > +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + > 4) > +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + > 5) > +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + > 6) > +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) > +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) > +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) > +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + > 10) > +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + > 11) > +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + > 12) > +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + 13) > +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + > 14) > +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) > +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + > 16) > +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + > 17) > +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + > 18) > +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + > 19) > +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + > 20) > +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + > 21) > + > /* > * T U N I N G > */ > diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip- > ident.h > index 94e908c..b8c86d9 100644 > --- a/include/media/v4l2-chip-ident.h > +++ b/include/media/v4l2-chip-ident.h > @@ -129,6 +129,9 @@ enum { > V4L2_IDENT_SAA6752HS = 6752, > V4L2_IDENT_SAA6752HS_AC3 = 6753, > > + /* module tvp7002: just ident 7002 */ > + V4L2_IDENT_TVP7002 = 7002, > + > /* module adv7170: just ident 7170 */ > V4L2_IDENT_ADV7170 = 7170, > > -- > 1.6.0.4 > > > _______________________________________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
On Friday 28 August 2009 02:16:47 santiago.nunez@ridgerun.com wrote: > From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> > > This patch provides required std and control definitions in TVP7002 > within v4l2. Is this supposed to be merged into the mainline kernel? Or is this for a non-mainline tree only? If you want to get it merged in the mainline, then you should be aware that there will be a new API for HD resolutions. I hope to have a good proposal available for discussion during the Linux Plumbers Conference in September. We are definitely not going to extend v4l2_std_id. That will be frozen for use with PAL/SECAM/NTSC formats only. Note that I also have serious doubts about the usefulness of the decoder controls. Is anyone actually interested in setting those? It will be another topic for discussion during that conference: how to give applications access to these low-level controls and whether we even want that. Regards, Hans > > Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> > --- > include/linux/videodev2.h | 87 +++++++++++++++++++++++++++++++++++++- > include/media/v4l2-chip-ident.h | 3 + > 2 files changed, 87 insertions(+), 3 deletions(-) > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h > index 74f1687..5a735be 100644 > --- a/include/linux/videodev2.h > +++ b/include/linux/videodev2.h > @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; > V4L2_STD_PAL_Nc |\ > V4L2_STD_SECAM) > #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ > - V4L2_STD_ATSC_16_VSB) > + V4L2_STD_ATSC_16_VSB) > > +/* Frequency for HD (i.e. 60 vs 50) */ > +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) > +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) > + > +/* interlaced vs progressive for HD */ > +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) > +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) > + > +/* 720 vs 1080 HD modes */ > +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) > +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) > + > +/* FIXME: > + * > + * Definitions equal to zero are listed for clarity. In general, > + * definitions of standards should be improved by using bits to > + * denote properties, not specific standards and forcing the use > + * of unnatural combinatorics tricks. Otherwise, as such is the > + * current case, the descriptor bit space gets exhausted very > + * rapidly. > + */ > + > +/* some standards for SDTV and HDTV */ > +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ > + V4L2_STD_HDTV_P) > +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ > + V4L2_STD_HDTV_I) > +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ > + V4L2_STD_HDTV_P) > +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ > + V4L2_STD_HDTV_I) > +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_50 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_720) > +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_60 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_720) > +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_50 |\ > + V4L2_STD_HDTV_I |\ > + V4L2_STD_HDTV_1080) > +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_60 |\ > + V4L2_STD_HDTV_I |\ > + V4L2_STD_HDTV_1080) > +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_50 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_1080) > +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ > + V4L2_STD_HDTV_60 |\ > + V4L2_STD_HDTV_P |\ > + V4L2_STD_HDTV_1080) > + > + > #define V4L2_STD_UNKNOWN 0 > -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ > - V4L2_STD_625_50) > > struct v4l2_standard { > __u32 index; > @@ -808,6 +863,7 @@ struct v4l2_ext_controls { > #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ > #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ > #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ > +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls */ > > #define V4L2_CTRL_ID_MASK (0x0fffffff) > #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) > @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { > > #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) > > + > +/* tvp7002 control IDs*/ > +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER > +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + 1) > +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + 2) > +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + 3) > +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + 4) > +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + 5) > +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + 6) > +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) > +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) > +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) > +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + 10) > +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + 11) > +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + 12) > +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + 13) > +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + 14) > +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) > +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + 16) > +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + 17) > +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + 18) > +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + 19) > +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + 20) > +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + 21) > + > /* > * T U N I N G > */ > diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h > index 94e908c..b8c86d9 100644 > --- a/include/media/v4l2-chip-ident.h > +++ b/include/media/v4l2-chip-ident.h > @@ -129,6 +129,9 @@ enum { > V4L2_IDENT_SAA6752HS = 6752, > V4L2_IDENT_SAA6752HS_AC3 = 6753, > > + /* module tvp7002: just ident 7002 */ > + V4L2_IDENT_TVP7002 = 7002, > + > /* module adv7170: just ident 7170 */ > V4L2_IDENT_ADV7170 = 7170, >
Sandeep, Thanks for the review. I will send the patches to the linux-media list. Regards. Paulraj, Sandeep wrote: > I think you should have sent these patches to linux-media@vger.kernel.org > as well. > > >> -----Original Message----- >> From: davinci-linux-open-source-bounces@linux.davincidsp.com >> [mailto:davinci-linux-open-source-bounces@linux.davincidsp.com] On Behalf >> Of santiago.nunez@ridgerun.com >> Sent: Thursday, August 27, 2009 8:17 PM >> To: Karicheri, Muralidharan >> Cc: davinci-linux-open-source@linux.davincidsp.com; >> clark.becker@ridgerun.com; Santiago Nunez-Corrales; >> todd.fischer@ridgerun.com >> Subject: [PATCH 1/6] Support for TVP7002 in v4l2 definitions >> >> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >> >> This patch provides required std and control definitions in TVP7002 >> within v4l2. >> >> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >> --- >> include/linux/videodev2.h | 87 >> +++++++++++++++++++++++++++++++++++++- >> include/media/v4l2-chip-ident.h | 3 + >> 2 files changed, 87 insertions(+), 3 deletions(-) >> >> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h >> index 74f1687..5a735be 100644 >> --- a/include/linux/videodev2.h >> +++ b/include/linux/videodev2.h >> @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; >> V4L2_STD_PAL_Nc |\ >> V4L2_STD_SECAM) >> #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ >> - V4L2_STD_ATSC_16_VSB) >> + V4L2_STD_ATSC_16_VSB) >> >> +/* Frequency for HD (i.e. 60 vs 50) */ >> +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) >> +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) >> + >> +/* interlaced vs progressive for HD */ >> +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) >> +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) >> + >> +/* 720 vs 1080 HD modes */ >> +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) >> +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) >> + >> +/* FIXME: >> + * >> + * Definitions equal to zero are listed for clarity. In general, >> + * definitions of standards should be improved by using bits to >> + * denote properties, not specific standards and forcing the use >> + * of unnatural combinatorics tricks. Otherwise, as such is the >> + * current case, the descriptor bit space gets exhausted very >> + * rapidly. >> + */ >> + >> +/* some standards for SDTV and HDTV */ >> +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ >> + V4L2_STD_HDTV_P) >> +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ >> + V4L2_STD_HDTV_I) >> +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ >> + V4L2_STD_HDTV_P) >> +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ >> + V4L2_STD_HDTV_I) >> +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_720) >> +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_720) >> +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_I |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_I |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_1080) >> + >> + >> #define V4L2_STD_UNKNOWN 0 >> -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ >> - V4L2_STD_625_50) >> >> struct v4l2_standard { >> __u32 index; >> @@ -808,6 +863,7 @@ struct v4l2_ext_controls { >> #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ >> #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ >> #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls >> */ >> +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls >> */ >> >> #define V4L2_CTRL_ID_MASK (0x0fffffff) >> #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) >> @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { >> >> #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) >> >> + >> +/* tvp7002 control IDs*/ >> +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER >> +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + >> 1) >> +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + >> 2) >> +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + >> 3) >> +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + >> 4) >> +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + >> 5) >> +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + >> 6) >> +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) >> +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) >> +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) >> +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + >> 10) >> +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + >> 11) >> +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + >> 12) >> +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + 13) >> +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + >> 14) >> +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) >> +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + >> 16) >> +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + >> 17) >> +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + >> 18) >> +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + >> 19) >> +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + >> 20) >> +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + >> 21) >> + >> /* >> * T U N I N G >> */ >> diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip- >> ident.h >> index 94e908c..b8c86d9 100644 >> --- a/include/media/v4l2-chip-ident.h >> +++ b/include/media/v4l2-chip-ident.h >> @@ -129,6 +129,9 @@ enum { >> V4L2_IDENT_SAA6752HS = 6752, >> V4L2_IDENT_SAA6752HS_AC3 = 6753, >> >> + /* module tvp7002: just ident 7002 */ >> + V4L2_IDENT_TVP7002 = 7002, >> + >> /* module adv7170: just ident 7170 */ >> V4L2_IDENT_ADV7170 = 7170, >> >> -- >> 1.6.0.4 >> >> >> _______________________________________________ >> Davinci-linux-open-source mailing list >> Davinci-linux-open-source@linux.davincidsp.com >> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source >>
Hans, Thanks for your review. In fact, one of my main concerns after looking at current viable implementations for HD was the structure implied by v4l2_std_id -and its organization- was on how to improve the way controls and standards are defined. I am eager to see the new proposal after the Linux Plumbers Conference and keep in the loop, in particular in the new kernel abstraction mechanisms for low-level access controls. Now on the patch, ideally this patch is intended for being merged in the davinci branch, but I am aware that . Sandeep suggested me to send those patches to the linux-media list too. Regards, Hans Verkuil wrote: > On Friday 28 August 2009 02:16:47 santiago.nunez@ridgerun.com wrote: > >> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >> >> This patch provides required std and control definitions in TVP7002 >> within v4l2. >> > > Is this supposed to be merged into the mainline kernel? Or is this for a > non-mainline tree only? > > If you want to get it merged in the mainline, then you should be aware that > there will be a new API for HD resolutions. I hope to have a good proposal > available for discussion during the Linux Plumbers Conference in September. > > We are definitely not going to extend v4l2_std_id. That will be frozen for > use with PAL/SECAM/NTSC formats only. > > Note that I also have serious doubts about the usefulness of the decoder > controls. Is anyone actually interested in setting those? > > It will be another topic for discussion during that conference: how to give > applications access to these low-level controls and whether we even want that. > > Regards, > > Hans > > >> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >> --- >> include/linux/videodev2.h | 87 +++++++++++++++++++++++++++++++++++++- >> include/media/v4l2-chip-ident.h | 3 + >> 2 files changed, 87 insertions(+), 3 deletions(-) >> >> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h >> index 74f1687..5a735be 100644 >> --- a/include/linux/videodev2.h >> +++ b/include/linux/videodev2.h >> @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; >> V4L2_STD_PAL_Nc |\ >> V4L2_STD_SECAM) >> #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ >> - V4L2_STD_ATSC_16_VSB) >> + V4L2_STD_ATSC_16_VSB) >> >> +/* Frequency for HD (i.e. 60 vs 50) */ >> +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) >> +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) >> + >> +/* interlaced vs progressive for HD */ >> +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) >> +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) >> + >> +/* 720 vs 1080 HD modes */ >> +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) >> +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) >> + >> +/* FIXME: >> + * >> + * Definitions equal to zero are listed for clarity. In general, >> + * definitions of standards should be improved by using bits to >> + * denote properties, not specific standards and forcing the use >> + * of unnatural combinatorics tricks. Otherwise, as such is the >> + * current case, the descriptor bit space gets exhausted very >> + * rapidly. >> + */ >> + >> +/* some standards for SDTV and HDTV */ >> +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ >> + V4L2_STD_HDTV_P) >> +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ >> + V4L2_STD_HDTV_I) >> +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ >> + V4L2_STD_HDTV_P) >> +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ >> + V4L2_STD_HDTV_I) >> +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_720) >> +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_720) >> +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_I |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_I |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_1080) >> + >> + >> #define V4L2_STD_UNKNOWN 0 >> -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ >> - V4L2_STD_625_50) >> >> struct v4l2_standard { >> __u32 index; >> @@ -808,6 +863,7 @@ struct v4l2_ext_controls { >> #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ >> #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ >> #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ >> +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls */ >> >> #define V4L2_CTRL_ID_MASK (0x0fffffff) >> #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) >> @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { >> >> #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) >> >> + >> +/* tvp7002 control IDs*/ >> +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER >> +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + 1) >> +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + 2) >> +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + 3) >> +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + 4) >> +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + 5) >> +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + 6) >> +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) >> +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) >> +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) >> +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + 10) >> +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + 11) >> +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + 12) >> +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + 13) >> +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + 14) >> +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) >> +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + 16) >> +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + 17) >> +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + 18) >> +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + 19) >> +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + 20) >> +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + 21) >> + >> /* >> * T U N I N G >> */ >> diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h >> index 94e908c..b8c86d9 100644 >> --- a/include/media/v4l2-chip-ident.h >> +++ b/include/media/v4l2-chip-ident.h >> @@ -129,6 +129,9 @@ enum { >> V4L2_IDENT_SAA6752HS = 6752, >> V4L2_IDENT_SAA6752HS_AC3 = 6753, >> >> + /* module tvp7002: just ident 7002 */ >> + V4L2_IDENT_TVP7002 = 7002, >> + >> /* module adv7170: just ident 7170 */ >> V4L2_IDENT_ADV7170 = 7170, >> >> > > > >
Hans, Murali would be discussing with you about the new API for HD resolutions. Until then we would be using the following patch from Murali that adds a separate header file for HD resolutions - http://arago-project.org/git/projects/?p=linux-davinci.git;a=commitdiff;h=42f40088864730bceaaec0388600145e76d124c7 Since TVP7002 is mainly for HD resolutions, Santiago would be using the above patch to test TVP7002 driver on DM365. I understand, for upstream submission, the TVP7002 driver should be using the new API. Apart from this, the driver should be ready for review. Thanks Sneha > -----Original Message----- > From: davinci-linux-open-source-bounces@linux.davincidsp.com > [mailto:davinci-linux-open-source-bounces@linux.davincidsp.com] On Behalf > Of Santiago Nunez-Corrales > Sent: Friday, August 28, 2009 12:17 PM > To: Hans Verkuil > Cc: santiago.nunez@ridgerun.com; todd.fischer@ridgerun.com; davinci-linux- > open-source@linux.davincidsp.com; clark.becker@ridgerun.com > Subject: Re: [PATCH 1/6] Support for TVP7002 in v4l2 definitions > > Hans, > > > Thanks for your review. In fact, one of my main concerns after looking > at current viable > implementations for HD was the structure implied by v4l2_std_id -and its > organization- was > on how to improve the way controls and standards are defined. I am eager > to see the new > proposal after the Linux Plumbers Conference and keep in the loop, in > particular in the > new kernel abstraction mechanisms for low-level access controls. > > Now on the patch, ideally this patch is intended for being merged in the > davinci branch, but > I am aware that . Sandeep suggested me to send those patches to the > linux-media list too. > > Regards, > > Hans Verkuil wrote: > > On Friday 28 August 2009 02:16:47 santiago.nunez@ridgerun.com wrote: > > > >> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> > >> > >> This patch provides required std and control definitions in TVP7002 > >> within v4l2. > >> > > > > Is this supposed to be merged into the mainline kernel? Or is this for a > > non-mainline tree only? > > > > If you want to get it merged in the mainline, then you should be aware > that > > there will be a new API for HD resolutions. I hope to have a good > proposal > > available for discussion during the Linux Plumbers Conference in > September. > > > > We are definitely not going to extend v4l2_std_id. That will be frozen > for > > use with PAL/SECAM/NTSC formats only. > > > > Note that I also have serious doubts about the usefulness of the decoder > > controls. Is anyone actually interested in setting those? > > > > It will be another topic for discussion during that conference: how to > give > > applications access to these low-level controls and whether we even want > that. > > > > Regards, > > > > Hans > > > > > >> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> > >> --- > >> include/linux/videodev2.h | 87 > +++++++++++++++++++++++++++++++++++++- > >> include/media/v4l2-chip-ident.h | 3 + > >> 2 files changed, 87 insertions(+), 3 deletions(-) > >> > >> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h > >> index 74f1687..5a735be 100644 > >> --- a/include/linux/videodev2.h > >> +++ b/include/linux/videodev2.h > >> @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; > >> V4L2_STD_PAL_Nc |\ > >> V4L2_STD_SECAM) > >> #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ > >> - V4L2_STD_ATSC_16_VSB) > >> + V4L2_STD_ATSC_16_VSB) > >> > >> +/* Frequency for HD (i.e. 60 vs 50) */ > >> +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) > >> +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) > >> + > >> +/* interlaced vs progressive for HD */ > >> +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) > >> +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) > >> + > >> +/* 720 vs 1080 HD modes */ > >> +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) > >> +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) > >> + > >> +/* FIXME: > >> + * > >> + * Definitions equal to zero are listed for clarity. In general, > >> + * definitions of standards should be improved by using bits to > >> + * denote properties, not specific standards and forcing the use > >> + * of unnatural combinatorics tricks. Otherwise, as such is the > >> + * current case, the descriptor bit space gets exhausted very > >> + * rapidly. > >> + */ > >> + > >> +/* some standards for SDTV and HDTV */ > >> +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ > >> + V4L2_STD_HDTV_P) > >> +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ > >> + V4L2_STD_HDTV_I) > >> +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ > >> + V4L2_STD_HDTV_P) > >> +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ > >> + V4L2_STD_HDTV_I) > >> +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ > >> + V4L2_STD_HDTV_50 |\ > >> + V4L2_STD_HDTV_P |\ > >> + V4L2_STD_HDTV_720) > >> +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ > >> + V4L2_STD_HDTV_60 |\ > >> + V4L2_STD_HDTV_P |\ > >> + V4L2_STD_HDTV_720) > >> +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ > >> + V4L2_STD_HDTV_50 |\ > >> + V4L2_STD_HDTV_I |\ > >> + V4L2_STD_HDTV_1080) > >> +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ > >> + V4L2_STD_HDTV_60 |\ > >> + V4L2_STD_HDTV_I |\ > >> + V4L2_STD_HDTV_1080) > >> +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ > >> + V4L2_STD_HDTV_50 |\ > >> + V4L2_STD_HDTV_P |\ > >> + V4L2_STD_HDTV_1080) > >> +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ > >> + V4L2_STD_HDTV_60 |\ > >> + V4L2_STD_HDTV_P |\ > >> + V4L2_STD_HDTV_1080) > >> + > >> + > >> #define V4L2_STD_UNKNOWN 0 > >> -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ > >> - V4L2_STD_625_50) > >> > >> struct v4l2_standard { > >> __u32 index; > >> @@ -808,6 +863,7 @@ struct v4l2_ext_controls { > >> #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' > controls */ > >> #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression > controls */ > >> #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls > */ > >> +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls > */ > >> > >> #define V4L2_CTRL_ID_MASK (0x0fffffff) > >> #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) > >> @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { > >> > >> #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) > >> > >> + > >> +/* tvp7002 control IDs*/ > >> +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER > >> +#define V4L2_CID_TVP7002_COARSE_GAIN_R > (V4L2_CID_TVP7002_BASE + 1) > >> +#define V4L2_CID_TVP7002_COARSE_GAIN_G > (V4L2_CID_TVP7002_BASE + 2) > >> +#define V4L2_CID_TVP7002_COARSE_GAIN_B > (V4L2_CID_TVP7002_BASE + 3) > >> +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + > 4) > >> +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + > 5) > >> +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + > 6) > >> +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + > 7) > >> +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + > 8) > >> +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + > 9) > >> +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + > 10) > >> +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + > 11) > >> +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + > 12) > >> +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + > 13) > >> +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + > 14) > >> +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + > 15) > >> +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + > 16) > >> +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + > 17) > >> +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + > 18) > >> +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + > 19) > >> +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + > 20) > >> +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + > 21) > >> + > >> /* > >> * T U N I N G > >> */ > >> diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip- > ident.h > >> index 94e908c..b8c86d9 100644 > >> --- a/include/media/v4l2-chip-ident.h > >> +++ b/include/media/v4l2-chip-ident.h > >> @@ -129,6 +129,9 @@ enum { > >> V4L2_IDENT_SAA6752HS = 6752, > >> V4L2_IDENT_SAA6752HS_AC3 = 6753, > >> > >> + /* module tvp7002: just ident 7002 */ > >> + V4L2_IDENT_TVP7002 = 7002, > >> + > >> /* module adv7170: just ident 7170 */ > >> V4L2_IDENT_ADV7170 = 7170, > >> > >> > > > > > > > > > > > -- > Santiago Nunez-Corrales, Eng. > RidgeRun Engineering, LLC > > Guayabos, Curridabat > San Jose, Costa Rica > +(506) 2271 1487 > +(506) 8313 0536 > http://www.ridgerun.com > > > > _______________________________________________ > Davinci-linux-open-source mailing list > Davinci-linux-open-source@linux.davincidsp.com > http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
Hans, This is only temporary and will not merge to upstream. We need to work on the RFC for HD resolutions (I have responded to separately on this) before we can submit it upstream. But could you review rest of the stuffs so that it can be re-submitted later with the above RFC change? Santiago is working with me on this. Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 new phone: 301-407-9583 Old Phone : 301-515-3736 (will be deprecated) email: m-karicheri2@ti.com >-----Original Message----- >From: Hans Verkuil [mailto:hverkuil@xs4all.nl] >Sent: Friday, August 28, 2009 2:42 AM >To: davinci-linux-open-source@linux.davincidsp.com >Cc: santiago.nunez@ridgerun.com; Karicheri, Muralidharan; >clark.becker@ridgerun.com; todd.fischer@ridgerun.com >Subject: Re: [PATCH 1/6] Support for TVP7002 in v4l2 definitions > >On Friday 28 August 2009 02:16:47 santiago.nunez@ridgerun.com wrote: >> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >> >> This patch provides required std and control definitions in TVP7002 >> within v4l2. > >Is this supposed to be merged into the mainline kernel? Or is this for a >non-mainline tree only? > >If you want to get it merged in the mainline, then you should be aware that >there will be a new API for HD resolutions. I hope to have a good proposal >available for discussion during the Linux Plumbers Conference in September. > >We are definitely not going to extend v4l2_std_id. That will be frozen for >use with PAL/SECAM/NTSC formats only. > >Note that I also have serious doubts about the usefulness of the decoder >controls. Is anyone actually interested in setting those? > >It will be another topic for discussion during that conference: how to give >applications access to these low-level controls and whether we even want >that. > >Regards, > > Hans > >> >> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >> --- >> include/linux/videodev2.h | 87 >+++++++++++++++++++++++++++++++++++++- >> include/media/v4l2-chip-ident.h | 3 + >> 2 files changed, 87 insertions(+), 3 deletions(-) >> >> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h >> index 74f1687..5a735be 100644 >> --- a/include/linux/videodev2.h >> +++ b/include/linux/videodev2.h >> @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; >> V4L2_STD_PAL_Nc |\ >> V4L2_STD_SECAM) >> #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ >> - V4L2_STD_ATSC_16_VSB) >> + V4L2_STD_ATSC_16_VSB) >> >> +/* Frequency for HD (i.e. 60 vs 50) */ >> +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) >> +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) >> + >> +/* interlaced vs progressive for HD */ >> +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) >> +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) >> + >> +/* 720 vs 1080 HD modes */ >> +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) >> +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) >> + >> +/* FIXME: >> + * >> + * Definitions equal to zero are listed for clarity. In general, >> + * definitions of standards should be improved by using bits to >> + * denote properties, not specific standards and forcing the use >> + * of unnatural combinatorics tricks. Otherwise, as such is the >> + * current case, the descriptor bit space gets exhausted very >> + * rapidly. >> + */ >> + >> +/* some standards for SDTV and HDTV */ >> +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ >> + V4L2_STD_HDTV_P) >> +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ >> + V4L2_STD_HDTV_I) >> +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ >> + V4L2_STD_HDTV_P) >> +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ >> + V4L2_STD_HDTV_I) >> +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_720) >> +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_720) >> +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_I |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_I |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_50 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_1080) >> +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ >> + V4L2_STD_HDTV_60 |\ >> + V4L2_STD_HDTV_P |\ >> + V4L2_STD_HDTV_1080) >> + >> + >> #define V4L2_STD_UNKNOWN 0 >> -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ >> - V4L2_STD_625_50) >> >> struct v4l2_standard { >> __u32 index; >> @@ -808,6 +863,7 @@ struct v4l2_ext_controls { >> #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' >controls */ >> #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression >controls */ >> #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ >> +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls >*/ >> >> #define V4L2_CTRL_ID_MASK (0x0fffffff) >> #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) >> @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { >> >> #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) >> >> + >> +/* tvp7002 control IDs*/ >> +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER >> +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + 1) >> +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + 2) >> +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + 3) >> +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + 4) >> +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + 5) >> +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + 6) >> +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) >> +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) >> +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) >> +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + >10) >> +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + >11) >> +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + >12) >> +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + >13) >> +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + >14) >> +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) >> +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + >16) >> +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + >17) >> +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + >18) >> +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + >19) >> +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + >20) >> +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + >21) >> + >> /* >> * T U N I N G >> */ >> diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip- >ident.h >> index 94e908c..b8c86d9 100644 >> --- a/include/media/v4l2-chip-ident.h >> +++ b/include/media/v4l2-chip-ident.h >> @@ -129,6 +129,9 @@ enum { >> V4L2_IDENT_SAA6752HS = 6752, >> V4L2_IDENT_SAA6752HS_AC3 = 6753, >> >> + /* module tvp7002: just ident 7002 */ >> + V4L2_IDENT_TVP7002 = 7002, >> + >> /* module adv7170: just ident 7170 */ >> V4L2_IDENT_ADV7170 = 7170, >> > > > >-- >Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom
> Hans, > > This is only temporary and will not merge to upstream. We need to > work on the RFC for HD resolutions (I have responded to separately on > this) before we can submit it upstream. But could you review rest of > the stuffs so that it can be re-submitted later with the above RFC change? > Santiago is working with me on this. Huh? I did review the tvp7002 driver on Saturday. Or am I missing something? Regards, Hans > > Murali Karicheri > Software Design Engineer > Texas Instruments Inc. > Germantown, MD 20874 > new phone: 301-407-9583 > Old Phone : 301-515-3736 (will be deprecated) > email: m-karicheri2@ti.com > >>-----Original Message----- >>From: Hans Verkuil [mailto:hverkuil@xs4all.nl] >>Sent: Friday, August 28, 2009 2:42 AM >>To: davinci-linux-open-source@linux.davincidsp.com >>Cc: santiago.nunez@ridgerun.com; Karicheri, Muralidharan; >>clark.becker@ridgerun.com; todd.fischer@ridgerun.com >>Subject: Re: [PATCH 1/6] Support for TVP7002 in v4l2 definitions >> >>On Friday 28 August 2009 02:16:47 santiago.nunez@ridgerun.com wrote: >>> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >>> >>> This patch provides required std and control definitions in TVP7002 >>> within v4l2. >> >>Is this supposed to be merged into the mainline kernel? Or is this for a >>non-mainline tree only? >> >>If you want to get it merged in the mainline, then you should be aware >> that >>there will be a new API for HD resolutions. I hope to have a good >> proposal >>available for discussion during the Linux Plumbers Conference in >> September. >> >>We are definitely not going to extend v4l2_std_id. That will be frozen >> for >>use with PAL/SECAM/NTSC formats only. >> >>Note that I also have serious doubts about the usefulness of the decoder >>controls. Is anyone actually interested in setting those? >> >>It will be another topic for discussion during that conference: how to >> give >>applications access to these low-level controls and whether we even want >>that. >> >>Regards, >> >> Hans >> >>> >>> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >>> --- >>> include/linux/videodev2.h | 87 >>+++++++++++++++++++++++++++++++++++++- >>> include/media/v4l2-chip-ident.h | 3 + >>> 2 files changed, 87 insertions(+), 3 deletions(-) >>> >>> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h >>> index 74f1687..5a735be 100644 >>> --- a/include/linux/videodev2.h >>> +++ b/include/linux/videodev2.h >>> @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; >>> V4L2_STD_PAL_Nc |\ >>> V4L2_STD_SECAM) >>> #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ >>> - V4L2_STD_ATSC_16_VSB) >>> + V4L2_STD_ATSC_16_VSB) >>> >>> +/* Frequency for HD (i.e. 60 vs 50) */ >>> +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) >>> +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) >>> + >>> +/* interlaced vs progressive for HD */ >>> +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) >>> +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) >>> + >>> +/* 720 vs 1080 HD modes */ >>> +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) >>> +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) >>> + >>> +/* FIXME: >>> + * >>> + * Definitions equal to zero are listed for clarity. In general, >>> + * definitions of standards should be improved by using bits to >>> + * denote properties, not specific standards and forcing the use >>> + * of unnatural combinatorics tricks. Otherwise, as such is the >>> + * current case, the descriptor bit space gets exhausted very >>> + * rapidly. >>> + */ >>> + >>> +/* some standards for SDTV and HDTV */ >>> +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ >>> + V4L2_STD_HDTV_P) >>> +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ >>> + V4L2_STD_HDTV_I) >>> +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ >>> + V4L2_STD_HDTV_P) >>> +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ >>> + V4L2_STD_HDTV_I) >>> +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ >>> + V4L2_STD_HDTV_50 |\ >>> + V4L2_STD_HDTV_P |\ >>> + V4L2_STD_HDTV_720) >>> +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ >>> + V4L2_STD_HDTV_60 |\ >>> + V4L2_STD_HDTV_P |\ >>> + V4L2_STD_HDTV_720) >>> +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ >>> + V4L2_STD_HDTV_50 |\ >>> + V4L2_STD_HDTV_I |\ >>> + V4L2_STD_HDTV_1080) >>> +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ >>> + V4L2_STD_HDTV_60 |\ >>> + V4L2_STD_HDTV_I |\ >>> + V4L2_STD_HDTV_1080) >>> +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ >>> + V4L2_STD_HDTV_50 |\ >>> + V4L2_STD_HDTV_P |\ >>> + V4L2_STD_HDTV_1080) >>> +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ >>> + V4L2_STD_HDTV_60 |\ >>> + V4L2_STD_HDTV_P |\ >>> + V4L2_STD_HDTV_1080) >>> + >>> + >>> #define V4L2_STD_UNKNOWN 0 >>> -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ >>> - V4L2_STD_625_50) >>> >>> struct v4l2_standard { >>> __u32 index; >>> @@ -808,6 +863,7 @@ struct v4l2_ext_controls { >>> #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' >>controls */ >>> #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression >>controls */ >>> #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ >>> +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls >>*/ >>> >>> #define V4L2_CTRL_ID_MASK (0x0fffffff) >>> #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) >>> @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { >>> >>> #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) >>> >>> + >>> +/* tvp7002 control IDs*/ >>> +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER >>> +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + 1) >>> +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + 2) >>> +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + 3) >>> +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + 4) >>> +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + 5) >>> +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + 6) >>> +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) >>> +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) >>> +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) >>> +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + >>10) >>> +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + >>11) >>> +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + >>12) >>> +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + >>13) >>> +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + >>14) >>> +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) >>> +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + >>16) >>> +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + >>17) >>> +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + >>18) >>> +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + >>19) >>> +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + >>20) >>> +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + >>21) >>> + >>> /* >>> * T U N I N G >>> */ >>> diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip- >>ident.h >>> index 94e908c..b8c86d9 100644 >>> --- a/include/media/v4l2-chip-ident.h >>> +++ b/include/media/v4l2-chip-ident.h >>> @@ -129,6 +129,9 @@ enum { >>> V4L2_IDENT_SAA6752HS = 6752, >>> V4L2_IDENT_SAA6752HS_AC3 = 6753, >>> >>> + /* module tvp7002: just ident 7002 */ >>> + V4L2_IDENT_TVP7002 = 7002, >>> + >>> /* module adv7170: just ident 7170 */ >>> V4L2_IDENT_ADV7170 = 7170, >>> >> >> >> >>-- >>Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom > > >
Murali Karicheri Software Design Engineer Texas Instruments Inc. Germantown, MD 20874 new phone: 301-407-9583 Old Phone : 301-515-3736 (will be deprecated) email: m-karicheri2@ti.com >-----Original Message----- >From: Hans Verkuil [mailto:hverkuil@xs4all.nl] >Sent: Monday, August 31, 2009 11:10 AM >To: Karicheri, Muralidharan >Cc: davinci-linux-open-source@linux.davincidsp.com; >santiago.nunez@ridgerun.com; clark.becker@ridgerun.com; >todd.fischer@ridgerun.com >Subject: RE: [PATCH 1/6] Support for TVP7002 in v4l2 definitions > > >> Hans, >> >> This is only temporary and will not merge to upstream. We need to >> work on the RFC for HD resolutions (I have responded to separately on >> this) before we can submit it upstream. But could you review rest of >> the stuffs so that it can be re-submitted later with the above RFC >change? >> Santiago is working with me on this. > >Huh? I did review the tvp7002 driver on Saturday. Or am I missing >something? > Oops! that is right. That is the important one. But there are other patches as well (1-6), tvp7002 being one of them. >Regards, > > Hans > >> >> Murali Karicheri >> Software Design Engineer >> Texas Instruments Inc. >> Germantown, MD 20874 >> new phone: 301-407-9583 >> Old Phone : 301-515-3736 (will be deprecated) >> email: m-karicheri2@ti.com >> >>>-----Original Message----- >>>From: Hans Verkuil [mailto:hverkuil@xs4all.nl] >>>Sent: Friday, August 28, 2009 2:42 AM >>>To: davinci-linux-open-source@linux.davincidsp.com >>>Cc: santiago.nunez@ridgerun.com; Karicheri, Muralidharan; >>>clark.becker@ridgerun.com; todd.fischer@ridgerun.com >>>Subject: Re: [PATCH 1/6] Support for TVP7002 in v4l2 definitions >>> >>>On Friday 28 August 2009 02:16:47 santiago.nunez@ridgerun.com wrote: >>>> From: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >>>> >>>> This patch provides required std and control definitions in TVP7002 >>>> within v4l2. >>> >>>Is this supposed to be merged into the mainline kernel? Or is this for a >>>non-mainline tree only? >>> >>>If you want to get it merged in the mainline, then you should be aware >>> that >>>there will be a new API for HD resolutions. I hope to have a good >>> proposal >>>available for discussion during the Linux Plumbers Conference in >>> September. >>> >>>We are definitely not going to extend v4l2_std_id. That will be frozen >>> for >>>use with PAL/SECAM/NTSC formats only. >>> >>>Note that I also have serious doubts about the usefulness of the decoder >>>controls. Is anyone actually interested in setting those? >>> >>>It will be another topic for discussion during that conference: how to >>> give >>>applications access to these low-level controls and whether we even want >>>that. >>> >>>Regards, >>> >>> Hans >>> >>>> >>>> Signed-off-by: Santiago Nunez-Corrales <santiago.nunez@ridgerun.com> >>>> --- >>>> include/linux/videodev2.h | 87 >>>+++++++++++++++++++++++++++++++++++++- >>>> include/media/v4l2-chip-ident.h | 3 + >>>> 2 files changed, 87 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h >>>> index 74f1687..5a735be 100644 >>>> --- a/include/linux/videodev2.h >>>> +++ b/include/linux/videodev2.h >>>> @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; >>>> V4L2_STD_PAL_Nc |\ >>>> V4L2_STD_SECAM) >>>> #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ >>>> - V4L2_STD_ATSC_16_VSB) >>>> + V4L2_STD_ATSC_16_VSB) >>>> >>>> +/* Frequency for HD (i.e. 60 vs 50) */ >>>> +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) >>>> +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) >>>> + >>>> +/* interlaced vs progressive for HD */ >>>> +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) >>>> +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) >>>> + >>>> +/* 720 vs 1080 HD modes */ >>>> +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) >>>> +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) >>>> + >>>> +/* FIXME: >>>> + * >>>> + * Definitions equal to zero are listed for clarity. In general, >>>> + * definitions of standards should be improved by using bits to >>>> + * denote properties, not specific standards and forcing the use >>>> + * of unnatural combinatorics tricks. Otherwise, as such is the >>>> + * current case, the descriptor bit space gets exhausted very >>>> + * rapidly. >>>> + */ >>>> + >>>> +/* some standards for SDTV and HDTV */ >>>> +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ >>>> + V4L2_STD_HDTV_P) >>>> +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ >>>> + V4L2_STD_HDTV_I) >>>> +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ >>>> + V4L2_STD_HDTV_P) >>>> +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ >>>> + V4L2_STD_HDTV_I) >>>> +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ >>>> + V4L2_STD_HDTV_50 |\ >>>> + V4L2_STD_HDTV_P |\ >>>> + V4L2_STD_HDTV_720) >>>> +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ >>>> + V4L2_STD_HDTV_60 |\ >>>> + V4L2_STD_HDTV_P |\ >>>> + V4L2_STD_HDTV_720) >>>> +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ >>>> + V4L2_STD_HDTV_50 |\ >>>> + V4L2_STD_HDTV_I |\ >>>> + V4L2_STD_HDTV_1080) >>>> +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ >>>> + V4L2_STD_HDTV_60 |\ >>>> + V4L2_STD_HDTV_I |\ >>>> + V4L2_STD_HDTV_1080) >>>> +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ >>>> + V4L2_STD_HDTV_50 |\ >>>> + V4L2_STD_HDTV_P |\ >>>> + V4L2_STD_HDTV_1080) >>>> +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ >>>> + V4L2_STD_HDTV_60 |\ >>>> + V4L2_STD_HDTV_P |\ >>>> + V4L2_STD_HDTV_1080) >>>> + >>>> + >>>> #define V4L2_STD_UNKNOWN 0 >>>> -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ >>>> - V4L2_STD_625_50) >>>> >>>> struct v4l2_standard { >>>> __u32 index; >>>> @@ -808,6 +863,7 @@ struct v4l2_ext_controls { >>>> #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' >>>controls */ >>>> #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression >>>controls */ >>>> #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ >>>> +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls >>>*/ >>>> >>>> #define V4L2_CTRL_ID_MASK (0x0fffffff) >>>> #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) >>>> @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { >>>> >>>> #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) >>>> >>>> + >>>> +/* tvp7002 control IDs*/ >>>> +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER >>>> +#define V4L2_CID_TVP7002_COARSE_GAIN_R > (V4L2_CID_TVP7002_BASE + 1) >>>> +#define V4L2_CID_TVP7002_COARSE_GAIN_G > (V4L2_CID_TVP7002_BASE + 2) >>>> +#define V4L2_CID_TVP7002_COARSE_GAIN_B > (V4L2_CID_TVP7002_BASE + 3) >>>> +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + 4) >>>> +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + 5) >>>> +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + 6) >>>> +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) >>>> +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) >>>> +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) >>>> +#define V4L2_CID_TVP7002_CLAMP_OFF_EN > (V4L2_CID_TVP7002_BASE + >>>10) >>>> +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + >>>11) >>>> +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + >>>12) >>>> +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + >>>13) >>>> +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + >>>14) >>>> +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + >15) >>>> +#define V4L2_CID_TVP7002_B_COARSE_OFF > (V4L2_CID_TVP7002_BASE + >>>16) >>>> +#define V4L2_CID_TVP7002_G_COARSE_OFF > (V4L2_CID_TVP7002_BASE + >>>17) >>>> +#define V4L2_CID_TVP7002_R_COARSE_OFF > (V4L2_CID_TVP7002_BASE + >>>18) >>>> +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + >>>19) >>>> +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + >>>20) >>>> +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + >>>21) >>>> + >>>> /* >>>> * T U N I N G >>>> */ >>>> diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip- >>>ident.h >>>> index 94e908c..b8c86d9 100644 >>>> --- a/include/media/v4l2-chip-ident.h >>>> +++ b/include/media/v4l2-chip-ident.h >>>> @@ -129,6 +129,9 @@ enum { >>>> V4L2_IDENT_SAA6752HS = 6752, >>>> V4L2_IDENT_SAA6752HS_AC3 = 6753, >>>> >>>> + /* module tvp7002: just ident 7002 */ >>>> + V4L2_IDENT_TVP7002 = 7002, >>>> + >>>> /* module adv7170: just ident 7170 */ >>>> V4L2_IDENT_ADV7170 = 7170, >>>> >>> >>> >>> >>>-- >>>Hans Verkuil - video4linux developer - sponsored by TANDBERG Telecom >> >> >> > > >-- >Hans Verkuil - video4linux developer - sponsored by TANDBERG >
On Monday 31 August 2009 19:43:03 Karicheri, Muralidharan wrote: > > Murali Karicheri > Software Design Engineer > Texas Instruments Inc. > Germantown, MD 20874 > new phone: 301-407-9583 > Old Phone : 301-515-3736 (will be deprecated) > email: m-karicheri2@ti.com > > >-----Original Message----- > >From: Hans Verkuil [mailto:hverkuil@xs4all.nl] > >Sent: Monday, August 31, 2009 11:10 AM > >To: Karicheri, Muralidharan > >Cc: davinci-linux-open-source@linux.davincidsp.com; > >santiago.nunez@ridgerun.com; clark.becker@ridgerun.com; > >todd.fischer@ridgerun.com > >Subject: RE: [PATCH 1/6] Support for TVP7002 in v4l2 definitions > > > > > >> Hans, > >> > >> This is only temporary and will not merge to upstream. We need to > >> work on the RFC for HD resolutions (I have responded to separately on > >> this) before we can submit it upstream. But could you review rest of > >> the stuffs so that it can be re-submitted later with the above RFC > >change? > >> Santiago is working with me on this. > > > >Huh? I did review the tvp7002 driver on Saturday. Or am I missing > >something? > > > Oops! that is right. That is the important one. But there are other patches as well (1-6), tvp7002 being one of them. The others are fine. I only commented on 1/6 and 5/6 (note that I didn't see a 6/6 patch, that was apparently never posted). Regards, Hans
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 74f1687..5a735be 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -704,11 +704,66 @@ typedef __u64 v4l2_std_id; V4L2_STD_PAL_Nc |\ V4L2_STD_SECAM) #define V4L2_STD_ATSC (V4L2_STD_ATSC_8_VSB |\ - V4L2_STD_ATSC_16_VSB) + V4L2_STD_ATSC_16_VSB) +/* Frequency for HD (i.e. 60 vs 50) */ +#define V4L2_STD_HDTV_50 ((v4l2_std_id)0x04000000) +#define V4L2_STD_HDTV_60 ((v4l2_std_id)0x00000000) + +/* interlaced vs progressive for HD */ +#define V4L2_STD_HDTV_I ((v4l2_std_id)0x08000000) +#define V4L2_STD_HDTV_P ((v4l2_std_id)0x00000000) + +/* 720 vs 1080 HD modes */ +#define V4L2_STD_HDTV_720 ((v4l2_std_id)0x08000000) +#define V4L2_STD_HDTV_1080 ((v4l2_std_id)0x10000000) + +/* FIXME: + * + * Definitions equal to zero are listed for clarity. In general, + * definitions of standards should be improved by using bits to + * denote properties, not specific standards and forcing the use + * of unnatural combinatorics tricks. Otherwise, as such is the + * current case, the descriptor bit space gets exhausted very + * rapidly. + */ + +/* some standards for SDTV and HDTV */ +#define V4L2_STD_480P_60 (V4L2_STD_525_60 |\ + V4L2_STD_HDTV_P) +#define V4L2_STD_480I_60 (V4L2_STD_525_60 |\ + V4L2_STD_HDTV_I) +#define V4L2_STD_576P_50 (V4L2_STD_625_50 |\ + V4L2_STD_HDTV_P) +#define V4L2_STD_576I_50 (V4L2_STD_625_50 |\ + V4L2_STD_HDTV_I) +#define V4L2_STD_720P_50 (V4L2_STD_ATSC |\ + V4L2_STD_HDTV_50 |\ + V4L2_STD_HDTV_P |\ + V4L2_STD_HDTV_720) +#define V4L2_STD_720P_60 (V4L2_STD_ATSC |\ + V4L2_STD_HDTV_60 |\ + V4L2_STD_HDTV_P |\ + V4L2_STD_HDTV_720) +#define V4L2_STD_1080I_50 (V4L2_STD_ATSC |\ + V4L2_STD_HDTV_50 |\ + V4L2_STD_HDTV_I |\ + V4L2_STD_HDTV_1080) +#define V4L2_STD_1080I_60 (V4L2_STD_ATSC |\ + V4L2_STD_HDTV_60 |\ + V4L2_STD_HDTV_I |\ + V4L2_STD_HDTV_1080) +#define V4L2_STD_1080P_50 (V4L2_STD_ATSC |\ + V4L2_STD_HDTV_50 |\ + V4L2_STD_HDTV_P |\ + V4L2_STD_HDTV_1080) +#define V4L2_STD_1080P_60 (V4L2_STD_ATSC |\ + V4L2_STD_HDTV_60 |\ + V4L2_STD_HDTV_P |\ + V4L2_STD_HDTV_1080) + + #define V4L2_STD_UNKNOWN 0 -#define V4L2_STD_ALL (V4L2_STD_525_60 |\ - V4L2_STD_625_50) struct v4l2_standard { __u32 index; @@ -808,6 +863,7 @@ struct v4l2_ext_controls { #define V4L2_CTRL_CLASS_USER 0x00980000 /* Old-style 'user' controls */ #define V4L2_CTRL_CLASS_MPEG 0x00990000 /* MPEG-compression controls */ #define V4L2_CTRL_CLASS_CAMERA 0x009a0000 /* Camera class controls */ +#define V4L2_CTRL_CLASS_DECODER 0x009c0000 /* Decoder class controls */ #define V4L2_CTRL_ID_MASK (0x0fffffff) #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) @@ -1147,6 +1203,31 @@ enum v4l2_exposure_auto_type { #define V4L2_CID_PRIVACY (V4L2_CID_CAMERA_CLASS_BASE+16) + +/* tvp7002 control IDs*/ +#define V4L2_CID_TVP7002_BASE V4L2_CTRL_CLASS_DECODER +#define V4L2_CID_TVP7002_COARSE_GAIN_R (V4L2_CID_TVP7002_BASE + 1) +#define V4L2_CID_TVP7002_COARSE_GAIN_G (V4L2_CID_TVP7002_BASE + 2) +#define V4L2_CID_TVP7002_COARSE_GAIN_B (V4L2_CID_TVP7002_BASE + 3) +#define V4L2_CID_TVP7002_FINE_GAIN_R (V4L2_CID_TVP7002_BASE + 4) +#define V4L2_CID_TVP7002_FINE_GAIN_G (V4L2_CID_TVP7002_BASE + 5) +#define V4L2_CID_TVP7002_FINE_GAIN_B (V4L2_CID_TVP7002_BASE + 6) +#define V4L2_CID_TVP7002_B_CLAMP (V4L2_CID_TVP7002_BASE + 7) +#define V4L2_CID_TVP7002_G_CLAMP (V4L2_CID_TVP7002_BASE + 8) +#define V4L2_CID_TVP7002_R_CLAMP (V4L2_CID_TVP7002_BASE + 9) +#define V4L2_CID_TVP7002_CLAMP_OFF_EN (V4L2_CID_TVP7002_BASE + 10) +#define V4L2_CID_TVP7002_FCTCA (V4L2_CID_PRIVATE_BASE + 11) +#define V4L2_CID_TVP7002_F_CLAMP_GB (V4L2_CID_TVP7002_BASE + 12) +#define V4L2_CID_TVP7002_F_CLAMP_R (V4L2_CID_TVP7002_BASE + 13) +#define V4L2_CID_TVP7002_CLAMP_START (V4L2_CID_TVP7002_BASE + 14) +#define V4L2_CID_TVP7002_CLAMP_W (V4L2_CID_TVP7002_BASE + 15) +#define V4L2_CID_TVP7002_B_COARSE_OFF (V4L2_CID_TVP7002_BASE + 16) +#define V4L2_CID_TVP7002_G_COARSE_OFF (V4L2_CID_TVP7002_BASE + 17) +#define V4L2_CID_TVP7002_R_COARSE_OFF (V4L2_CID_TVP7002_BASE + 18) +#define V4L2_CID_TVP7002_B_FINE_OFF (V4L2_CID_TVP7002_BASE + 19) +#define V4L2_CID_TVP7002_G_FINE_OFF (V4L2_CID_TVP7002_BASE + 20) +#define V4L2_CID_TVP7002_R_FINE_OFF (V4L2_CID_TVP7002_BASE + 21) + /* * T U N I N G */ diff --git a/include/media/v4l2-chip-ident.h b/include/media/v4l2-chip-ident.h index 94e908c..b8c86d9 100644 --- a/include/media/v4l2-chip-ident.h +++ b/include/media/v4l2-chip-ident.h @@ -129,6 +129,9 @@ enum { V4L2_IDENT_SAA6752HS = 6752, V4L2_IDENT_SAA6752HS_AC3 = 6753, + /* module tvp7002: just ident 7002 */ + V4L2_IDENT_TVP7002 = 7002, + /* module adv7170: just ident 7170 */ V4L2_IDENT_ADV7170 = 7170,