Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
as10x_cmd.h File Reference
#include "as10x_types.h"

Go to the source code of this file.

Data Structures

union  as10x_turn_on
 
union  as10x_turn_off
 
union  as10x_set_tune
 
union  as10x_get_tune_status
 
union  as10x_get_tps
 
union  as10x_common
 
union  as10x_add_pid_filter
 
union  as10x_del_pid_filter
 
union  as10x_start_streaming
 
union  as10x_stop_streaming
 
union  as10x_get_demod_stats
 
union  as10x_get_impulse_resp
 
union  as10x_fw_context
 
union  as10x_set_register
 
union  as10x_get_register
 
union  as10x_cfg_change_mode
 
struct  as10x_cmd_header_t
 
union  as10x_dump_memory
 
union  as10x_dumplog_memory
 
union  as10x_raw_data
 
struct  as10x_cmd_t
 
struct  as10x_token_cmd_t
 

Macros

#define AS10X_CMD_ERROR   -1
 
#define SERVICE_PROG_ID   0x0002
 
#define SERVICE_PROG_VERSION   0x0001
 
#define HIER_NONE   0x00
 
#define HIER_LOW_PRIORITY   0x01
 
#define HEADER_SIZE   (sizeof(struct as10x_cmd_header_t))
 
#define GET_CONTEXT_DATA   1
 
#define SET_CONTEXT_DATA   2
 
#define CFG_MODE_ODSP_RESUME   0
 
#define CFG_MODE_ODSP_SUSPEND   1
 
#define DUMP_BLOCK_SIZE_MAX   0x20
 
#define DUMP_BLOCK_SIZE   16
 

Enumerations

enum  control_proc {
  CONTROL_PROC_TURNON = 0x0001, CONTROL_PROC_TURNON_RSP = 0x0100, CONTROL_PROC_SET_REGISTER = 0x0002, CONTROL_PROC_SET_REGISTER_RSP = 0x0200,
  CONTROL_PROC_GET_REGISTER = 0x0003, CONTROL_PROC_GET_REGISTER_RSP = 0x0300, CONTROL_PROC_SETTUNE = 0x000A, CONTROL_PROC_SETTUNE_RSP = 0x0A00,
  CONTROL_PROC_GETTUNESTAT = 0x000B, CONTROL_PROC_GETTUNESTAT_RSP = 0x0B00, CONTROL_PROC_GETTPS = 0x000D, CONTROL_PROC_GETTPS_RSP = 0x0D00,
  CONTROL_PROC_SETFILTER = 0x000E, CONTROL_PROC_SETFILTER_RSP = 0x0E00, CONTROL_PROC_REMOVEFILTER = 0x000F, CONTROL_PROC_REMOVEFILTER_RSP = 0x0F00,
  CONTROL_PROC_GET_IMPULSE_RESP = 0x0012, CONTROL_PROC_GET_IMPULSE_RESP_RSP = 0x1200, CONTROL_PROC_START_STREAMING = 0x0013, CONTROL_PROC_START_STREAMING_RSP = 0x1300,
  CONTROL_PROC_STOP_STREAMING = 0x0014, CONTROL_PROC_STOP_STREAMING_RSP = 0x1400, CONTROL_PROC_GET_DEMOD_STATS = 0x0015, CONTROL_PROC_GET_DEMOD_STATS_RSP = 0x1500,
  CONTROL_PROC_ELNA_CHANGE_MODE = 0x0016, CONTROL_PROC_ELNA_CHANGE_MODE_RSP = 0x1600, CONTROL_PROC_ODSP_CHANGE_MODE = 0x0017, CONTROL_PROC_ODSP_CHANGE_MODE_RSP = 0x1700,
  CONTROL_PROC_AGC_CHANGE_MODE = 0x0018, CONTROL_PROC_AGC_CHANGE_MODE_RSP = 0x1800, CONTROL_PROC_CONTEXT = 0x00FC, CONTROL_PROC_CONTEXT_RSP = 0xFC00,
  CONTROL_PROC_DUMP_MEMORY = 0x00FD, CONTROL_PROC_DUMP_MEMORY_RSP = 0xFD00, CONTROL_PROC_DUMPLOG_MEMORY = 0x00FE, CONTROL_PROC_DUMPLOG_MEMORY_RSP = 0xFE00,
  CONTROL_PROC_TURNOFF = 0x00FF, CONTROL_PROC_TURNOFF_RSP = 0xFF00
}
 

Functions

void as10x_cmd_build (struct as10x_cmd_t *pcmd, uint16_t proc_id, uint16_t cmd_len)
 
int as10x_rsp_parse (struct as10x_cmd_t *r, uint16_t proc_id)
 
int as10x_cmd_turn_on (struct as10x_bus_adapter_t *adap)
 
int as10x_cmd_turn_off (struct as10x_bus_adapter_t *adap)
 
int as10x_cmd_set_tune (struct as10x_bus_adapter_t *adap, struct as10x_tune_args *ptune)
 
int as10x_cmd_get_tune_status (struct as10x_bus_adapter_t *adap, struct as10x_tune_status *pstatus)
 
int as10x_cmd_get_tps (struct as10x_bus_adapter_t *adap, struct as10x_tps *ptps)
 
int as10x_cmd_get_demod_stats (struct as10x_bus_adapter_t *adap, struct as10x_demod_stats *pdemod_stats)
 
int as10x_cmd_get_impulse_resp (struct as10x_bus_adapter_t *adap, uint8_t *is_ready)
 
int as10x_cmd_add_PID_filter (struct as10x_bus_adapter_t *adap, struct as10x_ts_filter *filter)
 
int as10x_cmd_del_PID_filter (struct as10x_bus_adapter_t *adap, uint16_t pid_value)
 
int as10x_cmd_start_streaming (struct as10x_bus_adapter_t *adap)
 
int as10x_cmd_stop_streaming (struct as10x_bus_adapter_t *adap)
 
int as10x_cmd_set_context (struct as10x_bus_adapter_t *adap, uint16_t tag, uint32_t value)
 
int as10x_cmd_get_context (struct as10x_bus_adapter_t *adap, uint16_t tag, uint32_t *pvalue)
 
int as10x_cmd_eLNA_change_mode (struct as10x_bus_adapter_t *adap, uint8_t mode)
 
int as10x_context_rsp_parse (struct as10x_cmd_t *prsp, uint16_t proc_id)
 

Variables

union as10x_turn_on __packed
 

Macro Definition Documentation

#define AS10X_CMD_ERROR   -1

Definition at line 31 of file as10x_cmd.h.

#define CFG_MODE_ODSP_RESUME   0

Definition at line 46 of file as10x_cmd.h.

#define CFG_MODE_ODSP_SUSPEND   1

Definition at line 47 of file as10x_cmd.h.

#define DUMP_BLOCK_SIZE   16

Definition at line 384 of file as10x_cmd.h.

#define DUMP_BLOCK_SIZE_MAX   0x20

Definition at line 50 of file as10x_cmd.h.

#define GET_CONTEXT_DATA   1

Definition at line 42 of file as10x_cmd.h.

#define HEADER_SIZE   (sizeof(struct as10x_cmd_header_t))

Definition at line 39 of file as10x_cmd.h.

#define HIER_LOW_PRIORITY   0x01

Definition at line 37 of file as10x_cmd.h.

#define HIER_NONE   0x00

Definition at line 36 of file as10x_cmd.h.

#define SERVICE_PROG_ID   0x0002

Definition at line 33 of file as10x_cmd.h.

#define SERVICE_PROG_VERSION   0x0001

Definition at line 34 of file as10x_cmd.h.

#define SET_CONTEXT_DATA   2

Definition at line 43 of file as10x_cmd.h.

Enumeration Type Documentation

Enumerator:
CONTROL_PROC_TURNON 
CONTROL_PROC_TURNON_RSP 
CONTROL_PROC_SET_REGISTER 
CONTROL_PROC_SET_REGISTER_RSP 
CONTROL_PROC_GET_REGISTER 
CONTROL_PROC_GET_REGISTER_RSP 
CONTROL_PROC_SETTUNE 
CONTROL_PROC_SETTUNE_RSP 
CONTROL_PROC_GETTUNESTAT 
CONTROL_PROC_GETTUNESTAT_RSP 
CONTROL_PROC_GETTPS 
CONTROL_PROC_GETTPS_RSP 
CONTROL_PROC_SETFILTER 
CONTROL_PROC_SETFILTER_RSP 
CONTROL_PROC_REMOVEFILTER 
CONTROL_PROC_REMOVEFILTER_RSP 
CONTROL_PROC_GET_IMPULSE_RESP 
CONTROL_PROC_GET_IMPULSE_RESP_RSP 
CONTROL_PROC_START_STREAMING 
CONTROL_PROC_START_STREAMING_RSP 
CONTROL_PROC_STOP_STREAMING 
CONTROL_PROC_STOP_STREAMING_RSP 
CONTROL_PROC_GET_DEMOD_STATS 
CONTROL_PROC_GET_DEMOD_STATS_RSP 
CONTROL_PROC_ELNA_CHANGE_MODE 
CONTROL_PROC_ELNA_CHANGE_MODE_RSP 
CONTROL_PROC_ODSP_CHANGE_MODE 
CONTROL_PROC_ODSP_CHANGE_MODE_RSP 
CONTROL_PROC_AGC_CHANGE_MODE 
CONTROL_PROC_AGC_CHANGE_MODE_RSP 
CONTROL_PROC_CONTEXT 
CONTROL_PROC_CONTEXT_RSP 
CONTROL_PROC_DUMP_MEMORY 
CONTROL_PROC_DUMP_MEMORY_RSP 
CONTROL_PROC_DUMPLOG_MEMORY 
CONTROL_PROC_DUMPLOG_MEMORY_RSP 
CONTROL_PROC_TURNOFF 
CONTROL_PROC_TURNOFF_RSP 

Definition at line 55 of file as10x_cmd.h.

Function Documentation

int as10x_cmd_add_PID_filter ( struct as10x_bus_adapter_t adap,
struct as10x_ts_filter filter 
)

as10x_cmd_add_PID_filter - send add filter command to AS10x : pointer to AS10x bus adapter : TSFilter filter for DVB-T

Return 0 on success or negative value in case of error.

Definition at line 31 of file as10x_cmd_stream.c.

void as10x_cmd_build ( struct as10x_cmd_t pcmd,
uint16_t  xid,
uint16_t  cmd_len 
)

as10x_cmd_build - build AS10x command header : pointer to AS10x command buffer : sequence id of the command : length of the command

Definition at line 410 of file as10x_cmd.c.

int as10x_cmd_del_PID_filter ( struct as10x_bus_adapter_t adap,
uint16_t  pid_value 
)

as10x_cmd_del_PID_filter - Send delete filter command to AS10x : pointer to AS10x bus adapte : PID to delete

Return 0 on success or negative value in case of error.

Definition at line 91 of file as10x_cmd_stream.c.

int as10x_cmd_eLNA_change_mode ( struct as10x_bus_adapter_t adap,
uint8_t  mode 
)

as10x_cmd_eLNA_change_mode - send eLNA change mode command to AS10x : pointer to AS10x bus adapter : mode selected:

  • ON : 0x0 => eLNA always ON
  • OFF : 0x1 => eLNA always OFF
  • AUTO : 0x2 => eLNA follow hysteresis parameters to be ON or OFF

Return 0 on success or negative value in case of error.

Definition at line 154 of file as10x_cmd_cfg.c.

int as10x_cmd_get_context ( struct as10x_bus_adapter_t adap,
uint16_t  tag,
uint32_t pvalue 
)

as10x_cmd_get_context - Send get context command to AS10x : pointer to AS10x bus adapter : context tag : pointer where to store context value read

Return 0 on success or negative value in case of error.

Definition at line 37 of file as10x_cmd_cfg.c.

int as10x_cmd_get_demod_stats ( struct as10x_bus_adapter_t adap,
struct as10x_demod_stats pdemod_stats 
)

as10x_cmd_get_demod_stats - send get demod stats command to AS10x : pointer to AS10x bus adapter : pointer to demod stats parameters structure

Return 0 on success or negative value in case of error.

Definition at line 295 of file as10x_cmd.c.

int as10x_cmd_get_impulse_resp ( struct as10x_bus_adapter_t adap,
uint8_t is_ready 
)

as10x_cmd_get_impulse_resp - send get impulse response command to AS10x : pointer to AS10x bus adapter : pointer to value indicating when impulse response data is ready

Return 0 on success or negative value in case of error.

Definition at line 358 of file as10x_cmd.c.

int as10x_cmd_get_tps ( struct as10x_bus_adapter_t adap,
struct as10x_tps ptps 
)

as10x_cmd_get_tps - send get TPS command to AS10x : pointer to AS10x handle : pointer to TPS parameters structure

Return 0 on success or negative value in case of error.

Definition at line 234 of file as10x_cmd.c.

int as10x_cmd_get_tune_status ( struct as10x_bus_adapter_t adap,
struct as10x_tune_status pstatus 
)

as10x_cmd_get_tune_status - send get tune status command to AS10x : pointer to AS10x bus adapter : pointer to updated status structure of the current tune

Return 0 on success or negative value in case of error.

Definition at line 178 of file as10x_cmd.c.

int as10x_cmd_set_context ( struct as10x_bus_adapter_t adap,
uint16_t  tag,
uint32_t  value 
)

as10x_cmd_set_context - send set context command to AS10x : pointer to AS10x bus adapter : context tag : value to set in context

Return 0 on success or negative value in case of error.

Definition at line 96 of file as10x_cmd_cfg.c.

int as10x_cmd_set_tune ( struct as10x_bus_adapter_t adap,
struct as10x_tune_args ptune 
)

as10x_cmd_set_tune - send set tune command to AS10x : pointer to AS10x bus adapter : tune parameters

Return 0 on success or negative value in case of error.

Definition at line 120 of file as10x_cmd.c.

int as10x_cmd_start_streaming ( struct as10x_bus_adapter_t adap)

as10x_cmd_start_streaming - Send start streaming command to AS10x : pointer to AS10x bus adapter

Return 0 on success or negative value in case of error.

Definition at line 139 of file as10x_cmd_stream.c.

int as10x_cmd_stop_streaming ( struct as10x_bus_adapter_t adap)

as10x_cmd_stop_streaming - Send stop streaming command to AS10x : pointer to AS10x bus adapter

Return 0 on success or negative value in case of error.

Definition at line 185 of file as10x_cmd_stream.c.

int as10x_cmd_turn_off ( struct as10x_bus_adapter_t adap)

as10x_cmd_turn_off - send turn off command to AS10x : pointer to AS10x bus adapter

Return 0 on success or negative value in case of error.

Definition at line 76 of file as10x_cmd.c.

int as10x_cmd_turn_on ( struct as10x_bus_adapter_t adap)

as10x_cmd_turn_on - send turn on command to AS10x : pointer to AS10x bus adapter

Return 0 when no error, < 0 in case of error.

Definition at line 32 of file as10x_cmd.c.

int as10x_context_rsp_parse ( struct as10x_cmd_t prsp,
uint16_t  proc_id 
)

as10x_context_rsp_parse - Parse context command response : pointer to AS10x command response buffer : id of the command

Since the contex command reponse does not follow the common response, a specific parse function is required. Return 0 on success or negative value in case of error.

Definition at line 204 of file as10x_cmd_cfg.c.

int as10x_rsp_parse ( struct as10x_cmd_t prsp,
uint16_t  proc_id 
)

as10x_rsp_parse - Parse command response : pointer to AS10x command buffer : id of the command

Return 0 on success or negative value in case of error.

Definition at line 426 of file as10x_cmd.c.

Variable Documentation