[linux-dvb] [PATCH] cx24123 (NOVA S plus) signal strengh reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sigmund Augdal Helberg wrote:

>>Moreover I do not understand the need of a signed value in our case (AGC accumulator).
>>A negative value should be nonsense and the precision of the positive value is /2 compared
>>to an unsigned one.

> I do not understand this either. It is possible that the register only
> handles 8 bit signed values and the manufaturers decided that the
> interval [-127 127] was better than having only [0 127]. This would also
> make sense considering the comment stating larger is better, but not
> saying anything about the absolute origin of the value.

Ok.

>>>*signal_strength = (cx24123_readreg(state, 0x3b)+0x80) << 8; /* larger =
>>>better */
>>>This would turn the number into an unsigned.
>>
>>Wow. Are you sure of this ?
>>By doing this you add 1000000 to the return value (say 0x23 so 00100011).
>>So now we have 10100011. Look like a negative value in 2's complement format ?
>>I'm lost here :-)
> 
> at this point we are working in maching native ints ie. 32 or 64 bit. So
> 10100011 is actually 00000000000000000000000010100011, so a positive
> value in 2's complement format.

You are right I forget this point.

>>Anyway by doing this, I have:
>>using '/dev/dvb/adapter0/frontend0'
>>FE: Hauppauge Nova-S-Plus CX24123/CX24109 (SAT)
>>signal%: 63| snr%: 00
>>status 1f| signal a300| snr 0000| ber 003fffff| unc 003fffff| FE_HAS_LOCK
>>
>>The signal value (63%) is still very different from what I should have (~70%).
> 
> But much closer than what you had, right? Anyway, could you try these
> three methods (original way, your change and my change) under different
> signal conditions. That would be interresting to see the dynamics of
> things. For instance try to find these values when the cable is
> disconnected.

I'll try differents things (our 3 methods, cable plugged or not and maybe a longer cable to
obtain a small decrease in the signal strength).
Moreover maybe the register (3A) that set the value we should obtain by reading the 3B register
is not set correctly but by reading the specs, everythings seems OK to me (but i'm very far to
be an expert in DVB internals...)

I'll try this right now and keep you posted.

>>I wasn't aware of such things (1's and 2's complement format) until yesterday
>>so anyway I learnt something here :-)
> 
> I learnt this at school some years back, but you know school teachings,
> doesn't really stick.

:-)

Regards

-- 
Romain DEGEZ, System and Network Administrator

SMARTJOG S.A.
16 Place de la R?publique, 75010 Paris, FRANCE
http://www.smartjog.com
Phone :  +33.1.49.96.63.19
Fax :    +33.1.49.96.64.05
Mobile : +33.6.84.24.65.21
romain.degez@xxxxxxxxxxxx


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20060112/2f775b90/signature.pgp

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux