aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/dvb/siano/smscoreapi.c10
-rw-r--r--drivers/media/dvb/siano/smscoreapi.h303
2 files changed, 154 insertions, 159 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.c b/drivers/media/dvb/siano/smscoreapi.c
index ba72daf5ced0..5e8869a747f9 100644
--- a/drivers/media/dvb/siano/smscoreapi.c
+++ b/drivers/media/dvb/siano/smscoreapi.c
@@ -472,7 +472,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
472{ 472{
473 SmsFirmware_ST *firmware = (SmsFirmware_ST *) buffer; 473 SmsFirmware_ST *firmware = (SmsFirmware_ST *) buffer;
474 SmsMsgHdr_ST *msg; 474 SmsMsgHdr_ST *msg;
475 UINT32 mem_address = firmware->StartAddress; 475 u32 mem_address = firmware->StartAddress;
476 u8 *payload = firmware->Payload; 476 u8 *payload = firmware->Payload;
477 int rc = 0; 477 int rc = 0;
478 478
@@ -496,7 +496,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
496 rc = smscore_sendrequest_and_wait(coredev, msg, 496 rc = smscore_sendrequest_and_wait(coredev, msg,
497 msg->msgLength, 497 msg->msgLength,
498 &coredev->reload_start_done); 498 &coredev->reload_start_done);
499 mem_address = *(UINT32*) &payload[20]; 499 mem_address = *(u32 *) &payload[20];
500 } 500 }
501 501
502 while (size && rc >= 0) 502 while (size && rc >= 0)
@@ -505,8 +505,8 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
505 int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE); 505 int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE);
506 506
507 SMS_INIT_MSG(msg, MSG_SMS_DATA_DOWNLOAD_REQ, 507 SMS_INIT_MSG(msg, MSG_SMS_DATA_DOWNLOAD_REQ,
508 (UINT16)(sizeof(SmsMsgHdr_ST) + 508 (u16)(sizeof(SmsMsgHdr_ST) +
509 sizeof(UINT32) + payload_size)); 509 sizeof(u32) + payload_size));
510 510
511 DataMsg->MemAddr = mem_address; 511 DataMsg->MemAddr = mem_address;
512 memcpy(DataMsg->Payload, payload, payload_size); 512 memcpy(DataMsg->Payload, payload, payload_size);
@@ -528,7 +528,7 @@ int smscore_load_firmware_family2(smscore_device_t *coredev, void *buffer,
528 528
529 SMS_INIT_MSG(msg, MSG_SMS_SWDOWNLOAD_TRIGGER_REQ, 529 SMS_INIT_MSG(msg, MSG_SMS_SWDOWNLOAD_TRIGGER_REQ,
530 sizeof(SmsMsgHdr_ST) + 530 sizeof(SmsMsgHdr_ST) +
531 sizeof(UINT32) * 5); 531 sizeof(u32) * 5);
532 532
533 TriggerMsg->msgData[0] = firmware->StartAddress; // Entry point 533 TriggerMsg->msgData[0] = firmware->StartAddress; // Entry point
534 TriggerMsg->msgData[1] = 5; // Priority 534 TriggerMsg->msgData[1] = 5; // Priority
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h
index 79fa71a5f284..a5c4c0409a23 100644
--- a/drivers/media/dvb/siano/smscoreapi.h
+++ b/drivers/media/dvb/siano/smscoreapi.h
@@ -213,276 +213,271 @@ typedef enum
213 DEVICE_MODE_MAX, 213 DEVICE_MODE_MAX,
214} SMS_DEVICE_MODE; 214} SMS_DEVICE_MODE;
215 215
216typedef unsigned char UINT8;
217typedef unsigned short UINT16;
218typedef unsigned int UINT32;
219typedef int INT32;
220
221typedef struct SmsMsgHdr_S 216typedef struct SmsMsgHdr_S
222{ 217{
223 UINT16 msgType; 218 u16 msgType;
224 UINT8 msgSrcId; 219 u8 msgSrcId;
225 UINT8 msgDstId; 220 u8 msgDstId;
226 UINT16 msgLength; /* Length of entire message, including header */ 221 u16 msgLength; /* Length of entire message, including header */
227 UINT16 msgFlags; 222 u16 msgFlags;
228} SmsMsgHdr_ST; 223} SmsMsgHdr_ST;
229 224
230typedef struct SmsMsgData_S 225typedef struct SmsMsgData_S
231{ 226{
232 SmsMsgHdr_ST xMsgHeader; 227 SmsMsgHdr_ST xMsgHeader;
233 UINT32 msgData[1]; 228 u32 msgData[1];
234} SmsMsgData_ST; 229} SmsMsgData_ST;
235 230
236typedef struct SmsDataDownload_S 231typedef struct SmsDataDownload_S
237{ 232{
238 SmsMsgHdr_ST xMsgHeader; 233 SmsMsgHdr_ST xMsgHeader;
239 UINT32 MemAddr; 234 u32 MemAddr;
240 UINT8 Payload[SMS_MAX_PAYLOAD_SIZE]; 235 u8 Payload[SMS_MAX_PAYLOAD_SIZE];
241} SmsDataDownload_ST; 236} SmsDataDownload_ST;
242 237
243typedef struct SmsVersionRes_S 238typedef struct SmsVersionRes_S
244{ 239{
245 SmsMsgHdr_ST xMsgHeader; 240 SmsMsgHdr_ST xMsgHeader;
246 241
247 UINT16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */ 242 u16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */
248 UINT8 Step; /* 0 - Step A */ 243 u8 Step; /* 0 - Step A */
249 UINT8 MetalFix; /* 0 - Metal 0 */ 244 u8 MetalFix; /* 0 - Metal 0 */
250 245
251 UINT8 FirmwareId; /* 0xFF � ROM, otherwise the value indicated by SMSHOSTLIB_DEVICE_MODES_E */ 246 u8 FirmwareId; /* 0xFF � ROM, otherwise the value indicated by SMSHOSTLIB_DEVICE_MODES_E */
252 UINT8 SupportedProtocols; /* Bitwise OR combination of supported protocols */ 247 u8 SupportedProtocols; /* Bitwise OR combination of supported protocols */
253 248
254 UINT8 VersionMajor; 249 u8 VersionMajor;
255 UINT8 VersionMinor; 250 u8 VersionMinor;
256 UINT8 VersionPatch; 251 u8 VersionPatch;
257 UINT8 VersionFieldPatch; 252 u8 VersionFieldPatch;
258 253
259 UINT8 RomVersionMajor; 254 u8 RomVersionMajor;
260 UINT8 RomVersionMinor; 255 u8 RomVersionMinor;
261 UINT8 RomVersionPatch; 256 u8 RomVersionPatch;
262 UINT8 RomVersionFieldPatch; 257 u8 RomVersionFieldPatch;
263 258
264 UINT8 TextLabel[34]; 259 u8 TextLabel[34];
265} SmsVersionRes_ST; 260} SmsVersionRes_ST;
266 261
267typedef struct SmsFirmware_S 262typedef struct SmsFirmware_S
268{ 263{
269 UINT32 CheckSum; 264 u32 CheckSum;
270 UINT32 Length; 265 u32 Length;
271 UINT32 StartAddress; 266 u32 StartAddress;
272 UINT8 Payload[1]; 267 u8 Payload[1];
273} SmsFirmware_ST; 268} SmsFirmware_ST;
274 269
275typedef struct SMSHOSTLIB_STATISTICS_S 270typedef struct SMSHOSTLIB_STATISTICS_S
276{ 271{
277 UINT32 Reserved; /* Reserved */ 272 u32 Reserved; /* Reserved */
278 273
279 /* Common parameters */ 274 /* Common parameters */
280 UINT32 IsRfLocked; /* 0 - not locked, 1 - locked */ 275 u32 IsRfLocked; /* 0 - not locked, 1 - locked */
281 UINT32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 276 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
282 UINT32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 277 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
283 278
284 /* Reception quality */ 279 /* Reception quality */
285 INT32 SNR; /* dB */ 280 s32 SNR; /* dB */
286 UINT32 BER; /* Post Viterbi BER [1E-5] */ 281 u32 BER; /* Post Viterbi BER [1E-5] */
287 UINT32 FIB_CRC; /* CRC errors percentage, valid only for DAB */ 282 u32 FIB_CRC; /* CRC errors percentage, valid only for DAB */
288 UINT32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A, valid only for DVB-T/H */ 283 u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A, valid only for DVB-T/H */
289 UINT32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 284 u32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */
290 INT32 RSSI; /* dBm */ 285 s32 RSSI; /* dBm */
291 INT32 InBandPwr; /* In band power in dBM */ 286 s32 InBandPwr; /* In band power in dBM */
292 INT32 CarrierOffset; /* Carrier Offset in bin/1024 */ 287 s32 CarrierOffset; /* Carrier Offset in bin/1024 */
293 288
294 /* Transmission parameters */ 289 /* Transmission parameters */
295 UINT32 Frequency; /* Frequency in Hz */ 290 u32 Frequency; /* Frequency in Hz */
296 UINT32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */ 291 u32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */
297 UINT32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, for DVB-T/H FFT mode carriers in Kilos */ 292 u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4, for DVB-T/H FFT mode carriers in Kilos */
298 UINT32 ModemState; /* from SMS_DvbModemState_ET , valid only for DVB-T/H */ 293 u32 ModemState; /* from SMS_DvbModemState_ET , valid only for DVB-T/H */
299 UINT32 GuardInterval; /* Guard Interval, 1 divided by value , valid only for DVB-T/H */ 294 u32 GuardInterval; /* Guard Interval, 1 divided by value , valid only for DVB-T/H */
300 UINT32 CodeRate; /* Code Rate from SMS_DvbModemState_ET, valid only for DVB-T/H */ 295 u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET, valid only for DVB-T/H */
301 UINT32 LPCodeRate; /* Low Priority Code Rate from SMS_DvbModemState_ET, valid only for DVB-T/H */ 296 u32 LPCodeRate; /* Low Priority Code Rate from SMS_DvbModemState_ET, valid only for DVB-T/H */
302 UINT32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET, valid only for DVB-T/H */ 297 u32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET, valid only for DVB-T/H */
303 UINT32 Constellation; /* Constellation from SMS_Constellation_ET, valid only for DVB-T/H */ 298 u32 Constellation; /* Constellation from SMS_Constellation_ET, valid only for DVB-T/H */
304 299
305 /* Burst parameters, valid only for DVB-H */ 300 /* Burst parameters, valid only for DVB-H */
306 UINT32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */ 301 u32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */
307 UINT32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */ 302 u32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */
308 UINT32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */ 303 u32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */
309 UINT32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */ 304 u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */
310 UINT32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */ 305 u32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */
311 UINT32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */ 306 u32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */
312 UINT32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */ 307 u32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */
313 UINT32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ 308 u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
314 UINT32 TotalTSPackets; /* Total number of transport-stream packets */ 309 u32 TotalTSPackets; /* Total number of transport-stream packets */
315 UINT32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding */ 310 u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding */
316 UINT32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors after MPE RS decoding */ 311 u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors after MPE RS decoding */
317 UINT32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding */ 312 u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding */
318 313
319 /* Common params */ 314 /* Common params */
320 UINT32 BERErrorCount; /* Number of errornous SYNC bits. */ 315 u32 BERErrorCount; /* Number of errornous SYNC bits. */
321 UINT32 BERBitCount; /* Total number of SYNC bits. */ 316 u32 BERBitCount; /* Total number of SYNC bits. */
322 317
323 /* Interface information */ 318 /* Interface information */
324 UINT32 SmsToHostTxErrors; /* Total number of transmission errors. */ 319 u32 SmsToHostTxErrors; /* Total number of transmission errors. */
325 320
326 /* DAB/T-DMB */ 321 /* DAB/T-DMB */
327 UINT32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */ 322 u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
328 323
329 /* DVB-H TPS parameters */ 324 /* DVB-H TPS parameters */
330 UINT32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */ 325 u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */
331 326
332} SMSHOSTLIB_STATISTICS_ST; 327} SMSHOSTLIB_STATISTICS_ST;
333 328
334typedef struct 329typedef struct
335{ 330{
336 UINT32 RequestResult; 331 u32 RequestResult;
337 332
338 SMSHOSTLIB_STATISTICS_ST Stat; 333 SMSHOSTLIB_STATISTICS_ST Stat;
339 334
340 /* Split the calc of the SNR in DAB */ 335 /* Split the calc of the SNR in DAB */
341 UINT32 Signal; /* dB */ 336 u32 Signal; /* dB */
342 UINT32 Noise; /* dB */ 337 u32 Noise; /* dB */
343 338
344} SmsMsgStatisticsInfo_ST; 339} SmsMsgStatisticsInfo_ST;
345 340
346typedef struct SMSHOSTLIB_ISDBT_LAYER_STAT_S 341typedef struct SMSHOSTLIB_ISDBT_LAYER_STAT_S
347{ 342{
348 /* Per-layer information */ 343 /* Per-layer information */
349 UINT32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 255 means layer does not exist */ 344 u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 255 means layer does not exist */
350 UINT32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET, 255 means layer does not exist */ 345 u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET, 255 means layer does not exist */
351 UINT32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 346 u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
352 UINT32 BERErrorCount; /* Post Viterbi Error Bits Count */ 347 u32 BERErrorCount; /* Post Viterbi Error Bits Count */
353 UINT32 BERBitCount; /* Post Viterbi Total Bits Count */ 348 u32 BERBitCount; /* Post Viterbi Total Bits Count */
354 UINT32 PreBER; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ 349 u32 PreBER; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
355 UINT32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */ 350 u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */
356 UINT32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ 351 u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
357 UINT32 TotalTSPackets; /* Total number of transport-stream packets */ 352 u32 TotalTSPackets; /* Total number of transport-stream packets */
358 UINT32 TILdepthI; /* Time interleaver depth I parameter, 255 means layer does not exist */ 353 u32 TILdepthI; /* Time interleaver depth I parameter, 255 means layer does not exist */
359 UINT32 NumberOfSegments; /* Number of segments in layer A, 255 means layer does not exist */ 354 u32 NumberOfSegments; /* Number of segments in layer A, 255 means layer does not exist */
360 UINT32 TMCCErrors; /* TMCC errors */ 355 u32 TMCCErrors; /* TMCC errors */
361} SMSHOSTLIB_ISDBT_LAYER_STAT_ST; 356} SMSHOSTLIB_ISDBT_LAYER_STAT_ST;
362 357
363typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S 358typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S
364{ 359{
365 UINT32 StatisticsType; /* Enumerator identifying the type of the 360 u32 StatisticsType; /* Enumerator identifying the type of the
366 * structure. Values are the same as 361 * structure. Values are the same as
367 * SMSHOSTLIB_DEVICE_MODES_E 362 * SMSHOSTLIB_DEVICE_MODES_E
368 * 363 *
369 * This field MUST always be first in any 364 * This field MUST always be first in any
370 * statistics structure */ 365 * statistics structure */
371 366
372 UINT32 FullSize; /* Total size of the structure returned by the modem. If the size requested by 367 u32 FullSize; /* Total size of the structure returned by the modem. If the size requested by
373 * the host is smaller than FullSize, the struct will be truncated */ 368 * the host is smaller than FullSize, the struct will be truncated */
374 369
375 /* Common parameters */ 370 /* Common parameters */
376 UINT32 IsRfLocked; /* 0 - not locked, 1 - locked */ 371 u32 IsRfLocked; /* 0 - not locked, 1 - locked */
377 UINT32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 372 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
378 UINT32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 373 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
379 374
380 /* Reception quality */ 375 /* Reception quality */
381 INT32 SNR; /* dB */ 376 s32 SNR; /* dB */
382 INT32 RSSI; /* dBm */ 377 s32 RSSI; /* dBm */
383 INT32 InBandPwr; /* In band power in dBM */ 378 s32 InBandPwr; /* In band power in dBM */
384 INT32 CarrierOffset; /* Carrier Offset in Hz */ 379 s32 CarrierOffset; /* Carrier Offset in Hz */
385 380
386 /* Transmission parameters */ 381 /* Transmission parameters */
387 UINT32 Frequency; /* Frequency in Hz */ 382 u32 Frequency; /* Frequency in Hz */
388 UINT32 Bandwidth; /* Bandwidth in MHz */ 383 u32 Bandwidth; /* Bandwidth in MHz */
389 UINT32 TransmissionMode; /* ISDB-T transmission mode */ 384 u32 TransmissionMode; /* ISDB-T transmission mode */
390 UINT32 ModemState; /* 0 - Acquisition, 1 - Locked */ 385 u32 ModemState; /* 0 - Acquisition, 1 - Locked */
391 UINT32 GuardInterval; /* Guard Interval, 1 divided by value */ 386 u32 GuardInterval; /* Guard Interval, 1 divided by value */
392 UINT32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ 387 u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
393 UINT32 PartialReception; /* TRUE - partial reception, FALSE otherwise */ 388 u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */
394 UINT32 NumOfLayers; /* Number of ISDB-T layers in the network */ 389 u32 NumOfLayers; /* Number of ISDB-T layers in the network */
395 390
396 /* Per-layer information */ 391 /* Per-layer information */
397 /* Layers A, B and C */ 392 /* Layers A, B and C */
398 SMSHOSTLIB_ISDBT_LAYER_STAT_ST LayerInfo[3]; /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */ 393 SMSHOSTLIB_ISDBT_LAYER_STAT_ST LayerInfo[3]; /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
399 394
400 /* Interface information */ 395 /* Interface information */
401 UINT32 SmsToHostTxErrors; /* Total number of transmission errors. */ 396 u32 SmsToHostTxErrors; /* Total number of transmission errors. */
402 397
403} SMSHOSTLIB_STATISTICS_ISDBT_ST; 398} SMSHOSTLIB_STATISTICS_ISDBT_ST;
404 399
405typedef struct SMSHOSTLIB_STATISTICS_DVB_S 400typedef struct SMSHOSTLIB_STATISTICS_DVB_S
406{ 401{
407 UINT32 StatisticsType; /* Enumerator identifying the type of the structure. Values are the same as SMSHOSTLIB_DEVICE_MODES_E 402 u32 StatisticsType; /* Enumerator identifying the type of the structure. Values are the same as SMSHOSTLIB_DEVICE_MODES_E
408 * This fiels MUST always first in any statistics structure */ 403 * This fiels MUST always first in any statistics structure */
409 404
410 UINT32 FullSize; /* Total size of the structure returned by the modem. If the size requested by 405 u32 FullSize; /* Total size of the structure returned by the modem. If the size requested by
411 * the host is smaller than FullSize, the struct will be truncated */ 406 * the host is smaller than FullSize, the struct will be truncated */
412 /* Common parameters */ 407 /* Common parameters */
413 UINT32 IsRfLocked; /* 0 - not locked, 1 - locked */ 408 u32 IsRfLocked; /* 0 - not locked, 1 - locked */
414 UINT32 IsDemodLocked; /* 0 - not locked, 1 - locked */ 409 u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
415 UINT32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ 410 u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
416 411
417 /* Reception quality */ 412 /* Reception quality */
418 INT32 SNR; /* dB */ 413 s32 SNR; /* dB */
419 UINT32 BER; /* Post Viterbi BER [1E-5] */ 414 u32 BER; /* Post Viterbi BER [1E-5] */
420 UINT32 BERErrorCount; /* Number of errornous SYNC bits. */ 415 u32 BERErrorCount; /* Number of errornous SYNC bits. */
421 UINT32 BERBitCount; /* Total number of SYNC bits. */ 416 u32 BERBitCount; /* Total number of SYNC bits. */
422 UINT32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A */ 417 u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A */
423 UINT32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */ 418 u32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */
424 INT32 RSSI; /* dBm */ 419 s32 RSSI; /* dBm */
425 INT32 InBandPwr; /* In band power in dBM */ 420 s32 InBandPwr; /* In band power in dBM */
426 INT32 CarrierOffset; /* Carrier Offset in bin/1024 */ 421 s32 CarrierOffset; /* Carrier Offset in bin/1024 */
427 422
428 /* Transmission parameters */ 423 /* Transmission parameters */
429 UINT32 Frequency; /* Frequency in Hz */ 424 u32 Frequency; /* Frequency in Hz */
430 UINT32 Bandwidth; /* Bandwidth in MHz */ 425 u32 Bandwidth; /* Bandwidth in MHz */
431 UINT32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ 426 u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
432 UINT32 TransmissionMode; /* FFT mode carriers in Kilos */ 427 u32 TransmissionMode; /* FFT mode carriers in Kilos */
433 UINT32 GuardInterval; /* Guard Interval, 1 divided by value */ 428 u32 GuardInterval; /* Guard Interval, 1 divided by value */
434 UINT32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */ 429 u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */
435 UINT32 LPCodeRate; /* Low Priority Code Rate from SMSHOSTLIB_CODE_RATE_ET */ 430 u32 LPCodeRate; /* Low Priority Code Rate from SMSHOSTLIB_CODE_RATE_ET */
436 UINT32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */ 431 u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */
437 UINT32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET */ 432 u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET */
438 433
439 /* Burst parameters, valid only for DVB-H */ 434 /* Burst parameters, valid only for DVB-H */
440 UINT32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */ 435 u32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */
441 UINT32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */ 436 u32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */
442 UINT32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */ 437 u32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */
443 UINT32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */ 438 u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */
444 UINT32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */ 439 u32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */
445 UINT32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */ 440 u32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */
446 UINT32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */ 441 u32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */
447 UINT32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ 442 u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
448 UINT32 TotalTSPackets; /* Total number of transport-stream packets */ 443 u32 TotalTSPackets; /* Total number of transport-stream packets */
449 UINT32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding, valid only for DVB-H */ 444 u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding, valid only for DVB-H */
450 UINT32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors after MPE RS decoding, valid only for DVB-H */ 445 u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors after MPE RS decoding, valid only for DVB-H */
451 UINT32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding, valid only for DVB-H */ 446 u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding, valid only for DVB-H */
452 UINT32 NumMPEReceived; /* DVB-H, Num MPE section received */ 447 u32 NumMPEReceived; /* DVB-H, Num MPE section received */
453 448
454 /* DVB-H TPS parameters */ 449 /* DVB-H TPS parameters */
455 UINT32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */ 450 u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */
456 UINT32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */ 451 u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */
457 UINT32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */ 452 u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */
458 453
459 /* Interface information */ 454 /* Interface information */
460 UINT32 SmsToHostTxErrors; /* Total number of transmission errors. */ 455 u32 SmsToHostTxErrors; /* Total number of transmission errors. */
461 456
462} SMSHOSTLIB_STATISTICS_DVB_ST; 457} SMSHOSTLIB_STATISTICS_DVB_ST;
463 458
464typedef struct SMSHOSTLIB_GPIO_CONFIG_S 459typedef struct SMSHOSTLIB_GPIO_CONFIG_S
465{ 460{
466 UINT8 Direction; /* GPIO direction: Input - 0, Output - 1 */ 461 u8 Direction; /* GPIO direction: Input - 0, Output - 1 */
467 UINT8 PullUpDown; /* PullUp/PullDown: None - 0, PullDown - 1, PullUp - 2, Keeper - 3 */ 462 u8 PullUpDown; /* PullUp/PullDown: None - 0, PullDown - 1, PullUp - 2, Keeper - 3 */
468 UINT8 InputCharacteristics; /* Input Characteristics: Normal - 0, Schmitt trigger - 1 */ 463 u8 InputCharacteristics; /* Input Characteristics: Normal - 0, Schmitt trigger - 1 */
469 UINT8 OutputSlewRate; /* Output Slew Rate: Fast slew rate - 0, Slow slew rate - 1 */ 464 u8 OutputSlewRate; /* Output Slew Rate: Fast slew rate - 0, Slow slew rate - 1 */
470 UINT8 OutputDriving; /* Output driving capability: 4mA - 0, 8mA - 1, 12mA - 2, 16mA - 3 */ 465 u8 OutputDriving; /* Output driving capability: 4mA - 0, 8mA - 1, 12mA - 2, 16mA - 3 */
471} SMSHOSTLIB_GPIO_CONFIG_ST; 466} SMSHOSTLIB_GPIO_CONFIG_ST;
472 467
473typedef struct SMSHOSTLIB_I2C_REQ_S 468typedef struct SMSHOSTLIB_I2C_REQ_S
474{ 469{
475 UINT32 DeviceAddress; /* I2c device address */ 470 u32 DeviceAddress; /* I2c device address */
476 UINT32 WriteCount; /* number of bytes to write */ 471 u32 WriteCount; /* number of bytes to write */
477 UINT32 ReadCount; /* number of bytes to read */ 472 u32 ReadCount; /* number of bytes to read */
478 UINT8 Data[1]; 473 u8 Data[1];
479} SMSHOSTLIB_I2C_REQ_ST; 474} SMSHOSTLIB_I2C_REQ_ST;
480 475
481typedef struct SMSHOSTLIB_I2C_RES_S 476typedef struct SMSHOSTLIB_I2C_RES_S
482{ 477{
483 UINT32 Status; /* non-zero value in case of failure */ 478 u32 Status; /* non-zero value in case of failure */
484 UINT32 ReadCount; /* number of bytes read */ 479 u32 ReadCount; /* number of bytes read */
485 UINT8 Data[1]; 480 u8 Data[1];
486} SMSHOSTLIB_I2C_RES_ST; 481} SMSHOSTLIB_I2C_RES_ST;
487 482
488typedef struct _smsdvb_client 483typedef struct _smsdvb_client