Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp1603420pxv; Fri, 2 Jul 2021 07:47:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmGYhcaT1T6gZp8QJ/wo7JjBSiS+ZxXynKW41d8lV1Ss+Y0Ncg+1Jf4HCgi1xVL1I0jnrG X-Received: by 2002:a92:dc0f:: with SMTP id t15mr267198iln.228.1625237279527; Fri, 02 Jul 2021 07:47:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625237279; cv=none; d=google.com; s=arc-20160816; b=lqn0ZXXN9LhDK5QXfjXD2nMCLyOEZO5XTKZB/qc0g90RgEtPzztf9jz8mEls7bqXPw +x2DO2VnP/gXFp6GmP5R0muXuH2U9YNL0fsKskQaHVrwQAHL/64FMGdR0xaNMn0bjbZv NM+Qurw7k6eW49M2cYuLJ4PXZW8/nQOFRGDI+47qXEJOiOmAY/QYZCid+6tgmCypDhwc jlpZJt1BcginJzWa0xYpnWJ0FavC9IYaogJfOIwJDqCzq+dl0tGTtGnsfnBgbjiojBS1 cTpTF1vLBb2dM+bTLGcRwrj/5N906iwwTpfQLtx9BTVwdvT6emTz9UjbUB0pCUU10wc6 ozjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=AX2N8DbSqIcTnk1kCkLIuVS8viICzVYId7WomGqj1zk=; b=Dc8fvjHuJk4F2mPjsQwZX+5kbElavu+4HxyKw9kWmQHuO0pieUe6dvJey650lOXzvY 1MB7djJN4uZvbMHnA7xaj77UH6XlUHegzwVw06QxdQgMXsEIpTULIgdf5V9ixgcbpZOS sZiXtR6Z2ihNcKiD7ZuVn+GGli9gc3K07KQmrqVUzorinGo6UL1spO8EYj7kSjqVWR3F 9d3BQ+4tR7T33wTTrFmdivnk3gN7FkdKTImAaq/3R2AbQFl5RDegQfdTzOcr2c4HTyQ2 YKSSYikWuo6ZX5s3uBYkLTaDO6cYjyeU0GvzC1O21CG1Jfioy53MqWGBPCZAxDCY4d3w 0a6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=reS5zfq5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si3213576jaq.82.2021.07.02.07.47.45; Fri, 02 Jul 2021 07:47:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=reS5zfq5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231966AbhGBLgF (ORCPT + 99 others); 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 = +