diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-06-15 14:14:13 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-20 06:21:25 -0400 |
commit | 822374165d6b11733467cfa2fa18234319198233 (patch) | |
tree | f3e29319e9d1624b8c9ed8d532ec6cab0120679a /drivers/media/dvb/siano/smscoreapi.h | |
parent | 73104fb3e4e692cb1f9505b548ab073b0859b256 (diff) |
V4L/DVB (8280): sms1xxx: more codingstyle cleanups
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/siano/smscoreapi.h')
-rw-r--r-- | drivers/media/dvb/siano/smscoreapi.h | 394 |
1 files changed, 202 insertions, 192 deletions
diff --git a/drivers/media/dvb/siano/smscoreapi.h b/drivers/media/dvb/siano/smscoreapi.h index 601bdb8304db..79fa71a5f284 100644 --- a/drivers/media/dvb/siano/smscoreapi.h +++ b/drivers/media/dvb/siano/smscoreapi.h | |||
@@ -82,12 +82,12 @@ typedef void (*onremove_t)(void *context); | |||
82 | 82 | ||
83 | typedef struct _smscore_buffer | 83 | typedef struct _smscore_buffer |
84 | { | 84 | { |
85 | // public members, once passed to clients can be changed freely | 85 | /* public members, once passed to clients can be changed freely */ |
86 | struct list_head entry; | 86 | struct list_head entry; |
87 | int size; | 87 | int size; |
88 | int offset; | 88 | int offset; |
89 | 89 | ||
90 | // private members, read-only for clients | 90 | /* private members, read-only for clients */ |
91 | void *p; | 91 | void *p; |
92 | dma_addr_t phys; | 92 | dma_addr_t phys; |
93 | unsigned long offset_in_common; | 93 | unsigned long offset_in_common; |
@@ -123,7 +123,7 @@ typedef struct _smsclient_params | |||
123 | void *context; | 123 | void *context; |
124 | } smsclient_params_t; | 124 | } smsclient_params_t; |
125 | 125 | ||
126 | // GPIO definitions for antenna frequency domain control (SMS8021) | 126 | /* GPIO definitions for antenna frequency domain control (SMS8021) */ |
127 | #define SMS_ANTENNA_GPIO_0 1 | 127 | #define SMS_ANTENNA_GPIO_0 1 |
128 | #define SMS_ANTENNA_GPIO_1 0 | 128 | #define SMS_ANTENNA_GPIO_1 0 |
129 | 129 | ||
@@ -223,7 +223,7 @@ typedef struct SmsMsgHdr_S | |||
223 | UINT16 msgType; | 223 | UINT16 msgType; |
224 | UINT8 msgSrcId; | 224 | UINT8 msgSrcId; |
225 | UINT8 msgDstId; | 225 | UINT8 msgDstId; |
226 | UINT16 msgLength; // Length is of the entire message, including header | 226 | UINT16 msgLength; /* Length of entire message, including header */ |
227 | UINT16 msgFlags; | 227 | UINT16 msgFlags; |
228 | } SmsMsgHdr_ST; | 228 | } SmsMsgHdr_ST; |
229 | 229 | ||
@@ -244,24 +244,24 @@ typedef struct SmsVersionRes_S | |||
244 | { | 244 | { |
245 | SmsMsgHdr_ST xMsgHeader; | 245 | SmsMsgHdr_ST xMsgHeader; |
246 | 246 | ||
247 | UINT16 ChipModel; // e.g. 0x1102 for SMS-1102 "Nova" | 247 | UINT16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */ |
248 | UINT8 Step; // 0 - Step A | 248 | UINT8 Step; /* 0 - Step A */ |
249 | UINT8 MetalFix; // 0 - Metal 0 | 249 | UINT8 MetalFix; /* 0 - Metal 0 */ |
250 | 250 | ||
251 | UINT8 FirmwareId; // 0xFF � ROM, otherwise the value indicated by SMSHOSTLIB_DEVICE_MODES_E | 251 | UINT8 FirmwareId; /* 0xFF � ROM, otherwise the value indicated by SMSHOSTLIB_DEVICE_MODES_E */ |
252 | UINT8 SupportedProtocols; // Bitwise OR combination of supported protocols | 252 | UINT8 SupportedProtocols; /* Bitwise OR combination of supported protocols */ |
253 | 253 | ||
254 | UINT8 VersionMajor; | 254 | UINT8 VersionMajor; |
255 | UINT8 VersionMinor; | 255 | UINT8 VersionMinor; |
256 | UINT8 VersionPatch; | 256 | UINT8 VersionPatch; |
257 | UINT8 VersionFieldPatch; | 257 | UINT8 VersionFieldPatch; |
258 | 258 | ||
259 | UINT8 RomVersionMajor; | 259 | UINT8 RomVersionMajor; |
260 | UINT8 RomVersionMinor; | 260 | UINT8 RomVersionMinor; |
261 | UINT8 RomVersionPatch; | 261 | UINT8 RomVersionPatch; |
262 | UINT8 RomVersionFieldPatch; | 262 | UINT8 RomVersionFieldPatch; |
263 | 263 | ||
264 | UINT8 TextLabel[34]; | 264 | UINT8 TextLabel[34]; |
265 | } SmsVersionRes_ST; | 265 | } SmsVersionRes_ST; |
266 | 266 | ||
267 | typedef struct SmsFirmware_S | 267 | typedef struct SmsFirmware_S |
@@ -274,59 +274,60 @@ typedef struct SmsFirmware_S | |||
274 | 274 | ||
275 | typedef struct SMSHOSTLIB_STATISTICS_S | 275 | typedef struct SMSHOSTLIB_STATISTICS_S |
276 | { | 276 | { |
277 | UINT32 Reserved; //!< Reserved | 277 | UINT32 Reserved; /* Reserved */ |
278 | 278 | ||
279 | /// Common parameters | 279 | /* Common parameters */ |
280 | UINT32 IsRfLocked; //!< 0 - not locked, 1 - locked | 280 | UINT32 IsRfLocked; /* 0 - not locked, 1 - locked */ |
281 | UINT32 IsDemodLocked; //!< 0 - not locked, 1 - locked | 281 | UINT32 IsDemodLocked; /* 0 - not locked, 1 - locked */ |
282 | UINT32 IsExternalLNAOn; //!< 0 - external LNA off, 1 - external LNA on | 282 | UINT32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ |
283 | 283 | ||
284 | /// Reception quality | 284 | /* Reception quality */ |
285 | INT32 SNR; //!< dB | 285 | INT32 SNR; /* dB */ |
286 | UINT32 BER; //!< Post Viterbi BER [1E-5] | 286 | UINT32 BER; /* Post Viterbi BER [1E-5] */ |
287 | UINT32 FIB_CRC; //!< CRC errors percentage, valid only for DAB | 287 | UINT32 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 | 288 | UINT32 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 | 289 | UINT32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */ |
290 | INT32 RSSI; //!< dBm | 290 | INT32 RSSI; /* dBm */ |
291 | INT32 InBandPwr; //!< In band power in dBM | 291 | INT32 InBandPwr; /* In band power in dBM */ |
292 | INT32 CarrierOffset; //!< Carrier Offset in bin/1024 | 292 | INT32 CarrierOffset; /* Carrier Offset in bin/1024 */ |
293 | 293 | ||
294 | /// Transmission parameters | 294 | /* Transmission parameters */ |
295 | UINT32 Frequency; //!< Frequency in Hz | 295 | UINT32 Frequency; /* Frequency in Hz */ |
296 | UINT32 Bandwidth; //!< Bandwidth in MHz, valid only for DVB-T/H | 296 | UINT32 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 | 297 | UINT32 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 | 298 | UINT32 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 | 299 | UINT32 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 | 300 | UINT32 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 | 301 | UINT32 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 | 302 | UINT32 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 | 303 | UINT32 Constellation; /* Constellation from SMS_Constellation_ET, valid only for DVB-T/H */ |
304 | 304 | ||
305 | /// Burst parameters, valid only for DVB-H | 305 | /* Burst parameters, valid only for DVB-H */ |
306 | UINT32 BurstSize; //!< Current burst size in bytes, valid only for DVB-H | 306 | UINT32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */ |
307 | UINT32 BurstDuration; //!< Current burst duration in mSec, valid only for DVB-H | 307 | UINT32 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 | 308 | UINT32 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 | 309 | UINT32 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 | 310 | UINT32 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 | 311 | UINT32 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 | 312 | UINT32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */ |
313 | UINT32 ErrorTSPackets; //!< Number of erroneous transport-stream packets | 313 | UINT32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ |
314 | UINT32 TotalTSPackets; //!< Total number of transport-stream packets | 314 | UINT32 TotalTSPackets; /* Total number of transport-stream packets */ |
315 | UINT32 NumOfValidMpeTlbs; //!< Number of MPE tables which do not include errors after MPE RS decoding | 315 | UINT32 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 | 316 | UINT32 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 | 317 | UINT32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected by MPE RS decoding */ |
318 | /// Common params | 318 | |
319 | UINT32 BERErrorCount; //!< Number of errornous SYNC bits. | 319 | /* Common params */ |
320 | UINT32 BERBitCount; //!< Total number of SYNC bits. | 320 | UINT32 BERErrorCount; /* Number of errornous SYNC bits. */ |
321 | 321 | UINT32 BERBitCount; /* Total number of SYNC bits. */ | |
322 | /// Interface information | 322 | |
323 | UINT32 SmsToHostTxErrors; //!< Total number of transmission errors. | 323 | /* Interface information */ |
324 | 324 | UINT32 SmsToHostTxErrors; /* Total number of transmission errors. */ | |
325 | /// DAB/T-DMB | 325 | |
326 | UINT32 PreBER; //!< DAB/T-DMB only: Pre Viterbi BER [1E-5] | 326 | /* DAB/T-DMB */ |
327 | 327 | UINT32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */ | |
328 | /// DVB-H TPS parameters | 328 | |
329 | UINT32 CellId; //!< TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered | 329 | /* 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 */ | ||
330 | 331 | ||
331 | } SMSHOSTLIB_STATISTICS_ST; | 332 | } SMSHOSTLIB_STATISTICS_ST; |
332 | 333 | ||
@@ -336,147 +337,151 @@ typedef struct | |||
336 | 337 | ||
337 | SMSHOSTLIB_STATISTICS_ST Stat; | 338 | SMSHOSTLIB_STATISTICS_ST Stat; |
338 | 339 | ||
339 | // Split the calc of the SNR in DAB | 340 | /* Split the calc of the SNR in DAB */ |
340 | UINT32 Signal; //!< dB | 341 | UINT32 Signal; /* dB */ |
341 | UINT32 Noise; //!< dB | 342 | UINT32 Noise; /* dB */ |
342 | 343 | ||
343 | } SmsMsgStatisticsInfo_ST; | 344 | } SmsMsgStatisticsInfo_ST; |
344 | 345 | ||
345 | typedef struct SMSHOSTLIB_ISDBT_LAYER_STAT_S | 346 | typedef struct SMSHOSTLIB_ISDBT_LAYER_STAT_S |
346 | { | 347 | { |
347 | // Per-layer information | 348 | /* Per-layer information */ |
348 | UINT32 CodeRate; //!< Code Rate from SMSHOSTLIB_CODE_RATE_ET, 255 means layer does not exist | 349 | UINT32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET, 255 means layer does not exist */ |
349 | UINT32 Constellation; //!< Constellation from SMSHOSTLIB_CONSTELLATION_ET, 255 means layer does not exist | 350 | UINT32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET, 255 means layer does not exist */ |
350 | UINT32 BER; //!< Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A | 351 | UINT32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ |
351 | UINT32 BERErrorCount; //!< Post Viterbi Error Bits Count | 352 | UINT32 BERErrorCount; /* Post Viterbi Error Bits Count */ |
352 | UINT32 BERBitCount; //!< Post Viterbi Total Bits Count | 353 | UINT32 BERBitCount; /* Post Viterbi Total Bits Count */ |
353 | UINT32 PreBER; //!< Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A | 354 | UINT32 PreBER; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */ |
354 | UINT32 TS_PER; //!< Transport stream PER [%], 0xFFFFFFFF indicate N/A | 355 | UINT32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */ |
355 | UINT32 ErrorTSPackets; //!< Number of erroneous transport-stream packets | 356 | UINT32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ |
356 | UINT32 TotalTSPackets; //!< Total number of transport-stream packets | 357 | UINT32 TotalTSPackets; /* Total number of transport-stream packets */ |
357 | UINT32 TILdepthI; //!< Time interleaver depth I parameter, 255 means layer does not exist | 358 | UINT32 TILdepthI; /* Time interleaver depth I parameter, 255 means layer does not exist */ |
358 | UINT32 NumberOfSegments; //!< Number of segments in layer A, 255 means layer does not exist | 359 | UINT32 NumberOfSegments; /* Number of segments in layer A, 255 means layer does not exist */ |
359 | UINT32 TMCCErrors; //!< TMCC errors | 360 | UINT32 TMCCErrors; /* TMCC errors */ |
360 | } SMSHOSTLIB_ISDBT_LAYER_STAT_ST; | 361 | } SMSHOSTLIB_ISDBT_LAYER_STAT_ST; |
361 | 362 | ||
362 | typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S | 363 | typedef struct SMSHOSTLIB_STATISTICS_ISDBT_S |
363 | { | 364 | { |
364 | UINT32 StatisticsType; //!< Enumerator identifying the type of the structure. Values are the same as SMSHOSTLIB_DEVICE_MODES_E | 365 | UINT32 StatisticsType; /* Enumerator identifying the type of the |
365 | //!< This fiels MUST always first in any statistics structure | 366 | * structure. Values are the same as |
366 | 367 | * SMSHOSTLIB_DEVICE_MODES_E | |
367 | UINT32 FullSize; //!< Total size of the structure returned by the modem. If the size requested by | 368 | * |
368 | //!< the host is smaller than FullSize, the struct will be truncated | 369 | * This field MUST always be first in any |
369 | 370 | * statistics structure */ | |
370 | // Common parameters | 371 | |
371 | UINT32 IsRfLocked; //!< 0 - not locked, 1 - locked | 372 | UINT32 FullSize; /* Total size of the structure returned by the modem. If the size requested by |
372 | UINT32 IsDemodLocked; //!< 0 - not locked, 1 - locked | 373 | * the host is smaller than FullSize, the struct will be truncated */ |
373 | UINT32 IsExternalLNAOn; //!< 0 - external LNA off, 1 - external LNA on | 374 | |
374 | 375 | /* Common parameters */ | |
375 | // Reception quality | 376 | UINT32 IsRfLocked; /* 0 - not locked, 1 - locked */ |
376 | INT32 SNR; //!< dB | 377 | UINT32 IsDemodLocked; /* 0 - not locked, 1 - locked */ |
377 | INT32 RSSI; //!< dBm | 378 | UINT32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ |
378 | INT32 InBandPwr; //!< In band power in dBM | 379 | |
379 | INT32 CarrierOffset; //!< Carrier Offset in Hz | 380 | /* Reception quality */ |
380 | 381 | INT32 SNR; /* dB */ | |
381 | // Transmission parameters | 382 | INT32 RSSI; /* dBm */ |
382 | UINT32 Frequency; //!< Frequency in Hz | 383 | INT32 InBandPwr; /* In band power in dBM */ |
383 | UINT32 Bandwidth; //!< Bandwidth in MHz | 384 | INT32 CarrierOffset; /* Carrier Offset in Hz */ |
384 | UINT32 TransmissionMode; //!< ISDB-T transmission mode | 385 | |
385 | UINT32 ModemState; //!< 0 - Acquisition, 1 - Locked | 386 | /* Transmission parameters */ |
386 | UINT32 GuardInterval; //!< Guard Interval, 1 divided by value | 387 | UINT32 Frequency; /* Frequency in Hz */ |
387 | UINT32 SystemType; //!< ISDB-T system type (ISDB-T / ISDB-Tsb) | 388 | UINT32 Bandwidth; /* Bandwidth in MHz */ |
388 | UINT32 PartialReception; //!< TRUE - partial reception, FALSE otherwise | 389 | UINT32 TransmissionMode; /* ISDB-T transmission mode */ |
389 | UINT32 NumOfLayers; //!< Number of ISDB-T layers in the network | 390 | UINT32 ModemState; /* 0 - Acquisition, 1 - Locked */ |
390 | 391 | UINT32 GuardInterval; /* Guard Interval, 1 divided by value */ | |
391 | // Per-layer information | 392 | UINT32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */ |
392 | // Layers A, B and C | 393 | UINT32 PartialReception; /* TRUE - partial reception, FALSE otherwise */ |
393 | SMSHOSTLIB_ISDBT_LAYER_STAT_ST LayerInfo[3]; //!< Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST | 394 | UINT32 NumOfLayers; /* Number of ISDB-T layers in the network */ |
394 | 395 | ||
395 | // Interface information | 396 | /* Per-layer information */ |
396 | UINT32 SmsToHostTxErrors; //!< Total number of transmission errors. | 397 | /* Layers A, B and C */ |
398 | SMSHOSTLIB_ISDBT_LAYER_STAT_ST LayerInfo[3]; /* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */ | ||
399 | |||
400 | /* Interface information */ | ||
401 | UINT32 SmsToHostTxErrors; /* Total number of transmission errors. */ | ||
397 | 402 | ||
398 | } SMSHOSTLIB_STATISTICS_ISDBT_ST; | 403 | } SMSHOSTLIB_STATISTICS_ISDBT_ST; |
399 | 404 | ||
400 | typedef struct SMSHOSTLIB_STATISTICS_DVB_S | 405 | typedef struct SMSHOSTLIB_STATISTICS_DVB_S |
401 | { | 406 | { |
402 | UINT32 StatisticsType; //!< Enumerator identifying the type of the structure. Values are the same as SMSHOSTLIB_DEVICE_MODES_E | 407 | UINT32 StatisticsType; /* Enumerator identifying the type of the structure. Values are the same as SMSHOSTLIB_DEVICE_MODES_E |
403 | //!< This fiels MUST always first in any statistics structure | 408 | * This fiels MUST always first in any statistics structure */ |
404 | 409 | ||
405 | UINT32 FullSize; //!< Total size of the structure returned by the modem. If the size requested by | 410 | UINT32 FullSize; /* Total size of the structure returned by the modem. If the size requested by |
406 | //!< the host is smaller than FullSize, the struct will be truncated | 411 | * the host is smaller than FullSize, the struct will be truncated */ |
407 | // Common parameters | 412 | /* Common parameters */ |
408 | UINT32 IsRfLocked; //!< 0 - not locked, 1 - locked | 413 | UINT32 IsRfLocked; /* 0 - not locked, 1 - locked */ |
409 | UINT32 IsDemodLocked; //!< 0 - not locked, 1 - locked | 414 | UINT32 IsDemodLocked; /* 0 - not locked, 1 - locked */ |
410 | UINT32 IsExternalLNAOn; //!< 0 - external LNA off, 1 - external LNA on | 415 | UINT32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */ |
411 | 416 | ||
412 | // Reception quality | 417 | /* Reception quality */ |
413 | INT32 SNR; //!< dB | 418 | INT32 SNR; /* dB */ |
414 | UINT32 BER; //!< Post Viterbi BER [1E-5] | 419 | UINT32 BER; /* Post Viterbi BER [1E-5] */ |
415 | UINT32 BERErrorCount; //!< Number of errornous SYNC bits. | 420 | UINT32 BERErrorCount; /* Number of errornous SYNC bits. */ |
416 | UINT32 BERBitCount; //!< Total number of SYNC bits. | 421 | UINT32 BERBitCount; /* Total number of SYNC bits. */ |
417 | UINT32 TS_PER; //!< Transport stream PER, 0xFFFFFFFF indicate N/A | 422 | UINT32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A */ |
418 | UINT32 MFER; //!< DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H | 423 | UINT32 MFER; /* DVB-H frame error rate in percentage, 0xFFFFFFFF indicate N/A, valid only for DVB-H */ |
419 | INT32 RSSI; //!< dBm | 424 | INT32 RSSI; /* dBm */ |
420 | INT32 InBandPwr; //!< In band power in dBM | 425 | INT32 InBandPwr; /* In band power in dBM */ |
421 | INT32 CarrierOffset; //!< Carrier Offset in bin/1024 | 426 | INT32 CarrierOffset; /* Carrier Offset in bin/1024 */ |
422 | 427 | ||
423 | // Transmission parameters | 428 | /* Transmission parameters */ |
424 | UINT32 Frequency; //!< Frequency in Hz | 429 | UINT32 Frequency; /* Frequency in Hz */ |
425 | UINT32 Bandwidth; //!< Bandwidth in MHz | 430 | UINT32 Bandwidth; /* Bandwidth in MHz */ |
426 | UINT32 ModemState; //!< from SMSHOSTLIB_DVB_MODEM_STATE_ET | 431 | UINT32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */ |
427 | UINT32 TransmissionMode; //!< FFT mode carriers in Kilos | 432 | UINT32 TransmissionMode; /* FFT mode carriers in Kilos */ |
428 | UINT32 GuardInterval; //!< Guard Interval, 1 divided by value | 433 | UINT32 GuardInterval; /* Guard Interval, 1 divided by value */ |
429 | UINT32 CodeRate; //!< Code Rate from SMSHOSTLIB_CODE_RATE_ET | 434 | UINT32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */ |
430 | UINT32 LPCodeRate; //!< Low Priority Code Rate from SMSHOSTLIB_CODE_RATE_ET | 435 | UINT32 LPCodeRate; /* Low Priority Code Rate from SMSHOSTLIB_CODE_RATE_ET */ |
431 | UINT32 Hierarchy; //!< Hierarchy from SMSHOSTLIB_HIERARCHY_ET | 436 | UINT32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */ |
432 | UINT32 Constellation; //!< Constellation from SMSHOSTLIB_CONSTELLATION_ET | 437 | UINT32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET */ |
433 | 438 | ||
434 | // Burst parameters, valid only for DVB-H | 439 | /* Burst parameters, valid only for DVB-H */ |
435 | UINT32 BurstSize; //!< Current burst size in bytes, valid only for DVB-H | 440 | UINT32 BurstSize; /* Current burst size in bytes, valid only for DVB-H */ |
436 | UINT32 BurstDuration; //!< Current burst duration in mSec, valid only for DVB-H | 441 | UINT32 BurstDuration; /* Current burst duration in mSec, valid only for DVB-H */ |
437 | UINT32 BurstCycleTime; //!< Current burst cycle time in mSec, valid only for DVB-H | 442 | UINT32 BurstCycleTime; /* Current burst cycle time in mSec, valid only for DVB-H */ |
438 | UINT32 CalculatedBurstCycleTime;//!< Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H | 443 | UINT32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec, as calculated by demodulator, valid only for DVB-H */ |
439 | UINT32 NumOfRows; //!< Number of rows in MPE table, valid only for DVB-H | 444 | UINT32 NumOfRows; /* Number of rows in MPE table, valid only for DVB-H */ |
440 | UINT32 NumOfPaddCols; //!< Number of padding columns in MPE table, valid only for DVB-H | 445 | UINT32 NumOfPaddCols; /* Number of padding columns in MPE table, valid only for DVB-H */ |
441 | UINT32 NumOfPunctCols; //!< Number of puncturing columns in MPE table, valid only for DVB-H | 446 | UINT32 NumOfPunctCols; /* Number of puncturing columns in MPE table, valid only for DVB-H */ |
442 | UINT32 ErrorTSPackets; //!< Number of erroneous transport-stream packets | 447 | UINT32 ErrorTSPackets; /* Number of erroneous transport-stream packets */ |
443 | UINT32 TotalTSPackets; //!< Total number of transport-stream packets | 448 | UINT32 TotalTSPackets; /* Total number of transport-stream packets */ |
444 | UINT32 NumOfValidMpeTlbs; //!< Number of MPE tables which do not include errors after MPE RS decoding, valid only for DVB-H | 449 | UINT32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include errors after MPE RS decoding, valid only for DVB-H */ |
445 | UINT32 NumOfInvalidMpeTlbs; //!< Number of MPE tables which 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 */ |
446 | UINT32 NumOfCorrectedMpeTlbs; //!< Number of MPE tables which were corrected by 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 */ |
447 | UINT32 NumMPEReceived; //!< DVB-H, Num MPE section received | 452 | UINT32 NumMPEReceived; /* DVB-H, Num MPE section received */ |
448 | 453 | ||
449 | // DVB-H TPS parameters | 454 | /* DVB-H TPS parameters */ |
450 | UINT32 CellId; //!< TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered | 455 | UINT32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero; if set to 0xFFFFFFFF cell_id not yet recovered */ |
451 | UINT32 DvbhSrvIndHP; //!< DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator | 456 | UINT32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 - Time Slicing indicator, bit 0 - MPE-FEC indicator */ |
452 | UINT32 DvbhSrvIndLP; //!< 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 */ |
453 | 458 | ||
454 | // Interface information | 459 | /* Interface information */ |
455 | UINT32 SmsToHostTxErrors; //!< Total number of transmission errors. | 460 | UINT32 SmsToHostTxErrors; /* Total number of transmission errors. */ |
456 | 461 | ||
457 | } SMSHOSTLIB_STATISTICS_DVB_ST; | 462 | } SMSHOSTLIB_STATISTICS_DVB_ST; |
458 | 463 | ||
459 | typedef struct SMSHOSTLIB_GPIO_CONFIG_S | 464 | typedef struct SMSHOSTLIB_GPIO_CONFIG_S |
460 | { | 465 | { |
461 | UINT8 Direction; //!< GPIO direction: Input - 0, Output - 1 | 466 | UINT8 Direction; /* GPIO direction: Input - 0, Output - 1 */ |
462 | UINT8 PullUpDown; //!< PullUp/PullDown: None - 0, PullDown - 1, PullUp - 2, Keeper - 3 | 467 | UINT8 PullUpDown; /* PullUp/PullDown: None - 0, PullDown - 1, PullUp - 2, Keeper - 3 */ |
463 | UINT8 InputCharacteristics; //!< Input Characteristics: Normal - 0, Schmitt trigger - 1 | 468 | UINT8 InputCharacteristics; /* Input Characteristics: Normal - 0, Schmitt trigger - 1 */ |
464 | UINT8 OutputSlewRate; //!< Output Slew Rate: Fast slew rate - 0, Slow slew rate - 1 | 469 | UINT8 OutputSlewRate; /* Output Slew Rate: Fast slew rate - 0, Slow slew rate - 1 */ |
465 | UINT8 OutputDriving; //!< Output driving capability: 4mA - 0, 8mA - 1, 12mA - 2, 16mA - 3 | 470 | UINT8 OutputDriving; /* Output driving capability: 4mA - 0, 8mA - 1, 12mA - 2, 16mA - 3 */ |
466 | } SMSHOSTLIB_GPIO_CONFIG_ST; | 471 | } SMSHOSTLIB_GPIO_CONFIG_ST; |
467 | 472 | ||
468 | typedef struct SMSHOSTLIB_I2C_REQ_S | 473 | typedef struct SMSHOSTLIB_I2C_REQ_S |
469 | { | 474 | { |
470 | UINT32 DeviceAddress; // I2c device address | 475 | UINT32 DeviceAddress; /* I2c device address */ |
471 | UINT32 WriteCount; // number of bytes to write | 476 | UINT32 WriteCount; /* number of bytes to write */ |
472 | UINT32 ReadCount; // number of bytes to read | 477 | UINT32 ReadCount; /* number of bytes to read */ |
473 | UINT8 Data[1]; | 478 | UINT8 Data[1]; |
474 | } SMSHOSTLIB_I2C_REQ_ST; | 479 | } SMSHOSTLIB_I2C_REQ_ST; |
475 | 480 | ||
476 | typedef struct SMSHOSTLIB_I2C_RES_S | 481 | typedef struct SMSHOSTLIB_I2C_RES_S |
477 | { | 482 | { |
478 | UINT32 Status; // non-zero value in case of failure | 483 | UINT32 Status; /* non-zero value in case of failure */ |
479 | UINT32 ReadCount; // number of bytes read | 484 | UINT32 ReadCount; /* number of bytes read */ |
480 | UINT8 Data[1]; | 485 | UINT8 Data[1]; |
481 | } SMSHOSTLIB_I2C_RES_ST; | 486 | } SMSHOSTLIB_I2C_RES_ST; |
482 | 487 | ||
@@ -492,12 +497,12 @@ typedef struct _smsdvb_client | |||
492 | struct dmxdev dmxdev; | 497 | struct dmxdev dmxdev; |
493 | struct dvb_frontend frontend; | 498 | struct dvb_frontend frontend; |
494 | 499 | ||
495 | fe_status_t fe_status; | 500 | fe_status_t fe_status; |
496 | int fe_ber, fe_snr, fe_signal_strength; | 501 | int fe_ber, fe_snr, fe_signal_strength; |
497 | 502 | ||
498 | struct completion tune_done, stat_done; | 503 | struct completion tune_done, stat_done; |
499 | 504 | ||
500 | // todo: save freq/band instead whole struct | 505 | /* todo: save freq/band instead whole struct */ |
501 | struct dvb_frontend_parameters fe_params; | 506 | struct dvb_frontend_parameters fe_params; |
502 | 507 | ||
503 | } smsdvb_client_t; | 508 | } smsdvb_client_t; |
@@ -508,14 +513,17 @@ extern int smscore_registry_getmode(char *devpath); | |||
508 | extern int smscore_register_hotplug(hotplug_t hotplug); | 513 | extern int smscore_register_hotplug(hotplug_t hotplug); |
509 | extern void smscore_unregister_hotplug(hotplug_t hotplug); | 514 | extern void smscore_unregister_hotplug(hotplug_t hotplug); |
510 | 515 | ||
511 | extern int smscore_register_device(smsdevice_params_t *params, smscore_device_t **coredev); | 516 | extern int smscore_register_device(smsdevice_params_t *params, |
517 | smscore_device_t **coredev); | ||
512 | extern void smscore_unregister_device(smscore_device_t *coredev); | 518 | extern void smscore_unregister_device(smscore_device_t *coredev); |
513 | 519 | ||
514 | extern int smscore_start_device(smscore_device_t *coredev); | 520 | extern int smscore_start_device(smscore_device_t *coredev); |
515 | extern int smscore_load_firmware(smscore_device_t *coredev, char *filename, | 521 | extern int smscore_load_firmware(smscore_device_t *coredev, char *filename, |
516 | loadfirmware_t loadfirmware_handler); | 522 | loadfirmware_t loadfirmware_handler); |
517 | 523 | ||
518 | extern int smscore_load_firmware_from_buffer(smscore_device_t *coredev, u8 *buffer, int size, int new_mode); | 524 | extern int smscore_load_firmware_from_buffer(smscore_device_t *coredev, |
525 | u8 *buffer, int size, | ||
526 | int new_mode); | ||
519 | 527 | ||
520 | extern int smscore_set_device_mode(smscore_device_t *coredev, int mode); | 528 | extern int smscore_set_device_mode(smscore_device_t *coredev, int mode); |
521 | extern int smscore_get_device_mode(smscore_device_t *coredev); | 529 | extern int smscore_get_device_mode(smscore_device_t *coredev); |
@@ -525,8 +533,10 @@ extern int smscore_register_client(smscore_device_t *coredev, | |||
525 | smscore_client_t **client); | 533 | smscore_client_t **client); |
526 | extern void smscore_unregister_client(smscore_client_t *client); | 534 | extern void smscore_unregister_client(smscore_client_t *client); |
527 | 535 | ||
528 | extern int smsclient_sendrequest(smscore_client_t *client, void *buffer, size_t size); | 536 | extern int smsclient_sendrequest(smscore_client_t *client, |
529 | extern void smscore_onresponse(smscore_device_t *coredev, smscore_buffer_t *cb); | 537 | void *buffer, size_t size); |
538 | extern void smscore_onresponse(smscore_device_t *coredev, | ||
539 | smscore_buffer_t *cb); | ||
530 | 540 | ||
531 | extern int smscore_get_common_buffer_size(smscore_device_t *coredev); | 541 | extern int smscore_get_common_buffer_size(smscore_device_t *coredev); |
532 | extern int smscore_map_common_buffer(smscore_device_t *coredev, | 542 | extern int smscore_map_common_buffer(smscore_device_t *coredev, |
@@ -543,4 +553,4 @@ void smsdvb_unregister(void); | |||
543 | int smsusb_register(void); | 553 | int smsusb_register(void); |
544 | void smsusb_unregister(void); | 554 | void smsusb_unregister(void); |
545 | 555 | ||
546 | #endif // __smscoreapi_h__ | 556 | #endif /* __smscoreapi_h__ */ |