diff mbox

[v2,1/7] v4l2: video device: Add V4L2_CTRL_CLASS_FMTX controls

Message ID 1242034309-13448-2-git-send-email-eduardo.valentin@nokia.com (mailing list archive)
State Superseded
Headers show

Commit Message

Eduardo Valentin May 11, 2009, 9:31 a.m. UTC
This patch adds a new class of extended controls. This class
is intended to support Radio Modulators properties such as:
rds, audio limiters, audio compression, pilot tone generation,
tuning power levels and region related properties.

Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
---
 include/linux/videodev2.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

Comments

Mauro Carvalho Chehab May 12, 2009, 2:12 a.m. UTC | #1
Em Mon, 11 May 2009 12:31:43 +0300
Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:

> This patch adds a new class of extended controls. This class
> is intended to support Radio Modulators properties such as:
> rds, audio limiters, audio compression, pilot tone generation,
> tuning power levels and region related properties.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>

Eduardo,

Please provide us a patch also for V4L2 API for the new API controls you're
adding. I'll hold the analysis of the patch series until you provide us the
docs. So, there's no need to resubmit the entire patch series.

The V4L2 API is maintained together with the mercurial development tree, at:
	http://linuxtv.org/hg/v4l-dvb/

under v4l2-spec/ directory.

Cheers,
Mauro.

> ---
>  include/linux/videodev2.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 45 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index ebb2ea6..7559299 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio Modulator class controls */
>  
>  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
>  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> @@ -1141,6 +1142,50 @@ enum  v4l2_exposure_auto_type {
>  
>  #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
>  
> +/* FM Radio Modulator class control IDs */
> +#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
> +#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
> +
> +#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
> +#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
> +#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
> +#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
> +#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
> +
> +#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 6)
> +#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
> +#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE + 8)
> +
> +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE + 9)
> +#define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
> +#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
> +#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE + 12)
> +#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 13)
> +
> +#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
> +#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE + 15)
> +#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 16)
> +
> +#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
> +enum v4l2_fmtx_region {
> +	V4L2_FMTX_REGION_USA			= 0,
> +	V4L2_FMTX_REGION_AUSTRALIA		= 1,
> +	V4L2_FMTX_REGION_EUROPE			= 2,
> +	V4L2_FMTX_REGION_JAPAN			= 3,
> +	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
> +};
> +#define V4L2_CID_REGION_BOTTOM_FREQUENCY	(V4L2_CID_FMTX_CLASS_BASE + 18)
> +#define V4L2_CID_REGION_TOP_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 19)
> +#define V4L2_CID_REGION_PREEMPHASIS		(V4L2_CID_FMTX_CLASS_BASE + 20)
> +enum v4l2_fmtx_preemphasis {
> +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> +};
> +#define V4L2_CID_REGION_CHANNEL_SPACING		(V4L2_CID_FMTX_CLASS_BASE + 21)
> +#define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FMTX_CLASS_BASE + 22)
> +#define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FMTX_CLASS_BASE + 23)
> +
>  /*
>   *	T U N I N G
>   */




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 May 12, 2009, 2:17 a.m. UTC | #2
Em Mon, 11 May 2009 12:31:43 +0300
Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:

> This patch adds a new class of extended controls. This class
> is intended to support Radio Modulators properties such as:
> rds, audio limiters, audio compression, pilot tone generation,
> tuning power levels and region related properties.
> 
> Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> ---
>  include/linux/videodev2.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 45 insertions(+), 0 deletions(-)
> 
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index ebb2ea6..7559299 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio Modulator class controls */
>  
>  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
>  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> @@ -1141,6 +1142,50 @@ enum  v4l2_exposure_auto_type {
>  
>  #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
>  
> +/* FM Radio Modulator class control IDs */
> +#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
> +#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
> +
> +#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
> +#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
> +#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
> +#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
> +#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
> +
> +#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 6)
> +#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
> +#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE + 8)
> +
> +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE + 9)
> +#define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
> +#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
> +#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE + 12)
> +#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 13)
> +
> +#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
> +#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE + 15)
> +#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 16)
> +
> +#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
> +enum v4l2_fmtx_region {
> +	V4L2_FMTX_REGION_USA			= 0,
> +	V4L2_FMTX_REGION_AUSTRALIA		= 1,
> +	V4L2_FMTX_REGION_EUROPE			= 2,
> +	V4L2_FMTX_REGION_JAPAN			= 3,
> +	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
> +};

Hmm... the region is not just a derived parameter, based on
preemphasis/frequencies, and channel stepping? What this parameter controls?

> +#define V4L2_CID_REGION_BOTTOM_FREQUENCY	(V4L2_CID_FMTX_CLASS_BASE + 18)
> +#define V4L2_CID_REGION_TOP_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 19)
> +#define V4L2_CID_REGION_PREEMPHASIS		(V4L2_CID_FMTX_CLASS_BASE + 20)
> +enum v4l2_fmtx_preemphasis {
> +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> +};
> +#define V4L2_CID_REGION_CHANNEL_SPACING		(V4L2_CID_FMTX_CLASS_BASE + 21)
> +#define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FMTX_CLASS_BASE + 22)
> +#define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FMTX_CLASS_BASE + 23)
> +
>  /*
>   *	T U N I N G
>   */




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
ext-eero.nurkkala@nokia.com May 12, 2009, 4:49 a.m. UTC | #3
On Mon, 2009-05-11 at 11:31 +0200, Valentin Eduardo (Nokia-D/Helsinki) wrote:
> +enum v4l2_fmtx_preemphasis {
> +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> +};

Hello there,

Would it make more sense to make:
"V4L2_FMTX_PREEMPHASIS_DISABLED" as "zero" (false). In my opinion,
that would be more clear.

- Eero

--
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
Eduardo Valentin May 12, 2009, 6:05 a.m. UTC | #4
Hi Eero,

On Tue, May 12, 2009 at 06:49:25AM +0200, Nurkkala Eero.An (EXT-Offcode/Oulu) wrote:
> On Mon, 2009-05-11 at 11:31 +0200, Valentin Eduardo (Nokia-D/Helsinki) wrote:
> > +enum v4l2_fmtx_preemphasis {
> > +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> > +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> > +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> > +};
> 
> Hello there,
> 
> Would it make more sense to make:
> "V4L2_FMTX_PREEMPHASIS_DISABLED" as "zero" (false). In my opinion,
> that would be more clear.

Indeed,

Something like:

enum v4l2_fmtx_preemphasis {
	V4L2_FMTX_PREEMPHASIS_DISABLED		= 0,
	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
	V4L2_FMTX_PREEMPHASIS_75_uS		= 2,
};

looks better?


> 
> - Eero
Eduardo Valentin May 12, 2009, 6:10 a.m. UTC | #5
On Tue, May 12, 2009 at 04:17:03AM +0200, ext Mauro Carvalho Chehab wrote:
> Em Mon, 11 May 2009 12:31:43 +0300
> Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:
> 
> > This patch adds a new class of extended controls. This class
> > is intended to support Radio Modulators properties such as:
> > rds, audio limiters, audio compression, pilot tone generation,
> > tuning power levels and region related properties.
> > 
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> > ---
> >  include/linux/videodev2.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 45 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > index ebb2ea6..7559299 100644
> > --- a/include/linux/videodev2.h
> > +++ b/include/linux/videodev2.h
> > @@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio Modulator class controls */
> >  
> >  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
> >  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> > @@ -1141,6 +1142,50 @@ enum  v4l2_exposure_auto_type {
> >  
> >  #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
> >  
> > +/* FM Radio Modulator class control IDs */
> > +#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
> > +#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
> > +
> > +#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
> > +#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
> > +#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
> > +#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
> > +#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
> > +
> > +#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 6)
> > +#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
> > +#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE + 8)
> > +
> > +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE + 9)
> > +#define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
> > +#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
> > +#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE + 12)
> > +#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 13)
> > +
> > +#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
> > +#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE + 15)
> > +#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 16)
> > +
> > +#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
> > +enum v4l2_fmtx_region {
> > +	V4L2_FMTX_REGION_USA			= 0,
> > +	V4L2_FMTX_REGION_AUSTRALIA		= 1,
> > +	V4L2_FMTX_REGION_EUROPE			= 2,
> > +	V4L2_FMTX_REGION_JAPAN			= 3,
> > +	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
> > +};
> 
> Hmm... the region is not just a derived parameter, based on
> preemphasis/frequencies, and channel stepping? What this parameter controls?

Hi Mauro, I thought in the opposite way. The other parameters are derived
from the region parameter. So, you just set the region, then it will affect
the frequency range, channel stepping and preemphasis.

However, there was some resistance to have this inside kernel
(in previous discussion). One suggested to use database in user land
(or similar thing). In that case, driver(s) would
report its constraints based on device values, not in region settings.
But, this patch set is proposing to have it inside the kernel as you can see.

I'd like to hear more opinions though.

> 
> > +#define V4L2_CID_REGION_BOTTOM_FREQUENCY	(V4L2_CID_FMTX_CLASS_BASE + 18)
> > +#define V4L2_CID_REGION_TOP_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 19)
> > +#define V4L2_CID_REGION_PREEMPHASIS		(V4L2_CID_FMTX_CLASS_BASE + 20)
> > +enum v4l2_fmtx_preemphasis {
> > +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> > +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> > +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> > +};
> > +#define V4L2_CID_REGION_CHANNEL_SPACING		(V4L2_CID_FMTX_CLASS_BASE + 21)
> > +#define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FMTX_CLASS_BASE + 22)
> > +#define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FMTX_CLASS_BASE + 23)
> > +
> >  /*
> >   *	T U N I N G
> >   */
> 
> 
> 
> 
> Cheers,
> Mauro
Eduardo Valentin May 12, 2009, 6:12 a.m. UTC | #6
Hi Mauro,

On Tue, May 12, 2009 at 04:12:31AM +0200, ext Mauro Carvalho Chehab wrote:
> Em Mon, 11 May 2009 12:31:43 +0300
> Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:
> 
> > This patch adds a new class of extended controls. This class
> > is intended to support Radio Modulators properties such as:
> > rds, audio limiters, audio compression, pilot tone generation,
> > tuning power levels and region related properties.
> > 
> > Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> 
> Eduardo,
> 
> Please provide us a patch also for V4L2 API for the new API controls you're
> adding. I'll hold the analysis of the patch series until you provide us the
> docs. So, there's no need to resubmit the entire patch series.
> 
> The V4L2 API is maintained together with the mercurial development tree, at:
> 	http://linuxtv.org/hg/v4l-dvb/

Right. That's something I was looking for. Thanks for the directions. I'll
submit the docs then.

> 
> under v4l2-spec/ directory.
> 
> Cheers,
> Mauro.
> 
> > ---
> >  include/linux/videodev2.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 45 insertions(+), 0 deletions(-)
> > 
> > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > index ebb2ea6..7559299 100644
> > --- a/include/linux/videodev2.h
> > +++ b/include/linux/videodev2.h
> > @@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio Modulator class controls */
> >  
> >  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
> >  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> > @@ -1141,6 +1142,50 @@ enum  v4l2_exposure_auto_type {
> >  
> >  #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
> >  
> > +/* FM Radio Modulator class control IDs */
> > +#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
> > +#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
> > +
> > +#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
> > +#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
> > +#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
> > +#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
> > +#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
> > +
> > +#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 6)
> > +#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
> > +#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE + 8)
> > +
> > +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE + 9)
> > +#define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
> > +#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
> > +#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE + 12)
> > +#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 13)
> > +
> > +#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
> > +#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE + 15)
> > +#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 16)
> > +
> > +#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
> > +enum v4l2_fmtx_region {
> > +	V4L2_FMTX_REGION_USA			= 0,
> > +	V4L2_FMTX_REGION_AUSTRALIA		= 1,
> > +	V4L2_FMTX_REGION_EUROPE			= 2,
> > +	V4L2_FMTX_REGION_JAPAN			= 3,
> > +	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
> > +};
> > +#define V4L2_CID_REGION_BOTTOM_FREQUENCY	(V4L2_CID_FMTX_CLASS_BASE + 18)
> > +#define V4L2_CID_REGION_TOP_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 19)
> > +#define V4L2_CID_REGION_PREEMPHASIS		(V4L2_CID_FMTX_CLASS_BASE + 20)
> > +enum v4l2_fmtx_preemphasis {
> > +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> > +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> > +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> > +};
> > +#define V4L2_CID_REGION_CHANNEL_SPACING		(V4L2_CID_FMTX_CLASS_BASE + 21)
> > +#define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FMTX_CLASS_BASE + 22)
> > +#define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FMTX_CLASS_BASE + 23)
> > +
> >  /*
> >   *	T U N I N G
> >   */
> 
> 
> 
> 
> Cheers,
> Mauro
Hans Verkuil May 12, 2009, 6:26 a.m. UTC | #7
On Tuesday 12 May 2009 08:10:43 Eduardo Valentin wrote:
> On Tue, May 12, 2009 at 04:17:03AM +0200, ext Mauro Carvalho Chehab wrote:
> > Em Mon, 11 May 2009 12:31:43 +0300
> >
> > Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:
> > > This patch adds a new class of extended controls. This class
> > > is intended to support Radio Modulators properties such as:
> > > rds, audio limiters, audio compression, pilot tone generation,
> > > tuning power levels and region related properties.
> > >
> > > Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> > > ---
> > >  include/linux/videodev2.h |   45
> > > +++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 45
> > > insertions(+), 0 deletions(-)
> > >
> > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > > index ebb2ea6..7559299 100644
> > > --- a/include/linux/videodev2.h
> > > +++ b/include/linux/videodev2.h
> > > @@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio
> > > Modulator class controls */
> > >
> > >  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
> > >  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> > > @@ -1141,6 +1142,50 @@ enum  v4l2_exposure_auto_type {
> > >
> > >  #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
> > >
> > > +/* FM Radio Modulator class control IDs */
> > > +#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
> > > +#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
> > > +
> > > +#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
> > > +#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
> > > +#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
> > > +#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
> > > +#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
> > > +
> > > +#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE +
> > > 6) +#define
> > > V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
> > > +#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE +
> > > 8) +
> > > +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE
> > > + 9) +#define
> > > V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
> > > +#define
> > > V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
> > > +#define
> > > V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE +
> > > 12) +#define
> > > V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE +
> > > 13) +
> > > +#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
> > > +#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE +
> > > 15) +#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE
> > > + 16) +
> > > +#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
> > > +enum v4l2_fmtx_region {
> > > +	V4L2_FMTX_REGION_USA			= 0,
> > > +	V4L2_FMTX_REGION_AUSTRALIA		= 1,
> > > +	V4L2_FMTX_REGION_EUROPE			= 2,
> > > +	V4L2_FMTX_REGION_JAPAN			= 3,
> > > +	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
> > > +};
> >
> > Hmm... the region is not just a derived parameter, based on
> > preemphasis/frequencies, and channel stepping? What this parameter
> > controls?
>
> Hi Mauro, I thought in the opposite way. The other parameters are derived
> from the region parameter. So, you just set the region, then it will
> affect the frequency range, channel stepping and preemphasis.
>
> However, there was some resistance to have this inside kernel
> (in previous discussion). One suggested to use database in user land
> (or similar thing). In that case, driver(s) would
> report its constraints based on device values, not in region settings.
> But, this patch set is proposing to have it inside the kernel as you can
> see.
>
> I'd like to hear more opinions though.

I'm opposed to having this in the kernel. This is something that can go into 
e.g. libv4l2util (in the v4l2-apps directory). If only because this is very 
much application dependent. Your code assumes a few regions, but I think it 
is much more common that applications will allow customers to select a 
country, so that means you need a mapping from country to region. And some 
countries may use a different range than you think (I doubt you know the 
frequency ranges for all the countries in the world!) and having a table 
for all countries in the kernel is simply not the right approach.

Also, such a table definitely does not belong with any particular driver, 
but should be common code.

The only reason why such a table might end up in the kernel is if there are 
legal requirements forcing strict control on what is allowed for an FM 
transmitter in each country, and in that case a similar mechanism as is 
used for wifi should be used. I know we discussed this earlier, but I've 
forgotten the exact name of that API.

Regards,

	Hans

>
> > > +#define V4L2_CID_REGION_BOTTOM_FREQUENCY	(V4L2_CID_FMTX_CLASS_BASE +
> > > 18) +#define V4L2_CID_REGION_TOP_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE
> > > + 19) +#define V4L2_CID_REGION_PREEMPHASIS		(V4L2_CID_FMTX_CLASS_BASE
> > > + 20) +enum v4l2_fmtx_preemphasis {
> > > +	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
> > > +	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
> > > +	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
> > > +};
> > > +#define V4L2_CID_REGION_CHANNEL_SPACING		(V4L2_CID_FMTX_CLASS_BASE +
> > > 21) +#define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FMTX_CLASS_BASE +
> > > 22) +#define
> > > V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FMTX_CLASS_BASE + 23) +
> > >  /*
> > >   *	T U N I N G
> > >   */
> >
> > Cheers,
> > Mauro
Mauro Carvalho Chehab May 12, 2009, 9:53 a.m. UTC | #8
Em Tue, 12 May 2009 09:10:43 +0300
Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:

> On Tue, May 12, 2009 at 04:17:03AM +0200, ext Mauro Carvalho Chehab wrote:
> > Em Mon, 11 May 2009 12:31:43 +0300
> > Eduardo Valentin <eduardo.valentin@nokia.com> escreveu:
> > 
> > > This patch adds a new class of extended controls. This class
> > > is intended to support Radio Modulators properties such as:
> > > rds, audio limiters, audio compression, pilot tone generation,
> > > tuning power levels and region related properties.
> > > 
> > > Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
> > > ---
> > >  include/linux/videodev2.h |   45 +++++++++++++++++++++++++++++++++++++++++++++
> > >  1 files changed, 45 insertions(+), 0 deletions(-)
> > > 
> > > diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> > > index ebb2ea6..7559299 100644
> > > --- a/include/linux/videodev2.h
> > > +++ b/include/linux/videodev2.h
> > > @@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio Modulator class controls */
> > >  
> > >  #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
> > >  #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
> > > @@ -1141,6 +1142,50 @@ enum  v4l2_exposure_auto_type {
> > >  
> > >  #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
> > >  
> > > +/* FM Radio Modulator class control IDs */
> > > +#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
> > > +#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
> > > +
> > > +#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
> > > +#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
> > > +#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
> > > +#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
> > > +#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
> > > +
> > > +#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 6)
> > > +#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
> > > +#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE + 8)
> > > +
> > > +#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE + 9)
> > > +#define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
> > > +#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
> > > +#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE + 12)
> > > +#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 13)
> > > +
> > > +#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
> > > +#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE + 15)
> > > +#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 16)
> > > +
> > > +#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
> > > +enum v4l2_fmtx_region {
> > > +	V4L2_FMTX_REGION_USA			= 0,
> > > +	V4L2_FMTX_REGION_AUSTRALIA		= 1,
> > > +	V4L2_FMTX_REGION_EUROPE			= 2,
> > > +	V4L2_FMTX_REGION_JAPAN			= 3,
> > > +	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
> > > +};
> > 
> > Hmm... the region is not just a derived parameter, based on
> > preemphasis/frequencies, and channel stepping? What this parameter controls?
> 
> Hi Mauro, I thought in the opposite way. The other parameters are derived
> from the region parameter. So, you just set the region, then it will affect
> the frequency range, channel stepping and preemphasis.
> 
> However, there was some resistance to have this inside kernel
> (in previous discussion). One suggested to use database in user land
> (or similar thing). In that case, driver(s) would
> report its constraints based on device values, not in region settings.
> But, this patch set is proposing to have it inside the kernel as you can see.

The point is that the region and the other parameters are interrelated. So,
you're specifying the same thing twice. In order to follow the V4L2 spirit,
where video standards aren't determined by a Country based table, but, instead,
by their technical differences, IMO, we should remove this. Also, I don't doubt
that some countries would come with new settings as they deploy some digital radio
broadcast standard.

> I'd like to hear more opinions though.

Yes, it would be nice to have more opinions about the API changes.

Cheers,
Mauro




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 May 12, 2009, 10:29 a.m. UTC | #9
Em Tue, 12 May 2009 08:26:40 +0200
Hans Verkuil <hverkuil@xs4all.nl> escreveu:

> The only reason why such a table might end up in the kernel is if there are 
> legal requirements forcing strict control on what is allowed for an FM 
> transmitter in each country, and in that case a similar mechanism as is 
> used for wifi should be used. I know we discussed this earlier, but I've 
> forgotten the exact name of that API.

If the usage of FM transmission is for very short range transmissions (for
example, to listen to a phone call inside your car stereo, or to listen to your
baby's room noises or to see him while you're in the kitchen), I doubt that
there are any legal requirements. Such usage is called by the regulatory
agencies as "secondary usage"[1]. The secondary usage for FM and for their
adjacent frequencies (the TV range) should allow such domestic usage [2]. In
general, the restriction for secondary usage is just the power level, to avoid
interferences with the primary usage. In general, the secondary usage for TV
and FM ranges are the same (and both ranges are adjacent).

On the other hand, for FM primary usage, e. g. a FM broadcaster, the
restriction is that you should transmit _ONLY_ at the authorized frequency, at
the specified maximum power (that may have a different max power during the day
or during the night), using strict shapes for frequency shift, and for
modulation levels. It also restricts the location of the FM station, and the
characteristics of the antenna beams. Such constraints require application,
infrastructure and hardware control that couldn't be done at kernel level.

So, I don't see how legal issues might affect this driver.

[1] Maybe the specific term may change from country to country, but the idea
remains the same, since this concept exists on ITU-R regulations.

[2] I'm not aware of any country that forbids the usage of FM/TV ranges for
domestic usage. Yet, if such country does exist, then the usage of this module
should be forbidden at such country, no matter what frequency you're
generating. So, again, it seems pointless to add such restriction in kernel.

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
Eduardo Valentin May 13, 2009, 5:55 a.m. UTC | #10
On Tue, May 12, 2009 at 12:29:54PM +0200, ext Mauro Carvalho Chehab wrote:
> Em Tue, 12 May 2009 08:26:40 +0200
> Hans Verkuil <hverkuil@xs4all.nl> escreveu:
> 
> > The only reason why such a table might end up in the kernel is if there are 
> > legal requirements forcing strict control on what is allowed for an FM 
> > transmitter in each country, and in that case a similar mechanism as is 
> > used for wifi should be used. I know we discussed this earlier, but I've 
> > forgotten the exact name of that API.
> 
> If the usage of FM transmission is for very short range transmissions (for
> example, to listen to a phone call inside your car stereo, or to listen to your
> baby's room noises or to see him while you're in the kitchen), I doubt that
> there are any legal requirements. Such usage is called by the regulatory
> agencies as "secondary usage"[1]. The secondary usage for FM and for their
> adjacent frequencies (the TV range) should allow such domestic usage [2]. In
> general, the restriction for secondary usage is just the power level, to avoid
> interferences with the primary usage. In general, the secondary usage for TV
> and FM ranges are the same (and both ranges are adjacent).
> 
> On the other hand, for FM primary usage, e. g. a FM broadcaster, the
> restriction is that you should transmit _ONLY_ at the authorized frequency, at
> the specified maximum power (that may have a different max power during the day
> or during the night), using strict shapes for frequency shift, and for
> modulation levels. It also restricts the location of the FM station, and the
> characteristics of the antenna beams. Such constraints require application,
> infrastructure and hardware control that couldn't be done at kernel level.
> 
> So, I don't see how legal issues might affect this driver.
> 
> [1] Maybe the specific term may change from country to country, but the idea
> remains the same, since this concept exists on ITU-R regulations.
> 
> [2] I'm not aware of any country that forbids the usage of FM/TV ranges for
> domestic usage. Yet, if such country does exist, then the usage of this module
> should be forbidden at such country, no matter what frequency you're
> generating. So, again, it seems pointless to add such restriction in kernel.

Right. I've to agree that there is no need to have those in kernel. Better
to leave this role to user land, if some legal requirement is needed then.
I'll resend the patches without the region settings. It will export only
the device limits. I believe that user land can, on top of that, handle
the channel spacing and frequency limits. Of course, leaving a way to set/get
the preemphasis will be kept. But not bound to a region setting anymore.

> 
> Cheers,
> Mauro

Cheers,
diff mbox

Patch

diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index ebb2ea6..7559299 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -803,6 +803,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_FMTX 0x009b0000	/* FM Radio Modulator class controls */
 
 #define V4L2_CTRL_ID_MASK      	  (0x0fffffff)
 #define V4L2_CTRL_ID2CLASS(id)    ((id) & 0x0fff0000UL)
@@ -1141,6 +1142,50 @@  enum  v4l2_exposure_auto_type {
 
 #define V4L2_CID_PRIVACY			(V4L2_CID_CAMERA_CLASS_BASE+16)
 
+/* FM Radio Modulator class control IDs */
+#define V4L2_CID_FMTX_CLASS_BASE		(V4L2_CTRL_CLASS_FMTX | 0x900)
+#define V4L2_CID_FMTX_CLASS			(V4L2_CTRL_CLASS_FMTX | 1)
+
+#define V4L2_CID_RDS_ENABLED			(V4L2_CID_FMTX_CLASS_BASE + 1)
+#define V4L2_CID_RDS_PI				(V4L2_CID_FMTX_CLASS_BASE + 2)
+#define V4L2_CID_RDS_PTY			(V4L2_CID_FMTX_CLASS_BASE + 3)
+#define V4L2_CID_RDS_PS_NAME			(V4L2_CID_FMTX_CLASS_BASE + 4)
+#define V4L2_CID_RDS_RADIO_TEXT			(V4L2_CID_FMTX_CLASS_BASE + 5)
+
+#define V4L2_CID_AUDIO_LIMITER_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 6)
+#define V4L2_CID_AUDIO_LIMITER_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 7)
+#define V4L2_CID_AUDIO_LIMITER_DEVIATION	(V4L2_CID_FMTX_CLASS_BASE + 8)
+
+#define V4L2_CID_AUDIO_COMPRESSION_ENABLED	(V4L2_CID_FMTX_CLASS_BASE + 9)
+#define V4L2_CID_AUDIO_COMPRESSION_GAIN		(V4L2_CID_FMTX_CLASS_BASE + 10)
+#define V4L2_CID_AUDIO_COMPRESSION_THRESHOLD	(V4L2_CID_FMTX_CLASS_BASE + 11)
+#define V4L2_CID_AUDIO_COMPRESSION_ATTACK_TIME	(V4L2_CID_FMTX_CLASS_BASE + 12)
+#define V4L2_CID_AUDIO_COMPRESSION_RELEASE_TIME	(V4L2_CID_FMTX_CLASS_BASE + 13)
+
+#define V4L2_CID_PILOT_TONE_ENABLED		(V4L2_CID_FMTX_CLASS_BASE + 14)
+#define V4L2_CID_PILOT_TONE_DEVIATION		(V4L2_CID_FMTX_CLASS_BASE + 15)
+#define V4L2_CID_PILOT_TONE_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 16)
+
+#define V4L2_CID_REGION				(V4L2_CID_FMTX_CLASS_BASE + 17)
+enum v4l2_fmtx_region {
+	V4L2_FMTX_REGION_USA			= 0,
+	V4L2_FMTX_REGION_AUSTRALIA		= 1,
+	V4L2_FMTX_REGION_EUROPE			= 2,
+	V4L2_FMTX_REGION_JAPAN			= 3,
+	V4L2_FMTX_REGION_JAPAN_WIDE_BAND	= 4,
+};
+#define V4L2_CID_REGION_BOTTOM_FREQUENCY	(V4L2_CID_FMTX_CLASS_BASE + 18)
+#define V4L2_CID_REGION_TOP_FREQUENCY		(V4L2_CID_FMTX_CLASS_BASE + 19)
+#define V4L2_CID_REGION_PREEMPHASIS		(V4L2_CID_FMTX_CLASS_BASE + 20)
+enum v4l2_fmtx_preemphasis {
+	V4L2_FMTX_PREEMPHASIS_75_uS		= 0,
+	V4L2_FMTX_PREEMPHASIS_50_uS		= 1,
+	V4L2_FMTX_PREEMPHASIS_DISABLED		= 2,
+};
+#define V4L2_CID_REGION_CHANNEL_SPACING		(V4L2_CID_FMTX_CLASS_BASE + 21)
+#define V4L2_CID_TUNE_POWER_LEVEL		(V4L2_CID_FMTX_CLASS_BASE + 22)
+#define V4L2_CID_TUNE_ANTENNA_CAPACITOR		(V4L2_CID_FMTX_CLASS_BASE + 23)
+
 /*
  *	T U N I N G
  */