From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Stefan Seyfried <stefan.seyfried@googlemail.com>
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: Re: [PATCH] v4l-utils: fix DVB-S scan
Date: Tue, 14 Dec 2021 13:06:30 +0100 [thread overview]
Message-ID: <20211214130630.3f43441c@coco.lan> (raw)
In-Reply-To: <cc3f28bd-ab2c-2ca7-c35f-9944e0e2853a@message-id.googlemail.com>
Em Wed, 10 Feb 2021 16:13:56 +0100
Stefan Seyfried <stefan.seyfried@googlemail.com> escreveu:
> Hi all,
>
> dvbv5-scan did report all channels as DVB-S2, due to broken logic.
> Debug output showed "modulation_system DVB-S" correctly, but the code
> that stores the delivery system for output used a different (IMO
> invalid) logic.
> This in turn made drivers that actually care for the delivery system
> (e.g. b2c2-flexcop-pci / cx24120) unhappy, resulting in incomplete scan
> results. For drivers that just don't care (e.g. dvb-usb-technisat-usb2 /
> stv6110x) it "just" resulted in wrong "DELIVERY_SYSTEM = DVBS2" for all
> channels in scan output.
>
> The patch is attached, because I'm pretty sure that Thunderbird would
> mess it up. You can also fetch it from
>
> https://github.com/seife/v4l-utils.git fix-dvbs-scan
>
> Best regards,
>
> Stefan
>
> --- a/lib/libdvbv5/dvb-scan.c
> +++ b/lib/libdvbv5/dvb-scan.c
> @@ -1118,9 +1118,12 @@ static void add_update_nit_dvbs
> dvbs_dvbc_dvbs_freq_inner[d->fec]);
> dvb_store_entry_prop(new, DTV_ROLLOFF,
> dvbs_rolloff[d->roll_off]);
> - if (d->roll_off != 0)
> + if (d->modulation_system != 0)
> dvb_store_entry_prop(new, DTV_DELIVERY_SYSTEM,
> SYS_DVBS2);
> + else
> + dvb_store_entry_prop(new, DTV_DELIVERY_SYSTEM,
> + SYS_DVBS);
This will likely break for DVBS2. What should be done here would
be to check if the returned parameters fit on DVB-S or DVB-S2.
So, it should be like:
if (d->modulation_system != QPSK || (d->roll_off && d->roll_off != ROLLOFF_35)
dvb_store_entry_prop(new, DTV_DELIVERY_SYSTEM,
SYS_DVBS2);
else
dvb_store_entry_prop(new, DTV_DELIVERY_SYSTEM,
SYS_DVBS);
Perhaps it should also test FEC as well, as some are only available
on DVB-S2.
Regards,
Mauro
Thanks,
Mauro
prev parent reply other threads:[~2021-12-14 12:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-10 15:13 [PATCH] v4l-utils: fix DVB-S scan Stefan Seyfried
2021-12-14 12:06 ` Mauro Carvalho Chehab [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=20211214130630.3f43441c@coco.lan \
--to=mchehab+huawei@kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=stefan.seyfried@googlemail.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.