[v2,6/7] v4l-utils/libdvbv5: don't discard config-supplied parameters
Commit Message
From: Akihiro Tsukada <tskd08@gmail.com>
When an user enabled the option to update parameters with PSI,
the parameters that were supplied from config file and not mandatory
to the delivery system were discarded.
---
lib/libdvbv5/dvb-fe.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
Comments
Em Sun, 26 Oct 2014 20:46:22 +0900
tskd08@gmail.com escreveu:
> From: Akihiro Tsukada <tskd08@gmail.com>
>
> When an user enabled the option to update parameters with PSI,
> the parameters that were supplied from config file and not mandatory
> to the delivery system were discarded.
Sorry, but I was unable to understand what you're meaning.
> ---
> lib/libdvbv5/dvb-fe.c | 14 +++++---------
> 1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
> index 05f7d03..52af4e4 100644
> --- a/lib/libdvbv5/dvb-fe.c
> +++ b/lib/libdvbv5/dvb-fe.c
> @@ -575,6 +575,7 @@ int dvb_fe_get_parms(struct dvb_v5_fe_parms *p)
> int i, n = 0;
> const unsigned int *sys_props;
> struct dtv_properties prop;
> + struct dtv_property fe_prop[DTV_MAX_COMMAND];
> struct dvb_frontend_parameters v3_parms;
> uint32_t bw;
>
> @@ -583,19 +584,14 @@ int dvb_fe_get_parms(struct dvb_v5_fe_parms *p)
> return EINVAL;
>
> while (sys_props[n]) {
> - parms->dvb_prop[n].cmd = sys_props[n];
> + fe_prop[n].cmd = sys_props[n];
> n++;
> }
> - parms->dvb_prop[n].cmd = DTV_DELIVERY_SYSTEM;
> - parms->dvb_prop[n].u.data = parms->p.current_sys;
> + fe_prop[n].cmd = DTV_DELIVERY_SYSTEM;
> + fe_prop[n].u.data = parms->p.current_sys;
> n++;
>
> - /* Keep it ready for set */
> - parms->dvb_prop[n].cmd = DTV_TUNE;
> - parms->n_props = n;
> -
> - struct dtv_property fe_prop[DTV_MAX_COMMAND];
> - n = dvb_copy_fe_props(parms->dvb_prop, n, fe_prop);
> + n = dvb_copy_fe_props(fe_prop, n, fe_prop);
Huh? this looks weird.
>
> prop.props = fe_prop;
> prop.num = n;
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
I withdrew this patch as it's meaningless.
Originally I mis-understood that when dvbv5-scan was run
with "-G" option, the props in channel config file that
are not specified in dvb-v5-std.c::sys_foo_props[] were
once loaded to "parms" structure to be scanned,
but later discarded in dvb_fe_get_parms()
(without experiments/tests :P ).
I noticed that there's no effect in this patch by experiments,
and non "sys_foo_props[]"-defined props are discarded at
its read in the first place.
sorry to have bothered you with the meaningless patch.
maybe it was because I had a cold recently;)
--
Akihiro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Em Sat, 01 Nov 2014 00:24:46 +0900
Akihiro TSUKADA <tskd08@gmail.com> escreveu:
> I withdrew this patch as it's meaningless.
>
> Originally I mis-understood that when dvbv5-scan was run
> with "-G" option, the props in channel config file that
> are not specified in dvb-v5-std.c::sys_foo_props[] were
> once loaded to "parms" structure to be scanned,
> but later discarded in dvb_fe_get_parms()
> (without experiments/tests :P ).
>
> I noticed that there's no effect in this patch by experiments,
> and non "sys_foo_props[]"-defined props are discarded at
> its read in the first place.
> sorry to have bothered you with the meaningless patch.
> maybe it was because I had a cold recently;)
No problem :)
Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -575,6 +575,7 @@ int dvb_fe_get_parms(struct dvb_v5_fe_parms *p)
int i, n = 0;
const unsigned int *sys_props;
struct dtv_properties prop;
+ struct dtv_property fe_prop[DTV_MAX_COMMAND];
struct dvb_frontend_parameters v3_parms;
uint32_t bw;
@@ -583,19 +584,14 @@ int dvb_fe_get_parms(struct dvb_v5_fe_parms *p)
return EINVAL;
while (sys_props[n]) {
- parms->dvb_prop[n].cmd = sys_props[n];
+ fe_prop[n].cmd = sys_props[n];
n++;
}
- parms->dvb_prop[n].cmd = DTV_DELIVERY_SYSTEM;
- parms->dvb_prop[n].u.data = parms->p.current_sys;
+ fe_prop[n].cmd = DTV_DELIVERY_SYSTEM;
+ fe_prop[n].u.data = parms->p.current_sys;
n++;
- /* Keep it ready for set */
- parms->dvb_prop[n].cmd = DTV_TUNE;
- parms->n_props = n;
-
- struct dtv_property fe_prop[DTV_MAX_COMMAND];
- n = dvb_copy_fe_props(parms->dvb_prop, n, fe_prop);
+ n = dvb_copy_fe_props(fe_prop, n, fe_prop);
prop.props = fe_prop;
prop.num = n;