};
static void mb86a20s_layer_bitrate(struct dvb_frontend *fe, u32 layer,
- u32 modulation, u32 fec, u32 interleaving,
+ u32 modulation, u32 forward_error_correction,
+ u32 interleaving,
u32 segment)
{
struct mb86a20s_state *state = fe->demodulator_priv;
u32 rate;
- int m, f, i;
+ int mod, fec, guard;
/*
* If modulation/fec/interleaving is not detected, the default is
case DQPSK:
case QPSK:
default:
- m = 0;
+ mod = 0;
break;
case QAM_16:
- m = 1;
+ mod = 1;
break;
case QAM_64:
- m = 2;
+ mod = 2;
break;
}
- switch (fec) {
+ switch (forward_error_correction) {
default:
case FEC_1_2:
case FEC_AUTO:
- f = 0;
+ fec = 0;
break;
case FEC_2_3:
- f = 1;
+ fec = 1;
break;
case FEC_3_4:
- f = 2;
+ fec = 2;
break;
case FEC_5_6:
- f = 3;
+ fec = 3;
break;
case FEC_7_8:
- f = 4;
+ fec = 4;
break;
}
switch (interleaving) {
default:
case GUARD_INTERVAL_1_4:
- i = 0;
+ guard = 0;
break;
case GUARD_INTERVAL_1_8:
- i = 1;
+ guard = 1;
break;
case GUARD_INTERVAL_1_16:
- i = 2;
+ guard = 2;
break;
case GUARD_INTERVAL_1_32:
- i = 3;
+ guard = 3;
break;
}
/* Samples BER at BER_SAMPLING_RATE seconds */
- rate = isdbt_rate[m][f][i] * segment * BER_SAMPLING_RATE;
+ rate = isdbt_rate[mod][fec][guard] * segment * BER_SAMPLING_RATE;
/* Avoids sampling too quickly or to overflow the register */
if (rate < 256)
dev_dbg(&state->i2c->dev,
"%s: layer %c bitrate: %d kbps; counter = %d (0x%06x)\n",
- __func__, 'A' + layer, segment * isdbt_rate[m][f][i]/1000,
+ __func__, 'A' + layer,
+ segment * isdbt_rate[mod][fec][guard]/1000,
rate, rate);
state->estimated_rate[layer] = rate;
}
-
static int mb86a20s_get_frontend(struct dvb_frontend *fe)
{
struct mb86a20s_state *state = fe->demodulator_priv;