diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-28 14:49:43 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-28 16:09:46 -0400 |
commit | cf845297d592339bcf0839298c4319633df3173a (patch) | |
tree | e845f7163fbbd20f61600c334e3fd7ed539bce30 /drivers/media | |
parent | 86cf786c04541c18febc897686a0d5bea29ce688 (diff) |
[media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz
Currently, the driver assumes that all QAM carriers are spaced with
8MHz. This is wrong, and may decrease QoS on Countries like Brazil,
that have DVB-C carriers with 6MHz-spaced.
Fortunately, both ITU-T J-83 and EN 300 429 specifies a way to
associate the symbol rate with the bandwidth needed for it.
For ITU-T J-83 2007 annex A, the maximum symbol rate for 6 MHz is:
6 MHz / 1.15 = 5217391 Bauds
For ITU-T J-83 2007 annex C, the maximum symbol rate for 6 MHz is:
6 MHz / 1.13 = 5309735 Bauds.
As this tuner is currently used only for DRX-K, and it is currently
hard-coded to annex A, I've opted to use the roll-off factor of 0.15,
instead of 0.13.
If we ever support annex C, the better would be to add a DVB S2API
call to allow changing between Annex A and C, and add the 0.13 roll-off
factor to it.
This code is currently being used on other frontends, so I think we
should later add a core function with this code, to warrant that
it will be properly implemented everywhere.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb/frontends/tda18271c2dd.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/drivers/media/dvb/frontends/tda18271c2dd.c b/drivers/media/dvb/frontends/tda18271c2dd.c index 2eb3a31a715c..0384e8da4f5e 100644 --- a/drivers/media/dvb/frontends/tda18271c2dd.c +++ b/drivers/media/dvb/frontends/tda18271c2dd.c | |||
@@ -1123,6 +1123,21 @@ static int release(struct dvb_frontend *fe) | |||
1123 | return 0; | 1123 | return 0; |
1124 | } | 1124 | } |
1125 | 1125 | ||
1126 | /* | ||
1127 | * As defined on EN 300 429 Annex A and on ITU-T J.83 annex A, the DVB-C | ||
1128 | * roll-off factor is 0.15. | ||
1129 | * According with the specs, the amount of the needed bandwith is given by: | ||
1130 | * Bw = Symbol_rate * (1 + 0.15) | ||
1131 | * As such, the maximum symbol rate supported by 6 MHz is | ||
1132 | * max_symbol_rate = 6 MHz / 1.15 = 5217391 Bauds | ||
1133 | *NOTE: For ITU-T J.83 Annex C, the roll-off factor is 0.13. So: | ||
1134 | * max_symbol_rate = 6 MHz / 1.13 = 5309735 Baud | ||
1135 | * That means that an adjustment is needed for Japan, | ||
1136 | * but, as currently DRX-K is hardcoded to Annex A, let's stick | ||
1137 | * with 0.15 roll-off factor. | ||
1138 | */ | ||
1139 | #define MAX_SYMBOL_RATE_6MHz 5217391 | ||
1140 | |||
1126 | static int set_params(struct dvb_frontend *fe, | 1141 | static int set_params(struct dvb_frontend *fe, |
1127 | struct dvb_frontend_parameters *params) | 1142 | struct dvb_frontend_parameters *params) |
1128 | { | 1143 | { |
@@ -1146,7 +1161,10 @@ static int set_params(struct dvb_frontend *fe, | |||
1146 | break; | 1161 | break; |
1147 | } | 1162 | } |
1148 | else if (fe->ops.info.type == FE_QAM) { | 1163 | else if (fe->ops.info.type == FE_QAM) { |
1149 | Standard = HF_DVBC_8MHZ; | 1164 | if (params->u.qam.symbol_rate <= MAX_SYMBOL_RATE_6MHz) |
1165 | Standard = HF_DVBC_6MHZ; | ||
1166 | else | ||
1167 | Standard = HF_DVBC_8MHZ; | ||
1150 | } else | 1168 | } else |
1151 | return -EINVAL; | 1169 | return -EINVAL; |
1152 | do { | 1170 | do { |