[media] drx-j: make checkpatch.pl happy

Fix the remaining checkpatch.pl compliants at drxj.

Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
This commit is contained in:
Mauro Carvalho Chehab 2014-01-17 11:51:52 -03:00
parent c361fda0e5
commit 2f1f733386
7 changed files with 325 additions and 428 deletions

View file

@ -26,28 +26,17 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/
/******************************************************************************* DESCRIPTION:
* FILENAME: $Id: drx_dap_fasi.c,v 1.7 2009/12/28 14:36:21 carlo Exp $ Part of DRX driver.
* Data access protocol: Fast Access Sequential Interface (fasi)
* DESCRIPTION: Fast access, because of short addressing format (16 instead of 32 bits addr)
* Part of DRX driver. Sequential, because of I2C.
* Data access protocol: Fast Access Sequential Interface (fasi) These functions know how the chip's memory and registers are to be accessed,
* Fast access, because of short addressing format (16 instead of 32 bits addr) but nothing more.
* Sequential, because of I2C.
* These functions know how the chip's memory and registers are to be accessed, These functions should not need adapting to a new platform.
* but nothing more. */
*
* These functions should not need adapting to a new platform.
*
* USAGE:
* -
*
* NOTES:
*
*
*******************************************************************************/
#include "drx_dap_fasi.h" #include "drx_dap_fasi.h"
#include "drx_driver.h" /* for drxbsp_hst_memcpy() */ #include "drx_driver.h" /* for drxbsp_hst_memcpy() */
@ -221,9 +210,8 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
u16 overhead_size = 0; u16 overhead_size = 0;
/* Check parameters ******************************************************* */ /* Check parameters ******************************************************* */
if (dev_addr == NULL) { if (dev_addr == NULL)
return -EINVAL; return -EINVAL;
}
overhead_size = (IS_I2C_10BIT(dev_addr->i2c_addr) ? 2 : 1) + overhead_size = (IS_I2C_10BIT(dev_addr->i2c_addr) ? 2 : 1) +
(DRXDAP_FASI_LONG_FORMAT(addr) ? 4 : 2); (DRXDAP_FASI_LONG_FORMAT(addr) ? 4 : 2);
@ -252,8 +240,7 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
addr &= ~DRXDAP_FASI_FLAGS; addr &= ~DRXDAP_FASI_FLAGS;
addr |= flags; addr |= flags;
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \ #if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && (DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
/* short format address preferred but long format otherwise */ /* short format address preferred but long format otherwise */
if (DRXDAP_FASI_LONG_FORMAT(addr)) { if (DRXDAP_FASI_LONG_FORMAT(addr)) {
#endif #endif
@ -263,8 +250,7 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
buf[bufx++] = (u8) ((addr >> 24) & 0xFF); buf[bufx++] = (u8) ((addr >> 24) & 0xFF);
buf[bufx++] = (u8) ((addr >> 7) & 0xFF); buf[bufx++] = (u8) ((addr >> 7) & 0xFF);
#endif #endif
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \ #if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && (DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
} else { } else {
#endif #endif
#if (DRXDAPFASI_SHORT_ADDR_ALLOWED == 1) #if (DRXDAPFASI_SHORT_ADDR_ALLOWED == 1)
@ -273,8 +259,7 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr,
(u8) (((addr >> 16) & 0x0F) | (u8) (((addr >> 16) & 0x0F) |
((addr >> 18) & 0xF0)); ((addr >> 18) & 0xF0));
#endif #endif
#if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && \ #if ((DRXDAPFASI_LONG_ADDR_ALLOWED == 1) && (DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
(DRXDAPFASI_SHORT_ADDR_ALLOWED == 1))
} }
#endif #endif
@ -332,9 +317,8 @@ static int drxdap_fasi_read_modify_write_reg16(struct i2c_device_addr *dev_addr,
int rc = -EIO; int rc = -EIO;
#if (DRXDAPFASI_LONG_ADDR_ALLOWED == 1) #if (DRXDAPFASI_LONG_ADDR_ALLOWED == 1)
if (rdata == NULL) { if (rdata == NULL)
return -EINVAL; return -EINVAL;
}
rc = drxdap_fasi_write_reg16(dev_addr, waddr, wdata, DRXDAP_FASI_RMW); rc = drxdap_fasi_write_reg16(dev_addr, waddr, wdata, DRXDAP_FASI_RMW);
if (rc == 0) if (rc == 0)
@ -369,9 +353,9 @@ static int drxdap_fasi_read_reg16(struct i2c_device_addr *dev_addr,
u8 buf[sizeof(*data)]; u8 buf[sizeof(*data)];
int rc; int rc;
if (!data) { if (!data)
return -EINVAL; return -EINVAL;
}
rc = drxdap_fasi_read_block(dev_addr, addr, sizeof(*data), buf, flags); rc = drxdap_fasi_read_block(dev_addr, addr, sizeof(*data), buf, flags);
*data = buf[0] + (((u16) buf[1]) << 8); *data = buf[0] + (((u16) buf[1]) << 8);
return rc; return rc;
@ -402,9 +386,9 @@ static int drxdap_fasi_read_reg32(struct i2c_device_addr *dev_addr,
u8 buf[sizeof(*data)]; u8 buf[sizeof(*data)];
int rc; int rc;
if (!data) { if (!data)
return -EINVAL; return -EINVAL;
}
rc = drxdap_fasi_read_block(dev_addr, addr, sizeof(*data), buf, flags); rc = drxdap_fasi_read_block(dev_addr, addr, sizeof(*data), buf, flags);
*data = (((u32) buf[0]) << 0) + *data = (((u32) buf[0]) << 0) +
(((u32) buf[1]) << 8) + (((u32) buf[1]) << 8) +
@ -446,9 +430,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
u16 block_size = 0; u16 block_size = 0;
/* Check parameters ******************************************************* */ /* Check parameters ******************************************************* */
if (dev_addr == NULL) { if (dev_addr == NULL)
return -EINVAL; return -EINVAL;
}
overhead_size = (IS_I2C_10BIT(dev_addr->i2c_addr) ? 2 : 1) + overhead_size = (IS_I2C_10BIT(dev_addr->i2c_addr) ? 2 : 1) +
(DRXDAP_FASI_LONG_FORMAT(addr) ? 4 : 2); (DRXDAP_FASI_LONG_FORMAT(addr) ? 4 : 2);
@ -457,9 +440,8 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
((!(DRXDAPFASI_LONG_ADDR_ALLOWED)) && ((!(DRXDAPFASI_LONG_ADDR_ALLOWED)) &&
DRXDAP_FASI_LONG_FORMAT(addr)) || DRXDAP_FASI_LONG_FORMAT(addr)) ||
(overhead_size > (DRXDAP_MAX_WCHUNKSIZE)) || (overhead_size > (DRXDAP_MAX_WCHUNKSIZE)) ||
((datasize != 0) && (data == NULL)) || ((datasize & 1) == 1)) { ((datasize != 0) && (data == NULL)) || ((datasize & 1) == 1))
return -EINVAL; return -EINVAL;
}
flags &= DRXDAP_FASI_FLAGS; flags &= DRXDAP_FASI_FLAGS;
flags &= ~DRXDAP_FASI_MODEFLAGS; flags &= ~DRXDAP_FASI_MODEFLAGS;
@ -476,8 +458,7 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
/* Buffer device address */ /* Buffer device address */
addr &= ~DRXDAP_FASI_FLAGS; addr &= ~DRXDAP_FASI_FLAGS;
addr |= flags; addr |= flags;
#if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \ #if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && ((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
/* short format address preferred but long format otherwise */ /* short format address preferred but long format otherwise */
if (DRXDAP_FASI_LONG_FORMAT(addr)) { if (DRXDAP_FASI_LONG_FORMAT(addr)) {
#endif #endif
@ -487,8 +468,7 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
buf[bufx++] = (u8) ((addr >> 24) & 0xFF); buf[bufx++] = (u8) ((addr >> 24) & 0xFF);
buf[bufx++] = (u8) ((addr >> 7) & 0xFF); buf[bufx++] = (u8) ((addr >> 7) & 0xFF);
#endif #endif
#if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \ #if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && ((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
} else { } else {
#endif #endif
#if ((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1) #if ((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1)
@ -497,8 +477,7 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr,
(u8) (((addr >> 16) & 0x0F) | (u8) (((addr >> 16) & 0x0F) |
((addr >> 18) & 0xF0)); ((addr >> 18) & 0xF0));
#endif #endif
#if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && \ #if (((DRXDAPFASI_LONG_ADDR_ALLOWED) == 1) && ((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
((DRXDAPFASI_SHORT_ADDR_ALLOWED) == 1))
} }
#endif #endif

View file

@ -234,11 +234,7 @@
/*-------- Public API functions ----------------------------------------------*/ /*-------- Public API functions ----------------------------------------------*/
#ifdef __cplusplus extern struct drx_access_func drx_dap_fasi_funct_g;
extern "C" {
#endif
extern struct drx_access_func drx_dap_fasi_funct_g;
#define DRXDAP_FASI_RMW 0x10000000 #define DRXDAP_FASI_RMW 0x10000000
#define DRXDAP_FASI_BROADCAST 0x20000000 #define DRXDAP_FASI_BROADCAST 0x20000000
@ -257,7 +253,4 @@ extern "C" {
#define DRXDAP_FASI_LONG_FORMAT(addr) (((addr) & 0xFC30FF80) != 0) #define DRXDAP_FASI_LONG_FORMAT(addr) (((addr) & 0xFC30FF80) != 0)
#define DRXDAP_FASI_OFFSET_TOO_LARGE(addr) (((addr) & 0x00008000) != 0) #define DRXDAP_FASI_OFFSET_TOO_LARGE(addr) (((addr) & 0x00008000) != 0)
#ifdef __cplusplus
}
#endif
#endif /* __DRX_DAP_FASI_H__ */ #endif /* __DRX_DAP_FASI_H__ */

View file

@ -226,31 +226,25 @@ static int scan_wait_for_lock(struct drx_demod_instance *demod, bool *is_locked)
/* Start polling loop, checking for lock & timeout */ /* Start polling loop, checking for lock & timeout */
while (!done_waiting) { while (!done_waiting) {
if (drx_ctrl(demod, DRX_CTRL_LOCK_STATUS, &lock_state))
if (drx_ctrl(demod, DRX_CTRL_LOCK_STATUS, &lock_state) !=
0) {
return -EIO; return -EIO;
}
current_time = drxbsp_hst_clock(); current_time = drxbsp_hst_clock();
timer_value = current_time - start_time_lock_stage; timer_value = current_time - start_time_lock_stage;
if (lock_state >= desired_lock_state) { if (lock_state >= desired_lock_state) {
*is_locked = true; *is_locked = true;
done_waiting = true; done_waiting = true;
} /* if ( lock_state >= desired_lock_state ) .. */ } else if (lock_state == DRX_NEVER_LOCK) {
else if (lock_state == DRX_NEVER_LOCK) {
done_waiting = true; done_waiting = true;
} /* if ( lock_state == DRX_NEVER_LOCK ) .. */ } else if (timer_value > timeout_value) {
else if (timer_value > timeout_value) {
/* lock_state == DRX_NOT_LOCKED and timeout */ /* lock_state == DRX_NOT_LOCKED and timeout */
done_waiting = true; done_waiting = true;
} else { } else {
if (drxbsp_hst_sleep(10) != 0) { if (drxbsp_hst_sleep(10) != 0)
return -EIO; return -EIO;
} }
} /* if ( timer_value > timeout_value ) .. */ }
} /* while */
return 0; return 0;
} }
@ -356,36 +350,30 @@ scan_function_default(void *scan_context,
enum drx_scan_command scan_command, enum drx_scan_command scan_command,
struct drx_channel *scan_channel, bool *get_next_channel) struct drx_channel *scan_channel, bool *get_next_channel)
{ {
struct drx_demod_instance *demod = NULL; struct drx_demod_instance *demod = scan_context;
int status = -EIO; int status;
bool is_locked = false; bool is_locked = false;
demod = (struct drx_demod_instance *) scan_context; /* just return OK if not doing "scan next" */
if (scan_command != DRX_SCAN_COMMAND_NEXT)
if (scan_command != DRX_SCAN_COMMAND_NEXT) {
/* just return OK if not doing "scan next" */
return 0; return 0;
}
*get_next_channel = false; *get_next_channel = false;
status = drx_ctrl(demod, DRX_CTRL_SET_CHANNEL, scan_channel); status = drx_ctrl(demod, DRX_CTRL_SET_CHANNEL, scan_channel);
if (status != 0) { if (status)
return status; return status;
}
status = scan_wait_for_lock(demod, &is_locked); status = scan_wait_for_lock(demod, &is_locked);
if (status != 0) { if (status)
return status; return status;
}
/* done with this channel, move to next one */ /* done with this channel, move to next one */
*get_next_channel = true; *get_next_channel = true;
if (!is_locked) { if (!is_locked)
/* no channel found */ return -EBUSY; /* no channel found */
return -EBUSY;
}
/* channel found */ /* channel found */
return 0; return 0;
} }
@ -733,23 +721,20 @@ ctrl_program_tuner(struct drx_demod_instance *demod, struct drx_channel *channel
bool tuner_slow_mode = false; bool tuner_slow_mode = false;
/* can't tune without a tuner */ /* can't tune without a tuner */
if (demod->my_tuner == NULL) { if (demod->my_tuner == NULL)
return -EINVAL; return -EINVAL;
}
common_attr = (struct drx_common_attr *) demod->my_common_attr; common_attr = demod->my_common_attr;
/* select analog or digital tuner mode based on current standard */ /* select analog or digital tuner mode based on current standard */
if (drx_ctrl(demod, DRX_CTRL_GET_STANDARD, &standard) != 0) { if (drx_ctrl(demod, DRX_CTRL_GET_STANDARD, &standard))
return -EIO; return -EIO;
}
if (DRX_ISATVSTD(standard)) { if (DRX_ISATVSTD(standard))
tuner_mode |= TUNER_MODE_ANALOG; tuner_mode |= TUNER_MODE_ANALOG;
} else { /* note: also for unknown standard */ else
tuner_mode |= TUNER_MODE_DIGITAL; tuner_mode |= TUNER_MODE_DIGITAL; /* also for unknown standard */
}
/* select tuner bandwidth */ /* select tuner bandwidth */
switch (channel->bandwidth) { switch (channel->bandwidth) {
@ -769,25 +754,23 @@ ctrl_program_tuner(struct drx_demod_instance *demod, struct drx_channel *channel
tuner_slow_mode = DRX_ATTR_TUNERSLOWMODE(demod); tuner_slow_mode = DRX_ATTR_TUNERSLOWMODE(demod);
/* select fast (switch) or slow (lock) tuner mode */ /* select fast (switch) or slow (lock) tuner mode */
if (tuner_slow_mode) { if (tuner_slow_mode)
tuner_mode |= TUNER_MODE_LOCK; tuner_mode |= TUNER_MODE_LOCK;
} else { else
tuner_mode |= TUNER_MODE_SWITCH; tuner_mode |= TUNER_MODE_SWITCH;
}
if (common_attr->tuner_port_nr == 1) { if (common_attr->tuner_port_nr == 1) {
bool bridge_closed = true; bool bridge_closed = true;
int status_bridge = -EIO; int status_bridge = -EIO;
status_bridge = status_bridge = drx_ctrl(demod, DRX_CTRL_I2C_BRIDGE,
drx_ctrl(demod, DRX_CTRL_I2C_BRIDGE, &bridge_closed); &bridge_closed);
if (status_bridge != 0) { if (status_bridge)
return status_bridge; return status_bridge;
}
} }
status = drxbsp_tuner_set_frequency(demod->my_tuner, status = drxbsp_tuner_set_frequency(demod->my_tuner,
tuner_mode, channel->frequency); tuner_mode, channel->frequency);
/* attempt restoring bridge before checking status of set_frequency */ /* attempt restoring bridge before checking status of set_frequency */
if (common_attr->tuner_port_nr == 1) { if (common_attr->tuner_port_nr == 1) {
@ -796,24 +779,21 @@ ctrl_program_tuner(struct drx_demod_instance *demod, struct drx_channel *channel
status_bridge = status_bridge =
drx_ctrl(demod, DRX_CTRL_I2C_BRIDGE, &bridge_closed); drx_ctrl(demod, DRX_CTRL_I2C_BRIDGE, &bridge_closed);
if (status_bridge != 0) { if (status_bridge)
return status_bridge; return status_bridge;
}
} }
/* now check status of drxbsp_tuner_set_frequency */ /* now check status of drxbsp_tuner_set_frequency */
if (status != 0) { if (status)
return status; return status;
}
/* get actual RF and IF frequencies from tuner */ /* get actual RF and IF frequencies from tuner */
status = drxbsp_tuner_get_frequency(demod->my_tuner, status = drxbsp_tuner_get_frequency(demod->my_tuner,
tuner_mode, tuner_mode,
&(channel->frequency), &(channel->frequency),
&(if_frequency)); &(if_frequency));
if (status != 0) { if (status)
return status; return status;
}
/* update common attributes with information available from this function; /* update common attributes with information available from this function;
TODO: check if this is required and safe */ TODO: check if this is required and safe */
@ -839,29 +819,27 @@ static int ctrl_dump_registers(struct drx_demod_instance *demod,
{ {
u16 i = 0; u16 i = 0;
if (registers == NULL) { if (registers == NULL)
/* registers not supplied */ return -EINVAL; /* registers not supplied */
return -EINVAL;
}
/* start dumping registers */ /* start dumping registers */
while (registers[i].address != 0) { while (registers[i].address) {
int status = -EIO; int status = -EIO;
u16 value = 0; u16 value = 0;
u32 data = 0; u32 data = 0;
status = status = demod->my_access_funct->read_reg16func(demod->my_i2c_dev_addr,
demod->my_access_funct->read_reg16func(demod->my_i2c_dev_addr,
registers[i].address, registers[i].address,
&value, 0); &value, 0);
data = (u32) value; data = (u32) value;
if (status != 0) { /*
/* no breakouts; * On error: no breakouts;
depending on device ID, some HW blocks might not be available */ * depending on device ID, some HW blocks might not be available
*/
if (status)
data |= ((u32) status) << 16; data |= ((u32) status) << 16;
}
registers[i].data = data; registers[i].data = data;
i++; i++;
} }
@ -989,9 +967,8 @@ ctrl_u_code(struct drx_demod_instance *demod,
dev_addr = demod->my_i2c_dev_addr; dev_addr = demod->my_i2c_dev_addr;
/* Check arguments */ /* Check arguments */
if ((mc_info == NULL) || (mc_info->mc_data == NULL)) { if ((mc_info == NULL) || (mc_info->mc_data == NULL))
return -EINVAL; return -EINVAL;
}
mc_data = mc_info->mc_data; mc_data = mc_info->mc_data;
@ -1001,10 +978,8 @@ ctrl_u_code(struct drx_demod_instance *demod,
mc_nr_of_blks = u_code_read16(mc_data); mc_nr_of_blks = u_code_read16(mc_data);
mc_data += sizeof(u16); mc_data += sizeof(u16);
if ((mc_magic_word != DRX_UCODE_MAGIC_WORD) || (mc_nr_of_blks == 0)) { if ((mc_magic_word != DRX_UCODE_MAGIC_WORD) || (mc_nr_of_blks == 0))
/* wrong endianess or wrong data ? */ return -EINVAL; /* wrong endianess or wrong data ? */
return -EINVAL;
}
/* Scan microcode blocks first for version info if uploading */ /* Scan microcode blocks first for version info if uploading */
if (action == UCODE_UPLOAD) { if (action == UCODE_UPLOAD) {
@ -1049,9 +1024,8 @@ ctrl_u_code(struct drx_demod_instance *demod,
It is also valid if no validation control exists. It is also valid if no validation control exists.
*/ */
rc = drx_ctrl(demod, DRX_CTRL_VALIDATE_UCODE, NULL); rc = drx_ctrl(demod, DRX_CTRL_VALIDATE_UCODE, NULL);
if (rc != 0 && rc != -ENOTSUPP) { if (rc != 0 && rc != -ENOTSUPP)
return rc; return rc;
}
/* Restore data pointer */ /* Restore data pointer */
mc_data = mc_info->mc_data + 2 * sizeof(u16); mc_data = mc_info->mc_data + 2 * sizeof(u16);
@ -1149,9 +1123,8 @@ ctrl_u_code(struct drx_demod_instance *demod,
mc_data_buffer, mc_data_buffer,
bytes_to_compare); bytes_to_compare);
if (result != 0) { if (result != 0)
return -EIO; return -EIO;
}
curr_addr += curr_addr +=
((dr_xaddr_t) ((dr_xaddr_t)
@ -1205,9 +1178,8 @@ ctrl_version(struct drx_demod_instance *demod, struct drx_version_list **version
int return_status = -EIO; int return_status = -EIO;
/* Check arguments */ /* Check arguments */
if (version_list == NULL) { if (version_list == NULL)
return -EINVAL; return -EINVAL;
}
/* Get version info list from demod */ /* Get version info list from demod */
return_status = (*(demod->my_demod_funct->ctrl_func)) (demod, return_status = (*(demod->my_demod_funct->ctrl_func)) (demod,
@ -1231,9 +1203,8 @@ ctrl_version(struct drx_demod_instance *demod, struct drx_version_list **version
/* Return version info in "bottom-up" order. This way, multiple /* Return version info in "bottom-up" order. This way, multiple
devices can be handled without using malloc. */ devices can be handled without using malloc. */
struct drx_version_list *current_list_element = demod_version_list; struct drx_version_list *current_list_element = demod_version_list;
while (current_list_element->next != NULL) { while (current_list_element->next != NULL)
current_list_element = current_list_element->next; current_list_element = current_list_element->next;
}
current_list_element->next = &drx_driver_core_version_list; current_list_element->next = &drx_driver_core_version_list;
*version_list = demod_version_list; *version_list = demod_version_list;

View file

@ -2056,275 +2056,275 @@ Conversion from enum values to human readable form.
/* standard */ /* standard */
#define DRX_STR_STANDARD(x) ( \ #define DRX_STR_STANDARD(x) ( \
(x == DRX_STANDARD_DVBT) ? "DVB-T" : \ (x == DRX_STANDARD_DVBT) ? "DVB-T" : \
(x == DRX_STANDARD_8VSB) ? "8VSB" : \ (x == DRX_STANDARD_8VSB) ? "8VSB" : \
(x == DRX_STANDARD_NTSC) ? "NTSC" : \ (x == DRX_STANDARD_NTSC) ? "NTSC" : \
(x == DRX_STANDARD_PAL_SECAM_BG) ? "PAL/SECAM B/G" : \ (x == DRX_STANDARD_PAL_SECAM_BG) ? "PAL/SECAM B/G" : \
(x == DRX_STANDARD_PAL_SECAM_DK) ? "PAL/SECAM D/K" : \ (x == DRX_STANDARD_PAL_SECAM_DK) ? "PAL/SECAM D/K" : \
(x == DRX_STANDARD_PAL_SECAM_I) ? "PAL/SECAM I" : \ (x == DRX_STANDARD_PAL_SECAM_I) ? "PAL/SECAM I" : \
(x == DRX_STANDARD_PAL_SECAM_L) ? "PAL/SECAM L" : \ (x == DRX_STANDARD_PAL_SECAM_L) ? "PAL/SECAM L" : \
(x == DRX_STANDARD_PAL_SECAM_LP) ? "PAL/SECAM LP" : \ (x == DRX_STANDARD_PAL_SECAM_LP) ? "PAL/SECAM LP" : \
(x == DRX_STANDARD_ITU_A) ? "ITU-A" : \ (x == DRX_STANDARD_ITU_A) ? "ITU-A" : \
(x == DRX_STANDARD_ITU_B) ? "ITU-B" : \ (x == DRX_STANDARD_ITU_B) ? "ITU-B" : \
(x == DRX_STANDARD_ITU_C) ? "ITU-C" : \ (x == DRX_STANDARD_ITU_C) ? "ITU-C" : \
(x == DRX_STANDARD_ITU_D) ? "ITU-D" : \ (x == DRX_STANDARD_ITU_D) ? "ITU-D" : \
(x == DRX_STANDARD_FM) ? "FM" : \ (x == DRX_STANDARD_FM) ? "FM" : \
(x == DRX_STANDARD_DTMB) ? "DTMB" : \ (x == DRX_STANDARD_DTMB) ? "DTMB" : \
(x == DRX_STANDARD_AUTO) ? "Auto" : \ (x == DRX_STANDARD_AUTO) ? "Auto" : \
(x == DRX_STANDARD_UNKNOWN) ? "Unknown" : \ (x == DRX_STANDARD_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
/* channel */ /* channel */
#define DRX_STR_BANDWIDTH(x) ( \ #define DRX_STR_BANDWIDTH(x) ( \
(x == DRX_BANDWIDTH_8MHZ) ? "8 MHz" : \ (x == DRX_BANDWIDTH_8MHZ) ? "8 MHz" : \
(x == DRX_BANDWIDTH_7MHZ) ? "7 MHz" : \ (x == DRX_BANDWIDTH_7MHZ) ? "7 MHz" : \
(x == DRX_BANDWIDTH_6MHZ) ? "6 MHz" : \ (x == DRX_BANDWIDTH_6MHZ) ? "6 MHz" : \
(x == DRX_BANDWIDTH_AUTO) ? "Auto" : \ (x == DRX_BANDWIDTH_AUTO) ? "Auto" : \
(x == DRX_BANDWIDTH_UNKNOWN) ? "Unknown" : \ (x == DRX_BANDWIDTH_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_FFTMODE(x) ( \ #define DRX_STR_FFTMODE(x) ( \
(x == DRX_FFTMODE_2K) ? "2k" : \ (x == DRX_FFTMODE_2K) ? "2k" : \
(x == DRX_FFTMODE_4K) ? "4k" : \ (x == DRX_FFTMODE_4K) ? "4k" : \
(x == DRX_FFTMODE_8K) ? "8k" : \ (x == DRX_FFTMODE_8K) ? "8k" : \
(x == DRX_FFTMODE_AUTO) ? "Auto" : \ (x == DRX_FFTMODE_AUTO) ? "Auto" : \
(x == DRX_FFTMODE_UNKNOWN) ? "Unknown" : \ (x == DRX_FFTMODE_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_GUARD(x) ( \ #define DRX_STR_GUARD(x) ( \
(x == DRX_GUARD_1DIV32) ? "1/32nd" : \ (x == DRX_GUARD_1DIV32) ? "1/32nd" : \
(x == DRX_GUARD_1DIV16) ? "1/16th" : \ (x == DRX_GUARD_1DIV16) ? "1/16th" : \
(x == DRX_GUARD_1DIV8) ? "1/8th" : \ (x == DRX_GUARD_1DIV8) ? "1/8th" : \
(x == DRX_GUARD_1DIV4) ? "1/4th" : \ (x == DRX_GUARD_1DIV4) ? "1/4th" : \
(x == DRX_GUARD_AUTO) ? "Auto" : \ (x == DRX_GUARD_AUTO) ? "Auto" : \
(x == DRX_GUARD_UNKNOWN) ? "Unknown" : \ (x == DRX_GUARD_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_CONSTELLATION(x) ( \ #define DRX_STR_CONSTELLATION(x) ( \
(x == DRX_CONSTELLATION_BPSK) ? "BPSK" : \ (x == DRX_CONSTELLATION_BPSK) ? "BPSK" : \
(x == DRX_CONSTELLATION_QPSK) ? "QPSK" : \ (x == DRX_CONSTELLATION_QPSK) ? "QPSK" : \
(x == DRX_CONSTELLATION_PSK8) ? "PSK8" : \ (x == DRX_CONSTELLATION_PSK8) ? "PSK8" : \
(x == DRX_CONSTELLATION_QAM16) ? "QAM16" : \ (x == DRX_CONSTELLATION_QAM16) ? "QAM16" : \
(x == DRX_CONSTELLATION_QAM32) ? "QAM32" : \ (x == DRX_CONSTELLATION_QAM32) ? "QAM32" : \
(x == DRX_CONSTELLATION_QAM64) ? "QAM64" : \ (x == DRX_CONSTELLATION_QAM64) ? "QAM64" : \
(x == DRX_CONSTELLATION_QAM128) ? "QAM128" : \ (x == DRX_CONSTELLATION_QAM128) ? "QAM128" : \
(x == DRX_CONSTELLATION_QAM256) ? "QAM256" : \ (x == DRX_CONSTELLATION_QAM256) ? "QAM256" : \
(x == DRX_CONSTELLATION_QAM512) ? "QAM512" : \ (x == DRX_CONSTELLATION_QAM512) ? "QAM512" : \
(x == DRX_CONSTELLATION_QAM1024) ? "QAM1024" : \ (x == DRX_CONSTELLATION_QAM1024) ? "QAM1024" : \
(x == DRX_CONSTELLATION_QPSK_NR) ? "QPSK_NR" : \ (x == DRX_CONSTELLATION_QPSK_NR) ? "QPSK_NR" : \
(x == DRX_CONSTELLATION_AUTO) ? "Auto" : \ (x == DRX_CONSTELLATION_AUTO) ? "Auto" : \
(x == DRX_CONSTELLATION_UNKNOWN) ? "Unknown" : \ (x == DRX_CONSTELLATION_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_CODERATE(x) ( \ #define DRX_STR_CODERATE(x) ( \
(x == DRX_CODERATE_1DIV2) ? "1/2nd" : \ (x == DRX_CODERATE_1DIV2) ? "1/2nd" : \
(x == DRX_CODERATE_2DIV3) ? "2/3rd" : \ (x == DRX_CODERATE_2DIV3) ? "2/3rd" : \
(x == DRX_CODERATE_3DIV4) ? "3/4th" : \ (x == DRX_CODERATE_3DIV4) ? "3/4th" : \
(x == DRX_CODERATE_5DIV6) ? "5/6th" : \ (x == DRX_CODERATE_5DIV6) ? "5/6th" : \
(x == DRX_CODERATE_7DIV8) ? "7/8th" : \ (x == DRX_CODERATE_7DIV8) ? "7/8th" : \
(x == DRX_CODERATE_AUTO) ? "Auto" : \ (x == DRX_CODERATE_AUTO) ? "Auto" : \
(x == DRX_CODERATE_UNKNOWN) ? "Unknown" : \ (x == DRX_CODERATE_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_HIERARCHY(x) ( \ #define DRX_STR_HIERARCHY(x) ( \
(x == DRX_HIERARCHY_NONE) ? "None" : \ (x == DRX_HIERARCHY_NONE) ? "None" : \
(x == DRX_HIERARCHY_ALPHA1) ? "Alpha=1" : \ (x == DRX_HIERARCHY_ALPHA1) ? "Alpha=1" : \
(x == DRX_HIERARCHY_ALPHA2) ? "Alpha=2" : \ (x == DRX_HIERARCHY_ALPHA2) ? "Alpha=2" : \
(x == DRX_HIERARCHY_ALPHA4) ? "Alpha=4" : \ (x == DRX_HIERARCHY_ALPHA4) ? "Alpha=4" : \
(x == DRX_HIERARCHY_AUTO) ? "Auto" : \ (x == DRX_HIERARCHY_AUTO) ? "Auto" : \
(x == DRX_HIERARCHY_UNKNOWN) ? "Unknown" : \ (x == DRX_HIERARCHY_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_PRIORITY(x) ( \ #define DRX_STR_PRIORITY(x) ( \
(x == DRX_PRIORITY_LOW) ? "Low" : \ (x == DRX_PRIORITY_LOW) ? "Low" : \
(x == DRX_PRIORITY_HIGH) ? "High" : \ (x == DRX_PRIORITY_HIGH) ? "High" : \
(x == DRX_PRIORITY_UNKNOWN) ? "Unknown" : \ (x == DRX_PRIORITY_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_MIRROR(x) ( \ #define DRX_STR_MIRROR(x) ( \
(x == DRX_MIRROR_NO) ? "Normal" : \ (x == DRX_MIRROR_NO) ? "Normal" : \
(x == DRX_MIRROR_YES) ? "Mirrored" : \ (x == DRX_MIRROR_YES) ? "Mirrored" : \
(x == DRX_MIRROR_AUTO) ? "Auto" : \ (x == DRX_MIRROR_AUTO) ? "Auto" : \
(x == DRX_MIRROR_UNKNOWN) ? "Unknown" : \ (x == DRX_MIRROR_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_CLASSIFICATION(x) ( \ #define DRX_STR_CLASSIFICATION(x) ( \
(x == DRX_CLASSIFICATION_GAUSS) ? "Gaussion" : \ (x == DRX_CLASSIFICATION_GAUSS) ? "Gaussion" : \
(x == DRX_CLASSIFICATION_HVY_GAUSS) ? "Heavy Gaussion" : \ (x == DRX_CLASSIFICATION_HVY_GAUSS) ? "Heavy Gaussion" : \
(x == DRX_CLASSIFICATION_COCHANNEL) ? "Co-channel" : \ (x == DRX_CLASSIFICATION_COCHANNEL) ? "Co-channel" : \
(x == DRX_CLASSIFICATION_STATIC) ? "Static echo" : \ (x == DRX_CLASSIFICATION_STATIC) ? "Static echo" : \
(x == DRX_CLASSIFICATION_MOVING) ? "Moving echo" : \ (x == DRX_CLASSIFICATION_MOVING) ? "Moving echo" : \
(x == DRX_CLASSIFICATION_ZERODB) ? "Zero dB echo" : \ (x == DRX_CLASSIFICATION_ZERODB) ? "Zero dB echo" : \
(x == DRX_CLASSIFICATION_UNKNOWN) ? "Unknown" : \ (x == DRX_CLASSIFICATION_UNKNOWN) ? "Unknown" : \
(x == DRX_CLASSIFICATION_AUTO) ? "Auto" : \ (x == DRX_CLASSIFICATION_AUTO) ? "Auto" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_INTERLEAVEMODE(x) ( \ #define DRX_STR_INTERLEAVEMODE(x) ( \
(x == DRX_INTERLEAVEMODE_I128_J1) ? "I128_J1" : \ (x == DRX_INTERLEAVEMODE_I128_J1) ? "I128_J1" : \
(x == DRX_INTERLEAVEMODE_I128_J1_V2) ? "I128_J1_V2" : \ (x == DRX_INTERLEAVEMODE_I128_J1_V2) ? "I128_J1_V2" : \
(x == DRX_INTERLEAVEMODE_I128_J2) ? "I128_J2" : \ (x == DRX_INTERLEAVEMODE_I128_J2) ? "I128_J2" : \
(x == DRX_INTERLEAVEMODE_I64_J2) ? "I64_J2" : \ (x == DRX_INTERLEAVEMODE_I64_J2) ? "I64_J2" : \
(x == DRX_INTERLEAVEMODE_I128_J3) ? "I128_J3" : \ (x == DRX_INTERLEAVEMODE_I128_J3) ? "I128_J3" : \
(x == DRX_INTERLEAVEMODE_I32_J4) ? "I32_J4" : \ (x == DRX_INTERLEAVEMODE_I32_J4) ? "I32_J4" : \
(x == DRX_INTERLEAVEMODE_I128_J4) ? "I128_J4" : \ (x == DRX_INTERLEAVEMODE_I128_J4) ? "I128_J4" : \
(x == DRX_INTERLEAVEMODE_I16_J8) ? "I16_J8" : \ (x == DRX_INTERLEAVEMODE_I16_J8) ? "I16_J8" : \
(x == DRX_INTERLEAVEMODE_I128_J5) ? "I128_J5" : \ (x == DRX_INTERLEAVEMODE_I128_J5) ? "I128_J5" : \
(x == DRX_INTERLEAVEMODE_I8_J16) ? "I8_J16" : \ (x == DRX_INTERLEAVEMODE_I8_J16) ? "I8_J16" : \
(x == DRX_INTERLEAVEMODE_I128_J6) ? "I128_J6" : \ (x == DRX_INTERLEAVEMODE_I128_J6) ? "I128_J6" : \
(x == DRX_INTERLEAVEMODE_RESERVED_11) ? "Reserved 11" : \ (x == DRX_INTERLEAVEMODE_RESERVED_11) ? "Reserved 11" : \
(x == DRX_INTERLEAVEMODE_I128_J7) ? "I128_J7" : \ (x == DRX_INTERLEAVEMODE_I128_J7) ? "I128_J7" : \
(x == DRX_INTERLEAVEMODE_RESERVED_13) ? "Reserved 13" : \ (x == DRX_INTERLEAVEMODE_RESERVED_13) ? "Reserved 13" : \
(x == DRX_INTERLEAVEMODE_I128_J8) ? "I128_J8" : \ (x == DRX_INTERLEAVEMODE_I128_J8) ? "I128_J8" : \
(x == DRX_INTERLEAVEMODE_RESERVED_15) ? "Reserved 15" : \ (x == DRX_INTERLEAVEMODE_RESERVED_15) ? "Reserved 15" : \
(x == DRX_INTERLEAVEMODE_I12_J17) ? "I12_J17" : \ (x == DRX_INTERLEAVEMODE_I12_J17) ? "I12_J17" : \
(x == DRX_INTERLEAVEMODE_I5_J4) ? "I5_J4" : \ (x == DRX_INTERLEAVEMODE_I5_J4) ? "I5_J4" : \
(x == DRX_INTERLEAVEMODE_B52_M240) ? "B52_M240" : \ (x == DRX_INTERLEAVEMODE_B52_M240) ? "B52_M240" : \
(x == DRX_INTERLEAVEMODE_B52_M720) ? "B52_M720" : \ (x == DRX_INTERLEAVEMODE_B52_M720) ? "B52_M720" : \
(x == DRX_INTERLEAVEMODE_B52_M48) ? "B52_M48" : \ (x == DRX_INTERLEAVEMODE_B52_M48) ? "B52_M48" : \
(x == DRX_INTERLEAVEMODE_B52_M0) ? "B52_M0" : \ (x == DRX_INTERLEAVEMODE_B52_M0) ? "B52_M0" : \
(x == DRX_INTERLEAVEMODE_UNKNOWN) ? "Unknown" : \ (x == DRX_INTERLEAVEMODE_UNKNOWN) ? "Unknown" : \
(x == DRX_INTERLEAVEMODE_AUTO) ? "Auto" : \ (x == DRX_INTERLEAVEMODE_AUTO) ? "Auto" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_LDPC(x) ( \ #define DRX_STR_LDPC(x) ( \
(x == DRX_LDPC_0_4) ? "0.4" : \ (x == DRX_LDPC_0_4) ? "0.4" : \
(x == DRX_LDPC_0_6) ? "0.6" : \ (x == DRX_LDPC_0_6) ? "0.6" : \
(x == DRX_LDPC_0_8) ? "0.8" : \ (x == DRX_LDPC_0_8) ? "0.8" : \
(x == DRX_LDPC_AUTO) ? "Auto" : \ (x == DRX_LDPC_AUTO) ? "Auto" : \
(x == DRX_LDPC_UNKNOWN) ? "Unknown" : \ (x == DRX_LDPC_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_CARRIER(x) ( \ #define DRX_STR_CARRIER(x) ( \
(x == DRX_CARRIER_MULTI) ? "Multi" : \ (x == DRX_CARRIER_MULTI) ? "Multi" : \
(x == DRX_CARRIER_SINGLE) ? "Single" : \ (x == DRX_CARRIER_SINGLE) ? "Single" : \
(x == DRX_CARRIER_AUTO) ? "Auto" : \ (x == DRX_CARRIER_AUTO) ? "Auto" : \
(x == DRX_CARRIER_UNKNOWN) ? "Unknown" : \ (x == DRX_CARRIER_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_FRAMEMODE(x) ( \ #define DRX_STR_FRAMEMODE(x) ( \
(x == DRX_FRAMEMODE_420) ? "420" : \ (x == DRX_FRAMEMODE_420) ? "420" : \
(x == DRX_FRAMEMODE_595) ? "595" : \ (x == DRX_FRAMEMODE_595) ? "595" : \
(x == DRX_FRAMEMODE_945) ? "945" : \ (x == DRX_FRAMEMODE_945) ? "945" : \
(x == DRX_FRAMEMODE_420_FIXED_PN) ? "420 with fixed PN" : \ (x == DRX_FRAMEMODE_420_FIXED_PN) ? "420 with fixed PN" : \
(x == DRX_FRAMEMODE_945_FIXED_PN) ? "945 with fixed PN" : \ (x == DRX_FRAMEMODE_945_FIXED_PN) ? "945 with fixed PN" : \
(x == DRX_FRAMEMODE_AUTO) ? "Auto" : \ (x == DRX_FRAMEMODE_AUTO) ? "Auto" : \
(x == DRX_FRAMEMODE_UNKNOWN) ? "Unknown" : \ (x == DRX_FRAMEMODE_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_PILOT(x) ( \ #define DRX_STR_PILOT(x) ( \
(x == DRX_PILOT_ON) ? "On" : \ (x == DRX_PILOT_ON) ? "On" : \
(x == DRX_PILOT_OFF) ? "Off" : \ (x == DRX_PILOT_OFF) ? "Off" : \
(x == DRX_PILOT_AUTO) ? "Auto" : \ (x == DRX_PILOT_AUTO) ? "Auto" : \
(x == DRX_PILOT_UNKNOWN) ? "Unknown" : \ (x == DRX_PILOT_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
/* TPS */ /* TPS */
#define DRX_STR_TPS_FRAME(x) ( \ #define DRX_STR_TPS_FRAME(x) ( \
(x == DRX_TPS_FRAME1) ? "Frame1" : \ (x == DRX_TPS_FRAME1) ? "Frame1" : \
(x == DRX_TPS_FRAME2) ? "Frame2" : \ (x == DRX_TPS_FRAME2) ? "Frame2" : \
(x == DRX_TPS_FRAME3) ? "Frame3" : \ (x == DRX_TPS_FRAME3) ? "Frame3" : \
(x == DRX_TPS_FRAME4) ? "Frame4" : \ (x == DRX_TPS_FRAME4) ? "Frame4" : \
(x == DRX_TPS_FRAME_UNKNOWN) ? "Unknown" : \ (x == DRX_TPS_FRAME_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
/* lock status */ /* lock status */
#define DRX_STR_LOCKSTATUS(x) ( \ #define DRX_STR_LOCKSTATUS(x) ( \
(x == DRX_NEVER_LOCK) ? "Never" : \ (x == DRX_NEVER_LOCK) ? "Never" : \
(x == DRX_NOT_LOCKED) ? "No" : \ (x == DRX_NOT_LOCKED) ? "No" : \
(x == DRX_LOCKED) ? "Locked" : \ (x == DRX_LOCKED) ? "Locked" : \
(x == DRX_LOCK_STATE_1) ? "Lock state 1" : \ (x == DRX_LOCK_STATE_1) ? "Lock state 1" : \
(x == DRX_LOCK_STATE_2) ? "Lock state 2" : \ (x == DRX_LOCK_STATE_2) ? "Lock state 2" : \
(x == DRX_LOCK_STATE_3) ? "Lock state 3" : \ (x == DRX_LOCK_STATE_3) ? "Lock state 3" : \
(x == DRX_LOCK_STATE_4) ? "Lock state 4" : \ (x == DRX_LOCK_STATE_4) ? "Lock state 4" : \
(x == DRX_LOCK_STATE_5) ? "Lock state 5" : \ (x == DRX_LOCK_STATE_5) ? "Lock state 5" : \
(x == DRX_LOCK_STATE_6) ? "Lock state 6" : \ (x == DRX_LOCK_STATE_6) ? "Lock state 6" : \
(x == DRX_LOCK_STATE_7) ? "Lock state 7" : \ (x == DRX_LOCK_STATE_7) ? "Lock state 7" : \
(x == DRX_LOCK_STATE_8) ? "Lock state 8" : \ (x == DRX_LOCK_STATE_8) ? "Lock state 8" : \
(x == DRX_LOCK_STATE_9) ? "Lock state 9" : \ (x == DRX_LOCK_STATE_9) ? "Lock state 9" : \
"(Invalid)") "(Invalid)")
/* version information , modules */ /* version information , modules */
#define DRX_STR_MODULE(x) ( \ #define DRX_STR_MODULE(x) ( \
(x == DRX_MODULE_DEVICE) ? "Device" : \ (x == DRX_MODULE_DEVICE) ? "Device" : \
(x == DRX_MODULE_MICROCODE) ? "Microcode" : \ (x == DRX_MODULE_MICROCODE) ? "Microcode" : \
(x == DRX_MODULE_DRIVERCORE) ? "CoreDriver" : \ (x == DRX_MODULE_DRIVERCORE) ? "CoreDriver" : \
(x == DRX_MODULE_DEVICEDRIVER) ? "DeviceDriver" : \ (x == DRX_MODULE_DEVICEDRIVER) ? "DeviceDriver" : \
(x == DRX_MODULE_BSP_I2C) ? "BSP I2C" : \ (x == DRX_MODULE_BSP_I2C) ? "BSP I2C" : \
(x == DRX_MODULE_BSP_TUNER) ? "BSP Tuner" : \ (x == DRX_MODULE_BSP_TUNER) ? "BSP Tuner" : \
(x == DRX_MODULE_BSP_HOST) ? "BSP Host" : \ (x == DRX_MODULE_BSP_HOST) ? "BSP Host" : \
(x == DRX_MODULE_DAP) ? "Data Access Protocol" : \ (x == DRX_MODULE_DAP) ? "Data Access Protocol" : \
(x == DRX_MODULE_UNKNOWN) ? "Unknown" : \ (x == DRX_MODULE_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_POWER_MODE(x) ( \ #define DRX_STR_POWER_MODE(x) ( \
(x == DRX_POWER_UP) ? "DRX_POWER_UP " : \ (x == DRX_POWER_UP) ? "DRX_POWER_UP " : \
(x == DRX_POWER_MODE_1) ? "DRX_POWER_MODE_1" : \ (x == DRX_POWER_MODE_1) ? "DRX_POWER_MODE_1" : \
(x == DRX_POWER_MODE_2) ? "DRX_POWER_MODE_2" : \ (x == DRX_POWER_MODE_2) ? "DRX_POWER_MODE_2" : \
(x == DRX_POWER_MODE_3) ? "DRX_POWER_MODE_3" : \ (x == DRX_POWER_MODE_3) ? "DRX_POWER_MODE_3" : \
(x == DRX_POWER_MODE_4) ? "DRX_POWER_MODE_4" : \ (x == DRX_POWER_MODE_4) ? "DRX_POWER_MODE_4" : \
(x == DRX_POWER_MODE_5) ? "DRX_POWER_MODE_5" : \ (x == DRX_POWER_MODE_5) ? "DRX_POWER_MODE_5" : \
(x == DRX_POWER_MODE_6) ? "DRX_POWER_MODE_6" : \ (x == DRX_POWER_MODE_6) ? "DRX_POWER_MODE_6" : \
(x == DRX_POWER_MODE_7) ? "DRX_POWER_MODE_7" : \ (x == DRX_POWER_MODE_7) ? "DRX_POWER_MODE_7" : \
(x == DRX_POWER_MODE_8) ? "DRX_POWER_MODE_8" : \ (x == DRX_POWER_MODE_8) ? "DRX_POWER_MODE_8" : \
(x == DRX_POWER_MODE_9) ? "DRX_POWER_MODE_9" : \ (x == DRX_POWER_MODE_9) ? "DRX_POWER_MODE_9" : \
(x == DRX_POWER_MODE_10) ? "DRX_POWER_MODE_10" : \ (x == DRX_POWER_MODE_10) ? "DRX_POWER_MODE_10" : \
(x == DRX_POWER_MODE_11) ? "DRX_POWER_MODE_11" : \ (x == DRX_POWER_MODE_11) ? "DRX_POWER_MODE_11" : \
(x == DRX_POWER_MODE_12) ? "DRX_POWER_MODE_12" : \ (x == DRX_POWER_MODE_12) ? "DRX_POWER_MODE_12" : \
(x == DRX_POWER_MODE_13) ? "DRX_POWER_MODE_13" : \ (x == DRX_POWER_MODE_13) ? "DRX_POWER_MODE_13" : \
(x == DRX_POWER_MODE_14) ? "DRX_POWER_MODE_14" : \ (x == DRX_POWER_MODE_14) ? "DRX_POWER_MODE_14" : \
(x == DRX_POWER_MODE_15) ? "DRX_POWER_MODE_15" : \ (x == DRX_POWER_MODE_15) ? "DRX_POWER_MODE_15" : \
(x == DRX_POWER_MODE_16) ? "DRX_POWER_MODE_16" : \ (x == DRX_POWER_MODE_16) ? "DRX_POWER_MODE_16" : \
(x == DRX_POWER_DOWN) ? "DRX_POWER_DOWN " : \ (x == DRX_POWER_DOWN) ? "DRX_POWER_DOWN " : \
"(Invalid)") "(Invalid)")
#define DRX_STR_OOB_STANDARD(x) ( \ #define DRX_STR_OOB_STANDARD(x) ( \
(x == DRX_OOB_MODE_A) ? "ANSI 55-1 " : \ (x == DRX_OOB_MODE_A) ? "ANSI 55-1 " : \
(x == DRX_OOB_MODE_B_GRADE_A) ? "ANSI 55-2 A" : \ (x == DRX_OOB_MODE_B_GRADE_A) ? "ANSI 55-2 A" : \
(x == DRX_OOB_MODE_B_GRADE_B) ? "ANSI 55-2 B" : \ (x == DRX_OOB_MODE_B_GRADE_B) ? "ANSI 55-2 B" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_AUD_STANDARD(x) ( \ #define DRX_STR_AUD_STANDARD(x) ( \
(x == DRX_AUD_STANDARD_BTSC) ? "BTSC" : \ (x == DRX_AUD_STANDARD_BTSC) ? "BTSC" : \
(x == DRX_AUD_STANDARD_A2) ? "A2" : \ (x == DRX_AUD_STANDARD_A2) ? "A2" : \
(x == DRX_AUD_STANDARD_EIAJ) ? "EIAJ" : \ (x == DRX_AUD_STANDARD_EIAJ) ? "EIAJ" : \
(x == DRX_AUD_STANDARD_FM_STEREO) ? "FM Stereo" : \ (x == DRX_AUD_STANDARD_FM_STEREO) ? "FM Stereo" : \
(x == DRX_AUD_STANDARD_AUTO) ? "Auto" : \ (x == DRX_AUD_STANDARD_AUTO) ? "Auto" : \
(x == DRX_AUD_STANDARD_M_MONO) ? "M-Standard Mono" : \ (x == DRX_AUD_STANDARD_M_MONO) ? "M-Standard Mono" : \
(x == DRX_AUD_STANDARD_D_K_MONO) ? "D/K Mono FM" : \ (x == DRX_AUD_STANDARD_D_K_MONO) ? "D/K Mono FM" : \
(x == DRX_AUD_STANDARD_BG_FM) ? "B/G-Dual Carrier FM (A2)" : \ (x == DRX_AUD_STANDARD_BG_FM) ? "B/G-Dual Carrier FM (A2)" : \
(x == DRX_AUD_STANDARD_D_K1) ? "D/K1-Dual Carrier FM" : \ (x == DRX_AUD_STANDARD_D_K1) ? "D/K1-Dual Carrier FM" : \
(x == DRX_AUD_STANDARD_D_K2) ? "D/K2-Dual Carrier FM" : \ (x == DRX_AUD_STANDARD_D_K2) ? "D/K2-Dual Carrier FM" : \
(x == DRX_AUD_STANDARD_D_K3) ? "D/K3-Dual Carrier FM" : \ (x == DRX_AUD_STANDARD_D_K3) ? "D/K3-Dual Carrier FM" : \
(x == DRX_AUD_STANDARD_BG_NICAM_FM) ? "B/G-NICAM-FM" : \ (x == DRX_AUD_STANDARD_BG_NICAM_FM) ? "B/G-NICAM-FM" : \
(x == DRX_AUD_STANDARD_L_NICAM_AM) ? "L-NICAM-AM" : \ (x == DRX_AUD_STANDARD_L_NICAM_AM) ? "L-NICAM-AM" : \
(x == DRX_AUD_STANDARD_I_NICAM_FM) ? "I-NICAM-FM" : \ (x == DRX_AUD_STANDARD_I_NICAM_FM) ? "I-NICAM-FM" : \
(x == DRX_AUD_STANDARD_D_K_NICAM_FM) ? "D/K-NICAM-FM" : \ (x == DRX_AUD_STANDARD_D_K_NICAM_FM) ? "D/K-NICAM-FM" : \
(x == DRX_AUD_STANDARD_UNKNOWN) ? "Unknown" : \ (x == DRX_AUD_STANDARD_UNKNOWN) ? "Unknown" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_AUD_STEREO(x) ( \ #define DRX_STR_AUD_STEREO(x) ( \
(x == true) ? "Stereo" : \ (x == true) ? "Stereo" : \
(x == false) ? "Mono" : \ (x == false) ? "Mono" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_AUD_SAP(x) ( \ #define DRX_STR_AUD_SAP(x) ( \
(x == true) ? "Present" : \ (x == true) ? "Present" : \
(x == false) ? "Not present" : \ (x == false) ? "Not present" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_AUD_CARRIER(x) ( \ #define DRX_STR_AUD_CARRIER(x) ( \
(x == true) ? "Present" : \ (x == true) ? "Present" : \
(x == false) ? "Not present" : \ (x == false) ? "Not present" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_AUD_RDS(x) ( \ #define DRX_STR_AUD_RDS(x) ( \
(x == true) ? "Available" : \ (x == true) ? "Available" : \
(x == false) ? "Not Available" : \ (x == false) ? "Not Available" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_AUD_NICAM_STATUS(x) ( \ #define DRX_STR_AUD_NICAM_STATUS(x) ( \
(x == DRX_AUD_NICAM_DETECTED) ? "Detected" : \ (x == DRX_AUD_NICAM_DETECTED) ? "Detected" : \
(x == DRX_AUD_NICAM_NOT_DETECTED) ? "Not detected" : \ (x == DRX_AUD_NICAM_NOT_DETECTED) ? "Not detected" : \
(x == DRX_AUD_NICAM_BAD) ? "Bad" : \ (x == DRX_AUD_NICAM_BAD) ? "Bad" : \
"(Invalid)") "(Invalid)")
#define DRX_STR_RDS_VALID(x) ( \ #define DRX_STR_RDS_VALID(x) ( \
(x == true) ? "Valid" : \ (x == true) ? "Valid" : \
(x == false) ? "Not Valid" : \ (x == false) ? "Not Valid" : \
"(Invalid)") "(Invalid)")
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
Access macros Access macros
@ -2371,29 +2371,29 @@ Access macros
/* Macros with device-specific handling are converted to CFG functions */ /* Macros with device-specific handling are converted to CFG functions */
#define DRX_ACCESSMACRO_SET(demod, value, cfg_name, data_type) \ #define DRX_ACCESSMACRO_SET(demod, value, cfg_name, data_type) \
do { \ do { \
struct drx_cfg config; \ struct drx_cfg config; \
data_type cfg_data; \ data_type cfg_data; \
config.cfg_type = cfg_name; \ config.cfg_type = cfg_name; \
config.cfg_data = &cfg_data; \ config.cfg_data = &cfg_data; \
cfg_data = value; \ cfg_data = value; \
drx_ctrl(demod, DRX_CTRL_SET_CFG, &config); \ drx_ctrl(demod, DRX_CTRL_SET_CFG, &config); \
} while (0) } while (0)
#define DRX_ACCESSMACRO_GET(demod, value, cfg_name, data_type, error_value) \ #define DRX_ACCESSMACRO_GET(demod, value, cfg_name, data_type, error_value) \
do { \ do { \
int cfg_status; \ int cfg_status; \
struct drx_cfg config; \ struct drx_cfg config; \
data_type cfg_data; \ data_type cfg_data; \
config.cfg_type = cfg_name; \ config.cfg_type = cfg_name; \
config.cfg_data = &cfg_data; \ config.cfg_data = &cfg_data; \
cfg_status = drx_ctrl(demod, DRX_CTRL_GET_CFG, &config); \ cfg_status = drx_ctrl(demod, DRX_CTRL_GET_CFG, &config); \
if (cfg_status == 0) { \ if (cfg_status == 0) { \
value = cfg_data; \ value = cfg_data; \
} else { \ } else { \
value = (data_type)error_value; \ value = (data_type)error_value; \
} \ } \
} while (0) } while (0)
/* Configuration functions for usage by Access (XS) Macros */ /* Configuration functions for usage by Access (XS) Macros */
@ -2408,9 +2408,9 @@ Access macros
/* Access Macros with device-specific handling */ /* Access Macros with device-specific handling */
#define DRX_SET_PRESET(d, x) \ #define DRX_SET_PRESET(d, x) \
DRX_ACCESSMACRO_SET((d), (x), DRX_XS_CFG_PRESET, char*) DRX_ACCESSMACRO_SET((d), (x), DRX_XS_CFG_PRESET, char*)
#define DRX_GET_PRESET(d, x) \ #define DRX_GET_PRESET(d, x) \
DRX_ACCESSMACRO_GET((d), (x), DRX_XS_CFG_PRESET, char*, "ERROR") DRX_ACCESSMACRO_GET((d), (x), DRX_XS_CFG_PRESET, char*, "ERROR")
#define DRX_SET_AUD_BTSC_DETECT(d, x) DRX_ACCESSMACRO_SET((d), (x), \ #define DRX_SET_AUD_BTSC_DETECT(d, x) DRX_ACCESSMACRO_SET((d), (x), \
DRX_XS_CFG_AUD_BTSC_DETECT, enum drx_aud_btsc_detect) DRX_XS_CFG_AUD_BTSC_DETECT, enum drx_aud_btsc_detect)

View file

@ -47,10 +47,6 @@
#ifndef __DRX_DRIVER_VERSION__H__ #ifndef __DRX_DRIVER_VERSION__H__
#define __DRX_DRIVER_VERSION__H__ INCLUDED #define __DRX_DRIVER_VERSION__H__ INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _REGISTERTABLE_ #ifdef _REGISTERTABLE_
#include <registertable.h> #include <registertable.h>
extern register_table_t drx_driver_version[]; extern register_table_t drx_driver_version[];
@ -69,9 +65,6 @@ extern "C" {
#define VERSION_MINOR 0 #define VERSION_MINOR 0
#define VERSION_PATCH 56 #define VERSION_PATCH 56
#ifdef __cplusplus
}
#endif
#endif /* __DRX_DRIVER_VERSION__H__ */ #endif /* __DRX_DRIVER_VERSION__H__ */
/* /*
* End of file (drx_driver_version.h) * End of file (drx_driver_version.h)

View file

@ -27,14 +27,10 @@
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/
/** DRXJ specific header file
* \file $Id: drxj.h,v 1.132 2009/12/22 12:13:48 danielg Exp $
* Authors: Dragan Savic, Milos Nikolic, Mihajlo Katona, Tao Ding, Paul Janssen
* \brief DRXJ specific header file
*
* \author Dragan Savic, Milos Nikolic, Mihajlo Katona, Tao Ding, Paul Janssen
*/ */
#ifndef __DRXJ_H__ #ifndef __DRXJ_H__
@ -46,10 +42,6 @@ INCLUDES
#include "drx_driver.h" #include "drx_driver.h"
#include "drx_dap_fasi.h" #include "drx_dap_fasi.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Check DRX-J specific dap condition */ /* Check DRX-J specific dap condition */
/* Multi master mode and short addr format only will not work. /* Multi master mode and short addr format only will not work.
RMW, CRC reset, broadcast and switching back to single master mode RMW, CRC reset, broadcast and switching back to single master mode
@ -322,7 +314,7 @@ struct drxj_cfg_oob_misc {
bool dig_gain_lock; bool dig_gain_lock;
bool ana_gain_lock; bool ana_gain_lock;
u8 state; u8 state;
}; };
/* /*
* Index of in array of coef * Index of in array of coef
@ -558,27 +550,6 @@ Access MACROS
#define DRXJ_ATTR_BTSC_DETECT(d) \ #define DRXJ_ATTR_BTSC_DETECT(d) \
(((struct drxj_data *)(d)->my_ext_attr)->aud_data.btsc_detect) (((struct drxj_data *)(d)->my_ext_attr)->aud_data.btsc_detect)
/**
* \brief Actual access macros
* \param d pointer to demod instance
* \param x value to set or to get
*
* SET macros must be used to set the value of an attribute.
* GET macros must be used to retrieve the value of an attribute.
* Depending on the value of DRX_USE_ACCESS_FUNCTIONS the macro's will be
* substituted by "direct-access-inline-code" or a function call.
*
*/
#define DRXJ_GET_BTSC_DETECT(d, x) \
do { \
(x) = DRXJ_ATTR_BTSC_DETECT((d); \
} while (0)
#define DRXJ_SET_BTSC_DETECT(d, x) \
do { \
DRXJ_ATTR_BTSC_DETECT(d) = (x); \
} while (0)
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
DEFINES DEFINES
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
@ -669,12 +640,12 @@ DEFINES
/* Convert OOB lock status to string */ /* Convert OOB lock status to string */
#define DRXJ_STR_OOB_LOCKSTATUS(x) ( \ #define DRXJ_STR_OOB_LOCKSTATUS(x) ( \
(x == DRX_NEVER_LOCK) ? "Never" : \ (x == DRX_NEVER_LOCK) ? "Never" : \
(x == DRX_NOT_LOCKED) ? "No" : \ (x == DRX_NOT_LOCKED) ? "No" : \
(x == DRX_LOCKED) ? "Locked" : \ (x == DRX_LOCKED) ? "Locked" : \
(x == DRX_LOCK_STATE_1) ? "AGC lock" : \ (x == DRX_LOCK_STATE_1) ? "AGC lock" : \
(x == DRX_LOCK_STATE_2) ? "sync lock" : \ (x == DRX_LOCK_STATE_2) ? "sync lock" : \
"(Invalid)") "(Invalid)")
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
ENUM ENUM
@ -706,7 +677,4 @@ Exported GLOBAL VARIABLES
/*------------------------------------------------------------------------- /*-------------------------------------------------------------------------
THE END THE END
-------------------------------------------------------------------------*/ -------------------------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif /* __DRXJ_H__ */ #endif /* __DRXJ_H__ */

View file

@ -47,10 +47,6 @@
#ifndef __DRXJ_MAP__H__ #ifndef __DRXJ_MAP__H__
#define __DRXJ_MAP__H__ INCLUDED #define __DRXJ_MAP__H__ INCLUDED
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _REGISTERTABLE_ #ifdef _REGISTERTABLE_
#include <registertable.h> #include <registertable.h>
extern register_table_t drxj_map[]; extern register_table_t drxj_map[];
@ -15056,7 +15052,4 @@ extern "C" {
#define VSB_EQTAP_RAM_EQTAP_RAM__M 0xFFF #define VSB_EQTAP_RAM_EQTAP_RAM__M 0xFFF
#define VSB_EQTAP_RAM_EQTAP_RAM__PRE 0x0 #define VSB_EQTAP_RAM_EQTAP_RAM__PRE 0x0
#ifdef __cplusplus
}
#endif
#endif #endif