Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285212
b: refs/heads/master
c: 2440f7a
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Nov 11, 2011
1 parent 28376c6 commit 22d18f0
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 39ce61a846c8e1fa00cb57ad5af021542e6e8403
refs/heads/master: 2440f7aff46af4187d0518e92adaddf475aa82b0
26 changes: 13 additions & 13 deletions trunk/drivers/media/common/tuners/xc5000.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,20 +628,12 @@ static void xc_debug_dump(struct xc5000_priv *priv)
dprintk(1, "*** Quality (0:<8dB, 7:>56dB) = %d\n", quality);
}

/*
* As defined on EN 300 429, the DVB-C roll-off factor is 0.15.
* So, the amount of the needed bandwith is given by:
* Bw = Symbol_rate * (1 + 0.15)
* As such, the maximum symbol rate supported by 6 MHz is given by:
* max_symbol_rate = 6 MHz / 1.15 = 5217391 Bauds
*/
#define MAX_SYMBOL_RATE_6MHz 5217391

static int xc5000_set_params(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params)
{
struct xc5000_priv *priv = fe->tuner_priv;
int ret;
u32 bw;

if (xc5000_is_firmware_loaded(fe) != XC_RESULT_SUCCESS) {
if (xc_load_fw_and_init_tuner(fe) != XC_RESULT_SUCCESS) {
Expand Down Expand Up @@ -707,11 +699,19 @@ static int xc5000_set_params(struct dvb_frontend *fe,
dprintk(1, "%s() QAM modulation\n", __func__);
priv->rf_mode = XC_RF_MODE_CABLE;
/*
* Using a 8MHz bandwidth sometimes fail
* with 6MHz-spaced channels, due to inter-carrier
* interference. So, use DTV6 firmware
* Using a higher bandwidth at the tuner filter may
* allow inter-carrier interference.
* So, determine the minimal channel spacing, in order
* to better adjust the tuner filter.
* According with ITU-T J.83, the bandwidth is given by:
* bw = Simbol Rate * (1 + roll_off), where the roll_off
* is equal to 0.15 for Annex A, and 0.13 for annex C
*/
if (params->u.qam.symbol_rate <= MAX_SYMBOL_RATE_6MHz) {
if (fe->dtv_property_cache.rolloff == ROLLOFF_13)
bw = (params->u.qam.symbol_rate * 13) / 10;
else
bw = (params->u.qam.symbol_rate * 15) / 10;
if (bw <= 6000000) {
priv->bandwidth = BANDWIDTH_6_MHZ;
priv->video_standard = DTV6;
priv->freq_hz = params->frequency - 1750000;
Expand Down
7 changes: 7 additions & 0 deletions trunk/drivers/media/dvb/frontends/drxk_hard.c
Original file line number Diff line number Diff line change
Expand Up @@ -6218,6 +6218,13 @@ static int drxk_set_parameters(struct dvb_frontend *fe,
return -EINVAL;
}

if (state->m_OperationMode == OM_QAM_ITU_A ||
state->m_OperationMode == OM_QAM_ITU_C) {
if (fe->dtv_property_cache.rolloff == ROLLOFF_13)
state->m_OperationMode = OM_QAM_ITU_C;
else
state->m_OperationMode = OM_QAM_ITU_A;
}

if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
Expand Down
32 changes: 17 additions & 15 deletions trunk/drivers/media/dvb/frontends/tda18271c2dd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1123,27 +1123,14 @@ static int release(struct dvb_frontend *fe)
return 0;
}

/*
* As defined on EN 300 429 Annex A and on ITU-T J.83 annex A, the DVB-C
* roll-off factor is 0.15.
* According with the specs, the amount of the needed bandwith is given by:
* Bw = Symbol_rate * (1 + 0.15)
* As such, the maximum symbol rate supported by 6 MHz is
* max_symbol_rate = 6 MHz / 1.15 = 5217391 Bauds
*NOTE: For ITU-T J.83 Annex C, the roll-off factor is 0.13. So:
* max_symbol_rate = 6 MHz / 1.13 = 5309735 Baud
* That means that an adjustment is needed for Japan,
* but, as currently DRX-K is hardcoded to Annex A, let's stick
* with 0.15 roll-off factor.
*/
#define MAX_SYMBOL_RATE_6MHz 5217391

static int set_params(struct dvb_frontend *fe,
struct dvb_frontend_parameters *params)
{
struct tda_state *state = fe->tuner_priv;
int status = 0;
int Standard;
u32 bw;

state->m_Frequency = params->frequency;

Expand All @@ -1161,8 +1148,23 @@ static int set_params(struct dvb_frontend *fe,
break;
}
else if (fe->ops.info.type == FE_QAM) {
if (params->u.qam.symbol_rate <= MAX_SYMBOL_RATE_6MHz)
/*
* Using a higher bandwidth at the tuner filter may
* allow inter-carrier interference.
* So, determine the minimal channel spacing, in order
* to better adjust the tuner filter.
* According with ITU-T J.83, the bandwidth is given by:
* bw = Simbol Rate * (1 + roll_off), where the roll_off
* is equal to 0.15 for Annex A, and 0.13 for annex C
*/
if (fe->dtv_property_cache.rolloff == ROLLOFF_13)
bw = (params->u.qam.symbol_rate * 13) / 10;
else
bw = (params->u.qam.symbol_rate * 15) / 10;
if (bw <= 6000000)
Standard = HF_DVBC_6MHZ;
else if (bw <= 7000000)
Standard = HF_DVBC_7MHZ;
else
Standard = HF_DVBC_8MHZ;
} else
Expand Down

0 comments on commit 22d18f0

Please sign in to comment.