48 st->
snr = (buf[1]) << 8 | buf[0];
57 gp8psk_fe_update_status(st);
90 gp8psk_fe_update_status(st);
96 static int gp8psk_fe_read_signal_strength(
struct dvb_frontend* fe,
u16 *strength)
99 gp8psk_fe_update_status(st);
106 *strength = (st->
snr << 4) + st->
snr;
116 static int gp8psk_fe_set_frontend(
struct dvb_frontend *fe)
122 int gp_product_id =
le16_to_cpu(state->
d->udev->descriptor.idProduct);
124 deb_fe(
"%s()\n", __func__);
126 cmd[4] = freq & 0xff;
127 cmd[5] = (freq >> 8) & 0xff;
128 cmd[6] = (freq >> 16) & 0xff;
129 cmd[7] = (freq >> 24) & 0xff;
138 deb_fe(
"%s: unsupported modulation selected (%d)\n",
145 deb_fe(
"%s: DVB-S2 delivery system selected\n", __func__);
148 deb_fe(
"%s: Turbo-FEC delivery system selected\n", __func__);
152 deb_fe(
"%s: unsupported delivery system selected (%d)\n",
164 if (gp8psk_tuned_to_DCII(fe))
209 deb_fe(
"%s: unsupported modulation selected (%d)\n",
215 gp8psk_set_tuner_mode(fe, 0);
225 static int gp8psk_fe_send_diseqc_msg (
struct dvb_frontend* fe,
239 static int gp8psk_fe_send_diseqc_burst (
struct dvb_frontend* fe,
279 static int gp8psk_fe_enable_high_lnb_voltage(
struct dvb_frontend* fe,
long onoff)
285 static int gp8psk_fe_send_legacy_dish_cmd (
struct dvb_frontend* fe,
unsigned long sw_cmd)
288 u8 cmd = sw_cmd & 0x7f;
318 s->
fe.demodulator_priv =
s;
331 .name =
"Genpix DVB-S",
332 .frequency_min = 800000,
333 .frequency_max = 2250000,
334 .frequency_stepsize = 100,
335 .symbol_rate_min = 1000000,
336 .symbol_rate_max = 45000000,
337 .symbol_rate_tolerance = 500,
348 .release = gp8psk_fe_release,
353 .set_frontend = gp8psk_fe_set_frontend,
355 .get_tune_settings = gp8psk_fe_get_tune_settings,
357 .read_status = gp8psk_fe_read_status,
358 .read_ber = gp8psk_fe_read_ber,
359 .read_signal_strength = gp8psk_fe_read_signal_strength,
360 .read_snr = gp8psk_fe_read_snr,
361 .read_ucblocks = gp8psk_fe_read_unc_blocks,
363 .diseqc_send_master_cmd = gp8psk_fe_send_diseqc_msg,
364 .diseqc_send_burst = gp8psk_fe_send_diseqc_burst,
365 .set_tone = gp8psk_fe_set_tone,
366 .set_voltage = gp8psk_fe_set_voltage,
367 .dishnetwork_send_legacy_command = gp8psk_fe_send_legacy_dish_cmd,
368 .enable_high_lnb_voltage = gp8psk_fe_enable_high_lnb_voltage