Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113954
b: refs/heads/master
c: 3f8e51a
h: refs/heads/master
v: v3
  • Loading branch information
Igor M. Liplianin authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent e982610 commit f9b2563
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4e54676895a867621f8451b8d97549172730997d
refs/heads/master: 3f8e51add2b7d37f16343e6bdcc63862d87ccd04
37 changes: 31 additions & 6 deletions trunk/drivers/media/dvb/frontends/cx24116.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
* Sync with legacy version.
* Some clean ups.
*/
/* Updates by Igor Liplianin
*
* September, 9th 2008
* Fixed locking on high symbol rates (>30000).
*/

#include <linux/slab.h>
#include <linux/kernel.h>
Expand Down Expand Up @@ -809,7 +814,7 @@ static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
struct tv_frontend_properties *c = &fe->tv_property_cache;
struct cx24116_cmd cmd;
fe_status_t tunerstat;
int ret;
int ret, above30msps;
u8 retune=4;

dprintk("%s()\n",__func__);
Expand Down Expand Up @@ -839,6 +844,16 @@ static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
if (state->config->set_ts_params)
state->config->set_ts_params(fe, 0);

above30msps = (state->dcur.symbol_rate > 30000000);

if (above30msps){
cx24116_writereg(state, 0xF9, 0x01);
cx24116_writereg(state, 0xF3, 0x44);
} else {
cx24116_writereg(state, 0xF9, 0x00);
cx24116_writereg(state, 0xF3, 0x46);
}

/* Prepare a tune request */
cmd.args[0x00] = CMD_TUNEREQUEST;

Expand Down Expand Up @@ -866,11 +881,21 @@ static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
cmd.args[0x0b] = 0x00;
cmd.args[0x0c] = 0x02;
cmd.args[0x0d] = state->dcur.fec_mask;
cmd.args[0x0e] = 0x06;
cmd.args[0x0f] = 0x00;
cmd.args[0x10] = 0x00;
cmd.args[0x11] = 0xFA;
cmd.args[0x12] = 0x24;

if (above30msps){
cmd.args[0x0e] = 0x04;
cmd.args[0x0f] = 0x00;
cmd.args[0x10] = 0x01;
cmd.args[0x11] = 0x77;
cmd.args[0x12] = 0x36;
} else {
cmd.args[0x0e] = 0x06;
cmd.args[0x0f] = 0x00;
cmd.args[0x10] = 0x00;
cmd.args[0x11] = 0xFA;
cmd.args[0x12] = 0x24;
}

cmd.len= 0x13;

/* We need to support pilot and non-pilot tuning in the
Expand Down

0 comments on commit f9b2563

Please sign in to comment.