From patchwork Sat Aug 16 21:33:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CrazyCat X-Patchwork-Id: 4730181 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BE3D29F377 for ; Sat, 16 Aug 2014 21:40:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 018A320154 for ; Sat, 16 Aug 2014 21:40:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 650D7200F4 for ; Sat, 16 Aug 2014 21:40:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751940AbaHPVke (ORCPT ); Sat, 16 Aug 2014 17:40:34 -0400 Received: from forward7l.mail.yandex.net ([84.201.143.140]:46435 "EHLO forward7l.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717AbaHPVkd (ORCPT ); Sat, 16 Aug 2014 17:40:33 -0400 X-Greylist: delayed 431 seconds by postgrey-1.27 at vger.kernel.org; Sat, 16 Aug 2014 17:40:33 EDT Received: from smtp1o.mail.yandex.net (smtp1o.mail.yandex.net [37.140.190.26]) by forward7l.mail.yandex.net (Yandex) with ESMTP id 188C3BC0FDF; Sun, 17 Aug 2014 01:33:18 +0400 (MSK) Received: from smtp1o.mail.yandex.net (localhost [127.0.0.1]) by smtp1o.mail.yandex.net (Yandex) with ESMTP id 9B324DE2906; Sun, 17 Aug 2014 01:33:17 +0400 (MSK) Received: from 46-211-136-8-gprs.kyivstar.net (46-211-136-8-gprs.kyivstar.net [46.211.136.8]) by smtp1o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 51C4yxo4fx-XG8CBov9; Sun, 17 Aug 2014 01:33:16 +0400 (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (Client certificate not present) X-Yandex-Uniq: b98cda44-f8ec-4931-92f7-adeed0e770b0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=narod.ru; s=mail; t=1408224797; bh=mOkivShAKxH6Js9YJFHrJg2SZxArrfCVvLElE/jrqCc=; h=From:To:Cc:Subject:Date:Message-ID:User-Agent:MIME-Version: Content-Transfer-Encoding:Content-Type; b=tcOyl+kj5g2yuvADUyuhnoZe1qe7RcgLX3PzW1fhFfo/OyNT7+8zvL+8lKI6QVB2i N1a/qpwIlhymTx3Xnser183rZ1ZbK2cU7JcKivOVCTkZ5zB1X+/YIkVTpCy9pmDct5 29rP5tZX8Z8euPlWvOySJAdGbALdORJlDCTk/hpg= Authentication-Results: smtp1o.mail.yandex.net; dkim=pass header.i=@narod.ru From: CrazyCat To: linux-media Cc: Antti Palosaari Subject: Re: [PATCH] si2168: DVB-T2 PLP selection implemented Date: Sun, 17 Aug 2014 00:33:14 +0300 Message-ID: <7423442.VCBAbZjIjj@computer> User-Agent: KMail/4.13.1 (Linux/3.13.0-24-generic; KDE/4.13.1; x86_64; ; ) MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DVB-T2 PLP selection implemented for Si2168 demod. Tested with PCTV 292e. Signed-off-by: Evgeny Plehov Acked-by: Antti Palosaari Reviewed-by: Antti Palosaari --- drivers/media/dvb-frontends/si2168.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 37f3f92..9c41281 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -168,10 +168,10 @@ static int si2168_set_frontend(struct dvb_frontend *fe) u8 bandwidth, delivery_system; dev_dbg(&s->client->dev, - "%s: delivery_system=%u modulation=%u frequency=%u bandwidth_hz=%u symbol_rate=%u inversion=%u\n", + "%s: delivery_system=%u modulation=%u frequency=%u bandwidth_hz=%u symbol_rate=%u inversion=%u, stream_id=%d\n", __func__, c->delivery_system, c->modulation, c->frequency, c->bandwidth_hz, c->symbol_rate, - c->inversion); + c->inversion, c->stream_id); if (!s->active) { ret = -EAGAIN; @@ -235,6 +235,18 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + if (c->delivery_system == SYS_DVBT2) { + /* select PLP */ + cmd.args[0] = 0x52; + cmd.args[1] = c->stream_id & 0xff; + cmd.args[2] = c->stream_id == NO_STREAM_ID_FILTER ? 0 : 1; + cmd.wlen = 3; + cmd.rlen = 1; + ret = si2168_cmd_execute(s, &cmd); + if (ret) + goto err; + } + memcpy(cmd.args, "\x51\x03", 2); cmd.wlen = 2; cmd.rlen = 12;