Skip to content

Commit

Permalink
[media] add LNA support for DVB API
Browse files Browse the repository at this point in the history
Signed-off-by: Antti Palosaari <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
palosaari authored and Mauro Carvalho Chehab committed Sep 27, 2012
1 parent 48caa6f commit 8a2697a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions drivers/media/dvb-core/dvb_frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,7 @@ static struct dtv_cmds_h dtv_cmds[DTV_MAX_COMMAND + 1] = {

_DTV_CMD(DTV_STREAM_ID, 1, 0),
_DTV_CMD(DTV_DVBT2_PLP_ID_LEGACY, 1, 0),
_DTV_CMD(DTV_LNA, 1, 0),

/* Get */
_DTV_CMD(DTV_DISEQC_SLAVE_REPLY, 0, 1),
Expand Down Expand Up @@ -1730,6 +1731,10 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
case DTV_INTERLEAVING:
c->interleaving = tvp->u.data;
break;
case DTV_LNA:
if (fe->ops.set_lna)
r = fe->ops.set_lna(fe, tvp->u.data);
break;

/* ISDB-T Support here */
case DTV_ISDBT_PARTIAL_RECEPTION:
Expand Down
1 change: 1 addition & 0 deletions drivers/media/dvb-core/dvb_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ struct dvb_frontend_ops {
int (*dishnetwork_send_legacy_command)(struct dvb_frontend* fe, unsigned long cmd);
int (*i2c_gate_ctrl)(struct dvb_frontend* fe, int enable);
int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire);
int (*set_lna)(struct dvb_frontend *, int);

/* These callbacks are for devices that implement their own
* tuning algorithms, rather than a simple swzigzag
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 @@ -363,8 +363,9 @@ struct dvb_frontend_event {
#define DTV_ATSCMH_SCCC_CODE_MODE_D 59

#define DTV_INTERLEAVING 60
#define DTV_LNA 61

#define DTV_MAX_COMMAND DTV_INTERLEAVING
#define DTV_MAX_COMMAND DTV_LNA

typedef enum fe_pilot {
PILOT_ON,
Expand Down Expand Up @@ -438,6 +439,7 @@ enum atscmh_rs_code_mode {
};

#define NO_STREAM_ID_FILTER (~0U)
#define LNA_AUTO (~0U)

struct dtv_cmds_h {
char *name; /* A display name for debugging purposes */
Expand Down

0 comments on commit 8a2697a

Please sign in to comment.