From patchwork Sat Dec 6 15:06:40 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12682 Received: from crow.cadsoft.de ([217.86.189.86] helo=raven.cadsoft.de) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1L8yk3-0005f0-1I for vdr@linuxtv.org; Sat, 06 Dec 2008 16:06:49 +0100 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.14.3/8.14.3) with ESMTP id mB6F6etT016054 for ; Sat, 6 Dec 2008 16:06:40 +0100 Message-ID: <493A9500.1060508@cadsoft.de> Date: Sat, 06 Dec 2008 16:06:40 +0100 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 2.0.0.18 (X11/20081112) MIME-Version: 1.0 To: vdr@linuxtv.org X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0.1 (raven.cadsoft.de [192.168.1.1]); Sat, 06 Dec 2008 16:06:43 +0100 (CET) X-LSpam-Score: -2.6 (--) X-LSpam-Report: No, score=-2.6 required=5.0 tests=AWL=0.008, BAYES_00=-2.599 autolearn=ham Subject: [vdr] VDR with S2API X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Dec 2008 15:06:49 -0000 Status: O X-Status: X-Keywords: X-UID: 18622 The attached patch is what I've gathered from various postings regarding adapting VDR to the S2API driver API (thanks to Igor M. Liplianin, Niels Wagenaar and Edgar Hucek - did I forget anybody?). Since the S2SAPI doesn't provide a way of determining whether a DVB-S device supports DVB-S2 (at least I didn't find any), you need to apply the second attached patch to the driver in order to impelement a new capability flag that reports the availability of DVB-S2 support. If you don't want to patch the driver, you can change the line case FE_QPSK: frontendType = (frontendInfo.caps & FE_CAN_2ND_GEN_MODULATION) ? SYS_DVBS2 : SYS_DVBS; break; in dvbdevice.c to avoid FE_CAN_2ND_GEN_MODULATION. Either set frontendType permanently to SYS_DVBS or SYS_DVBS2, depending on what you have. So far DVB-S and DVB-S2 appears to tune fine. DVB-C is completely untested. With DVB-T tuning doesn't work, even though my TDA10046H based DVB-T card does work with the S2API driver under VDR 1.6.0. So for the moment I would appreciate if people could test DVB-T tuning and check whether maybe I made some silly mistake in the DVB-T tuning code. Klaus diff -ru v4l-dvb-17754ef554b0/linux/drivers/media/dvb/frontends/cx24116.c v4l-dvb-2008-11-22-17754ef554b0/linux/drivers/media/dvb/frontends/cx24116.c --- v4l-dvb-17754ef554b0/linux/drivers/media/dvb/frontends/cx24116.c 2008-11-21 23:00:55.000000000 +0100 +++ v4l-dvb-2008-11-22-17754ef554b0/linux/drivers/media/dvb/frontends/cx24116.c 2008-11-23 11:36:31.000000000 +0100 @@ -1459,6 +1459,7 @@ FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO | + FE_CAN_2ND_GEN_MODULATION | FE_CAN_QPSK | FE_CAN_RECOVER }, diff -ru v4l-dvb-17754ef554b0/linux/drivers/media/dvb/frontends/stb0899_drv.c v4l-dvb-2008-11-22-17754ef554b0/linux/drivers/media/dvb/frontends/stb0899_drv.c --- v4l-dvb-17754ef554b0/linux/drivers/media/dvb/frontends/stb0899_drv.c 2008-11-21 23:00:55.000000000 +0100 +++ v4l-dvb-2008-11-22-17754ef554b0/linux/drivers/media/dvb/frontends/stb0899_drv.c 2008-11-23 11:37:01.000000000 +0100 @@ -1913,6 +1913,7 @@ .caps = FE_CAN_INVERSION_AUTO | FE_CAN_FEC_AUTO | + FE_CAN_2ND_GEN_MODULATION | FE_CAN_QPSK }, diff -ru v4l-dvb-17754ef554b0/linux/include/linux/dvb/frontend.h v4l-dvb-2008-11-22-17754ef554b0/linux/include/linux/dvb/frontend.h --- v4l-dvb-17754ef554b0/linux/include/linux/dvb/frontend.h 2008-11-21 23:00:55.000000000 +0100 +++ v4l-dvb-2008-11-22-17754ef554b0/linux/include/linux/dvb/frontend.h 2008-11-23 11:27:21.000000000 +0100 @@ -63,6 +63,7 @@ FE_CAN_8VSB = 0x200000, FE_CAN_16VSB = 0x400000, FE_HAS_EXTENDED_CAPS = 0x800000, // We need more bitspace for newer APIs, indicate this. + FE_CAN_2ND_GEN_MODULATION = 0x10000000, // frontend supports "2nd generation modulation" (DVB-S2) FE_NEEDS_BENDING = 0x20000000, // not supported anymore, don't use (frontend requires frequency bending) FE_CAN_RECOVER = 0x40000000, // frontend can recover from a cable unplug automatically FE_CAN_MUTE_TS = 0x80000000 // frontend can stop spurious TS data output