From patchwork Sun Oct 26 12:10:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Akihiro TSUKADA X-Patchwork-Id: 5153911 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7D689C11AC for ; Sun, 26 Oct 2014 12:10:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A027E20303 for ; Sun, 26 Oct 2014 12:10:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BF66520211 for ; Sun, 26 Oct 2014 12:10:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751513AbaJZMKe (ORCPT ); Sun, 26 Oct 2014 08:10:34 -0400 Received: from mail-pd0-f173.google.com ([209.85.192.173]:39360 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751397AbaJZMKe (ORCPT ); Sun, 26 Oct 2014 08:10:34 -0400 Received: by mail-pd0-f173.google.com with SMTP id v10so3988740pde.4 for ; Sun, 26 Oct 2014 05:10:33 -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=oUyKnoRmjeAJNBmnC+sMiTDBswPFBLFg6ItUS+zDgmM=; b=vVEpbUAFzoy+BObUf4+fuYJoBe5s65sFP7MylN/FHPSi4GXDJa5XM0CLQ2kYuCizv+ ZXfB8JZnixSIzlocanbSZO9w0ry5Knjzo9KSvs/Bk5HWKz5dSENsoNb5WGP0CZYdoIh0 S3s1UCezse0jAKuDpGU6OItG4ZwV+xjAGfxt83bcs57axdv7WQ6bea2zeDVOvrTiiHC4 jV6/SH4hzz30BBDJEh4l9plh3D90YzSDbNEz8V3pQyCx6PwL6TyLZkUHcQzc4Kv//G5p 8tAi/W2U7ciS4vpPK8moRPzZ+ERkq/fbrkuRifrDsSGGtPKuM8bsxdb64NoQuQErd6Rn 3bBQ== X-Received: by 10.70.45.40 with SMTP id j8mr2937205pdm.130.1414325433765; Sun, 26 Oct 2014 05:10:33 -0700 (PDT) Received: from seabird.localdomain.localdomain (softbank219203027033.bbtec.net. [219.203.27.33]) by mx.google.com with ESMTPSA id dp4sm8244272pbc.21.2014.10.26.05.10.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 26 Oct 2014 05:10:32 -0700 (PDT) From: tskd08@gmail.com To: linux-media@vger.kernel.org Cc: m.chehab@samsung.com, Akihiro Tsukada Subject: [PATCH] dvb:tc90522: fix stats report Date: Sun, 26 Oct 2014 21:10:24 +0900 Message-Id: <1414325424-16706-1-git-send-email-tskd08@gmail.com> X-Mailer: git-send-email 2.1.2 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 per-transponder symbolrate instead of per-TS one (moved to dvb-core) * add output TS-ID report, which might be useful if an user did not specify stream id or set a wrong one, and the demod chose the first TS_ID found. Signed-off-by: is also missing here. --- 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 */