Commit 593a2ce0 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Mauro Carvalho Chehab

[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: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6d535bd8
...@@ -228,8 +228,7 @@ static int m88rs2000_send_diseqc_burst(struct dvb_frontend *fe, ...@@ -228,8 +228,7 @@ static int m88rs2000_send_diseqc_burst(struct dvb_frontend *fe,
msleep(50); msleep(50);
reg0 = m88rs2000_demod_read(state, 0xb1); reg0 = m88rs2000_demod_read(state, 0xb1);
reg1 = m88rs2000_demod_read(state, 0xb2); reg1 = m88rs2000_demod_read(state, 0xb2);
if (burst == SEC_MINI_B) /* TODO complete this section */
reg1 |= 0x1;
m88rs2000_demod_write(state, 0xb2, reg1); m88rs2000_demod_write(state, 0xb2, reg1);
m88rs2000_demod_write(state, 0xb1, reg0); m88rs2000_demod_write(state, 0xb1, reg0);
m88rs2000_demod_write(state, 0x9a, 0xb0); 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,13 +250,12 @@ static int m88rs2000_set_tone(struct dvb_frontend *fe, fe_sec_tone_mode_t tone)
case SEC_TONE_ON: case SEC_TONE_ON:
reg0 |= 0x4; reg0 |= 0x4;
reg0 &= 0xbc; reg0 &= 0xbc;
break; break;
case SEC_TONE_OFF: case SEC_TONE_OFF:
reg1 |= 0x80; reg1 |= 0x80;
break; break;
default: default:
return -EINVAL; break;
} }
m88rs2000_demod_write(state, 0xb2, reg1); m88rs2000_demod_write(state, 0xb2, reg1);
m88rs2000_demod_write(state, 0xb1, reg0); m88rs2000_demod_write(state, 0xb1, reg0);
...@@ -292,6 +290,7 @@ struct inittab m88rs2000_setup[] = { ...@@ -292,6 +290,7 @@ struct inittab m88rs2000_setup[] = {
{DEMOD_WRITE, 0xf0, 0x22}, {DEMOD_WRITE, 0xf0, 0x22},
{DEMOD_WRITE, 0xf1, 0xbf}, {DEMOD_WRITE, 0xf1, 0xbf},
{DEMOD_WRITE, 0xb0, 0x45}, {DEMOD_WRITE, 0xb0, 0x45},
{DEMOD_WRITE, 0xb2, 0x01}, /* set voltage pin always set 1*/
{DEMOD_WRITE, 0x9a, 0xb0}, {DEMOD_WRITE, 0x9a, 0xb0},
{0xff, 0xaa, 0xff} {0xff, 0xaa, 0xff}
}; };
...@@ -520,9 +519,9 @@ static int m88rs2000_set_tuner_rf(struct dvb_frontend *fe) ...@@ -520,9 +519,9 @@ static int m88rs2000_set_tuner_rf(struct dvb_frontend *fe)
int reg; int reg;
reg = m88rs2000_tuner_read(state, 0x3d); reg = m88rs2000_tuner_read(state, 0x3d);
reg &= 0x7f; reg &= 0x7f;
if (reg < 0x17) if (reg < 0x16)
reg = 0xa1; reg = 0xa1;
else if (reg < 0x16) else if (reg == 0x16)
reg = 0x99; reg = 0x99;
else else
reg = 0xf9; reg = 0xf9;
...@@ -901,5 +900,5 @@ EXPORT_SYMBOL(m88rs2000_attach); ...@@ -901,5 +900,5 @@ EXPORT_SYMBOL(m88rs2000_attach);
MODULE_DESCRIPTION("M88RS2000 DVB-S Demodulator driver"); MODULE_DESCRIPTION("M88RS2000 DVB-S Demodulator driver");
MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_VERSION("1.12"); MODULE_VERSION("1.13");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment