diff mbox

[6/6] dvbv5-zap: Parse the LNB from the channel file

Message ID 0fa749428b7762956fd7e19fec6ea306f1d23eec.1371561676.git.gmsoft@tuxicoman.be (mailing list archive)
State New, archived
Headers show

Commit Message

Guy Martin June 18, 2013, 2:19 p.m. UTC
Parsing the LNB needs to be done for proper tuning.

Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
---
 utils/dvb/dvbv5-zap.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

André Roth July 2, 2013, 6:31 p.m. UTC | #1
Acked-by: André Roth <neolynx@gmail.com>

On Tue, 18 Jun 2013 16:19:09 +0200
Guy Martin <gmsoft@tuxicoman.be> wrote:

> Parsing the LNB needs to be done for proper tuning.
> 
> Signed-off-by: Guy Martin <gmsoft@tuxicoman.be>
> ---
>  utils/dvb/dvbv5-zap.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c
> index c84cf70..d6c1152 100644
> --- a/utils/dvb/dvbv5-zap.c
> +++ b/utils/dvb/dvbv5-zap.c
> @@ -165,6 +165,15 @@ static int parse(struct arguments *args,
>  		return -3;
>  	}
>  
> +	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 (entry->video_pid) {
>  		if (args->n_vpid < entry->video_pid_len)
>  			*vpid = entry->video_pid[args->n_vpid];
--
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
diff mbox

Patch

diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c
index c84cf70..d6c1152 100644
--- a/utils/dvb/dvbv5-zap.c
+++ b/utils/dvb/dvbv5-zap.c
@@ -165,6 +165,15 @@  static int parse(struct arguments *args,
 		return -3;
 	}
 
+	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 (entry->video_pid) {
 		if (args->n_vpid < entry->video_pid_len)
 			*vpid = entry->video_pid[args->n_vpid];