aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@linuxtv.org>2011-05-12 17:11:06 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 17:51:09 -0400
commit94d56ffa0a9bf11dfb602dae9223089e09a8e050 (patch)
tree8ce40da57ea05b6541a404713bb9a81f451e0d58 /drivers/media/dvb
parentaeb35ebc5f54bcdd7163f5282a3f39bc48c75cae (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>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c13
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.h3
-rw-r--r--drivers/media/dvb/frontends/cxd2820r_priv.h12
3 files changed, 12 insertions, 16 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
363struct dvb_frontend { 366struct 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
55struct reg_val_mask { 43struct reg_val_mask {
56 u32 reg; 44 u32 reg;
57 u8 val; 45 u8 val;