From: Malcolm Priestley <tvboxspy@gmail.com>
To: Jason Hecker <jwhecker@gmail.com>
Cc: Josu Lazkano <josu.lazkano@gmail.com>,
linux-media <linux-media@vger.kernel.org>
Subject: [PATCH] af9013 Extended monitoring in set_frontend.
Date: Fri, 07 Oct 2011 22:11:34 +0100 [thread overview]
Message-ID: <4e8f6b0b.c90fe30a.4a1d.26bb@mx.google.com> (raw)
In-Reply-To: <CAATJ+fu2W=o_xhsoghK1756ZGCw2g0W_95iYC8OX04AK8jAHLg@mail.gmail.com>
Try this patch, it should stop start up corruption on the same frontend.
It is a missing section of code that checks the frontend is ready to go.
However, it will not stop corruptions on frontend A.
af9013 Extended monitoring in set_front.
---
drivers/media/dvb/frontends/af9013.c | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
index b220a87..347c187 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -622,8 +622,9 @@ static int af9013_set_frontend(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params)
{
struct af9013_state *state = fe->demodulator_priv;
- int ret;
+ int ret, i;
u8 auto_mode; /* auto set TPS */
+ u8 v1, v2;
deb_info("%s: freq:%d bw:%d\n", __func__, params->frequency,
params->u.ofdm.bandwidth);
@@ -694,6 +695,19 @@ static int af9013_set_frontend(struct dvb_frontend *fe,
if (ret)
goto error;
+ for (i = 0; i < 27; ++i) {
+ ret = af9013_read_reg(state, 0x9bc2, &v1);
+ if (ret)
+ break;
+ ret = af9013_read_reg(state, 0xd330, &v2);
+ if (ret)
+ break;
+ if (v1 == 0 && v2 > 0)
+ break;
+ msleep(40);
+ }
+
+
error:
return ret;
}
--
1.7.5.4
next prev parent reply other threads:[~2011-10-07 21:11 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4e83369f.5d6de30a.485b.ffffdc29@mx.google.com>
2011-10-04 19:28 ` [PATCH] af9013 frontend tuner bus lock Josu Lazkano
2011-10-04 20:44 ` Jason Hecker
2011-10-04 21:54 ` Malcolm Priestley
2011-10-04 22:10 ` Jason Hecker
2011-10-05 11:40 ` Josu Lazkano
2011-10-05 22:19 ` Jason Hecker
2011-10-05 23:12 ` Josu Lazkano
2011-10-06 2:39 ` Jason Hecker
2011-10-06 20:07 ` dave cunningham
2011-10-06 21:48 ` Josu Lazkano
2011-10-06 22:34 ` Jason Hecker
2011-10-06 21:13 ` Malcolm Priestley
2011-10-07 21:11 ` Malcolm Priestley [this message]
2011-10-07 22:46 ` [PATCH] af9013 Extended monitoring in set_frontend Jason Hecker
2011-10-08 13:10 ` Malcolm Priestley
2011-10-08 13:13 ` Josu Lazkano
2011-10-08 13:26 ` Malcolm Priestley
2011-10-08 13:42 ` Josu Lazkano
2011-10-08 14:06 ` Antti Palosaari
2011-10-08 20:05 ` Jason Hecker
2011-10-10 19:31 ` Antti Palosaari
2011-10-10 20:27 ` Malcolm Priestley
2011-10-10 21:06 ` Jason Hecker
2011-10-16 20:26 ` Malcolm Priestley
2011-10-16 21:18 ` Jason Hecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4e8f6b0b.c90fe30a.4a1d.26bb@mx.google.com \
--to=tvboxspy@gmail.com \
--cc=josu.lazkano@gmail.com \
--cc=jwhecker@gmail.com \
--cc=linux-media@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.