Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 74915
b: refs/heads/master
c: 2300317
h: refs/heads/master
i:
  74913: 6fa973c
  74911: 1651857
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Dec 13, 2007
1 parent b34292a commit e7f126c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 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: 4b5ae10c815941fab8e0e3b3801b4cb60ee2383a
refs/heads/master: 2300317f30770abd625fb051b0e5d373ce55a6ad
11 changes: 8 additions & 3 deletions trunk/drivers/media/dvb/frontends/s5h1409.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ static struct vsb_snr_tab {
u16 val;
u16 data;
} vsb_snr_tab[] = {
{ 1023, 770, },
{ 924, 300, },
{ 923, 300, },
{ 918, 295, },
{ 915, 290, },
Expand Down Expand Up @@ -154,6 +154,7 @@ static struct qam64_snr_tab {
u16 val;
u16 data;
} qam64_snr_tab[] = {
{ 1, 0, },
{ 12, 300, },
{ 15, 290, },
{ 18, 280, },
Expand Down Expand Up @@ -217,13 +218,15 @@ static struct qam64_snr_tab {
{ 95, 202, },
{ 96, 201, },
{ 104, 200, },
{ 255, 0, },
};

/* QAM256 SNR lookup table */
static struct qam256_snr_tab {
u16 val;
u16 data;
} qam256_snr_tab[] = {
{ 1, 0, },
{ 12, 400, },
{ 13, 390, },
{ 15, 380, },
Expand Down Expand Up @@ -292,6 +295,7 @@ static struct qam256_snr_tab {
{ 105, 262, },
{ 106, 261, },
{ 110, 260, },
{ 255, 0, },
};

/* 8 bit registers, 16 bit values */
Expand Down Expand Up @@ -670,14 +674,15 @@ static int s5h1409_read_snr(struct dvb_frontend* fe, u16* snr)
u16 reg;
dprintk("%s()\n", __FUNCTION__);

reg = s5h1409_readreg(state, 0xf1) & 0x1ff;

switch(state->current_modulation) {
case QAM_64:
reg = s5h1409_readreg(state, 0xf0) & 0xff;
return s5h1409_qam64_lookup_snr(fe, snr, reg);
case QAM_256:
reg = s5h1409_readreg(state, 0xf0) & 0xff;
return s5h1409_qam256_lookup_snr(fe, snr, reg);
case VSB_8:
reg = s5h1409_readreg(state, 0xf1) & 0x3ff;
return s5h1409_vsb_lookup_snr(fe, snr, reg);
default:
break;
Expand Down

0 comments on commit e7f126c

Please sign in to comment.