From patchwork Fri Oct 31 13:23:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiro TSUKADA X-Patchwork-Id: 5204411 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 5F7589F30B for ; Fri, 31 Oct 2014 13:23:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B4C320173 for ; Fri, 31 Oct 2014 13:23:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD79520160 for ; Fri, 31 Oct 2014 13:23:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759394AbaJaNX2 (ORCPT ); Fri, 31 Oct 2014 09:23:28 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:43093 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758950AbaJaNX1 (ORCPT ); Fri, 31 Oct 2014 09:23:27 -0400 Received: by mail-pa0-f41.google.com with SMTP id rd3so7731677pab.28 for ; Fri, 31 Oct 2014 06:23:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=cRRPNkvhHWhpQXw6cSjCeyPR2j9avm01+1fCOUqvt9w=; b=BoLzW9SWGC3GahDYGb64bndokytqQdp8BILjqwGqfPR04xRQXPLj+CdY2sQiLQMUJp cCS3rwLRCXb4IMtuTF3I3qkum1IwerjEM/vDxRdJdX8349Rrx44wXyUoZGG7PU33HJtc +AdD3YMH9XYO+xMNnWC5Rcrnn9lqZ38sFpdpn/qFSu3hOk/gfBcdKkHea7qE5BPC3CoM xaqeJj997tmpi7+FEfOGJ3bZc2bnNOiDEK4kC8y4NFa89ZmA/jd9PY7vgWPEFyDjd569 tW3fmyOKrkAesv5Bnhidw89p1WVNn4pSNSHUWDHBVpev0KyI/dx0lSHvwvlz59tz+O7L gsfQ== X-Received: by 10.66.216.232 with SMTP id ot8mr24615101pac.19.1414761807052; Fri, 31 Oct 2014 06:23:27 -0700 (PDT) Received: from seabird.localdomain.localdomain (softbank219203027033.bbtec.net. [219.203.27.33]) by mx.google.com with ESMTPSA id np11sm9942660pdb.78.2014.10.31.06.23.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 31 Oct 2014 06:23:26 -0700 (PDT) From: tskd08@gmail.com To: linux-media@vger.kernel.org Cc: m.chehab@samsung.com, Akihiro Tsukada Subject: [PATCH v2] dvb:tc90522: fix stats report Date: Fri, 31 Oct 2014 22:23:18 +0900 Message-Id: <1414761798-1496-1-git-send-email-tskd08@gmail.com> X-Mailer: git-send-email 2.1.3 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Akihiro Tsukada * report the fixed per-transponder symbolrate instead of per-TS ones * add output TS-ID report Signed-off-by: Akihiro Tsukada --- drivers/media/dvb-frontends/tc90522.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/drivers/media/dvb-frontends/tc90522.c b/drivers/media/dvb-frontends/tc90522.c index bca81ef..b35d65c 100644 --- a/drivers/media/dvb-frontends/tc90522.c +++ b/drivers/media/dvb-frontends/tc90522.c @@ -216,32 +216,30 @@ static int tc90522s_get_frontend(struct dvb_frontend *fe) c->delivery_system = SYS_ISDBS; layers = 0; - ret = reg_read(state, 0xe8, val, 3); + ret = reg_read(state, 0xe6, val, 5); if (ret == 0) { - int slots; u8 v; + c->stream_id = val[0] << 8 | val[1]; + /* high/single layer */ - v = (val[0] & 0x70) >> 4; + v = (val[2] & 0x70) >> 4; c->modulation = (v == 7) ? PSK_8 : QPSK; c->fec_inner = fec_conv_sat[v]; c->layer[0].fec = c->fec_inner; c->layer[0].modulation = c->modulation; - c->layer[0].segment_count = val[1] & 0x3f; /* slots */ + c->layer[0].segment_count = val[3] & 0x3f; /* slots */ /* low layer */ - v = (val[0] & 0x07); + v = (val[2] & 0x07); c->layer[1].fec = fec_conv_sat[v]; if (v == 0) /* no low layer */ c->layer[1].segment_count = 0; else - c->layer[1].segment_count = val[2] & 0x3f; /* slots */ + c->layer[1].segment_count = val[4] & 0x3f; /* slots */ /* actually, BPSK if v==1, but not defined in fe_modulation_t */ c->layer[1].modulation = QPSK; layers = (v > 0) ? 2 : 1; - - slots = c->layer[0].segment_count + c->layer[1].segment_count; - c->symbol_rate = 28860000 * slots / 48; } /* statistics */