Skip to content

Commit

Permalink
V4L/DVB (9181): S2API: Add support fot DTV_GUARD_INTERVAL and DTV_TRA…
Browse files Browse the repository at this point in the history
…NSMISSION_MODE

Tuning DVB-T via the S2API was failing, missing some essential items.

Signed-off-by: Steven Toth <stoth@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Oct 13, 2008
1 parent a4de91b commit b87625f
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
32 changes: 32 additions & 0 deletions drivers/media/dvb/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,16 @@ struct dtv_cmds_h dtv_cmds[] = {
.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,
},
/* Get */
[DTV_DISEQC_SLAVE_REPLY] = {
.name = "DTV_DISEQC_SLAVE_REPLY",
Expand All @@ -862,6 +872,16 @@ struct dtv_cmds_h dtv_cmds[] = {
.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,
},
};

void dtv_property_dump(struct dtv_property *tvp)
Expand Down Expand Up @@ -1147,6 +1167,12 @@ int dtv_property_process_get(struct dvb_frontend *fe, struct dtv_property *tvp,
case DTV_CODE_RATE_LP:
tvp->u.data = fe->dtv_property_cache.code_rate_LP;
break;
case DTV_GUARD_INTERVAL:
tvp->u.data = fe->dtv_property_cache.guard_interval;
break;
case DTV_TRANSMISSION_MODE:
tvp->u.data = fe->dtv_property_cache.transmission_mode;
break;
default:
r = -1;
}
Expand Down Expand Up @@ -1234,6 +1260,12 @@ int dtv_property_process_set(struct dvb_frontend *fe, struct dtv_property *tvp,
case DTV_CODE_RATE_LP:
fe->dtv_property_cache.code_rate_LP = tvp->u.data;
break;
case DTV_GUARD_INTERVAL:
fe->dtv_property_cache.guard_interval = tvp->u.data;
break;
case DTV_TRANSMISSION_MODE:
fe->dtv_property_cache.transmission_mode = tvp->u.data;
break;
default:
r = -1;
}
Expand Down
4 changes: 3 additions & 1 deletion include/linux/dvb/frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ struct dvb_frontend_event {
#define DTV_API_VERSION 35
#define DTV_CODE_RATE_HP 36
#define DTV_CODE_RATE_LP 37
#define DTV_GUARD_INTERVAL 38
#define DTV_TRANSMISSION_MODE 39

#define DTV_MAX_COMMAND DTV_CODE_RATE_LP
#define DTV_MAX_COMMAND DTV_TRANSMISSION_MODE

typedef enum fe_pilot {
PILOT_ON,
Expand Down

0 comments on commit b87625f

Please sign in to comment.