public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: Antti Palosaari <crope@iki.fi>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH 15/17] v4l: add RF tuner channel bandwidth control
Date: Mon, 03 Feb 2014 10:08:55 +0100	[thread overview]
Message-ID: <52EF5CA7.9050303@xs4all.nl> (raw)
In-Reply-To: <1391264674-4395-16-git-send-email-crope@iki.fi>

Hi Antti,

On 02/01/2014 03:24 PM, Antti Palosaari wrote:
> Modern silicon RF tuners has one or more adjustable filters on
> signal path, in order to filter noise from desired radio channel.
> 
> Add channel bandwidth control to tell the driver which is radio
> channel width we want receive. Filters could be then adjusted by
> the driver or hardware, using RF frequency and channel bandwidth
> as a base of filter calculations.
> 
> On automatic mode (normal mode), bandwidth is calculated from sampling
> rate or tuning info got from userspace. That new control gives
> possibility to set manual mode and let user have more control for
> filters.
> 
> Cc: Hans Verkuil <hverkuil@xs4all.nl>
> Signed-off-by: Antti Palosaari <crope@iki.fi>
> ---
>  drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++
>  include/uapi/linux/v4l2-controls.h   | 2 ++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
> index d201f61..e44722b 100644
> --- a/drivers/media/v4l2-core/v4l2-ctrls.c
> +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
> @@ -865,6 +865,8 @@ const char *v4l2_ctrl_get_name(u32 id)
>  	case V4L2_CID_MIXER_GAIN:		return "Mixer Gain";
>  	case V4L2_CID_IF_GAIN_AUTO:		return "IF Gain, Auto";
>  	case V4L2_CID_IF_GAIN:			return "IF Gain";
> +	case V4L2_CID_BANDWIDTH_AUTO:		return "Channel Bandwidth, Auto";
> +	case V4L2_CID_BANDWIDTH:		return "Channel Bandwidth";
>  	default:
>  		return NULL;
>  	}
> @@ -917,6 +919,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>  	case V4L2_CID_LNA_GAIN_AUTO:
>  	case V4L2_CID_MIXER_GAIN_AUTO:
>  	case V4L2_CID_IF_GAIN_AUTO:
> +	case V4L2_CID_BANDWIDTH_AUTO:
>  		*type = V4L2_CTRL_TYPE_BOOLEAN;
>  		*min = 0;
>  		*max = *step = 1;
> @@ -1078,6 +1081,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
>  	case V4L2_CID_LNA_GAIN:
>  	case V4L2_CID_MIXER_GAIN:
>  	case V4L2_CID_IF_GAIN:
> +	case V4L2_CID_BANDWIDTH:

Booleans never have the slider flag set (they are represented as a checkbox, so a slider
makes no sense).

>  		*flags |= V4L2_CTRL_FLAG_SLIDER;
>  		break;
>  	case V4L2_CID_PAN_RELATIVE:
> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
> index 076fa34..3cf68a6 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -905,5 +905,7 @@ enum v4l2_deemphasis {
>  #define V4L2_CID_MIXER_GAIN			(V4L2_CID_RF_TUNER_CLASS_BASE + 4)
>  #define V4L2_CID_IF_GAIN_AUTO			(V4L2_CID_RF_TUNER_CLASS_BASE + 5)
>  #define V4L2_CID_IF_GAIN			(V4L2_CID_RF_TUNER_CLASS_BASE + 6)
> +#define V4L2_CID_BANDWIDTH_AUTO			(V4L2_CID_RF_TUNER_CLASS_BASE + 7)
> +#define V4L2_CID_BANDWIDTH			(V4L2_CID_RF_TUNER_CLASS_BASE + 8)
>  
>  #endif
> 

  reply	other threads:[~2014-02-03  9:09 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-01 14:24 [PATCH 00/17] SDR API - controls, stream formats Antti Palosaari
2014-02-01 14:24 ` [PATCH 01/17] e4000: add manual gain controls Antti Palosaari
2014-02-01 19:43   ` Mauro Carvalho Chehab
2014-02-01 20:15     ` Antti Palosaari
2014-02-01 14:24 ` [PATCH 02/17] rtl2832_sdr: expose E4000 gain controls to user space Antti Palosaari
2014-02-01 14:24 ` [PATCH 03/17] r820t: add manual gain controls Antti Palosaari
2014-02-01 14:24 ` [PATCH 04/17] rtl2832_sdr: expose R820 gain controls to user space Antti Palosaari
2014-02-01 14:24 ` [PATCH 05/17] e4000: fix PLL calc to allow higher frequencies Antti Palosaari
2014-02-01 14:24 ` [PATCH 06/17] msi3101: fix device caps to advertise SDR receiver Antti Palosaari
2014-02-01 14:24 ` [PATCH 07/17] rtl2832_sdr: " Antti Palosaari
2014-02-01 14:24 ` [PATCH 08/17] msi3101: add default FMT and ADC frequency Antti Palosaari
2014-02-01 14:24 ` [PATCH 09/17] msi3101: sleep USB ADC and tuner when streaming is stopped Antti Palosaari
2014-02-01 14:24 ` [PATCH 10/17] DocBook: document RF tuner gain controls Antti Palosaari
2014-02-01 14:24 ` [PATCH 11/17] DocBook: V4L: add V4L2_SDR_FMT_CU8 - 'CU08' Antti Palosaari
2014-02-01 14:24 ` [PATCH 12/17] DocBook: V4L: add V4L2_SDR_FMT_CU16LE - 'CU16' Antti Palosaari
2014-02-01 14:24 ` [PATCH 13/17] DocBook: media: document V4L2_CTRL_CLASS_RF_TUNER Antti Palosaari
2014-02-01 14:24 ` [PATCH 14/17] xc2028: silence compiler warnings Antti Palosaari
2014-02-01 14:24 ` [PATCH 15/17] v4l: add RF tuner channel bandwidth control Antti Palosaari
2014-02-03  9:08   ` Hans Verkuil [this message]
2014-02-03  9:11     ` Hans Verkuil
2014-02-03 10:17       ` Antti Palosaari
2014-02-03 10:13     ` Antti Palosaari
2014-02-03 10:24       ` Hans Verkuil
2014-02-01 14:24 ` [PATCH 16/17] msi3101: implement tuner " Antti Palosaari
2014-02-01 14:24 ` [PATCH 17/17] rtl2832_sdr: " Antti Palosaari

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=52EF5CA7.9050303@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --cc=crope@iki.fi \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox