From: Georgi Chorbadzhiyski <gf@unixsol.org>
To: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: linux-media@vger.kernel.org
Subject: Re: FE_READ_SNR and FE_READ_SIGNAL_STRENGTH docs
Date: Thu, 16 Jan 2014 17:07:11 +0200 [thread overview]
Message-ID: <52D7F59F.5050503@unixsol.org> (raw)
In-Reply-To: <20140114140715.5ed126ac@samsung.com>
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
Around 01/14/2014 06:07 PM, Mauro Carvalho Chehab scribbled:
> Em Tue, 14 Jan 2014 17:55:19 +0200
> Georgi Chorbadzhiyski <gf@unixsol.org> escreveu:
>> Around 01/14/2014 05:30 PM, Mauro Carvalho Chehab scribbled:
>>> Em Tue, 14 Jan 2014 17:16:10 +0200
>>> Georgi Chorbadzhiyski <gf@unixsol.org> 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.
--
Georgi Chorbadzhiyski | http://georgi.unixsol.org/ | http://github.com/gfto/
[-- Attachment #2: 0001-doc-Fix-FE_READ_SNR-and-FE_READ_SIGNAL_STRENGTH-para.patch --]
[-- Type: text/plain, Size: 2015 bytes --]
>From 2a633a125e616e8a9e701c34f088d7a4cc020ff8 Mon Sep 17 00:00:00 2001
From: Georgi Chorbadzhiyski <gf@unixsol.org>
Date: Thu, 16 Jan 2014 17:04:55 +0200
Subject: [PATCH] doc: Fix FE_READ_SNR and FE_READ_SIGNAL_STRENGTH parameter
types.
The proper types returned from FE_READ_SNR and FE_READ_SIGNAL_STRENGTH
are uint16_t not int16_t.
---
Documentation/DocBook/media/dvb/frontend.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
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 {
</para>
<informaltable><tgroup cols="1"><tbody><row><entry
align="char">
-<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t
+<para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, uint16_t
⋆snr);</para>
</entry>
</row></tbody></tgroup></informaltable>
@@ -766,7 +766,7 @@ typedef enum fe_hierarchy {
</entry>
</row><row><entry
align="char">
-<para>int16_t *snr</para>
+<para>uint16_t *snr</para>
</entry><entry
align="char">
<para>The signal-to-noise ratio is stored into *snr.</para>
@@ -791,7 +791,7 @@ typedef enum fe_hierarchy {
<informaltable><tgroup cols="1"><tbody><row><entry
align="char">
<para>int ioctl( int fd, int request =
- <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t ⋆strength);</para>
+ <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, uint16_t ⋆strength);</para>
</entry>
</row></tbody></tgroup></informaltable>
@@ -814,7 +814,7 @@ typedef enum fe_hierarchy {
</entry>
</row><row><entry
align="char">
-<para>int16_t *strength</para>
+<para>uint16_t *strength</para>
</entry><entry
align="char">
<para>The signal strength value is stored into *strength.</para>
--
1.8.4
prev parent reply other threads:[~2014-01-16 15:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 15:16 FE_READ_SNR and FE_READ_SIGNAL_STRENGTH docs Georgi Chorbadzhiyski
2014-01-14 15:30 ` Mauro Carvalho Chehab
2014-01-14 15:55 ` Georgi Chorbadzhiyski
2014-01-14 16:07 ` Mauro Carvalho Chehab
2014-01-16 15:07 ` Georgi Chorbadzhiyski [this message]
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=52D7F59F.5050503@unixsol.org \
--to=gf@unixsol.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
/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.