[PATCH 1/2] Tuning fixed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: André Roth <neolynx@xxxxxxxxx>
---
 lib/libdvbv5/dvb-fe.c |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/lib/libdvbv5/dvb-fe.c b/lib/libdvbv5/dvb-fe.c
index ba7bdf0..9d0866e 100644
--- a/lib/libdvbv5/dvb-fe.c
+++ b/lib/libdvbv5/dvb-fe.c
@@ -503,11 +503,11 @@ int dvb_fe_store_parm(struct dvb_v5_fe_parms *parms,
 
 int dvb_copy_fe_props(struct dtv_property *from, int n, struct dtv_property *to)
 {
-  int i, j;
-  for (i = 0, j = 0; i < n; i++)
-    if (from[i].cmd < DTV_USER_COMMAND_START)
-      to[j++] = from[i];
-  return j;
+	int i, j;
+	for (i = 0, j = 0; i < n; i++)
+		if (from[i].cmd < DTV_USER_COMMAND_START)
+			to[j++] = from[i];
+	return j;
 }
 
 int dvb_fe_get_parms(struct dvb_v5_fe_parms *parms)
@@ -529,6 +529,7 @@ int dvb_fe_get_parms(struct dvb_v5_fe_parms *parms)
 	parms->dvb_prop[n].cmd = DTV_DELIVERY_SYSTEM;
 	parms->dvb_prop[n].u.data = parms->current_sys;
 	n++;
+
 	/* Keep it ready for set */
 	parms->dvb_prop[n].cmd = DTV_TUNE;
 	parms->n_props = n;
@@ -604,17 +605,19 @@ int dvb_fe_set_parms(struct dvb_v5_fe_parms *parms)
 	uint32_t bw;
 
 	struct dtv_property fe_prop[DTV_MAX_COMMAND];
-	int n = dvb_copy_fe_props(parms->dvb_prop, parms->n_props, fe_prop);
-
-	prop.props = fe_prop;
-	prop.num = n + 1;
-	parms->dvb_prop[parms->n_props].cmd = DTV_TUNE;
 
 	if (is_satellite(parms->current_sys)) {
 		dvb_fe_retrieve_parm(parms, DTV_FREQUENCY, &freq);
 		dvb_sat_set_parms(parms);
 	}
 
+	int n = dvb_copy_fe_props(parms->dvb_prop, parms->n_props, fe_prop);
+
+	prop.props = fe_prop;
+	prop.num = n;
+	prop.props[prop.num].cmd = DTV_TUNE;
+	prop.num++;
+
 	if (!parms->legacy_fe) {
 		if (ioctl(parms->fd, FE_SET_PROPERTY, &prop) == -1) {
 			dvb_perror("FE_SET_PROPERTY");
-- 
1.7.2.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux