From patchwork Mon May 24 12:21:40 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: m7aalton X-Patchwork-Id: 3478 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Mon, 24 May 2010 12:22:06 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.6) for (single-drop); Mon, 24 May 2010 09:27:04 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1OGWfW-0006rZ-M1; Mon, 24 May 2010 12:22:06 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757017Ab0EXMV7 (ORCPT + 1 other); Mon, 24 May 2010 08:21:59 -0400 Received: from smtp.nokia.com ([192.100.122.233]:47025 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757011Ab0EXMV5 (ORCPT ); Mon, 24 May 2010 08:21:57 -0400 Received: from vaebh105.NOE.Nokia.com (vaebh105.europe.nokia.com [10.160.244.31]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o4OCLnYL023856; Mon, 24 May 2010 15:21:54 +0300 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 24 May 2010 15:21:46 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 24 May 2010 15:21:46 +0300 Received: from localhost.localdomain (masi.nmp.nokia.com [172.22.211.19]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o4OCLidU009822; Mon, 24 May 2010 15:21:45 +0300 From: "Matti J. Aaltonen" To: linux-media@vger.kernel.org, hverkuil@xs4all.nl, eduardo.valentin@nokia.com Cc: "Matti J. Aaltonen" Subject: [PATCH v3 1/4] V4L2: Add features to the interface. Date: Mon, 24 May 2010 15:21:40 +0300 Message-Id: <1274703703-11670-2-git-send-email-matti.j.aaltonen@nokia.com> X-Mailer: git-send-email 1.6.1.3 In-Reply-To: <1274703703-11670-1-git-send-email-matti.j.aaltonen@nokia.com> References: <1274703703-11670-1-git-send-email-matti.j.aaltonen@nokia.com> X-OriginalArrivalTime: 24 May 2010 12:21:46.0067 (UTC) FILETIME=[AD2F2230:01CAFB3B] X-Nokia-AV: Clean Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add fields spacing, level_min, level_max and level to struct v4l2_hw_freq_seek. The level is used for determining which channels are considered receivable during HW scan. Add VIDIOC_G_HW_FREQ_SEEK to IOCTL codes. This is used for getting the minimum and maximum values for the level field in the v4l2_hw_freq_seek struct. Signed-off-by: Matti J. Aaltonen --- include/linux/videodev2.h | 6 +++++- include/media/v4l2-ioctl.h | 2 ++ 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 418dacf..7a81a9c 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -1377,7 +1377,11 @@ struct v4l2_hw_freq_seek { enum v4l2_tuner_type type; __u32 seek_upward; __u32 wrap_around; - __u32 reserved[8]; + __u32 spacing; + __s32 level_min; + __s32 level_max; + __s32 level; + __u32 reserved[4]; }; /* diff --git a/include/media/v4l2-ioctl.h b/include/media/v4l2-ioctl.h index e8ba0f2..828cf13 100644 --- a/include/media/v4l2-ioctl.h +++ b/include/media/v4l2-ioctl.h @@ -220,6 +220,8 @@ struct v4l2_ioctl_ops { /* Log status ioctl */ int (*vidioc_log_status) (struct file *file, void *fh); + int (*vidioc_g_hw_freq_seek) (struct file *file, void *fh, + struct v4l2_hw_freq_seek *a); int (*vidioc_s_hw_freq_seek) (struct file *file, void *fh, struct v4l2_hw_freq_seek *a);