Re: [linux-dvb] [patch] Improvement dvb-s2 lock with KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2
+reg = STB0899_READ_S2REG( STB0899_S2DEMOD, DMD_CNTRL2 ); +STB0899_SETFIELD_VAL( SPECTRUM_INVERT, reg, 1 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg ); Why do you forcefully invert the I/Q inputs ? Different hardware have different configurations. yes, there are different hardware configurations, so with this patch the algo find automatically the good configuration. This is an initialiation, I begin with a I/Q configuration, if failure the configuration is inverted. Q) Does it work for you, if you started with SWAP_OFF, rather than SWAP_ON, retaining your logic. Or do you see any other issues/degradation when you change the initial INVERSION state ? Currently there will be a case of inversion in your logic, but for the hardware that we have and given the networks, the chances of finding an inversion is much less. Can you please check whether INVERSION_OFF in the initial case does work better still, if not worser ? Hi, I do the test : trying 100 zap ( 47 on dvb-s, 53 on dvb-s2 ) with zsap2 on the card KNC1 if I start with SWAP_OFF: I obtain 97 lock successfully if I start with SWAP_ON: I obtain 99 lock successfully the failures are not on the same transponder. So, I think the initial state doesn't have influence on the result. Regards, JLac ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [patch] Improvement dvb-s2 lock with KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2
jlac vdr wrote: Hi, This is a patch which improve locking on dvb-s2 channels for card using stb0899 (KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2) Can you please explain what your patch is trying to do ? I couldn't understand what you are trying to do. Also did you check with the KNC1 and the Satelco cards whether your patch, brings in an improvement on the LOCK 'ing ? If so, what improvement do you see ? With the current tree i get a lock within less than half a second. ~ 300 - 400 mS. (A bit hard to measure) Do you get a LOCK faster than that ? Regards, Manu ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [patch] Improvement dvb-s2 lock with KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2
2007/10/9, Manu Abraham [EMAIL PROTECTED]: jlacvdr wrote: I rewrote a part of stb0899_dvbs2_algo( ) to remove duplicate source code and to get a source code more readable. I added also re-initialization of some registers. The result is a lower probability to don't obtain the lock. I tested on TT-s2 3200 and on Knc1 dvb-s2 plus. It must work on other cards, the patch touch only stb0899 part. I don't remember the time duration to lock, but if you want I can measure it. The aim of this patch, it's obtain the lock all the time. Regards, I doubt whether there is a problem in acquiring LOCK on the KNC1, Satelco and the TT cards. without the patch, I can't lock all the time, and it's seems that other persons have the same problem. Julian, Marco can you guys please confirm ? Let me walk through your patch (I feel something wrong in the patch) --- linux/drivers/media/dvb/frontends/stb0899_algo.c.org2007-10-08 21:25:09.0 +0200 +++ linux/drivers/media/dvb/frontends/stb0899_algo.c2007-10-08 21:25:06.0 +0200 @@ -1351,7 +1351,17 @@ s32 offsetfreq, searchTime, FecLockTime, pilots, iqSpectrum; int i = 0; +int cpt = 0; u32 reg, csm1; +s32 retry = 0; + + +reg = STB0899_READ_S2REG( STB0899_S2DEMOD, DMD_CNTRL2 ); +STB0899_SETFIELD_VAL( SPECTRUM_INVERT, reg, 1 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg ); Why do you forcefully invert the I/Q inputs ? Different hardware have different configurations. yes, there are different hardware configurations, so with this patch the algo find automatically the good configuration. This is an initialiation, I begin with a I/Q configuration, if failure the configuration is inverted. + +do +{ if (internal-srate = 200) { searchTime = 5000; /* 5000 ms max time to lock UWP and CSM, SYMB = 2Mbs */ @@ -1381,9 +1391,16 @@ STB0899_SETFIELD_VAL(FRESRS, reg, 1); stb0899_write_reg(state, STB0899_TSTRES, reg); +reg = STB0899_READ_S2REG( STB0899_S2DEMOD, CRL_NOM_FREQ ); +STB0899_SETFIELD_VAL( CRL_NOM_FREQ, reg, 0xd0 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, 0xd0 ); + You read Nominal Frequency into reg, set 208 Hz into reg, ignore reg .. After which you forcefully enter 208 Hz into the Complex mixer straight away. Even if you required to reprogram the mixer to 208 Hz, i don't see then why do you need the Complex mixer current setting as a part of the Carrier Recovery ? But, i don't see this magic frequency in any of the specs from STM. Although one question i have, irrespective to your patch, does setting the Complex Mixer to 0 Hz (30 bit unsigned) help in your case, as applicable to you ? Before starting acquisition, I restore the initial conditions. The 208 is the initial value of nominal frequency in CRL_NOM_FREQ register. (can be found is the datasheet) /* Move tuner to frequency */ if (state-config-tuner_set_frequency) state-config-tuner_set_frequency(state-frontend, internal-freq); + +msleep( 100 ); + if (state-config-tuner_get_frequency) state-config-tuner_get_frequency(state-frontend, internal-freq); @@ -1400,23 +1417,13 @@ /* Initialisation */ stb0899_dvbs2_init_calc(state); - reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); - switch (internal-inversion) { - case IQ_SWAP_OFF: - STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 0); - break; - case IQ_SWAP_ON: - STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 1); - break; - case IQ_SWAP_AUTO: /* use last successful search first */ - STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 1); - break; - } - stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL, 0x0005 ); + stb0899_dvbs2_reacquire(state); /* Wait for demod lock (UWP and CSM)*/ internal-status = stb0899_dvbs2_get_dmd_status(state, searchTime); +cpt++; if (internal-status == DVBS2_DEMOD_LOCK) { dprintk(state-verbose, FE_DEBUG, 1, DVB-S2 DEMOD LOCK !); @@ -1432,51 +1439,28 @@ /* Set the Nominal frequency to the found frequency offset for the next reacquire*/ reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_NOM_FREQ); STB0899_SETFIELD_VAL(CRL_NOM_FREQ, reg, offsetfreq); - stb0899_write_s2reg(state, STB0899_S2DEMOD,
Re: [linux-dvb] [patch] Improvement dvb-s2 lock with KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2
jlacvdr wrote: 2007/10/9, Manu Abraham [EMAIL PROTECTED]: jlacvdr wrote: I rewrote a part of stb0899_dvbs2_algo( ) to remove duplicate source code and to get a source code more readable. I added also re-initialization of some registers. The result is a lower probability to don't obtain the lock. I tested on TT-s2 3200 and on Knc1 dvb-s2 plus. It must work on other cards, the patch touch only stb0899 part. I don't remember the time duration to lock, but if you want I can measure it. The aim of this patch, it's obtain the lock all the time. Regards, I doubt whether there is a problem in acquiring LOCK on the KNC1, Satelco and the TT cards. without the patch, I can't lock all the time, and it's seems that other persons have the same problem. Some cards, yes. What transponder where you trying to tune with KNC1 card and having issues ? Julian, Marco can you guys please confirm ? Let me walk through your patch (I feel something wrong in the patch) --- linux/drivers/media/dvb/frontends/stb0899_algo.c.org2007-10-08 21:25:09.0 +0200 +++ linux/drivers/media/dvb/frontends/stb0899_algo.c2007-10-08 21:25:06.0 +0200 @@ -1351,7 +1351,17 @@ s32 offsetfreq, searchTime, FecLockTime, pilots, iqSpectrum; int i = 0; +int cpt = 0; u32 reg, csm1; +s32 retry = 0; + + +reg = STB0899_READ_S2REG( STB0899_S2DEMOD, DMD_CNTRL2 ); +STB0899_SETFIELD_VAL( SPECTRUM_INVERT, reg, 1 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg ); Why do you forcefully invert the I/Q inputs ? Different hardware have different configurations. yes, there are different hardware configurations, so with this patch the algo find automatically the good configuration. This is an initialiation, I begin with a I/Q configuration, if failure the configuration is inverted. Q) Does it work for you, if you started with SWAP_OFF, rather than SWAP_ON, retaining your logic. Or do you see any other issues/degradation when you change the initial INVERSION state ? Currently there will be a case of inversion in your logic, but for the hardware that we have and given the networks, the chances of finding an inversion is much less. Can you please check whether INVERSION_OFF in the initial case does work better still, if not worser ? + +do +{ if (internal-srate = 200) { searchTime = 5000; /* 5000 ms max time to lock UWP and CSM, SYMB = 2Mbs */ @@ -1381,9 +1391,16 @@ STB0899_SETFIELD_VAL(FRESRS, reg, 1); stb0899_write_reg(state, STB0899_TSTRES, reg); +reg = STB0899_READ_S2REG( STB0899_S2DEMOD, CRL_NOM_FREQ ); +STB0899_SETFIELD_VAL( CRL_NOM_FREQ, reg, 0xd0 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, 0xd0 ); + You read Nominal Frequency into reg, set 208 Hz into reg, ignore reg .. After which you forcefully enter 208 Hz into the Complex mixer straight away. Even if you required to reprogram the mixer to 208 Hz, i don't see then why do you need the Complex mixer current setting as a part of the Carrier Recovery ? But, i don't see this magic frequency in any of the specs from STM. Although one question i have, irrespective to your patch, does setting the Complex Mixer to 0 Hz (30 bit unsigned) help in your case, as applicable to you ? Before starting acquisition, I restore the initial conditions. The 208 is the initial value of nominal frequency in CRL_NOM_FREQ register. (can be found is the datasheet) Ok. reasonable, missed that one. Thanks for pointing it out. Will test it out, but please do see the first question that i raised. Manu ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
Re: [linux-dvb] [patch] Improvement dvb-s2 lock with KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2
Hi, Manu Abraham wrote: I doubt whether there is a problem in acquiring LOCK on the KNC1, Satelco and the TT cards. Julian, Marco can you guys please confirm ? I don't see any change here in behaviour with my SkyStar HD. The RTL transponder still doesn't tune faster and it takes equally _long_ to tune to a different transponder when switching away from the still not successfully tuned RTL transponder. But I must admit that I do not have any figures for an objective comparison. Bye. -- Dipl.-Inform. (FH) Reinhard Nissl mailto:[EMAIL PROTECTED] ___ linux-dvb mailing list linux-dvb@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb
[linux-dvb] [patch] Improvement dvb-s2 lock with KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2
Hi, This is a patch which improve locking on dvb-s2 channels for card using stb0899 (KNC1 DVB-S2 Plus, Satelco DVB-S2, TT S2 3200, Technisat DVB-S2) Regards, JLac --- linux/drivers/media/dvb/frontends/stb0899_algo.c.org 2007-10-08 21:25:09.0 +0200 +++ linux/drivers/media/dvb/frontends/stb0899_algo.c 2007-10-08 21:25:06.0 +0200 @@ -1351,7 +1351,17 @@ s32 offsetfreq, searchTime, FecLockTime, pilots, iqSpectrum; int i = 0; +int cpt = 0; u32 reg, csm1; +s32 retry = 0; + + +reg = STB0899_READ_S2REG( STB0899_S2DEMOD, DMD_CNTRL2 ); +STB0899_SETFIELD_VAL( SPECTRUM_INVERT, reg, 1 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg ); + +do +{ if (internal-srate = 200) { searchTime = 5000; /* 5000 ms max time to lock UWP and CSM, SYMB = 2Mbs */ @@ -1381,9 +1391,16 @@ STB0899_SETFIELD_VAL(FRESRS, reg, 1); stb0899_write_reg(state, STB0899_TSTRES, reg); +reg = STB0899_READ_S2REG( STB0899_S2DEMOD, CRL_NOM_FREQ ); +STB0899_SETFIELD_VAL( CRL_NOM_FREQ, reg, 0xd0 ); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, 0xd0 ); + /* Move tuner to frequency */ if (state-config-tuner_set_frequency) state-config-tuner_set_frequency(state-frontend, internal-freq); + +msleep( 100 ); + if (state-config-tuner_get_frequency) state-config-tuner_get_frequency(state-frontend, internal-freq); @@ -1400,23 +1417,13 @@ /* Initialisation */ stb0899_dvbs2_init_calc(state); - reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); - switch (internal-inversion) { - case IQ_SWAP_OFF: - STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 0); - break; - case IQ_SWAP_ON: - STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 1); - break; - case IQ_SWAP_AUTO: /* use last successful search first */ - STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, 1); - break; - } - stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL, 0x0005 ); + stb0899_dvbs2_reacquire(state); /* Wait for demod lock (UWP and CSM) */ internal-status = stb0899_dvbs2_get_dmd_status(state, searchTime); +cpt++; if (internal-status == DVBS2_DEMOD_LOCK) { dprintk(state-verbose, FE_DEBUG, 1, DVB-S2 DEMOD LOCK !); @@ -1432,51 +1439,28 @@ /* Set the Nominal frequency to the found frequency offset for the next reacquire*/ reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_NOM_FREQ); STB0899_SETFIELD_VAL(CRL_NOM_FREQ, reg, offsetfreq); - stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, reg); +stb0899_write_s2reg( state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, + STB0899_OFF0_CRL_NOM_FREQ, offsetfreq ); stb0899_dvbs2_reacquire(state); internal-status = stb0899_dvbs2_get_fec_status(state, searchTime); i++; } } - if (internal-status != DVBS2_FEC_LOCK) { - if (internal-inversion == IQ_SWAP_AUTO) { +if( internal-status != DVBS2_FEC_LOCK ) +{ +/* IQ Inversion */ reg = STB0899_READ_S2REG(STB0899_S2DEMOD, DMD_CNTRL2); iqSpectrum = STB0899_GETFIELD(SPECTRUM_INVERT, reg); /* IQ Spectrum Inversion */ STB0899_SETFIELD_VAL(SPECTRUM_INVERT, reg, !iqSpectrum); stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_DMD_CNTRL2, STB0899_OFF0_DMD_CNTRL2, reg); - /* start acquistion process */ - stb0899_dvbs2_reacquire(state); - /* Wait for demod lock (UWP and CSM) */ - internal-status = stb0899_dvbs2_get_dmd_status(state, searchTime); - if (internal-status == DVBS2_DEMOD_LOCK) { -i = 0; -/* Demod Locked, check FEC */ -internal-status = stb0899_dvbs2_get_fec_status(state, FecLockTime); -/*try thrice for false locks, (UWP and CSM Locked but no FEC) */ -while ((internal-status != DVBS2_FEC_LOCK) (i 3)) { - /* Read the frequency offset*/ - offsetfreq = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_FREQ); +} +else +{ - /* Set the Nominal frequency to the found frequency offset for the next reacquire*/ - reg = STB0899_READ_S2REG(STB0899_S2DEMOD, CRL_NOM_FREQ); - STB0899_SETFIELD_VAL(CRL_NOM_FREQ, reg, offsetfreq); - stb0899_write_s2reg(state, STB0899_S2DEMOD, STB0899_BASE_CRL_NOM_FREQ, STB0899_OFF0_CRL_NOM_FREQ, reg); - stb0899_dvbs2_reacquire(state); - internal-status = stb0899_dvbs2_get_fec_status(state, searchTime); - i++; -} - } -/* - if (pParams-DVBS2State == FE_DVBS2_FEC_LOCKED) -pParams-IQLocked = !iqSpectrum; -*/ - } - } - if (internal-status == DVBS2_FEC_LOCK) { dprintk(state-verbose, FE_DEBUG, 1, DVB-S2 FEC Lock !); reg = STB0899_READ_S2REG(STB0899_S2DEMOD, UWP_STAT2); modcod = STB0899_GETFIELD(UWP_DECODE_MOD, reg)