From: hverkuil@xs4all.nl (Hans Verkuil)
Subject: [Linux-kernel-mentees] [PATCH v3 1/3] cec-follower: fix bugs for tuner emulation
Date: Mon, 30 Sep 2019 11:12:03 +0200 [thread overview]
Message-ID: <83499bfd-ba8e-f8ee-ecfe-a85fea03ac6d@xs4all.nl> (raw)
Message-ID: <20190930091203.vKCHmYU67RR8j_09rhSrpCEa2lhXwuv3z5skkA5usIA@z> (raw)
In-Reply-To: <20190930043017.474025-2-c0d1n61at3@gmail.com>
Hi Jiunn,
On 9/30/19 6:30 AM, Jiunn Chang wrote:
> Fix some typos for tuner emulation:
> - analog_tuner_init() store ana_freq in hex
> - analog_get_nearest_freq() temp variable check
The patch is fine, but this commit log is wrong.
"store ana_freq in hex" is meaningless. What you mean is "store ana_freq as multiples of 62.5 kHz"
and the second line gives the wrong function name and doesn't really explain the issue.
Regards,
Hans
>
> Signed-off-by: Jiunn Chang <c0d1n61at3 at gmail.com>
> ---
> utils/cec-follower/cec-tuner.cpp | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/utils/cec-follower/cec-tuner.cpp b/utils/cec-follower/cec-tuner.cpp
> index acc3fd00..2f6e3425 100644
> --- a/utils/cec-follower/cec-tuner.cpp
> +++ b/utils/cec-follower/cec-tuner.cpp
> @@ -92,13 +92,15 @@ static unsigned int analog_freqs_khz[3][9][NUM_ANALOG_FREQS] =
>
> void analog_tuner_init(struct cec_op_tuner_device_info *info)
> {
> + unsigned int freq_khz =
> + analog_freqs_khz[info->analog.ana_bcast_type][info->analog.bcast_system][0];
> +
> info->rec_flag = CEC_OP_REC_FLAG_NOT_USED;
> info->tuner_display_info = CEC_OP_TUNER_DISPLAY_INFO_ANALOGUE;
> info->is_analog = true;
> info->analog.ana_bcast_type = CEC_OP_ANA_BCAST_TYPE_CABLE;
> info->analog.bcast_system = CEC_OP_BCAST_SYSTEM_PAL_BG;
> - info->analog.ana_freq =
> - analog_freqs_khz[info->analog.ana_bcast_type][info->analog.bcast_system][0];
> + info->analog.ana_freq = (freq_khz * 10) / 625;
> }
>
> static unsigned int analog_get_nearest_freq(__u8 ana_bcast_type, __u8 ana_bcast_system,
> @@ -123,7 +125,7 @@ static bool analog_set_tuner_dev_info(struct node *node, struct cec_msg *msg)
> __u8 system;
>
> cec_ops_select_analogue_service(msg, &type, &freq, &system);
> - if (info->analog.ana_bcast_type < 3 && info->analog.bcast_system < 9) {
> + if (type < 3 && system < 9) {
> int freq_khz = (freq * 625) / 10;
> unsigned int nearest = analog_get_nearest_freq(type, system,
> freq_khz);
>
next prev parent reply other threads:[~2019-09-30 9:12 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-24 14:17 [Linux-kernel-mentees] [PATCH 0/2] cec-compliance: tuner control c0d1n61at3
2019-09-24 14:17 ` Jiunn Chang
2019-09-24 14:17 ` [Linux-kernel-mentees] [PATCH 1/2] cec-follower: add tuner step increment/decrement c0d1n61at3
2019-09-24 14:17 ` Jiunn Chang
2019-09-24 15:20 ` hverkuil
2019-09-24 15:20 ` Hans Verkuil
2019-09-24 14:17 ` [Linux-kernel-mentees] [PATCH 2/2] cec-compliance: add/refactor tuner control tests c0d1n61at3
2019-09-24 14:17 ` Jiunn Chang
2019-09-24 19:24 ` [Linux-kernel-mentees] [PATCH v2 0/2] cec-compliance: tuner control c0d1n61at3
2019-09-24 19:24 ` Jiunn Chang
2019-09-30 4:30 ` [Linux-kernel-mentees] [PATCH v3 0/3] " c0d1n61at3
2019-09-30 4:30 ` Jiunn Chang
2019-10-01 3:18 ` [Linux-kernel-mentees] [PATCH v4 " c0d1n61at3
2019-10-01 3:18 ` Jiunn Chang
2019-10-03 3:18 ` [Linux-kernel-mentees] [PATCH v5 0/2] " c0d1n61at3
2019-10-03 3:18 ` Jiunn Chang
2019-10-04 4:05 ` [Linux-kernel-mentees] [PATCH v6 0/1] " c0d1n61at3
2019-10-04 4:05 ` Jiunn Chang
2019-10-04 4:05 ` [Linux-kernel-mentees] [PATCH v6 1/1] Add test for new features in cec-follower c0d1n61at3
2019-10-04 4:05 ` Jiunn Chang
2019-10-03 3:18 ` [Linux-kernel-mentees] [PATCH v5 1/2] cec-follower: add tuner step increment/decrement c0d1n61at3
2019-10-03 3:18 ` Jiunn Chang
2019-10-03 3:18 ` [Linux-kernel-mentees] [PATCH v5 2/2] Add test for new features in cec-follower c0d1n61at3
2019-10-03 3:18 ` Jiunn Chang
2019-10-03 6:51 ` hverkuil
2019-10-03 6:51 ` Hans Verkuil
2019-10-01 3:18 ` [Linux-kernel-mentees] [PATCH v4 1/3] cec-follower: fix bugs for tuner emulation c0d1n61at3
2019-10-01 3:18 ` Jiunn Chang
2019-10-01 3:18 ` [Linux-kernel-mentees] [PATCH v4 2/3] cec-follower: add tuner step increment/decrement c0d1n61at3
2019-10-01 3:18 ` Jiunn Chang
2019-10-01 7:12 ` hverkuil
2019-10-01 7:12 ` Hans Verkuil
2019-10-01 3:18 ` [Linux-kernel-mentees] [PATCH v4 3/3] cec-compliance: add tuner control test c0d1n61at3
2019-10-01 3:18 ` Jiunn Chang
2019-10-01 7:51 ` hverkuil
2019-10-01 7:51 ` Hans Verkuil
2019-09-30 4:30 ` [Linux-kernel-mentees] [PATCH v3 1/3] cec-follower: fix bugs for tuner emulation c0d1n61at3
2019-09-30 4:30 ` Jiunn Chang
2019-09-30 9:12 ` hverkuil [this message]
2019-09-30 9:12 ` Hans Verkuil
2019-09-30 4:30 ` [Linux-kernel-mentees] [PATCH v3 2/3] cec-follower: add tuner step increment/decrement c0d1n61at3
2019-09-30 4:30 ` Jiunn Chang
2019-09-30 9:35 ` hverkuil
2019-09-30 9:35 ` Hans Verkuil
2019-09-30 4:30 ` [Linux-kernel-mentees] [PATCH v3 3/3] cec-compliance: refactor tuner control tests c0d1n61at3
2019-09-30 4:30 ` Jiunn Chang
2019-09-30 9:43 ` hverkuil
2019-09-30 9:43 ` Hans Verkuil
2019-09-24 19:24 ` [Linux-kernel-mentees] [PATCH v2 1/2] cec-follower: add tuner step increment/decrement c0d1n61at3
2019-09-24 19:24 ` Jiunn Chang
2019-09-24 19:31 ` skhan
2019-09-24 19:31 ` Shuah Khan
2019-09-25 6:54 ` hverkuil
2019-09-25 6:54 ` Hans Verkuil
2019-09-25 7:12 ` hverkuil
2019-09-25 7:12 ` Hans Verkuil
2019-09-24 19:24 ` [Linux-kernel-mentees] [PATCH v2 2/2] cec-compliance: add/refactor tuner control tests c0d1n61at3
2019-09-24 19:24 ` Jiunn Chang
2019-09-24 19:44 ` skhan
2019-09-24 19:44 ` Shuah Khan
2019-09-25 7:22 ` hverkuil
2019-09-25 7:22 ` Hans Verkuil
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=83499bfd-ba8e-f8ee-ecfe-a85fea03ac6d@xs4all.nl \
--to=hverkuil@xs4all.nl \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).