android_kernel_motorola_sm6225/drivers/media/common/siano
Mauro Carvalho Chehab 773adad141 [media] siano: fix status report with old firmware and ISDB-T
This seems to be ever broken. That's the status report with
Firmware 2.1, before adding support for sms2270 is:
[22273.787218] smsdvb_onresponse: MSG_SMS_GET_STATISTICS_RES
[22273.792592] IsRfLocked = 1
[22273.792592] IsDemodLocked = 1
...
[22273.792598] TransmissionMode = -64
...
(all unshown fields are filled with zeros)
Of course, transmission mode being a negative number is wrong.
So, we need to take a deeper look on it.
With the debugfs patches applied, it is possible to see that, instead
of filling StatisticsType with 5, and FullSize with the size of the
payload (this is what happens with sms2270 and firmware 8.1),
those fields are also initialized with zero:
StatisticsType = 0	FullSize = 0
IsRfLocked = 1		IsDemodLocked = 1	IsExternalLNAOn = 0
SNR = 0 dB		RSSI = 0 dBm		InBandPwr = 0 dBm
CarrierOffset = 0	Bandwidth = 0		Frequency = 0 Hz
TransmissionMode = -64	ModemState = 0		GuardInterval = 0
SystemType = 0		PartialReception = 0	NumOfLayers = 0
SmsToHostTxErrors = 0
The data under "TransmissionMode" varies according with the signal,
and it is negative. It also matches the value for InBandPwr when
the tuner is on DVB-T (ok, signal doesn't lock, but the power level
should be about the same with the antena fixed, and measured at about
the same time).
So, there's a very high chance that, when StatisticsType is zero, the
signal strength is at the same position as Transmission Mode.
So, discard all other parameters, and provide only signal/rf lock and
signal strength if StatisticsType is 0, for ISDB-T.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21 07:52:16 -03:00
..
Kconfig [media] siano: split debugfs code into a separate file 2013-03-21 07:48:41 -03:00
Makefile [media] siano: split debugfs code into a separate file 2013-03-21 07:48:41 -03:00
sms-cards.c [media] siano: add new devices to the Siano Driver 2013-03-21 07:45:06 -03:00
sms-cards.h [media] siano: add new devices to the Siano Driver 2013-03-21 07:45:06 -03:00
smscoreapi.c [media] siano: simplify message endianness logic 2013-03-21 07:46:18 -03:00
smscoreapi.h [media] siano: split debugfs code into a separate file 2013-03-21 07:48:41 -03:00
smsdvb-debugfs.c [media] siano: add two missing fields to ISDB-T stats debugfs 2013-03-21 07:48:49 -03:00
smsdvb-main.c [media] siano: fix status report with old firmware and ISDB-T 2013-03-21 07:52:16 -03:00
smsdvb.h [media] siano: Only feed DVB data when there's a feed 2013-03-21 07:52:05 -03:00
smsendian.c
smsendian.h
smsir.c [media] rc-core: add separate defines for protocol bitmaps and numbers 2012-10-27 11:49:51 -02:00
smsir.h [media] siano: allow compiling it without RC support 2012-10-17 16:59:01 -03:00