summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-04 14:15:40 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-07 09:59:01 -0300
commit3c0d394ea7022bb9666d9df97a5776c4bcc3045c (patch)
treec08151489642fc8965e2283ff36f23ad625e5a8c
parentecc31d557e0b5fd44d68733188290f4fa56d7db8 (diff)
[media] dib8000: improve the message that reports per-layer locks
The message is currently highly encoded: [70299.863521] DiB8000: Mpeg locks [ L0 : 0 | L1 : 1 | L2 : 0 ] And doesn't properly reflect that some problems might have happened. Instead, display it as: [75160.822321] DiB8000: Not all ISDB-T layers locked in 32 ms: Layer A NOT LOCKED, Layer B locked, Layer C not enabled In order to better reflect what's happening with layer locking. Acked-By: Patrick Boettcher <pboettcher@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r--drivers/media/dvb-frontends/dib8000.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c
index 62214826e115..61e31f2d2f71 100644
--- a/drivers/media/dvb-frontends/dib8000.c
+++ b/drivers/media/dvb-frontends/dib8000.c
@@ -3262,7 +3262,10 @@ static int dib8000_tune(struct dvb_frontend *fe)
case CT_DEMOD_STEP_10: /* 40 */
locks = dib8000_read_lock(fe);
if (locks&(1<<(7-state->longest_intlv_layer))) { /* mpeg lock : check the longest one */
- dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1);
+ dprintk("ISDB-T layer locks: Layer A %s, Layer B %s, Layer C %s",
+ c->layer[0].segment_count ? (locks >> 7) & 0x1 ? "locked" : "NOT LOCKED" : "not enabled",
+ c->layer[1].segment_count ? (locks >> 6) & 0x1 ? "locked" : "NOT LOCKED" : "not enabled",
+ c->layer[2].segment_count ? (locks >> 5) & 0x1 ? "locked" : "NOT LOCKED" : "not enabled");
if (c->isdbt_sb_mode
&& c->isdbt_sb_subchannel < 14
&& !state->differential_constellation)
@@ -3278,8 +3281,13 @@ static int dib8000_tune(struct dvb_frontend *fe)
state->subchannel += 3;
*tune_state = CT_DEMOD_STEP_11;
} else { /* we are done mpeg of the longest interleaver xas not locking but let's try if an other layer has locked in the same time */
- if (locks & (0x7<<5)) {
- dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1);
+ if (locks & (0x7 << 5)) {
+ dprintk("Not all ISDB-T layers locked in %d ms: Layer A %s, Layer B %s, Layer C %s",
+ jiffies_to_msecs(now - *timeout),
+ c->layer[0].segment_count ? (locks >> 7) & 0x1 ? "locked" : "NOT LOCKED" : "not enabled",
+ c->layer[1].segment_count ? (locks >> 6) & 0x1 ? "locked" : "NOT LOCKED" : "not enabled",
+ c->layer[2].segment_count ? (locks >> 5) & 0x1 ? "locked" : "NOT LOCKED" : "not enabled");
+
state->status = FE_STATUS_DATA_LOCKED;
} else
state->status = FE_STATUS_TUNE_FAILED;