aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/frontends/dib8000.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/media/dvb/frontends/dib8000.c b/drivers/media/dvb/frontends/dib8000.c
index 99ee6b09ce1d..852c790d09d9 100644
--- a/drivers/media/dvb/frontends/dib8000.c
+++ b/drivers/media/dvb/frontends/dib8000.c
@@ -22,7 +22,7 @@
22 22
23#define FE_CALLBACK_TIME_NEVER 0xffffffff 23#define FE_CALLBACK_TIME_NEVER 0xffffffff
24 24
25static int debug = 0; 25static int debug;
26module_param(debug, int, 0644); 26module_param(debug, int, 0644);
27MODULE_PARM_DESC(debug, "turn on debugging (default: 0)"); 27MODULE_PARM_DESC(debug, "turn on debugging (default: 0)");
28 28
@@ -1671,10 +1671,6 @@ static int dib8000_autosearch_start(struct dvb_frontend *fe)
1671 1671
1672 int slist = 0; 1672 int slist = 0;
1673 1673
1674 state->fe.dtv_property_cache.transmission_mode = TRANSMISSION_MODE_8K;
1675 state->fe.dtv_property_cache.guard_interval = GUARD_INTERVAL_1_8;
1676 //state->fe.dtv_property_cache.isdbt_sb_mode = 0;
1677 //state->fe.dtv_property_cache.isdbt_partial_reception = 0;
1678 state->fe.dtv_property_cache.inversion = 0; 1674 state->fe.dtv_property_cache.inversion = 0;
1679 if (!state->fe.dtv_property_cache.isdbt_sb_mode) 1675 if (!state->fe.dtv_property_cache.isdbt_sb_mode)
1680 state->fe.dtv_property_cache.layer[0].segment_count = 13; 1676 state->fe.dtv_property_cache.layer[0].segment_count = 13;
@@ -1684,6 +1680,8 @@ static int dib8000_autosearch_start(struct dvb_frontend *fe)
1684 1680
1685 //choose the right list, in sb, always do everything 1681 //choose the right list, in sb, always do everything
1686 if (state->fe.dtv_property_cache.isdbt_sb_mode) { 1682 if (state->fe.dtv_property_cache.isdbt_sb_mode) {
1683 state->fe.dtv_property_cache.transmission_mode = TRANSMISSION_MODE_8K;
1684 state->fe.dtv_property_cache.guard_interval = GUARD_INTERVAL_1_8;
1687 slist = 7; 1685 slist = 7;
1688 dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); 1686 dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13));
1689 } else { 1687 } else {
@@ -1691,22 +1689,21 @@ static int dib8000_autosearch_start(struct dvb_frontend *fe)
1691 if (state->fe.dtv_property_cache.transmission_mode == TRANSMISSION_MODE_AUTO) { 1689 if (state->fe.dtv_property_cache.transmission_mode == TRANSMISSION_MODE_AUTO) {
1692 slist = 7; 1690 slist = 7;
1693 dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); // P_mode = 1 to have autosearch start ok with mode2 1691 dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); // P_mode = 1 to have autosearch start ok with mode2
1694 } else { 1692 } else
1695 slist = 3; 1693 slist = 3;
1696 state->fe.dtv_property_cache.transmission_mode = state->fe.dtv_property_cache.transmission_mode;
1697 }
1698 } else { 1694 } else {
1699 if (state->fe.dtv_property_cache.transmission_mode == TRANSMISSION_MODE_AUTO) { 1695 if (state->fe.dtv_property_cache.transmission_mode == TRANSMISSION_MODE_AUTO) {
1700 slist = 2; 1696 slist = 2;
1701 state->fe.dtv_property_cache.guard_interval = state->fe.dtv_property_cache.guard_interval;
1702 dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); // P_mode = 1 1697 dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); // P_mode = 1
1703 } else { 1698 } else
1704 slist = 0; 1699 slist = 0;
1705 state->fe.dtv_property_cache.transmission_mode = state->fe.dtv_property_cache.transmission_mode;
1706 state->fe.dtv_property_cache.guard_interval = state->fe.dtv_property_cache.guard_interval;
1707 }
1708 } 1700 }
1709 1701
1702 if (state->fe.dtv_property_cache.transmission_mode == TRANSMISSION_MODE_AUTO)
1703 state->fe.dtv_property_cache.transmission_mode = TRANSMISSION_MODE_8K;
1704 if (state->fe.dtv_property_cache.guard_interval == GUARD_INTERVAL_AUTO)
1705 state->fe.dtv_property_cache.guard_interval = GUARD_INTERVAL_1_8;
1706
1710 dprintk("using list for autosearch : %d", slist); 1707 dprintk("using list for autosearch : %d", slist);
1711 dib8000_set_channel(state, (unsigned char)slist, 1); 1708 dib8000_set_channel(state, (unsigned char)slist, 1);
1712 //dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); // P_mode = 1 1709 //dib8000_write_word(state, 0, (dib8000_read_word(state, 0) & 0x9fff) | (1 << 13)); // P_mode = 1
@@ -1733,6 +1730,7 @@ static int dib8000_autosearch_start(struct dvb_frontend *fe)
1733 dib8000_write_word(state, 0, (u16) ((1 << 15) | value)); 1730 dib8000_write_word(state, 0, (u16) ((1 << 15) | value));
1734 dib8000_read_word(state, 1284); // reset the INT. n_irq_pending 1731 dib8000_read_word(state, 1284); // reset the INT. n_irq_pending
1735 dib8000_write_word(state, 0, (u16) value); 1732 dib8000_write_word(state, 0, (u16) value);
1733
1736 } 1734 }
1737 1735
1738 return 0; 1736 return 0;