aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2012-01-01 14:11:15 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-01-04 14:29:55 -0500
commita520ca97a51941f13a802b9e00ed27fc26e0ead6 (patch)
tree58558529aa281699b99db444034789376763a248
parent04be0f76a8d0ea8099a58227b4775bd398ea7088 (diff)
[media] dvb-core: Fix ISDB-T defaults
using -1 for ISDB-T parameters do the wrong thing. Fix it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c56
1 files changed, 28 insertions, 28 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index c1b3b30a2e6..ea3d0a37a33 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -951,17 +951,17 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
951 c->sectone = SEC_TONE_OFF; 951 c->sectone = SEC_TONE_OFF;
952 c->pilot = PILOT_AUTO; 952 c->pilot = PILOT_AUTO;
953 953
954 c->isdbt_partial_reception = -1; 954 c->isdbt_partial_reception = 0;
955 c->isdbt_sb_mode = -1; 955 c->isdbt_sb_mode = 0;
956 c->isdbt_sb_subchannel = -1; 956 c->isdbt_sb_subchannel = 0;
957 c->isdbt_sb_segment_idx = -1; 957 c->isdbt_sb_segment_idx = 0;
958 c->isdbt_sb_segment_count = -1; 958 c->isdbt_sb_segment_count = 0;
959 c->isdbt_layer_enabled = 0x7; 959 c->isdbt_layer_enabled = 0;
960 for (i = 0; i < 3; i++) { 960 for (i = 0; i < 3; i++) {
961 c->layer[i].fec = FEC_AUTO; 961 c->layer[i].fec = FEC_AUTO;
962 c->layer[i].modulation = QAM_AUTO; 962 c->layer[i].modulation = QAM_AUTO;
963 c->layer[i].interleaving = -1; 963 c->layer[i].interleaving = 0;
964 c->layer[i].segment_count = -1; 964 c->layer[i].segment_count = 0;
965 } 965 }
966 966
967 c->isdbs_ts_id = 0; 967 c->isdbs_ts_id = 0;
@@ -1528,28 +1528,28 @@ static int set_delivery_system(struct dvb_frontend *fe, u32 desired_system)
1528 __func__, delsys, desired_system); 1528 __func__, delsys, desired_system);
1529 1529
1530 /* 1530 /*
1531 * For now, uses it for ISDB-T, DMBTH and DVB-T2 1531 * For now, handles ISDB-T calls. More code may be needed here for the
1532 * For DVB-S2 and DVB-TURBO, assumes that the DVB-S parameters are enough. 1532 * other emulated stuff
1533 */ 1533 */
1534 if (type == DVBV3_OFDM) { 1534 if (type == DVBV3_OFDM) {
1535 c->modulation = QAM_AUTO; 1535 if (c->delivery_system == SYS_ISDBT) {
1536 c->code_rate_HP = FEC_AUTO; 1536 dprintk("%s() Using defaults for SYS_ISDBT\n",
1537 c->code_rate_LP = FEC_AUTO; 1537 __func__);
1538 c->transmission_mode = TRANSMISSION_MODE_AUTO; 1538 if (!c->bandwidth_hz)
1539 c->guard_interval = GUARD_INTERVAL_AUTO; 1539 c->bandwidth_hz = 6000000;
1540 c->hierarchy = HIERARCHY_AUTO; 1540
1541 1541 c->isdbt_partial_reception = 0;
1542 c->isdbt_partial_reception = -1; 1542 c->isdbt_sb_mode = 0;
1543 c->isdbt_sb_mode = -1; 1543 c->isdbt_sb_subchannel = 0;
1544 c->isdbt_sb_subchannel = -1; 1544 c->isdbt_sb_segment_idx = 0;
1545 c->isdbt_sb_segment_idx = -1; 1545 c->isdbt_sb_segment_count = 0;
1546 c->isdbt_sb_segment_count = -1; 1546 c->isdbt_layer_enabled = 0;
1547 c->isdbt_layer_enabled = 0x7; 1547 for (i = 0; i < 3; i++) {
1548 for (i = 0; i < 3; i++) { 1548 c->layer[i].fec = FEC_AUTO;
1549 c->layer[i].fec = FEC_AUTO; 1549 c->layer[i].modulation = QAM_AUTO;
1550 c->layer[i].modulation = QAM_AUTO; 1550 c->layer[i].interleaving = 0;
1551 c->layer[i].interleaving = -1; 1551 c->layer[i].segment_count = 0;
1552 c->layer[i].segment_count = -1; 1552 }
1553 } 1553 }
1554 } 1554 }
1555 return 0; 1555 return 0;