diff options
Diffstat (limited to 'drivers/media/dvb/frontends/cx24116.c')
-rw-r--r-- | drivers/media/dvb/frontends/cx24116.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/drivers/media/dvb/frontends/cx24116.c b/drivers/media/dvb/frontends/cx24116.c index 1402086a5c44..2ff9e20c595f 100644 --- a/drivers/media/dvb/frontends/cx24116.c +++ b/drivers/media/dvb/frontends/cx24116.c | |||
@@ -30,6 +30,11 @@ | |||
30 | * Sync with legacy version. | 30 | * Sync with legacy version. |
31 | * Some clean ups. | 31 | * Some clean ups. |
32 | */ | 32 | */ |
33 | /* Updates by Igor Liplianin | ||
34 | * | ||
35 | * September, 9th 2008 | ||
36 | * Fixed locking on high symbol rates (>30000). | ||
37 | */ | ||
33 | 38 | ||
34 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
35 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
@@ -809,7 +814,7 @@ static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
809 | struct tv_frontend_properties *c = &fe->tv_property_cache; | 814 | struct tv_frontend_properties *c = &fe->tv_property_cache; |
810 | struct cx24116_cmd cmd; | 815 | struct cx24116_cmd cmd; |
811 | fe_status_t tunerstat; | 816 | fe_status_t tunerstat; |
812 | int ret; | 817 | int ret, above30msps; |
813 | u8 retune=4; | 818 | u8 retune=4; |
814 | 819 | ||
815 | dprintk("%s()\n",__func__); | 820 | dprintk("%s()\n",__func__); |
@@ -839,6 +844,16 @@ static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
839 | if (state->config->set_ts_params) | 844 | if (state->config->set_ts_params) |
840 | state->config->set_ts_params(fe, 0); | 845 | state->config->set_ts_params(fe, 0); |
841 | 846 | ||
847 | above30msps = (state->dcur.symbol_rate > 30000000); | ||
848 | |||
849 | if (above30msps){ | ||
850 | cx24116_writereg(state, 0xF9, 0x01); | ||
851 | cx24116_writereg(state, 0xF3, 0x44); | ||
852 | } else { | ||
853 | cx24116_writereg(state, 0xF9, 0x00); | ||
854 | cx24116_writereg(state, 0xF3, 0x46); | ||
855 | } | ||
856 | |||
842 | /* Prepare a tune request */ | 857 | /* Prepare a tune request */ |
843 | cmd.args[0x00] = CMD_TUNEREQUEST; | 858 | cmd.args[0x00] = CMD_TUNEREQUEST; |
844 | 859 | ||
@@ -866,11 +881,21 @@ static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par | |||
866 | cmd.args[0x0b] = 0x00; | 881 | cmd.args[0x0b] = 0x00; |
867 | cmd.args[0x0c] = 0x02; | 882 | cmd.args[0x0c] = 0x02; |
868 | cmd.args[0x0d] = state->dcur.fec_mask; | 883 | cmd.args[0x0d] = state->dcur.fec_mask; |
869 | cmd.args[0x0e] = 0x06; | 884 | |
870 | cmd.args[0x0f] = 0x00; | 885 | if (above30msps){ |
871 | cmd.args[0x10] = 0x00; | 886 | cmd.args[0x0e] = 0x04; |
872 | cmd.args[0x11] = 0xFA; | 887 | cmd.args[0x0f] = 0x00; |
873 | cmd.args[0x12] = 0x24; | 888 | cmd.args[0x10] = 0x01; |
889 | cmd.args[0x11] = 0x77; | ||
890 | cmd.args[0x12] = 0x36; | ||
891 | } else { | ||
892 | cmd.args[0x0e] = 0x06; | ||
893 | cmd.args[0x0f] = 0x00; | ||
894 | cmd.args[0x10] = 0x00; | ||
895 | cmd.args[0x11] = 0xFA; | ||
896 | cmd.args[0x12] = 0x24; | ||
897 | } | ||
898 | |||
874 | cmd.len= 0x13; | 899 | cmd.len= 0x13; |
875 | 900 | ||
876 | /* We need to support pilot and non-pilot tuning in the | 901 | /* We need to support pilot and non-pilot tuning in the |