diff options
author | Malcolm Priestley <tvboxspy@gmail.com> | 2012-03-14 15:31:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-03-19 18:51:03 -0400 |
commit | 593a2ce0ae22188538d27933236a6acab57a0e65 (patch) | |
tree | 53b662a1c01c56786d8858aec2d68bf108409da4 /drivers/media/dvb | |
parent | 6d535bd8829b18c6b5276d65f8f25e57dd0bcbed (diff) |
[media] m88rs2000 ver 1.13 Correct deseqc and tuner gain functions
Remove incorrect SEC_MINI_B settings-TODO complete this section.
Correct break and remove return -EINVAL within set tone. It appears
there is a bug that occasionally something other than ON/OFF is
sent stalling the driver. Just continue and write back registers.
Set register b2 in setup. This is the set voltage pin which
isn't used in lmedm04 driver but it is always set to 0x1.
Correct the if statements in set_tuner_rf.
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r-- | drivers/media/dvb/frontends/m88rs2000.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/m88rs2000.c b/drivers/media/dvb/frontends/m88rs2000.c index b0f4b9fcb15d..045ee5a6f7ae 100644 --- a/drivers/media/dvb/frontends/m88rs2000.c +++ b/drivers/media/dvb/frontends/m88rs2000.c | |||
@@ -228,8 +228,7 @@ static int m88rs2000_send_diseqc_burst(struct dvb_frontend *fe, | |||
228 | msleep(50); | 228 | msleep(50); |
229 | reg0 = m88rs2000_demod_read(state, 0xb1); | 229 | reg0 = m88rs2000_demod_read(state, 0xb1); |
230 | reg1 = m88rs2000_demod_read(state, 0xb2); | 230 | reg1 = m88rs2000_demod_read(state, 0xb2); |
231 | if (burst == SEC_MINI_B) | 231 | /* TODO complete this section */ |
232 | reg1 |= 0x1; | ||
233 | m88rs2000_demod_write(state, 0xb2, reg1); | 232 | m88rs2000_demod_write(state, 0xb2, reg1); |
234 | m88rs2000_demod_write(state, 0xb1, reg0); | 233 | m88rs2000_demod_write(state, 0xb1, reg0); |
235 | m88rs2000_demod_write(state, 0x9a, 0xb0); | 234 | m88rs2000_demod_write(state, 0x9a, 0xb0); |
@@ -251,13 +250,12 @@ static int m88rs2000_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone) | |||
251 | case SEC_TONE_ON: | 250 | case SEC_TONE_ON: |
252 | reg0 |= 0x4; | 251 | reg0 |= 0x4; |
253 | reg0 &= 0xbc; | 252 | reg0 &= 0xbc; |
254 | break; | 253 | break; |
255 | case SEC_TONE_OFF: | 254 | case SEC_TONE_OFF: |
256 | reg1 |= 0x80; | 255 | reg1 |= 0x80; |
257 | break; | 256 | break; |
258 | |||
259 | default: | 257 | default: |
260 | return -EINVAL; | 258 | break; |
261 | } | 259 | } |
262 | m88rs2000_demod_write(state, 0xb2, reg1); | 260 | m88rs2000_demod_write(state, 0xb2, reg1); |
263 | m88rs2000_demod_write(state, 0xb1, reg0); | 261 | m88rs2000_demod_write(state, 0xb1, reg0); |
@@ -292,6 +290,7 @@ struct inittab m88rs2000_setup[] = { | |||
292 | {DEMOD_WRITE, 0xf0, 0x22}, | 290 | {DEMOD_WRITE, 0xf0, 0x22}, |
293 | {DEMOD_WRITE, 0xf1, 0xbf}, | 291 | {DEMOD_WRITE, 0xf1, 0xbf}, |
294 | {DEMOD_WRITE, 0xb0, 0x45}, | 292 | {DEMOD_WRITE, 0xb0, 0x45}, |
293 | {DEMOD_WRITE, 0xb2, 0x01}, /* set voltage pin always set 1*/ | ||
295 | {DEMOD_WRITE, 0x9a, 0xb0}, | 294 | {DEMOD_WRITE, 0x9a, 0xb0}, |
296 | {0xff, 0xaa, 0xff} | 295 | {0xff, 0xaa, 0xff} |
297 | }; | 296 | }; |
@@ -520,9 +519,9 @@ static int m88rs2000_set_tuner_rf(struct dvb_frontend *fe) | |||
520 | int reg; | 519 | int reg; |
521 | reg = m88rs2000_tuner_read(state, 0x3d); | 520 | reg = m88rs2000_tuner_read(state, 0x3d); |
522 | reg &= 0x7f; | 521 | reg &= 0x7f; |
523 | if (reg < 0x17) | 522 | if (reg < 0x16) |
524 | reg = 0xa1; | 523 | reg = 0xa1; |
525 | else if (reg < 0x16) | 524 | else if (reg == 0x16) |
526 | reg = 0x99; | 525 | reg = 0x99; |
527 | else | 526 | else |
528 | reg = 0xf9; | 527 | reg = 0xf9; |
@@ -901,5 +900,5 @@ EXPORT_SYMBOL(m88rs2000_attach); | |||
901 | MODULE_DESCRIPTION("M88RS2000 DVB-S Demodulator driver"); | 900 | MODULE_DESCRIPTION("M88RS2000 DVB-S Demodulator driver"); |
902 | MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); | 901 | MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); |
903 | MODULE_LICENSE("GPL"); | 902 | MODULE_LICENSE("GPL"); |
904 | MODULE_VERSION("1.12"); | 903 | MODULE_VERSION("1.13"); |
905 | 904 | ||