All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, Hans de Goede <hdegoede@redhat.com>,
	halli manjunatha <hallimanju@gmail.com>,
	Hans Verkuil <hans.verkuil@cisco.com>
Subject: Re: [RFCv2 PATCH 4/6] videodev2.h: add frequency band information.
Date: Mon, 18 Jun 2012 21:47:11 -0300	[thread overview]
Message-ID: <4FDFCC0F.9000208@redhat.com> (raw)
In-Reply-To: <005651489cd5c9f832df2d5d90e19e2eee07c9b9.1338201853.git.hans.verkuil@cisco.com>

Em 28-05-2012 07:46, Hans Verkuil escreveu:
> From: Hans Verkuil <hans.verkuil@cisco.com>
> 
> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
> Acked-by: Hans de Goede <hdegoede@redhat.com>
> ---
>   include/linux/videodev2.h |   19 +++++++++++++++++--
>   1 file changed, 17 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 2339678..013ee46 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -2023,7 +2023,8 @@ struct v4l2_tuner {
>   	__u32			audmode;
>   	__s32			signal;
>   	__s32			afc;
> -	__u32			reserved[4];
> +	__u32			band;
> +	__u32			reserved[3];
>   };
>   
>   struct v4l2_modulator {
> @@ -2033,7 +2034,8 @@ struct v4l2_modulator {
>   	__u32			rangelow;
>   	__u32			rangehigh;
>   	__u32			txsubchans;
> -	__u32			reserved[4];
> +	__u32			band;
> +	__u32			reserved[3];
>   };
>   
>   /*  Flags for the 'capability' field */
> @@ -2048,6 +2050,11 @@ struct v4l2_modulator {
>   #define V4L2_TUNER_CAP_RDS		0x0080
>   #define V4L2_TUNER_CAP_RDS_BLOCK_IO	0x0100
>   #define V4L2_TUNER_CAP_RDS_CONTROLS	0x0200
> +#define V4L2_TUNER_CAP_BAND_FM_EUROPE_US     0x00010000
> +#define V4L2_TUNER_CAP_BAND_FM_JAPAN         0x00020000
> +#define V4L2_TUNER_CAP_BAND_FM_RUSSIAN       0x00040000
> +#define V4L2_TUNER_CAP_BAND_FM_WEATHER       0x00080000
> +#define V4L2_TUNER_CAP_BAND_AM_MW            0x00100000

Frequency band is already specified by rangelow/rangehigh.

Why do you need to duplicate this information?


>   
>   /*  Flags for the 'rxsubchans' field */
>   #define V4L2_TUNER_SUB_MONO		0x0001
> @@ -2065,6 +2072,14 @@ struct v4l2_modulator {
>   #define V4L2_TUNER_MODE_LANG1		0x0003
>   #define V4L2_TUNER_MODE_LANG1_LANG2	0x0004
>   
> +/*  Values for the 'band' field */
> +#define V4L2_TUNER_BAND_DEFAULT       0

What does "default" mean?

> +#define V4L2_TUNER_BAND_FM_EUROPE_US  1       /* 87.5 Mhz - 108 MHz */

EUROPE_US is a bad name for this range. According with Wikipedia, this
range is used at "ITU region 1" (Europe/Africa), while America uses 
ITU region 2 (88-108).

In Brazil, the range from 87.5-88 were added several years ago, so it is
currently at the "ITU region 1" range, just like in US.

I don't doubt that there are still some places at the 88-108 MHz range.

> +#define V4L2_TUNER_BAND_FM_JAPAN      2       /* 76 MHz - 90 MHz */

This is currently true, but wikipedia points that they may increase it 
(from 76MHz to 108MHz?) after the end of NTSC broadcast.

The DTV range there starts at channel 14 (473 MHz and upper). Maybe they
may reserve the channel 7-13 range (VHF High - starting at 177 MHz) like
Brazil for DTV. 

Anyway, what I mean is that calling a frequency range with a Country name
is dangerous, as frequency ranges can vary from time to time.

> +#define V4L2_TUNER_BAND_FM_RUSSIAN    3       /* 65.8 MHz - 74 MHz */

AFAIKT, this is wrong. The range used there is 65.8-104MHz.

It used to be 65.8 to 100 MHz.

Also, other ex-soviet countries are still using such range.

> +#define V4L2_TUNER_BAND_FM_WEATHER    4       /* 162.4 MHz - 162.55 MHz */
> +#define V4L2_TUNER_BAND_AM_MW         5
> +
>   struct v4l2_frequency {
>   	__u32		      tuner;
>   	__u32		      type;	/* enum v4l2_tuner_type */
> 

Regards,
Mauro

  reply	other threads:[~2012-06-19  0:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-28 10:46 [RFCv2 PATCH 0/5] Add hwseek caps and frequency bands Hans Verkuil
2012-05-28 10:46 ` [RFCv2 PATCH 1/6] videodev2.h: add new hwseek capability bits Hans Verkuil
2012-05-28 10:46   ` [RFCv2 PATCH 2/6] v4l2 spec: document the new v4l2_tuner capabilities Hans Verkuil
2012-05-28 10:46   ` [RFCv2 PATCH 3/6] S_HW_FREQ_SEEK: set capability flags and return ENODATA instead of EAGAIN Hans Verkuil
2012-05-28 10:46   ` [RFCv2 PATCH 4/6] videodev2.h: add frequency band information Hans Verkuil
2012-06-19  0:47     ` Mauro Carvalho Chehab [this message]
2012-06-19  8:27       ` Hans de Goede
2012-06-19 11:09         ` Mauro Carvalho Chehab
2012-06-19 12:36           ` Hans de Goede
2012-06-19 13:31             ` halli manjunatha
2012-06-19 15:41               ` Mauro Carvalho Chehab
2012-06-19 16:25                 ` halli manjunatha
2012-06-19 14:14             ` Mauro Carvalho Chehab
2012-06-19 16:47               ` Hans de Goede
2012-06-19 17:33                 ` Hans de Goede
2012-06-19 17:43                   ` halli manjunatha
2012-06-19 19:19                     ` Hans de Goede
2012-06-19 18:23                   ` Hans Verkuil
2012-06-22 14:07               ` Hans Verkuil
2012-06-22 16:15                 ` Mauro Carvalho Chehab
2012-06-23  6:41                   ` Hans de Goede
2012-05-28 10:46   ` [RFCv2 PATCH 5/6] V4L2 spec: add frequency band documentation Hans Verkuil
2012-05-28 10:46   ` [RFCv2 PATCH 6/6] V4L2 spec: clarify a few modulator issues Hans Verkuil
2012-05-28 11:20 ` [RFCv2 PATCH 0/5] Add hwseek caps and frequency bands Hans de Goede
2012-05-28 11:58   ` Hans Verkuil
2012-05-29  8:21     ` Hans de Goede

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=4FDFCC0F.9000208@redhat.com \
    --to=mchehab@redhat.com \
    --cc=hallimanju@gmail.com \
    --cc=hans.verkuil@cisco.com \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-media@vger.kernel.org \
    /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.