[media] siano: get rid of CammelCase from smscoreapi.h
It is almost impossible to see a compliant with checkpatch.pl on those Siano drivers, as there are simply too much violations on it. So, now that a big change was done, the better is to cleanup the checkpatch compliants. Let's first replace all CammelCase symbols found at smscoreapi.h using camel_case namespace. That removed 144 checkpatch.pl compliants on this file. Of course, the other files need to be fixed accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
c8b8fdb39d
commit
dfef84fc13
|
@ -167,13 +167,13 @@ struct sms_board *sms_get_board(unsigned id)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(sms_get_board);
|
EXPORT_SYMBOL_GPL(sms_get_board);
|
||||||
static inline void sms_gpio_assign_11xx_default_led_config(
|
static inline void sms_gpio_assign_11xx_default_led_config(
|
||||||
struct smscore_config_gpio *pGpioConfig) {
|
struct smscore_config_gpio *p_gpio_config) {
|
||||||
pGpioConfig->direction = SMS_GPIO_DIRECTION_OUTPUT;
|
p_gpio_config->direction = SMS_GPIO_DIRECTION_OUTPUT;
|
||||||
pGpioConfig->inputcharacteristics =
|
p_gpio_config->inputcharacteristics =
|
||||||
SMS_GPIO_INPUTCHARACTERISTICS_NORMAL;
|
SMS_GPIO_INPUTCHARACTERISTICS_NORMAL;
|
||||||
pGpioConfig->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA;
|
p_gpio_config->outputdriving = SMS_GPIO_OUTPUTDRIVING_4mA;
|
||||||
pGpioConfig->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS;
|
p_gpio_config->outputslewrate = SMS_GPIO_OUTPUT_SLEW_RATE_0_45_V_NS;
|
||||||
pGpioConfig->pullupdown = SMS_GPIO_PULLUPDOWN_NONE;
|
p_gpio_config->pullupdown = SMS_GPIO_PULLUPDOWN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int sms_board_event(struct smscore_device_t *coredev,
|
int sms_board_event(struct smscore_device_t *coredev,
|
||||||
|
|
|
@ -792,22 +792,22 @@ static int smscore_init_ir(struct smscore_device_t *coredev)
|
||||||
if (rc != 0)
|
if (rc != 0)
|
||||||
sms_err("Error initialization DTV IR sub-module");
|
sms_err("Error initialization DTV IR sub-module");
|
||||||
else {
|
else {
|
||||||
buffer = kmalloc(sizeof(struct SmsMsgData_ST2) +
|
buffer = kmalloc(sizeof(struct sms_msg_data2) +
|
||||||
SMS_DMA_ALIGNMENT,
|
SMS_DMA_ALIGNMENT,
|
||||||
GFP_KERNEL | GFP_DMA);
|
GFP_KERNEL | GFP_DMA);
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
struct SmsMsgData_ST2 *msg =
|
struct sms_msg_data2 *msg =
|
||||||
(struct SmsMsgData_ST2 *)
|
(struct sms_msg_data2 *)
|
||||||
SMS_ALIGN_ADDRESS(buffer);
|
SMS_ALIGN_ADDRESS(buffer);
|
||||||
|
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader,
|
SMS_INIT_MSG(&msg->x_msg_header,
|
||||||
MSG_SMS_START_IR_REQ,
|
MSG_SMS_START_IR_REQ,
|
||||||
sizeof(struct SmsMsgData_ST2));
|
sizeof(struct sms_msg_data2));
|
||||||
msg->msgData[0] = coredev->ir.controller;
|
msg->msgData[0] = coredev->ir.controller;
|
||||||
msg->msgData[1] = coredev->ir.timeout;
|
msg->msgData[1] = coredev->ir.timeout;
|
||||||
|
|
||||||
rc = smscore_sendrequest_and_wait(coredev, msg,
|
rc = smscore_sendrequest_and_wait(coredev, msg,
|
||||||
msg->xMsgHeader. msgLength,
|
msg->x_msg_header. msg_length,
|
||||||
&coredev->ir_init_done);
|
&coredev->ir_init_done);
|
||||||
|
|
||||||
kfree(buffer);
|
kfree(buffer);
|
||||||
|
@ -840,14 +840,14 @@ int smscore_configure_board(struct smscore_device_t *coredev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (board->mtu) {
|
if (board->mtu) {
|
||||||
struct SmsMsgData_ST MtuMsg;
|
struct sms_msg_data MtuMsg;
|
||||||
sms_debug("set max transmit unit %d", board->mtu);
|
sms_debug("set max transmit unit %d", board->mtu);
|
||||||
|
|
||||||
MtuMsg.xMsgHeader.msgSrcId = 0;
|
MtuMsg.x_msg_header.msg_src_id = 0;
|
||||||
MtuMsg.xMsgHeader.msgDstId = HIF_TASK;
|
MtuMsg.x_msg_header.msg_dst_id = HIF_TASK;
|
||||||
MtuMsg.xMsgHeader.msgFlags = 0;
|
MtuMsg.x_msg_header.msg_flags = 0;
|
||||||
MtuMsg.xMsgHeader.msgType = MSG_SMS_SET_MAX_TX_MSG_LEN_REQ;
|
MtuMsg.x_msg_header.msg_type = MSG_SMS_SET_MAX_TX_MSG_LEN_REQ;
|
||||||
MtuMsg.xMsgHeader.msgLength = sizeof(MtuMsg);
|
MtuMsg.x_msg_header.msg_length = sizeof(MtuMsg);
|
||||||
MtuMsg.msgData[0] = board->mtu;
|
MtuMsg.msgData[0] = board->mtu;
|
||||||
|
|
||||||
coredev->sendrequest_handler(coredev->context, &MtuMsg,
|
coredev->sendrequest_handler(coredev->context, &MtuMsg,
|
||||||
|
@ -855,10 +855,10 @@ int smscore_configure_board(struct smscore_device_t *coredev)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (board->crystal) {
|
if (board->crystal) {
|
||||||
struct SmsMsgData_ST CrysMsg;
|
struct sms_msg_data CrysMsg;
|
||||||
sms_debug("set crystal value %d", board->crystal);
|
sms_debug("set crystal value %d", board->crystal);
|
||||||
|
|
||||||
SMS_INIT_MSG(&CrysMsg.xMsgHeader,
|
SMS_INIT_MSG(&CrysMsg.x_msg_header,
|
||||||
MSG_SMS_NEW_CRYSTAL_REQ,
|
MSG_SMS_NEW_CRYSTAL_REQ,
|
||||||
sizeof(CrysMsg));
|
sizeof(CrysMsg));
|
||||||
CrysMsg.msgData[0] = board->crystal;
|
CrysMsg.msgData[0] = board->crystal;
|
||||||
|
@ -916,19 +916,19 @@ EXPORT_SYMBOL_GPL(smscore_start_device);
|
||||||
static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||||
void *buffer, size_t size)
|
void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
struct SmsFirmware_ST *firmware = (struct SmsFirmware_ST *) buffer;
|
struct sms_firmware *firmware = (struct sms_firmware *) buffer;
|
||||||
struct SmsMsgData_ST4 *msg;
|
struct sms_msg_data4 *msg;
|
||||||
u32 mem_address, calc_checksum = 0;
|
u32 mem_address, calc_checksum = 0;
|
||||||
u32 i, *ptr;
|
u32 i, *ptr;
|
||||||
u8 *payload = firmware->Payload;
|
u8 *payload = firmware->payload;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
firmware->StartAddress = le32_to_cpu(firmware->StartAddress);
|
firmware->start_address = le32_to_cpu(firmware->start_address);
|
||||||
firmware->Length = le32_to_cpu(firmware->Length);
|
firmware->length = le32_to_cpu(firmware->length);
|
||||||
|
|
||||||
mem_address = firmware->StartAddress;
|
mem_address = firmware->start_address;
|
||||||
|
|
||||||
sms_info("loading FW to addr 0x%x size %d",
|
sms_info("loading FW to addr 0x%x size %d",
|
||||||
mem_address, firmware->Length);
|
mem_address, firmware->length);
|
||||||
if (coredev->preload_handler) {
|
if (coredev->preload_handler) {
|
||||||
rc = coredev->preload_handler(coredev->context);
|
rc = coredev->preload_handler(coredev->context);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
|
@ -942,10 +942,10 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||||
|
|
||||||
if (coredev->mode != DEVICE_MODE_NONE) {
|
if (coredev->mode != DEVICE_MODE_NONE) {
|
||||||
sms_debug("sending reload command.");
|
sms_debug("sending reload command.");
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_START_REQ,
|
SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_START_REQ,
|
||||||
sizeof(struct SmsMsgHdr_ST));
|
sizeof(struct sms_msg_hdr));
|
||||||
rc = smscore_sendrequest_and_wait(coredev, msg,
|
rc = smscore_sendrequest_and_wait(coredev, msg,
|
||||||
msg->xMsgHeader.msgLength,
|
msg->x_msg_header.msg_length,
|
||||||
&coredev->reload_start_done);
|
&coredev->reload_start_done);
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
sms_err("device reload failed, rc %d", rc);
|
sms_err("device reload failed, rc %d", rc);
|
||||||
|
@ -954,24 +954,24 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||||
mem_address = *(u32 *) &payload[20];
|
mem_address = *(u32 *) &payload[20];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0, ptr = (u32 *)firmware->Payload; i < firmware->Length/4 ;
|
for (i = 0, ptr = (u32 *)firmware->payload; i < firmware->length/4 ;
|
||||||
i++, ptr++)
|
i++, ptr++)
|
||||||
calc_checksum += *ptr;
|
calc_checksum += *ptr;
|
||||||
|
|
||||||
while (size && rc >= 0) {
|
while (size && rc >= 0) {
|
||||||
struct SmsDataDownload_ST *DataMsg =
|
struct sms_data_download *DataMsg =
|
||||||
(struct SmsDataDownload_ST *) msg;
|
(struct sms_data_download *) msg;
|
||||||
int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE);
|
int payload_size = min((int) size, SMS_MAX_PAYLOAD_SIZE);
|
||||||
|
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_DATA_DOWNLOAD_REQ,
|
SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_DOWNLOAD_REQ,
|
||||||
(u16)(sizeof(struct SmsMsgHdr_ST) +
|
(u16)(sizeof(struct sms_msg_hdr) +
|
||||||
sizeof(u32) + payload_size));
|
sizeof(u32) + payload_size));
|
||||||
|
|
||||||
DataMsg->MemAddr = mem_address;
|
DataMsg->mem_addr = mem_address;
|
||||||
memcpy(DataMsg->Payload, payload, payload_size);
|
memcpy(DataMsg->payload, payload, payload_size);
|
||||||
|
|
||||||
rc = smscore_sendrequest_and_wait(coredev, DataMsg,
|
rc = smscore_sendrequest_and_wait(coredev, DataMsg,
|
||||||
DataMsg->xMsgHeader.msgLength,
|
DataMsg->x_msg_header.msg_length,
|
||||||
&coredev->data_download_done);
|
&coredev->data_download_done);
|
||||||
|
|
||||||
payload += payload_size;
|
payload += payload_size;
|
||||||
|
@ -984,30 +984,30 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||||
|
|
||||||
sms_err("sending MSG_SMS_DATA_VALIDITY_REQ expecting 0x%x",
|
sms_err("sending MSG_SMS_DATA_VALIDITY_REQ expecting 0x%x",
|
||||||
calc_checksum);
|
calc_checksum);
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_DATA_VALIDITY_REQ,
|
SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_DATA_VALIDITY_REQ,
|
||||||
sizeof(msg->xMsgHeader) +
|
sizeof(msg->x_msg_header) +
|
||||||
sizeof(u32) * 3);
|
sizeof(u32) * 3);
|
||||||
msg->msgData[0] = firmware->StartAddress;
|
msg->msgData[0] = firmware->start_address;
|
||||||
/* Entry point */
|
/* Entry point */
|
||||||
msg->msgData[1] = firmware->Length;
|
msg->msgData[1] = firmware->length;
|
||||||
msg->msgData[2] = 0; /* Regular checksum*/
|
msg->msgData[2] = 0; /* Regular checksum*/
|
||||||
rc = smscore_sendrequest_and_wait(coredev, msg,
|
rc = smscore_sendrequest_and_wait(coredev, msg,
|
||||||
msg->xMsgHeader.msgLength,
|
msg->x_msg_header.msg_length,
|
||||||
&coredev->data_validity_done);
|
&coredev->data_validity_done);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
goto exit_fw_download;
|
goto exit_fw_download;
|
||||||
|
|
||||||
if (coredev->mode == DEVICE_MODE_NONE) {
|
if (coredev->mode == DEVICE_MODE_NONE) {
|
||||||
struct SmsMsgData_ST *TriggerMsg =
|
struct sms_msg_data *TriggerMsg =
|
||||||
(struct SmsMsgData_ST *) msg;
|
(struct sms_msg_data *) msg;
|
||||||
|
|
||||||
sms_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ");
|
sms_debug("sending MSG_SMS_SWDOWNLOAD_TRIGGER_REQ");
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader,
|
SMS_INIT_MSG(&msg->x_msg_header,
|
||||||
MSG_SMS_SWDOWNLOAD_TRIGGER_REQ,
|
MSG_SMS_SWDOWNLOAD_TRIGGER_REQ,
|
||||||
sizeof(struct SmsMsgHdr_ST) +
|
sizeof(struct sms_msg_hdr) +
|
||||||
sizeof(u32) * 5);
|
sizeof(u32) * 5);
|
||||||
|
|
||||||
TriggerMsg->msgData[0] = firmware->StartAddress;
|
TriggerMsg->msgData[0] = firmware->start_address;
|
||||||
/* Entry point */
|
/* Entry point */
|
||||||
TriggerMsg->msgData[1] = 6; /* Priority */
|
TriggerMsg->msgData[1] = 6; /* Priority */
|
||||||
TriggerMsg->msgData[2] = 0x200; /* Stack size */
|
TriggerMsg->msgData[2] = 0x200; /* Stack size */
|
||||||
|
@ -1015,13 +1015,13 @@ static int smscore_load_firmware_family2(struct smscore_device_t *coredev,
|
||||||
TriggerMsg->msgData[4] = 4; /* Task ID */
|
TriggerMsg->msgData[4] = 4; /* Task ID */
|
||||||
|
|
||||||
rc = smscore_sendrequest_and_wait(coredev, TriggerMsg,
|
rc = smscore_sendrequest_and_wait(coredev, TriggerMsg,
|
||||||
TriggerMsg->xMsgHeader.msgLength,
|
TriggerMsg->x_msg_header.msg_length,
|
||||||
&coredev->trigger_done);
|
&coredev->trigger_done);
|
||||||
} else {
|
} else {
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SW_RELOAD_EXEC_REQ,
|
SMS_INIT_MSG(&msg->x_msg_header, MSG_SW_RELOAD_EXEC_REQ,
|
||||||
sizeof(struct SmsMsgHdr_ST));
|
sizeof(struct sms_msg_hdr));
|
||||||
rc = coredev->sendrequest_handler(coredev->context, msg,
|
rc = coredev->sendrequest_handler(coredev->context, msg,
|
||||||
msg->xMsgHeader.msgLength);
|
msg->x_msg_header.msg_length);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
|
@ -1256,19 +1256,19 @@ EXPORT_SYMBOL_GPL(smscore_unregister_device);
|
||||||
|
|
||||||
static int smscore_detect_mode(struct smscore_device_t *coredev)
|
static int smscore_detect_mode(struct smscore_device_t *coredev)
|
||||||
{
|
{
|
||||||
void *buffer = kmalloc(sizeof(struct SmsMsgHdr_ST) + SMS_DMA_ALIGNMENT,
|
void *buffer = kmalloc(sizeof(struct sms_msg_hdr) + SMS_DMA_ALIGNMENT,
|
||||||
GFP_KERNEL | GFP_DMA);
|
GFP_KERNEL | GFP_DMA);
|
||||||
struct SmsMsgHdr_ST *msg =
|
struct sms_msg_hdr *msg =
|
||||||
(struct SmsMsgHdr_ST *) SMS_ALIGN_ADDRESS(buffer);
|
(struct sms_msg_hdr *) SMS_ALIGN_ADDRESS(buffer);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ,
|
SMS_INIT_MSG(msg, MSG_SMS_GET_VERSION_EX_REQ,
|
||||||
sizeof(struct SmsMsgHdr_ST));
|
sizeof(struct sms_msg_hdr));
|
||||||
|
|
||||||
rc = smscore_sendrequest_and_wait(coredev, msg, msg->msgLength,
|
rc = smscore_sendrequest_and_wait(coredev, msg, msg->msg_length,
|
||||||
&coredev->version_ex_done);
|
&coredev->version_ex_done);
|
||||||
if (rc == -ETIME) {
|
if (rc == -ETIME) {
|
||||||
sms_err("MSG_SMS_GET_VERSION_EX_REQ failed first try");
|
sms_err("MSG_SMS_GET_VERSION_EX_REQ failed first try");
|
||||||
|
@ -1276,7 +1276,7 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
|
||||||
if (wait_for_completion_timeout(&coredev->resume_done,
|
if (wait_for_completion_timeout(&coredev->resume_done,
|
||||||
msecs_to_jiffies(5000))) {
|
msecs_to_jiffies(5000))) {
|
||||||
rc = smscore_sendrequest_and_wait(
|
rc = smscore_sendrequest_and_wait(
|
||||||
coredev, msg, msg->msgLength,
|
coredev, msg, msg->msg_length,
|
||||||
&coredev->version_ex_done);
|
&coredev->version_ex_done);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
sms_err("MSG_SMS_GET_VERSION_EX_REQ failed "
|
sms_err("MSG_SMS_GET_VERSION_EX_REQ failed "
|
||||||
|
@ -1302,23 +1302,23 @@ static int smscore_detect_mode(struct smscore_device_t *coredev)
|
||||||
int smscore_init_device(struct smscore_device_t *coredev, int mode)
|
int smscore_init_device(struct smscore_device_t *coredev, int mode)
|
||||||
{
|
{
|
||||||
void *buffer;
|
void *buffer;
|
||||||
struct SmsMsgData_ST *msg;
|
struct sms_msg_data *msg;
|
||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
buffer = kmalloc(sizeof(struct SmsMsgData_ST) +
|
buffer = kmalloc(sizeof(struct sms_msg_data) +
|
||||||
SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
|
SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
|
||||||
if (!buffer) {
|
if (!buffer) {
|
||||||
sms_err("Could not allocate buffer for init device message.");
|
sms_err("Could not allocate buffer for init device message.");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
msg = (struct SmsMsgData_ST *)SMS_ALIGN_ADDRESS(buffer);
|
msg = (struct sms_msg_data *)SMS_ALIGN_ADDRESS(buffer);
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ,
|
SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ,
|
||||||
sizeof(struct SmsMsgData_ST));
|
sizeof(struct sms_msg_data));
|
||||||
msg->msgData[0] = mode;
|
msg->msgData[0] = mode;
|
||||||
|
|
||||||
rc = smscore_sendrequest_and_wait(coredev, msg,
|
rc = smscore_sendrequest_and_wait(coredev, msg,
|
||||||
msg->xMsgHeader. msgLength,
|
msg->x_msg_header. msg_length,
|
||||||
&coredev->init_device_done);
|
&coredev->init_device_done);
|
||||||
|
|
||||||
kfree(buffer);
|
kfree(buffer);
|
||||||
|
@ -1396,17 +1396,17 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode)
|
||||||
coredev->mode = mode;
|
coredev->mode = mode;
|
||||||
coredev->device_flags &= ~SMS_DEVICE_NOT_READY;
|
coredev->device_flags &= ~SMS_DEVICE_NOT_READY;
|
||||||
|
|
||||||
buffer = kmalloc(sizeof(struct SmsMsgData_ST) +
|
buffer = kmalloc(sizeof(struct sms_msg_data) +
|
||||||
SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
|
SMS_DMA_ALIGNMENT, GFP_KERNEL | GFP_DMA);
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *) SMS_ALIGN_ADDRESS(buffer);
|
struct sms_msg_data *msg = (struct sms_msg_data *) SMS_ALIGN_ADDRESS(buffer);
|
||||||
|
|
||||||
SMS_INIT_MSG(&msg->xMsgHeader, MSG_SMS_INIT_DEVICE_REQ,
|
SMS_INIT_MSG(&msg->x_msg_header, MSG_SMS_INIT_DEVICE_REQ,
|
||||||
sizeof(struct SmsMsgData_ST));
|
sizeof(struct sms_msg_data));
|
||||||
msg->msgData[0] = mode;
|
msg->msgData[0] = mode;
|
||||||
|
|
||||||
rc = smscore_sendrequest_and_wait(
|
rc = smscore_sendrequest_and_wait(
|
||||||
coredev, msg, msg->xMsgHeader.msgLength,
|
coredev, msg, msg->x_msg_header.msg_length,
|
||||||
&coredev->init_device_done);
|
&coredev->init_device_done);
|
||||||
|
|
||||||
kfree(buffer);
|
kfree(buffer);
|
||||||
|
@ -1483,7 +1483,7 @@ found:
|
||||||
*/
|
*/
|
||||||
void smscore_onresponse(struct smscore_device_t *coredev,
|
void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
struct smscore_buffer_t *cb) {
|
struct smscore_buffer_t *cb) {
|
||||||
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) ((u8 *) cb->p
|
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) ((u8 *) cb->p
|
||||||
+ cb->offset);
|
+ cb->offset);
|
||||||
struct smscore_client_t *client;
|
struct smscore_client_t *client;
|
||||||
int rc = -EBUSY;
|
int rc = -EBUSY;
|
||||||
|
@ -1505,14 +1505,14 @@ void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
|
|
||||||
data_total += cb->size;
|
data_total += cb->size;
|
||||||
/* Do we need to re-route? */
|
/* Do we need to re-route? */
|
||||||
if ((phdr->msgType == MSG_SMS_HO_PER_SLICES_IND) ||
|
if ((phdr->msg_type == MSG_SMS_HO_PER_SLICES_IND) ||
|
||||||
(phdr->msgType == MSG_SMS_TRANSMISSION_IND)) {
|
(phdr->msg_type == MSG_SMS_TRANSMISSION_IND)) {
|
||||||
if (coredev->mode == DEVICE_MODE_DVBT_BDA)
|
if (coredev->mode == DEVICE_MODE_DVBT_BDA)
|
||||||
phdr->msgDstId = DVBT_BDA_CONTROL_MSG_ID;
|
phdr->msg_dst_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
client = smscore_find_client(coredev, phdr->msgType, phdr->msgDstId);
|
client = smscore_find_client(coredev, phdr->msg_type, phdr->msg_dst_id);
|
||||||
|
|
||||||
/* If no client registered for type & id,
|
/* If no client registered for type & id,
|
||||||
* check for control client where type is not registered */
|
* check for control client where type is not registered */
|
||||||
|
@ -1520,7 +1520,7 @@ void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
rc = client->onresponse_handler(client->context, cb);
|
rc = client->onresponse_handler(client->context, cb);
|
||||||
|
|
||||||
if (rc < 0) {
|
if (rc < 0) {
|
||||||
switch (phdr->msgType) {
|
switch (phdr->msg_type) {
|
||||||
case MSG_SMS_ISDBT_TUNE_RES:
|
case MSG_SMS_ISDBT_TUNE_RES:
|
||||||
break;
|
break;
|
||||||
case MSG_SMS_RF_TUNE_RES:
|
case MSG_SMS_RF_TUNE_RES:
|
||||||
|
@ -1537,17 +1537,17 @@ void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
break;
|
break;
|
||||||
case MSG_SMS_GET_VERSION_EX_RES:
|
case MSG_SMS_GET_VERSION_EX_RES:
|
||||||
{
|
{
|
||||||
struct SmsVersionRes_ST *ver =
|
struct sms_version_res *ver =
|
||||||
(struct SmsVersionRes_ST *) phdr;
|
(struct sms_version_res *) phdr;
|
||||||
sms_debug("Firmware id %d prots 0x%x ver %d.%d",
|
sms_debug("Firmware id %d prots 0x%x ver %d.%d",
|
||||||
ver->FirmwareId, ver->SupportedProtocols,
|
ver->firmware_id, ver->supported_protocols,
|
||||||
ver->RomVersionMajor, ver->RomVersionMinor);
|
ver->rom_ver_major, ver->rom_ver_minor);
|
||||||
|
|
||||||
coredev->mode = ver->FirmwareId == 255 ?
|
coredev->mode = ver->firmware_id == 255 ?
|
||||||
DEVICE_MODE_NONE : ver->FirmwareId;
|
DEVICE_MODE_NONE : ver->firmware_id;
|
||||||
coredev->modes_supported = ver->SupportedProtocols;
|
coredev->modes_supported = ver->supported_protocols;
|
||||||
coredev->fw_version = ver->RomVersionMajor << 8 |
|
coredev->fw_version = ver->rom_ver_major << 8 |
|
||||||
ver->RomVersionMinor;
|
ver->rom_ver_minor;
|
||||||
|
|
||||||
complete(&coredev->version_ex_done);
|
complete(&coredev->version_ex_done);
|
||||||
break;
|
break;
|
||||||
|
@ -1560,7 +1560,7 @@ void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
break;
|
break;
|
||||||
case MSG_SMS_DATA_VALIDITY_RES:
|
case MSG_SMS_DATA_VALIDITY_RES:
|
||||||
{
|
{
|
||||||
struct SmsMsgData_ST *validity = (struct SmsMsgData_ST *) phdr;
|
struct sms_msg_data *validity = (struct sms_msg_data *) phdr;
|
||||||
|
|
||||||
sms_err("MSG_SMS_DATA_VALIDITY_RES, checksum = 0x%x",
|
sms_err("MSG_SMS_DATA_VALIDITY_RES, checksum = 0x%x",
|
||||||
validity->msgData[0]);
|
validity->msgData[0]);
|
||||||
|
@ -1600,9 +1600,9 @@ void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
sms_ir_event(coredev,
|
sms_ir_event(coredev,
|
||||||
(const char *)
|
(const char *)
|
||||||
((char *)phdr
|
((char *)phdr
|
||||||
+ sizeof(struct SmsMsgHdr_ST)),
|
+ sizeof(struct sms_msg_hdr)),
|
||||||
(int)phdr->msgLength
|
(int)phdr->msg_length
|
||||||
- sizeof(struct SmsMsgHdr_ST));
|
- sizeof(struct sms_msg_hdr));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSG_SMS_DVBT_BDA_DATA:
|
case MSG_SMS_DVBT_BDA_DATA:
|
||||||
|
@ -1616,8 +1616,8 @@ void smscore_onresponse(struct smscore_device_t *coredev,
|
||||||
|
|
||||||
default:
|
default:
|
||||||
sms_debug("message %s(%d) not handled.",
|
sms_debug("message %s(%d) not handled.",
|
||||||
smscore_translate_msg(phdr->msgType),
|
smscore_translate_msg(phdr->msg_type),
|
||||||
phdr->msgType);
|
phdr->msg_type);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
smscore_putbuffer(coredev, cb);
|
smscore_putbuffer(coredev, cb);
|
||||||
|
@ -1799,7 +1799,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
|
||||||
void *buffer, size_t size)
|
void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
struct smscore_device_t *coredev;
|
struct smscore_device_t *coredev;
|
||||||
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer;
|
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
if (client == NULL) {
|
if (client == NULL) {
|
||||||
|
@ -1816,7 +1816,7 @@ int smsclient_sendrequest(struct smscore_client_t *client,
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = smscore_validate_client(client->coredev, client, 0,
|
rc = smscore_validate_client(client->coredev, client, 0,
|
||||||
phdr->msgSrcId);
|
phdr->msg_src_id);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
return rc;
|
return rc;
|
||||||
|
|
||||||
|
@ -1830,16 +1830,16 @@ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
|
||||||
struct smscore_config_gpio *pinconfig)
|
struct smscore_config_gpio *pinconfig)
|
||||||
{
|
{
|
||||||
struct {
|
struct {
|
||||||
struct SmsMsgHdr_ST hdr;
|
struct sms_msg_hdr hdr;
|
||||||
u32 data[6];
|
u32 data[6];
|
||||||
} msg;
|
} msg;
|
||||||
|
|
||||||
if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
|
if (coredev->device_flags & SMS_DEVICE_FAMILY2) {
|
||||||
msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
msg.hdr.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
msg.hdr.msgDstId = HIF_TASK;
|
msg.hdr.msg_dst_id = HIF_TASK;
|
||||||
msg.hdr.msgFlags = 0;
|
msg.hdr.msg_flags = 0;
|
||||||
msg.hdr.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ;
|
msg.hdr.msg_type = MSG_SMS_GPIO_CONFIG_EX_REQ;
|
||||||
msg.hdr.msgLength = sizeof(msg);
|
msg.hdr.msg_length = sizeof(msg);
|
||||||
|
|
||||||
msg.data[0] = pin;
|
msg.data[0] = pin;
|
||||||
msg.data[1] = pinconfig->pullupdown;
|
msg.data[1] = pinconfig->pullupdown;
|
||||||
|
@ -1875,18 +1875,18 @@ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
|
||||||
int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
|
int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
|
||||||
{
|
{
|
||||||
struct {
|
struct {
|
||||||
struct SmsMsgHdr_ST hdr;
|
struct sms_msg_hdr hdr;
|
||||||
u32 data[3];
|
u32 data[3];
|
||||||
} msg;
|
} msg;
|
||||||
|
|
||||||
if (pin > MAX_GPIO_PIN_NUMBER)
|
if (pin > MAX_GPIO_PIN_NUMBER)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
msg.hdr.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
msg.hdr.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
msg.hdr.msgDstId = HIF_TASK;
|
msg.hdr.msg_dst_id = HIF_TASK;
|
||||||
msg.hdr.msgFlags = 0;
|
msg.hdr.msg_flags = 0;
|
||||||
msg.hdr.msgType = MSG_SMS_GPIO_SET_LEVEL_REQ;
|
msg.hdr.msg_type = MSG_SMS_GPIO_SET_LEVEL_REQ;
|
||||||
msg.hdr.msgLength = sizeof(msg);
|
msg.hdr.msg_length = sizeof(msg);
|
||||||
|
|
||||||
msg.data[0] = pin;
|
msg.data[0] = pin;
|
||||||
msg.data[1] = level ? 1 : 0;
|
msg.data[1] = level ? 1 : 0;
|
||||||
|
@ -1897,47 +1897,47 @@ int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* new GPIO management implementation */
|
/* new GPIO management implementation */
|
||||||
static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum,
|
static int GetGpioPinParams(u32 pin_num, u32 *pTranslatedpin_num,
|
||||||
u32 *pGroupNum, u32 *pGroupCfg) {
|
u32 *pGroupNum, u32 *pGroupCfg) {
|
||||||
|
|
||||||
*pGroupCfg = 1;
|
*pGroupCfg = 1;
|
||||||
|
|
||||||
if (PinNum <= 1) {
|
if (pin_num <= 1) {
|
||||||
*pTranslatedPinNum = 0;
|
*pTranslatedpin_num = 0;
|
||||||
*pGroupNum = 9;
|
*pGroupNum = 9;
|
||||||
*pGroupCfg = 2;
|
*pGroupCfg = 2;
|
||||||
} else if (PinNum >= 2 && PinNum <= 6) {
|
} else if (pin_num >= 2 && pin_num <= 6) {
|
||||||
*pTranslatedPinNum = 2;
|
*pTranslatedpin_num = 2;
|
||||||
*pGroupNum = 0;
|
*pGroupNum = 0;
|
||||||
*pGroupCfg = 2;
|
*pGroupCfg = 2;
|
||||||
} else if (PinNum >= 7 && PinNum <= 11) {
|
} else if (pin_num >= 7 && pin_num <= 11) {
|
||||||
*pTranslatedPinNum = 7;
|
*pTranslatedpin_num = 7;
|
||||||
*pGroupNum = 1;
|
*pGroupNum = 1;
|
||||||
} else if (PinNum >= 12 && PinNum <= 15) {
|
} else if (pin_num >= 12 && pin_num <= 15) {
|
||||||
*pTranslatedPinNum = 12;
|
*pTranslatedpin_num = 12;
|
||||||
*pGroupNum = 2;
|
*pGroupNum = 2;
|
||||||
*pGroupCfg = 3;
|
*pGroupCfg = 3;
|
||||||
} else if (PinNum == 16) {
|
} else if (pin_num == 16) {
|
||||||
*pTranslatedPinNum = 16;
|
*pTranslatedpin_num = 16;
|
||||||
*pGroupNum = 23;
|
*pGroupNum = 23;
|
||||||
} else if (PinNum >= 17 && PinNum <= 24) {
|
} else if (pin_num >= 17 && pin_num <= 24) {
|
||||||
*pTranslatedPinNum = 17;
|
*pTranslatedpin_num = 17;
|
||||||
*pGroupNum = 3;
|
*pGroupNum = 3;
|
||||||
} else if (PinNum == 25) {
|
} else if (pin_num == 25) {
|
||||||
*pTranslatedPinNum = 25;
|
*pTranslatedpin_num = 25;
|
||||||
*pGroupNum = 6;
|
*pGroupNum = 6;
|
||||||
} else if (PinNum >= 26 && PinNum <= 28) {
|
} else if (pin_num >= 26 && pin_num <= 28) {
|
||||||
*pTranslatedPinNum = 26;
|
*pTranslatedpin_num = 26;
|
||||||
*pGroupNum = 4;
|
*pGroupNum = 4;
|
||||||
} else if (PinNum == 29) {
|
} else if (pin_num == 29) {
|
||||||
*pTranslatedPinNum = 29;
|
*pTranslatedpin_num = 29;
|
||||||
*pGroupNum = 5;
|
*pGroupNum = 5;
|
||||||
*pGroupCfg = 2;
|
*pGroupCfg = 2;
|
||||||
} else if (PinNum == 30) {
|
} else if (pin_num == 30) {
|
||||||
*pTranslatedPinNum = 30;
|
*pTranslatedpin_num = 30;
|
||||||
*pGroupNum = 8;
|
*pGroupNum = 8;
|
||||||
} else if (PinNum == 31) {
|
} else if (pin_num == 31) {
|
||||||
*pTranslatedPinNum = 31;
|
*pTranslatedpin_num = 31;
|
||||||
*pGroupNum = 17;
|
*pGroupNum = 17;
|
||||||
} else
|
} else
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1947,11 +1947,11 @@ static int GetGpioPinParams(u32 PinNum, u32 *pTranslatedPinNum,
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
|
int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
|
||||||
struct smscore_config_gpio *pGpioConfig) {
|
struct smscore_config_gpio *p_gpio_config) {
|
||||||
|
|
||||||
u32 totalLen;
|
u32 totalLen;
|
||||||
u32 TranslatedPinNum = 0;
|
u32 Translatedpin_num = 0;
|
||||||
u32 GroupNum = 0;
|
u32 GroupNum = 0;
|
||||||
u32 ElectricChar;
|
u32 ElectricChar;
|
||||||
u32 groupCfg;
|
u32 groupCfg;
|
||||||
|
@ -1959,18 +1959,18 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
struct SetGpioMsg {
|
struct SetGpioMsg {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 msgData[6];
|
u32 msgData[6];
|
||||||
} *pMsg;
|
} *pMsg;
|
||||||
|
|
||||||
|
|
||||||
if (PinNum > MAX_GPIO_PIN_NUMBER)
|
if (pin_num > MAX_GPIO_PIN_NUMBER)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (pGpioConfig == NULL)
|
if (p_gpio_config == NULL)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
totalLen = sizeof(struct SmsMsgHdr_ST) + (sizeof(u32) * 6);
|
totalLen = sizeof(struct sms_msg_hdr) + (sizeof(u32) * 6);
|
||||||
|
|
||||||
buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
|
buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
|
||||||
GFP_KERNEL | GFP_DMA);
|
GFP_KERNEL | GFP_DMA);
|
||||||
|
@ -1979,35 +1979,35 @@ int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
|
||||||
|
|
||||||
pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
|
pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
|
||||||
|
|
||||||
pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
pMsg->xMsgHeader.msgDstId = HIF_TASK;
|
pMsg->x_msg_header.msg_dst_id = HIF_TASK;
|
||||||
pMsg->xMsgHeader.msgFlags = 0;
|
pMsg->x_msg_header.msg_flags = 0;
|
||||||
pMsg->xMsgHeader.msgLength = (u16) totalLen;
|
pMsg->x_msg_header.msg_length = (u16) totalLen;
|
||||||
pMsg->msgData[0] = PinNum;
|
pMsg->msgData[0] = pin_num;
|
||||||
|
|
||||||
if (!(coredev->device_flags & SMS_DEVICE_FAMILY2)) {
|
if (!(coredev->device_flags & SMS_DEVICE_FAMILY2)) {
|
||||||
pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_REQ;
|
pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_CONFIG_REQ;
|
||||||
if (GetGpioPinParams(PinNum, &TranslatedPinNum, &GroupNum,
|
if (GetGpioPinParams(pin_num, &Translatedpin_num, &GroupNum,
|
||||||
&groupCfg) != 0) {
|
&groupCfg) != 0) {
|
||||||
rc = -EINVAL;
|
rc = -EINVAL;
|
||||||
goto free;
|
goto free;
|
||||||
}
|
}
|
||||||
|
|
||||||
pMsg->msgData[1] = TranslatedPinNum;
|
pMsg->msgData[1] = Translatedpin_num;
|
||||||
pMsg->msgData[2] = GroupNum;
|
pMsg->msgData[2] = GroupNum;
|
||||||
ElectricChar = (pGpioConfig->pullupdown)
|
ElectricChar = (p_gpio_config->pullupdown)
|
||||||
| (pGpioConfig->inputcharacteristics << 2)
|
| (p_gpio_config->inputcharacteristics << 2)
|
||||||
| (pGpioConfig->outputslewrate << 3)
|
| (p_gpio_config->outputslewrate << 3)
|
||||||
| (pGpioConfig->outputdriving << 4);
|
| (p_gpio_config->outputdriving << 4);
|
||||||
pMsg->msgData[3] = ElectricChar;
|
pMsg->msgData[3] = ElectricChar;
|
||||||
pMsg->msgData[4] = pGpioConfig->direction;
|
pMsg->msgData[4] = p_gpio_config->direction;
|
||||||
pMsg->msgData[5] = groupCfg;
|
pMsg->msgData[5] = groupCfg;
|
||||||
} else {
|
} else {
|
||||||
pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_CONFIG_EX_REQ;
|
pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_CONFIG_EX_REQ;
|
||||||
pMsg->msgData[1] = pGpioConfig->pullupdown;
|
pMsg->msgData[1] = p_gpio_config->pullupdown;
|
||||||
pMsg->msgData[2] = pGpioConfig->outputslewrate;
|
pMsg->msgData[2] = p_gpio_config->outputslewrate;
|
||||||
pMsg->msgData[3] = pGpioConfig->outputdriving;
|
pMsg->msgData[3] = p_gpio_config->outputdriving;
|
||||||
pMsg->msgData[4] = pGpioConfig->direction;
|
pMsg->msgData[4] = p_gpio_config->direction;
|
||||||
pMsg->msgData[5] = 0;
|
pMsg->msgData[5] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2026,22 +2026,22 @@ free:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
|
int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
|
||||||
u8 NewLevel) {
|
u8 new_level) {
|
||||||
|
|
||||||
u32 totalLen;
|
u32 totalLen;
|
||||||
int rc;
|
int rc;
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
|
||||||
struct SetGpioMsg {
|
struct SetGpioMsg {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 msgData[3]; /* keep it 3 ! */
|
u32 msgData[3]; /* keep it 3 ! */
|
||||||
} *pMsg;
|
} *pMsg;
|
||||||
|
|
||||||
if ((NewLevel > 1) || (PinNum > MAX_GPIO_PIN_NUMBER))
|
if ((new_level > 1) || (pin_num > MAX_GPIO_PIN_NUMBER))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
totalLen = sizeof(struct SmsMsgHdr_ST) +
|
totalLen = sizeof(struct sms_msg_hdr) +
|
||||||
(3 * sizeof(u32)); /* keep it 3 ! */
|
(3 * sizeof(u32)); /* keep it 3 ! */
|
||||||
|
|
||||||
buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
|
buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
|
||||||
|
@ -2051,13 +2051,13 @@ int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
|
||||||
|
|
||||||
pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
|
pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
|
||||||
|
|
||||||
pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
pMsg->xMsgHeader.msgDstId = HIF_TASK;
|
pMsg->x_msg_header.msg_dst_id = HIF_TASK;
|
||||||
pMsg->xMsgHeader.msgFlags = 0;
|
pMsg->x_msg_header.msg_flags = 0;
|
||||||
pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_SET_LEVEL_REQ;
|
pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_SET_LEVEL_REQ;
|
||||||
pMsg->xMsgHeader.msgLength = (u16) totalLen;
|
pMsg->x_msg_header.msg_length = (u16) totalLen;
|
||||||
pMsg->msgData[0] = PinNum;
|
pMsg->msgData[0] = pin_num;
|
||||||
pMsg->msgData[1] = NewLevel;
|
pMsg->msgData[1] = new_level;
|
||||||
|
|
||||||
/* Send message to SMS */
|
/* Send message to SMS */
|
||||||
rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen,
|
rc = smscore_sendrequest_and_wait(coredev, pMsg, totalLen,
|
||||||
|
@ -2074,7 +2074,7 @@ int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
|
int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
|
||||||
u8 *level) {
|
u8 *level) {
|
||||||
|
|
||||||
u32 totalLen;
|
u32 totalLen;
|
||||||
|
@ -2082,15 +2082,15 @@ int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
|
||||||
struct SetGpioMsg {
|
struct SetGpioMsg {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 msgData[2];
|
u32 msgData[2];
|
||||||
} *pMsg;
|
} *pMsg;
|
||||||
|
|
||||||
|
|
||||||
if (PinNum > MAX_GPIO_PIN_NUMBER)
|
if (pin_num > MAX_GPIO_PIN_NUMBER)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
totalLen = sizeof(struct SmsMsgHdr_ST) + (2 * sizeof(u32));
|
totalLen = sizeof(struct sms_msg_hdr) + (2 * sizeof(u32));
|
||||||
|
|
||||||
buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
|
buffer = kmalloc(totalLen + SMS_DMA_ALIGNMENT,
|
||||||
GFP_KERNEL | GFP_DMA);
|
GFP_KERNEL | GFP_DMA);
|
||||||
|
@ -2099,12 +2099,12 @@ int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
|
||||||
|
|
||||||
pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
|
pMsg = (struct SetGpioMsg *) SMS_ALIGN_ADDRESS(buffer);
|
||||||
|
|
||||||
pMsg->xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
pMsg->x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
pMsg->xMsgHeader.msgDstId = HIF_TASK;
|
pMsg->x_msg_header.msg_dst_id = HIF_TASK;
|
||||||
pMsg->xMsgHeader.msgFlags = 0;
|
pMsg->x_msg_header.msg_flags = 0;
|
||||||
pMsg->xMsgHeader.msgType = MSG_SMS_GPIO_GET_LEVEL_REQ;
|
pMsg->x_msg_header.msg_type = MSG_SMS_GPIO_GET_LEVEL_REQ;
|
||||||
pMsg->xMsgHeader.msgLength = (u16) totalLen;
|
pMsg->x_msg_header.msg_length = (u16) totalLen;
|
||||||
pMsg->msgData[0] = PinNum;
|
pMsg->msgData[0] = pin_num;
|
||||||
pMsg->msgData[1] = 0;
|
pMsg->msgData[1] = 0;
|
||||||
|
|
||||||
/* Send message to SMS */
|
/* Send message to SMS */
|
||||||
|
|
|
@ -577,8 +577,8 @@ enum msg_types {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define SMS_INIT_MSG_EX(ptr, type, src, dst, len) do { \
|
#define SMS_INIT_MSG_EX(ptr, type, src, dst, len) do { \
|
||||||
(ptr)->msgType = type; (ptr)->msgSrcId = src; (ptr)->msgDstId = dst; \
|
(ptr)->msg_type = type; (ptr)->msg_src_id = src; (ptr)->msg_dst_id = dst; \
|
||||||
(ptr)->msgLength = len; (ptr)->msgFlags = 0; \
|
(ptr)->msg_length = len; (ptr)->msg_flags = 0; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define SMS_INIT_MSG(ptr, type, len) \
|
#define SMS_INIT_MSG(ptr, type, len) \
|
||||||
|
@ -611,78 +611,78 @@ enum SMS_DEVICE_MODE {
|
||||||
DEVICE_MODE_MAX,
|
DEVICE_MODE_MAX,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsMsgHdr_ST {
|
struct sms_msg_hdr {
|
||||||
u16 msgType;
|
u16 msg_type;
|
||||||
u8 msgSrcId;
|
u8 msg_src_id;
|
||||||
u8 msgDstId;
|
u8 msg_dst_id;
|
||||||
u16 msgLength; /* Length of entire message, including header */
|
u16 msg_length; /* length of entire message, including header */
|
||||||
u16 msgFlags;
|
u16 msg_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsMsgData_ST {
|
struct sms_msg_data {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 msgData[1];
|
u32 msgData[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsMsgData_ST2 {
|
struct sms_msg_data2 {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 msgData[2];
|
u32 msgData[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsMsgData_ST4 {
|
struct sms_msg_data4 {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 msgData[4];
|
u32 msgData[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsDataDownload_ST {
|
struct sms_data_download {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
u32 MemAddr;
|
u32 mem_addr;
|
||||||
u8 Payload[SMS_MAX_PAYLOAD_SIZE];
|
u8 payload[SMS_MAX_PAYLOAD_SIZE];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsVersionRes_ST {
|
struct sms_version_res {
|
||||||
struct SmsMsgHdr_ST xMsgHeader;
|
struct sms_msg_hdr x_msg_header;
|
||||||
|
|
||||||
u16 ChipModel; /* e.g. 0x1102 for SMS-1102 "Nova" */
|
u16 chip_model; /* e.g. 0x1102 for SMS-1102 "Nova" */
|
||||||
u8 Step; /* 0 - Step A */
|
u8 step; /* 0 - step A */
|
||||||
u8 MetalFix; /* 0 - Metal 0 */
|
u8 metal_fix; /* 0 - Metal 0 */
|
||||||
|
|
||||||
/* FirmwareId 0xFF if ROM, otherwise the
|
/* firmware_id 0xFF if ROM, otherwise the
|
||||||
* value indicated by SMSHOSTLIB_DEVICE_MODES_E */
|
* value indicated by SMSHOSTLIB_DEVICE_MODES_E */
|
||||||
u8 FirmwareId;
|
u8 firmware_id;
|
||||||
/* SupportedProtocols Bitwise OR combination of
|
/* supported_protocols Bitwise OR combination of
|
||||||
* supported protocols */
|
* supported protocols */
|
||||||
u8 SupportedProtocols;
|
u8 supported_protocols;
|
||||||
|
|
||||||
u8 VersionMajor;
|
u8 version_major;
|
||||||
u8 VersionMinor;
|
u8 version_minor;
|
||||||
u8 VersionPatch;
|
u8 version_patch;
|
||||||
u8 VersionFieldPatch;
|
u8 version_field_patch;
|
||||||
|
|
||||||
u8 RomVersionMajor;
|
u8 rom_ver_major;
|
||||||
u8 RomVersionMinor;
|
u8 rom_ver_minor;
|
||||||
u8 RomVersionPatch;
|
u8 rom_ver_patch;
|
||||||
u8 RomVersionFieldPatch;
|
u8 rom_ver_field_patch;
|
||||||
|
|
||||||
u8 TextLabel[34];
|
u8 TextLabel[34];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsFirmware_ST {
|
struct sms_firmware {
|
||||||
u32 CheckSum;
|
u32 check_sum;
|
||||||
u32 Length;
|
u32 length;
|
||||||
u32 StartAddress;
|
u32 start_address;
|
||||||
u8 Payload[1];
|
u8 payload[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Statistics information returned as response for
|
/* statistics information returned as response for
|
||||||
* SmsHostApiGetStatistics_Req */
|
* SmsHostApiGetstatistics_Req */
|
||||||
struct SMSHOSTLIB_STATISTICS_ST {
|
struct SMSHOSTLIB_STATISTICS_ST {
|
||||||
u32 Reserved; /* Reserved */
|
u32 reserved; /* reserved */
|
||||||
|
|
||||||
/* Common parameters */
|
/* Common parameters */
|
||||||
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
|
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
|
u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
|
||||||
|
|
||||||
/* Reception quality */
|
/* Reception quality */
|
||||||
s32 SNR; /* dB */
|
s32 SNR; /* dB */
|
||||||
|
@ -693,137 +693,137 @@ struct SMSHOSTLIB_STATISTICS_ST {
|
||||||
u32 MFER; /* DVB-H frame error rate in percentage,
|
u32 MFER; /* DVB-H frame error rate in percentage,
|
||||||
0xFFFFFFFF indicate N/A, valid only for DVB-H */
|
0xFFFFFFFF indicate N/A, valid only for DVB-H */
|
||||||
s32 RSSI; /* dBm */
|
s32 RSSI; /* dBm */
|
||||||
s32 InBandPwr; /* In band power in dBM */
|
s32 in_band_pwr; /* In band power in dBM */
|
||||||
s32 CarrierOffset; /* Carrier Offset in bin/1024 */
|
s32 carrier_offset; /* Carrier Offset in bin/1024 */
|
||||||
|
|
||||||
/* Transmission parameters */
|
/* Transmission parameters */
|
||||||
u32 Frequency; /* Frequency in Hz */
|
u32 frequency; /* frequency in Hz */
|
||||||
u32 Bandwidth; /* Bandwidth in MHz, valid only for DVB-T/H */
|
u32 bandwidth; /* bandwidth in MHz, valid only for DVB-T/H */
|
||||||
u32 TransmissionMode; /* Transmission Mode, for DAB modes 1-4,
|
u32 transmission_mode; /* Transmission Mode, for DAB modes 1-4,
|
||||||
for DVB-T/H FFT mode carriers in Kilos */
|
for DVB-T/H FFT mode carriers in Kilos */
|
||||||
u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET,
|
u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET,
|
||||||
valid only for DVB-T/H */
|
valid only for DVB-T/H */
|
||||||
u32 GuardInterval; /* Guard Interval from
|
u32 guard_interval; /* Guard Interval from
|
||||||
SMSHOSTLIB_GUARD_INTERVALS_ET, valid only for DVB-T/H */
|
SMSHOSTLIB_GUARD_INTERVALS_ET, valid only for DVB-T/H */
|
||||||
u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
|
u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
|
||||||
valid only for DVB-T/H */
|
valid only for DVB-T/H */
|
||||||
u32 LPCodeRate; /* Low Priority Code Rate from
|
u32 lp_code_rate; /* Low Priority Code Rate from
|
||||||
SMSHOSTLIB_CODE_RATE_ET, valid only for DVB-T/H */
|
SMSHOSTLIB_CODE_RATE_ET, valid only for DVB-T/H */
|
||||||
u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET,
|
u32 hierarchy; /* hierarchy from SMSHOSTLIB_HIERARCHY_ET,
|
||||||
valid only for DVB-T/H */
|
valid only for DVB-T/H */
|
||||||
u32 Constellation; /* Constellation from
|
u32 constellation; /* constellation from
|
||||||
SMSHOSTLIB_CONSTELLATION_ET, valid only for DVB-T/H */
|
SMSHOSTLIB_CONSTELLATION_ET, valid only for DVB-T/H */
|
||||||
|
|
||||||
/* Burst parameters, valid only for DVB-H */
|
/* Burst parameters, valid only for DVB-H */
|
||||||
u32 BurstSize; /* Current burst size in bytes,
|
u32 burst_size; /* Current burst size in bytes,
|
||||||
valid only for DVB-H */
|
valid only for DVB-H */
|
||||||
u32 BurstDuration; /* Current burst duration in mSec,
|
u32 burst_duration; /* Current burst duration in mSec,
|
||||||
valid only for DVB-H */
|
valid only for DVB-H */
|
||||||
u32 BurstCycleTime; /* Current burst cycle time in mSec,
|
u32 burst_cycle_time; /* Current burst cycle time in mSec,
|
||||||
valid only for DVB-H */
|
valid only for DVB-H */
|
||||||
u32 CalculatedBurstCycleTime;/* Current burst cycle time in mSec,
|
u32 calc_burst_cycle_time;/* Current burst cycle time in mSec,
|
||||||
as calculated by demodulator, valid only for DVB-H */
|
as calculated by demodulator, valid only for DVB-H */
|
||||||
u32 NumOfRows; /* Number of rows in MPE table,
|
u32 num_of_rows; /* Number of rows in MPE table,
|
||||||
valid only for DVB-H */
|
valid only for DVB-H */
|
||||||
u32 NumOfPaddCols; /* Number of padding columns in MPE table,
|
u32 num_of_padd_cols; /* Number of padding columns in MPE table,
|
||||||
valid only for DVB-H */
|
valid only for DVB-H */
|
||||||
u32 NumOfPunctCols; /* Number of puncturing columns in MPE table,
|
u32 num_of_punct_cols; /* Number of puncturing columns in MPE table,
|
||||||
valid only for DVB-H */
|
valid only for DVB-H */
|
||||||
u32 ErrorTSPackets; /* Number of erroneous
|
u32 error_ts_packets; /* Number of erroneous
|
||||||
transport-stream packets */
|
transport-stream packets */
|
||||||
u32 TotalTSPackets; /* Total number of transport-stream packets */
|
u32 total_ts_packets; /* Total number of transport-stream packets */
|
||||||
u32 NumOfValidMpeTlbs; /* Number of MPE tables which do not include
|
u32 num_of_valid_mpe_tlbs; /* Number of MPE tables which do not include
|
||||||
errors after MPE RS decoding */
|
errors after MPE RS decoding */
|
||||||
u32 NumOfInvalidMpeTlbs;/* Number of MPE tables which include errors
|
u32 num_of_invalid_mpe_tlbs;/* Number of MPE tables which include errors
|
||||||
after MPE RS decoding */
|
after MPE RS decoding */
|
||||||
u32 NumOfCorrectedMpeTlbs;/* Number of MPE tables which were
|
u32 num_of_corrected_mpe_tlbs;/* Number of MPE tables which were
|
||||||
corrected by MPE RS decoding */
|
corrected by MPE RS decoding */
|
||||||
/* Common params */
|
/* Common params */
|
||||||
u32 BERErrorCount; /* Number of errornous SYNC bits. */
|
u32 ber_error_count; /* Number of errornous SYNC bits. */
|
||||||
u32 BERBitCount; /* Total number of SYNC bits. */
|
u32 ber_bit_count; /* Total number of SYNC bits. */
|
||||||
|
|
||||||
/* Interface information */
|
/* Interface information */
|
||||||
u32 SmsToHostTxErrors; /* Total number of transmission errors. */
|
u32 sms_to_host_tx_errors; /* Total number of transmission errors. */
|
||||||
|
|
||||||
/* DAB/T-DMB */
|
/* DAB/T-DMB */
|
||||||
u32 PreBER; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
|
u32 pre_ber; /* DAB/T-DMB only: Pre Viterbi BER [1E-5] */
|
||||||
|
|
||||||
/* DVB-H TPS parameters */
|
/* DVB-H TPS parameters */
|
||||||
u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
|
u32 cell_id; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
|
||||||
if set to 0xFFFFFFFF cell_id not yet recovered */
|
if set to 0xFFFFFFFF cell_id not yet recovered */
|
||||||
u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 -
|
u32 dvbh_srv_ind_hp; /* DVB-H service indication info, bit 1 -
|
||||||
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
||||||
u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 -
|
u32 dvbh_srv_ind_lp; /* DVB-H service indication info, bit 1 -
|
||||||
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
||||||
|
|
||||||
u32 NumMPEReceived; /* DVB-H, Num MPE section received */
|
u32 num_mpe_received; /* DVB-H, Num MPE section received */
|
||||||
|
|
||||||
u32 ReservedFields[10]; /* Reserved */
|
u32 reservedFields[10]; /* reserved */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SmsMsgStatisticsInfo_ST {
|
struct sms_msg_statistics_info {
|
||||||
u32 RequestResult;
|
u32 request_result;
|
||||||
|
|
||||||
struct SMSHOSTLIB_STATISTICS_ST Stat;
|
struct SMSHOSTLIB_STATISTICS_ST stat;
|
||||||
|
|
||||||
/* Split the calc of the SNR in DAB */
|
/* Split the calc of the SNR in DAB */
|
||||||
u32 Signal; /* dB */
|
u32 signal; /* dB */
|
||||||
u32 Noise; /* dB */
|
u32 noise; /* dB */
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SMSHOSTLIB_ISDBT_LAYER_STAT_ST {
|
struct SMSHOSTLIB_ISDBT_LAYER_STAT_ST {
|
||||||
/* Per-layer information */
|
/* Per-layer information */
|
||||||
u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
|
u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET,
|
||||||
* 255 means layer does not exist */
|
* 255 means layer does not exist */
|
||||||
u32 Constellation; /* Constellation from SMSHOSTLIB_CONSTELLATION_ET,
|
u32 constellation; /* constellation from SMSHOSTLIB_CONSTELLATION_ET,
|
||||||
* 255 means layer does not exist */
|
* 255 means layer does not exist */
|
||||||
u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
|
u32 BER; /* Post Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
|
||||||
u32 BERErrorCount; /* Post Viterbi Error Bits Count */
|
u32 ber_error_count; /* Post Viterbi Error Bits Count */
|
||||||
u32 BERBitCount; /* Post Viterbi Total Bits Count */
|
u32 ber_bit_count; /* Post Viterbi Total Bits Count */
|
||||||
u32 PreBER; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
|
u32 pre_ber; /* Pre Viterbi BER [1E-5], 0xFFFFFFFF indicate N/A */
|
||||||
u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */
|
u32 TS_PER; /* Transport stream PER [%], 0xFFFFFFFF indicate N/A */
|
||||||
u32 ErrorTSPackets; /* Number of erroneous transport-stream packets */
|
u32 error_ts_packets; /* Number of erroneous transport-stream packets */
|
||||||
u32 TotalTSPackets; /* Total number of transport-stream packets */
|
u32 total_ts_packets; /* Total number of transport-stream packets */
|
||||||
u32 TILdepthI; /* Time interleaver depth I parameter,
|
u32 ti_ldepth_i; /* Time interleaver depth I parameter,
|
||||||
* 255 means layer does not exist */
|
* 255 means layer does not exist */
|
||||||
u32 NumberOfSegments; /* Number of segments in layer A,
|
u32 number_of_segments; /* Number of segments in layer A,
|
||||||
* 255 means layer does not exist */
|
* 255 means layer does not exist */
|
||||||
u32 TMCCErrors; /* TMCC errors */
|
u32 tmcc_errors; /* TMCC errors */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SMSHOSTLIB_STATISTICS_ISDBT_ST {
|
struct SMSHOSTLIB_STATISTICS_ISDBT_ST {
|
||||||
u32 StatisticsType; /* Enumerator identifying the type of the
|
u32 statistics_type; /* Enumerator identifying the type of the
|
||||||
* structure. Values are the same as
|
* structure. Values are the same as
|
||||||
* SMSHOSTLIB_DEVICE_MODES_E
|
* SMSHOSTLIB_DEVICE_MODES_E
|
||||||
*
|
*
|
||||||
* This field MUST always be first in any
|
* This field MUST always be first in any
|
||||||
* statistics structure */
|
* statistics structure */
|
||||||
|
|
||||||
u32 FullSize; /* Total size of the structure returned by the modem.
|
u32 full_size; /* Total size of the structure returned by the modem.
|
||||||
* If the size requested by the host is smaller than
|
* If the size requested by the host is smaller than
|
||||||
* FullSize, the struct will be truncated */
|
* full_size, the struct will be truncated */
|
||||||
|
|
||||||
/* Common parameters */
|
/* Common parameters */
|
||||||
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
|
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
|
u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
|
||||||
|
|
||||||
/* Reception quality */
|
/* Reception quality */
|
||||||
s32 SNR; /* dB */
|
s32 SNR; /* dB */
|
||||||
s32 RSSI; /* dBm */
|
s32 RSSI; /* dBm */
|
||||||
s32 InBandPwr; /* In band power in dBM */
|
s32 in_band_pwr; /* In band power in dBM */
|
||||||
s32 CarrierOffset; /* Carrier Offset in Hz */
|
s32 carrier_offset; /* Carrier Offset in Hz */
|
||||||
|
|
||||||
/* Transmission parameters */
|
/* Transmission parameters */
|
||||||
u32 Frequency; /* Frequency in Hz */
|
u32 frequency; /* frequency in Hz */
|
||||||
u32 Bandwidth; /* Bandwidth in MHz */
|
u32 bandwidth; /* bandwidth in MHz */
|
||||||
u32 TransmissionMode; /* ISDB-T transmission mode */
|
u32 transmission_mode; /* ISDB-T transmission mode */
|
||||||
u32 ModemState; /* 0 - Acquisition, 1 - Locked */
|
u32 modem_state; /* 0 - Acquisition, 1 - Locked */
|
||||||
u32 GuardInterval; /* Guard Interval, 1 divided by value */
|
u32 guard_interval; /* Guard Interval, 1 divided by value */
|
||||||
u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
|
u32 system_type; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
|
||||||
u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */
|
u32 partial_reception; /* TRUE - partial reception, FALSE otherwise */
|
||||||
u32 NumOfLayers; /* Number of ISDB-T layers in the network */
|
u32 num_of_layers; /* Number of ISDB-T layers in the network */
|
||||||
|
|
||||||
/* Per-layer information */
|
/* Per-layer information */
|
||||||
/* Layers A, B and C */
|
/* Layers A, B and C */
|
||||||
|
@ -831,44 +831,44 @@ struct SMSHOSTLIB_STATISTICS_ISDBT_ST {
|
||||||
/* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
|
/* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
|
||||||
|
|
||||||
/* Interface information */
|
/* Interface information */
|
||||||
u32 SmsToHostTxErrors; /* Total number of transmission errors. */
|
u32 sms_to_host_tx_errors; /* Total number of transmission errors. */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST {
|
struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST {
|
||||||
u32 StatisticsType; /* Enumerator identifying the type of the
|
u32 statistics_type; /* Enumerator identifying the type of the
|
||||||
* structure. Values are the same as
|
* structure. Values are the same as
|
||||||
* SMSHOSTLIB_DEVICE_MODES_E
|
* SMSHOSTLIB_DEVICE_MODES_E
|
||||||
*
|
*
|
||||||
* This field MUST always be first in any
|
* This field MUST always be first in any
|
||||||
* statistics structure */
|
* statistics structure */
|
||||||
|
|
||||||
u32 FullSize; /* Total size of the structure returned by the modem.
|
u32 full_size; /* Total size of the structure returned by the modem.
|
||||||
* If the size requested by the host is smaller than
|
* If the size requested by the host is smaller than
|
||||||
* FullSize, the struct will be truncated */
|
* full_size, the struct will be truncated */
|
||||||
|
|
||||||
/* Common parameters */
|
/* Common parameters */
|
||||||
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
|
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
|
u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
|
||||||
|
|
||||||
/* Reception quality */
|
/* Reception quality */
|
||||||
s32 SNR; /* dB */
|
s32 SNR; /* dB */
|
||||||
s32 RSSI; /* dBm */
|
s32 RSSI; /* dBm */
|
||||||
s32 InBandPwr; /* In band power in dBM */
|
s32 in_band_pwr; /* In band power in dBM */
|
||||||
s32 CarrierOffset; /* Carrier Offset in Hz */
|
s32 carrier_offset; /* Carrier Offset in Hz */
|
||||||
|
|
||||||
/* Transmission parameters */
|
/* Transmission parameters */
|
||||||
u32 Frequency; /* Frequency in Hz */
|
u32 frequency; /* frequency in Hz */
|
||||||
u32 Bandwidth; /* Bandwidth in MHz */
|
u32 bandwidth; /* bandwidth in MHz */
|
||||||
u32 TransmissionMode; /* ISDB-T transmission mode */
|
u32 transmission_mode; /* ISDB-T transmission mode */
|
||||||
u32 ModemState; /* 0 - Acquisition, 1 - Locked */
|
u32 modem_state; /* 0 - Acquisition, 1 - Locked */
|
||||||
u32 GuardInterval; /* Guard Interval, 1 divided by value */
|
u32 guard_interval; /* Guard Interval, 1 divided by value */
|
||||||
u32 SystemType; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
|
u32 system_type; /* ISDB-T system type (ISDB-T / ISDB-Tsb) */
|
||||||
u32 PartialReception; /* TRUE - partial reception, FALSE otherwise */
|
u32 partial_reception; /* TRUE - partial reception, FALSE otherwise */
|
||||||
u32 NumOfLayers; /* Number of ISDB-T layers in the network */
|
u32 num_of_layers; /* Number of ISDB-T layers in the network */
|
||||||
|
|
||||||
u32 SegmentNumber; /* Segment number for ISDB-Tsb */
|
u32 segment_number; /* Segment number for ISDB-Tsb */
|
||||||
u32 TuneBW; /* Tuned bandwidth - BW_ISDBT_1SEG / BW_ISDBT_3SEG */
|
u32 tune_bw; /* Tuned bandwidth - BW_ISDBT_1SEG / BW_ISDBT_3SEG */
|
||||||
|
|
||||||
/* Per-layer information */
|
/* Per-layer information */
|
||||||
/* Layers A, B and C */
|
/* Layers A, B and C */
|
||||||
|
@ -876,21 +876,21 @@ struct SMSHOSTLIB_STATISTICS_ISDBT_EX_ST {
|
||||||
/* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
|
/* Per-layer statistics, see SMSHOSTLIB_ISDBT_LAYER_STAT_ST */
|
||||||
|
|
||||||
/* Interface information */
|
/* Interface information */
|
||||||
u32 Reserved1; /* Was SmsToHostTxErrors - obsolete . */
|
u32 reserved1; /* Was sms_to_host_tx_errors - obsolete . */
|
||||||
/* Proprietary information */
|
/* Proprietary information */
|
||||||
u32 ExtAntenna; /* Obsolete field. */
|
u32 ext_antenna; /* Obsolete field. */
|
||||||
u32 ReceptionQuality;
|
u32 reception_quality;
|
||||||
u32 EwsAlertActive; /* Signals if EWS alert is currently on */
|
u32 ews_alert_active; /* signals if EWS alert is currently on */
|
||||||
u32 LNAOnOff; /* Internal LNA state: 0: OFF, 1: ON */
|
u32 lna_on_off; /* Internal LNA state: 0: OFF, 1: ON */
|
||||||
|
|
||||||
u32 RfAgcLevel; /* RF AGC Level [linear units], full gain = 65535 (20dB) */
|
u32 rf_agc_level; /* RF AGC Level [linear units], full gain = 65535 (20dB) */
|
||||||
u32 BbAgcLevel; /* Baseband AGC level [linear units], full gain = 65535 (71.5dB) */
|
u32 bb_agc_level; /* Baseband AGC level [linear units], full gain = 65535 (71.5dB) */
|
||||||
u32 FwErrorsCounter; /* Application errors - should be always zero */
|
u32 fw_errors_counter; /* Application errors - should be always zero */
|
||||||
u8 FwErrorsHistoryArr[8]; /* Last FW errors IDs - first is most recent, last is oldest */
|
u8 FwErrorsHistoryArr[8]; /* Last FW errors IDs - first is most recent, last is oldest */
|
||||||
|
|
||||||
s32 MRC_SNR; /* dB */
|
s32 MRC_SNR; /* dB */
|
||||||
u32 SNRFullRes; /* dB x 65536 */
|
u32 snr_full_res; /* dB x 65536 */
|
||||||
u32 Reserved4[4];
|
u32 reserved4[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -916,148 +916,148 @@ struct PID_DATA_S {
|
||||||
};
|
};
|
||||||
|
|
||||||
#define CORRECT_STAT_RSSI(_stat) ((_stat).RSSI *= -1)
|
#define CORRECT_STAT_RSSI(_stat) ((_stat).RSSI *= -1)
|
||||||
#define CORRECT_STAT_BANDWIDTH(_stat) (_stat.Bandwidth = 8 - _stat.Bandwidth)
|
#define CORRECT_STAT_BANDWIDTH(_stat) (_stat.bandwidth = 8 - _stat.bandwidth)
|
||||||
#define CORRECT_STAT_TRANSMISSON_MODE(_stat) \
|
#define CORRECT_STAT_TRANSMISSON_MODE(_stat) \
|
||||||
if (_stat.TransmissionMode == 0) \
|
if (_stat.transmission_mode == 0) \
|
||||||
_stat.TransmissionMode = 2; \
|
_stat.transmission_mode = 2; \
|
||||||
else if (_stat.TransmissionMode == 1) \
|
else if (_stat.transmission_mode == 1) \
|
||||||
_stat.TransmissionMode = 8; \
|
_stat.transmission_mode = 8; \
|
||||||
else \
|
else \
|
||||||
_stat.TransmissionMode = 4;
|
_stat.transmission_mode = 4;
|
||||||
|
|
||||||
struct TRANSMISSION_STATISTICS_S {
|
struct TRANSMISSION_STATISTICS_S {
|
||||||
u32 Frequency; /* Frequency in Hz */
|
u32 frequency; /* frequency in Hz */
|
||||||
u32 Bandwidth; /* Bandwidth in MHz */
|
u32 bandwidth; /* bandwidth in MHz */
|
||||||
u32 TransmissionMode; /* FFT mode carriers in Kilos */
|
u32 transmission_mode; /* FFT mode carriers in Kilos */
|
||||||
u32 GuardInterval; /* Guard Interval from
|
u32 guard_interval; /* Guard Interval from
|
||||||
SMSHOSTLIB_GUARD_INTERVALS_ET */
|
SMSHOSTLIB_GUARD_INTERVALS_ET */
|
||||||
u32 CodeRate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */
|
u32 code_rate; /* Code Rate from SMSHOSTLIB_CODE_RATE_ET */
|
||||||
u32 LPCodeRate; /* Low Priority Code Rate from
|
u32 lp_code_rate; /* Low Priority Code Rate from
|
||||||
SMSHOSTLIB_CODE_RATE_ET */
|
SMSHOSTLIB_CODE_RATE_ET */
|
||||||
u32 Hierarchy; /* Hierarchy from SMSHOSTLIB_HIERARCHY_ET */
|
u32 hierarchy; /* hierarchy from SMSHOSTLIB_HIERARCHY_ET */
|
||||||
u32 Constellation; /* Constellation from
|
u32 constellation; /* constellation from
|
||||||
SMSHOSTLIB_CONSTELLATION_ET */
|
SMSHOSTLIB_CONSTELLATION_ET */
|
||||||
|
|
||||||
/* DVB-H TPS parameters */
|
/* DVB-H TPS parameters */
|
||||||
u32 CellId; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
|
u32 cell_id; /* TPS Cell ID in bits 15..0, bits 31..16 zero;
|
||||||
if set to 0xFFFFFFFF cell_id not yet recovered */
|
if set to 0xFFFFFFFF cell_id not yet recovered */
|
||||||
u32 DvbhSrvIndHP; /* DVB-H service indication info, bit 1 -
|
u32 dvbh_srv_ind_hp; /* DVB-H service indication info, bit 1 -
|
||||||
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
||||||
u32 DvbhSrvIndLP; /* DVB-H service indication info, bit 1 -
|
u32 dvbh_srv_ind_lp; /* DVB-H service indication info, bit 1 -
|
||||||
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
Time Slicing indicator, bit 0 - MPE-FEC indicator */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RECEPTION_STATISTICS_S {
|
struct RECEPTION_STATISTICS_S {
|
||||||
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
|
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
|
u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
|
||||||
|
|
||||||
u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
|
u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
|
||||||
s32 SNR; /* dB */
|
s32 SNR; /* dB */
|
||||||
u32 BER; /* Post Viterbi BER [1E-5] */
|
u32 BER; /* Post Viterbi BER [1E-5] */
|
||||||
u32 BERErrorCount; /* Number of erronous SYNC bits. */
|
u32 ber_error_count; /* Number of erronous SYNC bits. */
|
||||||
u32 BERBitCount; /* Total number of SYNC bits. */
|
u32 ber_bit_count; /* Total number of SYNC bits. */
|
||||||
u32 TS_PER; /* Transport stream PER,
|
u32 TS_PER; /* Transport stream PER,
|
||||||
0xFFFFFFFF indicate N/A */
|
0xFFFFFFFF indicate N/A */
|
||||||
u32 MFER; /* DVB-H frame error rate in percentage,
|
u32 MFER; /* DVB-H frame error rate in percentage,
|
||||||
0xFFFFFFFF indicate N/A, valid only for DVB-H */
|
0xFFFFFFFF indicate N/A, valid only for DVB-H */
|
||||||
s32 RSSI; /* dBm */
|
s32 RSSI; /* dBm */
|
||||||
s32 InBandPwr; /* In band power in dBM */
|
s32 in_band_pwr; /* In band power in dBM */
|
||||||
s32 CarrierOffset; /* Carrier Offset in bin/1024 */
|
s32 carrier_offset; /* Carrier Offset in bin/1024 */
|
||||||
u32 ErrorTSPackets; /* Number of erroneous
|
u32 error_ts_packets; /* Number of erroneous
|
||||||
transport-stream packets */
|
transport-stream packets */
|
||||||
u32 TotalTSPackets; /* Total number of transport-stream packets */
|
u32 total_ts_packets; /* Total number of transport-stream packets */
|
||||||
|
|
||||||
s32 MRC_SNR; /* dB */
|
s32 MRC_SNR; /* dB */
|
||||||
s32 MRC_RSSI; /* dBm */
|
s32 MRC_RSSI; /* dBm */
|
||||||
s32 MRC_InBandPwr; /* In band power in dBM */
|
s32 mrc_in_band_pwr; /* In band power in dBM */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct RECEPTION_STATISTICS_EX_S {
|
struct RECEPTION_STATISTICS_EX_S {
|
||||||
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
|
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsExternalLNAOn; /* 0 - external LNA off, 1 - external LNA on */
|
u32 is_external_lna_on; /* 0 - external LNA off, 1 - external LNA on */
|
||||||
|
|
||||||
u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
|
u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
|
||||||
s32 SNR; /* dB */
|
s32 SNR; /* dB */
|
||||||
u32 BER; /* Post Viterbi BER [1E-5] */
|
u32 BER; /* Post Viterbi BER [1E-5] */
|
||||||
u32 BERErrorCount; /* Number of erronous SYNC bits. */
|
u32 ber_error_count; /* Number of erronous SYNC bits. */
|
||||||
u32 BERBitCount; /* Total number of SYNC bits. */
|
u32 ber_bit_count; /* Total number of SYNC bits. */
|
||||||
u32 TS_PER; /* Transport stream PER,
|
u32 TS_PER; /* Transport stream PER,
|
||||||
0xFFFFFFFF indicate N/A */
|
0xFFFFFFFF indicate N/A */
|
||||||
u32 MFER; /* DVB-H frame error rate in percentage,
|
u32 MFER; /* DVB-H frame error rate in percentage,
|
||||||
0xFFFFFFFF indicate N/A, valid only for DVB-H */
|
0xFFFFFFFF indicate N/A, valid only for DVB-H */
|
||||||
s32 RSSI; /* dBm */
|
s32 RSSI; /* dBm */
|
||||||
s32 InBandPwr; /* In band power in dBM */
|
s32 in_band_pwr; /* In band power in dBM */
|
||||||
s32 CarrierOffset; /* Carrier Offset in bin/1024 */
|
s32 carrier_offset; /* Carrier Offset in bin/1024 */
|
||||||
u32 ErrorTSPackets; /* Number of erroneous
|
u32 error_ts_packets; /* Number of erroneous
|
||||||
transport-stream packets */
|
transport-stream packets */
|
||||||
u32 TotalTSPackets; /* Total number of transport-stream packets */
|
u32 total_ts_packets; /* Total number of transport-stream packets */
|
||||||
|
|
||||||
s32 RefDevPPM;
|
s32 ref_dev_ppm;
|
||||||
s32 FreqDevHz;
|
s32 freq_dev_hz;
|
||||||
|
|
||||||
s32 MRC_SNR; /* dB */
|
s32 MRC_SNR; /* dB */
|
||||||
s32 MRC_RSSI; /* dBm */
|
s32 MRC_RSSI; /* dBm */
|
||||||
s32 MRC_InBandPwr; /* In band power in dBM */
|
s32 mrc_in_band_pwr; /* In band power in dBM */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/* Statistics information returned as response for
|
/* statistics information returned as response for
|
||||||
* SmsHostApiGetStatisticsEx_Req for DVB applications, SMS1100 and up */
|
* SmsHostApiGetstatisticsEx_Req for DVB applications, SMS1100 and up */
|
||||||
struct SMSHOSTLIB_STATISTICS_DVB_S {
|
struct SMSHOSTLIB_STATISTICS_DVB_S {
|
||||||
/* Reception */
|
/* Reception */
|
||||||
struct RECEPTION_STATISTICS_S ReceptionData;
|
struct RECEPTION_STATISTICS_S reception_data;
|
||||||
|
|
||||||
/* Transmission parameters */
|
/* Transmission parameters */
|
||||||
struct TRANSMISSION_STATISTICS_S TransmissionData;
|
struct TRANSMISSION_STATISTICS_S transmission_data;
|
||||||
|
|
||||||
/* Burst parameters, valid only for DVB-H */
|
/* Burst parameters, valid only for DVB-H */
|
||||||
#define SRVM_MAX_PID_FILTERS 8
|
#define SRVM_MAX_PID_FILTERS 8
|
||||||
struct PID_DATA_S PidData[SRVM_MAX_PID_FILTERS];
|
struct PID_DATA_S pid_data[SRVM_MAX_PID_FILTERS];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Statistics information returned as response for
|
/* statistics information returned as response for
|
||||||
* SmsHostApiGetStatisticsEx_Req for DVB applications, SMS1100 and up */
|
* SmsHostApiGetstatisticsEx_Req for DVB applications, SMS1100 and up */
|
||||||
struct SMSHOSTLIB_STATISTICS_DVB_EX_S {
|
struct SMSHOSTLIB_STATISTICS_DVB_EX_S {
|
||||||
/* Reception */
|
/* Reception */
|
||||||
struct RECEPTION_STATISTICS_EX_S ReceptionData;
|
struct RECEPTION_STATISTICS_EX_S reception_data;
|
||||||
|
|
||||||
/* Transmission parameters */
|
/* Transmission parameters */
|
||||||
struct TRANSMISSION_STATISTICS_S TransmissionData;
|
struct TRANSMISSION_STATISTICS_S transmission_data;
|
||||||
|
|
||||||
/* Burst parameters, valid only for DVB-H */
|
/* Burst parameters, valid only for DVB-H */
|
||||||
#define SRVM_MAX_PID_FILTERS 8
|
#define SRVM_MAX_PID_FILTERS 8
|
||||||
struct PID_DATA_S PidData[SRVM_MAX_PID_FILTERS];
|
struct PID_DATA_S pid_data[SRVM_MAX_PID_FILTERS];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SRVM_SIGNAL_STATUS_S {
|
struct SRVM_SIGNAL_STATUS_S {
|
||||||
u32 result;
|
u32 result;
|
||||||
u32 snr;
|
u32 snr;
|
||||||
u32 tsPackets;
|
u32 ts_packets;
|
||||||
u32 etsPackets;
|
u32 ets_packets;
|
||||||
u32 constellation;
|
u32 constellation;
|
||||||
u32 hpCode;
|
u32 hp_code;
|
||||||
u32 tpsSrvIndLP;
|
u32 tps_srv_ind_lp;
|
||||||
u32 tpsSrvIndHP;
|
u32 tps_srv_ind_hp;
|
||||||
u32 cellId;
|
u32 cell_id;
|
||||||
u32 reason;
|
u32 reason;
|
||||||
|
|
||||||
s32 inBandPower;
|
s32 in_band_power;
|
||||||
u32 requestId;
|
u32 request_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SMSHOSTLIB_I2C_REQ_ST {
|
struct SMSHOSTLIB_I2C_REQ_ST {
|
||||||
u32 DeviceAddress; /* I2c device address */
|
u32 device_address; /* I2c device address */
|
||||||
u32 WriteCount; /* number of bytes to write */
|
u32 write_count; /* number of bytes to write */
|
||||||
u32 ReadCount; /* number of bytes to read */
|
u32 read_count; /* number of bytes to read */
|
||||||
u8 Data[1];
|
u8 Data[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SMSHOSTLIB_I2C_RES_ST {
|
struct SMSHOSTLIB_I2C_RES_ST {
|
||||||
u32 Status; /* non-zero value in case of failure */
|
u32 status; /* non-zero value in case of failure */
|
||||||
u32 ReadCount; /* number of bytes read */
|
u32 read_count; /* number of bytes read */
|
||||||
u8 Data[1];
|
u8 Data[1];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1154,11 +1154,11 @@ int smscore_configure_gpio(struct smscore_device_t *coredev, u32 pin,
|
||||||
int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level);
|
int smscore_set_gpio(struct smscore_device_t *coredev, u32 pin, int level);
|
||||||
|
|
||||||
/* new GPIO management */
|
/* new GPIO management */
|
||||||
extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 PinNum,
|
extern int smscore_gpio_configure(struct smscore_device_t *coredev, u8 pin_num,
|
||||||
struct smscore_config_gpio *pGpioConfig);
|
struct smscore_config_gpio *p_gpio_config);
|
||||||
extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 PinNum,
|
extern int smscore_gpio_set_level(struct smscore_device_t *coredev, u8 pin_num,
|
||||||
u8 NewLevel);
|
u8 new_level);
|
||||||
extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 PinNum,
|
extern int smscore_gpio_get_level(struct smscore_device_t *coredev, u8 pin_num,
|
||||||
u8 *level);
|
u8 *level);
|
||||||
|
|
||||||
void smscore_set_board_id(struct smscore_device_t *core, int id);
|
void smscore_set_board_id(struct smscore_device_t *core, int id);
|
||||||
|
|
|
@ -63,11 +63,11 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data,
|
||||||
buf = debug_data->stats_data;
|
buf = debug_data->stats_data;
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsRfLocked = %d\n", p->IsRfLocked);
|
"is_rf_locked = %d\n", p->is_rf_locked);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsDemodLocked = %d\n", p->IsDemodLocked);
|
"is_demod_locked = %d\n", p->is_demod_locked);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsExternalLNAOn = %d\n", p->IsExternalLNAOn);
|
"is_external_lna_on = %d\n", p->is_external_lna_on);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SNR = %d\n", p->SNR);
|
"SNR = %d\n", p->SNR);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
|
@ -81,70 +81,70 @@ void smsdvb_print_dvb_stats(struct smsdvb_debugfs *debug_data,
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"RSSI = %d\n", p->RSSI);
|
"RSSI = %d\n", p->RSSI);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"InBandPwr = %d\n", p->InBandPwr);
|
"in_band_pwr = %d\n", p->in_band_pwr);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"CarrierOffset = %d\n", p->CarrierOffset);
|
"carrier_offset = %d\n", p->carrier_offset);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"ModemState = %d\n", p->ModemState);
|
"modem_state = %d\n", p->modem_state);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Frequency = %d\n", p->Frequency);
|
"frequency = %d\n", p->frequency);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Bandwidth = %d\n", p->Bandwidth);
|
"bandwidth = %d\n", p->bandwidth);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"TransmissionMode = %d\n", p->TransmissionMode);
|
"transmission_mode = %d\n", p->transmission_mode);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"ModemState = %d\n", p->ModemState);
|
"modem_state = %d\n", p->modem_state);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"GuardInterval = %d\n", p->GuardInterval);
|
"guard_interval = %d\n", p->guard_interval);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"CodeRate = %d\n", p->CodeRate);
|
"code_rate = %d\n", p->code_rate);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"LPCodeRate = %d\n", p->LPCodeRate);
|
"lp_code_rate = %d\n", p->lp_code_rate);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Hierarchy = %d\n", p->Hierarchy);
|
"hierarchy = %d\n", p->hierarchy);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Constellation = %d\n", p->Constellation);
|
"constellation = %d\n", p->constellation);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"BurstSize = %d\n", p->BurstSize);
|
"burst_size = %d\n", p->burst_size);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"BurstDuration = %d\n", p->BurstDuration);
|
"burst_duration = %d\n", p->burst_duration);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"BurstCycleTime = %d\n", p->BurstCycleTime);
|
"burst_cycle_time = %d\n", p->burst_cycle_time);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"CalculatedBurstCycleTime = %d\n",
|
"calc_burst_cycle_time = %d\n",
|
||||||
p->CalculatedBurstCycleTime);
|
p->calc_burst_cycle_time);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfRows = %d\n", p->NumOfRows);
|
"num_of_rows = %d\n", p->num_of_rows);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfPaddCols = %d\n", p->NumOfPaddCols);
|
"num_of_padd_cols = %d\n", p->num_of_padd_cols);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfPunctCols = %d\n", p->NumOfPunctCols);
|
"num_of_punct_cols = %d\n", p->num_of_punct_cols);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"ErrorTSPackets = %d\n", p->ErrorTSPackets);
|
"error_ts_packets = %d\n", p->error_ts_packets);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"TotalTSPackets = %d\n", p->TotalTSPackets);
|
"total_ts_packets = %d\n", p->total_ts_packets);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfValidMpeTlbs = %d\n", p->NumOfValidMpeTlbs);
|
"num_of_valid_mpe_tlbs = %d\n", p->num_of_valid_mpe_tlbs);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfInvalidMpeTlbs = %d\n", p->NumOfInvalidMpeTlbs);
|
"num_of_invalid_mpe_tlbs = %d\n", p->num_of_invalid_mpe_tlbs);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfCorrectedMpeTlbs = %d\n", p->NumOfCorrectedMpeTlbs);
|
"num_of_corrected_mpe_tlbs = %d\n", p->num_of_corrected_mpe_tlbs);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"BERErrorCount = %d\n", p->BERErrorCount);
|
"ber_error_count = %d\n", p->ber_error_count);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"BERBitCount = %d\n", p->BERBitCount);
|
"ber_bit_count = %d\n", p->ber_bit_count);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SmsToHostTxErrors = %d\n", p->SmsToHostTxErrors);
|
"sms_to_host_tx_errors = %d\n", p->sms_to_host_tx_errors);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"PreBER = %d\n", p->PreBER);
|
"pre_ber = %d\n", p->pre_ber);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"CellId = %d\n", p->CellId);
|
"cell_id = %d\n", p->cell_id);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"DvbhSrvIndHP = %d\n", p->DvbhSrvIndHP);
|
"dvbh_srv_ind_hp = %d\n", p->dvbh_srv_ind_hp);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"DvbhSrvIndLP = %d\n", p->DvbhSrvIndLP);
|
"dvbh_srv_ind_lp = %d\n", p->dvbh_srv_ind_lp);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumMPEReceived = %d\n", p->NumMPEReceived);
|
"num_mpe_received = %d\n", p->num_mpe_received);
|
||||||
|
|
||||||
debug_data->stats_count = n;
|
debug_data->stats_count = n;
|
||||||
spin_unlock(&debug_data->lock);
|
spin_unlock(&debug_data->lock);
|
||||||
|
@ -166,74 +166,74 @@ void smsdvb_print_isdb_stats(struct smsdvb_debugfs *debug_data,
|
||||||
buf = debug_data->stats_data;
|
buf = debug_data->stats_data;
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"StatisticsType = %d\t", p->StatisticsType);
|
"statistics_type = %d\t", p->statistics_type);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"FullSize = %d\n", p->FullSize);
|
"full_size = %d\n", p->full_size);
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsRfLocked = %d\t\t", p->IsRfLocked);
|
"is_rf_locked = %d\t\t", p->is_rf_locked);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsDemodLocked = %d\t", p->IsDemodLocked);
|
"is_demod_locked = %d\t", p->is_demod_locked);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsExternalLNAOn = %d\n", p->IsExternalLNAOn);
|
"is_external_lna_on = %d\n", p->is_external_lna_on);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SNR = %d dB\t\t", p->SNR);
|
"SNR = %d dB\t\t", p->SNR);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"RSSI = %d dBm\t\t", p->RSSI);
|
"RSSI = %d dBm\t\t", p->RSSI);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"InBandPwr = %d dBm\n", p->InBandPwr);
|
"in_band_pwr = %d dBm\n", p->in_band_pwr);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"CarrierOffset = %d\t", p->CarrierOffset);
|
"carrier_offset = %d\t", p->carrier_offset);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Bandwidth = %d\t\t", p->Bandwidth);
|
"bandwidth = %d\t\t", p->bandwidth);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Frequency = %d Hz\n", p->Frequency);
|
"frequency = %d Hz\n", p->frequency);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"TransmissionMode = %d\t", p->TransmissionMode);
|
"transmission_mode = %d\t", p->transmission_mode);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"ModemState = %d\t\t", p->ModemState);
|
"modem_state = %d\t\t", p->modem_state);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"GuardInterval = %d\n", p->GuardInterval);
|
"guard_interval = %d\n", p->guard_interval);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SystemType = %d\t\t", p->SystemType);
|
"system_type = %d\t\t", p->system_type);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"PartialReception = %d\t", p->PartialReception);
|
"partial_reception = %d\t", p->partial_reception);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfLayers = %d\n", p->NumOfLayers);
|
"num_of_layers = %d\n", p->num_of_layers);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SmsToHostTxErrors = %d\n", p->SmsToHostTxErrors);
|
"sms_to_host_tx_errors = %d\n", p->sms_to_host_tx_errors);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (p->LayerInfo[i].NumberOfSegments < 1 ||
|
if (p->LayerInfo[i].number_of_segments < 1 ||
|
||||||
p->LayerInfo[i].NumberOfSegments > 13)
|
p->LayerInfo[i].number_of_segments > 13)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i);
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tCodeRate = %d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tcode_rate = %d\t",
|
||||||
p->LayerInfo[i].CodeRate);
|
p->LayerInfo[i].code_rate);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "Constellation = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "constellation = %d\n",
|
||||||
p->LayerInfo[i].Constellation);
|
p->LayerInfo[i].constellation);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t",
|
||||||
p->LayerInfo[i].BER);
|
p->LayerInfo[i].BER);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tBERErrorCount = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tber_error_count = %-5d\t",
|
||||||
p->LayerInfo[i].BERErrorCount);
|
p->LayerInfo[i].ber_error_count);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "BERBitCount = %-5d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "ber_bit_count = %-5d\n",
|
||||||
p->LayerInfo[i].BERBitCount);
|
p->LayerInfo[i].ber_bit_count);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tPreBER = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tpre_ber = %-5d\t",
|
||||||
p->LayerInfo[i].PreBER);
|
p->LayerInfo[i].pre_ber);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n",
|
||||||
p->LayerInfo[i].TS_PER);
|
p->LayerInfo[i].TS_PER);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tErrorTSPackets = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\terror_ts_packets = %-5d\t",
|
||||||
p->LayerInfo[i].ErrorTSPackets);
|
p->LayerInfo[i].error_ts_packets);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TotalTSPackets = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "total_ts_packets = %-5d\t",
|
||||||
p->LayerInfo[i].TotalTSPackets);
|
p->LayerInfo[i].total_ts_packets);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TILdepthI = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "ti_ldepth_i = %d\n",
|
||||||
p->LayerInfo[i].TILdepthI);
|
p->LayerInfo[i].ti_ldepth_i);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"\tNumberOfSegments = %d\t",
|
"\tnumber_of_segments = %d\t",
|
||||||
p->LayerInfo[i].NumberOfSegments);
|
p->LayerInfo[i].number_of_segments);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TMCCErrors = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "tmcc_errors = %d\n",
|
||||||
p->LayerInfo[i].TMCCErrors);
|
p->LayerInfo[i].tmcc_errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_data->stats_count = n;
|
debug_data->stats_count = n;
|
||||||
|
@ -256,76 +256,76 @@ void smsdvb_print_isdb_stats_ex(struct smsdvb_debugfs *debug_data,
|
||||||
buf = debug_data->stats_data;
|
buf = debug_data->stats_data;
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"StatisticsType = %d\t", p->StatisticsType);
|
"statistics_type = %d\t", p->statistics_type);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"FullSize = %d\n", p->FullSize);
|
"full_size = %d\n", p->full_size);
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsRfLocked = %d\t\t", p->IsRfLocked);
|
"is_rf_locked = %d\t\t", p->is_rf_locked);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsDemodLocked = %d\t", p->IsDemodLocked);
|
"is_demod_locked = %d\t", p->is_demod_locked);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"IsExternalLNAOn = %d\n", p->IsExternalLNAOn);
|
"is_external_lna_on = %d\n", p->is_external_lna_on);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SNR = %d dB\t\t", p->SNR);
|
"SNR = %d dB\t\t", p->SNR);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"RSSI = %d dBm\t\t", p->RSSI);
|
"RSSI = %d dBm\t\t", p->RSSI);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"InBandPwr = %d dBm\n", p->InBandPwr);
|
"in_band_pwr = %d dBm\n", p->in_band_pwr);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"CarrierOffset = %d\t", p->CarrierOffset);
|
"carrier_offset = %d\t", p->carrier_offset);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Bandwidth = %d\t\t", p->Bandwidth);
|
"bandwidth = %d\t\t", p->bandwidth);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"Frequency = %d Hz\n", p->Frequency);
|
"frequency = %d Hz\n", p->frequency);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"TransmissionMode = %d\t", p->TransmissionMode);
|
"transmission_mode = %d\t", p->transmission_mode);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"ModemState = %d\t\t", p->ModemState);
|
"modem_state = %d\t\t", p->modem_state);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"GuardInterval = %d\n", p->GuardInterval);
|
"guard_interval = %d\n", p->guard_interval);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"SystemType = %d\t\t", p->SystemType);
|
"system_type = %d\t\t", p->system_type);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"PartialReception = %d\t", p->PartialReception);
|
"partial_reception = %d\t", p->partial_reception);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"NumOfLayers = %d\n", p->NumOfLayers);
|
"num_of_layers = %d\n", p->num_of_layers);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "SegmentNumber = %d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "segment_number = %d\t",
|
||||||
p->SegmentNumber);
|
p->segment_number);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TuneBW = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "tune_bw = %d\n",
|
||||||
p->TuneBW);
|
p->tune_bw);
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < 3; i++) {
|
||||||
if (p->LayerInfo[i].NumberOfSegments < 1 ||
|
if (p->LayerInfo[i].number_of_segments < 1 ||
|
||||||
p->LayerInfo[i].NumberOfSegments > 13)
|
p->LayerInfo[i].number_of_segments > 13)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i);
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\nLayer %d\n", i);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tCodeRate = %d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tcode_rate = %d\t",
|
||||||
p->LayerInfo[i].CodeRate);
|
p->LayerInfo[i].code_rate);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "Constellation = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "constellation = %d\n",
|
||||||
p->LayerInfo[i].Constellation);
|
p->LayerInfo[i].constellation);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tBER = %-5d\t",
|
||||||
p->LayerInfo[i].BER);
|
p->LayerInfo[i].BER);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tBERErrorCount = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tber_error_count = %-5d\t",
|
||||||
p->LayerInfo[i].BERErrorCount);
|
p->LayerInfo[i].ber_error_count);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "BERBitCount = %-5d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "ber_bit_count = %-5d\n",
|
||||||
p->LayerInfo[i].BERBitCount);
|
p->LayerInfo[i].ber_bit_count);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tPreBER = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tpre_ber = %-5d\t",
|
||||||
p->LayerInfo[i].PreBER);
|
p->LayerInfo[i].pre_ber);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\tTS_PER = %-5d\n",
|
||||||
p->LayerInfo[i].TS_PER);
|
p->LayerInfo[i].TS_PER);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "\tErrorTSPackets = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "\terror_ts_packets = %-5d\t",
|
||||||
p->LayerInfo[i].ErrorTSPackets);
|
p->LayerInfo[i].error_ts_packets);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TotalTSPackets = %-5d\t",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "total_ts_packets = %-5d\t",
|
||||||
p->LayerInfo[i].TotalTSPackets);
|
p->LayerInfo[i].total_ts_packets);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TILdepthI = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "ti_ldepth_i = %d\n",
|
||||||
p->LayerInfo[i].TILdepthI);
|
p->LayerInfo[i].ti_ldepth_i);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n,
|
n += snprintf(&buf[n], PAGE_SIZE - n,
|
||||||
"\tNumberOfSegments = %d\t",
|
"\tnumber_of_segments = %d\t",
|
||||||
p->LayerInfo[i].NumberOfSegments);
|
p->LayerInfo[i].number_of_segments);
|
||||||
n += snprintf(&buf[n], PAGE_SIZE - n, "TMCCErrors = %d\n",
|
n += snprintf(&buf[n], PAGE_SIZE - n, "tmcc_errors = %d\n",
|
||||||
p->LayerInfo[i].TMCCErrors);
|
p->LayerInfo[i].tmcc_errors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -228,15 +228,15 @@ static void smsdvb_update_tx_params(struct smsdvb_client_t *client,
|
||||||
struct dvb_frontend *fe = &client->frontend;
|
struct dvb_frontend *fe = &client->frontend;
|
||||||
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
||||||
|
|
||||||
c->frequency = p->Frequency;
|
c->frequency = p->frequency;
|
||||||
client->fe_status = sms_to_status(p->IsDemodLocked, 0);
|
client->fe_status = sms_to_status(p->is_demod_locked, 0);
|
||||||
c->bandwidth_hz = sms_to_bw(p->Bandwidth);
|
c->bandwidth_hz = sms_to_bw(p->bandwidth);
|
||||||
c->transmission_mode = sms_to_mode(p->TransmissionMode);
|
c->transmission_mode = sms_to_mode(p->transmission_mode);
|
||||||
c->guard_interval = sms_to_guard_interval(p->GuardInterval);
|
c->guard_interval = sms_to_guard_interval(p->guard_interval);
|
||||||
c->code_rate_HP = sms_to_code_rate(p->CodeRate);
|
c->code_rate_HP = sms_to_code_rate(p->code_rate);
|
||||||
c->code_rate_LP = sms_to_code_rate(p->LPCodeRate);
|
c->code_rate_LP = sms_to_code_rate(p->lp_code_rate);
|
||||||
c->hierarchy = sms_to_hierarchy(p->Hierarchy);
|
c->hierarchy = sms_to_hierarchy(p->hierarchy);
|
||||||
c->modulation = sms_to_modulation(p->Constellation);
|
c->modulation = sms_to_modulation(p->constellation);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
|
static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
|
||||||
|
@ -245,35 +245,35 @@ static void smsdvb_update_per_slices(struct smsdvb_client_t *client,
|
||||||
struct dvb_frontend *fe = &client->frontend;
|
struct dvb_frontend *fe = &client->frontend;
|
||||||
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
||||||
|
|
||||||
client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked);
|
client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
|
||||||
c->modulation = sms_to_modulation(p->constellation);
|
c->modulation = sms_to_modulation(p->constellation);
|
||||||
|
|
||||||
/* Signal Strength, in DBm */
|
/* signal Strength, in DBm */
|
||||||
c->strength.stat[0].uvalue = p->inBandPower * 1000;
|
c->strength.stat[0].uvalue = p->in_band_power * 1000;
|
||||||
|
|
||||||
/* Carrier to Noise ratio, in DB */
|
/* Carrier to noise ratio, in DB */
|
||||||
c->cnr.stat[0].svalue = p->snr * 1000;
|
c->cnr.stat[0].svalue = p->snr * 1000;
|
||||||
|
|
||||||
/* PER/BER requires demod lock */
|
/* PER/BER requires demod lock */
|
||||||
if (!p->IsDemodLocked)
|
if (!p->is_demod_locked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* TS PER */
|
/* TS PER */
|
||||||
client->last_per = c->block_error.stat[0].uvalue;
|
client->last_per = c->block_error.stat[0].uvalue;
|
||||||
c->block_error.stat[0].scale = FE_SCALE_COUNTER;
|
c->block_error.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->block_count.stat[0].scale = FE_SCALE_COUNTER;
|
c->block_count.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->block_error.stat[0].uvalue += p->etsPackets;
|
c->block_error.stat[0].uvalue += p->ets_packets;
|
||||||
c->block_count.stat[0].uvalue += p->etsPackets + p->tsPackets;
|
c->block_count.stat[0].uvalue += p->ets_packets + p->ts_packets;
|
||||||
|
|
||||||
/* BER */
|
/* BER */
|
||||||
c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
|
c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER;
|
c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_error.stat[0].uvalue += p->BERErrorCount;
|
c->post_bit_error.stat[0].uvalue += p->ber_error_count;
|
||||||
c->post_bit_count.stat[0].uvalue += p->BERBitCount;
|
c->post_bit_count.stat[0].uvalue += p->ber_bit_count;
|
||||||
|
|
||||||
/* Legacy PER/BER */
|
/* Legacy PER/BER */
|
||||||
client->legacy_per = (p->etsPackets * 65535) /
|
client->legacy_per = (p->ets_packets * 65535) /
|
||||||
(p->tsPackets + p->etsPackets);
|
(p->ts_packets + p->ets_packets);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client,
|
static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client,
|
||||||
|
@ -285,44 +285,44 @@ static void smsdvb_update_dvb_stats(struct smsdvb_client_t *client,
|
||||||
if (client->prt_dvb_stats)
|
if (client->prt_dvb_stats)
|
||||||
client->prt_dvb_stats(client->debug_data, p);
|
client->prt_dvb_stats(client->debug_data, p);
|
||||||
|
|
||||||
client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked);
|
client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
|
||||||
|
|
||||||
/* Update DVB modulation parameters */
|
/* Update DVB modulation parameters */
|
||||||
c->frequency = p->Frequency;
|
c->frequency = p->frequency;
|
||||||
client->fe_status = sms_to_status(p->IsDemodLocked, 0);
|
client->fe_status = sms_to_status(p->is_demod_locked, 0);
|
||||||
c->bandwidth_hz = sms_to_bw(p->Bandwidth);
|
c->bandwidth_hz = sms_to_bw(p->bandwidth);
|
||||||
c->transmission_mode = sms_to_mode(p->TransmissionMode);
|
c->transmission_mode = sms_to_mode(p->transmission_mode);
|
||||||
c->guard_interval = sms_to_guard_interval(p->GuardInterval);
|
c->guard_interval = sms_to_guard_interval(p->guard_interval);
|
||||||
c->code_rate_HP = sms_to_code_rate(p->CodeRate);
|
c->code_rate_HP = sms_to_code_rate(p->code_rate);
|
||||||
c->code_rate_LP = sms_to_code_rate(p->LPCodeRate);
|
c->code_rate_LP = sms_to_code_rate(p->lp_code_rate);
|
||||||
c->hierarchy = sms_to_hierarchy(p->Hierarchy);
|
c->hierarchy = sms_to_hierarchy(p->hierarchy);
|
||||||
c->modulation = sms_to_modulation(p->Constellation);
|
c->modulation = sms_to_modulation(p->constellation);
|
||||||
|
|
||||||
/* update reception data */
|
/* update reception data */
|
||||||
c->lna = p->IsExternalLNAOn ? 1 : 0;
|
c->lna = p->is_external_lna_on ? 1 : 0;
|
||||||
|
|
||||||
/* Carrier to Noise ratio, in DB */
|
/* Carrier to noise ratio, in DB */
|
||||||
c->cnr.stat[0].svalue = p->SNR * 1000;
|
c->cnr.stat[0].svalue = p->SNR * 1000;
|
||||||
|
|
||||||
/* Signal Strength, in DBm */
|
/* signal Strength, in DBm */
|
||||||
c->strength.stat[0].uvalue = p->InBandPwr * 1000;
|
c->strength.stat[0].uvalue = p->in_band_pwr * 1000;
|
||||||
|
|
||||||
/* PER/BER requires demod lock */
|
/* PER/BER requires demod lock */
|
||||||
if (!p->IsDemodLocked)
|
if (!p->is_demod_locked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* TS PER */
|
/* TS PER */
|
||||||
client->last_per = c->block_error.stat[0].uvalue;
|
client->last_per = c->block_error.stat[0].uvalue;
|
||||||
c->block_error.stat[0].scale = FE_SCALE_COUNTER;
|
c->block_error.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->block_count.stat[0].scale = FE_SCALE_COUNTER;
|
c->block_count.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->block_error.stat[0].uvalue += p->ErrorTSPackets;
|
c->block_error.stat[0].uvalue += p->error_ts_packets;
|
||||||
c->block_count.stat[0].uvalue += p->TotalTSPackets;
|
c->block_count.stat[0].uvalue += p->total_ts_packets;
|
||||||
|
|
||||||
/* BER */
|
/* BER */
|
||||||
c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
|
c->post_bit_error.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER;
|
c->post_bit_count.stat[0].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_error.stat[0].uvalue += p->BERErrorCount;
|
c->post_bit_error.stat[0].uvalue += p->ber_error_count;
|
||||||
c->post_bit_count.stat[0].uvalue += p->BERBitCount;
|
c->post_bit_count.stat[0].uvalue += p->ber_bit_count;
|
||||||
|
|
||||||
/* Legacy PER/BER */
|
/* Legacy PER/BER */
|
||||||
client->legacy_ber = p->BER;
|
client->legacy_ber = p->BER;
|
||||||
|
@ -339,26 +339,26 @@ static void smsdvb_update_isdbt_stats(struct smsdvb_client_t *client,
|
||||||
if (client->prt_isdb_stats)
|
if (client->prt_isdb_stats)
|
||||||
client->prt_isdb_stats(client->debug_data, p);
|
client->prt_isdb_stats(client->debug_data, p);
|
||||||
|
|
||||||
client->fe_status = sms_to_status(p->IsDemodLocked, p->IsRfLocked);
|
client->fe_status = sms_to_status(p->is_demod_locked, p->is_rf_locked);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Firmware 2.1 seems to report only lock status and
|
* Firmware 2.1 seems to report only lock status and
|
||||||
* Signal strength. The signal strength indicator is at the
|
* signal strength. The signal strength indicator is at the
|
||||||
* wrong field.
|
* wrong field.
|
||||||
*/
|
*/
|
||||||
if (p->StatisticsType == 0) {
|
if (p->statistics_type == 0) {
|
||||||
c->strength.stat[0].uvalue = ((s32)p->TransmissionMode) * 1000;
|
c->strength.stat[0].uvalue = ((s32)p->transmission_mode) * 1000;
|
||||||
c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
|
c->cnr.stat[0].scale = FE_SCALE_NOT_AVAILABLE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update ISDB-T transmission parameters */
|
/* Update ISDB-T transmission parameters */
|
||||||
c->frequency = p->Frequency;
|
c->frequency = p->frequency;
|
||||||
c->bandwidth_hz = sms_to_bw(p->Bandwidth);
|
c->bandwidth_hz = sms_to_bw(p->bandwidth);
|
||||||
c->transmission_mode = sms_to_mode(p->TransmissionMode);
|
c->transmission_mode = sms_to_mode(p->transmission_mode);
|
||||||
c->guard_interval = sms_to_guard_interval(p->GuardInterval);
|
c->guard_interval = sms_to_guard_interval(p->guard_interval);
|
||||||
c->isdbt_partial_reception = p->PartialReception ? 1 : 0;
|
c->isdbt_partial_reception = p->partial_reception ? 1 : 0;
|
||||||
n_layers = p->NumOfLayers;
|
n_layers = p->num_of_layers;
|
||||||
if (n_layers < 1)
|
if (n_layers < 1)
|
||||||
n_layers = 1;
|
n_layers = 1;
|
||||||
if (n_layers > 3)
|
if (n_layers > 3)
|
||||||
|
@ -366,16 +366,16 @@ static void smsdvb_update_isdbt_stats(struct smsdvb_client_t *client,
|
||||||
c->isdbt_layer_enabled = 0;
|
c->isdbt_layer_enabled = 0;
|
||||||
|
|
||||||
/* update reception data */
|
/* update reception data */
|
||||||
c->lna = p->IsExternalLNAOn ? 1 : 0;
|
c->lna = p->is_external_lna_on ? 1 : 0;
|
||||||
|
|
||||||
/* Carrier to Noise ratio, in DB */
|
/* Carrier to noise ratio, in DB */
|
||||||
c->cnr.stat[0].svalue = p->SNR * 1000;
|
c->cnr.stat[0].svalue = p->SNR * 1000;
|
||||||
|
|
||||||
/* Signal Strength, in DBm */
|
/* signal Strength, in DBm */
|
||||||
c->strength.stat[0].uvalue = p->InBandPwr * 1000;
|
c->strength.stat[0].uvalue = p->in_band_pwr * 1000;
|
||||||
|
|
||||||
/* PER/BER and per-layer stats require demod lock */
|
/* PER/BER and per-layer stats require demod lock */
|
||||||
if (!p->IsDemodLocked)
|
if (!p->is_demod_locked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
client->last_per = c->block_error.stat[0].uvalue;
|
client->last_per = c->block_error.stat[0].uvalue;
|
||||||
|
@ -394,33 +394,33 @@ static void smsdvb_update_isdbt_stats(struct smsdvb_client_t *client,
|
||||||
lr = &p->LayerInfo[i];
|
lr = &p->LayerInfo[i];
|
||||||
|
|
||||||
/* Update per-layer transmission parameters */
|
/* Update per-layer transmission parameters */
|
||||||
if (lr->NumberOfSegments > 0 && lr->NumberOfSegments < 13) {
|
if (lr->number_of_segments > 0 && lr->number_of_segments < 13) {
|
||||||
c->isdbt_layer_enabled |= 1 << i;
|
c->isdbt_layer_enabled |= 1 << i;
|
||||||
c->layer[i].segment_count = lr->NumberOfSegments;
|
c->layer[i].segment_count = lr->number_of_segments;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
c->layer[i].modulation = sms_to_modulation(lr->Constellation);
|
c->layer[i].modulation = sms_to_modulation(lr->constellation);
|
||||||
|
|
||||||
/* TS PER */
|
/* TS PER */
|
||||||
c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->block_error.stat[i + 1].uvalue += lr->ErrorTSPackets;
|
c->block_error.stat[i + 1].uvalue += lr->error_ts_packets;
|
||||||
c->block_count.stat[i + 1].uvalue += lr->TotalTSPackets;
|
c->block_count.stat[i + 1].uvalue += lr->total_ts_packets;
|
||||||
|
|
||||||
/* Update global PER counter */
|
/* Update global PER counter */
|
||||||
c->block_error.stat[0].uvalue += lr->ErrorTSPackets;
|
c->block_error.stat[0].uvalue += lr->error_ts_packets;
|
||||||
c->block_count.stat[0].uvalue += lr->TotalTSPackets;
|
c->block_count.stat[0].uvalue += lr->total_ts_packets;
|
||||||
|
|
||||||
/* BER */
|
/* BER */
|
||||||
c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_error.stat[i + 1].uvalue += lr->BERErrorCount;
|
c->post_bit_error.stat[i + 1].uvalue += lr->ber_error_count;
|
||||||
c->post_bit_count.stat[i + 1].uvalue += lr->BERBitCount;
|
c->post_bit_count.stat[i + 1].uvalue += lr->ber_bit_count;
|
||||||
|
|
||||||
/* Update global BER counter */
|
/* Update global BER counter */
|
||||||
c->post_bit_error.stat[0].uvalue += lr->BERErrorCount;
|
c->post_bit_error.stat[0].uvalue += lr->ber_error_count;
|
||||||
c->post_bit_count.stat[0].uvalue += lr->BERBitCount;
|
c->post_bit_count.stat[0].uvalue += lr->ber_bit_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -436,13 +436,13 @@ static void smsdvb_update_isdbt_stats_ex(struct smsdvb_client_t *client,
|
||||||
client->prt_isdb_stats_ex(client->debug_data, p);
|
client->prt_isdb_stats_ex(client->debug_data, p);
|
||||||
|
|
||||||
/* Update ISDB-T transmission parameters */
|
/* Update ISDB-T transmission parameters */
|
||||||
c->frequency = p->Frequency;
|
c->frequency = p->frequency;
|
||||||
client->fe_status = sms_to_status(p->IsDemodLocked, 0);
|
client->fe_status = sms_to_status(p->is_demod_locked, 0);
|
||||||
c->bandwidth_hz = sms_to_bw(p->Bandwidth);
|
c->bandwidth_hz = sms_to_bw(p->bandwidth);
|
||||||
c->transmission_mode = sms_to_mode(p->TransmissionMode);
|
c->transmission_mode = sms_to_mode(p->transmission_mode);
|
||||||
c->guard_interval = sms_to_guard_interval(p->GuardInterval);
|
c->guard_interval = sms_to_guard_interval(p->guard_interval);
|
||||||
c->isdbt_partial_reception = p->PartialReception ? 1 : 0;
|
c->isdbt_partial_reception = p->partial_reception ? 1 : 0;
|
||||||
n_layers = p->NumOfLayers;
|
n_layers = p->num_of_layers;
|
||||||
if (n_layers < 1)
|
if (n_layers < 1)
|
||||||
n_layers = 1;
|
n_layers = 1;
|
||||||
if (n_layers > 3)
|
if (n_layers > 3)
|
||||||
|
@ -450,16 +450,16 @@ static void smsdvb_update_isdbt_stats_ex(struct smsdvb_client_t *client,
|
||||||
c->isdbt_layer_enabled = 0;
|
c->isdbt_layer_enabled = 0;
|
||||||
|
|
||||||
/* update reception data */
|
/* update reception data */
|
||||||
c->lna = p->IsExternalLNAOn ? 1 : 0;
|
c->lna = p->is_external_lna_on ? 1 : 0;
|
||||||
|
|
||||||
/* Carrier to Noise ratio, in DB */
|
/* Carrier to noise ratio, in DB */
|
||||||
c->cnr.stat[0].svalue = p->SNR * 1000;
|
c->cnr.stat[0].svalue = p->SNR * 1000;
|
||||||
|
|
||||||
/* Signal Strength, in DBm */
|
/* signal Strength, in DBm */
|
||||||
c->strength.stat[0].uvalue = p->InBandPwr * 1000;
|
c->strength.stat[0].uvalue = p->in_band_pwr * 1000;
|
||||||
|
|
||||||
/* PER/BER and per-layer stats require demod lock */
|
/* PER/BER and per-layer stats require demod lock */
|
||||||
if (!p->IsDemodLocked)
|
if (!p->is_demod_locked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
client->last_per = c->block_error.stat[0].uvalue;
|
client->last_per = c->block_error.stat[0].uvalue;
|
||||||
|
@ -482,47 +482,47 @@ static void smsdvb_update_isdbt_stats_ex(struct smsdvb_client_t *client,
|
||||||
lr = &p->LayerInfo[i];
|
lr = &p->LayerInfo[i];
|
||||||
|
|
||||||
/* Update per-layer transmission parameters */
|
/* Update per-layer transmission parameters */
|
||||||
if (lr->NumberOfSegments > 0 && lr->NumberOfSegments < 13) {
|
if (lr->number_of_segments > 0 && lr->number_of_segments < 13) {
|
||||||
c->isdbt_layer_enabled |= 1 << i;
|
c->isdbt_layer_enabled |= 1 << i;
|
||||||
c->layer[i].segment_count = lr->NumberOfSegments;
|
c->layer[i].segment_count = lr->number_of_segments;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
c->layer[i].modulation = sms_to_modulation(lr->Constellation);
|
c->layer[i].modulation = sms_to_modulation(lr->constellation);
|
||||||
|
|
||||||
/* TS PER */
|
/* TS PER */
|
||||||
c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->block_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->block_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->block_error.stat[i + 1].uvalue += lr->ErrorTSPackets;
|
c->block_error.stat[i + 1].uvalue += lr->error_ts_packets;
|
||||||
c->block_count.stat[i + 1].uvalue += lr->TotalTSPackets;
|
c->block_count.stat[i + 1].uvalue += lr->total_ts_packets;
|
||||||
|
|
||||||
/* Update global PER counter */
|
/* Update global PER counter */
|
||||||
c->block_error.stat[0].uvalue += lr->ErrorTSPackets;
|
c->block_error.stat[0].uvalue += lr->error_ts_packets;
|
||||||
c->block_count.stat[0].uvalue += lr->TotalTSPackets;
|
c->block_count.stat[0].uvalue += lr->total_ts_packets;
|
||||||
|
|
||||||
/* BER */
|
/* BER */
|
||||||
c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->post_bit_error.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
c->post_bit_count.stat[i + 1].scale = FE_SCALE_COUNTER;
|
||||||
c->post_bit_error.stat[i + 1].uvalue += lr->BERErrorCount;
|
c->post_bit_error.stat[i + 1].uvalue += lr->ber_error_count;
|
||||||
c->post_bit_count.stat[i + 1].uvalue += lr->BERBitCount;
|
c->post_bit_count.stat[i + 1].uvalue += lr->ber_bit_count;
|
||||||
|
|
||||||
/* Update global BER counter */
|
/* Update global BER counter */
|
||||||
c->post_bit_error.stat[0].uvalue += lr->BERErrorCount;
|
c->post_bit_error.stat[0].uvalue += lr->ber_error_count;
|
||||||
c->post_bit_count.stat[0].uvalue += lr->BERBitCount;
|
c->post_bit_count.stat[0].uvalue += lr->ber_bit_count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
|
static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
|
||||||
{
|
{
|
||||||
struct smsdvb_client_t *client = (struct smsdvb_client_t *) context;
|
struct smsdvb_client_t *client = (struct smsdvb_client_t *) context;
|
||||||
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) (((u8 *) cb->p)
|
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) (((u8 *) cb->p)
|
||||||
+ cb->offset);
|
+ cb->offset);
|
||||||
void *p = phdr + 1;
|
void *p = phdr + 1;
|
||||||
struct dvb_frontend *fe = &client->frontend;
|
struct dvb_frontend *fe = &client->frontend;
|
||||||
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
struct dtv_frontend_properties *c = &fe->dtv_property_cache;
|
||||||
bool is_status_update = false;
|
bool is_status_update = false;
|
||||||
|
|
||||||
switch (phdr->msgType) {
|
switch (phdr->msg_type) {
|
||||||
case MSG_SMS_DVBT_BDA_DATA:
|
case MSG_SMS_DVBT_BDA_DATA:
|
||||||
/*
|
/*
|
||||||
* Only feed data to dvb demux if are there any feed listening
|
* Only feed data to dvb demux if are there any feed listening
|
||||||
|
@ -530,7 +530,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
|
||||||
*/
|
*/
|
||||||
if (client->feed_users && client->has_tuned)
|
if (client->feed_users && client->has_tuned)
|
||||||
dvb_dmx_swfilter(&client->demux, p,
|
dvb_dmx_swfilter(&client->demux, p,
|
||||||
cb->size - sizeof(struct SmsMsgHdr_ST));
|
cb->size - sizeof(struct sms_msg_hdr));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSG_SMS_RF_TUNE_RES:
|
case MSG_SMS_RF_TUNE_RES:
|
||||||
|
@ -571,7 +571,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
|
||||||
smsdvb_update_isdbt_stats(client, p);
|
smsdvb_update_isdbt_stats(client, p);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* Skip SmsMsgStatisticsInfo_ST:RequestResult field */
|
/* Skip sms_msg_statistics_info:request_result field */
|
||||||
smsdvb_update_dvb_stats(client, p + sizeof(u32));
|
smsdvb_update_dvb_stats(client, p + sizeof(u32));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb)
|
||||||
|
|
||||||
/* Only for ISDB-T */
|
/* Only for ISDB-T */
|
||||||
case MSG_SMS_GET_STATISTICS_EX_RES:
|
case MSG_SMS_GET_STATISTICS_EX_RES:
|
||||||
/* Skip SmsMsgStatisticsInfo_ST:RequestResult field? */
|
/* Skip sms_msg_statistics_info:request_result field? */
|
||||||
smsdvb_update_isdbt_stats_ex(client, p + sizeof(u32));
|
smsdvb_update_isdbt_stats_ex(client, p + sizeof(u32));
|
||||||
is_status_update = true;
|
is_status_update = true;
|
||||||
break;
|
break;
|
||||||
|
@ -636,18 +636,18 @@ static int smsdvb_start_feed(struct dvb_demux_feed *feed)
|
||||||
{
|
{
|
||||||
struct smsdvb_client_t *client =
|
struct smsdvb_client_t *client =
|
||||||
container_of(feed->demux, struct smsdvb_client_t, demux);
|
container_of(feed->demux, struct smsdvb_client_t, demux);
|
||||||
struct SmsMsgData_ST PidMsg;
|
struct sms_msg_data PidMsg;
|
||||||
|
|
||||||
sms_debug("add pid %d(%x)",
|
sms_debug("add pid %d(%x)",
|
||||||
feed->pid, feed->pid);
|
feed->pid, feed->pid);
|
||||||
|
|
||||||
client->feed_users++;
|
client->feed_users++;
|
||||||
|
|
||||||
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
PidMsg.x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
PidMsg.xMsgHeader.msgDstId = HIF_TASK;
|
PidMsg.x_msg_header.msg_dst_id = HIF_TASK;
|
||||||
PidMsg.xMsgHeader.msgFlags = 0;
|
PidMsg.x_msg_header.msg_flags = 0;
|
||||||
PidMsg.xMsgHeader.msgType = MSG_SMS_ADD_PID_FILTER_REQ;
|
PidMsg.x_msg_header.msg_type = MSG_SMS_ADD_PID_FILTER_REQ;
|
||||||
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
|
PidMsg.x_msg_header.msg_length = sizeof(PidMsg);
|
||||||
PidMsg.msgData[0] = feed->pid;
|
PidMsg.msgData[0] = feed->pid;
|
||||||
|
|
||||||
return smsclient_sendrequest(client->smsclient,
|
return smsclient_sendrequest(client->smsclient,
|
||||||
|
@ -658,18 +658,18 @@ static int smsdvb_stop_feed(struct dvb_demux_feed *feed)
|
||||||
{
|
{
|
||||||
struct smsdvb_client_t *client =
|
struct smsdvb_client_t *client =
|
||||||
container_of(feed->demux, struct smsdvb_client_t, demux);
|
container_of(feed->demux, struct smsdvb_client_t, demux);
|
||||||
struct SmsMsgData_ST PidMsg;
|
struct sms_msg_data PidMsg;
|
||||||
|
|
||||||
sms_debug("remove pid %d(%x)",
|
sms_debug("remove pid %d(%x)",
|
||||||
feed->pid, feed->pid);
|
feed->pid, feed->pid);
|
||||||
|
|
||||||
client->feed_users--;
|
client->feed_users--;
|
||||||
|
|
||||||
PidMsg.xMsgHeader.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
PidMsg.x_msg_header.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
PidMsg.xMsgHeader.msgDstId = HIF_TASK;
|
PidMsg.x_msg_header.msg_dst_id = HIF_TASK;
|
||||||
PidMsg.xMsgHeader.msgFlags = 0;
|
PidMsg.x_msg_header.msg_flags = 0;
|
||||||
PidMsg.xMsgHeader.msgType = MSG_SMS_REMOVE_PID_FILTER_REQ;
|
PidMsg.x_msg_header.msg_type = MSG_SMS_REMOVE_PID_FILTER_REQ;
|
||||||
PidMsg.xMsgHeader.msgLength = sizeof(PidMsg);
|
PidMsg.x_msg_header.msg_length = sizeof(PidMsg);
|
||||||
PidMsg.msgData[0] = feed->pid;
|
PidMsg.msgData[0] = feed->pid;
|
||||||
|
|
||||||
return smsclient_sendrequest(client->smsclient,
|
return smsclient_sendrequest(client->smsclient,
|
||||||
|
@ -694,7 +694,7 @@ static int smsdvb_sendrequest_and_wait(struct smsdvb_client_t *client,
|
||||||
static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
|
static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
struct SmsMsgHdr_ST Msg;
|
struct sms_msg_hdr Msg;
|
||||||
|
|
||||||
/* Don't request stats too fast */
|
/* Don't request stats too fast */
|
||||||
if (client->get_stats_jiffies &&
|
if (client->get_stats_jiffies &&
|
||||||
|
@ -702,10 +702,10 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
|
||||||
return 0;
|
return 0;
|
||||||
client->get_stats_jiffies = jiffies + msecs_to_jiffies(100);
|
client->get_stats_jiffies = jiffies + msecs_to_jiffies(100);
|
||||||
|
|
||||||
Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
Msg.msgDstId = HIF_TASK;
|
Msg.msg_dst_id = HIF_TASK;
|
||||||
Msg.msgFlags = 0;
|
Msg.msg_flags = 0;
|
||||||
Msg.msgLength = sizeof(Msg);
|
Msg.msg_length = sizeof(Msg);
|
||||||
|
|
||||||
switch (smscore_get_device_mode(client->coredev)) {
|
switch (smscore_get_device_mode(client->coredev)) {
|
||||||
case DEVICE_MODE_ISDBT:
|
case DEVICE_MODE_ISDBT:
|
||||||
|
@ -714,12 +714,12 @@ static int smsdvb_send_statistics_request(struct smsdvb_client_t *client)
|
||||||
* Check for firmware version, to avoid breaking for old cards
|
* Check for firmware version, to avoid breaking for old cards
|
||||||
*/
|
*/
|
||||||
if (client->coredev->fw_version >= 0x800)
|
if (client->coredev->fw_version >= 0x800)
|
||||||
Msg.msgType = MSG_SMS_GET_STATISTICS_EX_REQ;
|
Msg.msg_type = MSG_SMS_GET_STATISTICS_EX_REQ;
|
||||||
else
|
else
|
||||||
Msg.msgType = MSG_SMS_GET_STATISTICS_REQ;
|
Msg.msg_type = MSG_SMS_GET_STATISTICS_REQ;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Msg.msgType = MSG_SMS_GET_STATISTICS_REQ;
|
Msg.msg_type = MSG_SMS_GET_STATISTICS_REQ;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
rc = smsdvb_sendrequest_and_wait(client, &Msg, sizeof(Msg),
|
||||||
|
@ -845,7 +845,7 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe)
|
||||||
container_of(fe, struct smsdvb_client_t, frontend);
|
container_of(fe, struct smsdvb_client_t, frontend);
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct SmsMsgHdr_ST Msg;
|
struct sms_msg_hdr Msg;
|
||||||
u32 Data[3];
|
u32 Data[3];
|
||||||
} Msg;
|
} Msg;
|
||||||
|
|
||||||
|
@ -856,11 +856,11 @@ static int smsdvb_dvbt_set_frontend(struct dvb_frontend *fe)
|
||||||
client->event_unc_state = -1;
|
client->event_unc_state = -1;
|
||||||
fe->dtv_property_cache.delivery_system = SYS_DVBT;
|
fe->dtv_property_cache.delivery_system = SYS_DVBT;
|
||||||
|
|
||||||
Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
Msg.Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
Msg.Msg.msgDstId = HIF_TASK;
|
Msg.Msg.msg_dst_id = HIF_TASK;
|
||||||
Msg.Msg.msgFlags = 0;
|
Msg.Msg.msg_flags = 0;
|
||||||
Msg.Msg.msgType = MSG_SMS_RF_TUNE_REQ;
|
Msg.Msg.msg_type = MSG_SMS_RF_TUNE_REQ;
|
||||||
Msg.Msg.msgLength = sizeof(Msg);
|
Msg.Msg.msg_length = sizeof(Msg);
|
||||||
Msg.Data[0] = c->frequency;
|
Msg.Data[0] = c->frequency;
|
||||||
Msg.Data[2] = 12000000;
|
Msg.Data[2] = 12000000;
|
||||||
|
|
||||||
|
@ -915,17 +915,17 @@ static int smsdvb_isdbt_set_frontend(struct dvb_frontend *fe)
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
struct SmsMsgHdr_ST Msg;
|
struct sms_msg_hdr Msg;
|
||||||
u32 Data[4];
|
u32 Data[4];
|
||||||
} Msg;
|
} Msg;
|
||||||
|
|
||||||
fe->dtv_property_cache.delivery_system = SYS_ISDBT;
|
fe->dtv_property_cache.delivery_system = SYS_ISDBT;
|
||||||
|
|
||||||
Msg.Msg.msgSrcId = DVBT_BDA_CONTROL_MSG_ID;
|
Msg.Msg.msg_src_id = DVBT_BDA_CONTROL_MSG_ID;
|
||||||
Msg.Msg.msgDstId = HIF_TASK;
|
Msg.Msg.msg_dst_id = HIF_TASK;
|
||||||
Msg.Msg.msgFlags = 0;
|
Msg.Msg.msg_flags = 0;
|
||||||
Msg.Msg.msgType = MSG_SMS_ISDBT_TUNE_REQ;
|
Msg.Msg.msg_type = MSG_SMS_ISDBT_TUNE_REQ;
|
||||||
Msg.Msg.msgLength = sizeof(Msg);
|
Msg.Msg.msg_length = sizeof(Msg);
|
||||||
|
|
||||||
if (c->isdbt_sb_segment_idx == -1)
|
if (c->isdbt_sb_segment_idx == -1)
|
||||||
c->isdbt_sb_segment_idx = 0;
|
c->isdbt_sb_segment_idx = 0;
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct smsdvb_client_t {
|
||||||
int feed_users;
|
int feed_users;
|
||||||
bool has_tuned;
|
bool has_tuned;
|
||||||
|
|
||||||
/* Stats debugfs data */
|
/* stats debugfs data */
|
||||||
struct dentry *debugfs;
|
struct dentry *debugfs;
|
||||||
|
|
||||||
struct smsdvb_debugfs *debug_data;
|
struct smsdvb_debugfs *debug_data;
|
||||||
|
@ -74,30 +74,30 @@ struct smsdvb_client_t {
|
||||||
struct RECEPTION_STATISTICS_PER_SLICES_S {
|
struct RECEPTION_STATISTICS_PER_SLICES_S {
|
||||||
u32 result;
|
u32 result;
|
||||||
u32 snr;
|
u32 snr;
|
||||||
s32 inBandPower;
|
s32 in_band_power;
|
||||||
u32 tsPackets;
|
u32 ts_packets;
|
||||||
u32 etsPackets;
|
u32 ets_packets;
|
||||||
u32 constellation;
|
u32 constellation;
|
||||||
u32 hpCode;
|
u32 hp_code;
|
||||||
u32 tpsSrvIndLP;
|
u32 tps_srv_ind_lp;
|
||||||
u32 tpsSrvIndHP;
|
u32 tps_srv_ind_hp;
|
||||||
u32 cellId;
|
u32 cell_id;
|
||||||
u32 reason;
|
u32 reason;
|
||||||
u32 requestId;
|
u32 request_id;
|
||||||
u32 ModemState; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
|
u32 modem_state; /* from SMSHOSTLIB_DVB_MODEM_STATE_ET */
|
||||||
|
|
||||||
u32 BER; /* Post Viterbi BER [1E-5] */
|
u32 BER; /* Post Viterbi BER [1E-5] */
|
||||||
s32 RSSI; /* dBm */
|
s32 RSSI; /* dBm */
|
||||||
s32 CarrierOffset; /* Carrier Offset in bin/1024 */
|
s32 carrier_offset; /* Carrier Offset in bin/1024 */
|
||||||
|
|
||||||
u32 IsRfLocked; /* 0 - not locked, 1 - locked */
|
u32 is_rf_locked; /* 0 - not locked, 1 - locked */
|
||||||
u32 IsDemodLocked; /* 0 - not locked, 1 - locked */
|
u32 is_demod_locked; /* 0 - not locked, 1 - locked */
|
||||||
|
|
||||||
u32 BERBitCount; /* Total number of SYNC bits. */
|
u32 ber_bit_count; /* Total number of SYNC bits. */
|
||||||
u32 BERErrorCount; /* Number of erronous SYNC bits. */
|
u32 ber_error_count; /* Number of erronous SYNC bits. */
|
||||||
|
|
||||||
s32 MRC_SNR; /* dB */
|
s32 MRC_SNR; /* dB */
|
||||||
s32 MRC_InBandPwr; /* In band power in dBM */
|
s32 mrc_in_band_pwr; /* In band power in dBM */
|
||||||
s32 MRC_RSSI; /* dBm */
|
s32 MRC_RSSI; /* dBm */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -28,11 +28,11 @@
|
||||||
void smsendian_handle_tx_message(void *buffer)
|
void smsendian_handle_tx_message(void *buffer)
|
||||||
{
|
{
|
||||||
#ifdef __BIG_ENDIAN
|
#ifdef __BIG_ENDIAN
|
||||||
struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer;
|
struct sms_msg_data *msg = (struct sms_msg_data *)buffer;
|
||||||
int i;
|
int i;
|
||||||
int msgWords;
|
int msgWords;
|
||||||
|
|
||||||
switch (msg->xMsgHeader.msgType) {
|
switch (msg->x_msg_header.msg_type) {
|
||||||
case MSG_SMS_DATA_DOWNLOAD_REQ:
|
case MSG_SMS_DATA_DOWNLOAD_REQ:
|
||||||
{
|
{
|
||||||
msg->msgData[0] = le32_to_cpu(msg->msgData[0]);
|
msg->msgData[0] = le32_to_cpu(msg->msgData[0]);
|
||||||
|
@ -40,8 +40,8 @@ void smsendian_handle_tx_message(void *buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
msgWords = (msg->xMsgHeader.msgLength -
|
msgWords = (msg->x_msg_header.msg_length -
|
||||||
sizeof(struct SmsMsgHdr_ST))/4;
|
sizeof(struct sms_msg_hdr))/4;
|
||||||
|
|
||||||
for (i = 0; i < msgWords; i++)
|
for (i = 0; i < msgWords; i++)
|
||||||
msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
|
msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
|
||||||
|
@ -55,16 +55,16 @@ EXPORT_SYMBOL_GPL(smsendian_handle_tx_message);
|
||||||
void smsendian_handle_rx_message(void *buffer)
|
void smsendian_handle_rx_message(void *buffer)
|
||||||
{
|
{
|
||||||
#ifdef __BIG_ENDIAN
|
#ifdef __BIG_ENDIAN
|
||||||
struct SmsMsgData_ST *msg = (struct SmsMsgData_ST *)buffer;
|
struct sms_msg_data *msg = (struct sms_msg_data *)buffer;
|
||||||
int i;
|
int i;
|
||||||
int msgWords;
|
int msgWords;
|
||||||
|
|
||||||
switch (msg->xMsgHeader.msgType) {
|
switch (msg->x_msg_header.msg_type) {
|
||||||
case MSG_SMS_GET_VERSION_EX_RES:
|
case MSG_SMS_GET_VERSION_EX_RES:
|
||||||
{
|
{
|
||||||
struct SmsVersionRes_ST *ver =
|
struct sms_version_res *ver =
|
||||||
(struct SmsVersionRes_ST *) msg;
|
(struct sms_version_res *) msg;
|
||||||
ver->ChipModel = le16_to_cpu(ver->ChipModel);
|
ver->chip_model = le16_to_cpu(ver->chip_model);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,8 +77,8 @@ void smsendian_handle_rx_message(void *buffer)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
msgWords = (msg->xMsgHeader.msgLength -
|
msgWords = (msg->x_msg_header.msg_length -
|
||||||
sizeof(struct SmsMsgHdr_ST))/4;
|
sizeof(struct sms_msg_hdr))/4;
|
||||||
|
|
||||||
for (i = 0; i < msgWords; i++)
|
for (i = 0; i < msgWords; i++)
|
||||||
msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
|
msg->msgData[i] = le32_to_cpu(msg->msgData[i]);
|
||||||
|
@ -93,11 +93,11 @@ EXPORT_SYMBOL_GPL(smsendian_handle_rx_message);
|
||||||
void smsendian_handle_message_header(void *msg)
|
void smsendian_handle_message_header(void *msg)
|
||||||
{
|
{
|
||||||
#ifdef __BIG_ENDIAN
|
#ifdef __BIG_ENDIAN
|
||||||
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)msg;
|
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)msg;
|
||||||
|
|
||||||
phdr->msgType = le16_to_cpu(phdr->msgType);
|
phdr->msg_type = le16_to_cpu(phdr->msg_type);
|
||||||
phdr->msgLength = le16_to_cpu(phdr->msgLength);
|
phdr->msg_length = le16_to_cpu(phdr->msg_length);
|
||||||
phdr->msgFlags = le16_to_cpu(phdr->msgFlags);
|
phdr->msg_flags = le16_to_cpu(phdr->msg_flags);
|
||||||
#endif /* __BIG_ENDIAN */
|
#endif /* __BIG_ENDIAN */
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
|
EXPORT_SYMBOL_GPL(smsendian_handle_message_header);
|
||||||
|
|
|
@ -98,7 +98,7 @@ static int smssdio_sendrequest(void *context, void *buffer, size_t size)
|
||||||
|
|
||||||
sdio_claim_host(smsdev->func);
|
sdio_claim_host(smsdev->func);
|
||||||
|
|
||||||
smsendian_handle_tx_message((struct SmsMsgData_ST *) buffer);
|
smsendian_handle_tx_message((struct sms_msg_data *) buffer);
|
||||||
while (size >= smsdev->func->cur_blksize) {
|
while (size >= smsdev->func->cur_blksize) {
|
||||||
ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
|
ret = sdio_memcpy_toio(smsdev->func, SMSSDIO_DATA,
|
||||||
buffer, smsdev->func->cur_blksize);
|
buffer, smsdev->func->cur_blksize);
|
||||||
|
@ -130,7 +130,7 @@ static void smssdio_interrupt(struct sdio_func *func)
|
||||||
|
|
||||||
struct smssdio_device *smsdev;
|
struct smssdio_device *smsdev;
|
||||||
struct smscore_buffer_t *cb;
|
struct smscore_buffer_t *cb;
|
||||||
struct SmsMsgHdr_ST *hdr;
|
struct sms_msg_hdr *hdr;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
smsdev = sdio_get_drvdata(func);
|
smsdev = sdio_get_drvdata(func);
|
||||||
|
@ -163,20 +163,20 @@ static void smssdio_interrupt(struct sdio_func *func)
|
||||||
|
|
||||||
hdr = cb->p;
|
hdr = cb->p;
|
||||||
|
|
||||||
if (hdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG) {
|
if (hdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG) {
|
||||||
smsdev->split_cb = cb;
|
smsdev->split_cb = cb;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hdr->msgLength > smsdev->func->cur_blksize)
|
if (hdr->msg_length > smsdev->func->cur_blksize)
|
||||||
size = hdr->msgLength - smsdev->func->cur_blksize;
|
size = hdr->msg_length - smsdev->func->cur_blksize;
|
||||||
else
|
else
|
||||||
size = 0;
|
size = 0;
|
||||||
} else {
|
} else {
|
||||||
cb = smsdev->split_cb;
|
cb = smsdev->split_cb;
|
||||||
hdr = cb->p;
|
hdr = cb->p;
|
||||||
|
|
||||||
size = hdr->msgLength - sizeof(struct SmsMsgHdr_ST);
|
size = hdr->msg_length - sizeof(struct sms_msg_hdr);
|
||||||
|
|
||||||
smsdev->split_cb = NULL;
|
smsdev->split_cb = NULL;
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ static void smssdio_interrupt(struct sdio_func *func)
|
||||||
if (size) {
|
if (size) {
|
||||||
void *buffer;
|
void *buffer;
|
||||||
|
|
||||||
buffer = cb->p + (hdr->msgLength - size);
|
buffer = cb->p + (hdr->msg_length - size);
|
||||||
size = ALIGN(size, SMSSDIO_BLOCK_SIZE);
|
size = ALIGN(size, SMSSDIO_BLOCK_SIZE);
|
||||||
|
|
||||||
BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE);
|
BUG_ON(smsdev->func->cur_blksize != SMSSDIO_BLOCK_SIZE);
|
||||||
|
@ -230,10 +230,10 @@ static void smssdio_interrupt(struct sdio_func *func)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cb->size = hdr->msgLength;
|
cb->size = hdr->msg_length;
|
||||||
cb->offset = 0;
|
cb->offset = 0;
|
||||||
|
|
||||||
smsendian_handle_rx_message((struct SmsMsgData_ST *) cb->p);
|
smsendian_handle_rx_message((struct sms_msg_data *) cb->p);
|
||||||
smscore_onresponse(smsdev->coredev, cb);
|
smscore_onresponse(smsdev->coredev, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,26 +93,26 @@ static void smsusb_onresponse(struct urb *urb)
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((urb->actual_length > 0) && (urb->status == 0)) {
|
if ((urb->actual_length > 0) && (urb->status == 0)) {
|
||||||
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *)surb->cb->p;
|
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *)surb->cb->p;
|
||||||
|
|
||||||
smsendian_handle_message_header(phdr);
|
smsendian_handle_message_header(phdr);
|
||||||
if (urb->actual_length >= phdr->msgLength) {
|
if (urb->actual_length >= phdr->msg_length) {
|
||||||
surb->cb->size = phdr->msgLength;
|
surb->cb->size = phdr->msg_length;
|
||||||
|
|
||||||
if (dev->response_alignment &&
|
if (dev->response_alignment &&
|
||||||
(phdr->msgFlags & MSG_HDR_FLAG_SPLIT_MSG)) {
|
(phdr->msg_flags & MSG_HDR_FLAG_SPLIT_MSG)) {
|
||||||
|
|
||||||
surb->cb->offset =
|
surb->cb->offset =
|
||||||
dev->response_alignment +
|
dev->response_alignment +
|
||||||
((phdr->msgFlags >> 8) & 3);
|
((phdr->msg_flags >> 8) & 3);
|
||||||
|
|
||||||
/* sanity check */
|
/* sanity check */
|
||||||
if (((int) phdr->msgLength +
|
if (((int) phdr->msg_length +
|
||||||
surb->cb->offset) > urb->actual_length) {
|
surb->cb->offset) > urb->actual_length) {
|
||||||
sms_err("invalid response "
|
sms_err("invalid response "
|
||||||
"msglen %d offset %d "
|
"msglen %d offset %d "
|
||||||
"size %d",
|
"size %d",
|
||||||
phdr->msgLength,
|
phdr->msg_length,
|
||||||
surb->cb->offset,
|
surb->cb->offset,
|
||||||
urb->actual_length);
|
urb->actual_length);
|
||||||
goto exit_and_resubmit;
|
goto exit_and_resubmit;
|
||||||
|
@ -121,22 +121,22 @@ static void smsusb_onresponse(struct urb *urb)
|
||||||
/* move buffer pointer and
|
/* move buffer pointer and
|
||||||
* copy header to its new location */
|
* copy header to its new location */
|
||||||
memcpy((char *) phdr + surb->cb->offset,
|
memcpy((char *) phdr + surb->cb->offset,
|
||||||
phdr, sizeof(struct SmsMsgHdr_ST));
|
phdr, sizeof(struct sms_msg_hdr));
|
||||||
} else
|
} else
|
||||||
surb->cb->offset = 0;
|
surb->cb->offset = 0;
|
||||||
|
|
||||||
sms_debug("received %s(%d) size: %d",
|
sms_debug("received %s(%d) size: %d",
|
||||||
smscore_translate_msg(phdr->msgType),
|
smscore_translate_msg(phdr->msg_type),
|
||||||
phdr->msgType, phdr->msgLength);
|
phdr->msg_type, phdr->msg_length);
|
||||||
|
|
||||||
smsendian_handle_rx_message((struct SmsMsgData_ST *) phdr);
|
smsendian_handle_rx_message((struct sms_msg_data *) phdr);
|
||||||
|
|
||||||
smscore_onresponse(dev->coredev, surb->cb);
|
smscore_onresponse(dev->coredev, surb->cb);
|
||||||
surb->cb = NULL;
|
surb->cb = NULL;
|
||||||
} else {
|
} else {
|
||||||
sms_err("invalid response "
|
sms_err("invalid response "
|
||||||
"msglen %d actual %d",
|
"msglen %d actual %d",
|
||||||
phdr->msgLength, urb->actual_length);
|
phdr->msg_length, urb->actual_length);
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
sms_err("error, urb status %d, %d bytes",
|
sms_err("error, urb status %d, %d bytes",
|
||||||
|
@ -206,18 +206,18 @@ static int smsusb_start_streaming(struct smsusb_device_t *dev)
|
||||||
static int smsusb_sendrequest(void *context, void *buffer, size_t size)
|
static int smsusb_sendrequest(void *context, void *buffer, size_t size)
|
||||||
{
|
{
|
||||||
struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
|
struct smsusb_device_t *dev = (struct smsusb_device_t *) context;
|
||||||
struct SmsMsgHdr_ST *phdr = (struct SmsMsgHdr_ST *) buffer;
|
struct sms_msg_hdr *phdr = (struct sms_msg_hdr *) buffer;
|
||||||
int dummy;
|
int dummy;
|
||||||
|
|
||||||
if (dev->state != SMSUSB_ACTIVE)
|
if (dev->state != SMSUSB_ACTIVE)
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
|
|
||||||
sms_debug("sending %s(%d) size: %d",
|
sms_debug("sending %s(%d) size: %d",
|
||||||
smscore_translate_msg(phdr->msgType), phdr->msgType,
|
smscore_translate_msg(phdr->msg_type), phdr->msg_type,
|
||||||
phdr->msgLength);
|
phdr->msg_length);
|
||||||
|
|
||||||
smsendian_handle_tx_message((struct SmsMsgData_ST *) phdr);
|
smsendian_handle_tx_message((struct sms_msg_data *) phdr);
|
||||||
smsendian_handle_message_header((struct SmsMsgHdr_ST *)buffer);
|
smsendian_handle_message_header((struct sms_msg_hdr *)buffer);
|
||||||
return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
|
return usb_bulk_msg(dev->udev, usb_sndbulkpipe(dev->udev, 2),
|
||||||
buffer, size, &dummy, 1000);
|
buffer, size, &dummy, 1000);
|
||||||
}
|
}
|
||||||
|
@ -310,8 +310,8 @@ static void smsusb1_detectmode(void *context, int *mode)
|
||||||
|
|
||||||
static int smsusb1_setmode(void *context, int mode)
|
static int smsusb1_setmode(void *context, int mode)
|
||||||
{
|
{
|
||||||
struct SmsMsgHdr_ST Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK,
|
struct sms_msg_hdr Msg = { MSG_SW_RELOAD_REQ, 0, HIF_TASK,
|
||||||
sizeof(struct SmsMsgHdr_ST), 0 };
|
sizeof(struct sms_msg_hdr), 0 };
|
||||||
|
|
||||||
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) {
|
if (mode < DEVICE_MODE_DVBT || mode > DEVICE_MODE_DVBT_BDA) {
|
||||||
sms_err("invalid firmware id specified %d", mode);
|
sms_err("invalid firmware id specified %d", mode);
|
||||||
|
@ -375,7 +375,7 @@ static int smsusb_init_device(struct usb_interface *intf, int board_id)
|
||||||
dev->buffer_size = USB2_BUFFER_SIZE;
|
dev->buffer_size = USB2_BUFFER_SIZE;
|
||||||
dev->response_alignment =
|
dev->response_alignment =
|
||||||
le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) -
|
le16_to_cpu(dev->udev->ep_in[1]->desc.wMaxPacketSize) -
|
||||||
sizeof(struct SmsMsgHdr_ST);
|
sizeof(struct sms_msg_hdr);
|
||||||
|
|
||||||
params.flags |= SMS_DEVICE_FAMILY2;
|
params.flags |= SMS_DEVICE_FAMILY2;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue