From patchwork Mon Aug 31 09:13:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Malcolm Priestley X-Patchwork-Id: 7099141 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DC68DBEEC1 for ; Mon, 31 Aug 2015 09:14:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1832920605 for ; Mon, 31 Aug 2015 09:14:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2B7D42075F for ; Mon, 31 Aug 2015 09:14:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752514AbbHaJOe (ORCPT ); Mon, 31 Aug 2015 05:14:34 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:38224 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751883AbbHaJOd (ORCPT ); Mon, 31 Aug 2015 05:14:33 -0400 Received: by wicpl12 with SMTP id pl12so21463468wic.1; Mon, 31 Aug 2015 02:14:32 -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; bh=zkP38Zau/UkENAnIuxFztv5oAfgJOSmUXQz1VlcntQc=; b=qNtlcXxIdf7D9rlK2G1jcHhT6l1XHVPVwCqjd9sjyjKZIDDuT76/DBkQh8k4zYnuqM 0+y8ROQke1iIhih2nk5tdQjRFX0Ik0orzpKJnXUEcpbW+ZFza5yJiGptP/X+vwFAf+m2 gm65vYnAVrGBcV2/QOrVTDlyNlr41v4dP+JymeRLdGLwXTR98H+sjGTGP6bEpGJcTt0x pJHEgvbiuzlBD0BGdLMxG8MYdgjFVwt48ya/5jiFB/iAw7l3823UP7+lEMYMCl9F6kY+ sU5QV2wmaED1mSBiV9k9m3oz0yEBEdpQ898FEybKO6g9hvLH0L4DpA7Clrbn7Xj24tbh VjnA== X-Received: by 10.180.38.110 with SMTP id f14mr2202125wik.62.1441012472140; Mon, 31 Aug 2015 02:14:32 -0700 (PDT) Received: from tipsey.3.home (188.29.104.153.threembb.co.uk. [188.29.104.153]) by smtp.gmail.com with ESMTPSA id lg6sm21239372wjb.10.2015.08.31.02.14.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 31 Aug 2015 02:14:31 -0700 (PDT) From: Malcolm Priestley To: linux-media@vger.kernel.org Cc: Malcolm Priestley , klammerj@a1.net, Subject: [PATCH] media: dvb-core: Don't force CAN_INVERSION_AUTO in oneshot mode. Date: Mon, 31 Aug 2015 10:13:45 +0100 Message-Id: <1441012425-25050-1-git-send-email-tvboxspy@gmail.com> X-Mailer: git-send-email 2.5.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 When in FE_TUNE_MODE_ONESHOT the frontend must report the actual capabilities so user can take appropriate action. With frontends that can't do auto inversion this is done by dvb-core automatically so CAN_INVERSION_AUTO is valid. However, when in FE_TUNE_MODE_ONESHOT this is not true. So only set FE_CAN_INVERSION_AUTO in modes other than FE_TUNE_MODE_ONESHOT Signed-off-by: Malcolm Priestley Cc: --- drivers/media/dvb-core/dvb_frontend.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index c38ef1a..e2a3833 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -2313,9 +2313,9 @@ static int dvb_frontend_ioctl_legacy(struct file *file, dev_dbg(fe->dvb->device, "%s: current delivery system on cache: %d, V3 type: %d\n", __func__, c->delivery_system, fe->ops.info.type); - /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't - * do it, it is done for it. */ - info->caps |= FE_CAN_INVERSION_AUTO; + /* Set CAN_INVERSION_AUTO bit on in other than oneshot mode */ + if (!(fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT)) + info->caps |= FE_CAN_INVERSION_AUTO; err = 0; break; }