diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-04 14:15:40 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-07 10:08:10 -0300 |
commit | 8891fefd50d71a45d05be2a2a195e8194ae0406d (patch) | |
tree | 3ea1076b1d1405f0fecd1b18899b5c13f32cd057 | |
parent | 7ea448ef20e57a3f34804031a2566f0920828935 (diff) | |
download | linux-3.10-8891fefd50d71a45d05be2a2a195e8194ae0406d.tar.gz linux-3.10-8891fefd50d71a45d05be2a2a195e8194ae0406d.tar.bz2 linux-3.10-8891fefd50d71a45d05be2a2a195e8194ae0406d.zip |
upstream: [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>
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=3c0d394ea702
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/dvb-frontends/dib8000.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/dib8000.c b/drivers/media/dvb-frontends/dib8000.c index 62214826e11..61e31f2d2f7 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; |