From: Mauro Carvalho Chehab <m.chehab@samsung.com>
To: Georgi Chorbadzhiyski <gf@unixsol.org>
Cc: linux-media@vger.kernel.org
Subject: Re: FE_READ_SNR and FE_READ_SIGNAL_STRENGTH docs
Date: Tue, 14 Jan 2014 13:30:44 -0200 [thread overview]
Message-ID: <20140114133044.1d5276f4@samsung.com> (raw)
In-Reply-To: <52D554BA.3070906@unixsol.org>
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?
Btw, the better is to use the new statistics API, when it is
available:
http://linuxtv.org/downloads/v4l-dvb-apis/FE_GET_SET_PROPERTY.html#frontend-stat-properties
As it properly specifies the scale of each value.
If you're working in userspace, the libdvbv5 has functions that use
the new API automatically when the DVBv5 statistics are available on
a DVB driver, via dvb_fe_retrieve_stats():
http://git.linuxtv.org/v4l-utils.git/blob/HEAD:/lib/include/dvb-fe.h
--
Cheers,
Mauro
next prev parent reply other threads:[~2014-01-14 15:30 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 [this message]
2014-01-14 15:55 ` Georgi Chorbadzhiyski
2014-01-14 16:07 ` Mauro Carvalho Chehab
2014-01-16 15:07 ` Georgi Chorbadzhiyski
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=20140114133044.1d5276f4@samsung.com \
--to=m.chehab@samsung.com \
--cc=gf@unixsol.org \
--cc=linux-media@vger.kernel.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 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.