From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Thierry Lelegard <thierry.lelegard@free.fr>
Cc: thierry@lelegard.fr, linux-media@vger.kernel.org
Subject: Re: LinuxTV V3 vs. V4 API doc inconsistency, V4 probably wrong
Date: Mon, 19 Jun 2017 14:08:06 -0300 [thread overview]
Message-ID: <20170619140806.7e92ae66@vento.lan> (raw)
In-Reply-To: <3188f2a2bcba758dccaaa8cdbbd694fb@free.fr>
Em Mon, 19 Jun 2017 16:58:40 +0200
Thierry Lelegard <thierry.lelegard@free.fr> escreveu:
> Hi,
First of all, there's no Linux DVB API v4. It was skipped, because there
was a proposal for a v4, with was never adopted.
>
> There is an ambiguity in the LinuxTV documentation about the following
> ioctl's:
>
> FE_SET_TONE, FE_SET_VOLTAGE, FE_DISEQC_SEND_BURST.
>
> These ioctl's take an enum value as input. In the old V3 API, the
> parameter
> is passed by value. In the S2API documentation, it is passed by
> reference.
> Most sample programs (a bit old) use the "pass by value" method.
>
> V3 documentation: https://www.linuxtv.org/docs/dvbapi/dvbapi.html
> int ioctl(int fd, int request = FE_SET_TONE, fe_sec_tone_mode_t
> tone);
> int ioctl(int fd, int request = FE_SET_VOLTAGE, fe_sec_voltage_t
> voltage);
> int ioctl(int fd, int request = FE_DISEQC_SEND_BURST,
> fe_sec_mini_cmd_t burst);
>
> S2API documentation:
> https://www.linuxtv.org/downloads/v4l-dvb-apis-new/uapi/dvb/frontend_fcalls.html
> int ioctl(int fd, FE_SET_TONE, enum fe_sec_tone_mode *tone)
> int ioctl(int fd, FE_SET_VOLTAGE, enum fe_sec_voltage *voltage)
> int ioctl(int fd, FE_DISEQC_SEND_BURST, enum fe_sec_mini_cmd *tone)
Thanks for reviewing it! Yeah, the asterisks there are wrong.
The definitions should be, instead:
int ioctl(int fd, FE_SET_TONE, enum fe_sec_tone_mode tone)
int ioctl(int fd, FE_SET_VOLTAGE, enum fe_sec_voltage voltage)
int ioctl(int fd, FE_DISEQC_SEND_BURST, enum fe_sec_mini_cmd tone)
As they're passing by value, not by reference[1].
Feel free to send us fix patches.
Thanks,
Mauro
next prev parent reply other threads:[~2017-06-19 17:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-19 14:58 LinuxTV V3 vs. V4 API doc inconsistency, V4 probably wrong Thierry Lelegard
2017-06-19 17:08 ` Mauro Carvalho Chehab [this message]
2017-06-21 7:34 ` Thierry Lelegard
2017-06-21 9:51 ` Mauro Carvalho Chehab
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=20170619140806.7e92ae66@vento.lan \
--to=mchehab@s-opensource.com \
--cc=linux-media@vger.kernel.org \
--cc=thierry.lelegard@free.fr \
--cc=thierry@lelegard.fr \
/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.