Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] FE_READ_SNR and FE_READ_SIGNAL_STRENGTH docs

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.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>

authored by

Georgi Chorbadzhiyski and committed by
Mauro Carvalho Chehab
def62216 692a228e

+4 -4
+4 -4
Documentation/DocBook/media/dvb/frontend.xml
··· 744 744 </para> 745 745 <informaltable><tgroup cols="1"><tbody><row><entry 746 746 align="char"> 747 - <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, int16_t 747 + <para>int ioctl(int fd, int request = <link linkend="FE_READ_SNR">FE_READ_SNR</link>, uint16_t 748 748 &#x22C6;snr);</para> 749 749 </entry> 750 750 </row></tbody></tgroup></informaltable> ··· 766 766 </entry> 767 767 </row><row><entry 768 768 align="char"> 769 - <para>int16_t *snr</para> 769 + <para>uint16_t *snr</para> 770 770 </entry><entry 771 771 align="char"> 772 772 <para>The signal-to-noise ratio is stored into *snr.</para> ··· 791 791 <informaltable><tgroup cols="1"><tbody><row><entry 792 792 align="char"> 793 793 <para>int ioctl( int fd, int request = 794 - <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, int16_t &#x22C6;strength);</para> 794 + <link linkend="FE_READ_SIGNAL_STRENGTH">FE_READ_SIGNAL_STRENGTH</link>, uint16_t &#x22C6;strength);</para> 795 795 </entry> 796 796 </row></tbody></tgroup></informaltable> 797 797 ··· 814 814 </entry> 815 815 </row><row><entry 816 816 align="char"> 817 - <para>int16_t *strength</para> 817 + <para>uint16_t *strength</para> 818 818 </entry><entry 819 819 align="char"> 820 820 <para>The signal strength value is stored into *strength.</para>