From patchwork Wed Jun 17 18:52:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 209379 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5765FC433E1 for ; Wed, 17 Jun 2020 18:52:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 384C421789 for ; Wed, 17 Jun 2020 18:52:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592419954; bh=F0HSnIgr+/nj4f4OoJWMedidccIF5oN1P0Lnc/e+mOQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=a+zMtCXhU/PHZjan/xHFWFhwiP4X8MHanKrJVQA7fyQaBLedWaWYHzClMnquY2cdb KmKDtO9ecTtUSWPPvdo3rwE82FJGll6BhNZETlybU8i5RUJJxIRQM9cgKA8Ae1vNnD vvVz+TIbr4XCRzZUo70tL8qHuxsYxVXi+9qdY8ZY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727990AbgFQSwV (ORCPT ); Wed, 17 Jun 2020 14:52:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:40482 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727861AbgFQSwT (ORCPT ); Wed, 17 Jun 2020 14:52:19 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6FC1C217A0; Wed, 17 Jun 2020 18:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592419938; bh=F0HSnIgr+/nj4f4OoJWMedidccIF5oN1P0Lnc/e+mOQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A2JIxZmPKKawwJ1QvwvrgLzzMDkWXhd7Igm5OQJbkrwXTfdEBUw1igzY7hsSAm9lA 14WTnr0bIwt3sGMqYeeTa8mf4hI616BK6P4zpNjGZuzzVPDVo9FqglGW6BZFVzLO3z 1aKcmInQbYOa8ofGa0M6IuyQuFEeKSQ7gwo3aR08= Received: from mchehab by mail.kernel.org with local (Exim 4.93) (envelope-from ) id 1jldAV-00C8Ah-Um; Wed, 17 Jun 2020 20:52:15 +0200 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Marc Gonzalez , Brad Love , Sakari Ailus , Greg Kroah-Hartman , Masahiro Yamada , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org Subject: [RFC 1/4] media: atomisp: fix identation at I2C Kconfig menu Date: Wed, 17 Jun 2020 20:52:11 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org There are several bad whitespacing usage there. Remove them. While here, place all Kconfig options for sensors at the same place. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/i2c/Kconfig | 74 +++++++++++-------- .../staging/media/atomisp/i2c/ov5693/Kconfig | 12 --- 2 files changed, 42 insertions(+), 44 deletions(-) delete mode 100644 drivers/staging/media/atomisp/i2c/ov5693/Kconfig diff --git a/drivers/staging/media/atomisp/i2c/Kconfig b/drivers/staging/media/atomisp/i2c/Kconfig index 7c7f0fc090b3..a772b833a85f 100644 --- a/drivers/staging/media/atomisp/i2c/Kconfig +++ b/drivers/staging/media/atomisp/i2c/Kconfig @@ -3,53 +3,51 @@ # Kconfig for sensor drivers # -source "drivers/staging/media/atomisp/i2c/ov5693/Kconfig" - config VIDEO_ATOMISP_OV2722 - tristate "OVT ov2722 sensor support" + tristate "OVT ov2722 sensor support" depends on ACPI - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 help - This is a Video4Linux2 sensor-level driver for the OVT - OV2722 raw camera. + This is a Video4Linux2 sensor-level driver for the OVT + OV2722 raw camera. - OVT is a 2M raw sensor. + OVT is a 2M raw sensor. - It currently only works with the atomisp driver. + It currently only works with the atomisp driver. config VIDEO_ATOMISP_GC2235 - tristate "Galaxy gc2235 sensor support" + tristate "Galaxy gc2235 sensor support" depends on ACPI - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 help - This is a Video4Linux2 sensor-level driver for the OVT - GC2235 raw camera. + This is a Video4Linux2 sensor-level driver for the OVT + GC2235 raw camera. - GC2235 is a 2M raw sensor. + GC2235 is a 2M raw sensor. - It currently only works with the atomisp driver. + It currently only works with the atomisp driver. config VIDEO_ATOMISP_MSRLIST_HELPER - tristate "Helper library to load, parse and apply large register lists." - depends on I2C + tristate "Helper library to load, parse and apply large register lists." + depends on I2C help - This is a helper library to be used from a sensor driver to load, parse - and apply large register lists. + This is a helper library to be used from a sensor driver to load, parse + and apply large register lists. - To compile this driver as a module, choose M here: the - module will be called libmsrlisthelper. + To compile this driver as a module, choose M here: the + module will be called libmsrlisthelper. config VIDEO_ATOMISP_MT9M114 - tristate "Aptina mt9m114 sensor support" + tristate "Aptina mt9m114 sensor support" depends on ACPI - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 help - This is a Video4Linux2 sensor-level driver for the Micron - mt9m114 1.3 Mpixel camera. + This is a Video4Linux2 sensor-level driver for the Micron + mt9m114 1.3 Mpixel camera. - mt9m114 is video camera sensor. + mt9m114 is video camera sensor. - It currently only works with the atomisp driver. + It currently only works with the atomisp driver. config VIDEO_ATOMISP_GC0310 tristate "GC0310 sensor support" @@ -60,16 +58,28 @@ config VIDEO_ATOMISP_GC0310 GC0310 0.3MP sensor. config VIDEO_ATOMISP_OV2680 - tristate "Omnivision OV2680 sensor support" + tristate "Omnivision OV2680 sensor support" depends on ACPI - depends on I2C && VIDEO_V4L2 + depends on I2C && VIDEO_V4L2 help - This is a Video4Linux2 sensor-level driver for the Omnivision - OV2680 raw camera. + This is a Video4Linux2 sensor-level driver for the Omnivision + OV2680 raw camera. - ov2680 is a 2M raw sensor. + ov2680 is a 2M raw sensor. - It currently only works with the atomisp driver. + It currently only works with the atomisp driver. + +config VIDEO_ATOMISP_OV5693 + tristate "Omnivision ov5693 sensor support" + depends on ACPI + depends on I2C && VIDEO_V4L2 + help + This is a Video4Linux2 sensor-level driver for the Micron + ov5693 5 Mpixel camera. + + ov5693 is video camera sensor. + + It currently only works with the atomisp driver. # # Kconfig for flash drivers diff --git a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig b/drivers/staging/media/atomisp/i2c/ov5693/Kconfig deleted file mode 100644 index c8d09f416c35..000000000000 --- a/drivers/staging/media/atomisp/i2c/ov5693/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -config VIDEO_ATOMISP_OV5693 - tristate "Omnivision ov5693 sensor support" - depends on ACPI - depends on I2C && VIDEO_V4L2 - help - This is a Video4Linux2 sensor-level driver for the Micron - ov5693 5 Mpixel camera. - - ov5693 is video camera sensor. - - It currently only works with the atomisp driver. From patchwork Wed Jun 17 18:52:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 209378 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EB66C433E0 for ; Wed, 17 Jun 2020 18:52:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 36E76217D9 for ; Wed, 17 Jun 2020 18:52:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592419959; bh=i+KcznjcHmFJXCMts75e4liweyEkr+LWYq1E5sBldjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=HBRgl3HS7AoM7ed3Q6rGUkFeWwI8+YhaS5AK9722J4/LPulzmG/OzJTB+tAKAVRHj kdcvoJc1+RsOmWo1+APgjfS03KGwerrdNYTcbFp6bwxlqbCFDCy1q4h1MscX+c6qse c1nzjqQLr9un+1/gv0uw6Mq1Iuta+ptMtni/gvxc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727894AbgFQSwU (ORCPT ); Wed, 17 Jun 2020 14:52:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:40470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726835AbgFQSwT (ORCPT ); Wed, 17 Jun 2020 14:52:19 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6C65D21532; Wed, 17 Jun 2020 18:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592419938; bh=i+KcznjcHmFJXCMts75e4liweyEkr+LWYq1E5sBldjU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=F8x3VHksnMc+dVcBrz+GahrAmkWlsXQ1Le2LfObX/8lArJAAg3fukisN3Ck389ahO MA2xNEyDPaXO0J72l9tEm5XtpJBWd7hbHLGmuDb4B78ppAQ759UMVzNssAZfFEabeq sbAyg6qXNI3SiHKnxFu17/+jFpBJw1c4qbtlBqGc= Received: from mchehab by mail.kernel.org with local (Exim 4.93) (envelope-from ) id 1jldAV-00C8Al-Vq; Wed, 17 Jun 2020 20:52:15 +0200 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Marc Gonzalez , Brad Love , Sakari Ailus , Greg Kroah-Hartman , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [RFC 2/4] media: atomisp: fix help message for ISP2401 selection Date: Wed, 17 Jun 2020 20:52:12 +0200 Message-Id: <52b8bb5c7ebf039b4b7f72f250cbe897a0671b34.1592419750.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org I'm pretty sure I named this right, but it sounds that I ended doing something weird maybe while solving some conflict. So, fix the title of this config var. Signed-off-by: Mauro Carvalho Chehab --- drivers/staging/media/atomisp/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/atomisp/Kconfig b/drivers/staging/media/atomisp/Kconfig index fea06cb0eb48..37577bb72998 100644 --- a/drivers/staging/media/atomisp/Kconfig +++ b/drivers/staging/media/atomisp/Kconfig @@ -22,7 +22,7 @@ config VIDEO_ATOMISP module will be called atomisp config VIDEO_ATOMISP_ISP2401 - bool "VIDEO_ATOMISP_ISP2401" + bool "Use Intel Atom ISP on Cherrytail/Anniedale (ISP2401)" depends on VIDEO_ATOMISP help Enable support for Atom ISP2401-based boards. From patchwork Wed Jun 17 18:52:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 209380 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3258C433E0 for ; Wed, 17 Jun 2020 18:52:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A649021789 for ; Wed, 17 Jun 2020 18:52:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592419941; bh=Ycs20U18UeBv/A9n4DRip4ZO+FTx+G0oEWD/A+0ZHiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=1SngCBeBOyt7ltDYuWM68qQdbpiKOirVdG+gr2xjJHbRV/ROfxqTwbpnM19v+/bwu 9JhIKjTByhoO/lTNNi3E2pT0EZvP1FCS0RX1nYre3LV1k6Q7nByJ1jwzu+jOUqurvT CSJs8JAfkq807DpewarpnQILgWQlgJJF4dkJHOXc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727980AbgFQSwV (ORCPT ); Wed, 17 Jun 2020 14:52:21 -0400 Received: from mail.kernel.org ([198.145.29.99]:40474 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727039AbgFQSwT (ORCPT ); Wed, 17 Jun 2020 14:52:19 -0400 Received: from mail.kernel.org (ip5f5ad5c5.dynamic.kabel-deutschland.de [95.90.213.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 70AEE217D8; Wed, 17 Jun 2020 18:52:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592419938; bh=Ycs20U18UeBv/A9n4DRip4ZO+FTx+G0oEWD/A+0ZHiE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wxaNY2ti/AePGO0n8yEl9tG+fbWibf7lnASl3bclbRCNnoH4puCjavAcrb6sZaBT2 tl+/tXW/y1mPauMOdq1Lgq5dBN4oPWRFnk+Ced1bG3hQI+tpWxTr+k7N22p2H9fadf F9x6xycnXmRDXtliIJSGBKoXY1mwVvuiColnzm+c= Received: from mchehab by mail.kernel.org with local (Exim 4.93) (envelope-from ) id 1jldAW-00C8At-2O; Wed, 17 Jun 2020 20:52:16 +0200 From: Mauro Carvalho Chehab To: Linux Media Mailing List Cc: Mauro Carvalho Chehab , Marc Gonzalez , Brad Love , Sean Young , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [RFC 4/4] media: dvb_frontend: disable zigzag mode if not possible Date: Wed, 17 Jun 2020 20:52:14 +0200 Message-Id: <974065921c41fa0c97700196de1d921c95fafaaf.1592419750.git.mchehab+huawei@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org For the zigzag to work, the core needs to have a frequency shift. Without that, the zigzag code will just try re-tuning several times at the very same frequency, with seems wrong. So, add a warning when this happens, and fall back to the single-shot mode. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.c | 141 +++++++++++++++----------- 1 file changed, 79 insertions(+), 62 deletions(-) diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index ed85dc2a9183..cb577924121e 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -642,6 +642,9 @@ static void dvb_frontend_wakeup(struct dvb_frontend *fe) wake_up_interruptible(&fepriv->wait_queue); } +static u32 dvb_frontend_get_stepsize(struct dvb_frontend *fe); +static void prepare_tuning_algo_parameters(struct dvb_frontend *fe); + static int dvb_frontend_thread(void *data) { struct dvb_frontend *fe = data; @@ -696,78 +699,92 @@ static int dvb_frontend_thread(void *data) fepriv->reinitialise = 0; } - /* do an iteration of the tuning loop */ - if (fe->ops.get_frontend_algo) { + if (fe->ops.get_frontend_algo) algo = fe->ops.get_frontend_algo(fe); - switch (algo) { - case DVBFE_ALGO_HW: - dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_HW\n", __func__); + else + algo = DVBFE_ALGO_SW; - if (fepriv->state & FESTATE_RETUNE) { - dev_dbg(fe->dvb->device, "%s: Retune requested, FESTATE_RETUNE\n", __func__); - re_tune = true; - fepriv->state = FESTATE_TUNED; - } else { - re_tune = false; - } + /* do an iteration of the tuning loop */ + switch (algo) { + case DVBFE_ALGO_SW: + prepare_tuning_algo_parameters(fe); - if (fe->ops.tune) - fe->ops.tune(fe, re_tune, fepriv->tune_mode_flags, &fepriv->delay, &s); - - if (s != fepriv->status && !(fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT)) { - dev_dbg(fe->dvb->device, "%s: state changed, adding current state\n", __func__); - dvb_frontend_add_event(fe, s); - fepriv->status = s; - } - break; - case DVBFE_ALGO_SW: + if (fepriv->max_drift) { dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_SW\n", __func__); dvb_frontend_swzigzag(fe); break; - case DVBFE_ALGO_CUSTOM: - dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_CUSTOM, state=%d\n", __func__, fepriv->state); - if (fepriv->state & FESTATE_RETUNE) { - dev_dbg(fe->dvb->device, "%s: Retune requested, FESTAT_RETUNE\n", __func__); - fepriv->state = FESTATE_TUNED; + } + + /* + * See prepare_tuning_algo_parameters(): + * - Some standards may not use zigzag. + */ + if (!dvb_frontend_get_stepsize(fe)) + dev_warn(fe->dvb->device, + "disabling sigzag, as frontend doesn't set frequency step size\n"); + + /* fall through */ + case DVBFE_ALGO_HW: + dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_HW\n", __func__); + + if (fepriv->state & FESTATE_RETUNE) { + dev_dbg(fe->dvb->device, "%s: Retune requested, FESTATE_RETUNE\n", __func__); + re_tune = true; + fepriv->state = FESTATE_TUNED; + } else { + re_tune = false; + } + + if (fe->ops.tune) + fe->ops.tune(fe, re_tune, fepriv->tune_mode_flags, &fepriv->delay, &s); + + if (s != fepriv->status && !(fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT)) { + dev_dbg(fe->dvb->device, "%s: state changed, adding current state\n", __func__); + dvb_frontend_add_event(fe, s); + fepriv->status = s; + } + break; + case DVBFE_ALGO_CUSTOM: + dev_dbg(fe->dvb->device, "%s: Frontend ALGO = DVBFE_ALGO_CUSTOM, state=%d\n", __func__, fepriv->state); + if (fepriv->state & FESTATE_RETUNE) { + dev_dbg(fe->dvb->device, "%s: Retune requested, FESTAT_RETUNE\n", __func__); + fepriv->state = FESTATE_TUNED; + } + /* Case where we are going to search for a carrier + * User asked us to retune again for some reason, possibly + * requesting a search with a new set of parameters + */ + if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { + if (fe->ops.search) { + fepriv->algo_status = fe->ops.search(fe); + /* We did do a search as was requested, the flags are + * now unset as well and has the flags wrt to search. + */ + } else { + fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN; } - /* Case where we are going to search for a carrier - * User asked us to retune again for some reason, possibly - * requesting a search with a new set of parameters - */ - if (fepriv->algo_status & DVBFE_ALGO_SEARCH_AGAIN) { - if (fe->ops.search) { - fepriv->algo_status = fe->ops.search(fe); - /* We did do a search as was requested, the flags are - * now unset as well and has the flags wrt to search. - */ - } else { - fepriv->algo_status &= ~DVBFE_ALGO_SEARCH_AGAIN; - } - } - /* Track the carrier if the search was successful */ - if (fepriv->algo_status != DVBFE_ALGO_SEARCH_SUCCESS) { + } + /* Track the carrier if the search was successful */ + if (fepriv->algo_status != DVBFE_ALGO_SEARCH_SUCCESS) { + fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; + fepriv->delay = HZ / 2; + } + dtv_property_legacy_params_sync(fe, c, &fepriv->parameters_out); + fe->ops.read_status(fe, &s); + if (s != fepriv->status) { + dvb_frontend_add_event(fe, s); /* update event list */ + fepriv->status = s; + if (!(s & FE_HAS_LOCK)) { + fepriv->delay = HZ / 10; fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; - fepriv->delay = HZ / 2; + } else { + fepriv->delay = 60 * HZ; } - dtv_property_legacy_params_sync(fe, c, &fepriv->parameters_out); - fe->ops.read_status(fe, &s); - if (s != fepriv->status) { - dvb_frontend_add_event(fe, s); /* update event list */ - fepriv->status = s; - if (!(s & FE_HAS_LOCK)) { - fepriv->delay = HZ / 10; - fepriv->algo_status |= DVBFE_ALGO_SEARCH_AGAIN; - } else { - fepriv->delay = 60 * HZ; - } - } - break; - default: - dev_dbg(fe->dvb->device, "%s: UNDEFINED ALGO !\n", __func__); - break; } - } else { - dvb_frontend_swzigzag(fe); + break; + default: + dev_dbg(fe->dvb->device, "%s: UNDEFINED ALGO !\n", __func__); + break; } }