Commit 3c0d394e authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[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: default avatarPatrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent ecc31d55
...@@ -3262,7 +3262,10 @@ static int dib8000_tune(struct dvb_frontend *fe) ...@@ -3262,7 +3262,10 @@ static int dib8000_tune(struct dvb_frontend *fe)
case CT_DEMOD_STEP_10: /* 40 */ case CT_DEMOD_STEP_10: /* 40 */
locks = dib8000_read_lock(fe); locks = dib8000_read_lock(fe);
if (locks&(1<<(7-state->longest_intlv_layer))) { /* mpeg lock : check the longest one */ 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 if (c->isdbt_sb_mode
&& c->isdbt_sb_subchannel < 14 && c->isdbt_sb_subchannel < 14
&& !state->differential_constellation) && !state->differential_constellation)
...@@ -3278,8 +3281,13 @@ static int dib8000_tune(struct dvb_frontend *fe) ...@@ -3278,8 +3281,13 @@ static int dib8000_tune(struct dvb_frontend *fe)
state->subchannel += 3; state->subchannel += 3;
*tune_state = CT_DEMOD_STEP_11; *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 */ } 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)) { if (locks & (0x7 << 5)) {
dprintk("Mpeg locks [ L0 : %d | L1 : %d | L2 : %d ]", (locks>>7)&0x1, (locks>>6)&0x1, (locks>>5)&0x1); 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; state->status = FE_STATUS_DATA_LOCKED;
} else } else
state->status = FE_STATUS_TUNE_FAILED; state->status = FE_STATUS_TUNE_FAILED;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment