From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=no 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 C4406C11F6A for ; Fri, 2 Jul 2021 11:33:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A2E7E61423 for ; Fri, 2 Jul 2021 11:33:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231974AbhGBLgF (ORCPT ); Fri, 2 Jul 2021 07:36:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:49056 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231802AbhGBLgD (ORCPT ); Fri, 2 Jul 2021 07:36:03 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 81AAD6141C; Fri, 2 Jul 2021 11:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1625225611; bh=KggnPXlADk0Sri+GbjI84HMBoxXRskdKAdKUlNpKUY4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=reS5zfq5Ll2jxgzFKzJqN7MEX+qE8zibQn1+uewU9Av9gO0n7AJyZSXSXFVlwsw+V Ce3gaCt7EOtmgSz8LNk47Apf24v+xG2kBTsQjGGVGp/CdAiTRH+GZRfuuD0p4/go6a An3EjSTl4rsCtb5iZ/0f7P+2dgg1ICtqJTuHGuWSEeOry7Ir40HSojA9aj2PzrHGxj QFXR+DwtvOo79uzkkq4CJz/uinW/QlQuoMMVBFOlCLm3l9YDDPjWN7U/X6rk9/e59w Im+/C4REceVup/MU7o00U3z/BFw557YvMWcZCWNA/kAeVRx/nz9Rbmtpp3UwBPpeE+ PLKFW+Hu7JSaQ== Date: Fri, 2 Jul 2021 13:33:26 +0200 From: Mauro Carvalho Chehab To: YP WU Cc: , , , , , , , Subject: Re: DVBS Blind scan implementation of Linux DVB Message-ID: <20210702133326.654ac68d@coco.lan> In-Reply-To: <20210702101649.12668-1-yp.wu@mediatek.com> References: <20210702101649.12668-1-yp.wu@mediatek.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi YP, Em Fri, 2 Jul 2021 18:16:49 +0800 YP WU escreveu: > Hello, dvb frontend maintainer: > We have an internal discussion about how to implement DVBS blind scan. > Currently, we can't see any structs and IOCTL commands related to DVBS blind scan in Linux-dvb framework. > So we want to confirm if Linux-dvb framework have inherent flow of DVBS blind scan or not. > If the answer is yes, could you tell us how to work in Linux-dvb. > If the answer is no, do you have any suggestions or design scenario for DVBS blind scan? Right now, the DVB core lacks support for doing blind scan, basically because no driver currently implements it. Right now, a couple of userspace programs implement blind scan, but at the hard way. I discussed that in the past with another developer that wanted to implement blind scans, but he ended working with something else. - There is an API on V4L2 that it is somewhat similar to blind scan. It is meant to auto-tune FM radio channels: https://linuxtv.org/downloads/v4l-dvb-apis-new/userspace-api/v4l/vidioc-s-hw-freq-seek.html The way it works there is that the tuning parameters are set at the ioctl, together with the scan direction. When this ioctl is called, the tuner starts seeking the next channel on a given frequency range. I suspect that a similar way could be implemented at DTV side, using dvbv5 API. This would work by adding a new DTV command that would start to blind scan a single channel. Something like: DTV_BLIND_SCAN_UP Subsequent calls would find the next channels. On other words, userspace would send a series of properties to setup the initial frequency and the digital TV standard, and, instead of using DTV_TUNE, the parameters will end with DTV_BLIND_SCAN_UP. So, a blind scan properties would be something like: DTV_FREQUENCY = 573000000 DTV_DELIVERY_SYSTEM = SYS_DVBC ... # other properties if needed DTV_BLIND_SCAN_UP ioctl(FE_SET_PROPERTY) The frontend will then seek for valid frequency >= DTV_FREQUENCY. While a new channel is found and the frequency is below to the highest FE frequency, it would keep doing: DTV_FREQUENCY = +