All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: linux-media@vger.kernel.org, hverkuil@xs4all.nl,
	eduardo.valentin@nokia.com
Subject: Re: [PATCH v9 1/4] V4L2: Add seek spacing and FM RX class.
Date: Wed, 08 Sep 2010 15:35:46 -0300	[thread overview]
Message-ID: <4C87D782.4030604@redhat.com> (raw)
In-Reply-To: <1283168302-19111-2-git-send-email-matti.j.aaltonen@nokia.com>

Em 30-08-2010 08:38, Matti J. Aaltonen escreveu:
> Add spacing field to v4l2_hw_freq_seek, add V4L2_CAP_RAW_RDS_ONLY
> to driver capabilities and also add FM RX class to control classes.
> 
> Signed-off-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
> ---
>  drivers/media/video/v4l2-ctrls.c |   12 ++++++++++++
>  include/linux/videodev2.h        |   16 +++++++++++++++-
>  2 files changed, 27 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
> index ea8d32c..15749f1 100644
> --- a/drivers/media/video/v4l2-ctrls.c
> +++ b/drivers/media/video/v4l2-ctrls.c
> @@ -216,6 +216,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:
> @@ -256,6 +262,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;
>  	}
> @@ -386,6 +394,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";


There's no need for a FM control, as there's already an ioctl pair that allows get/set the frequency
bandwidth: VIDIOC_S_TUNER and VIDIOC_G_TUNER. So, the entire patch here seems uneeded/unwanted.
>  
>  	default:
>  		return NULL;
> @@ -448,6 +458,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>  	case V4L2_CID_EXPOSURE_AUTO:
>  	case V4L2_CID_COLORFX:
>  	case V4L2_CID_TUNE_PREEMPHASIS:
> +	case V4L2_CID_FM_BAND:
>  		*type = V4L2_CTRL_TYPE_MENU;
>  		break;
>  	case V4L2_CID_RDS_TX_PS_NAME:
> @@ -458,6 +469,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>  	case V4L2_CID_CAMERA_CLASS:
>  	case V4L2_CID_MPEG_CLASS:
>  	case V4L2_CID_FM_TX_CLASS:
> +	case V4L2_CID_FM_RX_CLASS:
>  		*type = V4L2_CTRL_TYPE_CTRL_CLASS;
>  		/* You can neither read not write these */
>  		*flags |= V4L2_CTRL_FLAG_READ_ONLY | V4L2_CTRL_FLAG_WRITE_ONLY;
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 61490c6..7d6511e 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -244,6 +244,7 @@ struct v4l2_capability {
>  #define V4L2_CAP_VIDEO_OUTPUT_OVERLAY	0x00000200  /* Can do video output overlay */
>  #define V4L2_CAP_HW_FREQ_SEEK		0x00000400  /* Can do hardware frequency seek  */
>  #define V4L2_CAP_RDS_OUTPUT		0x00000800  /* Is an RDS encoder */
> +#define V4L2_CAP_RAW_RDS_ONLY		0x00001000  /* Does not interpret RDS data */
>  
>  #define V4L2_CAP_TUNER			0x00010000  /* has a tuner */
>  #define V4L2_CAP_AUDIO			0x00020000  /* has audio support */
> @@ -930,6 +931,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)
> @@ -1328,6 +1330,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
>   */
> @@ -1392,7 +1405,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];
>  };
>  
>  /*


  parent reply	other threads:[~2010-09-08 18:35 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-30 11:38 [PATCH v9 0/4] FM Radio driver Matti J. Aaltonen
2010-08-30 11:38 ` [PATCH v9 1/4] V4L2: Add seek spacing and FM RX class Matti J. Aaltonen
2010-08-30 11:38   ` [PATCH v9 2/4] MFD: WL1273 FM Radio: MFD driver for the FM radio Matti J. Aaltonen
2010-08-30 11:38     ` [PATCH v9 3/4] V4L2: WL1273 FM Radio: Controls " Matti J. Aaltonen
2010-08-30 11:38       ` [PATCH v9 4/4] Documentation: v4l: Add hw_seek spacing and FM_RX class Matti J. Aaltonen
2010-09-08 18:37         ` Mauro Carvalho Chehab
2010-09-08 19:09       ` [PATCH v9 3/4] V4L2: WL1273 FM Radio: Controls for the FM radio Mauro Carvalho Chehab
2010-09-15 11:36         ` Matti J. Aaltonen
2010-09-16  7:37         ` Matti J. Aaltonen
2010-09-08 18:49     ` [PATCH v9 2/4] MFD: WL1273 FM Radio: MFD driver " Mauro Carvalho Chehab
2010-09-08 18:35   ` Mauro Carvalho Chehab [this message]
2010-09-09  7:57     ` [PATCH v9 1/4] V4L2: Add seek spacing and FM RX class Matti J. Aaltonen
2010-09-15  9:54     ` Matti J. Aaltonen
2010-09-07 19:10 ` [PATCH v9 0/4] FM Radio driver Hans Verkuil
2010-09-11 12:10 ` Hans Verkuil
2010-09-13 10:50   ` Matti J. Aaltonen
2010-09-13 11:32     ` Hans Verkuil
2010-09-13 11:44       ` Matti J. Aaltonen
2010-09-13 11:51         ` Hans Verkuil
2010-09-13 11:59           ` Matti J. Aaltonen
2010-09-13 12:06             ` Hans Verkuil
2010-09-13 12:15               ` Matti J. Aaltonen
2010-09-13 12:23                 ` Hans Verkuil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C87D782.4030604@redhat.com \
    --to=mchehab@redhat.com \
    --cc=eduardo.valentin@nokia.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    --cc=matti.j.aaltonen@nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.