[PATCH 13/25] UBUNTU hardy-lum lpia branch sync
Steve Conklin
sconklin at canonical.com
Tue Mar 10 19:32:45 UTC 2009
>From 9312e09b35e3a9e2b96aa9cdb5dc23f10226b53f Mon Sep 17 00:00:00 2001
From: Uri Shkolnik <uris at siano-ms.com>
Date: Fri, 6 Mar 2009 11:55:03 -0500
Subject: [PATCH] UBUNTU: smscore: whitespace cleanups
OriginalAuthor: Uri Shkolnik <uris at siano-ms.com>
Signed-off-by: Uri Shkolnik <uris at siano-ms.com>
Signed-off-by: Michael Krufky <mkrufky at linuxtv.org>
---
ubuntu/media/sms1xxx/smscoreapi.c | 138 ++++++++----------
ubuntu/media/sms1xxx/smscoreapi.h | 289 +++++++++++++++++++------------------
2 files changed, 207 insertions(+), 220 deletions(-)
diff --git a/ubuntu/media/sms1xxx/smscoreapi.c b/ubuntu/media/sms1xxx/smscoreapi.c
index 8c37a06..eeba342 100644
--- a/ubuntu/media/sms1xxx/smscoreapi.c
+++ b/ubuntu/media/sms1xxx/smscoreapi.c
@@ -38,6 +38,10 @@ static int sms_dbg;
module_param_named(debug, sms_dbg, int, 0644);
MODULE_PARM_DESC(debug, "set debug level (info=1, adv=2 (or-able))");
+static int default_mode = 4;
+module_param(default_mode, int, 0644);
+MODULE_PARM_DESC(default_mode, "default firmware id (device mode)");
+
struct smscore_device_notifyee_t {
struct list_head entry;
hotplug_t hotplug;
@@ -45,17 +49,17 @@ struct smscore_device_notifyee_t {
struct smscore_idlist_t {
struct list_head entry;
- int id;
- int data_type;
+ int id;
+ int data_type;
};
struct smscore_client_t {
struct list_head entry;
struct smscore_device_t *coredev;
- void *context;
- struct list_head idlist;
- onresponse_t onresponse_handler;
- onremove_t onremove_handler;
+ void *context;
+ struct list_head idlist;
+ onresponse_t onresponse_handler;
+ onremove_t onremove_handler;
};
struct smscore_device_t {
@@ -63,29 +67,29 @@ struct smscore_device_t {
struct list_head clients;
struct list_head subclients;
- spinlock_t clientslock;
+ spinlock_t clientslock;
struct list_head buffers;
- spinlock_t bufferslock;
- int num_buffers;
+ spinlock_t bufferslock;
+ int num_buffers;
- void *common_buffer;
- int common_buffer_size;
- dma_addr_t common_buffer_phys;
+ void *common_buffer;
+ int common_buffer_size;
+ dma_addr_t common_buffer_phys;
- void *context;
- struct device *device;
+ void *context;
+ struct device *device;
- char devpath[32];
- unsigned long device_flags;
+ char devpath[32];
+ unsigned long device_flags;
- setmode_t setmode_handler;
- detectmode_t detectmode_handler;
- sendrequest_t sendrequest_handler;
- preload_t preload_handler;
- postload_t postload_handler;
+ setmode_t setmode_handler;
+ detectmode_t detectmode_handler;
+ sendrequest_t sendrequest_handler;
+ preload_t preload_handler;
+ postload_t postload_handler;
- int mode, modes_supported;
+ int mode, modes_supported;
struct completion version_ex_done, data_download_done, trigger_done;
struct completion init_device_done, reload_start_done, resume_done;
@@ -94,10 +98,6 @@ struct smscore_device_t {
int led_state;
};
-void smscore_set_board_id(struct smscore_device_t *core, int id)
-{
- core->board_id = id;
-}
int smscore_led_state(struct smscore_device_t *core, int led)
{
@@ -105,6 +105,11 @@ int smscore_led_state(struct smscore_device_t *core, int led)
core->led_state = led;
return core->led_state;
}
+
+void smscore_set_board_id(struct smscore_device_t *core, int id)
+{
+ core->board_id = id;
+}
EXPORT_SYMBOL_GPL(smscore_set_board_id);
int smscore_get_board_id(struct smscore_device_t *core)
@@ -115,9 +120,9 @@ EXPORT_SYMBOL_GPL(smscore_get_board_id);
struct smscore_registry_entry_t {
struct list_head entry;
- char devpath[32];
- int mode;
- enum sms_device_type_st type;
+ char devpath[32];
+ int mode;
+ enum sms_device_type_st type;
};
static struct list_head g_smscore_notifyees;
@@ -127,19 +132,13 @@ static struct mutex g_smscore_deviceslock;
static struct list_head g_smscore_registry;
static struct mutex g_smscore_registrylock;
-static int default_mode = 4;
-
-module_param(default_mode, int, 0644);
-MODULE_PARM_DESC(default_mode, "default firmware id (device mode)");
-
static struct smscore_registry_entry_t *smscore_find_registry(char *devpath)
{
struct smscore_registry_entry_t *entry;
struct list_head *next;
kmutex_lock(&g_smscore_registrylock);
- for (next = g_smscore_registry.next;
- next != &g_smscore_registry;
+ for (next = g_smscore_registry.next; next != &g_smscore_registry;
next = next->next) {
entry = (struct smscore_registry_entry_t *) next;
if (!strcmp(entry->devpath, devpath)) {
@@ -147,9 +146,7 @@ static struct smscore_registry_entry_t *smscore_find_registry(char *devpath)
return entry;
}
}
- entry = (struct smscore_registry_entry_t *)
- kmalloc(sizeof(struct smscore_registry_entry_t),
- GFP_KERNEL);
+ entry = kmalloc(sizeof(struct smscore_registry_entry_t), GFP_KERNEL);
if (entry) {
entry->mode = default_mode;
strcpy(entry->devpath, devpath);
@@ -210,16 +207,13 @@ static void smscore_registry_settype(char *devpath,
sms_err("No registry found.");
}
-
static void list_add_locked(struct list_head *new, struct list_head *head,
spinlock_t *lock)
{
unsigned long flags;
spin_lock_irqsave(lock, flags);
-
list_add(new, head);
-
spin_unlock_irqrestore(lock, flags);
}
@@ -244,8 +238,7 @@ int smscore_register_hotplug(hotplug_t hotplug)
if (notifyee) {
/* now notify callback about existing devices */
first = &g_smscore_devices;
- for (next = first->next;
- next != first && !rc;
+ for (next = first->next; next != first && !rc;
next = next->next) {
struct smscore_device_t *coredev =
(struct smscore_device_t *) next;
@@ -318,7 +311,7 @@ static int smscore_notify_callbacks(struct smscore_device_t *coredev,
for (next = first->next; next != first; next = next->next) {
rc = ((struct smscore_device_notifyee_t *) next)->
- hotplug(coredev, device, arrival);
+ hotplug(coredev, device, arrival);
if (rc < 0)
break;
}
@@ -326,9 +319,9 @@ static int smscore_notify_callbacks(struct smscore_device_t *coredev,
return rc;
}
-static struct
-smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
- dma_addr_t common_buffer_phys)
+static
+struct smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer,
+ dma_addr_t common_buffer_phys)
{
struct smscore_buffer_t *cb =
kmalloc(sizeof(struct smscore_buffer_t), GFP_KERNEL);
@@ -479,8 +472,7 @@ static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev,
}
return wait_for_completion_timeout(completion,
- msecs_to_jiffies(10000)) ?
- 0 : -ETIME;
+ msecs_to_jiffies(10000)) ? 0 : -ETIME;
}
static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
@@ -553,7 +545,7 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
sizeof(u32) * 5);
TriggerMsg->msgData[0] = firmware->StartAddress;
- /* Entry point */
+ /* Entry point */
TriggerMsg->msgData[1] = 5; /* Priority */
TriggerMsg->msgData[2] = 0x200; /* Stack size */
TriggerMsg->msgData[3] = 0; /* Parameter */
@@ -565,8 +557,8 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
TriggerMsg->xMsgHeader.msgLength);
msleep(100);
} else
- rc = smscore_sendrequest_and_wait(
- coredev, TriggerMsg,
+ rc = smscore_sendrequest_and_wait(coredev,
+ TriggerMsg,
TriggerMsg->xMsgHeader.msgLength,
&coredev->trigger_done);
} else {
@@ -579,14 +571,12 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
msleep(500);
}
- sms_debug("rc=%d, postload=%p ", rc,
- coredev->postload_handler);
+ sms_debug("rc=%d, postload=%p ", rc, coredev->postload_handler);
kfree(msg);
return ((rc >= 0) && coredev->postload_handler) ?
- coredev->postload_handler(coredev->context) :
- rc;
+ coredev->postload_handler(coredev->context) : rc;
}
/**
@@ -718,9 +708,8 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
if (wait_for_completion_timeout(&coredev->resume_done,
msecs_to_jiffies(5000))) {
- rc = smscore_sendrequest_and_wait(
- coredev, msg, msg->msgLength,
- &coredev->version_ex_done);
+ rc = smscore_sendrequest_and_wait(coredev, msg,
+ msg->msgLength, &coredev->version_ex_done);
if (rc < 0)
sms_err("MSG_SMS_GET_VERSION_EX_REQ failed "
"second try, rc %d", rc);
@@ -814,7 +803,7 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
/* try again with the default firmware */
fw_filename = smscore_fw_lkup[mode][type];
rc = smscore_load_firmware_from_file(coredev,
- fw_filename, NULL);
+ fw_filename, NULL);
if (rc < 0) {
sms_warn("error %d loading "
@@ -839,9 +828,9 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
sizeof(struct SmsMsgData_ST));
msg->msgData[0] = mode;
- rc = smscore_sendrequest_and_wait(
- coredev, msg, msg->xMsgHeader.msgLength,
- &coredev->init_device_done);
+ rc = smscore_sendrequest_and_wait(coredev, msg,
+ msg->xMsgHeader.msgLength,
+ &coredev->init_device_done);
kfree(buffer);
} else {
@@ -899,24 +888,21 @@ EXPORT_SYMBOL_GPL(smscore_get_device_mode);
* @param id client id (SMS_DONT_CARE for all id)
*
*/
-static struct
-smscore_client_t *smscore_find_client(struct smscore_device_t *coredev,
- int data_type, int id)
+static
+struct smscore_client_t *smscore_find_client(struct smscore_device_t *coredev,
+ int data_type, int id)
{
struct smscore_client_t *client = NULL;
struct list_head *next, *first;
unsigned long flags;
struct list_head *firstid, *nextid;
-
spin_lock_irqsave(&coredev->clientslock, flags);
first = &coredev->clients;
- for (next = first->next;
- (next != first) && !client;
+ for (next = first->next; (next != first) && !client;
next = next->next) {
- firstid = &((struct smscore_client_t *)next)->idlist;
- for (nextid = firstid->next;
- nextid != firstid;
+ firstid = &((struct smscore_client_t *) next)->idlist;
+ for (nextid = firstid->next; nextid != firstid;
nextid = nextid->next) {
if ((((struct smscore_idlist_t *)nextid)->id == id) &&
(((struct smscore_idlist_t *)nextid)->data_type == data_type ||
@@ -943,12 +929,11 @@ void smscore_onresponse(struct smscore_device_t *coredev,
struct smscore_buffer_t *cb)
{
struct SmsMsgHdr_ST *phdr =
- (struct SmsMsgHdr_ST *)((u8 *) cb->p + cb->offset);
+ (struct SmsMsgHdr_ST *) ((u8 *) cb->p + cb->offset);
struct smscore_client_t *client =
smscore_find_client(coredev, phdr->msgType, phdr->msgDstId);
int rc = -EBUSY;
-#if 1
static unsigned long last_sample_time; /* = 0; */
static int data_total; /* = 0; */
unsigned long time_now = jiffies_to_msecs(jiffies);
@@ -966,7 +951,7 @@ void smscore_onresponse(struct smscore_device_t *coredev,
}
data_total += cb->size;
-#endif
+
/* If no client registered for type & id,
* check for control client where type is not registered */
if (client)
@@ -1159,7 +1144,6 @@ void smscore_unregister_client(struct smscore_client_t *client)
spin_lock_irqsave(&coredev->clientslock, flags);
-
while (!list_empty(&client->idlist)) {
struct smscore_idlist_t *identry =
(struct smscore_idlist_t *) client->idlist.next;
diff --git a/ubuntu/media/sms1xxx/smscoreapi.h b/ubuntu/media/sms1xxx/smscoreapi.h
index 866ca0a..06d87ff 100644
--- a/ubuntu/media/sms1xxx/smscoreapi.h
+++ b/ubuntu/media/sms1xxx/smscoreapi.h
@@ -19,8 +19,8 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#ifndef __smscoreapi_h__
-#define __smscoreapi_h__
+#ifndef __SMSCOREAPI_H__
+#define __SMSCOREAPI_H__
#include <linux/version.h>
#include <linux/device.h>
@@ -53,7 +53,7 @@
#define SMS_DEVICE_FAMILY2 1
#define SMS_ROM_NO_RESPONSE 2
-#define SMS_DEVICE_NOT_READY 0x8000000
+#define SMS_DEVICE_NOT_READY 0x8000000
enum sms_device_type_st {
SMS_STELLAR = 0,
@@ -67,80 +67,80 @@ struct smscore_device_t;
struct smscore_client_t;
struct smscore_buffer_t;
-typedef int (*hotplug_t)(struct smscore_device_t *coredev,
- struct device *device, int arrival);
+typedef int (*hotplug_t) (struct smscore_device_t *coredev,
+ struct device *device, int arrival);
-typedef int (*setmode_t)(void *context, int mode);
-typedef void (*detectmode_t)(void *context, int *mode);
-typedef int (*sendrequest_t)(void *context, void *buffer, size_t size);
-typedef int (*loadfirmware_t)(void *context, void *buffer, size_t size);
-typedef int (*preload_t)(void *context);
-typedef int (*postload_t)(void *context);
+typedef int (*setmode_t) (void *context, int mode);
+typedef void (*detectmode_t) (void *context, int *mode);
+typedef int (*sendrequest_t) (void *context, void *buffer, size_t size);
+typedef int (*loadfirmware_t) (void *context, void *buffer, size_t size);
+typedef int (*preload_t) (void *context);
+typedef int (*postload_t) (void *context);
-typedef int (*onresponse_t)(void *context, struct smscore_buffer_t *cb);
-typedef void (*onremove_t)(void *context);
+typedef int (*onresponse_t) (void *context, struct smscore_buffer_t *cb);
+typedef void (*onremove_t) (void *context);
struct smscore_buffer_t {
/* public members, once passed to clients can be changed freely */
struct list_head entry;
- int size;
- int offset;
+ int size;
+ int offset;
/* private members, read-only for clients */
- void *p;
- dma_addr_t phys;
- unsigned long offset_in_common;
+ void *p;
+ dma_addr_t phys;
+ unsigned long offset_in_common;
};
struct smsdevice_params_t {
- struct device *device;
+ struct device *device;
- int buffer_size;
- int num_buffers;
+ int buffer_size;
+ int num_buffers;
- char devpath[32];
- unsigned long flags;
+ char devpath[32];
+ unsigned long flags;
- setmode_t setmode_handler;
- detectmode_t detectmode_handler;
- sendrequest_t sendrequest_handler;
- preload_t preload_handler;
- postload_t postload_handler;
+ setmode_t setmode_handler;
+ detectmode_t detectmode_handler;
+ sendrequest_t sendrequest_handler;
+ preload_t preload_handler;
+ postload_t postload_handler;
- void *context;
+ void *context;
enum sms_device_type_st device_type;
};
struct smsclient_params_t {
- int initial_id;
- int data_type;
- onresponse_t onresponse_handler;
- onremove_t onremove_handler;
+ int initial_id;
+ int data_type;
+ onresponse_t onresponse_handler;
+ onremove_t onremove_handler;
- void *context;
+ void *context;
};
/* GPIO definitions for antenna frequency domain control (SMS8021) */
-#define SMS_ANTENNA_GPIO_0 1
-#define SMS_ANTENNA_GPIO_1 0
+#define SMS_ANTENNA_GPIO_0 1
+#define SMS_ANTENNA_GPIO_1 0
-#define BW_8_MHZ 0
-#define BW_7_MHZ 1
-#define BW_6_MHZ 2
-#define BW_5_MHZ 3
-#define BW_ISDBT_1SEG 4
-#define BW_ISDBT_3SEG 5
+#define BW_8_MHZ 0
+#define BW_7_MHZ 1
+#define BW_6_MHZ 2
+#define BW_5_MHZ 3
+#define BW_ISDBT_1SEG 4
+#define BW_ISDBT_3SEG 5
#define MSG_HDR_FLAG_SPLIT_MSG 4
-#define MAX_GPIO_PIN_NUMBER 31
+#define MAX_GPIO_PIN_NUMBER 31
-#define HIF_TASK 11
-#define SMS_HOST_LIB 150
+#define HIF_TASK 11
+#define SMS_HOST_LIB 150
#define DVBT_BDA_CONTROL_MSG_ID 201
#define SMS_MAX_PAYLOAD_SIZE 240
-#define SMS_TUNE_TIMEOUT 500
+#define SMS_TUNE_TIMEOUT 500
#define MSG_SMS_GPIO_CONFIG_REQ 507
#define MSG_SMS_GPIO_CONFIG_RES 508
@@ -148,39 +148,39 @@ struct smsclient_params_t {
#define MSG_SMS_GPIO_SET_LEVEL_RES 510
#define MSG_SMS_GPIO_GET_LEVEL_REQ 511
#define MSG_SMS_GPIO_GET_LEVEL_RES 512
-#define MSG_SMS_RF_TUNE_REQ 561
-#define MSG_SMS_RF_TUNE_RES 562
+#define MSG_SMS_RF_TUNE_REQ 561
+#define MSG_SMS_RF_TUNE_RES 562
#define MSG_SMS_INIT_DEVICE_REQ 578
#define MSG_SMS_INIT_DEVICE_RES 579
#define MSG_SMS_ADD_PID_FILTER_REQ 601
#define MSG_SMS_ADD_PID_FILTER_RES 602
-#define MSG_SMS_REMOVE_PID_FILTER_REQ 603
-#define MSG_SMS_REMOVE_PID_FILTER_RES 604
-#define MSG_SMS_DAB_CHANNEL 607
-#define MSG_SMS_GET_PID_FILTER_LIST_REQ 608
-#define MSG_SMS_GET_PID_FILTER_LIST_RES 609
+#define MSG_SMS_REMOVE_PID_FILTER_REQ 603
+#define MSG_SMS_REMOVE_PID_FILTER_RES 604
+#define MSG_SMS_DAB_CHANNEL 607
+#define MSG_SMS_GET_PID_FILTER_LIST_REQ 608
+#define MSG_SMS_GET_PID_FILTER_LIST_RES 609
#define MSG_SMS_GET_STATISTICS_REQ 615
#define MSG_SMS_GET_STATISTICS_RES 616
-#define MSG_SMS_SET_ANTENNA_CONFIG_REQ 651
-#define MSG_SMS_SET_ANTENNA_CONFIG_RES 652
-#define MSG_SMS_GET_STATISTICS_EX_REQ 653
-#define MSG_SMS_GET_STATISTICS_EX_RES 654
-#define MSG_SMS_SLEEP_RESUME_COMP_IND 655
+#define MSG_SMS_SET_ANTENNA_CONFIG_REQ 651
+#define MSG_SMS_SET_ANTENNA_CONFIG_RES 652
+#define MSG_SMS_GET_STATISTICS_EX_REQ 653
+#define MSG_SMS_GET_STATISTICS_EX_RES 654
+#define MSG_SMS_SLEEP_RESUME_COMP_IND 655
#define MSG_SMS_DATA_DOWNLOAD_REQ 660
#define MSG_SMS_DATA_DOWNLOAD_RES 661
-#define MSG_SMS_SWDOWNLOAD_TRIGGER_REQ 664
-#define MSG_SMS_SWDOWNLOAD_TRIGGER_RES 665
-#define MSG_SMS_SWDOWNLOAD_BACKDOOR_REQ 666
-#define MSG_SMS_SWDOWNLOAD_BACKDOOR_RES 667
+#define MSG_SMS_SWDOWNLOAD_TRIGGER_REQ 664
+#define MSG_SMS_SWDOWNLOAD_TRIGGER_RES 665
+#define MSG_SMS_SWDOWNLOAD_BACKDOOR_REQ 666
+#define MSG_SMS_SWDOWNLOAD_BACKDOOR_RES 667
#define MSG_SMS_GET_VERSION_EX_REQ 668
#define MSG_SMS_GET_VERSION_EX_RES 669
-#define MSG_SMS_SET_CLOCK_OUTPUT_REQ 670
+#define MSG_SMS_SET_CLOCK_OUTPUT_REQ 670
#define MSG_SMS_I2C_SET_FREQ_REQ 685
#define MSG_SMS_GENERIC_I2C_REQ 687
#define MSG_SMS_GENERIC_I2C_RES 688
#define MSG_SMS_DVBT_BDA_DATA 693
-#define MSG_SW_RELOAD_REQ 697
-#define MSG_SMS_DATA_MSG 699
+#define MSG_SW_RELOAD_REQ 697
+#define MSG_SMS_DATA_MSG 699
#define MSG_SW_RELOAD_START_REQ 702
#define MSG_SW_RELOAD_START_RES 703
#define MSG_SW_RELOAD_EXEC_REQ 704
@@ -213,121 +213,125 @@ enum SMS_DEVICE_MODE {
};
struct SmsMsgHdr_ST {
- u16 msgType;
- u8 msgSrcId;
- u8 msgDstId;
- u16 msgLength; /* Length of entire message, including header */
- u16 msgFlags;
+ u16 msgType;
+ u8 msgSrcId;
+ u8 msgDstId;
+ u16 msgLength; /* Length of entire message, including header */
+ u16 msgFlags;
};
struct SmsMsgData_ST {
- struct SmsMsgHdr_ST xMsgHeader;
- u32 msgData[1];
+ struct SmsMsgHdr_ST xMsgHeader;
+ u32 msgData[1];
};
struct SmsDataDownload_ST {
- struct SmsMsgHdr_ST xMsgHeader;
- u32 MemAddr;
- u8 Payload[SMS_MAX_PAYLOAD_SIZE];
+ struct SmsMsgHdr_ST xMsgHeader;
+ u32 MemAddr;
+ u8 Payload[SMS_MAX_PAYLOAD_SIZE];
};
struct SmsVersionRes_ST {
- struct SmsMsgHdr_ST xMsgHeader;
+ struct SmsMsgHdr_ST xMsgHeader;
- u16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */
- u8 Step; /* 0 - Step A */
- u8 MetalFix; /* 0 - Metal 0 */
+ u16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */
+ u8 Step; /* 0 - Step A */
+ u8 MetalFix; /* 0 - Metal 0 */
- u8 FirmwareId; /* 0xFF ??? ROM, otherwise the
- * value indicated by
- * SMSHOSTLIB_DEVICE_MODES_E */
- u8 SupportedProtocols; /* Bitwise OR combination of
- * supported protocols */
+ u8 FirmwareId; /* 0xFF ROM, otherwise the
+ * value indicated by
+ * SMSHOSTLIB_DEVICE_MODES_E */
+ u8 SupportedProtocols; /* Bitwise OR combination of
+ * supported protocols */
- u8 VersionMajor;
- u8 VersionMinor;
- u8 VersionPatch;
- u8 VersionFieldPatch;
+ u8 VersionMajor;
+ u8 VersionMinor;
+ u8 VersionPatch;
+ u8 VersionFieldPatch;
- u8 RomVersionMajor;
- u8 RomVersionMinor;
- u8 RomVersionPatch;
- u8 RomVersionFieldPatch;
+ u8 RomVersionMajor;
+ u8 RomVersionMinor;
+ u8 RomVersionPatch;
+ u8 RomVersionFieldPatch;
- u8 TextLabel[34];
+ u8 TextLabel[34];
};
struct SmsFirmware_ST {
- u32 CheckSum;
- u32 Length;
- u32 StartAddress;
- u8 Payload[1];
+ u32 CheckSum;
+ u32 Length;
+ u32 StartAddress;
+ u8 Payload[1];
};
struct SMSHOSTLIB_STATISTICS_ST {
- u32 Reserved; /* Reserved */
+ u32 Reserved; /* Reserved */
/* Common parameters */
- u32 IsRfLocked; /* 0 - not locked, 1 - locked */
- u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
- u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
+ u32 IsRfLocked; /* 0 - not locked, 1 - locked */
+ u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
+ u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
/* Reception quality */
- s32 SNR; /* dB */
- u32 BER; /* Post Viterbi BER [1E-5] */
- u32 FIB_CRC; /* CRC errors percentage, valid only for DAB */
- u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF indicate N/A,
- * valid only for DVB-T/H */
- u32 MFER; /* DVB-H frame error rate in percentage,
- * 0xFFFFFFFF indicate N/A, valid only for DVB-H */
- s32 RSSI; /* dBm */
- s32 InBandPwr; /* In band power in dBM */
- s32 CarrierOffset; /* Carrier Offset in bin/1024 */
+ s32 SNR; /* dB */
+ u32 BER; /* Post Viterbi BER [1E-5] */
+ u32 FIB_CRC; /* CRC errors percentage, valid only for DAB */
+ u32 TS_PER; /* Transport stream PER, 0xFFFFFFFF
+ * indicate N/A, valid only for DVB-T/H */
+ u32 MFER; /* DVB-H frame error rate in percentage,
+ * 0xFFFFFFFF indicate N/A, valid
+ * only for DVB-H */
+ s32 RSSI; /* dBm */
+ s32 InBandPwr; /* In band power in dBM */
+ s32 CarrierOffset; /* Carrier Offset in bin/1024 */
/* Transmission parameters, valid only for DVB-T/H */
- u32 Frequency; /* Frequency in Hz */
- u32 Bandwidth; /* Bandwidth in MHz */
- u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4,
- * for DVB-T/H FFT mode carriers in Kilos */
- u32 ModemState; /* from SMS_DvbModemState_ET */
- u32 GuardInterval; /* Guard Interval, 1 divided by value */
- u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET */
- u32 LPCodeRate; /* Low Priority Code Rate from SMS_DvbModemState_ET */
- u32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET */
- u32 Constellation; /* Constellation from SMS_Constellation_ET */
+ u32 Frequency; /* Frequency in Hz */
+ u32 Bandwidth; /* Bandwidth in MHz */
+ u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4,
+ * for DVB-T/H FFT mode carriers in Kilos */
+ u32 ModemState; /* from SMS_DvbModemState_ET */
+ u32 GuardInterval; /* Guard Interval, 1 divided by value */
+ u32 CodeRate; /* Code Rate from SMS_DvbModemState_ET */
+ u32 LPCodeRate; /* Low Priority Code Rate from
+ * SMS_DvbModemState_ET */
+ u32 Hierarchy; /* Hierarchy from SMS_Hierarchy_ET */
+ u32 Constellation; /* Constellation from SMS_Constellation_ET */
/* Burst parameters, valid only for DVB-H */
- u32 BurstSize; /* Current burst size in bytes */
- u32 BurstDuration; /* Current burst duration in mSec */
- u32 BurstCycleTime; /* Current burst cycle time in mSec */
- u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec,
- * as calculated by demodulator */
- u32 NumOfRows; /* Number of rows in MPE table */
- u32 NumOfPaddCols; /* Number of padding columns in MPE table */
- u32 NumOfPunctCols; /* Number of puncturing columns in MPE table */
+ u32 BurstSize; /* Current burst size in bytes */
+ u32 BurstDuration; /* Current burst duration in mSec */
+ u32 BurstCycleTime; /* Current burst cycle time in mSec */
+ u32 CalculatedBurstCycleTime; /* Current burst cycle time in mSec,
+ * as calculated by demodulator */
+ u32 NumOfRows; /* Number of rows in MPE table */
+ u32 NumOfPaddCols; /* Number of padding columns in MPE table */
+ u32 NumOfPunctCols; /* Number of puncturing columns in MPE table */
/* Burst parameters */
- u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
- u32 TotalTSPackets; /* Total number of transport-stream packets */
- u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include
- * errors after MPE RS decoding */
- u32 NumOfInvalidMpeTlbs; /* Number of MPE tables which include errors
- * after MPE RS decoding */
+ u32 ErrorTSPackets; /* Number of erroneous transport-stream
+ * packets */
+ u32 TotalTSPackets; /* Total number of transport-stream packets */
+ u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include
+ * errors after MPE RS decoding */
+ u32 NumOfInvalidMpeTlbs;/* Number of MPE tables which include errors
+ * after MPE RS decoding */
u32 NumOfCorrectedMpeTlbs; /* Number of MPE tables which were corrected
* by MPE RS decoding */
/* Common params */
- u32 BERErrorCount; /* Number of errornous SYNC bits. */
- u32 BERBitCount; /* Total number of SYNC bits. */
+ u32 BERErrorCount; /* Number of errornous SYNC bits. */
+ u32 BERBitCount; /* Total number of SYNC bits. */
/* Interface information */
- u32 SmsToHostTxErrors; /* Total number of transmission errors. */
+ u32 SmsToHostTxErrors; /* Total number of transmission errors. */
/* DAB/T-DMB */
- u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
+ u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
/* DVB-H TPS parameters */
- u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
- * if set to 0xFFFFFFFF cell_id not yet recovered */
+ u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
+ * if set to 0xFFFFFFFF cell_id not
+ * yet recovered */
};
@@ -608,5 +612,4 @@ int smscore_led_state(struct smscore_device_t *core, int led);
#define sms_debug(fmt, arg...) \
dprintk(KERN_DEBUG, DBG_ADV, fmt, ##arg)
-
-#endif /* __smscoreapi_h__ */
+#endif /* __SMSCOREAPI_H__ */
--
1.5.6.3
More information about the kernel-team
mailing list