diff options
author | Andreas Oberritter <obi@linuxtv.org> | 2011-05-12 17:11:06 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 17:51:09 -0400 |
commit | 94d56ffa0a9bf11dfb602dae9223089e09a8e050 (patch) | |
tree | 8ce40da57ea05b6541a404713bb9a81f451e0d58 | |
parent | aeb35ebc5f54bcdd7163f5282a3f39bc48c75cae (diff) |
[media] DVB: Add basic API support for DVB-T2 and bump minor version
[steve@stevekerrison.com: Remove private definitions from cxd2820r that existed before API was defined]
Signed-off-by: Andreas Oberritter <obi@linuxtv.org>
Signed-off-by: Steve Kerrison <steve@stevekerrison.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.c | 13 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-core/dvb_frontend.h | 3 | ||||
-rw-r--r-- | drivers/media/dvb/frontends/cxd2820r_priv.h | 12 | ||||
-rw-r--r-- | include/linux/dvb/frontend.h | 20 | ||||
-rw-r--r-- | include/linux/dvb/version.h | 2 |
5 files changed, 29 insertions, 21 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index 95c3fec6ae40..3639edce65e0 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c | |||
@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe) | |||
1148 | break; | 1148 | break; |
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | if(c->delivery_system == SYS_ISDBT) { | 1151 | /* Fake out a generic DVB-T request so we pass validation in the ioctl */ |
1152 | /* Fake out a generic DVB-T request so we pass validation in the ioctl */ | 1152 | if ((c->delivery_system == SYS_ISDBT) || |
1153 | p->frequency = c->frequency; | 1153 | (c->delivery_system == SYS_DVBT2)) { |
1154 | p->inversion = c->inversion; | ||
1155 | p->u.ofdm.constellation = QAM_AUTO; | 1154 | p->u.ofdm.constellation = QAM_AUTO; |
1156 | p->u.ofdm.code_rate_HP = FEC_AUTO; | 1155 | p->u.ofdm.code_rate_HP = FEC_AUTO; |
1157 | p->u.ofdm.code_rate_LP = FEC_AUTO; | 1156 | p->u.ofdm.code_rate_LP = FEC_AUTO; |
@@ -1324,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe, | |||
1324 | case DTV_ISDBS_TS_ID: | 1323 | case DTV_ISDBS_TS_ID: |
1325 | tvp->u.data = fe->dtv_property_cache.isdbs_ts_id; | 1324 | tvp->u.data = fe->dtv_property_cache.isdbs_ts_id; |
1326 | break; | 1325 | break; |
1326 | case DTV_DVBT2_PLP_ID: | ||
1327 | tvp->u.data = fe->dtv_property_cache.dvbt2_plp_id; | ||
1328 | break; | ||
1327 | default: | 1329 | default: |
1328 | return -EINVAL; | 1330 | return -EINVAL; |
1329 | } | 1331 | } |
@@ -1479,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe, | |||
1479 | case DTV_ISDBS_TS_ID: | 1481 | case DTV_ISDBS_TS_ID: |
1480 | fe->dtv_property_cache.isdbs_ts_id = tvp->u.data; | 1482 | fe->dtv_property_cache.isdbs_ts_id = tvp->u.data; |
1481 | break; | 1483 | break; |
1484 | case DTV_DVBT2_PLP_ID: | ||
1485 | fe->dtv_property_cache.dvbt2_plp_id = tvp->u.data; | ||
1486 | break; | ||
1482 | default: | 1487 | default: |
1483 | return -EINVAL; | 1488 | return -EINVAL; |
1484 | } | 1489 | } |
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h index 3b860504bf04..5590eb6eb408 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.h +++ b/drivers/media/dvb/dvb-core/dvb_frontend.h | |||
@@ -358,6 +358,9 @@ struct dtv_frontend_properties { | |||
358 | 358 | ||
359 | /* ISDB-T specifics */ | 359 | /* ISDB-T specifics */ |
360 | u32 isdbs_ts_id; | 360 | u32 isdbs_ts_id; |
361 | |||
362 | /* DVB-T2 specifics */ | ||
363 | u32 dvbt2_plp_id; | ||
361 | }; | 364 | }; |
362 | 365 | ||
363 | struct dvb_frontend { | 366 | struct dvb_frontend { |
diff --git a/drivers/media/dvb/frontends/cxd2820r_priv.h b/drivers/media/dvb/frontends/cxd2820r_priv.h index d4e2e0b76c10..25adbeefa6d3 100644 --- a/drivers/media/dvb/frontends/cxd2820r_priv.h +++ b/drivers/media/dvb/frontends/cxd2820r_priv.h | |||
@@ -40,18 +40,6 @@ | |||
40 | #undef warn | 40 | #undef warn |
41 | #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) | 41 | #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) |
42 | 42 | ||
43 | /* | ||
44 | * FIXME: These are totally wrong and must be added properly to the API. | ||
45 | * Only temporary solution in order to get driver compile. | ||
46 | */ | ||
47 | #define SYS_DVBT2 SYS_DAB | ||
48 | #define TRANSMISSION_MODE_1K 0 | ||
49 | #define TRANSMISSION_MODE_16K 0 | ||
50 | #define TRANSMISSION_MODE_32K 0 | ||
51 | #define GUARD_INTERVAL_1_128 0 | ||
52 | #define GUARD_INTERVAL_19_128 0 | ||
53 | #define GUARD_INTERVAL_19_256 0 | ||
54 | |||
55 | struct reg_val_mask { | 43 | struct reg_val_mask { |
56 | u32 reg; | 44 | u32 reg; |
57 | u8 val; | 45 | u8 val; |
diff --git a/include/linux/dvb/frontend.h b/include/linux/dvb/frontend.h index 493a2bf85f62..36a3ed63f571 100644 --- a/include/linux/dvb/frontend.h +++ b/include/linux/dvb/frontend.h | |||
@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode { | |||
175 | TRANSMISSION_MODE_2K, | 175 | TRANSMISSION_MODE_2K, |
176 | TRANSMISSION_MODE_8K, | 176 | TRANSMISSION_MODE_8K, |
177 | TRANSMISSION_MODE_AUTO, | 177 | TRANSMISSION_MODE_AUTO, |
178 | TRANSMISSION_MODE_4K | 178 | TRANSMISSION_MODE_4K, |
179 | TRANSMISSION_MODE_1K, | ||
180 | TRANSMISSION_MODE_16K, | ||
181 | TRANSMISSION_MODE_32K, | ||
179 | } fe_transmit_mode_t; | 182 | } fe_transmit_mode_t; |
180 | 183 | ||
181 | typedef enum fe_bandwidth { | 184 | typedef enum fe_bandwidth { |
182 | BANDWIDTH_8_MHZ, | 185 | BANDWIDTH_8_MHZ, |
183 | BANDWIDTH_7_MHZ, | 186 | BANDWIDTH_7_MHZ, |
184 | BANDWIDTH_6_MHZ, | 187 | BANDWIDTH_6_MHZ, |
185 | BANDWIDTH_AUTO | 188 | BANDWIDTH_AUTO, |
189 | BANDWIDTH_5_MHZ, | ||
190 | BANDWIDTH_10_MHZ, | ||
191 | BANDWIDTH_1_712_MHZ, | ||
186 | } fe_bandwidth_t; | 192 | } fe_bandwidth_t; |
187 | 193 | ||
188 | 194 | ||
@@ -191,7 +197,10 @@ typedef enum fe_guard_interval { | |||
191 | GUARD_INTERVAL_1_16, | 197 | GUARD_INTERVAL_1_16, |
192 | GUARD_INTERVAL_1_8, | 198 | GUARD_INTERVAL_1_8, |
193 | GUARD_INTERVAL_1_4, | 199 | GUARD_INTERVAL_1_4, |
194 | GUARD_INTERVAL_AUTO | 200 | GUARD_INTERVAL_AUTO, |
201 | GUARD_INTERVAL_1_128, | ||
202 | GUARD_INTERVAL_19_128, | ||
203 | GUARD_INTERVAL_19_256, | ||
195 | } fe_guard_interval_t; | 204 | } fe_guard_interval_t; |
196 | 205 | ||
197 | 206 | ||
@@ -305,7 +314,9 @@ struct dvb_frontend_event { | |||
305 | 314 | ||
306 | #define DTV_ISDBS_TS_ID 42 | 315 | #define DTV_ISDBS_TS_ID 42 |
307 | 316 | ||
308 | #define DTV_MAX_COMMAND DTV_ISDBS_TS_ID | 317 | #define DTV_DVBT2_PLP_ID 43 |
318 | |||
319 | #define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID | ||
309 | 320 | ||
310 | typedef enum fe_pilot { | 321 | typedef enum fe_pilot { |
311 | PILOT_ON, | 322 | PILOT_ON, |
@@ -337,6 +348,7 @@ typedef enum fe_delivery_system { | |||
337 | SYS_DMBTH, | 348 | SYS_DMBTH, |
338 | SYS_CMMB, | 349 | SYS_CMMB, |
339 | SYS_DAB, | 350 | SYS_DAB, |
351 | SYS_DVBT2, | ||
340 | } fe_delivery_system_t; | 352 | } fe_delivery_system_t; |
341 | 353 | ||
342 | struct dtv_cmds_h { | 354 | struct dtv_cmds_h { |
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 5a7546c12688..1421cc84afaa 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 2 | 27 | #define DVB_API_VERSION_MINOR 3 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |