From 875a7682668574af9966cdac4453bf8b9457389e Mon Sep 17 00:00:00 2001 From: Ralph Metzler Date: Fri, 25 May 2018 00:09:50 +0200 Subject: [PATCH] properly support frontend input switching for MAX SX8 --- ddbridge/ddbridge-mci.c | 4 ++-- ddbridge/ddbridge-sx8.c | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ddbridge/ddbridge-mci.c b/ddbridge/ddbridge-mci.c index 34109f9..e170556 100644 --- a/ddbridge/ddbridge-mci.c +++ b/ddbridge/ddbridge-mci.c @@ -172,7 +172,7 @@ static int probe(struct mci *state) return 0; } -struct dvb_frontend *ddb_mci_attach(struct ddb_input *input, struct mci_cfg *cfg, int nr) +struct dvb_frontend *ddb_mci_attach(struct ddb_input *input, struct mci_cfg *cfg, int nr, int tuner) { struct ddb_port *port = input->port; struct ddb *dev = port->dev; @@ -212,8 +212,8 @@ struct dvb_frontend *ddb_mci_attach(struct ddb_input *input, struct mci_cfg *cfg memcpy(&state->fe.ops, cfg->fe_ops, sizeof(struct dvb_frontend_ops)); state->fe.demodulator_priv = state; state->nr = nr; - state->tuner = nr; state->demod = nr; + state->tuner = tuner; if (cfg->init) cfg->init(state); return &state->fe; diff --git a/ddbridge/ddbridge-sx8.c b/ddbridge/ddbridge-sx8.c index f961a06..5c975cd 100644 --- a/ddbridge/ddbridge-sx8.c +++ b/ddbridge/ddbridge-sx8.c @@ -489,6 +489,7 @@ static int sleep(struct dvb_frontend *fe) static struct dvb_frontend_ops sx8_ops = { .delsys = { SYS_DVBS, SYS_DVBS2 }, + .xbar = { 4, 0, 8 }, /* tuner_max, demod id, demod_max */ .info = { .name = "DVB-S/S2X", .frequency_min = 950000, @@ -516,6 +517,8 @@ static int init(struct mci *mci) struct sx8 *state = (struct sx8 *) mci; state->mci.demod = SX8_DEMOD_NONE; + mci->fe.ops.xbar[1] = mci->nr; + mci->fe.dtv_property_cache.input = mci->tuner; return 0; }