Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92484
b: refs/heads/master
c: 02f5f44
h: refs/heads/master
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent de2ea54 commit 1f25a79
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f4173d0f75e55091d8b52145005bee11bc26c046
refs/heads/master: 02f5f4448464fea9c19e6b5ff5c67e874c898834
49 changes: 49 additions & 0 deletions trunk/drivers/media/video/tuner-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,37 @@ static int simple_config_lookup(struct dvb_frontend *fe,

/* ---------------------------------------------------------------------- */

static void simple_set_rf_input(struct dvb_frontend *fe,
u8 *config, u8 *cb, unsigned int rf)
{
struct tuner_simple_priv *priv = fe->tuner_priv;

switch (priv->type) {
case TUNER_PHILIPS_TUV1236D:
switch (rf) {
case 1:
*cb |= 0x08;
break;
default:
*cb &= ~0x08;
break;
}
break;
case TUNER_PHILIPS_ATSC:
switch (rf) {
case 1:
*cb |= 0x01;
break;
default:
*cb &= ~0x01;
break;
}
break;
default:
break;
}
}

static int simple_std_setup(struct dvb_frontend *fe,
struct analog_parameters *params,
u8 *config, u8 *cb)
Expand Down Expand Up @@ -725,6 +756,24 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf,
params->frequency >= 158870000)
buf[3] |= 0x08;
break;
case TUNER_PHILIPS_TUV1236D:
case TUNER_PHILIPS_ATSC:
{
unsigned int new_rf;

switch (params->u.vsb.modulation) {
case QAM_64:
case QAM_256:
new_rf = 1;
break;
case VSB_8:
default:
new_rf = 0;
break;
}
simple_set_rf_input(fe, &buf[2], &buf[3], new_rf);
break;
}
default:
break;
}
Expand Down

0 comments on commit 1f25a79

Please sign in to comment.