diff options
author | Andrew de Quincey <adq_dvb@lidskialf.net> | 2006-04-18 16:47:12 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 00:59:12 -0400 |
commit | aac9ee95ad655593b5b7438714be5a485dc7cb73 (patch) | |
tree | ad5b091b3f029c89274197fdbb92fa913a8868d5 /drivers/media/dvb/dvb-usb/digitv.c | |
parent | 2546b62ee70b2fc0e06814cfdb0ad586356d7a05 (diff) |
V4L/DVB (3883): Convert digtv to refactored tuner code
Rename pll calls to appropriate tuner calls.
Remove pll functions from demod structures.
Hook tuner call into tuner_ops.
Add pll gate control calls where appropriate.
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/digitv.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/digitv.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c index 91136c00ce9d..481f48b9d846 100644 --- a/drivers/media/dvb/dvb-usb/digitv.c +++ b/drivers/media/dvb/dvb-usb/digitv.c | |||
@@ -112,27 +112,30 @@ static int digitv_mt352_demod_init(struct dvb_frontend *fe) | |||
112 | 112 | ||
113 | static struct mt352_config digitv_mt352_config = { | 113 | static struct mt352_config digitv_mt352_config = { |
114 | .demod_init = digitv_mt352_demod_init, | 114 | .demod_init = digitv_mt352_demod_init, |
115 | .pll_set = dvb_usb_pll_set, | ||
116 | }; | 115 | }; |
117 | 116 | ||
118 | static int digitv_nxt6000_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) | 117 | static int digitv_nxt6000_tuner_set_params(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep) |
119 | { | 118 | { |
120 | struct dvb_usb_device *d = fe->dvb->priv; | 119 | struct dvb_usb_device *d = fe->dvb->priv; |
121 | u8 b[5]; | 120 | u8 b[5]; |
122 | dvb_usb_pll_set(fe,fep,b); | 121 | dvb_usb_tuner_pllbuf(fe,fep,b, 5); |
123 | return digitv_ctrl_msg(d,USB_WRITE_TUNER,0,&b[1],4,NULL,0); | 122 | return digitv_ctrl_msg(d,USB_WRITE_TUNER,0,&b[1],4,NULL,0); |
124 | } | 123 | } |
125 | 124 | ||
126 | static struct nxt6000_config digitv_nxt6000_config = { | 125 | static struct nxt6000_config digitv_nxt6000_config = { |
127 | .clock_inversion = 1, | 126 | .clock_inversion = 1, |
128 | .pll_set = digitv_nxt6000_pll_set, | ||
129 | }; | 127 | }; |
130 | 128 | ||
131 | static int digitv_frontend_attach(struct dvb_usb_device *d) | 129 | static int digitv_frontend_attach(struct dvb_usb_device *d) |
132 | { | 130 | { |
133 | if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL || | 131 | if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL) { |
134 | (d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) | 132 | d->fe->ops->tuner_ops.pllbuf = dvb_usb_tuner_pllbuf; |
135 | return 0; | 133 | return 0; |
134 | } | ||
135 | if ((d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) { | ||
136 | d->fe->ops->tuner_ops.set_params = digitv_nxt6000_tuner_set_params; | ||
137 | return 0; | ||
138 | } | ||
136 | return -EIO; | 139 | return -EIO; |
137 | } | 140 | } |
138 | 141 | ||