From patchwork Sun Jan 2 16:47:31 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abylai Ospan X-Patchwork-Id: 446391 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p02GoJSI028748 for ; Sun, 2 Jan 2011 16:50:20 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753897Ab1ABQt5 (ORCPT ); Sun, 2 Jan 2011 11:49:57 -0500 Received: from utm.netup.ru ([193.203.36.250]:57767 "EHLO utm.netup.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751823Ab1ABQt5 (ORCPT ); Sun, 2 Jan 2011 11:49:57 -0500 Received: from alkaloid.netup.ru (alkaloid.netup [10.1.2.137]) by utm.netup.ru (Postfix) with ESMTP id 9368235F4AA; Sun, 2 Jan 2011 19:42:56 +0300 (MSK) Message-ID: <4D20AC23.1080609@netup.ru> Date: Sun, 02 Jan 2011 16:47:31 +0000 From: Abylay Ospan User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: mchehab@infradead.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5 v2] stv0367: implement uncorrected blocks counter. Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Sun, 02 Jan 2011 16:50:20 +0000 (UTC) diff --git a/drivers/media/dvb/frontends/stv0367.c b/drivers/media/dvb/frontends/stv0367.c index b85b9b9..67301a3 100644 --- a/drivers/media/dvb/frontends/stv0367.c +++ b/drivers/media/dvb/frontends/stv0367.c @@ -3327,6 +3327,24 @@ static int stv0367cab_read_snr(struct dvb_frontend *fe, u16 *snr) return 0; } +static int stv0367cab_read_ucblcks(struct dvb_frontend *fe, u32 *ucblocks) +{ + struct stv0367_state *state = fe->demodulator_priv; + int corrected, tscount; + + *ucblocks = (stv0367_readreg(state, R367CAB_RS_COUNTER_5) << 8) + | stv0367_readreg(state, R367CAB_RS_COUNTER_4); + corrected = (stv0367_readreg(state, R367CAB_RS_COUNTER_3) << 8) + | stv0367_readreg(state, R367CAB_RS_COUNTER_2); + tscount = (stv0367_readreg(state, R367CAB_RS_COUNTER_2) << 8) + | stv0367_readreg(state, R367CAB_RS_COUNTER_1); + + dprintk("%s: uncorrected blocks=%d corrected blocks=%d tscount=%d\n", + __func__, *ucblocks, corrected, tscount); + + return 0; +}; + static struct dvb_frontend_ops stv0367cab_ops = { .info = {