51 *ber = (b[0] << 16) | (b[1] << 8) | b[2];
55 static int dtt200u_fe_read_unc_blocks(
struct dvb_frontend* fe,
u32 *unc)
61 *unc = (b[0] << 8) | b[1];
65 static int dtt200u_fe_read_signal_strength(
struct dvb_frontend* fe,
u16 *strength)
70 *strength = (b << 8) | b;
79 *snr = ~((br << 8) | br);
92 return dtt200u_fe_init(fe);
103 static int dtt200u_fe_set_frontend(
struct dvb_frontend *fe)
128 freqbuf[1] = freq & 0xff;
129 freqbuf[2] = (freq >> 8) & 0xff;
132 for (i = 0; i < 30; i++) {
134 dtt200u_fe_read_status(fe, &st);
142 static int dtt200u_fe_get_frontend(
struct dvb_frontend* fe)
167 deb_info(
"attaching frontend dtt200u\n");
182 .name =
"WideView USB DVB-T",
183 .frequency_min = 44250000,
184 .frequency_max = 867250000,
185 .frequency_stepsize = 250000,
196 .release = dtt200u_fe_release,
198 .init = dtt200u_fe_init,
199 .sleep = dtt200u_fe_sleep,
201 .set_frontend = dtt200u_fe_set_frontend,
202 .get_frontend = dtt200u_fe_get_frontend,
203 .get_tune_settings = dtt200u_fe_get_tune_settings,
205 .read_status = dtt200u_fe_read_status,
206 .read_ber = dtt200u_fe_read_ber,
207 .read_signal_strength = dtt200u_fe_read_signal_strength,
208 .read_snr = dtt200u_fe_read_snr,
209 .read_ucblocks = dtt200u_fe_read_unc_blocks,