From patchwork Sun Oct 26 11:46:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiro TSUKADA X-Patchwork-Id: 5153861 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 738399F30B for ; Sun, 26 Oct 2014 11:47:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7865E20351 for ; Sun, 26 Oct 2014 11:47:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D2ACA2034A for ; Sun, 26 Oct 2014 11:47:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751610AbaJZLrg (ORCPT ); Sun, 26 Oct 2014 07:47:36 -0400 Received: from mail-pd0-f179.google.com ([209.85.192.179]:43648 "EHLO mail-pd0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751596AbaJZLrf (ORCPT ); Sun, 26 Oct 2014 07:47:35 -0400 Received: by mail-pd0-f179.google.com with SMTP id g10so3961331pdj.38 for ; Sun, 26 Oct 2014 04:47:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3S26mKluRPGFELAqsOgHSt/JfQ48sYQQOBbUD9q68b4=; b=NJqgCESMyvJem4U3ALruVl3WWGNIoy24CQvO7nSP6I08GlJJah0lwEJhdSrtXJVHNZ 3hLufnO73ARPejOaU/Ei52UaRSxS+XAH7BJik5EsNjjNKCMk3fWAOn+rytRviZIMDkFL AtRidmVqr3+gJtKyX2AosHQbUucsB/6Sm8ypuhFNmtksFqtT8CFLUjDYFTdwiQw/gYcz GiqLGSK73dUJHHlV+bMmpVK7y1SNP+00QYlI+bzkDb8Pz0M+xhWPqkMLGfrZIa/qvQ3V dkWpmNBm6sZm0P+soSYah1K5jP6CfxCQ88j1R/njLdutKF+KBThFKcTODE0Yn8W7hWbB iwIg== X-Received: by 10.70.100.199 with SMTP id fa7mr17108886pdb.114.1414324055261; Sun, 26 Oct 2014 04:47:35 -0700 (PDT) Received: from seabird.localdomain.localdomain (softbank219203027033.bbtec.net. [219.203.27.33]) by mx.google.com with ESMTPSA id dp4sm8203581pbc.21.2014.10.26.04.47.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Oct 2014 04:47:34 -0700 (PDT) From: tskd08@gmail.com To: linux-media@vger.kernel.org Cc: m.chehab@samsung.com, Akihiro Tsukada Subject: [PATCH v2 6/7] v4l-utils/libdvbv5: don't discard config-supplied parameters Date: Sun, 26 Oct 2014 20:46:22 +0900 Message-Id: <1414323983-15996-7-git-send-email-tskd08@gmail.com> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1414323983-15996-1-git-send-email-tskd08@gmail.com> References: <1414323983-15996-1-git-send-email-tskd08@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Akihiro Tsukada 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(-) 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); prop.props = fe_prop; prop.num = n;