Commit 94d56ffa authored by Andreas Oberritter's avatar Andreas Oberritter Committed by Mauro Carvalho Chehab

[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: default avatarAndreas Oberritter <obi@linuxtv.org>
Signed-off-by: default avatarSteve Kerrison <steve@stevekerrison.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent aeb35ebc
...@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe) ...@@ -1148,10 +1148,9 @@ static void dtv_property_adv_params_sync(struct dvb_frontend *fe)
break; break;
} }
if(c->delivery_system == SYS_ISDBT) { /* Fake out a generic DVB-T request so we pass validation in the ioctl */
/* Fake out a generic DVB-T request so we pass validation in the ioctl */ if ((c->delivery_system == SYS_ISDBT) ||
p->frequency = c->frequency; (c->delivery_system == SYS_DVBT2)) {
p->inversion = c->inversion;
p->u.ofdm.constellation = QAM_AUTO; p->u.ofdm.constellation = QAM_AUTO;
p->u.ofdm.code_rate_HP = FEC_AUTO; p->u.ofdm.code_rate_HP = FEC_AUTO;
p->u.ofdm.code_rate_LP = FEC_AUTO; p->u.ofdm.code_rate_LP = FEC_AUTO;
...@@ -1324,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe, ...@@ -1324,6 +1323,9 @@ static int dtv_property_process_get(struct dvb_frontend *fe,
case DTV_ISDBS_TS_ID: case DTV_ISDBS_TS_ID:
tvp->u.data = fe->dtv_property_cache.isdbs_ts_id; tvp->u.data = fe->dtv_property_cache.isdbs_ts_id;
break; break;
case DTV_DVBT2_PLP_ID:
tvp->u.data = fe->dtv_property_cache.dvbt2_plp_id;
break;
default: default:
return -EINVAL; return -EINVAL;
} }
...@@ -1479,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe, ...@@ -1479,6 +1481,9 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
case DTV_ISDBS_TS_ID: case DTV_ISDBS_TS_ID:
fe->dtv_property_cache.isdbs_ts_id = tvp->u.data; fe->dtv_property_cache.isdbs_ts_id = tvp->u.data;
break; break;
case DTV_DVBT2_PLP_ID:
fe->dtv_property_cache.dvbt2_plp_id = tvp->u.data;
break;
default: default:
return -EINVAL; return -EINVAL;
} }
......
...@@ -358,6 +358,9 @@ struct dtv_frontend_properties { ...@@ -358,6 +358,9 @@ struct dtv_frontend_properties {
/* ISDB-T specifics */ /* ISDB-T specifics */
u32 isdbs_ts_id; u32 isdbs_ts_id;
/* DVB-T2 specifics */
u32 dvbt2_plp_id;
}; };
struct dvb_frontend { struct dvb_frontend {
......
...@@ -40,18 +40,6 @@ ...@@ -40,18 +40,6 @@
#undef warn #undef warn
#define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg) #define warn(f, arg...) printk(KERN_WARNING LOG_PREFIX": " f "\n" , ## arg)
/*
* FIXME: These are totally wrong and must be added properly to the API.
* Only temporary solution in order to get driver compile.
*/
#define SYS_DVBT2 SYS_DAB
#define TRANSMISSION_MODE_1K 0
#define TRANSMISSION_MODE_16K 0
#define TRANSMISSION_MODE_32K 0
#define GUARD_INTERVAL_1_128 0
#define GUARD_INTERVAL_19_128 0
#define GUARD_INTERVAL_19_256 0
struct reg_val_mask { struct reg_val_mask {
u32 reg; u32 reg;
u8 val; u8 val;
......
...@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode { ...@@ -175,14 +175,20 @@ typedef enum fe_transmit_mode {
TRANSMISSION_MODE_2K, TRANSMISSION_MODE_2K,
TRANSMISSION_MODE_8K, TRANSMISSION_MODE_8K,
TRANSMISSION_MODE_AUTO, TRANSMISSION_MODE_AUTO,
TRANSMISSION_MODE_4K TRANSMISSION_MODE_4K,
TRANSMISSION_MODE_1K,
TRANSMISSION_MODE_16K,
TRANSMISSION_MODE_32K,
} fe_transmit_mode_t; } fe_transmit_mode_t;
typedef enum fe_bandwidth { typedef enum fe_bandwidth {
BANDWIDTH_8_MHZ, BANDWIDTH_8_MHZ,
BANDWIDTH_7_MHZ, BANDWIDTH_7_MHZ,
BANDWIDTH_6_MHZ, BANDWIDTH_6_MHZ,
BANDWIDTH_AUTO BANDWIDTH_AUTO,
BANDWIDTH_5_MHZ,
BANDWIDTH_10_MHZ,
BANDWIDTH_1_712_MHZ,
} fe_bandwidth_t; } fe_bandwidth_t;
...@@ -191,7 +197,10 @@ typedef enum fe_guard_interval { ...@@ -191,7 +197,10 @@ typedef enum fe_guard_interval {
GUARD_INTERVAL_1_16, GUARD_INTERVAL_1_16,
GUARD_INTERVAL_1_8, GUARD_INTERVAL_1_8,
GUARD_INTERVAL_1_4, GUARD_INTERVAL_1_4,
GUARD_INTERVAL_AUTO GUARD_INTERVAL_AUTO,
GUARD_INTERVAL_1_128,
GUARD_INTERVAL_19_128,
GUARD_INTERVAL_19_256,
} fe_guard_interval_t; } fe_guard_interval_t;
...@@ -305,7 +314,9 @@ struct dvb_frontend_event { ...@@ -305,7 +314,9 @@ struct dvb_frontend_event {
#define DTV_ISDBS_TS_ID 42 #define DTV_ISDBS_TS_ID 42
#define DTV_MAX_COMMAND DTV_ISDBS_TS_ID #define DTV_DVBT2_PLP_ID 43
#define DTV_MAX_COMMAND DTV_DVBT2_PLP_ID
typedef enum fe_pilot { typedef enum fe_pilot {
PILOT_ON, PILOT_ON,
...@@ -337,6 +348,7 @@ typedef enum fe_delivery_system { ...@@ -337,6 +348,7 @@ typedef enum fe_delivery_system {
SYS_DMBTH, SYS_DMBTH,
SYS_CMMB, SYS_CMMB,
SYS_DAB, SYS_DAB,
SYS_DVBT2,
} fe_delivery_system_t; } fe_delivery_system_t;
struct dtv_cmds_h { struct dtv_cmds_h {
......
...@@ -24,6 +24,6 @@ ...@@ -24,6 +24,6 @@
#define _DVBVERSION_H_ #define _DVBVERSION_H_
#define DVB_API_VERSION 5 #define DVB_API_VERSION 5
#define DVB_API_VERSION_MINOR 2 #define DVB_API_VERSION_MINOR 3
#endif /*_DVBVERSION_H_*/ #endif /*_DVBVERSION_H_*/
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment