[v7,1/5] V4L2: Add seek spacing and FM RX class.

Message ID 1280758003-16118-2-git-send-email-matti.j.aaltonen@nokia.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

m7aalton Aug. 2, 2010, 2:06 p.m. UTC
  Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
control classes.

Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
---
 drivers/media/video/v4l2-common.c |   12 ++++++++++++
 include/linux/videodev2.h         |   15 ++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletions(-)
  

Comments

Hans Verkuil Aug. 9, 2010, 4:38 p.m. UTC | #1
On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
> Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
> control classes.

This will no longer apply now that the control framework has been merged.

I strongly recommend converting the driver to use that framework. If
nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.

See the file Documentation/video4linux/v4l2-controls.txt.

Regards,

	Hans

> 
> Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
> ---
>  drivers/media/video/v4l2-common.c |   12 ++++++++++++
>  include/linux/videodev2.h         |   15 ++++++++++++++-
>  2 files changed, 26 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
> index cd1f21d..41b1bb2 100644
> --- a/drivers/media/video/v4l2-common.c
> +++ b/drivers/media/video/v4l2-common.c
> @@ -351,6 +351,12 @@ const char **v4l2_ctrl_get_menu(u32 id)
>  		"75 useconds",
>  		NULL,
>  	};
> +	static const char *fm_band[] = {
> +		"87.5 - 108. MHz",
> +		"76. - 90. MHz, Japan",
> +		"65. - 74. MHz, OIRT",
> +		NULL,
> +	};
>  
>  	switch (id) {
>  		case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
> @@ -391,6 +397,8 @@ const char **v4l2_ctrl_get_menu(u32 id)
>  			return colorfx;
>  		case V4L2_CID_TUNE_PREEMPHASIS:
>  			return tune_preemphasis;
> +		case V4L2_CID_FM_BAND:
> +			return fm_band;
>  		default:
>  			return NULL;
>  	}
> @@ -515,6 +523,8 @@ const char *v4l2_ctrl_get_name(u32 id)
>  	case V4L2_CID_TUNE_PREEMPHASIS:	return "Pre-emphasis settings";
>  	case V4L2_CID_TUNE_POWER_LEVEL:		return "Tune Power Level";
>  	case V4L2_CID_TUNE_ANTENNA_CAPACITOR:	return "Tune Antenna Capacitor";
> +	case V4L2_CID_FM_RX_CLASS:		return "FM Radio Tuner Controls";
> +	case V4L2_CID_FM_BAND:			return "FM Band";
>  
>  	default:
>  		return NULL;
> @@ -580,6 +590,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
>  	case V4L2_CID_EXPOSURE_AUTO:
>  	case V4L2_CID_COLORFX:
>  	case V4L2_CID_TUNE_PREEMPHASIS:
> +	case V4L2_CID_FM_BAND:
>  		qctrl->type = V4L2_CTRL_TYPE_MENU;
>  		step = 1;
>  		break;
> @@ -591,6 +602,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
>  	case V4L2_CID_CAMERA_CLASS:
>  	case V4L2_CID_MPEG_CLASS:
>  	case V4L2_CID_FM_TX_CLASS:
> +	case V4L2_CID_FM_RX_CLASS:
>  		qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS;
>  		qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
>  		min = max = step = def = 0;
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 418dacf..26522cb 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -935,6 +935,7 @@ struct v4l2_ext_controls {
>  #define V4L2_CTRL_CLASS_MPEG 0x00990000	/* MPEG-compression controls */
>  #define V4L2_CTRL_CLASS_CAMERA 0x009a0000	/* Camera class controls */
>  #define V4L2_CTRL_CLASS_FM_TX 0x009b0000	/* FM Modulator control class */
> +#define V4L2_CTRL_CLASS_FM_RX 0x009c0000	/* FM Tuner control class */
>  
>  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
>  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> @@ -1313,6 +1314,17 @@ enum v4l2_preemphasis {
>  #define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FM_TX_CLASS_BASE + 113)
>  #define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FM_TX_CLASS_BASE + 114)
>  
> +/* FM Tuner class control IDs */
> +#define V4L2_CID_FM_RX_CLASS_BASE		(V4L2_CTRL_CLASS_FM_RX | 0x900)
> +#define V4L2_CID_FM_RX_CLASS			(V4L2_CTRL_CLASS_FM_RX | 1)
> +
> +#define V4L2_CID_FM_BAND			(V4L2_CID_FM_RX_CLASS_BASE + 1)
> +enum v4l2_fm_band {
> +	V4L2_FM_BAND_OTHER		= 0,
> +	V4L2_FM_BAND_JAPAN		= 1,
> +	V4L2_FM_BAND_OIRT		= 2
> +};
> +
>  /*
>   *	T U N I N G
>   */
> @@ -1377,7 +1389,8 @@ struct v4l2_hw_freq_seek {
>  	enum v4l2_tuner_type  type;
>  	__u32		      seek_upward;
>  	__u32		      wrap_around;
> -	__u32		      reserved[8];
> +	__u32		      spacing;
> +	__u32		      reserved[7];
>  };
>  
>  /*
>
  
m7aalton Aug. 10, 2010, 7:31 a.m. UTC | #2
On Mon, 2010-08-09 at 18:38 +0200, ext Hans Verkuil wrote:
> On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
> > Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
> > control classes.
> 
> This will no longer apply now that the control framework has been merged.
> 
> I strongly recommend converting the driver to use that framework. If
> nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.
> 
> See the file Documentation/video4linux/v4l2-controls.txt.

I can't find that file.  Should it be in some branch of the development
tree?

I've updated my tree....:

[remote "origin"]
        url =
http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[remote "linuxtv"]
        url = http://linuxtv.org/git/v4l-dvb.git
        fetch = +refs/heads/*:refs/remotes/linuxtv/*

The closest file I have name-wise is
Documentation/video4linux/v4l2-framework.txt

Thanks,
Matti A.

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Hans Verkuil Aug. 10, 2010, 8:04 a.m. UTC | #3
> On Mon, 2010-08-09 at 18:38 +0200, ext Hans Verkuil wrote:
>> On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
>> > Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
>> > control classes.
>>
>> This will no longer apply now that the control framework has been
>> merged.
>>
>> I strongly recommend converting the driver to use that framework. If
>> nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.
>>
>> See the file Documentation/video4linux/v4l2-controls.txt.
>
> I can't find that file.  Should it be in some branch of the development
> tree?

It's in the new development tree, branch staging/v2.6.36:

http://git.linuxtv.org/media_tree.git

This replaced the v4l-dvb.git tree.

Regards,

         Hans

>
> I've updated my tree....:
>
> [remote "origin"]
>         url =
> http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>         fetch = +refs/heads/*:refs/remotes/origin/*
> [remote "linuxtv"]
>         url = http://linuxtv.org/git/v4l-dvb.git
>         fetch = +refs/heads/*:refs/remotes/linuxtv/*
>
> The closest file I have name-wise is
> Documentation/video4linux/v4l2-framework.txt
>
> Thanks,
> Matti A.
>
>
  
m7aalton Aug. 10, 2010, 10:18 a.m. UTC | #4
On Tue, 2010-08-10 at 10:04 +0200, ext Hans Verkuil wrote:
> > On Mon, 2010-08-09 at 18:38 +0200, ext Hans Verkuil wrote:
> >> On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
> >> > Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
> >> > control classes.
> >>
> >> This will no longer apply now that the control framework has been
> >> merged.
> >>
> >> I strongly recommend converting the driver to use that framework. If
> >> nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.
> >>
> >> See the file Documentation/video4linux/v4l2-controls.txt.
> >
> > I can't find that file.  Should it be in some branch of the development
> > tree?
> 
> It's in the new development tree, branch staging/v2.6.36:
> 
> http://git.linuxtv.org/media_tree.git

The tree address is actually:

http://linuxtv.org/git/media_tree.git

B.R.
Matti.

> 
> This replaced the v4l-dvb.git tree.
> 
> Regards,
> 
>          Hans
> 
> >
> > I've updated my tree....:
> >
> > [remote "origin"]
> >         url =
> > http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> >         fetch = +refs/heads/*:refs/remotes/origin/*
> > [remote "linuxtv"]
> >         url = http://linuxtv.org/git/v4l-dvb.git
> >         fetch = +refs/heads/*:refs/remotes/linuxtv/*
> >
> > The closest file I have name-wise is
> > Documentation/video4linux/v4l2-framework.txt
> >
> > Thanks,
> > Matti A.
> >
> >
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
m7aalton Aug. 10, 2010, 12:03 p.m. UTC | #5
On Tue, 2010-08-10 at 10:04 +0200, ext Hans Verkuil wrote:
> > On Mon, 2010-08-09 at 18:38 +0200, ext Hans Verkuil wrote:
> >> On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
> >> > Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
> >> > control classes.
> >>
> >> This will no longer apply now that the control framework has been
> >> merged.
> >>
> >> I strongly recommend converting the driver to use that framework. If
> >> nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.
> >>
> >> See the file Documentation/video4linux/v4l2-controls.txt.
> >
> > I can't find that file.  Should it be in some branch of the development
> > tree?
> 
> It's in the new development tree, branch staging/v2.6.36:
> 
> http://git.linuxtv.org/media_tree.git
> 
> This replaced the v4l-dvb.git tree.
> 
> Regards,

This mainly FYI:

I can read the v4l2-controls.txt file through your git web system... but
after cloning etc. I can't see it...

By looking at the git log the cloned tree lags behind three or four
days.


Cheers,
Matti A.

> 
>          Hans
> 
> >
> > I've updated my tree....:
> >
> > [remote "origin"]
> >         url =
> > http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
> >         fetch = +refs/heads/*:refs/remotes/origin/*
> > [remote "linuxtv"]
> >         url = http://linuxtv.org/git/v4l-dvb.git
> >         fetch = +refs/heads/*:refs/remotes/linuxtv/*
> >
> > The closest file I have name-wise is
> > Documentation/video4linux/v4l2-framework.txt
> >
> > Thanks,
> > Matti A.
> >
> >
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Mauro Carvalho Chehab Aug. 10, 2010, 12:14 p.m. UTC | #6
Em 10-08-2010 09:03, Matti J. Aaltonen escreveu:
> On Tue, 2010-08-10 at 10:04 +0200, ext Hans Verkuil wrote:
>>> On Mon, 2010-08-09 at 18:38 +0200, ext Hans Verkuil wrote:
>>>> On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
>>>>> Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
>>>>> control classes.
>>>>
>>>> This will no longer apply now that the control framework has been
>>>> merged.
>>>>
>>>> I strongly recommend converting the driver to use that framework. If
>>>> nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.
>>>>
>>>> See the file Documentation/video4linux/v4l2-controls.txt.
>>>
>>> I can't find that file.  Should it be in some branch of the development
>>> tree?
>>
>> It's in the new development tree, branch staging/v2.6.36:
>>
>> http://git.linuxtv.org/media_tree.git
>>
>> This replaced the v4l-dvb.git tree.
>>
>> Regards,
> 
> This mainly FYI:
> 
> I can read the v4l2-controls.txt file through your git web system... but
> after cloning etc. I can't see it...

You're probably at the wrong branch. you'll need to do something like:
	$ git checkout -b my_working_branch remotes/staging/v2.6.36

in order to create a new branch based on it.

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
m7aalton Aug. 10, 2010, 12:30 p.m. UTC | #7
On Tue, 2010-08-10 at 14:14 +0200, ext Mauro Carvalho Chehab wrote:
> Em 10-08-2010 09:03, Matti J. Aaltonen escreveu:
> > On Tue, 2010-08-10 at 10:04 +0200, ext Hans Verkuil wrote:
> >>> On Mon, 2010-08-09 at 18:38 +0200, ext Hans Verkuil wrote:
> >>>> On Monday 02 August 2010 16:06:39 Matti J. Aaltonen wrote:
> >>>>> Add spacing field to v4l2_hw_freq_seek and also add FM RX class to
> >>>>> control classes.
> >>>>
> >>>> This will no longer apply now that the control framework has been
> >>>> merged.
> >>>>
> >>>> I strongly recommend converting the driver to use that framework. If
> >>>> nothing else, you get support for the g/s/try_ext_ctrls ioctls for free.
> >>>>
> >>>> See the file Documentation/video4linux/v4l2-controls.txt.
> >>>
> >>> I can't find that file.  Should it be in some branch of the development
> >>> tree?
> >>
> >> It's in the new development tree, branch staging/v2.6.36:
> >>
> >> http://git.linuxtv.org/media_tree.git
> >>
> >> This replaced the v4l-dvb.git tree.
> >>
> >> Regards,
> > 
> > This mainly FYI:
> > 
> > I can read the v4l2-controls.txt file through your git web system... but
> > after cloning etc. I can't see it...
> 
> You're probably at the wrong branch. you'll need to do something like:
> 	$ git checkout -b my_working_branch remotes/staging/v2.6.36
> 
> in order to create a new branch based on it.

Referring to a remote branch like that is new to me, also it doesn't
work:

git branch -a
  master
* v2636
  origin/HEAD
  origin/master
  origin/staging/v2.6.35
  origin/staging/v2.6.36
  origin/staging/v2.6.37

git checkout -b my_working_branch remotes/staging/v2.6.36
fatal: git checkout: updating paths is incompatible with switching
branches.
Did you intend to checkout 'remotes/staging/v2.6.36' which can not be
resolved as commit?

more .git/config
[core]
        repositoryformatversion = 0
        filemode = true
        bare = false
        logallrefupdates = true
[remote "origin"]
        url = http://linuxtv.org/git/media_tree.git
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master
[branch "v2636"]
        remote = origin
        merge = refs/heads/staging/v2.6.36


git --version
git version 1.6.1.3


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


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
m7aalton Aug. 11, 2010, 9:21 a.m. UTC | #8
Hi.

I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
out the origin/staging/v2.6.37 branch and the
Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
one of my colleagues to do the same and the result was also the same.

The latest commit in this branch is:

commit 80f1bb8ad61b56597ef2557cc7c67d8876247e6d
Merge: 2763aca... fc1caf6...
Author: Mauro Carvalho Chehab <mchehab@redhat.com>
Date:   Fri Aug 6 10:50:25 2010 -0300

Please check what's wrong...

Thanks,
Matti A.


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Hans Verkuil Aug. 11, 2010, 10:56 a.m. UTC | #9
> Hi.
>
> I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
> out the origin/staging/v2.6.37 branch and the
> Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
> one of my colleagues to do the same and the result was also the same.

The file is in the v2.6.36 branch. It hasn't been merged yet in the
v2.6.37 branch.

Regards,

        Hans

>
> The latest commit in this branch is:
>
> commit 80f1bb8ad61b56597ef2557cc7c67d8876247e6d
> Merge: 2763aca... fc1caf6...
> Author: Mauro Carvalho Chehab <mchehab@redhat.com>
> Date:   Fri Aug 6 10:50:25 2010 -0300
>
> Please check what's wrong...
>
> Thanks,
> Matti A.
>
>
>
  
m7aalton Aug. 11, 2010, 11:34 a.m. UTC | #10
Hello.

On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
> > Hi.
> >
> > I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
> > out the origin/staging/v2.6.37 branch and the
> > Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
> > one of my colleagues to do the same and the result was also the same.
> 
> The file is in the v2.6.36 branch. It hasn't been merged yet in the
> v2.6.37 branch.

37 above was a typo, sorry. My point was that we couldn't find it in the
origin/staging/v2.6.36 branch... and that the branch lags behind of what
can be seen via the git web interface...

B.R.
Matti

> 
> Regards,
> 
>         Hans
> 
> >
> > The latest commit in this branch is:
> >
> > commit 80f1bb8ad61b56597ef2557cc7c67d8876247e6d
> > Merge: 2763aca... fc1caf6...
> > Author: Mauro Carvalho Chehab <mchehab@redhat.com>
> > Date:   Fri Aug 6 10:50:25 2010 -0300
> >
> > Please check what's wrong...
> >
> > Thanks,
> > Matti A.
> >
> >
> >
> 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
m7aalton Aug. 11, 2010, 11:44 a.m. UTC | #11
Hi again.

On Wed, 2010-08-11 at 14:34 +0300, Matti J. Aaltonen wrote:
> Hello.
> 
> On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
> > > Hi.
> > >
> > > I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
> > > out the origin/staging/v2.6.37 branch and the
> > > Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
> > > one of my colleagues to do the same and the result was also the same.
> > 
> > The file is in the v2.6.36 branch. It hasn't been merged yet in the
> > v2.6.37 branch.
> 
> 37 above was a typo, sorry. My point was that we couldn't find it in the
> origin/staging/v2.6.36 branch... and that the branch lags behind of what
> can be seen via the git web interface...
> 
> B.R.
> Matti

I'd suggest - if that's not too much trouble - that you'd clone the tree
using http (from http://linuxtv.org/git/media_tree.git) and then checked
out the 36 branch and see that it works for you and then post the
command you used and then I'll admit what I did wrong - if necessary:-)

Cheers,
Matti

> 
> > 
> > Regards,
> > 
> >         Hans
> > 
> > >
> > > The latest commit in this branch is:
> > >
> > > commit 80f1bb8ad61b56597ef2557cc7c67d8876247e6d
> > > Merge: 2763aca... fc1caf6...
> > > Author: Mauro Carvalho Chehab <mchehab@redhat.com>
> > > Date:   Fri Aug 6 10:50:25 2010 -0300
> > >
> > > Please check what's wrong...
> > >
> > > Thanks,
> > > Matti A.
> > >
> > >
> > >
> > 
> > 
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Hans Verkuil Aug. 11, 2010, 12:13 p.m. UTC | #12
> Hi again.
>
> On Wed, 2010-08-11 at 14:34 +0300, Matti J. Aaltonen wrote:
>> Hello.
>>
>> On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
>> > > Hi.
>> > >
>> > > I cloned your tree at 	http://linuxtv.org/git/media_tree.git and
>> checked
>> > > out the origin/staging/v2.6.37 branch and the
>> > > Documentation/video4linux/v4l2-controls.txt  just isn't there. I
>> asked
>> > > one of my colleagues to do the same and the result was also the
>> same.
>> >
>> > The file is in the v2.6.36 branch. It hasn't been merged yet in the
>> > v2.6.37 branch.
>>
>> 37 above was a typo, sorry. My point was that we couldn't find it in the
>> origin/staging/v2.6.36 branch... and that the branch lags behind of what
>> can be seen via the git web interface...

I use this sequence:

git clone
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
v4l-dvb

cd v4l-dvb

git remote add media git://linuxtv.org/media_tree.git

git remote update

git checkout -b v2.6.36 media/staging/v2.6.36

$ ls -l Documentation/video4linux/v4l2-controls.txt
-rw-r--r-- 1 hve users 23441 Aug 11 14:08
Documentation/video4linux/v4l2-controls.txt

Regards,

          Hans

>>
>> B.R.
>> Matti
>
> I'd suggest - if that's not too much trouble - that you'd clone the tree
> using http (from http://linuxtv.org/git/media_tree.git) and then checked
> out the 36 branch and see that it works for you and then post the
> command you used and then I'll admit what I did wrong - if necessary:-)
>
> Cheers,
> Matti
>
>>
>> >
>> > Regards,
>> >
>> >         Hans
>> >
>> > >
>> > > The latest commit in this branch is:
>> > >
>> > > commit 80f1bb8ad61b56597ef2557cc7c67d8876247e6d
>> > > Merge: 2763aca... fc1caf6...
>> > > Author: Mauro Carvalho Chehab <mchehab@redhat.com>
>> > > Date:   Fri Aug 6 10:50:25 2010 -0300
>> > >
>> > > Please check what's wrong...
>> > >
>> > > Thanks,
>> > > Matti A.
>> > >
>> > >
>> > >
>> >
>> >
>>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
  
Mauro Carvalho Chehab Aug. 11, 2010, 12:49 p.m. UTC | #13
Em 11-08-2010 07:56, Hans Verkuil escreveu:
> 
>> Hi.
>>
>> I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
>> out the origin/staging/v2.6.37 branch and the
>> Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
>> one of my colleagues to do the same and the result was also the same.
> 
> The file is in the v2.6.36 branch. It hasn't been merged yet in the
> v2.6.37 branch.

I'll start working with v2.6.37 branch after the end of the merge window, pulling
2.6.36-rc1 there.

Cheers,
Mauro

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Mauro Carvalho Chehab Aug. 11, 2010, 1:16 p.m. UTC | #14
Em 11-08-2010 08:44, Matti J. Aaltonen escreveu:
> Hi again.
> 
> On Wed, 2010-08-11 at 14:34 +0300, Matti J. Aaltonen wrote:
>> Hello.
>>
>> On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
>>>> Hi.
>>>>
>>>> I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
>>>> out the origin/staging/v2.6.37 branch and the
>>>> Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
>>>> one of my colleagues to do the same and the result was also the same.
>>>
>>> The file is in the v2.6.36 branch. It hasn't been merged yet in the
>>> v2.6.37 branch.
>>
>> 37 above was a typo, sorry. My point was that we couldn't find it in the
>> origin/staging/v2.6.36 branch... and that the branch lags behind of what
>> can be seen via the git web interface...
>>
>> B.R.
>> Matti
> 
> I'd suggest - if that's not too much trouble - that you'd clone the tree
> using http (from http://linuxtv.org/git/media_tree.git) and then checked
> out the 36 branch and see that it works for you and then post the
> command you used and then I'll admit what I did wrong - if necessary:-)

You should try to avoid using http method for clone/fetch. It depends on some 
files that are created by running "git update-server-info". There's a script to
run it automatically after each push. Yet, the better is to use git.

I've just ran it right now. Maybe this solved the issue.

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
m7aalton Aug. 12, 2010, 9:45 a.m. UTC | #15
On Wed, 2010-08-11 at 15:16 +0200, ext Mauro Carvalho Chehab wrote:
> Em 11-08-2010 08:44, Matti J. Aaltonen escreveu:
> > Hi again.
> > 
> > On Wed, 2010-08-11 at 14:34 +0300, Matti J. Aaltonen wrote:
> >> Hello.
> >>
> >> On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
> >>>> Hi.
> >>>>
> >>>> I cloned your tree at 	http://linuxtv.org/git/media_tree.git and checked
> >>>> out the origin/staging/v2.6.37 branch and the
> >>>> Documentation/video4linux/v4l2-controls.txt  just isn't there. I asked
> >>>> one of my colleagues to do the same and the result was also the same.
> >>>
> >>> The file is in the v2.6.36 branch. It hasn't been merged yet in the
> >>> v2.6.37 branch.
> >>
> >> 37 above was a typo, sorry. My point was that we couldn't find it in the
> >> origin/staging/v2.6.36 branch... and that the branch lags behind of what
> >> can be seen via the git web interface...
> >>
> >> B.R.
> >> Matti
> > 
> > I'd suggest - if that's not too much trouble - that you'd clone the tree
> > using http (from http://linuxtv.org/git/media_tree.git) and then checked
> > out the 36 branch and see that it works for you and then post the
> > command you used and then I'll admit what I did wrong - if necessary:-)
> 
> You should try to avoid using http method for clone/fetch. It depends on some 
> files that are created by running "git update-server-info". There's a script to
> run it automatically after each push. Yet, the better is to use git.

I guess I didn't emphasize my point enough... I would avoid using http
if it wasn't the only protocol I can use to access your site... And if
you have serious problems with it I think it would be fair to mention
that on your git web page...

Anyway, I tried it again just a moment ago and got:

......

got f08c0c2dab44348919ec296254c3cc39d34e9f85
walk a63ecd835f075b21d7d5cef9580447f5fbb36263
error: Unable to find 4648030cc15d5a0ab19505774abe2a042c7d9ee3 under
http://linuxtv.org/git/media_tree.git
Cannot obtain needed tree 4648030cc15d5a0ab19505774abe2a042c7d9ee3
while processing commit a63ecd835f075b21d7d5cef9580447f5fbb36263.
fatal: Fetch failed.


Cheers,
Matti
















> 
> I've just ran it right now. Maybe this solved the issue.
> 
> Cheers,
> Mauro
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Hans Verkuil Aug. 12, 2010, 10:29 a.m. UTC | #16
> On Wed, 2010-08-11 at 15:16 +0200, ext Mauro Carvalho Chehab wrote:
>> Em 11-08-2010 08:44, Matti J. Aaltonen escreveu:
>> > Hi again.
>> >
>> > On Wed, 2010-08-11 at 14:34 +0300, Matti J. Aaltonen wrote:
>> >> Hello.
>> >>
>> >> On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
>> >>>> Hi.
>> >>>>
>> >>>> I cloned your tree at 	http://linuxtv.org/git/media_tree.git and
>> checked
>> >>>> out the origin/staging/v2.6.37 branch and the
>> >>>> Documentation/video4linux/v4l2-controls.txt  just isn't there. I
>> asked
>> >>>> one of my colleagues to do the same and the result was also the
>> same.
>> >>>
>> >>> The file is in the v2.6.36 branch. It hasn't been merged yet in the
>> >>> v2.6.37 branch.
>> >>
>> >> 37 above was a typo, sorry. My point was that we couldn't find it in
>> the
>> >> origin/staging/v2.6.36 branch... and that the branch lags behind of
>> what
>> >> can be seen via the git web interface...
>> >>
>> >> B.R.
>> >> Matti
>> >
>> > I'd suggest - if that's not too much trouble - that you'd clone the
>> tree
>> > using http (from http://linuxtv.org/git/media_tree.git) and then
>> checked
>> > out the 36 branch and see that it works for you and then post the
>> > command you used and then I'll admit what I did wrong - if
>> necessary:-)
>>
>> You should try to avoid using http method for clone/fetch. It depends on
>> some
>> files that are created by running "git update-server-info". There's a
>> script to
>> run it automatically after each push. Yet, the better is to use git.
>
> I guess I didn't emphasize my point enough... I would avoid using http
> if it wasn't the only protocol I can use to access your site... And if
> you have serious problems with it I think it would be fair to mention
> that on your git web page...

FYI: the control framework has been merged into the mainline, so you can
get it from there as well.

Regards,

        Hans
  
m7aalton Aug. 12, 2010, 10:34 a.m. UTC | #17
On Thu, 2010-08-12 at 12:29 +0200, ext Hans Verkuil wrote:
> > On Wed, 2010-08-11 at 15:16 +0200, ext Mauro Carvalho Chehab wrote:
> >> Em 11-08-2010 08:44, Matti J. Aaltonen escreveu:
> >> > Hi again.
> >> >
> >> > On Wed, 2010-08-11 at 14:34 +0300, Matti J. Aaltonen wrote:
> >> >> Hello.
> >> >>
> >> >> On Wed, 2010-08-11 at 12:56 +0200, ext Hans Verkuil wrote:
> >> >>>> Hi.
> >> >>>>
> >> >>>> I cloned your tree at 	http://linuxtv.org/git/media_tree.git and
> >> checked
> >> >>>> out the origin/staging/v2.6.37 branch and the
> >> >>>> Documentation/video4linux/v4l2-controls.txt  just isn't there. I
> >> asked
> >> >>>> one of my colleagues to do the same and the result was also the
> >> same.
> >> >>>
> >> >>> The file is in the v2.6.36 branch. It hasn't been merged yet in the
> >> >>> v2.6.37 branch.
> >> >>
> >> >> 37 above was a typo, sorry. My point was that we couldn't find it in
> >> the
> >> >> origin/staging/v2.6.36 branch... and that the branch lags behind of
> >> what
> >> >> can be seen via the git web interface...
> >> >>
> >> >> B.R.
> >> >> Matti
> >> >
> >> > I'd suggest - if that's not too much trouble - that you'd clone the
> >> tree
> >> > using http (from http://linuxtv.org/git/media_tree.git) and then
> >> checked
> >> > out the 36 branch and see that it works for you and then post the
> >> > command you used and then I'll admit what I did wrong - if
> >> necessary:-)
> >>
> >> You should try to avoid using http method for clone/fetch. It depends on
> >> some
> >> files that are created by running "git update-server-info". There's a
> >> script to
> >> run it automatically after each push. Yet, the better is to use git.
> >
> > I guess I didn't emphasize my point enough... I would avoid using http
> > if it wasn't the only protocol I can use to access your site... And if
> > you have serious problems with it I think it would be fair to mention
> > that on your git web page...
> 
> FYI: the control framework has been merged into the mainline, so you can
> get it from there as well.

OK, good, the mainline tree can be cloned over http...

Thanks,
Matti

> 
> Regards,
> 
>         Hans
> 


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

Patch

diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index cd1f21d..41b1bb2 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -351,6 +351,12 @@  const char **v4l2_ctrl_get_menu(u32 id)
 		"75 useconds",
 		NULL,
 	};
+	static const char *fm_band[] = {
+		"87.5 - 108. MHz",
+		"76. - 90. MHz, Japan",
+		"65. - 74. MHz, OIRT",
+		NULL,
+	};
 
 	switch (id) {
 		case V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ:
@@ -391,6 +397,8 @@  const char **v4l2_ctrl_get_menu(u32 id)
 			return colorfx;
 		case V4L2_CID_TUNE_PREEMPHASIS:
 			return tune_preemphasis;
+		case V4L2_CID_FM_BAND:
+			return fm_band;
 		default:
 			return NULL;
 	}
@@ -515,6 +523,8 @@  const char *v4l2_ctrl_get_name(u32 id)
 	case V4L2_CID_TUNE_PREEMPHASIS:	return "Pre-emphasis settings";
 	case V4L2_CID_TUNE_POWER_LEVEL:		return "Tune Power Level";
 	case V4L2_CID_TUNE_ANTENNA_CAPACITOR:	return "Tune Antenna Capacitor";
+	case V4L2_CID_FM_RX_CLASS:		return "FM Radio Tuner Controls";
+	case V4L2_CID_FM_BAND:			return "FM Band";
 
 	default:
 		return NULL;
@@ -580,6 +590,7 @@  int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
 	case V4L2_CID_EXPOSURE_AUTO:
 	case V4L2_CID_COLORFX:
 	case V4L2_CID_TUNE_PREEMPHASIS:
+	case V4L2_CID_FM_BAND:
 		qctrl->type = V4L2_CTRL_TYPE_MENU;
 		step = 1;
 		break;
@@ -591,6 +602,7 @@  int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
 	case V4L2_CID_CAMERA_CLASS:
 	case V4L2_CID_MPEG_CLASS:
 	case V4L2_CID_FM_TX_CLASS:
+	case V4L2_CID_FM_RX_CLASS:
 		qctrl->type = V4L2_CTRL_TYPE_CTRL_CLASS;
 		qctrl->flags |= V4L2_CTRL_FLAG_READ_ONLY;
 		min = max = step = def = 0;
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 418dacf..26522cb 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -935,6 +935,7 @@  struct v4l2_ext_controls {
 #define V4L2_CTRL_CLASS_MPEG 0x00990000	/* MPEG-compression controls */
 #define V4L2_CTRL_CLASS_CAMERA 0x009a0000	/* Camera class controls */
 #define V4L2_CTRL_CLASS_FM_TX 0x009b0000	/* FM Modulator control class */
+#define V4L2_CTRL_CLASS_FM_RX 0x009c0000	/* FM Tuner control class */
 
 #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
 #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
@@ -1313,6 +1314,17 @@  enum v4l2_preemphasis {
 #define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FM_TX_CLASS_BASE + 113)
 #define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FM_TX_CLASS_BASE + 114)
 
+/* FM Tuner class control IDs */
+#define V4L2_CID_FM_RX_CLASS_BASE		(V4L2_CTRL_CLASS_FM_RX | 0x900)
+#define V4L2_CID_FM_RX_CLASS			(V4L2_CTRL_CLASS_FM_RX | 1)
+
+#define V4L2_CID_FM_BAND			(V4L2_CID_FM_RX_CLASS_BASE + 1)
+enum v4l2_fm_band {
+	V4L2_FM_BAND_OTHER		= 0,
+	V4L2_FM_BAND_JAPAN		= 1,
+	V4L2_FM_BAND_OIRT		= 2
+};
+
 /*
  *	T U N I N G
  */
@@ -1377,7 +1389,8 @@  struct v4l2_hw_freq_seek {
 	enum v4l2_tuner_type  type;
 	__u32		      seek_upward;
 	__u32		      wrap_around;
-	__u32		      reserved[8];
+	__u32		      spacing;
+	__u32		      reserved[7];
 };
 
 /*