aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorSteven Toth <stoth@linuxtv.org>2008-09-13 15:56:34 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:05 -0400
commit75b7f9437b1cf63750bb58efaaeb6d72d04b3c7f (patch)
tree4f12ac2cbd75bfdb638618c9aff568305cc55c82 /drivers
parent4dd88bec368a6e4caa86a511f7adbc4c08992c5c (diff)
V4L/DVB (9007): S2API: Changed bandwidth to be expressed in HZ
Also added some compat code for the older API. Added more ISDB message/command suggestions, current not connected in dvb-core. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c33
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.h2
2 files changed, 25 insertions, 10 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;