Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113968
b: refs/heads/master
c: 75b7f94
h: refs/heads/master
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 12, 2008
1 parent 598499f commit cda942f
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 14 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: 4dd88bec368a6e4caa86a511f7adbc4c08992c5c
refs/heads/master: 75b7f9437b1cf63750bb58efaaeb6d72d04b3c7f
33 changes: 24 additions & 9 deletions trunk/drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,9 +773,9 @@ struct dtv_cmds_h dtv_cmds[] = {
.cmd = DTV_FREQUENCY,
.set = 1,
},
[DTV_BANDWIDTH] = {
.name = "DTV_BANDWIDTH",
.cmd = DTV_BANDWIDTH,
[DTV_BANDWIDTH_HZ] = {
.name = "DTV_BANDWIDTH_HZ",
.cmd = DTV_BANDWIDTH_HZ,
.set = 1,
},
[DTV_MODULATION] = {
Expand Down Expand Up @@ -954,7 +954,15 @@ void dtv_property_cache_sync(struct dvb_frontend *fe, struct dvb_frontend_parame
c->delivery_system = SYS_DVBC_ANNEX_AC;
break;
case FE_OFDM:
c->bandwidth = p->u.ofdm.bandwidth;
if (p->u.ofdm.bandwidth == BANDWIDTH_6_MHZ)
c->bandwidth_hz = 6000000;
else if (p->u.ofdm.bandwidth == BANDWIDTH_7_MHZ)
c->bandwidth_hz = 7000000;
else if (p->u.ofdm.bandwidth == BANDWIDTH_8_MHZ)
c->bandwidth_hz = 8000000;
else
/* Including BANDWIDTH_AUTO */
c->bandwidth_hz = 0;
c->code_rate_HP = p->u.ofdm.code_rate_HP;
c->code_rate_LP = p->u.ofdm.code_rate_LP;
c->modulation = p->u.ofdm.constellation;
Expand Down Expand Up @@ -1003,7 +1011,14 @@ void dtv_property_legacy_params_sync(struct dvb_frontend *fe)
break;
case FE_OFDM:
printk("%s() Preparing OFDM req\n", __FUNCTION__);
p->u.ofdm.bandwidth = c->bandwidth;
if (c->bandwidth_hz == 6000000)
p->u.ofdm.bandwidth = BANDWIDTH_6_MHZ;
else if (c->bandwidth_hz == 7000000)
p->u.ofdm.bandwidth = BANDWIDTH_7_MHZ;
else if (c->bandwidth_hz == 8000000)
p->u.ofdm.bandwidth = BANDWIDTH_8_MHZ;
else
p->u.ofdm.bandwidth = BANDWIDTH_AUTO;
p->u.ofdm.code_rate_HP = c->code_rate_HP;
p->u.ofdm.code_rate_LP = c->code_rate_LP;
p->u.ofdm.constellation = c->modulation;
Expand Down Expand Up @@ -1118,8 +1133,8 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,
case DTV_MODULATION:
tvp->u.data = fe->dtv_property_cache.modulation;
break;
case DTV_BANDWIDTH:
tvp->u.data = fe->dtv_property_cache.bandwidth;
case DTV_BANDWIDTH_HZ:
tvp->u.data = fe->dtv_property_cache.bandwidth_hz;
break;
case DTV_INVERSION:
tvp->u.data = fe->dtv_property_cache.inversion;
Expand Down Expand Up @@ -1230,8 +1245,8 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp,
case DTV_MODULATION:
fe->dtv_property_cache.modulation = tvp->u.data;
break;
case DTV_BANDWIDTH:
fe->dtv_property_cache.bandwidth = tvp->u.data;
case DTV_BANDWIDTH_HZ:
fe->dtv_property_cache.bandwidth_hz = tvp->u.data;
break;
case DTV_INVERSION:
fe->dtv_property_cache.inversion = tvp->u.data;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/dvb-core/dvb_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ struct dtv_frontend_properties {
fe_spectral_inversion_t inversion;
fe_code_rate_t fec_inner;
fe_transmit_mode_t transmission_mode;
fe_bandwidth_t bandwidth;
u32 bandwidth_hz; /* 0 = AUTO */
fe_guard_interval_t guard_interval;
fe_hierarchy_t hierarchy;
u32 symbol_rate;
Expand Down
27 changes: 24 additions & 3 deletions trunk/include/linux/dvb/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,12 @@ typedef enum dtv_cmd_types {

DTV_FREQUENCY,
DTV_MODULATION,
DTV_BANDWIDTH,

/* XXX PB: I would like to have field which describes the
* bandwidth of a channel in Hz or kHz - maybe we can remove the
* DTV_BANDWIDTH now and put a compat layer */
DTV_BANDWIDTH_HZ,

DTV_INVERSION,
DTV_DISEQC_MASTER,
DTV_SYMBOL_RATE,
Expand All @@ -276,18 +281,34 @@ typedef enum dtv_cmd_types {
/* New commands are always appended */
DTV_DELIVERY_SYSTEM,

/* ISDB-T */
/* ISDB */
/* maybe a dup of DTV_ISDB_SOUND_BROADCASTING_SUBCHANNEL_ID ??? */
DTV_ISDB_SEGMENT_IDX,
DTV_ISDB_SEGMENT_WIDTH,
DTV_ISDB_SEGMENT_WIDTH, /* 1, 3 or 13 ??? */

/* the central segment can be received independently or 1/3 seg in SB-mode */
DTV_ISDB_PARTIAL_RECEPTION,
/* sound broadcasting is used 0 = 13segment, 1 = 1 or 3 see DTV_ISDB_PARTIAL_RECEPTION */
DTV_ISDB_SOUND_BROADCASTING,

/* only used in SB */
/* determines the initial PRBS of the segment (to match with 13seg channel) */
DTV_ISDB_SOUND_BROADCASTING_SUBCHANNEL_ID,

DTV_ISDB_LAYERA_FEC,
DTV_ISDB_LAYERA_MODULATION,
DTV_ISDB_LAYERA_SEGMENT_WIDTH,
DTV_ISDB_LAYERA_TIME_INTERLEAVER,

DTV_ISDB_LAYERB_FEC,
DTV_ISDB_LAYERB_MODULATION,
DTV_ISDB_LAYERB_SEGMENT_WIDTH,
DTV_ISDB_LAYERB_TIME_INTERLEAVING,

DTV_ISDB_LAYERC_FEC,
DTV_ISDB_LAYERC_MODULATION,
DTV_ISDB_LAYERC_SEGMENT_WIDTH,
DTV_ISDB_LAYERC_TIME_INTERLEAVING,

} dtv_cmd_types_t;

Expand Down

0 comments on commit cda942f

Please sign in to comment.