diff options
author | Patrick Boettcher <pboettcher@dibcom.fr> | 2009-08-17 11:53:51 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:14:34 -0400 |
commit | 78f3bc631f39fbfa4eaf039f0664265e71f725fb (patch) | |
tree | 6af2db5e12487fd2e65e90b4ba9e73dfb19fbac8 /drivers/media/dvb | |
parent | b8423ee91ff250006907e58099450c923dc19c62 (diff) |
V4L/DVB (12903): DiB8000: fix channel search parameter initialization
This patch is fixing the initialization of the channel search parameters.
Signed-off-by: Olivier Grenie <olivier.grenie@dibcom.fr>
Signed-off-by: Patrick Boettcher <pboettcher@dibcom.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/dib8000.c | 24 |
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 | ||
25 | static int debug = 0; | 25 | static int debug; |
26 | module_param(debug, int, 0644); | 26 | module_param(debug, int, 0644); |
27 | MODULE_PARM_DESC(debug, "turn on debugging (default: 0)"); | 27 | MODULE_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; |