diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2009-02-28 17:16:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:02 -0400 |
commit | 69e233332432551e10d64492e60d84fee7657bb6 (patch) | |
tree | 19221f3a344b072b725bfefbb39945d79e2496b3 /drivers | |
parent | 0d02efe486ef251e2f625fc846cb5f241eb57160 (diff) |
V4L/DVB (10779): mxl5007t: remove analog tuning code
Analog doesn't work in this driver yet. This code just adds extra bloat,
so remove it for now.
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/common/tuners/mxl5007t.c | 124 |
1 files changed, 0 insertions, 124 deletions
diff --git a/drivers/media/common/tuners/mxl5007t.c b/drivers/media/common/tuners/mxl5007t.c index 3ec28945c26f..cbcb19b6e09d 100644 --- a/drivers/media/common/tuners/mxl5007t.c +++ b/drivers/media/common/tuners/mxl5007t.c | |||
@@ -67,15 +67,8 @@ MODULE_PARM_DESC(debug, "set debug level"); | |||
67 | 67 | ||
68 | enum mxl5007t_mode { | 68 | enum mxl5007t_mode { |
69 | MxL_MODE_OTA_DVBT_ATSC = 0, | 69 | MxL_MODE_OTA_DVBT_ATSC = 0, |
70 | MxL_MODE_OTA_NTSC_PAL_GH = 1, | ||
71 | MxL_MODE_OTA_PAL_IB = 2, | ||
72 | MxL_MODE_OTA_PAL_D_SECAM_KL = 3, | ||
73 | MxL_MODE_OTA_ISDBT = 4, | 70 | MxL_MODE_OTA_ISDBT = 4, |
74 | MxL_MODE_CABLE_DIGITAL = 0x10, | 71 | MxL_MODE_CABLE_DIGITAL = 0x10, |
75 | MxL_MODE_CABLE_NTSC_PAL_GH = 0x11, | ||
76 | MxL_MODE_CABLE_PAL_IB = 0x12, | ||
77 | MxL_MODE_CABLE_PAL_D_SECAM_KL = 0x13, | ||
78 | MxL_MODE_CABLE_SCTE40 = 0x14, | ||
79 | }; | 72 | }; |
80 | 73 | ||
81 | enum mxl5007t_chip_version { | 74 | enum mxl5007t_chip_version { |
@@ -235,56 +228,12 @@ static void mxl5007t_set_mode_bits(struct mxl5007t_state *state, | |||
235 | set_reg_bits(state->tab_init, 0x32, 0x0f, 0x06); | 228 | set_reg_bits(state->tab_init, 0x32, 0x0f, 0x06); |
236 | set_reg_bits(state->tab_init, 0x35, 0xff, 0x12); | 229 | set_reg_bits(state->tab_init, 0x35, 0xff, 0x12); |
237 | break; | 230 | break; |
238 | case MxL_MODE_OTA_NTSC_PAL_GH: | ||
239 | set_reg_bits(state->tab_init, 0x16, 0x70, 0x00); | ||
240 | set_reg_bits(state->tab_init, 0x32, 0xff, 0x85); | ||
241 | break; | ||
242 | case MxL_MODE_OTA_PAL_IB: | ||
243 | set_reg_bits(state->tab_init, 0x16, 0x70, 0x10); | ||
244 | set_reg_bits(state->tab_init, 0x32, 0xff, 0x85); | ||
245 | break; | ||
246 | case MxL_MODE_OTA_PAL_D_SECAM_KL: | ||
247 | set_reg_bits(state->tab_init, 0x16, 0x70, 0x20); | ||
248 | set_reg_bits(state->tab_init, 0x32, 0xff, 0x85); | ||
249 | break; | ||
250 | case MxL_MODE_CABLE_DIGITAL: | 231 | case MxL_MODE_CABLE_DIGITAL: |
251 | set_reg_bits(state->tab_init_cable, 0x71, 0xff, 0x01); | 232 | set_reg_bits(state->tab_init_cable, 0x71, 0xff, 0x01); |
252 | set_reg_bits(state->tab_init_cable, 0x72, 0xff, | 233 | set_reg_bits(state->tab_init_cable, 0x72, 0xff, |
253 | 8 - if_diff_out_level); | 234 | 8 - if_diff_out_level); |
254 | set_reg_bits(state->tab_init_cable, 0x74, 0xff, 0x17); | 235 | set_reg_bits(state->tab_init_cable, 0x74, 0xff, 0x17); |
255 | break; | 236 | break; |
256 | case MxL_MODE_CABLE_NTSC_PAL_GH: | ||
257 | set_reg_bits(state->tab_init, 0x16, 0x70, 0x00); | ||
258 | set_reg_bits(state->tab_init, 0x32, 0xff, 0x85); | ||
259 | set_reg_bits(state->tab_init_cable, 0x71, 0xff, 0x01); | ||
260 | set_reg_bits(state->tab_init_cable, 0x72, 0xff, | ||
261 | 8 - if_diff_out_level); | ||
262 | set_reg_bits(state->tab_init_cable, 0x74, 0xff, 0x17); | ||
263 | break; | ||
264 | case MxL_MODE_CABLE_PAL_IB: | ||
265 | set_reg_bits(state->tab_init, 0x16, 0x70, 0x10); | ||
266 | set_reg_bits(state->tab_init, 0x32, 0xff, 0x85); | ||
267 | set_reg_bits(state->tab_init_cable, 0x71, 0xff, 0x01); | ||
268 | set_reg_bits(state->tab_init_cable, 0x72, 0xff, | ||
269 | 8 - if_diff_out_level); | ||
270 | set_reg_bits(state->tab_init_cable, 0x74, 0xff, 0x17); | ||
271 | break; | ||
272 | case MxL_MODE_CABLE_PAL_D_SECAM_KL: | ||
273 | set_reg_bits(state->tab_init, 0x16, 0x70, 0x20); | ||
274 | set_reg_bits(state->tab_init, 0x32, 0xff, 0x85); | ||
275 | set_reg_bits(state->tab_init_cable, 0x71, 0xff, 0x01); | ||
276 | set_reg_bits(state->tab_init_cable, 0x72, 0xff, | ||
277 | 8 - if_diff_out_level); | ||
278 | set_reg_bits(state->tab_init_cable, 0x74, 0xff, 0x17); | ||
279 | break; | ||
280 | case MxL_MODE_CABLE_SCTE40: | ||
281 | set_reg_bits(state->tab_init_cable, 0x36, 0xff, 0x08); | ||
282 | set_reg_bits(state->tab_init_cable, 0x68, 0xff, 0xbc); | ||
283 | set_reg_bits(state->tab_init_cable, 0x71, 0xff, 0x01); | ||
284 | set_reg_bits(state->tab_init_cable, 0x72, 0xff, | ||
285 | 8 - if_diff_out_level); | ||
286 | set_reg_bits(state->tab_init_cable, 0x74, 0xff, 0x17); | ||
287 | break; | ||
288 | default: | 237 | default: |
289 | mxl_fail(-EINVAL); | 238 | mxl_fail(-EINVAL); |
290 | } | 239 | } |
@@ -752,78 +701,6 @@ fail: | |||
752 | return ret; | 701 | return ret; |
753 | } | 702 | } |
754 | 703 | ||
755 | static int mxl5007t_set_analog_params(struct dvb_frontend *fe, | ||
756 | struct analog_parameters *params) | ||
757 | { | ||
758 | struct mxl5007t_state *state = fe->tuner_priv; | ||
759 | enum mxl5007t_bw_mhz bw = 0; /* FIXME */ | ||
760 | enum mxl5007t_mode cbl_mode; | ||
761 | enum mxl5007t_mode ota_mode; | ||
762 | char *mode_name; | ||
763 | int ret; | ||
764 | u32 freq = params->frequency * 62500; | ||
765 | |||
766 | #define cable 1 | ||
767 | if (params->std & V4L2_STD_MN) { | ||
768 | cbl_mode = MxL_MODE_CABLE_NTSC_PAL_GH; | ||
769 | ota_mode = MxL_MODE_OTA_NTSC_PAL_GH; | ||
770 | mode_name = "MN"; | ||
771 | } else if (params->std & V4L2_STD_B) { | ||
772 | cbl_mode = MxL_MODE_CABLE_PAL_IB; | ||
773 | ota_mode = MxL_MODE_OTA_PAL_IB; | ||
774 | mode_name = "B"; | ||
775 | } else if (params->std & V4L2_STD_GH) { | ||
776 | cbl_mode = MxL_MODE_CABLE_NTSC_PAL_GH; | ||
777 | ota_mode = MxL_MODE_OTA_NTSC_PAL_GH; | ||
778 | mode_name = "GH"; | ||
779 | } else if (params->std & V4L2_STD_PAL_I) { | ||
780 | cbl_mode = MxL_MODE_CABLE_PAL_IB; | ||
781 | ota_mode = MxL_MODE_OTA_PAL_IB; | ||
782 | mode_name = "I"; | ||
783 | } else if (params->std & V4L2_STD_DK) { | ||
784 | cbl_mode = MxL_MODE_CABLE_PAL_D_SECAM_KL; | ||
785 | ota_mode = MxL_MODE_OTA_PAL_D_SECAM_KL; | ||
786 | mode_name = "DK"; | ||
787 | } else if (params->std & V4L2_STD_SECAM_L) { | ||
788 | cbl_mode = MxL_MODE_CABLE_PAL_D_SECAM_KL; | ||
789 | ota_mode = MxL_MODE_OTA_PAL_D_SECAM_KL; | ||
790 | mode_name = "L"; | ||
791 | } else if (params->std & V4L2_STD_SECAM_LC) { | ||
792 | cbl_mode = MxL_MODE_CABLE_PAL_D_SECAM_KL; | ||
793 | ota_mode = MxL_MODE_OTA_PAL_D_SECAM_KL; | ||
794 | mode_name = "L'"; | ||
795 | } else { | ||
796 | mode_name = "xx"; | ||
797 | /* FIXME */ | ||
798 | cbl_mode = MxL_MODE_CABLE_NTSC_PAL_GH; | ||
799 | ota_mode = MxL_MODE_OTA_NTSC_PAL_GH; | ||
800 | } | ||
801 | mxl_debug("setting mxl5007 to system %s", mode_name); | ||
802 | |||
803 | if (fe->ops.i2c_gate_ctrl) | ||
804 | fe->ops.i2c_gate_ctrl(fe, 1); | ||
805 | |||
806 | mutex_lock(&state->lock); | ||
807 | |||
808 | ret = mxl5007t_tuner_init(state, cable ? cbl_mode : ota_mode); | ||
809 | if (mxl_fail(ret)) | ||
810 | goto fail; | ||
811 | |||
812 | ret = mxl5007t_tuner_rf_tune(state, freq, bw); | ||
813 | if (mxl_fail(ret)) | ||
814 | goto fail; | ||
815 | |||
816 | state->frequency = freq; | ||
817 | state->bandwidth = 0; | ||
818 | fail: | ||
819 | mutex_unlock(&state->lock); | ||
820 | |||
821 | if (fe->ops.i2c_gate_ctrl) | ||
822 | fe->ops.i2c_gate_ctrl(fe, 0); | ||
823 | |||
824 | return ret; | ||
825 | } | ||
826 | |||
827 | /* ------------------------------------------------------------------------- */ | 704 | /* ------------------------------------------------------------------------- */ |
828 | 705 | ||
829 | static int mxl5007t_init(struct dvb_frontend *fe) | 706 | static int mxl5007t_init(struct dvb_frontend *fe) |
@@ -911,7 +788,6 @@ static struct dvb_tuner_ops mxl5007t_tuner_ops = { | |||
911 | .init = mxl5007t_init, | 788 | .init = mxl5007t_init, |
912 | .sleep = mxl5007t_sleep, | 789 | .sleep = mxl5007t_sleep, |
913 | .set_params = mxl5007t_set_params, | 790 | .set_params = mxl5007t_set_params, |
914 | .set_analog_params = mxl5007t_set_analog_params, | ||
915 | .get_status = mxl5007t_get_status, | 791 | .get_status = mxl5007t_get_status, |
916 | .get_frequency = mxl5007t_get_frequency, | 792 | .get_frequency = mxl5007t_get_frequency, |
917 | .get_bandwidth = mxl5007t_get_bandwidth, | 793 | .get_bandwidth = mxl5007t_get_bandwidth, |