diff options
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 33 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.h | 2 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 27 |
3 files changed, 49 insertions, 13 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 6b914f9a03c5..7dffb48e55e5 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -773,9 +773,9 @@ struct dtv_cmds_h dtv_cmds[] = { | |||
773 | .cmd = DTV_FREQUENCY, | 773 | .cmd = DTV_FREQUENCY, |
774 | .set = 1, | 774 | .set = 1, |
775 | }, | 775 | }, |
776 | [DTV_BANDWIDTH] = { | 776 | [DTV_BANDWIDTH_HZ] = { |
777 | .name = "DTV_BANDWIDTH", | 777 | .name = "DTV_BANDWIDTH_HZ", |
778 | .cmd = DTV_BANDWIDTH, | 778 | .cmd = DTV_BANDWIDTH_HZ, |
779 | .set = 1, | 779 | .set = 1, |
780 | }, | 780 | }, |
781 | [DTV_MODULATION] = { | 781 | [DTV_MODULATION] = { |
@@ -954,7 +954,15 @@ void dtv_property_cache_sync(struct dvb_frontend *fe, struct dvb_frontend_parame | |||
954 | c->delivery_system = SYS_DVBC_ANNEX_AC; | 954 | c->delivery_system = SYS_DVBC_ANNEX_AC; |
955 | break; | 955 | break; |
956 | case FE_OFDM: | 956 | case FE_OFDM: |
957 | c->bandwidth = p->u.ofdm.bandwidth; | 957 | if (p->u.ofdm.bandwidth == BANDWIDTH_6_MHZ) |
958 | c->bandwidth_hz = 6000000; | ||
959 | else if (p->u.ofdm.bandwidth == BANDWIDTH_7_MHZ) | ||
960 | c->bandwidth_hz = 7000000; | ||
961 | else if (p->u.ofdm.bandwidth == BANDWIDTH_8_MHZ) | ||
962 | c->bandwidth_hz = 8000000; | ||
963 | else | ||
964 | /* Including BANDWIDTH_AUTO */ | ||
965 | c->bandwidth_hz = 0; | ||
958 | c->code_rate_HP = p->u.ofdm.code_rate_HP; | 966 | c->code_rate_HP = p->u.ofdm.code_rate_HP; |
959 | c->code_rate_LP = p->u.ofdm.code_rate_LP; | 967 | c->code_rate_LP = p->u.ofdm.code_rate_LP; |
960 | c->modulation = p->u.ofdm.constellation; | 968 | c->modulation = p->u.ofdm.constellation; |
@@ -1003,7 +1011,14 @@ void dtv_property_legacy_params_sync(struct dvb_frontend *fe) | |||
1003 | break; | 1011 | break; |
1004 | case FE_OFDM: | 1012 | case FE_OFDM: |
1005 | printk("%s() Preparing OFDM req\n", __FUNCTION__); | 1013 | printk("%s() Preparing OFDM req\n", __FUNCTION__); |
1006 | p->u.ofdm.bandwidth = c->bandwidth; | 1014 | if (c->bandwidth_hz == 6000000) |
1015 | p->u.ofdm.bandwidth = BANDWIDTH_6_MHZ; | ||
1016 | else if (c->bandwidth_hz == 7000000) | ||
1017 | p->u.ofdm.bandwidth = BANDWIDTH_7_MHZ; | ||
1018 | else if (c->bandwidth_hz == 8000000) | ||
1019 | p->u.ofdm.bandwidth = BANDWIDTH_8_MHZ; | ||
1020 | else | ||
1021 | p->u.ofdm.bandwidth = BANDWIDTH_AUTO; | ||
1007 | p->u.ofdm.code_rate_HP = c->code_rate_HP; | 1022 | p->u.ofdm.code_rate_HP = c->code_rate_HP; |
1008 | p->u.ofdm.code_rate_LP = c->code_rate_LP; | 1023 | p->u.ofdm.code_rate_LP = c->code_rate_LP; |
1009 | p->u.ofdm.constellation = c->modulation; | 1024 | p->u.ofdm.constellation = c->modulation; |
@@ -1118,8 +1133,8 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp, | |||
1118 | case DTV_MODULATION: | 1133 | case DTV_MODULATION: |
1119 | tvp->u.data = fe->dtv_property_cache.modulation; | 1134 | tvp->u.data = fe->dtv_property_cache.modulation; |
1120 | break; | 1135 | break; |
1121 | case DTV_BANDWIDTH: | 1136 | case DTV_BANDWIDTH_HZ: |
1122 | tvp->u.data = fe->dtv_property_cache.bandwidth; | 1137 | tvp->u.data = fe->dtv_property_cache.bandwidth_hz; |
1123 | break; | 1138 | break; |
1124 | case DTV_INVERSION: | 1139 | case DTV_INVERSION: |
1125 | tvp->u.data = fe->dtv_property_cache.inversion; | 1140 | tvp->u.data = fe->dtv_property_cache.inversion; |
@@ -1230,8 +1245,8 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp, | |||
1230 | case DTV_MODULATION: | 1245 | case DTV_MODULATION: |
1231 | fe->dtv_property_cache.modulation = tvp->u.data; | 1246 | fe->dtv_property_cache.modulation = tvp->u.data; |
1232 | break; | 1247 | break; |
1233 | case DTV_BANDWIDTH: | 1248 | case DTV_BANDWIDTH_HZ: |
1234 | fe->dtv_property_cache.bandwidth = tvp->u.data; | 1249 | fe->dtv_property_cache.bandwidth_hz = tvp->u.data; |
1235 | break; | 1250 | break; |
1236 | case DTV_INVERSION: | 1251 | case DTV_INVERSION: |
1237 | fe->dtv_property_cache.inversion = tvp->u.data; | 1252 | fe->dtv_property_cache.inversion = tvp->u.data; |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h index 784e8fe1d3bd..2fa37f5a0d9a 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h | |||
@@ -198,7 +198,7 @@ struct dtv_frontend_properties { | |||
198 | fe_spectral_inversion_t inversion; | 198 | fe_spectral_inversion_t inversion; |
199 | fe_code_rate_t fec_inner; | 199 | fe_code_rate_t fec_inner; |
200 | fe_transmit_mode_t transmission_mode; | 200 | fe_transmit_mode_t transmission_mode; |
201 | fe_bandwidth_t bandwidth; | 201 | u32 bandwidth_hz; /* 0 = AUTO */ |
202 | fe_guard_interval_t guard_interval; | 202 | fe_guard_interval_t guard_interval; |
203 | fe_hierarchy_t hierarchy; | 203 | fe_hierarchy_t hierarchy; |
204 | u32 symbol_rate; | 204 | u32 symbol_rate; |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 05bdec9bc5aa..4f3fd641ccb8 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -257,7 +257,12 @@ typedef enum dtv_cmd_types { | |||
257 | 257 | ||
258 | DTV_FREQUENCY, | 258 | DTV_FREQUENCY, |
259 | DTV_MODULATION, | 259 | DTV_MODULATION, |
260 | DTV_BANDWIDTH, | 260 | |
261 | /* XXX PB: I would like to have field which describes the | ||
262 | * bandwidth of a channel in Hz or kHz - maybe we can remove the | ||
263 | * DTV_BANDWIDTH now and put a compat layer */ | ||
264 | DTV_BANDWIDTH_HZ, | ||
265 | |||
261 | DTV_INVERSION, | 266 | DTV_INVERSION, |
262 | DTV_DISEQC_MASTER, | 267 | DTV_DISEQC_MASTER, |
263 | DTV_SYMBOL_RATE, | 268 | DTV_SYMBOL_RATE, |
@@ -276,18 +281,34 @@ typedef enum dtv_cmd_types { | |||
276 | /* New commands are always appended */ | 281 | /* New commands are always appended */ |
277 | DTV_DELIVERY_SYSTEM, | 282 | DTV_DELIVERY_SYSTEM, |
278 | 283 | ||
279 | /* ISDB-T */ | 284 | /* ISDB */ |
285 | /* maybe a dup of DTV_ISDB_SOUND_BROADCASTING_SUBCHANNEL_ID ??? */ | ||
280 | DTV_ISDB_SEGMENT_IDX, | 286 | DTV_ISDB_SEGMENT_IDX, |
281 | DTV_ISDB_SEGMENT_WIDTH, | 287 | DTV_ISDB_SEGMENT_WIDTH, /* 1, 3 or 13 ??? */ |
288 | |||
289 | /* the central segment can be received independently or 1/3 seg in SB-mode */ | ||
290 | DTV_ISDB_PARTIAL_RECEPTION, | ||
291 | /* sound broadcasting is used 0 = 13segment, 1 = 1 or 3 see DTV_ISDB_PARTIAL_RECEPTION */ | ||
292 | DTV_ISDB_SOUND_BROADCASTING, | ||
293 | |||
294 | /* only used in SB */ | ||
295 | /* determines the initial PRBS of the segment (to match with 13seg channel) */ | ||
296 | DTV_ISDB_SOUND_BROADCASTING_SUBCHANNEL_ID, | ||
297 | |||
282 | DTV_ISDB_LAYERA_FEC, | 298 | DTV_ISDB_LAYERA_FEC, |
283 | DTV_ISDB_LAYERA_MODULATION, | 299 | DTV_ISDB_LAYERA_MODULATION, |
284 | DTV_ISDB_LAYERA_SEGMENT_WIDTH, | 300 | DTV_ISDB_LAYERA_SEGMENT_WIDTH, |
301 | DTV_ISDB_LAYERA_TIME_INTERLEAVER, | ||
302 | |||
285 | DTV_ISDB_LAYERB_FEC, | 303 | DTV_ISDB_LAYERB_FEC, |
286 | DTV_ISDB_LAYERB_MODULATION, | 304 | DTV_ISDB_LAYERB_MODULATION, |
287 | DTV_ISDB_LAYERB_SEGMENT_WIDTH, | 305 | DTV_ISDB_LAYERB_SEGMENT_WIDTH, |
306 | DTV_ISDB_LAYERB_TIME_INTERLEAVING, | ||
307 | |||
288 | DTV_ISDB_LAYERC_FEC, | 308 | DTV_ISDB_LAYERC_FEC, |
289 | DTV_ISDB_LAYERC_MODULATION, | 309 | DTV_ISDB_LAYERC_MODULATION, |
290 | DTV_ISDB_LAYERC_SEGMENT_WIDTH, | 310 | DTV_ISDB_LAYERC_SEGMENT_WIDTH, |
311 | DTV_ISDB_LAYERC_TIME_INTERLEAVING, | ||
291 | 312 | ||
292 | } dtv_cmd_types_t; | 313 | } dtv_cmd_types_t; |
293 | 314 | ||