static int tda10086_init(struct dvb_frontend* fe)
{
struct tda10086_state* state = fe->demodulator_priv;
+ u8 t22k_off = 0x80;
dprintk ("%s\n", __FUNCTION__);
+ if (state->config->diseqc_tone)
+ t22k_off = 0;
// reset
tda10086_write_byte(state, 0x00, 0x00);
msleep(10);
tda10086_write_byte(state, 0x3d, 0x80);
// setup SEC
- tda10086_write_byte(state, 0x36, 0x80); // all SEC off, no 22k tone
+ tda10086_write_byte(state, 0x36, t22k_off); // all SEC off, 22k tone
tda10086_write_byte(state, 0x34, (((1<<19) * (22000/1000)) / (SACLK/1000))); // } tone frequency
tda10086_write_byte(state, 0x35, (((1<<19) * (22000/1000)) / (SACLK/1000)) >> 8); // }
static int tda10086_set_tone (struct dvb_frontend* fe, fe_sec_tone_mode_t tone)
{
struct tda10086_state* state = fe->demodulator_priv;
+ u8 t22k_off = 0x80;
dprintk ("%s\n", __FUNCTION__);
+ if (state->config->diseqc_tone)
+ t22k_off = 0;
+
switch (tone) {
case SEC_TONE_OFF:
- tda10086_write_byte(state, 0x36, 0x80);
+ tda10086_write_byte(state, 0x36, t22k_off);
break;
case SEC_TONE_ON:
- tda10086_write_byte(state, 0x36, 0x81);
+ tda10086_write_byte(state, 0x36, 0x01 + t22k_off);
break;
}
struct tda10086_state* state = fe->demodulator_priv;
int i;
u8 oldval;
+ u8 t22k_off = 0x80;
dprintk ("%s\n", __FUNCTION__);
+ if (state->config->diseqc_tone)
+ t22k_off = 0;
+
if (cmd->msg_len > 6)
return -EINVAL;
oldval = tda10086_read_byte(state, 0x36);
for(i=0; i< cmd->msg_len; i++) {
tda10086_write_byte(state, 0x48+i, cmd->msg[i]);
}
- tda10086_write_byte(state, 0x36, 0x88 | ((cmd->msg_len - 1) << 4));
+ tda10086_write_byte(state, 0x36, (0x08 + t22k_off)
+ | ((cmd->msg_len - 1) << 4));
tda10086_diseqc_wait(state);
{
struct tda10086_state* state = fe->demodulator_priv;
u8 oldval = tda10086_read_byte(state, 0x36);
+ u8 t22k_off = 0x80;
dprintk ("%s\n", __FUNCTION__);
+ if (state->config->diseqc_tone)
+ t22k_off = 0;
+
switch(minicmd) {
case SEC_MINI_A:
- tda10086_write_byte(state, 0x36, 0x84);
+ tda10086_write_byte(state, 0x36, 0x04 + t22k_off);
break;
case SEC_MINI_B:
- tda10086_write_byte(state, 0x36, 0x86);
+ tda10086_write_byte(state, 0x36, 0x06 + t22k_off);
break;
}
static struct tda10086_config flydvbs = {
.demod_address = 0x0e,
.invert = 0,
+ .diseqc_tone = 0,
};
/* ==================================================================
configure_tda827x_fe(dev, &tda827x_lifeview_config);
break;
case SAA7134_BOARD_FLYDVB_TRIO:
- if(! use_frontend) { //terrestrial
+ if(! use_frontend) { /* terrestrial */
configure_tda827x_fe(dev, &lifeview_trio_config);
- } else { //satellite
+ } else { /* satellite */
dev->dvb.frontend = dvb_attach(tda10086_attach, &flydvbs, &dev->i2c_adap);
if (dev->dvb.frontend) {
if (dvb_attach(tda826x_attach, dev->dvb.frontend, 0x63,