Lines Matching +full:1 +full:st

92 MODULE_PARM_DESC(debug, "set debugging level (1=info (or-able)).");
96 MODULE_PARM_DESC(firmware, "set default firmware 0=Sharp7395 1=LG");
100 MODULE_PARM_DESC(pid, "set default 0=default 1=off 2=on");
143 struct lme2510_state *st = d->priv; in lme2510_usb_talk() local
146 if (max(wlen, rlen) > sizeof(st->usb_buffer)) in lme2510_usb_talk()
153 memcpy(st->usb_buffer, wbuf, wlen); in lme2510_usb_talk()
155 ret = dvb_usbv2_generic_rw_locked(d, st->usb_buffer, wlen, in lme2510_usb_talk()
156 st->usb_buffer, rlen); in lme2510_usb_talk()
159 memcpy(rbuf, st->usb_buffer, rlen); in lme2510_usb_talk()
168 struct lme2510_state *st = d->priv; in lme2510_stream_restart() local
171 u8 rbuff[1]; in lme2510_stream_restart()
172 if (st->pid_off) in lme2510_stream_restart()
182 struct lme2510_state *st = d->priv; in lme2510_enable_pid() local
184 static u8 rbuf[1]; in lme2510_enable_pid()
188 deb_info(1, "PID Setting Pid %04x", pid_out); in lme2510_enable_pid()
190 if (st->pid_size == 0) in lme2510_enable_pid()
195 pid_buff[4] = pid_no + 1; in lme2510_enable_pid()
198 if (pid_len > st->pid_size) in lme2510_enable_pid()
199 st->pid_size = pid_len; in lme2510_enable_pid()
200 pid_buff[7] = 0x80 + st->pid_size; in lme2510_enable_pid()
205 if (st->stream_on) in lme2510_enable_pid()
216 struct lme2510_state *st = adap_to_priv(adap); in lme2510_update_stats() local
226 c->block_count.len = 1; in lme2510_update_stats()
228 c->block_error.len = 1; in lme2510_update_stats()
230 c->post_bit_count.len = 1; in lme2510_update_stats()
232 c->post_bit_error.len = 1; in lme2510_update_stats()
235 if (st->i2c_talk_onoff) { in lme2510_update_stats()
236 c->strength.len = 1; in lme2510_update_stats()
238 c->cnr.len = 1; in lme2510_update_stats()
243 switch (st->tuner_config) { in lme2510_update_stats()
245 s_tmp = reg_to_16bits(0xff - st->signal_level); in lme2510_update_stats()
246 c_tmp = reg_to_16bits(0xff - st->signal_sn); in lme2510_update_stats()
250 s_tmp = 0xffff - (((st->signal_level * 2) << 8) * 5 / 4); in lme2510_update_stats()
251 c_tmp = reg_to_16bits((0xff - st->signal_sn - 0xa1) * 3); in lme2510_update_stats()
254 s_tmp = reg_to_16bits(st->signal_level); in lme2510_update_stats()
255 c_tmp = reg_to_16bits(st->signal_sn); in lme2510_update_stats()
258 c->strength.len = 1; in lme2510_update_stats()
262 c->cnr.len = 1; in lme2510_update_stats()
270 struct lme2510_state *st = adap_to_priv(adap); in lme2510_int_response() local
297 offset, i, ibuf[0], ibuf[1]); in lme2510_int_response()
301 debug_data_snipet(1, "INT Remote data snippet", ibuf); in lme2510_int_response()
310 deb_info(1, "INT Key = 0x%08x", key); in lme2510_int_response()
315 switch (st->tuner_config) { in lme2510_int_response()
318 st->signal_level = ibuf[4]; in lme2510_int_response()
319 st->signal_sn = ibuf[3]; in lme2510_int_response()
320 st->time_key = ibuf[7]; in lme2510_int_response()
325 if (ibuf[1] == 0x03) { in lme2510_int_response()
327 st->signal_level = ibuf[3]; in lme2510_int_response()
328 st->signal_sn = ibuf[4]; in lme2510_int_response()
330 st->signal_level = ibuf[4]; in lme2510_int_response()
331 st->signal_sn = ibuf[5]; in lme2510_int_response()
336 st->signal_level = ibuf[5]; in lme2510_int_response()
337 st->signal_sn = ibuf[4]; in lme2510_int_response()
338 st->time_key = ibuf[7]; in lme2510_int_response()
348 st->lock_status &= ~FE_HAS_LOCK; in lme2510_int_response()
355 debug_data_snipet(1, "INT Control data snippet", ibuf); in lme2510_int_response()
358 debug_data_snipet(1, "INT Unknown data snippet", ibuf); in lme2510_int_response()
368 st->int_urb_due = jiffies + msecs_to_jiffies(200); in lme2510_int_response()
406 struct lme2510_state *st = adap_to_priv(adap); in lme2510_pid_filter_ctrl() local
408 static u8 rbuf[1]; in lme2510_pid_filter_ctrl()
411 deb_info(1, "PID Clearing Filter"); in lme2510_pid_filter_ctrl()
418 st->pid_off = true; in lme2510_pid_filter_ctrl()
420 st->pid_off = false; in lme2510_pid_filter_ctrl()
422 st->pid_size = 0; in lme2510_pid_filter_ctrl()
478 struct lme2510_state *st = d->priv; in lme2510_msg() local
480 st->i2c_talk_onoff = 1; in lme2510_msg()
489 struct lme2510_state *st = d->priv; in lme2510_i2c_xfer() local
499 read = i + 1 < num && msg[i + 1].flags & I2C_M_RD; in lme2510_i2c_xfer()
501 gate = (msg[i].addr == st->i2c_tuner_addr) in lme2510_i2c_xfer()
502 ? (read) ? st->i2c_tuner_gate_r in lme2510_i2c_xfer()
503 : st->i2c_tuner_gate_w in lme2510_i2c_xfer()
504 : st->i2c_gate; in lme2510_i2c_xfer()
508 obuf[1] = (read) ? 2 : msg[i].len + 1; in lme2510_i2c_xfer()
510 obuf[1] = msg[i].len + read + 1; in lme2510_i2c_xfer()
512 obuf[2] = msg[i].addr << 1; in lme2510_i2c_xfer()
519 obuf[msg[i].len+3] = msg[i+1].len; in lme2510_i2c_xfer()
528 deb_info(1, "i2c transfer failed."); in lme2510_i2c_xfer()
535 memcpy(msg[i].buf, &ibuf[1], msg[i].len); in lme2510_i2c_xfer()
537 memcpy(msg[i+1].buf, &ibuf[1], msg[i+1].len); in lme2510_i2c_xfer()
561 struct lme2510_state *st = adap_to_priv(adap); in lme2510_streaming_ctrl() local
563 static u8 rbuf[1]; in lme2510_streaming_ctrl()
566 deb_info(1, "STM (%02x)", onoff); in lme2510_streaming_ctrl()
569 if (onoff == 1) in lme2510_streaming_ctrl()
570 st->stream_on = 1; in lme2510_streaming_ctrl()
572 deb_info(1, "STM Steam Off"); in lme2510_streaming_ctrl()
578 st->stream_on = 0; in lme2510_streaming_ctrl()
579 st->i2c_talk_onoff = 1; in lme2510_streaming_ctrl()
605 len_in = 1; in lme2510_download_firmware()
616 for (i = 1; i < 3; i++) { in lme2510_download_firmware()
617 start = (i == 1) ? 0 : 512; in lme2510_download_firmware()
618 end = (i == 1) ? 512 : fw->size; in lme2510_download_firmware()
619 for (j = start; j < end; j += (packet_size+1)) { in lme2510_download_firmware()
626 dlen = (u8)(end - j)-1; in lme2510_download_firmware()
628 data[1] = dlen; in lme2510_download_firmware()
629 memcpy(&data[2], fw_data, dlen+1); in lme2510_download_firmware()
631 data[wlen-1] = check_sum(fw_data, dlen+1); in lme2510_download_firmware()
632 deb_info(1, "Data S=%02x:E=%02x CS= %02x", data[3], in lme2510_download_firmware()
635 ret |= (data[0] == 0x88) ? 0 : -1; in lme2510_download_firmware()
640 len_in = 1; in lme2510_download_firmware()
656 u8 data[1] = {0}; in lme_coldreset()
674 struct lme2510_state *st = d->priv; in lme_firmware_switch() local
680 cold = (cold > 0) ? (cold & 1) : 0; in lme_firmware_switch()
684 switch (st->dvb_usb_lme2510_firmware) { in lme_firmware_switch()
690 st->dvb_usb_lme2510_firmware = TUNER_S0194; in lme_firmware_switch()
699 st->dvb_usb_lme2510_firmware = TUNER_LG; in lme_firmware_switch()
702 st->dvb_usb_lme2510_firmware = TUNER_DEFAULT; in lme_firmware_switch()
707 switch (st->dvb_usb_lme2510_firmware) { in lme_firmware_switch()
713 st->dvb_usb_lme2510_firmware = TUNER_S7395; in lme_firmware_switch()
722 st->dvb_usb_lme2510_firmware = TUNER_LG; in lme_firmware_switch()
730 st->dvb_usb_lme2510_firmware = TUNER_S0194; in lme_firmware_switch()
733 st->dvb_usb_lme2510_firmware = TUNER_DEFAULT; in lme_firmware_switch()
740 st->dvb_usb_lme2510_firmware = TUNER_RS2000; in lme_firmware_switch()
749 dvb_usb_lme2510_firmware = st->dvb_usb_lme2510_firmware; in lme_firmware_switch()
761 .diseqc_tone = 1,
804 struct lme2510_state *st = fe_to_priv(fe); in dm04_lme2510_set_voltage() local
807 static u8 rbuf[1]; in dm04_lme2510_set_voltage()
808 int ret = 0, len = 3, rlen = 1; in dm04_lme2510_set_voltage()
828 if (st->tuner_config == TUNER_RS2000) in dm04_lme2510_set_voltage()
829 if (st->fe_set_voltage) in dm04_lme2510_set_voltage()
830 st->fe_set_voltage(fe, voltage); in dm04_lme2510_set_voltage()
839 struct lme2510_state *st = d->priv; in dm04_read_status() local
842 if (st->i2c_talk_onoff) { in dm04_read_status()
843 if (st->fe_read_status) { in dm04_read_status()
844 ret = st->fe_read_status(fe, status); in dm04_read_status()
849 st->lock_status = *status; in dm04_read_status()
851 if (*status & FE_HAS_LOCK && st->stream_on) { in dm04_read_status()
854 st->i2c_talk_onoff = 0; in dm04_read_status()
864 if (st->tuner_config == TUNER_RS2000 && in dm04_read_status()
865 time_after(jiffies, st->int_urb_due)) in dm04_read_status()
866 st->lock_status &= ~FE_HAS_LOCK; in dm04_read_status()
868 *status = st->lock_status; in dm04_read_status()
873 st->i2c_talk_onoff = 1; in dm04_read_status()
884 struct lme2510_state *st = fe_to_priv(fe); in dm04_read_signal_strength() local
886 if (st->fe_read_signal_strength && !st->stream_on) in dm04_read_signal_strength()
887 return st->fe_read_signal_strength(fe, strength); in dm04_read_signal_strength()
900 struct lme2510_state *st = fe_to_priv(fe); in dm04_read_snr() local
902 if (st->fe_read_snr && !st->stream_on) in dm04_read_snr()
903 return st->fe_read_snr(fe, snr); in dm04_read_snr()
915 struct lme2510_state *st = fe_to_priv(fe); in dm04_read_ber() local
917 if (st->fe_read_ber && !st->stream_on) in dm04_read_ber()
918 return st->fe_read_ber(fe, ber); in dm04_read_ber()
927 struct lme2510_state *st = fe_to_priv(fe); in dm04_read_ucblocks() local
929 if (st->fe_read_ucblocks && !st->stream_on) in dm04_read_ucblocks()
930 return st->fe_read_ucblocks(fe, ucblocks); in dm04_read_ucblocks()
940 struct lme2510_state *st = adap_to_priv(adap); in lme_name() local
948 strlcat(name, fe_name[st->tuner_config], 128); in lme_name()
956 struct lme2510_state *st = d->priv; in dm04_lme2510_frontend_attach() local
959 st->i2c_talk_onoff = 1; in dm04_lme2510_frontend_attach()
963 st->i2c_gate = 4; in dm04_lme2510_frontend_attach()
968 st->i2c_tuner_gate_w = 4; in dm04_lme2510_frontend_attach()
969 st->i2c_tuner_gate_r = 4; in dm04_lme2510_frontend_attach()
970 st->i2c_tuner_addr = 0x60; in dm04_lme2510_frontend_attach()
971 st->tuner_config = TUNER_LG; in dm04_lme2510_frontend_attach()
972 if (st->dvb_usb_lme2510_firmware != TUNER_LG) { in dm04_lme2510_frontend_attach()
973 st->dvb_usb_lme2510_firmware = TUNER_LG; in dm04_lme2510_frontend_attach()
974 ret = lme_firmware_switch(d, 1) ? 0 : -ENODEV; in dm04_lme2510_frontend_attach()
979 st->i2c_gate = 4; in dm04_lme2510_frontend_attach()
984 st->i2c_tuner_gate_w = 4; in dm04_lme2510_frontend_attach()
985 st->i2c_tuner_gate_r = 5; in dm04_lme2510_frontend_attach()
986 st->i2c_tuner_addr = 0x60; in dm04_lme2510_frontend_attach()
987 st->tuner_config = TUNER_S0194; in dm04_lme2510_frontend_attach()
988 if (st->dvb_usb_lme2510_firmware != TUNER_S0194) { in dm04_lme2510_frontend_attach()
989 st->dvb_usb_lme2510_firmware = TUNER_S0194; in dm04_lme2510_frontend_attach()
990 ret = lme_firmware_switch(d, 1) ? 0 : -ENODEV; in dm04_lme2510_frontend_attach()
995 st->i2c_gate = 5; in dm04_lme2510_frontend_attach()
1001 st->i2c_tuner_gate_w = 4; in dm04_lme2510_frontend_attach()
1002 st->i2c_tuner_gate_r = 5; in dm04_lme2510_frontend_attach()
1003 st->i2c_tuner_addr = 0x60; in dm04_lme2510_frontend_attach()
1004 st->tuner_config = TUNER_S7395; in dm04_lme2510_frontend_attach()
1005 if (st->dvb_usb_lme2510_firmware != TUNER_S7395) { in dm04_lme2510_frontend_attach()
1006 st->dvb_usb_lme2510_firmware = TUNER_S7395; in dm04_lme2510_frontend_attach()
1007 ret = lme_firmware_switch(d, 1) ? 0 : -ENODEV; in dm04_lme2510_frontend_attach()
1013 st->i2c_gate = 5; in dm04_lme2510_frontend_attach()
1019 st->i2c_tuner_gate_w = 5; in dm04_lme2510_frontend_attach()
1020 st->i2c_tuner_gate_r = 5; in dm04_lme2510_frontend_attach()
1021 st->i2c_tuner_addr = 0x60; in dm04_lme2510_frontend_attach()
1022 st->tuner_config = TUNER_RS2000; in dm04_lme2510_frontend_attach()
1023 st->fe_set_voltage = in dm04_lme2510_frontend_attach()
1043 st->fe_read_status = adap->fe[0]->ops.read_status; in dm04_lme2510_frontend_attach()
1044 st->fe_read_signal_strength = adap->fe[0]->ops.read_signal_strength; in dm04_lme2510_frontend_attach()
1045 st->fe_read_snr = adap->fe[0]->ops.read_snr; in dm04_lme2510_frontend_attach()
1046 st->fe_read_ber = adap->fe[0]->ops.read_ber; in dm04_lme2510_frontend_attach()
1047 st->fe_read_ucblocks = adap->fe[0]->ops.read_ucblocks; in dm04_lme2510_frontend_attach()
1063 struct lme2510_state *st = adap_to_priv(adap); in dm04_lme2510_tuner() local
1067 switch (st->tuner_config) { in dm04_lme2510_tuner()
1070 &d->i2c_adap, 1)) in dm04_lme2510_tuner()
1071 ret = st->tuner_config; in dm04_lme2510_tuner()
1076 ret = st->tuner_config; in dm04_lme2510_tuner()
1081 ret = st->tuner_config; in dm04_lme2510_tuner()
1086 ret = st->tuner_config; in dm04_lme2510_tuner()
1111 struct lme2510_state *st = d->priv; in lme2510_powerup() local
1114 static u8 rbuf[1]; in lme2510_powerup()
1115 int ret = 0, len = 3, rlen = 1; in lme2510_powerup()
1121 st->i2c_talk_onoff = 1; in lme2510_powerup()
1130 struct lme2510_state *st = d->priv; in lme2510_identify_state() local
1136 d->props->bInterfaceNumber, 1); in lme2510_identify_state()
1138 st->dvb_usb_lme2510_firmware = dvb_usb_lme2510_firmware; in lme2510_identify_state()
1185 struct lme2510_state *st = d->priv; in lme2510_exit() local
1187 if (st->lme_urb) { in lme2510_exit()
1188 usb_kill_urb(st->lme_urb); in lme2510_exit()
1189 usb_free_urb(st->lme_urb); in lme2510_exit()
1217 .num_adapters = 1,
1248 .no_dynamic_id = 1,
1249 .soft_unbind = 1,