u32 r = 0;
if (x == 0)
- return (0);
+ return 0;
/* Scale x (normalize) */
/* computing y in log(x/y) = log(x) - log(y) */
if (y & ((u32) 1))
r++;
- return (r);
+ return r;
}
frac++;
}
- return (frac);
+ return frac;
}
/*============================================================================*/
result *= remainder_fac;
/* conversion from 1e-4 to 1e-2 */
- return ((result + 50) / 100);
+ return (result + 50) / 100;
}
#ifndef DRXJ_DIGITAL_ONLY
frac = 0;
remainder = 0;
- return (frac);
+ return frac;
}
if (D > N) {
}
}
- return (frac);
+ return frac;
}
#endif
word <<= 8;
word |= ((u16) addr[1]);
- return (word);
+ return word;
}
/*============================================================================*/
word <<= 8;
word |= ((u16) addr[3]);
- return (word);
+ return word;
}
/*============================================================================*/
i++;
block_data += (sizeof(u16));
}
- return ((u16) (crc_word >> 16));
+ return (u16)(crc_word >> 16);
}
#endif /* DRXJ_SPLIT_UCODE_UPLOAD */
retval = true;
}
- return (retval);
+ return retval;
}
/*============================================================================*/
if ((data == NULL) ||
(dev_addr == NULL) || ((datasize % 2) != 0) || ((datasize / 2) > 8)
) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Set up HI parameters to read or write n bytes */
return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* Reset power down flag (set one call only) */
ext_attr->hi_cfg_ctrl &= (~(SIO_HI_RA_RAM_PAR_5_CFG_SLEEP_ZZZ));
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
break;
}
}
/* if ( powerdown_cmd == true ) */
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
common_attr->osc_clock_freq = 4000;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*
break;
default:
/* Unknown device variant */
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
break;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
drxbsp_hst_sleep(10);
if (retry_count == DRXJ_MAX_RETRIES_POWERUP) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*----------------------------------------------------------------------------*/
/* check arguments */
if ((demod == NULL) || (cfg_data == NULL)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
common_attr->mpeg_cfg.invert_clk = cfg_data->invert_clk;
common_attr->mpeg_cfg.static_clk = cfg_data->static_clk;
common_attr->mpeg_cfg.bitrate = cfg_data->bitrate;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
rc = DRXJ_DAP.write_reg16func(dev_addr, FEC_OC_OCR_INVERT__A, 0, 0);
nr_bits = 4;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* ext_attr->constellation */
/* max_bit_rate = symbol_rate * nr_bits * coef */
/* coef = 188/204 */
rcn_rate = 0x005F64D4;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
break;
case DRX_STANDARD_ITU_A:
188;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* ext_attr->standard */
} else { /* insert_rs_byte == false */
rcn_rate = 0x005AEC1A;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
break;
case DRX_STANDARD_ITU_A:
204;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* ext_attr->standard */
}
}
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
bit_rate =
common_attr->sys_clock_freq * 1000 / (fec_oc_dto_period +
common_attr->mpeg_cfg.static_clk = cfg_data->static_clk;
common_attr->mpeg_cfg.bitrate = cfg_data->bitrate;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
u32 data64lo = 0;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
common_attr = demod->my_common_attr;
cfg_data->bitrate = (data64hi << 7) | (data64lo >> 25);
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
}
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
}
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
int rc;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
u16 data = 0;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
(enum drxj_mpeg_output_clock_rate) (data + 1);
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
u16 data = 0;
if (cfg_data == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
rc = DRXJ_DAP.write_reg16func(demod->my_i2c_dev_addr, SIO_TOP_COMM_KEY__A, 0xFABA, 0);
if (rc != DRX_STS_OK) {
cfg_data->i2c_speed = (enum drxji2c_speed) ((data >> 6) & 0x1);
cfg_data->xtal_freq = (enum drxj_xtal_freq) (data & 0x3);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*----------------------------------------------------------------------------*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*---------------------------------------------------------------------------*/
/* check arguments */
if (bridge_closed == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
hi_cmd.cmd = SIO_HI_RA_RAM_CMD_BRDCTRL;
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
/* check arguments */
if (smart_ant == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
if (bit_inverted != ext_attr->smart_ant_inverted
DRXJ_MAX_WAITTIME));
if (data & SIO_SA_TX_STATUS_BUSY__M) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* write to smart antenna configuration register */
WR16( dev_addr, SIO_SA_TX_COMMAND__A, data & (~SIO_SA_TX_COMMAND_TX_ENABLE__M) );
*/
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Write magic word to enable pdr reg write */
rc = DRXJ_DAP.write_reg16func(demod->my_i2c_dev_addr, SIO_TOP_COMM_KEY__A, 0x0000, 0);
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
static int scu_command(struct i2c_device_addr *dev_addr, struct drxjscu_cmd *cmd)
/* Check param */
if (cmd == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
/* Wait until SCU command interface is ready to receive command */
rc = DRXJ_DAP.read_reg16func(dev_addr, SCU_RAM_COMMAND__A, &cur_cmd, 0);
goto rw_error;
}
if (cur_cmd != DRX_SCU_READY) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
switch (cmd->parameter_len) {
break;
default:
/* this number of parameters is not supported */
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
rc = DRXJ_DAP.write_reg16func(dev_addr, SCU_RAM_COMMAND__A, cmd->command, 0);
if (rc != DRX_STS_OK) {
&& ((drxbsp_hst_clock() - start_time) < DRXJ_MAX_WAITTIME));
if (cur_cmd != DRX_SCU_READY) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* read results */
break;
default:
/* this number of parameters is not supported */
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* Check if an error was reported by SCU */
}
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
if ((data == NULL) ||
(dev_addr == NULL) || ((datasize % 2) != 0) || ((datasize / 2) > 16)
) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
set_param_parameters[1] = (u16) ADDR_AT_SCU_SPACE(addr);
return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
static int
ctrl_i2c_write_read(struct drx_demod_instance *demod, struct drxi2c_data *i2c_data)
{
- return (DRX_STS_FUNC_NOT_AVAILABLE);
+ return DRX_STS_FUNC_NOT_AVAILABLE;
}
/* -------------------------------------------------------------------------- */
*count = *count + 1;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
if (count < 2) {
/* TODO: implement fallback scenarios */
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
int rc;
if (enable == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
dev_addr = demod->my_i2c_dev_addr;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
}
ext_attr->pdr_safe_mode = *enable;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
struct drxj_data *ext_attr = (struct drxj_data *) NULL;
if (enabled == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
*enabled = ext_attr->pdr_safe_mode;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/**
break;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* for new AGC interface */
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
select_pos_image = false;
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
intermediate_freq = demod->my_common_attr->intermediate_freq;
sampling_frequency = demod->my_common_attr->sys_clock_freq / 3;
ext_attr->iqm_fs_rate_ofs = iqm_fs_rate_ofs;
ext_attr->pos_image = (bool) (rf_mirror ^ tuner_mirror ^ select_pos_image);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*sig_strength = (20 * if_gain / if_agc_sns);
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*packet_err = pkt_err;
last_pkt_err = data;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
#endif
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
symbol_frequency_ratio),
(symbol_frequency_ratio + (1 << 23)));
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*ctl_freq =
(s32) ((((data64lo >> 28) & 0xf) | (data64hi << 4)) * sign);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
else if (DRXJ_ISATVSTD(agc_settings->standard))
p_agc_settings = &(ext_attr->atv_if_agc_cfg);
else
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
/* Set TOP, only if IF-AGC is in AUTO mode */
if (p_agc_settings->ctrl_mode == DRX_AGC_CTRL_AUTO) {
}
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
} /* switch ( agcsettings->ctrl_mode ) */
}
break;
#endif
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
break;
#endif
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
agc_settings->standard = standard;
}
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
else if (DRXJ_ISATVSTD(agc_settings->standard))
p_agc_settings = &(ext_attr->atv_rf_agc_cfg);
else
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
/* Restore TOP */
if (p_agc_settings->ctrl_mode == DRX_AGC_CTRL_AUTO) {
}
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
} /* switch ( agcsettings->ctrl_mode ) */
/* always set the top to support configurations without if-loop */
break;
#endif
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
break;
#endif
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
agc_settings->standard = standard;
}
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
(u16) frac_times1e6(packet_errorsMant * (1 << packet_errorsExp),
(period * prescale * 77));
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
((bit_errors_exp > 2) ? 1 : 8));
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
frac_times1e6(data,
VSB_TOP_MEASUREMENT_PERIOD * SYMBOLS_PER_SEGMENT);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*ser = (u32) frac_times1e6((symb_errors_mant << symb_errors_exp) * 1000,
(period * prescale * 77318));
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*mer =
(u16) (log1_times100(21504) - log1_times100((data_hi << 6) / 52));
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
fec_bits_desired = 8 * symbol_rate;
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Parameters for Reed-Solomon Decoder */
fec_rs_plen = 128 * 7;
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr->fec_rs_plen = fec_rs_plen; /* for getSigQual */
fec_oc_snc_fail_period = 25805;
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
rc = DRXJ_DAP.write_reg16func(dev_addr, FEC_OC_SNC_FAIL_PERIOD__A, (u16)fec_oc_snc_fail_period, 0);
* (QAM_TOP_CONSTELLATION_QAM256 + 1);
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
if (qam_vd_period == 0) {
pr_err("error: qam_vd_period is zero!\n");
ext_attr->qam_vd_prescale = qam_vd_prescale;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
iqm_rc_stretch = IQM_RC_STRETCH_QAM_B_64;
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
} else {
adc_frequency = (common_attr->sys_clock_freq * 1000) / 3;
set_param_parameters[0] = channel->constellation; /* constellation */
set_param_parameters[1] = DRX_INTERLEAVEMODE_I12_J17; /* interleave mode */
} else {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
}
}
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* switch */
}
}
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
} else if (ext_attr->standard == DRX_STANDARD_ITU_C) {
rc = DRXJ_DAP.write_block_func(dev_addr, IQM_CF_TAP_RE0__A, sizeof(qam_c_taps), ((u8 *)qam_c_taps), 0);
}
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* switch */
}
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
);
/* Returning control to apllication ... */
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
((drxbsp_hst_clock() - start_time) <
(DRXJ_QAM_MAX_WAITTIME + timeout_ofs)));
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
channel->constellation = DRX_CONSTELLATION_AUTO;
} else {
channel->constellation = DRX_CONSTELLATION_AUTO;
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
/* restore starting value */
if (auto_flag)
channel->constellation = DRX_CONSTELLATION_AUTO;
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if (dev_addr == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* all reported errors are received in the */
rs_errors->nr_snc_par_fail_count =
nr_snc_par_fail_count & FEC_OC_SNC_FAIL_COUNT__M;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
qam_sl_sig_power = DRXJ_QAM_SL_SIG_POWER_QAM256 << 2;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* ------------------------------ */
sig_quality->packet_error = ((u16) pkt_errs);
#endif
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif /* #ifndef DRXJ_VSB_ONLY */
ext_attr->atv_cfg_changed_flags = 0;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
/* Check arguments */
if (output_cfg == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
(coef->coef1 < ((s16) ~(ATV_TOP_EQU1_EQU_C1__M >> 1))) ||
(coef->coef2 < ((s16) ~(ATV_TOP_EQU2_EQU_C2__M >> 1))) ||
(coef->coef3 < ((s16) ~(ATV_TOP_EQU3_EQU_C3__M >> 1)))) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
rc = atv_equ_coef_index(ext_attr->standard, &index);
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
coef->coef2 = ext_attr->atv_top_equ2[index];
coef->coef3 = ext_attr->atv_top_equ3[index];
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
((settings->peak_filter) < (s16) (-8)) ||
((settings->peak_filter) > (s16) (15)) ||
((settings->noise_filter) > 15)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* if */
ext_attr = (struct drxj_data *) demod->my_ext_attr;
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
settings->peak_filter = ext_attr->atv_top_vid_peak;
settings->noise_filter = ext_attr->atv_top_noise_th;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/* -------------------------------------------------------------------------- */
output_cfg->sif_attenuation = (enum drxjsif_attenuation) data;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
agc_status->if_agc_loop_gain =
((data & SCU_RAM_AGC_KI_IF__M) >> SCU_RAM_AGC_KI_IF__B);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
/* Audio, already done during set standard */
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif /* #ifndef DRXJ_DIGITAL_ONLY */
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
ext_attr->enable_cvbs_output = true;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* Common initializations FM & NTSC & B/G & D/K & I & L & LP */
}
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
ext_attr->detectedRDS = (bool)false;
}*/
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
channel->bandwidth = DRX_BANDWIDTH_UNKNOWN;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
channel->frequency -= offset;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
digital_min_gain = 0; /* taken from ucode */
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
break;
}
rc = DRXJ_DAP.read_reg16func(dev_addr, IQM_AF_AGC_RF__A, &rf_curr_gain, 0);
rf_weight * rf_strength + if_weight * if_strength);
*sig_strength /= 100;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* -------------------------------------------------------------------------- */
(30 * (0x7FF - quality_indicator)) / (0x7FF - 0x701);
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif /* DRXJ_DIGITAL_ONLY */
/* shift before writing to register */
nicam_prescaler <<= 8;
} else {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* end of setting NICAM Prescaler */
*lock_stat = DRX_NOT_LOCKED;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
sig_quality->indicator = 0;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
/* *oob_lock = scu_cmd.result[1]; */
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
symbol_rate = 1544000; /* bps */
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
rc = DRXJ_DAP.read_reg16func(dev_addr, ORX_CON_CTI_DTI_R__A, &data, 0);
*symbol_rate_offset = timing_offset;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
symbol_rate = 1544000;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* find FINE frequency offset */
else
*freq_offset = (coarse_freq_offset + fine_freq_offset);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*frequency = freq + freq_offset;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
*mer = 0;
break;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif /*#ifndef DRXJ_DIGITAL_ONLY */
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
}
ext_attr->oob_power_on = false;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
freq = oob_param->frequency;
if ((freq < 70000) || (freq > 130000))
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
freq = (freq - 50000) / 50;
{
ext_attr->oob_power_on = true;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
#endif
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
/* check arguments */
if (oob_status == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
if (ext_attr->oob_power_on == false)
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
rc = DRXJ_DAP.read_reg16func(dev_addr, ORX_DDC_OFO_SET_W__A, &data, 0);
if (rc != DRX_STS_OK) {
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
#endif
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
int rc;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
goto rw_error;
}
ext_attr->oob_pre_saw = *cfg_data;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
struct drxj_data *ext_attr = NULL;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
*cfg_data = ext_attr->oob_pre_saw;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
#endif
int rc;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
goto rw_error;
}
ext_attr->oob_lo_pow = *cfg_data;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
struct drxj_data *ext_attr = NULL;
if (cfg_data == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
*cfg_data = ext_attr->oob_lo_pow;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
#endif
/*============================================================================*/
break;
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* check bandwidth QAM annex B, NTSC and 8VSB */
case DRX_BANDWIDTH_8MHZ: /* fall through */
case DRX_BANDWIDTH_7MHZ: /* fall through */
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
}
#ifndef DRXJ_DIGITAL_ONLY
case DRX_BANDWIDTH_6MHZ: /* fall through */
case DRX_BANDWIDTH_UNKNOWN: /* fall through */
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
}
/* check bandwidth PAL/SECAM */
case DRX_BANDWIDTH_6MHZ: /* fall through */
case DRX_BANDWIDTH_7MHZ: /* fall through */
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
}
#endif
if (channel->symbolrate < min_symbol_rate ||
channel->symbolrate > max_symbol_rate) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
switch (channel->constellation) {
}
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
}
case DRX_CONSTELLATION_QAM64:
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
switch (channel->interleavemode) {
case DRX_INTERLEAVEMODE_AUTO:
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
}
break;
case DRX_BANDWIDTH_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
rc = ctrl_uio_write(demod, &uio1);
break;
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* switch(standard) */
tuner_mode |= TUNER_MODE_SWITCH;
#endif
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*== Re-tune, slow mode ===================================================*/
/* flag the packet error counter reset */
ext_attr->reset_pkt_err_acc = true;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*=============================================================================
default:
channel->constellation =
DRX_CONSTELLATION_UNKNOWN;
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
}
break;
#endif
case DRX_STANDARD_UNKNOWN: /* fall trough */
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
} /* switch ( standard ) */
if (lock_status == DRX_LOCKED) {
}
}
/* if ( lock_status == DRX_LOCKED ) */
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*=============================================================================
/* Check arguments */
if ((sig_quality == NULL) || (demod == NULL)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
break;
default:
sig_quality->MER = 0;
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
}
case DRX_CONSTELLATION_QAM16:
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
sig_quality->indicator =
mer2indicator(sig_quality->MER, min_mer, threshold_mer,
break;
#endif
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if ((demod == NULL) || (lock_stat == NULL)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
#endif
case DRX_STANDARD_UNKNOWN: /* fallthrough */
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/* define the SCU command paramters and execute the command */
*lock_stat = DRX_NEVER_LOCK;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if ((demod == NULL) || (complex_nr == NULL)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* read device info */
#endif
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if ((standard == NULL) || (demod == NULL)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
break;
case DRX_STANDARD_AUTO: /* fallthrough */
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/*
#endif
default:
ext_attr->standard = DRX_STANDARD_UNKNOWN;
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
break;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
/* Don't know what the standard is now ... try again */
ext_attr->standard = DRX_STANDARD_UNKNOWN;
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if (standard == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
(*standard) = ext_attr->standard;
do {
}
}while (0);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if (rate_offset == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
standard = ext_attr->standard;
case DRX_STANDARD_NTSC:
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* Check arguments */
if (mode == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* If already in requested power mode, do nothing */
if (common_attr->current_power_mode == *mode) {
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
switch (*mode) {
break;
default:
/* Unknow sleep mode */
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
break;
}
break;
case DRX_STANDARD_AUTO: /* fallthrough */
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
if (*mode != DRXJ_POWER_DOWN_MAIN_PATH) {
common_attr->current_power_mode = *mode;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
*version_list = &(ext_attr->v_list_elements[0]);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
*version_list = (struct drx_version_list *) (NULL);
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
}while (0);
}
- return (ret_status);
+ return ret_status;
rw_error:
common_attr->current_power_mode = org_power_mode;
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#ifdef DRXJ_SPLIT_UCODE_UPLOAD
bool is_mc_block_audio(u32 addr)
{
if ((addr == AUD_XFP_PRAM_4K__A) || (addr == AUD_XDFP_PRAM_4K__A)) {
- return (true);
+ return true;
}
- return (false);
+ return false;
}
/*============================================================================*/
mc_data,
0x0000) !=
DRX_STS_OK) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
};
break;
mc_dataBuffer,
0x0000) !=
DRX_STS_OK) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
result =
bytes_to_compare);
if (result != 0) {
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
};
curr_addr +=
ext_attr->flag_aud_mc_uploaded = false;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
#endif /* DRXJ_SPLIT_UCODE_UPLOAD */
/* Check arguments */
if ((sig_strength == NULL) || (demod == NULL)) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
ext_attr = (struct drxj_data *) demod->my_ext_attr;
#endif
case DRX_STANDARD_UNKNOWN: /* fallthrough */
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* TODO */
/* find out if signal strength is calculated in the same way for all standards */
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if (misc == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
}
misc->state = (state >> 8) & 0xff;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
#endif
/* check arguments */
if (misc == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
{
/* check arguments */
if (agc_settings == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
switch (agc_settings->ctrl_mode) {
case DRX_AGC_CTRL_OFF: /* fallthrough */
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Distpatch */
return set_agc_if(demod, agc_settings, true);
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*============================================================================*/
{
/* check arguments */
if (agc_settings == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Distpatch */
return get_agc_if(demod, agc_settings);
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*============================================================================*/
{
/* check arguments */
if (agc_settings == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
switch (agc_settings->ctrl_mode) {
case DRX_AGC_CTRL_OFF:
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Distpatch */
return set_agc_rf(demod, agc_settings, true);
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*============================================================================*/
{
/* check arguments */
if (agc_settings == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Distpatch */
return get_agc_rf(demod, agc_settings);
case DRX_STANDARD_UNKNOWN:
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*============================================================================*/
/* check arguments */
if (agc_internal == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
iqm_cf_gain = 56;
break;
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
break;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
rc = DRXJ_DAP.read_reg16func(dev_addr, IQM_CF_POW__A, &iqm_cf_power, 0);
- 2 * log1_times100(iqm_cf_amp)
- iqm_cf_gain - 120 * iqm_cf_scale_sh + 781);
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if ((pre_saw == NULL) || (pre_saw->reference > IQM_AF_PDREF__M)
) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* Only if standard is currently active */
break;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if (afe_gain == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
dev_addr = demod->my_i2c_dev_addr;
/* Do nothing */
break;
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
/* TODO PGA gain is also written by microcode (at least by QAM and VSB)
break;
#endif
default:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/* check arguments */
if (pre_saw == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
break;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*============================================================================*/
/* check arguments */
if (afe_gain == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
ext_attr = demod->my_ext_attr;
break;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}
/*============================================================================*/
int rc;
/* check arguments */
if (fec_meas_seq_count == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
rc = DRXJ_DAP.read_reg16func(demod->my_i2c_dev_addr, SCU_RAM_FEC_MEAS_COUNT__A, fec_meas_seq_count, 0);
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
{
int rc;
if (accum_cr_rs_cw_err == NULL) {
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
rc = DRXJ_DAP.read_reg32func(demod->my_i2c_dev_addr, SCU_RAM_FEC_ACCUM_CW_CORRECTED_LO__A, accum_cr_rs_cw_err, 0);
goto rw_error;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/**
int rc;
if (config == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
do {
u16 dummy;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
int rc;
if (config == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
do {
u16 dummy;
#endif
default:
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*=============================================================================
/* Check arguments */
if (demod->my_ext_attr == NULL)
- return (DRX_STS_INVALID_ARG);
+ return DRX_STS_INVALID_ARG;
dev_addr = demod->my_i2c_dev_addr;
ext_attr = (struct drxj_data *) demod->my_ext_attr;
/* refresh the audio data structure with default */
ext_attr->aud_data = drxj_default_aud_data_g;
- return (DRX_STS_OK);
+ return DRX_STS_OK;
rw_error:
common_attr->is_opened = false;
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
return DRX_STS_OK;
rw_error:
- return (DRX_STS_ERROR);
+ return DRX_STS_ERROR;
}
/*============================================================================*/
/*======================================================================*/
case DRX_CTRL_SET_CHANNEL:
{
- return ctrl_set_channel(demod, (struct drx_channel *) ctrl_data);
+ return ctrl_set_channel(demod, (struct drx_channel *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_GET_CHANNEL:
{
- return ctrl_get_channel(demod, (struct drx_channel *) ctrl_data);
+ return ctrl_get_channel(demod, (struct drx_channel *)ctrl_data);
}
break;
/*======================================================================*/
/*======================================================================*/
case DRX_CTRL_CONSTEL:
{
- return ctrl_constel(demod, (struct drx_complex *) ctrl_data);
+ return ctrl_constel(demod, (struct drx_complex *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_SET_CFG:
{
- return ctrl_set_cfg(demod, (struct drx_cfg *) ctrl_data);
+ return ctrl_set_cfg(demod, (struct drx_cfg *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_GET_CFG:
{
- return ctrl_get_cfg(demod, (struct drx_cfg *) ctrl_data);
+ return ctrl_get_cfg(demod, (struct drx_cfg *)ctrl_data);
}
break;
/*======================================================================*/
/*======================================================================*/
case DRX_CTRL_POWER_MODE:
{
- return ctrl_power_mode(demod, (enum drx_power_mode *) ctrl_data);
+ return ctrl_power_mode(demod, (enum drx_power_mode *)ctrl_data);
}
break;
/*======================================================================*/
/*======================================================================*/
case DRX_CTRL_SET_OOB:
{
- return ctrl_set_oob(demod, (struct drxoob *) ctrl_data);
+ return ctrl_set_oob(demod, (struct drxoob *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_GET_OOB:
{
- return ctrl_get_oob(demod, (struct drxoob_status *) ctrl_data);
+ return ctrl_get_oob(demod, (struct drxoob_status *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_SET_UIO_CFG:
{
- return ctrl_set_uio_cfg(demod, (struct drxuio_cfg *) ctrl_data);
+ return ctrl_set_uio_cfg(demod, (struct drxuio_cfg *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_GET_UIO_CFG:
{
- return CtrlGetuio_cfg(demod, (struct drxuio_cfg *) ctrl_data);
+ return CtrlGetuio_cfg(demod, (struct drxuio_cfg *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_UIO_READ:
{
- return ctrl_uio_read(demod, (struct drxuio_data *) ctrl_data);
+ return ctrl_uio_read(demod, (struct drxuio_data *)ctrl_data);
}
break;
/*======================================================================*/
case DRX_CTRL_UIO_WRITE:
{
- return ctrl_uio_write(demod, (struct drxuio_data *) ctrl_data);
+ return ctrl_uio_write(demod, (struct drxuio_data *)ctrl_data);
}
break;
/*======================================================================*/
/*======================================================================*/
case DRX_CTRL_AUD_BEEP:
{
- return aud_ctrl_beep(demod, (struct drx_aud_beep *) ctrl_data);
+ return aud_ctrl_beep(demod, (struct drx_aud_beep *)ctrl_data);
}
break;
}
break;
default:
- return (DRX_STS_FUNC_NOT_AVAILABLE);
+ return DRX_STS_FUNC_NOT_AVAILABLE;
}
- return (DRX_STS_OK);
+ return DRX_STS_OK;
}