Commit 56f0680a authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

V4L/DVB (8995): S2API: tv_ / TV_ to dtv_ / DTV_ namespace changes

The group preferred dtv_ over tv_, this implements it.
Signed-off-by: default avatarSteven Toth <stoth@linuxtv.org>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent cc8c4f3a
...@@ -755,235 +755,235 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe, ...@@ -755,235 +755,235 @@ static int dvb_frontend_check_parameters(struct dvb_frontend *fe,
return 0; return 0;
} }
struct tv_cmds_h tv_cmds[] = { struct dtv_cmds_h dtv_cmds[] = {
[TV_SEQ_UNDEFINED] = { [DTV_SEQ_UNDEFINED] = {
.name = "TV_SEQ_UNDEFINED", .name = "DTV_SEQ_UNDEFINED",
.cmd = TV_SEQ_UNDEFINED, .cmd = DTV_SEQ_UNDEFINED,
.set = 1, .set = 1,
}, },
[TV_SEQ_START] = { [DTV_SEQ_START] = {
.name = "TV_SEQ_START", .name = "DTV_SEQ_START",
.cmd = TV_SEQ_START, .cmd = DTV_SEQ_START,
.set = 1, .set = 1,
}, },
[TV_SEQ_CONTINUE] = { [DTV_SEQ_CONTINUE] = {
.name = "TV_SEQ_CONTINUE", .name = "DTV_SEQ_CONTINUE",
.cmd = TV_SEQ_CONTINUE, .cmd = DTV_SEQ_CONTINUE,
.set = 1, .set = 1,
}, },
[TV_SEQ_COMPLETE] = { [DTV_SEQ_COMPLETE] = {
.name = "TV_SEQ_COMPLETE", .name = "DTV_SEQ_COMPLETE",
.cmd = TV_SEQ_COMPLETE, .cmd = DTV_SEQ_COMPLETE,
.set = 1, .set = 1,
}, },
[TV_SEQ_TERMINATE] = { [DTV_SEQ_TERMINATE] = {
.name = "TV_SEQ_TERMINATE", .name = "DTV_SEQ_TERMINATE",
.cmd = TV_SEQ_TERMINATE, .cmd = DTV_SEQ_TERMINATE,
.set = 1, .set = 1,
}, },
/* Set */ /* Set */
[TV_SET_FREQUENCY] = { [DTV_SET_FREQUENCY] = {
.name = "TV_SET_FREQUENCY", .name = "DTV_SET_FREQUENCY",
.cmd = TV_SET_FREQUENCY, .cmd = DTV_SET_FREQUENCY,
.set = 1, .set = 1,
}, },
[TV_SET_BANDWIDTH] = { [DTV_SET_BANDWIDTH] = {
.name = "TV_SET_BANDWIDTH", .name = "DTV_SET_BANDWIDTH",
.cmd = TV_SET_BANDWIDTH, .cmd = DTV_SET_BANDWIDTH,
.set = 1, .set = 1,
}, },
[TV_SET_MODULATION] = { [DTV_SET_MODULATION] = {
.name = "TV_SET_MODULATION", .name = "DTV_SET_MODULATION",
.cmd = TV_SET_MODULATION, .cmd = DTV_SET_MODULATION,
.set = 1, .set = 1,
}, },
[TV_SET_INVERSION] = { [DTV_SET_INVERSION] = {
.name = "TV_SET_INVERSION", .name = "DTV_SET_INVERSION",
.cmd = TV_SET_INVERSION, .cmd = DTV_SET_INVERSION,
.set = 1, .set = 1,
}, },
[TV_SET_DISEQC_MASTER] = { [DTV_SET_DISEQC_MASTER] = {
.name = "TV_SET_DISEQC_MASTER", .name = "DTV_SET_DISEQC_MASTER",
.cmd = TV_SET_DISEQC_MASTER, .cmd = DTV_SET_DISEQC_MASTER,
.set = 1, .set = 1,
.buffer = 1, .buffer = 1,
}, },
[TV_SET_SYMBOLRATE] = { [DTV_SET_SYMBOLRATE] = {
.name = "TV_SET_SYMBOLRATE", .name = "DTV_SET_SYMBOLRATE",
.cmd = TV_SET_SYMBOLRATE, .cmd = DTV_SET_SYMBOLRATE,
.set = 1, .set = 1,
}, },
[TV_SET_INNERFEC] = { [DTV_SET_INNERFEC] = {
.name = "TV_SET_INNERFEC", .name = "DTV_SET_INNERFEC",
.cmd = TV_SET_INNERFEC, .cmd = DTV_SET_INNERFEC,
.set = 1, .set = 1,
}, },
[TV_SET_VOLTAGE] = { [DTV_SET_VOLTAGE] = {
.name = "TV_SET_VOLTAGE", .name = "DTV_SET_VOLTAGE",
.cmd = TV_SET_VOLTAGE, .cmd = DTV_SET_VOLTAGE,
.set = 1, .set = 1,
}, },
[TV_SET_TONE] = { [DTV_SET_TONE] = {
.name = "TV_SET_TONE", .name = "DTV_SET_TONE",
.cmd = TV_SET_TONE, .cmd = DTV_SET_TONE,
.set = 1, .set = 1,
}, },
[TV_SET_PILOT] = { [DTV_SET_PILOT] = {
.name = "TV_SET_PILOT", .name = "DTV_SET_PILOT",
.cmd = TV_SET_PILOT, .cmd = DTV_SET_PILOT,
.set = 1, .set = 1,
}, },
[TV_SET_ROLLOFF] = { [DTV_SET_ROLLOFF] = {
.name = "TV_SET_ROLLOFF", .name = "DTV_SET_ROLLOFF",
.cmd = TV_SET_ROLLOFF, .cmd = DTV_SET_ROLLOFF,
.set = 1, .set = 1,
}, },
[TV_SET_DELIVERY_SYSTEM] = { [DTV_SET_DELIVERY_SYSTEM] = {
.name = "TV_SET_DELIVERY_SYSTEM", .name = "DTV_SET_DELIVERY_SYSTEM",
.cmd = TV_SET_DELIVERY_SYSTEM, .cmd = DTV_SET_DELIVERY_SYSTEM,
.set = 1, .set = 1,
}, },
[TV_SET_ISDB_SEGMENT_NUM] = { [DTV_SET_ISDB_SEGMENT_NUM] = {
.name = "TV_SET_ISDB_SEGMENT_NUM", .name = "DTV_SET_ISDB_SEGMENT_NUM",
.cmd = TV_SET_ISDB_SEGMENT_NUM, .cmd = DTV_SET_ISDB_SEGMENT_NUM,
.set = 1, .set = 1,
}, },
[TV_SET_ISDB_SEGMENT_WIDTH] = { [DTV_SET_ISDB_SEGMENT_WIDTH] = {
.name = "TV_SET_ISDB_SEGMENT_WIDTH", .name = "DTV_SET_ISDB_SEGMENT_WIDTH",
.cmd = TV_SET_ISDB_SEGMENT_WIDTH, .cmd = DTV_SET_ISDB_SEGMENT_WIDTH,
.set = 1, .set = 1,
}, },
/* Get */ /* Get */
[TV_GET_FREQUENCY] = { [DTV_GET_FREQUENCY] = {
.name = "TV_GET_FREQUENCY", .name = "DTV_GET_FREQUENCY",
.cmd = TV_GET_FREQUENCY, .cmd = DTV_GET_FREQUENCY,
.set = 0, .set = 0,
}, },
[TV_GET_BANDWIDTH] = { [DTV_GET_BANDWIDTH] = {
.name = "TV_GET_BANDWIDTH", .name = "DTV_GET_BANDWIDTH",
.cmd = TV_GET_BANDWIDTH, .cmd = DTV_GET_BANDWIDTH,
.set = 0, .set = 0,
}, },
[TV_GET_MODULATION] = { [DTV_GET_MODULATION] = {
.name = "TV_GET_MODULATION", .name = "DTV_GET_MODULATION",
.cmd = TV_GET_MODULATION, .cmd = DTV_GET_MODULATION,
.set = 0, .set = 0,
}, },
[TV_GET_INVERSION] = { [DTV_GET_INVERSION] = {
.name = "TV_GET_INVERSION", .name = "DTV_GET_INVERSION",
.cmd = TV_GET_INVERSION, .cmd = DTV_GET_INVERSION,
.set = 0, .set = 0,
}, },
[TV_GET_DISEQC_SLAVE_REPLY] = { [DTV_GET_DISEQC_SLAVE_REPLY] = {
.name = "TV_GET_DISEQC_SLAVE_REPLY", .name = "DTV_GET_DISEQC_SLAVE_REPLY",
.cmd = TV_GET_DISEQC_SLAVE_REPLY, .cmd = DTV_GET_DISEQC_SLAVE_REPLY,
.set = 0, .set = 0,
.buffer = 1, .buffer = 1,
}, },
[TV_GET_SYMBOLRATE] = { [DTV_GET_SYMBOLRATE] = {
.name = "TV_GET_SYMBOLRATE", .name = "DTV_GET_SYMBOLRATE",
.cmd = TV_GET_SYMBOLRATE, .cmd = DTV_GET_SYMBOLRATE,
.set = 0, .set = 0,
}, },
[TV_GET_INNERFEC] = { [DTV_GET_INNERFEC] = {
.name = "TV_GET_INNERFEC", .name = "DTV_GET_INNERFEC",
.cmd = TV_GET_INNERFEC, .cmd = DTV_GET_INNERFEC,
.set = 0, .set = 0,
}, },
[TV_GET_VOLTAGE] = { [DTV_GET_VOLTAGE] = {
.name = "TV_GET_VOLTAGE", .name = "DTV_GET_VOLTAGE",
.cmd = TV_GET_VOLTAGE, .cmd = DTV_GET_VOLTAGE,
.set = 0, .set = 0,
}, },
[TV_GET_TONE] = { [DTV_GET_TONE] = {
.name = "TV_GET_TONE", .name = "DTV_GET_TONE",
.cmd = TV_GET_TONE, .cmd = DTV_GET_TONE,
.set = 0, .set = 0,
}, },
[TV_GET_PILOT] = { [DTV_GET_PILOT] = {
.name = "TV_GET_PILOT", .name = "DTV_GET_PILOT",
.cmd = TV_GET_PILOT, .cmd = DTV_GET_PILOT,
.set = 0, .set = 0,
}, },
[TV_GET_ROLLOFF] = { [DTV_GET_ROLLOFF] = {
.name = "TV_GET_ROLLOFF", .name = "DTV_GET_ROLLOFF",
.cmd = TV_GET_ROLLOFF, .cmd = DTV_GET_ROLLOFF,
.set = 0, .set = 0,
}, },
[TV_GET_DELIVERY_SYSTEM] = { [DTV_GET_DELIVERY_SYSTEM] = {
.name = "TV_GET_DELIVERY_SYSTEM", .name = "DTV_GET_DELIVERY_SYSTEM",
.cmd = TV_GET_DELIVERY_SYSTEM, .cmd = DTV_GET_DELIVERY_SYSTEM,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_SEGMENT_NUM] = { [DTV_GET_ISDB_SEGMENT_NUM] = {
.name = "TV_GET_ISDB_SEGMENT_NUM", .name = "DTV_GET_ISDB_SEGMENT_NUM",
.cmd = TV_GET_ISDB_SEGMENT_NUM, .cmd = DTV_GET_ISDB_SEGMENT_NUM,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_SEGMENT_WIDTH] = { [DTV_GET_ISDB_SEGMENT_WIDTH] = {
.name = "TV_GET_ISDB_SEGMENT_WIDTH", .name = "DTV_GET_ISDB_SEGMENT_WIDTH",
.cmd = TV_GET_ISDB_SEGMENT_WIDTH, .cmd = DTV_GET_ISDB_SEGMENT_WIDTH,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERA_FEC] = { [DTV_GET_ISDB_LAYERA_FEC] = {
.name = "TV_GET_ISDB_LAYERA_FEC", .name = "DTV_GET_ISDB_LAYERA_FEC",
.cmd = TV_GET_ISDB_LAYERA_FEC, .cmd = DTV_GET_ISDB_LAYERA_FEC,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERA_MODULATION] = { [DTV_GET_ISDB_LAYERA_MODULATION] = {
.name = "TV_GET_ISDB_LAYERA_MODULATION", .name = "DTV_GET_ISDB_LAYERA_MODULATION",
.cmd = TV_GET_ISDB_LAYERA_MODULATION, .cmd = DTV_GET_ISDB_LAYERA_MODULATION,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERA_SEGMENT_WIDTH] = { [DTV_GET_ISDB_LAYERA_SEGMENT_WIDTH] = {
.name = "TV_GET_ISDB_LAYERA_SEGMENT_WIDTH", .name = "DTV_GET_ISDB_LAYERA_SEGMENT_WIDTH",
.cmd = TV_GET_ISDB_LAYERA_SEGMENT_WIDTH, .cmd = DTV_GET_ISDB_LAYERA_SEGMENT_WIDTH,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERB_FEC] = { [DTV_GET_ISDB_LAYERB_FEC] = {
.name = "TV_GET_ISDB_LAYERB_FEC", .name = "DTV_GET_ISDB_LAYERB_FEC",
.cmd = TV_GET_ISDB_LAYERB_FEC, .cmd = DTV_GET_ISDB_LAYERB_FEC,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERB_MODULATION] = { [DTV_GET_ISDB_LAYERB_MODULATION] = {
.name = "TV_GET_ISDB_LAYERB_MODULATION", .name = "DTV_GET_ISDB_LAYERB_MODULATION",
.cmd = TV_GET_ISDB_LAYERB_MODULATION, .cmd = DTV_GET_ISDB_LAYERB_MODULATION,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERB_SEGMENT_WIDTH] = { [DTV_GET_ISDB_LAYERB_SEGMENT_WIDTH] = {
.name = "TV_GET_ISDB_LAYERB_SEGMENT_WIDTH", .name = "DTV_GET_ISDB_LAYERB_SEGMENT_WIDTH",
.cmd = TV_GET_ISDB_LAYERB_SEGMENT_WIDTH, .cmd = DTV_GET_ISDB_LAYERB_SEGMENT_WIDTH,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERC_FEC] = { [DTV_GET_ISDB_LAYERC_FEC] = {
.name = "TV_GET_ISDB_LAYERC_FEC", .name = "DTV_GET_ISDB_LAYERC_FEC",
.cmd = TV_GET_ISDB_LAYERC_FEC, .cmd = DTV_GET_ISDB_LAYERC_FEC,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERC_MODULATION] = { [DTV_GET_ISDB_LAYERC_MODULATION] = {
.name = "TV_GET_ISDB_LAYERC_MODULATION", .name = "DTV_GET_ISDB_LAYERC_MODULATION",
.cmd = TV_GET_ISDB_LAYERC_MODULATION, .cmd = DTV_GET_ISDB_LAYERC_MODULATION,
.set = 0, .set = 0,
}, },
[TV_GET_ISDB_LAYERC_SEGMENT_WIDTH] = { [DTV_GET_ISDB_LAYERC_SEGMENT_WIDTH] = {
.name = "TV_GET_ISDB_LAYERC_SEGMENT_WIDTH", .name = "DTV_GET_ISDB_LAYERC_SEGMENT_WIDTH",
.cmd = TV_GET_ISDB_LAYERC_SEGMENT_WIDTH, .cmd = DTV_GET_ISDB_LAYERC_SEGMENT_WIDTH,
.set = 0, .set = 0,
}, },
}; };
void tv_property_dump(tv_property_t *tvp) void dtv_property_dump(dtv_property_t *tvp)
{ {
int i; int i;
printk("%s() tvp.cmd = 0x%08x (%s)\n" printk("%s() tvp.cmd = 0x%08x (%s)\n"
,__FUNCTION__ ,__FUNCTION__
,tvp->cmd ,tvp->cmd
,tv_cmds[ tvp->cmd ].name); ,dtv_cmds[ tvp->cmd ].name);
if(tv_cmds[ tvp->cmd ].buffer) { if(dtv_cmds[ tvp->cmd ].buffer) {
printk("%s() tvp.u.buffer.len = 0x%02x\n" printk("%s() tvp.u.buffer.len = 0x%02x\n"
,__FUNCTION__ ,__FUNCTION__
...@@ -1008,7 +1008,7 @@ int is_legacy_delivery_system(fe_delivery_system_t s) ...@@ -1008,7 +1008,7 @@ int is_legacy_delivery_system(fe_delivery_system_t s)
return 0; return 0;
} }
int tv_property_cache_submit(struct dvb_frontend *fe) int dtv_property_cache_submit(struct dvb_frontend *fe)
{ {
/* We have to do one of two things: /* We have to do one of two things:
...@@ -1036,7 +1036,7 @@ int tv_property_cache_submit(struct dvb_frontend *fe) ...@@ -1036,7 +1036,7 @@ int tv_property_cache_submit(struct dvb_frontend *fe)
int r; int r;
struct tv_frontend_properties *c = &fe->tv_property_cache; struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dvb_frontend_private *fepriv = fe->frontend_priv;
struct dvb_frontend_parameters p; struct dvb_frontend_parameters p;
...@@ -1115,7 +1115,7 @@ int tv_property_cache_submit(struct dvb_frontend *fe) ...@@ -1115,7 +1115,7 @@ int tv_property_cache_submit(struct dvb_frontend *fe)
case _16APSK: case _16APSK:
case NBC_QPSK: case NBC_QPSK:
/* Just post a notification to the demod driver and let it pull /* Just post a notification to the demod driver and let it pull
* the specific values it wants from its tv_property_cache. * the specific values it wants from its dtv_property_cache.
* It can decide how best to use those parameters. * It can decide how best to use those parameters.
* IOCTL will call set_frontend (by default) due to zigzag * IOCTL will call set_frontend (by default) due to zigzag
* support etc. * support etc.
...@@ -1161,147 +1161,147 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, ...@@ -1161,147 +1161,147 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
unsigned int cmd, void *parg); unsigned int cmd, void *parg);
int tv_property_process(struct dvb_frontend *fe, tv_property_t *tvp, int dtv_property_process(struct dvb_frontend *fe, dtv_property_t *tvp,
struct inode *inode, struct file *file) struct inode *inode, struct file *file)
{ {
int r = 0; int r = 0;
struct dvb_frontend_private *fepriv = fe->frontend_priv; struct dvb_frontend_private *fepriv = fe->frontend_priv;
printk("%s()\n", __FUNCTION__); printk("%s()\n", __FUNCTION__);
tv_property_dump(tvp); dtv_property_dump(tvp);
switch(tvp->cmd) { switch(tvp->cmd) {
case TV_SEQ_START: case DTV_SEQ_START:
case TV_SEQ_TERMINATE: case DTV_SEQ_TERMINATE:
/* Reset a cache of data specific to the frontend here. This does /* Reset a cache of data specific to the frontend here. This does
* not effect hardware. * not effect hardware.
*/ */
printk("%s() Flushing property cache\n", __FUNCTION__); printk("%s() Flushing property cache\n", __FUNCTION__);
memset(&fe->tv_property_cache, 0, sizeof(struct tv_frontend_properties)); memset(&fe->dtv_property_cache, 0, sizeof(struct dtv_frontend_properties));
fe->tv_property_cache.state = TV_SEQ_START; fe->dtv_property_cache.state = DTV_SEQ_START;
fe->tv_property_cache.delivery_system = SYS_UNDEFINED; fe->dtv_property_cache.delivery_system = SYS_UNDEFINED;
break; break;
case TV_SEQ_COMPLETE: case DTV_SEQ_COMPLETE:
/* interpret the cache of data, build either a traditional frontend /* interpret the cache of data, build either a traditional frontend
* tunerequest and submit it to a subset of the ioctl handler, * tunerequest and submit it to a subset of the ioctl handler,
* or, call a new undefined method on the frontend to deal with * or, call a new undefined method on the frontend to deal with
* all new tune requests. * all new tune requests.
*/ */
fe->tv_property_cache.state = TV_SEQ_COMPLETE; fe->dtv_property_cache.state = DTV_SEQ_COMPLETE;
printk("%s() Finalised property cache\n", __FUNCTION__); printk("%s() Finalised property cache\n", __FUNCTION__);
r |= tv_property_cache_submit(fe); r |= dtv_property_cache_submit(fe);
r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND, r |= dvb_frontend_ioctl_legacy(inode, file, FE_SET_FRONTEND,
&fepriv->parameters); &fepriv->parameters);
break; break;
case TV_SET_FREQUENCY: case DTV_SET_FREQUENCY:
fe->tv_property_cache.frequency = tvp->u.data; fe->dtv_property_cache.frequency = tvp->u.data;
break; break;
case TV_GET_FREQUENCY: case DTV_GET_FREQUENCY:
tvp->u.data = fe->tv_property_cache.frequency; tvp->u.data = fe->dtv_property_cache.frequency;
break; break;
case TV_SET_MODULATION: case DTV_SET_MODULATION:
fe->tv_property_cache.modulation = tvp->u.data; fe->dtv_property_cache.modulation = tvp->u.data;
break; break;
case TV_GET_MODULATION: case DTV_GET_MODULATION:
tvp->u.data = fe->tv_property_cache.modulation; tvp->u.data = fe->dtv_property_cache.modulation;
break; break;
case TV_SET_BANDWIDTH: case DTV_SET_BANDWIDTH:
fe->tv_property_cache.bandwidth = tvp->u.data; fe->dtv_property_cache.bandwidth = tvp->u.data;
break; break;
case TV_GET_BANDWIDTH: case DTV_GET_BANDWIDTH:
tvp->u.data = fe->tv_property_cache.bandwidth; tvp->u.data = fe->dtv_property_cache.bandwidth;
break; break;
case TV_SET_INVERSION: case DTV_SET_INVERSION:
fe->tv_property_cache.inversion = tvp->u.data; fe->dtv_property_cache.inversion = tvp->u.data;
break; break;
case TV_GET_INVERSION: case DTV_GET_INVERSION:
tvp->u.data = fe->tv_property_cache.inversion; tvp->u.data = fe->dtv_property_cache.inversion;
break; break;
case TV_SET_SYMBOLRATE: case DTV_SET_SYMBOLRATE:
fe->tv_property_cache.symbol_rate = tvp->u.data; fe->dtv_property_cache.symbol_rate = tvp->u.data;
break; break;
case TV_GET_SYMBOLRATE: case DTV_GET_SYMBOLRATE:
tvp->u.data = fe->tv_property_cache.symbol_rate; tvp->u.data = fe->dtv_property_cache.symbol_rate;
break; break;
case TV_SET_INNERFEC: case DTV_SET_INNERFEC:
fe->tv_property_cache.fec_inner = tvp->u.data; fe->dtv_property_cache.fec_inner = tvp->u.data;
break; break;
case TV_GET_INNERFEC: case DTV_GET_INNERFEC:
tvp->u.data = fe->tv_property_cache.fec_inner; tvp->u.data = fe->dtv_property_cache.fec_inner;
break; break;
case TV_SET_PILOT: case DTV_SET_PILOT:
fe->tv_property_cache.pilot = tvp->u.data; fe->dtv_property_cache.pilot = tvp->u.data;
break; break;
case TV_GET_PILOT: case DTV_GET_PILOT:
tvp->u.data = fe->tv_property_cache.pilot; tvp->u.data = fe->dtv_property_cache.pilot;
break; break;
case TV_SET_ROLLOFF: case DTV_SET_ROLLOFF:
fe->tv_property_cache.rolloff = tvp->u.data; fe->dtv_property_cache.rolloff = tvp->u.data;
break; break;
case TV_GET_ROLLOFF: case DTV_GET_ROLLOFF:
tvp->u.data = fe->tv_property_cache.rolloff; tvp->u.data = fe->dtv_property_cache.rolloff;
break; break;
case TV_SET_DELIVERY_SYSTEM: case DTV_SET_DELIVERY_SYSTEM:
fe->tv_property_cache.delivery_system = tvp->u.data; fe->dtv_property_cache.delivery_system = tvp->u.data;
break; break;
case TV_GET_DELIVERY_SYSTEM: case DTV_GET_DELIVERY_SYSTEM:
tvp->u.data = fe->tv_property_cache.delivery_system; tvp->u.data = fe->dtv_property_cache.delivery_system;
break; break;
/* ISDB-T Support here */ /* ISDB-T Support here */
case TV_SET_ISDB_SEGMENT_NUM: case DTV_SET_ISDB_SEGMENT_NUM:
fe->tv_property_cache.isdb_segment_num = tvp->u.data; fe->dtv_property_cache.isdb_segment_num = tvp->u.data;
break; break;
case TV_GET_ISDB_SEGMENT_NUM: case DTV_GET_ISDB_SEGMENT_NUM:
tvp->u.data = fe->tv_property_cache.isdb_segment_num; tvp->u.data = fe->dtv_property_cache.isdb_segment_num;
break; break;
case TV_SET_ISDB_SEGMENT_WIDTH: case DTV_SET_ISDB_SEGMENT_WIDTH:
fe->tv_property_cache.isdb_segment_width = tvp->u.data; fe->dtv_property_cache.isdb_segment_width = tvp->u.data;
break; break;
case TV_GET_ISDB_SEGMENT_WIDTH: case DTV_GET_ISDB_SEGMENT_WIDTH:
tvp->u.data = fe->tv_property_cache.isdb_segment_width; tvp->u.data = fe->dtv_property_cache.isdb_segment_width;
break; break;
case TV_GET_ISDB_LAYERA_FEC: case DTV_GET_ISDB_LAYERA_FEC:
tvp->u.data = fe->tv_property_cache.isdb_layera_fec; tvp->u.data = fe->dtv_property_cache.isdb_layera_fec;
break; break;
case TV_GET_ISDB_LAYERA_MODULATION: case DTV_GET_ISDB_LAYERA_MODULATION:
tvp->u.data = fe->tv_property_cache.isdb_layera_modulation; tvp->u.data = fe->dtv_property_cache.isdb_layera_modulation;
break; break;
case TV_GET_ISDB_LAYERA_SEGMENT_WIDTH: case DTV_GET_ISDB_LAYERA_SEGMENT_WIDTH:
tvp->u.data = fe->tv_property_cache.isdb_layera_segment_width; tvp->u.data = fe->dtv_property_cache.isdb_layera_segment_width;
break; break;
case TV_GET_ISDB_LAYERB_FEC: case DTV_GET_ISDB_LAYERB_FEC:
tvp->u.data = fe->tv_property_cache.isdb_layerb_fec; tvp->u.data = fe->dtv_property_cache.isdb_layerb_fec;
break; break;
case TV_GET_ISDB_LAYERB_MODULATION: case DTV_GET_ISDB_LAYERB_MODULATION:
tvp->u.data = fe->tv_property_cache.isdb_layerb_modulation; tvp->u.data = fe->dtv_property_cache.isdb_layerb_modulation;
break; break;
case TV_GET_ISDB_LAYERB_SEGMENT_WIDTH: case DTV_GET_ISDB_LAYERB_SEGMENT_WIDTH:
tvp->u.data = fe->tv_property_cache.isdb_layerb_segment_width; tvp->u.data = fe->dtv_property_cache.isdb_layerb_segment_width;
break; break;
case TV_GET_ISDB_LAYERC_FEC: case DTV_GET_ISDB_LAYERC_FEC:
tvp->u.data = fe->tv_property_cache.isdb_layerc_fec; tvp->u.data = fe->dtv_property_cache.isdb_layerc_fec;
break; break;
case TV_GET_ISDB_LAYERC_MODULATION: case DTV_GET_ISDB_LAYERC_MODULATION:
tvp->u.data = fe->tv_property_cache.isdb_layerc_modulation; tvp->u.data = fe->dtv_property_cache.isdb_layerc_modulation;
break; break;
case TV_GET_ISDB_LAYERC_SEGMENT_WIDTH: case DTV_GET_ISDB_LAYERC_SEGMENT_WIDTH:
tvp->u.data = fe->tv_property_cache.isdb_layerc_segment_width; tvp->u.data = fe->dtv_property_cache.isdb_layerc_segment_width;
break; break;
case TV_SET_VOLTAGE: case DTV_SET_VOLTAGE:
fe->tv_property_cache.voltage = tvp->u.data; fe->dtv_property_cache.voltage = tvp->u.data;
r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_VOLTAGE, r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_VOLTAGE,
(void *)fe->tv_property_cache.voltage); (void *)fe->dtv_property_cache.voltage);
break; break;
case TV_GET_VOLTAGE: case DTV_GET_VOLTAGE:
tvp->u.data = fe->tv_property_cache.voltage; tvp->u.data = fe->dtv_property_cache.voltage;
break; break;
case TV_SET_TONE: case DTV_SET_TONE:
fe->tv_property_cache.sectone = tvp->u.data; fe->dtv_property_cache.sectone = tvp->u.data;
r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE, r = dvb_frontend_ioctl_legacy(inode, file, FE_SET_TONE,
(void *)fe->tv_property_cache.sectone); (void *)fe->dtv_property_cache.sectone);
break; break;
case TV_GET_TONE: case DTV_GET_TONE:
tvp->u.data = fe->tv_property_cache.sectone; tvp->u.data = fe->dtv_property_cache.sectone;
break; break;
} }
...@@ -1344,7 +1344,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1344,7 +1344,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
struct dvb_device *dvbdev = file->private_data; struct dvb_device *dvbdev = file->private_data;
struct dvb_frontend *fe = dvbdev->priv; struct dvb_frontend *fe = dvbdev->priv;
int err = -EOPNOTSUPP; int err = -EOPNOTSUPP;
tv_property_t *tvp; dtv_property_t *tvp;
dprintk("%s\n", __func__); dprintk("%s\n", __func__);
...@@ -1355,14 +1355,14 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file, ...@@ -1355,14 +1355,14 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
/* TODO: ioctl userdata out of range check here */ /* TODO: ioctl userdata out of range check here */
tvp = parg; tvp = parg;
while(tvp->cmd != TV_SEQ_UNDEFINED) { while(tvp->cmd != DTV_SEQ_UNDEFINED) {
tv_property_process(fe, tvp, inode, file); dtv_property_process(fe, tvp, inode, file);
if( (tvp->cmd == TV_SEQ_TERMINATE) || (tvp->cmd == TV_SEQ_COMPLETE) ) if( (tvp->cmd == DTV_SEQ_TERMINATE) || (tvp->cmd == DTV_SEQ_COMPLETE) )
break; break;
tvp++; tvp++;
} }
if(fe->tv_property_cache.state == TV_SEQ_COMPLETE) { if(fe->dtv_property_cache.state == DTV_SEQ_COMPLETE) {
printk("%s() Property cache is full, tuning\n", __FUNCTION__); printk("%s() Property cache is full, tuning\n", __FUNCTION__);
} }
err = 0; err = 0;
...@@ -1545,7 +1545,7 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file, ...@@ -1545,7 +1545,7 @@ static int dvb_frontend_ioctl_legacy(struct inode *inode, struct file *file,
case FE_SET_FRONTEND: { case FE_SET_FRONTEND: {
struct dvb_frontend_tune_settings fetunesettings; struct dvb_frontend_tune_settings fetunesettings;
if(fe->tv_property_cache.state == TV_SEQ_COMPLETE) { if(fe->dtv_property_cache.state == DTV_SEQ_COMPLETE) {
if (dvb_frontend_check_parameters(fe, &fepriv->parameters) < 0) { if (dvb_frontend_check_parameters(fe, &fepriv->parameters) < 0) {
err = -EINVAL; err = -EINVAL;
break; break;
......
...@@ -170,8 +170,8 @@ struct dvb_frontend_ops { ...@@ -170,8 +170,8 @@ struct dvb_frontend_ops {
struct dvb_tuner_ops tuner_ops; struct dvb_tuner_ops tuner_ops;
struct analog_demod_ops analog_ops; struct analog_demod_ops analog_ops;
int (*set_property)(struct dvb_frontend* fe, tv_property_t* tvp); int (*set_property)(struct dvb_frontend* fe, dtv_property_t* tvp);
int (*get_property)(struct dvb_frontend* fe, tv_property_t* tvp); int (*get_property)(struct dvb_frontend* fe, dtv_property_t* tvp);
int (*set_params)(struct dvb_frontend* fe); int (*set_params)(struct dvb_frontend* fe);
}; };
...@@ -186,7 +186,7 @@ struct dvb_fe_events { ...@@ -186,7 +186,7 @@ struct dvb_fe_events {
struct mutex mtx; struct mutex mtx;
}; };
struct tv_frontend_properties { struct dtv_frontend_properties {
/* Cache State */ /* Cache State */
u32 state; u32 state;
...@@ -233,7 +233,7 @@ struct dvb_frontend { ...@@ -233,7 +233,7 @@ struct dvb_frontend {
void *frontend_priv; void *frontend_priv;
void *sec_priv; void *sec_priv;
void *analog_demod_priv; void *analog_demod_priv;
struct tv_frontend_properties tv_property_cache; struct dtv_frontend_properties dtv_property_cache;
}; };
extern int dvb_register_frontend(struct dvb_adapter *dvb, extern int dvb_register_frontend(struct dvb_adapter *dvb,
......
...@@ -776,7 +776,7 @@ struct dvb_frontend* cx24116_attach(const struct cx24116_config* config, ...@@ -776,7 +776,7 @@ struct dvb_frontend* cx24116_attach(const struct cx24116_config* config,
static int cx24116_get_params(struct dvb_frontend* fe) static int cx24116_get_params(struct dvb_frontend* fe)
{ {
struct cx24116_state *state = fe->demodulator_priv; struct cx24116_state *state = fe->demodulator_priv;
struct tv_frontend_properties *cache = &fe->tv_property_cache; struct dtv_frontend_properties *cache = &fe->dtv_property_cache;
dprintk("%s()\n",__func__); dprintk("%s()\n",__func__);
...@@ -796,7 +796,7 @@ static int cx24116_initfe(struct dvb_frontend* fe) ...@@ -796,7 +796,7 @@ static int cx24116_initfe(struct dvb_frontend* fe)
return cx24116_diseqc_init(fe); return cx24116_diseqc_init(fe);
} }
static int cx24116_set_property(struct dvb_frontend *fe, tv_property_t* tvp) static int cx24116_set_property(struct dvb_frontend *fe, dtv_property_t* tvp)
{ {
dprintk("%s(..)\n", __func__); dprintk("%s(..)\n", __func__);
return 0; return 0;
...@@ -814,7 +814,7 @@ static int cx24116_set_params(struct dvb_frontend *fe) ...@@ -814,7 +814,7 @@ static int cx24116_set_params(struct dvb_frontend *fe)
static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p) static int cx24116_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_parameters *p)
{ {
struct cx24116_state *state = fe->demodulator_priv; struct cx24116_state *state = fe->demodulator_priv;
struct tv_frontend_properties *c = &fe->tv_property_cache; struct dtv_frontend_properties *c = &fe->dtv_property_cache;
struct cx24116_cmd cmd; struct cx24116_cmd cmd;
fe_status_t tunerstat; fe_status_t tunerstat;
int ret, above30msps; int ret, above30msps;
......
...@@ -250,61 +250,61 @@ struct dvb_frontend_event { ...@@ -250,61 +250,61 @@ struct dvb_frontend_event {
* don't insert random new commands and break backwards * don't insert random new commands and break backwards
* binary compatability. * binary compatability.
*/ */
typedef enum tv_cmd_types { typedef enum dtv_cmd_types {
TV_SEQ_UNDEFINED, DTV_SEQ_UNDEFINED,
TV_SEQ_START, DTV_SEQ_START,
TV_SEQ_CONTINUE, DTV_SEQ_CONTINUE,
TV_SEQ_COMPLETE, DTV_SEQ_COMPLETE,
TV_SEQ_TERMINATE, DTV_SEQ_TERMINATE,
TV_SET_FREQUENCY, DTV_SET_FREQUENCY,
TV_SET_MODULATION, DTV_SET_MODULATION,
TV_SET_BANDWIDTH, DTV_SET_BANDWIDTH,
TV_SET_INVERSION, DTV_SET_INVERSION,
TV_SET_DISEQC_MASTER, DTV_SET_DISEQC_MASTER,
TV_SET_SYMBOLRATE, DTV_SET_SYMBOLRATE,
TV_SET_INNERFEC, DTV_SET_INNERFEC,
TV_SET_VOLTAGE, DTV_SET_VOLTAGE,
TV_SET_TONE, DTV_SET_TONE,
TV_SET_PILOT, DTV_SET_PILOT,
TV_SET_ROLLOFF, DTV_SET_ROLLOFF,
TV_GET_FREQUENCY, DTV_GET_FREQUENCY,
TV_GET_MODULATION, DTV_GET_MODULATION,
TV_GET_BANDWIDTH, DTV_GET_BANDWIDTH,
TV_GET_INVERSION, DTV_GET_INVERSION,
TV_GET_DISEQC_SLAVE_REPLY, DTV_GET_DISEQC_SLAVE_REPLY,
TV_GET_SYMBOLRATE, DTV_GET_SYMBOLRATE,
TV_GET_INNERFEC, DTV_GET_INNERFEC,
TV_GET_VOLTAGE, DTV_GET_VOLTAGE,
TV_GET_TONE, DTV_GET_TONE,
TV_GET_PILOT, DTV_GET_PILOT,
TV_GET_ROLLOFF, DTV_GET_ROLLOFF,
/* Basic enumeration set for querying unlimited capabilities */ /* Basic enumeration set for querying unlimited capabilities */
TV_GET_FE_CAPABILITY_COUNT, DTV_GET_FE_CAPABILITY_COUNT,
TV_GET_FE_CAPABILITY, DTV_GET_FE_CAPABILITY,
/* New commands are always appended */ /* New commands are always appended */
TV_SET_DELIVERY_SYSTEM, DTV_SET_DELIVERY_SYSTEM,
TV_GET_DELIVERY_SYSTEM, DTV_GET_DELIVERY_SYSTEM,
/* ISDB-T */ /* ISDB-T */
TV_SET_ISDB_SEGMENT_NUM, DTV_SET_ISDB_SEGMENT_NUM,
TV_GET_ISDB_SEGMENT_NUM, DTV_GET_ISDB_SEGMENT_NUM,
TV_SET_ISDB_SEGMENT_WIDTH, DTV_SET_ISDB_SEGMENT_WIDTH,
TV_GET_ISDB_SEGMENT_WIDTH, DTV_GET_ISDB_SEGMENT_WIDTH,
TV_GET_ISDB_LAYERA_FEC, DTV_GET_ISDB_LAYERA_FEC,
TV_GET_ISDB_LAYERA_MODULATION, DTV_GET_ISDB_LAYERA_MODULATION,
TV_GET_ISDB_LAYERA_SEGMENT_WIDTH, DTV_GET_ISDB_LAYERA_SEGMENT_WIDTH,
TV_GET_ISDB_LAYERB_FEC, DTV_GET_ISDB_LAYERB_FEC,
TV_GET_ISDB_LAYERB_MODULATION, DTV_GET_ISDB_LAYERB_MODULATION,
TV_GET_ISDB_LAYERB_SEGMENT_WIDTH, DTV_GET_ISDB_LAYERB_SEGMENT_WIDTH,
TV_GET_ISDB_LAYERC_FEC, DTV_GET_ISDB_LAYERC_FEC,
TV_GET_ISDB_LAYERC_MODULATION, DTV_GET_ISDB_LAYERC_MODULATION,
TV_GET_ISDB_LAYERC_SEGMENT_WIDTH, DTV_GET_ISDB_LAYERC_SEGMENT_WIDTH,
} tv_cmd_types_t; } dtv_cmd_types_t;
typedef enum fe_pilot { typedef enum fe_pilot {
PILOT_ON, PILOT_ON,
...@@ -337,7 +337,7 @@ typedef enum fe_delivery_system { ...@@ -337,7 +337,7 @@ typedef enum fe_delivery_system {
SYS_DAB, SYS_DAB,
} fe_delivery_system_t; } fe_delivery_system_t;
struct tv_cmds_h { struct dtv_cmds_h {
char *name; /* A display name for debugging purposes */ char *name; /* A display name for debugging purposes */
__u32 cmd; /* A unique ID */ __u32 cmd; /* A unique ID */
...@@ -357,13 +357,13 @@ typedef struct { ...@@ -357,13 +357,13 @@ typedef struct {
__u32 len; __u32 len;
} buffer; } buffer;
} u; } u;
} tv_property_t; } dtv_property_t;
/* No more than 16 properties during any given ioctl */ /* No more than 16 properties during any given ioctl */
typedef tv_property_t tv_properties_t[16]; typedef dtv_property_t dtv_properties_t[16];
#define FE_SET_PROPERTY _IOW('o', 82, tv_properties_t) #define FE_SET_PROPERTY _IOW('o', 82, dtv_properties_t)
#define FE_GET_PROPERTY _IOR('o', 83, tv_properties_t) #define FE_GET_PROPERTY _IOR('o', 83, dtv_properties_t)
/** /**
......
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