aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/tuner-core.c129
1 files changed, 0 insertions, 129 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index bbf1f488a16..72d41032742 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -800,132 +800,6 @@ static int tuner_s_standby(struct v4l2_subdev *sd, u32 standby)
800 return 0; 800 return 0;
801} 801}
802 802
803#ifdef CONFIG_VIDEO_ALLOW_V4L1
804static long tuner_ioctl(struct v4l2_subdev *sd, unsigned int cmd, void *arg)
805{
806 struct tuner *t = to_tuner(sd);
807 struct i2c_client *client = v4l2_get_subdevdata(sd);
808 struct analog_demod_ops *analog_ops = &t->fe.ops.analog_ops;
809 struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops;
810
811 switch (cmd) {
812 case VIDIOCSAUDIO:
813 if (check_mode(t, "VIDIOCSAUDIO") == -EINVAL)
814 return 0;
815 if (check_v4l2(t) == -EINVAL)
816 return 0;
817
818 /* Should be implemented, since bttv calls it */
819 tuner_dbg("VIDIOCSAUDIO not implemented.\n");
820 break;
821 case VIDIOCSCHAN:
822 {
823 static const v4l2_std_id map[] = {
824 [VIDEO_MODE_PAL] = V4L2_STD_PAL,
825 [VIDEO_MODE_NTSC] = V4L2_STD_NTSC_M,
826 [VIDEO_MODE_SECAM] = V4L2_STD_SECAM,
827 [4 /* bttv */ ] = V4L2_STD_PAL_M,
828 [5 /* bttv */ ] = V4L2_STD_PAL_N,
829 [6 /* bttv */ ] = V4L2_STD_NTSC_M_JP,
830 };
831 struct video_channel *vc = arg;
832
833 if (check_v4l2(t) == -EINVAL)
834 return 0;
835
836 if (set_mode(client,t,V4L2_TUNER_ANALOG_TV, "VIDIOCSCHAN")==-EINVAL)
837 return 0;
838
839 if (vc->norm < ARRAY_SIZE(map))
840 t->std = map[vc->norm];
841 tuner_fixup_std(t);
842 if (t->tv_freq)
843 set_tv_freq(client, t->tv_freq);
844 return 0;
845 }
846 case VIDIOCSFREQ:
847 {
848 unsigned long *v = arg;
849
850 if (check_mode(t, "VIDIOCSFREQ") == -EINVAL)
851 return 0;
852 if (check_v4l2(t) == -EINVAL)
853 return 0;
854
855 set_freq(client, *v);
856 return 0;
857 }
858 case VIDIOCGTUNER:
859 {
860 struct video_tuner *vt = arg;
861
862 if (check_mode(t, "VIDIOCGTUNER") == -EINVAL)
863 return 0;
864 if (check_v4l2(t) == -EINVAL)
865 return 0;
866
867 if (V4L2_TUNER_RADIO == t->mode) {
868 if (fe_tuner_ops->get_status) {
869 u32 tuner_status;
870
871 fe_tuner_ops->get_status(&t->fe, &tuner_status);
872 if (tuner_status & TUNER_STATUS_STEREO)
873 vt->flags |= VIDEO_TUNER_STEREO_ON;
874 else
875 vt->flags &= ~VIDEO_TUNER_STEREO_ON;
876 } else {
877 if (analog_ops->is_stereo) {
878 if (analog_ops->is_stereo(&t->fe))
879 vt->flags |=
880 VIDEO_TUNER_STEREO_ON;
881 else
882 vt->flags &=
883 ~VIDEO_TUNER_STEREO_ON;
884 }
885 }
886 if (analog_ops->has_signal)
887 vt->signal =
888 analog_ops->has_signal(&t->fe);
889
890 vt->flags |= VIDEO_TUNER_LOW; /* Allow freqs at 62.5 Hz */
891
892 vt->rangelow = radio_range[0] * 16000;
893 vt->rangehigh = radio_range[1] * 16000;
894
895 } else {
896 vt->rangelow = tv_range[0] * 16;
897 vt->rangehigh = tv_range[1] * 16;
898 }
899
900 return 0;
901 }
902 case VIDIOCGAUDIO:
903 {
904 struct video_audio *va = arg;
905
906 if (check_mode(t, "VIDIOCGAUDIO") == -EINVAL)
907 return 0;
908 if (check_v4l2(t) == -EINVAL)
909 return 0;
910
911 if (V4L2_TUNER_RADIO == t->mode) {
912 if (fe_tuner_ops->get_status) {
913 u32 tuner_status;
914
915 fe_tuner_ops->get_status(&t->fe, &tuner_status);
916 va->mode = (tuner_status & TUNER_STATUS_STEREO)
917 ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
918 } else if (analog_ops->is_stereo)
919 va->mode = analog_ops->is_stereo(&t->fe)
920 ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
921 }
922 return 0;
923 }
924 }
925 return -ENOIOCTLCMD;
926}
927#endif
928
929static int tuner_s_config(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *cfg) 803static int tuner_s_config(struct v4l2_subdev *sd, const struct v4l2_priv_tun_config *cfg)
930{ 804{
931 struct tuner *t = to_tuner(sd); 805 struct tuner *t = to_tuner(sd);
@@ -1111,9 +985,6 @@ static int tuner_resume(struct i2c_client *c)
1111static const struct v4l2_subdev_core_ops tuner_core_ops = { 985static const struct v4l2_subdev_core_ops tuner_core_ops = {
1112 .log_status = tuner_log_status, 986 .log_status = tuner_log_status,
1113 .s_standby = tuner_s_standby, 987 .s_standby = tuner_s_standby,
1114#ifdef CONFIG_VIDEO_ALLOW_V4L1
1115 .ioctl = tuner_ioctl,
1116#endif
1117}; 988};
1118 989
1119static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = { 990static const struct v4l2_subdev_tuner_ops tuner_tuner_ops = {