.adr = 0x29,
.single_master = 1,
.no_i2c_bridge = 0,
- .max_size = 64,
+ .chunk_size = 64,
.microcode_name = "dvb-usb-terratec-h7-drxk.fw",
.parallel_ts = 1,
};
{
struct az6007_device_state *st = adap->priv;
- /* FIXME: dvb-usb will call this function twice! */
- if (adap->fe[0])
- return 0;
-
BUG_ON(!st);
az6007_frontend_poweron(adap);
info("attaching demod drxk");
- adap->fe[0] = dvb_attach(drxk_attach, &terratec_h7_drxk,
- &adap->dev->i2c_adap, &adap->fe[1]);
- if (!adap->fe[0])
+ adap->fe_adap[0].fe = dvb_attach(drxk_attach, &terratec_h7_drxk,
+ &adap->dev->i2c_adap);
+ if (!adap->fe_adap[0].fe)
return -EINVAL;
- adap->fe[0]->sec_priv = adap;
+ adap->fe_adap[0].fe->sec_priv = adap;
/* FIXME: do we need a pll semaphore? */
sema_init(&st->pll_mutex, 1);
- st->gate_ctrl = adap->fe[0]->ops.i2c_gate_ctrl;
- adap->fe[0]->ops.i2c_gate_ctrl = drxk_gate_ctrl;
- adap->dont_attach_fe[1] = true;
+ st->gate_ctrl = adap->fe_adap[0].fe->ops.i2c_gate_ctrl;
+ adap->fe_adap[0].fe->ops.i2c_gate_ctrl = drxk_gate_ctrl;
return 0;
}
info("attaching tuner mt2063");
/* Attach mt2063 to DVB-C frontend */
- if (adap->fe[0]->ops.i2c_gate_ctrl)
- adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0], 1);
- if (!dvb_attach(mt2063_attach, adap->fe[0], &az6007_mt2063_config,
+ if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl)
+ adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 1);
+ if (!dvb_attach(mt2063_attach, adap->fe_adap[0].fe,
+ &az6007_mt2063_config,
&adap->dev->i2c_adap))
return -EINVAL;
- if (adap->fe[0]->ops.i2c_gate_ctrl)
- adap->fe[0]->ops.i2c_gate_ctrl(adap->fe[0], 0);
-
- /* Hack - needed due to drxk */
- adap->fe[1]->tuner_priv = adap->fe[0]->tuner_priv;
- memcpy(&adap->fe[1]->ops.tuner_ops,
- &adap->fe[0]->ops.tuner_ops, sizeof(adap->fe[0]->ops.tuner_ops));
+ if (adap->fe_adap[0].fe->ops.i2c_gate_ctrl)
+ adap->fe_adap[0].fe->ops.i2c_gate_ctrl(adap->fe_adap[0].fe, 0);
return 0;
}
.num_adapters = 1,
.adapter = {
{
- .num_frontends = 2,
+ .num_frontends = 1,
+ .fe = {{
.streaming_ctrl = az6007_streaming_ctrl,
.tuner_attach = az6007_tuner_attach,
.frontend_attach = az6007_frontend_attach,
}
},
.size_of_priv = sizeof(struct az6007_device_state),
- }
- },
+ }}
+ } },
.power_ctrl = az6007_power_ctrl,
.read_mac_address = az6007_read_mac_addr,