Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp128011imm; Wed, 4 Jul 2018 19:44:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXGCozVDsfvcAG5lDrFCqZO/dbi20GpVj89AG0BUFssxT9eqBweAN8yIkcTWP6hNbNOMvj X-Received: by 2002:a17:902:768a:: with SMTP id m10-v6mr4256321pll.293.1530758653432; Wed, 04 Jul 2018 19:44:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530758653; cv=none; d=google.com; s=arc-20160816; b=rQmLkecPCxwBs0COjlOu2u39THp25ve9WaDSTKJflLiUwb8HLM3j5AqvxrQp8ZauOZ nNJqOqTsnGGnhiJB/PPcRtkf7NlR9f1zsBxaL8sPX5k0fv+QELX4FY9d3OhRz7ADzhAs Z0H3It2+PclKbbTBrFNCxf4v2fRuLrKdW1vHFt+8jWb5xTz/YRj7KpyXbbQL4k99yyyC oE4YJV2QbzTcHrhT6EVBgprrR7mqB4L4Q4mlP0jjWp2PORm0MDTZ4lKvRQZp0MCG84PI dOvRmv9IluQ9KSadQWN0UeobQiG5cnGy7NEh7ViTiedgf3uvbAwlxXRm3WzrPK4GPEjk 5Dew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature:arc-authentication-results; bh=2R2p8w3tHi/CuVUkRJw8A4e0D8PWViqATYvFRZYaKh4=; b=VOO5A+5DNc2ALD7vesGyAHXsxrKuR/Ci+P58+bO/vQlQHrGM1O25o3aEElfDX3hQtd UZOsAFHuvEIRymLieqglNszpIxajEMaeyp6QiiFXZKygKbCb6MoQhe+LbeA8QqTj0HFp UzRVwOv04gtelq4Bm/WyRNCSCbG01r/pTuTEvCB4fSRR08ZmtFGCVi7FsVRr+15bsdOV BwdqyWmn52mPXMzlHDmDSRxhSI58dtd7qOtiIU0rMSSXmHHwQrRepbcSGh5LVAKZv8Bh Jogf0Xzqm7Nxtfp/1wi+YC3c3dhVyAK3m0LDhPWEJGJbuNPBSjFzo4GoqdkWEDzKO3v0 /tFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Gx3b9gLz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v71-v6si5166435pfj.354.2018.07.04.19.43.59; Wed, 04 Jul 2018 19:44:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Gx3b9gLz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753139AbeGECmw (ORCPT + 99 others); Wed, 4 Jul 2018 22:42:52 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:40630 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752965AbeGECmu (ORCPT ); Wed, 4 Jul 2018 22:42:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2R2p8w3tHi/CuVUkRJw8A4e0D8PWViqATYvFRZYaKh4=; b=Gx3b9gLzXg6omXIGQeguzajuN gGTt1ZfSvWIZ7ntugWXi4gMUV/54Xh5JjJwPDBoHjY8r9VLgIk3DekfYuUvwzj0izmCxnQytypjBw HloJFBXb02UK2Yl3mCKITVYOVr09s6c8xDhFWmn40XOdLRaSN/0UFlaZ81bMWcXe+feBDS7ZkADO8 jKJdspW2j8m3wQj3Whe9kC5nI+WtkDTVuTTsCIiXJ+IJm0ge/FnWfJQI1P97NdNz+3IlQm/jYNP8m EJD7AUXBlRP2m3+8VvUR9asyjSfH9JcbCt0x339T4a0yqZwtNi35iyrF0AiSeAqQ664YC0rVDi2gP +raA1KC3A==; Received: from 179.176.112.175.dynamic.adsl.gvt.net.br ([179.176.112.175] helo=coco.lan) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fauEL-0003SQ-3T; Thu, 05 Jul 2018 02:42:49 +0000 Date: Wed, 4 Jul 2018 23:42:44 -0300 From: Mauro Carvalho Chehab To: "Katsuhiro Suzuki" Cc: , "Masami Hiramatsu" , "Jassi Brar" , , Subject: Re: [PATCH v3] media: dvb-frontends: add Socionext SC1501A ISDB-S/T demodulator driver Message-ID: <20180704234244.32d20f6b@coco.lan> In-Reply-To: <000401d41403$b33db490$19b91db0$@socionext.com> References: <20180621031748.21703-1-suzuki.katsuhiro@socionext.com> <20180704135657.3fd607cb@coco.lan> <000401d41403$b33db490$19b91db0$@socionext.com> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, 5 Jul 2018 10:58:42 +0900 "Katsuhiro Suzuki" escreveu: > Hi Mauro, >=20 > > -----Original Message----- > > From: Mauro Carvalho Chehab > > Sent: Thursday, July 5, 2018 1:58 AM > > To: Suzuki, Katsuhiro/=E9=88=B4=E6=9C=A8 =E5=8B=9D=E5=8D=9A > > Cc: linux-media@vger.kernel.org; Masami Hiramatsu =20 > ; > > Jassi Brar ; linux-arm-kernel@lists.infrade= ad.org; > > linux-kernel@vger.kernel.org > > Subject: Re: [PATCH v3] media: dvb-frontends: add Socionext SC1501A ISD= B-S/T > > demodulator driver > >=20 > > Hi Katsuhiro-san, > >=20 > > Em Thu, 21 Jun 2018 12:17:48 +0900 > > Katsuhiro Suzuki escreveu: > > =20 > > > This patch adds a frontend driver for the Socionext SC1501A series > > > and Socionext MN88443x ISDB-S/T demodulators. =20 > >=20 > > Sorry for taking so long to review it. We're missing a sub-maintainer > > for DVB, with would otherwise speed up reviews of DVB patches. =20 >=20 > No problem, thank you for reviewing! I appreciate it. >=20 >=20 > > > > > > The maximum and minimum frequency of Socionext SC1501A comes from > > > ISDB-S and ISDB-T so frequency range is the following: > > > - ISDB-S (BS/CS110 IF frequency in kHz, Local freq 10.678GHz) > > > - Min: BS-1: 1032000 =3D> 1032.23MHz > > > - Max: ND24: 2701000 =3D> 2070.25MHz > > > - ISDB-T (in Hz) > > > - Min: ch13: 470000000 =3D> 470.357857MHz > > > - Max: ch62: 770000000 =3D> 769.927857MHz =20 > >=20 > > There is actually an error on that part of the driver. Right now, > > the DVB core expects Satellite frequencies (DVB-S, ISDB-S, ...) > > in kHz. For all other delivery systems, it is in Hz. > >=20 > > It is this way due to historic reasons. While it won't be hard to > > change the core, that would require to touch all Satellite drivers. > >=20 > > As there are very few frontend drivers that accept both Satellite > > and Terrestrial standards, what we do, instead, is to setup > > two frontends. See, for example, drivers/media/dvb-frontends/helene.c. > > =20 >=20 > Thank you for describing it. I understand our device is rare case, and=20 > the reason why Helene has Terrestrial and Satellite structures. >=20 > I'm using MN884434 device that has 2 cores. I want to setup DVB adapter=20 > devices (/dev/dvb/adapter0/*) for our frontend system as the following: >=20 > - adapter0: for core 0, ISDB-T, ISDB-S > - adapter1: for core 1, ISDB-T, ISDB-S Yeah, that is what it was supposed to work, if the core was ready for it. > But it seems one DVB adapter device support only ISDB-T or only ISDB-S=20 > if I divide structures. So I define the adapters as the following: >=20 > - adapter0: for core 0, ISDB-T > - adapter1: for core 0, ISDB-S > - adapter2: for core 1, ISDB-T > - adapter3: for core 1, ISDB-S >=20 > Is this correct? That's the way the current driver with uses helene does. >=20 >=20 > > ... =20 > > > +static const struct dvb_frontend_ops sc1501a_ops =3D { > > > + .delsys =3D { SYS_ISDBS, SYS_ISDBT }, > > > + .info =3D { > > > + .name =3D "Socionext SC1501A", > > > + .frequency_min =3D 1032000, > > > + .frequency_max =3D 770000000, > > > + .caps =3D FE_CAN_INVERSION_AUTO | FE_CAN_FEC_AUTO | > > > + FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO | > > > + FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO, > > > + }, > > > + > > > + .sleep =3D sc1501a_sleep, > > > + .set_frontend =3D sc1501a_set_frontend, > > > + .get_tune_settings =3D sc1501a_get_tune_settings, > > > + .read_status =3D sc1501a_read_status, > > > +}; =20 > >=20 > > In other words, you'll need to declare two structs here, one for ISDB-T > > and another one for ISDB-S. > > =20 >=20 > OK, I'm going to divide this structure for Terrestrial and Satellite. And > add attach functions same as Helene driver. >=20 > I'll send v4 patch. I ended by writing two patches that should be solving the issues inside the core. With them[1], it will work the way you want. There is a catch: you'll need to convert Helene to have a single entry and be sure that the driver that currently uses it (netup_unidvb) will keep working. I guess I have one such hardware here for testing. [1] after tested/reviewed - I didn't test them yet. Feel free to test. So, please look at the two patches I sent today to the mailing list. (not sure why, they're taking a long time to arrive there - perhaps vger has some issues). I added them on this tree: https://git.linuxtv.org/mchehab/experimental.git/log/?h=3Ddvb_freq_hz it is the last two patches there: - https://git.linuxtv.org/mchehab/experimental.git/commit/?h=3Ddvb_freq_hz= &id=3Db3d63a8f038d136b26692bc3a14554960e767f4a - https://git.linuxtv.org/mchehab/experimental.git/commit/?h=3Ddvb_freq_hz= &id=3D2a369e8faf3b277baff4026371f298e95c84fbb2 I'm not sure if all applications will do the right thing, though, as it will depend if they query the capabilities before or after switching to a different delivery system. If it get caps before and store them in Hz, apps will work, but tests are required. >=20 >=20 > > Yeah, I know that this sucks. If you are in the mood of touching the > > DVB core, I'm willing to consider a patch that would fix this, provided > > that it won't break backward compatibility with other drivers (or would > > convert the other satellite drivers to use the new way). > >=20 > > Thanks, > > Mauro =20 >=20 > Hmm, I don't know the details of DVB core, I try to investigate it. >=20 >=20 > Regards, > -- > Katsuhiro Suzuki >=20 >=20 >=20 Thanks, Mauro