Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285151
b: refs/heads/master
c: b682ad1
h: refs/heads/master
i:
  285149: 35a3f45
  285147: 5550e0f
  285143: e5203b6
  285135: 8c72105
  285119: a467fa9
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Nov 7, 2011
1 parent 0a51e2d commit ca73dc9
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 10 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: 33cdf5b0e75142096d79cbe3cb7c3dc797499562
refs/heads/master: b682ad1d178d1686a4db07535d1e611342cde012
49 changes: 40 additions & 9 deletions trunk/drivers/media/common/tuners/tda18212.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,24 @@ static int tda18212_set_params(struct dvb_frontend *fe,
int ret, i;
u32 if_khz;
u8 buf[9];
#define DVBT_6 0
#define DVBT_7 1
#define DVBT_8 2
#define DVBT2_6 3
#define DVBT2_7 4
#define DVBT2_8 5
#define DVBC_6 6
#define DVBC_8 7
static const u8 bw_params[][3] = {
/* 0f 13 23 */
{ 0xb3, 0x20, 0x03 }, /* DVB-T 6 MHz */
{ 0xb3, 0x31, 0x01 }, /* DVB-T 7 MHz */
{ 0xb3, 0x22, 0x01 }, /* DVB-T 8 MHz */
{ 0x92, 0x53, 0x03 }, /* DVB-C */
/* reg: 0f 13 23 */
[DVBT_6] = { 0xb3, 0x20, 0x03 },
[DVBT_7] = { 0xb3, 0x31, 0x01 },
[DVBT_8] = { 0xb3, 0x22, 0x01 },
[DVBT2_6] = { 0xbc, 0x20, 0x03 },
[DVBT2_7] = { 0xbc, 0x72, 0x03 },
[DVBT2_8] = { 0xbc, 0x22, 0x01 },
[DVBC_6] = { 0x92, 0x50, 0x03 },
[DVBC_8] = { 0x92, 0x53, 0x03 },
};

dbg("delsys=%d RF=%d BW=%d\n",
Expand All @@ -155,15 +167,34 @@ static int tda18212_set_params(struct dvb_frontend *fe,
switch (c->bandwidth_hz) {
case 6000000:
if_khz = priv->cfg->if_dvbt_6;
i = 0;
i = DVBT_6;
break;
case 7000000:
if_khz = priv->cfg->if_dvbt_7;
i = 1;
i = DVBT_7;
break;
case 8000000:
if_khz = priv->cfg->if_dvbt_8;
i = 2;
i = DVBT_8;
break;
default:
ret = -EINVAL;
goto error;
}
break;
case SYS_DVBT2:
switch (c->bandwidth_hz) {
case 6000000:
if_khz = priv->cfg->if_dvbt2_6;
i = DVBT2_6;
break;
case 7000000:
if_khz = priv->cfg->if_dvbt2_7;
i = DVBT2_7;
break;
case 8000000:
if_khz = priv->cfg->if_dvbt2_8;
i = DVBT2_8;
break;
default:
ret = -EINVAL;
Expand All @@ -172,7 +203,7 @@ static int tda18212_set_params(struct dvb_frontend *fe,
break;
case SYS_DVBC_ANNEX_AC:
if_khz = priv->cfg->if_dvbc;
i = 3;
i = DVBC_8;
break;
default:
ret = -EINVAL;
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/media/common/tuners/tda18212.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ struct tda18212_config {
u16 if_dvbt_6;
u16 if_dvbt_7;
u16 if_dvbt_8;
u16 if_dvbt2_5;
u16 if_dvbt2_6;
u16 if_dvbt2_7;
u16 if_dvbt2_8;
u16 if_dvbc;
};

Expand Down

0 comments on commit ca73dc9

Please sign in to comment.