[PATCH 5/5] dvbv5-zap: Copy satellite parameters before tuning dvbv5-scan: Likewise

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

 



Copy satellite parameters to the frontend params. Since an LNB can be specified in
the channel/tuning file, set it correctly as well.

Signed-off-by: Guy Martin <gmsoft@xxxxxxxxxxxx>

diff --git a/utils/dvb/dvbv5-scan.c b/utils/dvb/dvbv5-scan.c
index 9a29b34..fa236fc 100644
--- a/utils/dvb/dvbv5-scan.c
+++ b/utils/dvb/dvbv5-scan.c
@@ -436,6 +436,20 @@ static int run_scan(struct arguments *args,
 			}
 		}
 
+		/* Copy sat parameters */
+		if (dvb_fe_is_satellite(parms->current_sys)) {
+			parms->pol = entry->pol;
+			/* If an LNB is specified for this entry, parse it */
+			if (entry->lnb) {
+				int lnb = dvb_sat_search_lnb(entry->lnb);
+				if (lnb == -1) {
+					PERROR("unknown LNB %s\n", entry->lnb);
+					return -1;
+				}
+				parms->lnb = dvb_sat_get_lnb(lnb);
+			}
+		}
+
 		/*
 		 * If the channel file has duplicated frequencies, or some
 		 * entries without any frequency at all, discard.
diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c
index c84cf70..3d8ac8c 100644
--- a/utils/dvb/dvbv5-zap.c
+++ b/utils/dvb/dvbv5-zap.c
@@ -237,6 +237,20 @@ static int parse(struct arguments *args,
 		}
 	}
 
+	/* Copy sat parameters */
+	if (dvb_fe_is_satellite(parms->current_sys)) {
+		parms->pol = entry->pol;
+		/* If an LNB is specified for this entry, parse it */
+		if (entry->lnb) {
+			int lnb = dvb_sat_search_lnb(entry->lnb);
+			if (lnb == -1) {
+				PERROR("unknown LNB %s\n", entry->lnb);
+				return -1;
+			}
+			parms->lnb = dvb_sat_get_lnb(lnb);
+		}
+	}
+
 #if 0
 	/* HACK to test the write file function */
 	write_dvb_file("dvb_channels.conf", dvb_file);
-- 
1.8.1.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