From: Hans Verkuil <hverkuil@xs4all.nl>
To: manjunatha_halli@ti.com
Cc: mchehab@infradead.org, linux-kernel@vger.kernel.org,
linux-media@vger.kernel.org
Subject: Re: [PATCH v4 2/6] drivers:staging: ti-st: fmdrv_v4l2 sources
Date: Thu, 18 Nov 2010 08:49:07 +0100 [thread overview]
Message-ID: <201011180849.07405.hverkuil@xs4all.nl> (raw)
In-Reply-To: <1289913494-21590-3-git-send-email-manjunatha_halli@ti.com>
On Tuesday, November 16, 2010 14:18:10 manjunatha_halli@ti.com wrote:
> From: Manjunatha Halli <manjunatha_halli@ti.com>
>
> This module interfaces V4L2 subsystem and FM common
> module. It registers itself with V4L2 as Radio module.
>
> Signed-off-by: Manjunatha Halli <manjunatha_halli@ti.com>
> ---
> drivers/staging/ti-st/fmdrv_v4l2.c | 757 ++++++++++++++++++++++++++++++++++++
> drivers/staging/ti-st/fmdrv_v4l2.h | 32 ++
> 2 files changed, 789 insertions(+), 0 deletions(-)
> create mode 100644 drivers/staging/ti-st/fmdrv_v4l2.c
> create mode 100644 drivers/staging/ti-st/fmdrv_v4l2.h
>
> diff --git a/drivers/staging/ti-st/fmdrv_v4l2.c b/drivers/staging/ti-st/fmdrv_v4l2.c
> new file mode 100644
> index 0000000..687d10f
> --- /dev/null
> +++ b/drivers/staging/ti-st/fmdrv_v4l2.c
> @@ -0,0 +1,757 @@
> +/*
> + * FM Driver for Connectivity chip of Texas Instruments.
> + * This file provides interfaces to V4L2 subsystem.
> + *
> + * This module registers with V4L2 subsystem as Radio
> + * data system interface (/dev/radio). During the registration,
> + * it will expose two set of function pointers.
> + *
> + * 1) File operation related API (open, close, read, write, poll...etc).
> + * 2) Set of V4L2 IOCTL complaint API.
> + *
> + * Copyright (C) 2010 Texas Instruments
> + * Author: Raja Mani <raja_mani@ti.com>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + *
> + */
> +
> +#include "fmdrv.h"
> +#include "fmdrv_v4l2.h"
> +#include "fmdrv_common.h"
> +#include "fmdrv_rx.h"
> +#include "fmdrv_tx.h"
> +
> +static struct video_device *gradio_dev;
> +static unsigned char radio_disconnected;
> +
> +/* Query control */
> +static struct v4l2_queryctrl fmdrv_v4l2_queryctrl[] = {
> + {
> + .id = V4L2_CID_AUDIO_VOLUME,
> + .type = V4L2_CTRL_TYPE_INTEGER,
> + .name = "Volume",
> + .minimum = FM_RX_VOLUME_MIN,
> + .maximum = FM_RX_VOLUME_MAX,
> + .step = 1,
> + .default_value = FM_DEFAULT_RX_VOLUME,
> + },
> + {
> + .id = V4L2_CID_AUDIO_BALANCE,
> + .flags = V4L2_CTRL_FLAG_DISABLED,
> + },
> + {
> + .id = V4L2_CID_AUDIO_BASS,
> + .flags = V4L2_CTRL_FLAG_DISABLED,
> + },
> + {
> + .id = V4L2_CID_AUDIO_TREBLE,
> + .flags = V4L2_CTRL_FLAG_DISABLED,
> + },
> + {
> + .id = V4L2_CID_AUDIO_MUTE,
> + .type = V4L2_CTRL_TYPE_BOOLEAN,
> + .name = "Mute",
> + .minimum = 0,
> + .maximum = 2,
> + .step = 1,
> + .default_value = FM_MUTE_OFF,
> + },
> + {
> + .id = V4L2_CID_AUDIO_LOUDNESS,
> + .flags = V4L2_CTRL_FLAG_DISABLED,
> + },
> +};
Please use the control framework. See Documentation/video4linux/v4l2-controls.txt.
It's much easier to use and should be used for new drivers.
Regards,
Hans
--
Hans Verkuil - video4linux developer - sponsored by Cisco
next prev parent reply other threads:[~2010-11-18 7:49 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 13:18 [PATCH v4 0/6] FM V4L2 drivers for WL128x manjunatha_halli
2010-11-16 13:18 ` [PATCH v4 1/6] drivers:staging: ti-st: fmdrv common header file manjunatha_halli
2010-11-16 13:18 ` [PATCH v4 2/6] drivers:staging: ti-st: fmdrv_v4l2 sources manjunatha_halli
2010-11-16 13:18 ` [PATCH v4 3/6] drivers:staging: ti-st: fmdrv_common sources manjunatha_halli
2010-11-16 13:18 ` [PATCH v4 4/6] drivers:staging: ti-st: fmdrv_rx sources manjunatha_halli
2010-11-16 13:18 ` [PATCH v4 5/6] drivers:staging: ti-st: fmdrv_tx sources manjunatha_halli
2010-11-16 13:18 ` [PATCH v4 6/6] drivers:staging: ti-st: Kconfig & Makefile change manjunatha_halli
2010-11-18 8:34 ` [PATCH v4 4/6] drivers:staging: ti-st: fmdrv_rx sources Hans Verkuil
2010-11-18 8:19 ` [PATCH v4 3/6] drivers:staging: ti-st: fmdrv_common sources Hans Verkuil
2010-12-10 6:18 ` halli manjunatha
2010-11-17 1:24 ` [PATCH v4 2/6] drivers:staging: ti-st: fmdrv_v4l2 sources Figo.zhang
2010-11-18 7:49 ` Hans Verkuil [this message]
2010-11-18 7:44 ` [PATCH v4 1/6] drivers:staging: ti-st: fmdrv common header file Hans Verkuil
2010-11-17 13:02 ` [PATCH v4 0/6] FM V4L2 drivers for WL128x Ohad Ben-Cohen
2010-11-18 5:54 ` Pavan Savoy
2010-11-18 7:17 ` Hans Verkuil
2010-11-18 8:35 ` Ohad Ben-Cohen
2010-11-18 10:26 ` Savoy, Pavan
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=201011180849.07405.hverkuil@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=manjunatha_halli@ti.com \
--cc=mchehab@infradead.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;
as well as URLs for NNTP newsgroup(s).