Commit 06d3a396 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (13157): dvb_frontend: represent all DVBS2API commands via macro

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b232a012
...@@ -895,104 +895,27 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe) ...@@ -895,104 +895,27 @@ static int dvb_frontend_clear_cache(struct dvb_frontend *fe)
} }
static struct dtv_cmds_h dtv_cmds[] = { static struct dtv_cmds_h dtv_cmds[] = {
[DTV_TUNE] = { _DTV_CMD(DTV_TUNE, 1, 0),
.name = "DTV_TUNE", _DTV_CMD(DTV_CLEAR, 1, 0),
.cmd = DTV_TUNE,
.set = 1,
},
[DTV_CLEAR] = {
.name = "DTV_CLEAR",
.cmd = DTV_CLEAR,
.set = 1,
},
/* Set */ /* Set */
[DTV_FREQUENCY] = { _DTV_CMD(DTV_FREQUENCY, 1, 0),
.name = "DTV_FREQUENCY", _DTV_CMD(DTV_BANDWIDTH_HZ, 1, 0),
.cmd = DTV_FREQUENCY, _DTV_CMD(DTV_MODULATION, 1, 0),
.set = 1, _DTV_CMD(DTV_INVERSION, 1, 0),
}, _DTV_CMD(DTV_DISEQC_MASTER, 1, 1),
[DTV_BANDWIDTH_HZ] = { _DTV_CMD(DTV_SYMBOL_RATE, 1, 0),
.name = "DTV_BANDWIDTH_HZ", _DTV_CMD(DTV_INNER_FEC, 1, 0),
.cmd = DTV_BANDWIDTH_HZ, _DTV_CMD(DTV_VOLTAGE, 1, 0),
.set = 1, _DTV_CMD(DTV_TONE, 1, 0),
}, _DTV_CMD(DTV_PILOT, 1, 0),
[DTV_MODULATION] = { _DTV_CMD(DTV_ROLLOFF, 1, 0),
.name = "DTV_MODULATION", _DTV_CMD(DTV_DELIVERY_SYSTEM, 1, 0),
.cmd = DTV_MODULATION, _DTV_CMD(DTV_HIERARCHY, 1, 0),
.set = 1, _DTV_CMD(DTV_CODE_RATE_HP, 1, 0),
}, _DTV_CMD(DTV_CODE_RATE_LP, 1, 0),
[DTV_INVERSION] = { _DTV_CMD(DTV_GUARD_INTERVAL, 1, 0),
.name = "DTV_INVERSION", _DTV_CMD(DTV_TRANSMISSION_MODE, 1, 0),
.cmd = DTV_INVERSION,
.set = 1,
},
[DTV_DISEQC_MASTER] = {
.name = "DTV_DISEQC_MASTER",
.cmd = DTV_DISEQC_MASTER,
.set = 1,
.buffer = 1,
},
[DTV_SYMBOL_RATE] = {
.name = "DTV_SYMBOL_RATE",
.cmd = DTV_SYMBOL_RATE,
.set = 1,
},
[DTV_INNER_FEC] = {
.name = "DTV_INNER_FEC",
.cmd = DTV_INNER_FEC,
.set = 1,
},
[DTV_VOLTAGE] = {
.name = "DTV_VOLTAGE",
.cmd = DTV_VOLTAGE,
.set = 1,
},
[DTV_TONE] = {
.name = "DTV_TONE",
.cmd = DTV_TONE,
.set = 1,
},
[DTV_PILOT] = {
.name = "DTV_PILOT",
.cmd = DTV_PILOT,
.set = 1,
},
[DTV_ROLLOFF] = {
.name = "DTV_ROLLOFF",
.cmd = DTV_ROLLOFF,
.set = 1,
},
[DTV_DELIVERY_SYSTEM] = {
.name = "DTV_DELIVERY_SYSTEM",
.cmd = DTV_DELIVERY_SYSTEM,
.set = 1,
},
[DTV_HIERARCHY] = {
.name = "DTV_HIERARCHY",
.cmd = DTV_HIERARCHY,
.set = 1,
},
[DTV_CODE_RATE_HP] = {
.name = "DTV_CODE_RATE_HP",
.cmd = DTV_CODE_RATE_HP,
.set = 1,
},
[DTV_CODE_RATE_LP] = {
.name = "DTV_CODE_RATE_LP",
.cmd = DTV_CODE_RATE_LP,
.set = 1,
},
[DTV_GUARD_INTERVAL] = {
.name = "DTV_GUARD_INTERVAL",
.cmd = DTV_GUARD_INTERVAL,
.set = 1,
},
[DTV_TRANSMISSION_MODE] = {
.name = "DTV_TRANSMISSION_MODE",
.cmd = DTV_TRANSMISSION_MODE,
.set = 1,
},
_DTV_CMD(DTV_ISDBT_PARTIAL_RECEPTION, 1, 0), _DTV_CMD(DTV_ISDBT_PARTIAL_RECEPTION, 1, 0),
_DTV_CMD(DTV_ISDBT_SOUND_BROADCASTING, 1, 0), _DTV_CMD(DTV_ISDBT_SOUND_BROADCASTING, 1, 0),
...@@ -1035,43 +958,13 @@ static struct dtv_cmds_h dtv_cmds[] = { ...@@ -1035,43 +958,13 @@ static struct dtv_cmds_h dtv_cmds[] = {
_DTV_CMD(DTV_ISDBS_TS_ID, 1, 0), _DTV_CMD(DTV_ISDBS_TS_ID, 1, 0),
/* Get */ /* Get */
[DTV_DISEQC_SLAVE_REPLY] = { _DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1),
.name = "DTV_DISEQC_SLAVE_REPLY", _DTV_CMD(DTV_API_VERSION, 0, 0),
.cmd = DTV_DISEQC_SLAVE_REPLY, _DTV_CMD(DTV_CODE_RATE_HP, 0, 0),
.set = 0, _DTV_CMD(DTV_CODE_RATE_LP, 0, 0),
.buffer = 1, _DTV_CMD(DTV_GUARD_INTERVAL, 0, 0),
}, _DTV_CMD(DTV_TRANSMISSION_MODE, 0, 0),
_DTV_CMD(DTV_HIERARCHY, 0, 0),
[DTV_API_VERSION] = {
.name = "DTV_API_VERSION",
.cmd = DTV_API_VERSION,
.set = 0,
},
[DTV_CODE_RATE_HP] = {
.name = "DTV_CODE_RATE_HP",
.cmd = DTV_CODE_RATE_HP,
.set = 0,
},
[DTV_CODE_RATE_LP] = {
.name = "DTV_CODE_RATE_LP",
.cmd = DTV_CODE_RATE_LP,
.set = 0,
},
[DTV_GUARD_INTERVAL] = {
.name = "DTV_GUARD_INTERVAL",
.cmd = DTV_GUARD_INTERVAL,
.set = 0,
},
[DTV_TRANSMISSION_MODE] = {
.name = "DTV_TRANSMISSION_MODE",
.cmd = DTV_TRANSMISSION_MODE,
.set = 0,
},
[DTV_HIERARCHY] = {
.name = "DTV_HIERARCHY",
.cmd = DTV_HIERARCHY,
.set = 0,
},
}; };
static void dtv_property_dump(struct dtv_property *tvp) static void dtv_property_dump(struct dtv_property *tvp)
......
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