From patchwork Thu Jan 16 15:07:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georgi Chorbadzhiyski X-Patchwork-Id: 3499021 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2F533C02DC for ; Thu, 16 Jan 2014 15:07:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7459F200E1 for ; Thu, 16 Jan 2014 15:07:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 16AB02015E for ; Thu, 16 Jan 2014 15:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752763AbaAPPHQ (ORCPT ); Thu, 16 Jan 2014 10:07:16 -0500 Received: from ns.unixsol.org ([193.110.159.2]:60857 "EHLO ns.unixsol.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbaAPPHN (ORCPT ); Thu, 16 Jan 2014 10:07:13 -0500 Received: from [10.0.1.78] ([::ffff:10.0.1.78]) (AUTH: CRAM-MD5 gf, SSL: TLSv1/SSLv3,256bits,AES256-SHA) by ns.unixsol.org with ESMTPSA; Thu, 16 Jan 2014 17:07:12 +0200 id 000000000058023D.52D7F5A0.00006930 Message-ID: <52D7F59F.5050503@unixsol.org> Date: Thu, 16 Jan 2014 17:07:11 +0200 From: Georgi Chorbadzhiyski Organization: Unix Solutions Ltd. (http://unixsol.org/) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Mauro Carvalho Chehab CC: linux-media@vger.kernel.org Subject: Re: FE_READ_SNR and FE_READ_SIGNAL_STRENGTH docs References: <52D554BA.3070906@unixsol.org> <20140114133044.1d5276f4@samsung.com> <52D55DE7.4050309@unixsol.org> <20140114140715.5ed126ac@samsung.com> In-Reply-To: <20140114140715.5ed126ac@samsung.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Around 01/14/2014 06:07 PM, Mauro Carvalho Chehab scribbled: > Em Tue, 14 Jan 2014 17:55:19 +0200 > Georgi Chorbadzhiyski escreveu: >> Around 01/14/2014 05:30 PM, Mauro Carvalho Chehab scribbled: >>> Em Tue, 14 Jan 2014 17:16:10 +0200 >>> Georgi Chorbadzhiyski escreveu: >>> >>>> Hi guys, I'm confused the documentation on: >>>> >>>> http://linuxtv.org/downloads/v4l-dvb-apis/frontend_fcalls.html#FE_READ_SNR >>>> http://linuxtv.org/downloads/v4l-dvb-apis/frontend_fcalls.html#FE_READ_SIGNAL_STRENGTH >>>> >>>> states that these ioctls return int16_t values but frontend.h states: >>>> >>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/dvb/frontend.h >>>> >>>> #define FE_READ_SIGNAL_STRENGTH _IOR('o', 71, __u16) >>>> #define FE_READ_SNR _IOR('o', 72, __u16) >>>> >>>> So which one is true? >>> >>> Documentation is wrong. The returned values are unsigned. Would you mind send >>> us a patch fixing it? >> >> I would be happy to, but I can't find the repo that holds the documentation. > > It is in the Kernel tree, under Documentation/DocBook/media/dvb. The attached file contains the discussed documentation fixes. diff --git a/Documentation/DocBook/media/dvb/frontend.xml b/Documentation/DocBook/media/dvb/frontend.xml index 0d6e81b..8a6a6ff 100644 --- a/Documentation/DocBook/media/dvb/frontend.xml +++ b/Documentation/DocBook/media/dvb/frontend.xml @@ -744,7 +744,7 @@ typedef enum fe_hierarchy { -int ioctl(int fd, int request = FE_READ_SNR, int16_t +int ioctl(int fd, int request = FE_READ_SNR, uint16_t ⋆snr); @@ -766,7 +766,7 @@ typedef enum fe_hierarchy { -int16_t *snr +uint16_t *snr The signal-to-noise ratio is stored into *snr. @@ -791,7 +791,7 @@ typedef enum fe_hierarchy { int ioctl( int fd, int request = - FE_READ_SIGNAL_STRENGTH, int16_t ⋆strength); + FE_READ_SIGNAL_STRENGTH, uint16_t ⋆strength); @@ -814,7 +814,7 @@ typedef enum fe_hierarchy { -int16_t *strength +uint16_t *strength The signal strength value is stored into *strength.