diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-04-01 14:40:21 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-04-02 03:56:09 -0400 |
commit | ab4cecf9c4e4a69cf2161f8a2424be14984430f8 (patch) | |
tree | 76e136c740d77720b6a08f3a49fb71506607a30a /drivers/media/video/tvp5150.c | |
parent | 3bbe5a83996c0a669250d91421eef054f3a30595 (diff) |
V4L/DVB (3700): Remove obsolete commands from tvp5150.c
- Remove old DECODER_ commands from tvp5150.c, replacing them with newer
ones if appropriate.
- Small VIDIOC_G_TUNER fixes in msp3400 and tuner.
- Fix VIDIOC_S_TUNER support in em28xx.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tvp5150.c')
-rw-r--r-- | drivers/media/video/tvp5150.c | 122 |
1 files changed, 4 insertions, 118 deletions
diff --git a/drivers/media/video/tvp5150.c b/drivers/media/video/tvp5150.c index 1055423aa2b9..dab4973bcf82 100644 --- a/drivers/media/video/tvp5150.c +++ b/drivers/media/video/tvp5150.c | |||
@@ -858,7 +858,6 @@ static int tvp5150_command(struct i2c_client *c, | |||
858 | 858 | ||
859 | case 0: | 859 | case 0: |
860 | case VIDIOC_INT_RESET: | 860 | case VIDIOC_INT_RESET: |
861 | case DECODER_INIT: | ||
862 | tvp5150_reset(c); | 861 | tvp5150_reset(c); |
863 | break; | 862 | break; |
864 | case VIDIOC_S_STD: | 863 | case VIDIOC_S_STD: |
@@ -957,99 +956,15 @@ static int tvp5150_command(struct i2c_client *c, | |||
957 | #endif | 956 | #endif |
958 | 957 | ||
959 | case VIDIOC_LOG_STATUS: | 958 | case VIDIOC_LOG_STATUS: |
960 | case DECODER_DUMP: | ||
961 | dump_reg(c); | 959 | dump_reg(c); |
962 | break; | 960 | break; |
963 | 961 | ||
964 | case DECODER_GET_CAPABILITIES: | 962 | case VIDIOC_G_TUNER: |
965 | { | 963 | { |
966 | struct video_decoder_capability *cap = arg; | 964 | struct v4l2_tuner *vt = arg; |
967 | 965 | int status = tvp5150_read(c, 0x88); | |
968 | cap->flags = VIDEO_DECODER_PAL | | ||
969 | VIDEO_DECODER_NTSC | | ||
970 | VIDEO_DECODER_SECAM | | ||
971 | VIDEO_DECODER_AUTO | VIDEO_DECODER_CCIR; | ||
972 | cap->inputs = 3; | ||
973 | cap->outputs = 1; | ||
974 | break; | ||
975 | } | ||
976 | case DECODER_GET_STATUS: | ||
977 | { | ||
978 | int *iarg = arg; | ||
979 | int status; | ||
980 | int res=0; | ||
981 | status = tvp5150_read(c, 0x88); | ||
982 | if(status&0x08){ | ||
983 | res |= DECODER_STATUS_COLOR; | ||
984 | } | ||
985 | if(status&0x04 && status&0x02){ | ||
986 | res |= DECODER_STATUS_GOOD; | ||
987 | } | ||
988 | *iarg=res; | ||
989 | break; | ||
990 | } | ||
991 | |||
992 | case DECODER_SET_GPIO: | ||
993 | break; | ||
994 | |||
995 | case DECODER_SET_VBI_BYPASS: | ||
996 | break; | ||
997 | |||
998 | case DECODER_SET_NORM: | ||
999 | { | ||
1000 | int *iarg = arg; | ||
1001 | |||
1002 | switch (*iarg) { | ||
1003 | |||
1004 | case VIDEO_MODE_NTSC: | ||
1005 | break; | ||
1006 | |||
1007 | case VIDEO_MODE_PAL: | ||
1008 | break; | ||
1009 | |||
1010 | case VIDEO_MODE_SECAM: | ||
1011 | break; | ||
1012 | |||
1013 | case VIDEO_MODE_AUTO: | ||
1014 | break; | ||
1015 | |||
1016 | default: | ||
1017 | return -EINVAL; | ||
1018 | |||
1019 | } | ||
1020 | decoder->norm = *iarg; | ||
1021 | break; | ||
1022 | } | ||
1023 | case DECODER_SET_INPUT: | ||
1024 | { | ||
1025 | int *iarg = arg; | ||
1026 | if (*iarg < 0 || *iarg > 3) { | ||
1027 | return -EINVAL; | ||
1028 | } | ||
1029 | |||
1030 | decoder->input = *iarg; | ||
1031 | tvp5150_selmux(c, decoder->input); | ||
1032 | |||
1033 | break; | ||
1034 | } | ||
1035 | case DECODER_SET_OUTPUT: | ||
1036 | { | ||
1037 | int *iarg = arg; | ||
1038 | |||
1039 | /* not much choice of outputs */ | ||
1040 | if (*iarg != 0) { | ||
1041 | return -EINVAL; | ||
1042 | } | ||
1043 | break; | ||
1044 | } | ||
1045 | case DECODER_ENABLE_OUTPUT: | ||
1046 | { | ||
1047 | int *iarg = arg; | ||
1048 | |||
1049 | decoder->enable = (*iarg != 0); | ||
1050 | |||
1051 | tvp5150_selmux(c, decoder->input); | ||
1052 | 966 | ||
967 | vt->signal = ((status & 0x04) && (status & 0x02)) ? 0xffff : 0x0; | ||
1053 | break; | 968 | break; |
1054 | } | 969 | } |
1055 | case VIDIOC_QUERYCTRL: | 970 | case VIDIOC_QUERYCTRL: |
@@ -1095,35 +1010,6 @@ static int tvp5150_command(struct i2c_client *c, | |||
1095 | return -EINVAL; | 1010 | return -EINVAL; |
1096 | } | 1011 | } |
1097 | 1012 | ||
1098 | case DECODER_SET_PICTURE: | ||
1099 | { | ||
1100 | struct video_picture *pic = arg; | ||
1101 | if (decoder->bright != pic->brightness) { | ||
1102 | /* We want 0 to 255 we get 0-65535 */ | ||
1103 | decoder->bright = pic->brightness; | ||
1104 | tvp5150_write(c, TVP5150_BRIGHT_CTL, | ||
1105 | decoder->bright >> 8); | ||
1106 | } | ||
1107 | if (decoder->contrast != pic->contrast) { | ||
1108 | /* We want 0 to 255 we get 0-65535 */ | ||
1109 | decoder->contrast = pic->contrast; | ||
1110 | tvp5150_write(c, TVP5150_CONTRAST_CTL, | ||
1111 | decoder->contrast >> 8); | ||
1112 | } | ||
1113 | if (decoder->sat != pic->colour) { | ||
1114 | /* We want 0 to 255 we get 0-65535 */ | ||
1115 | decoder->sat = pic->colour; | ||
1116 | tvp5150_write(c, TVP5150_SATURATION_CTL, | ||
1117 | decoder->contrast >> 8); | ||
1118 | } | ||
1119 | if (decoder->hue != pic->hue) { | ||
1120 | /* We want -128 to 127 we get 0-65535 */ | ||
1121 | decoder->hue = pic->hue; | ||
1122 | tvp5150_write(c, TVP5150_HUE_CTL, | ||
1123 | (decoder->hue - 32768) >> 8); | ||
1124 | } | ||
1125 | break; | ||
1126 | } | ||
1127 | default: | 1013 | default: |
1128 | return -EINVAL; | 1014 | return -EINVAL; |
1129 | } | 1015 | } |