diff options
author | Dmitri Belimov <d.belimov@gmail.com> | 2011-03-17 20:08:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 16:20:14 -0400 |
commit | 2aefbc1acb5370b0753d16c9d6e65e01fe586c75 (patch) | |
tree | 418679b6cf415d846e845eab259460d7b840a505 /drivers/staging | |
parent | 812738e11158e9b92c4f0e9278de48377cfa3cc8 (diff) |
[media] tm6000: fix s-video input
Add compatibility for composite and s-video inputs. Some TV cards hasn't
it.
Fix S-Video input, the s-video cable has only video signals no
audio. Call the function of audio configure kill chroma in signal. only
b/w video.
Known bugs:
- after s-video the audio for radio didn't work, TV crashed hardly
- after composite TV crashed hardly too.
P.S. After this patch I'll want to rework the procedure of configure
video. Now it has a lot of junk and dubles.
With my best regards, Dmitry.
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/tm6000/tm6000-cards.c | 46 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000-stds.c | 2 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 17 | ||||
-rw-r--r-- | drivers/staging/tm6000/tm6000.h | 2 |
4 files changed, 43 insertions, 24 deletions
diff --git a/drivers/staging/tm6000/tm6000-cards.c b/drivers/staging/tm6000/tm6000-cards.c index 88144a12745d..146c7e86deca 100644 --- a/drivers/staging/tm6000/tm6000-cards.c +++ b/drivers/staging/tm6000/tm6000-cards.c | |||
@@ -235,11 +235,13 @@ struct tm6000_board tm6000_boards[] = { | |||
235 | .avideo = TM6000_AIP_SIF1, | 235 | .avideo = TM6000_AIP_SIF1, |
236 | .aradio = TM6000_AIP_LINE1, | 236 | .aradio = TM6000_AIP_LINE1, |
237 | .caps = { | 237 | .caps = { |
238 | .has_tuner = 1, | 238 | .has_tuner = 1, |
239 | .has_dvb = 1, | 239 | .has_dvb = 1, |
240 | .has_zl10353 = 1, | 240 | .has_zl10353 = 1, |
241 | .has_eeprom = 1, | 241 | .has_eeprom = 1, |
242 | .has_remote = 1, | 242 | .has_remote = 1, |
243 | .has_input_comp = 1, | ||
244 | .has_input_svid = 1, | ||
243 | }, | 245 | }, |
244 | .gpio = { | 246 | .gpio = { |
245 | .tuner_reset = TM6010_GPIO_0, | 247 | .tuner_reset = TM6010_GPIO_0, |
@@ -255,11 +257,13 @@ struct tm6000_board tm6000_boards[] = { | |||
255 | .avideo = TM6000_AIP_SIF1, | 257 | .avideo = TM6000_AIP_SIF1, |
256 | .aradio = TM6000_AIP_LINE1, | 258 | .aradio = TM6000_AIP_LINE1, |
257 | .caps = { | 259 | .caps = { |
258 | .has_tuner = 1, | 260 | .has_tuner = 1, |
259 | .has_dvb = 0, | 261 | .has_dvb = 0, |
260 | .has_zl10353 = 0, | 262 | .has_zl10353 = 0, |
261 | .has_eeprom = 1, | 263 | .has_eeprom = 1, |
262 | .has_remote = 1, | 264 | .has_remote = 1, |
265 | .has_input_comp = 1, | ||
266 | .has_input_svid = 1, | ||
263 | }, | 267 | }, |
264 | .gpio = { | 268 | .gpio = { |
265 | .tuner_reset = TM6010_GPIO_0, | 269 | .tuner_reset = TM6010_GPIO_0, |
@@ -327,10 +331,13 @@ struct tm6000_board tm6000_boards[] = { | |||
327 | .avideo = TM6000_AIP_SIF1, | 331 | .avideo = TM6000_AIP_SIF1, |
328 | .aradio = TM6000_AIP_LINE1, | 332 | .aradio = TM6000_AIP_LINE1, |
329 | .caps = { | 333 | .caps = { |
330 | .has_tuner = 1, | 334 | .has_tuner = 1, |
331 | .has_dvb = 1, | 335 | .has_dvb = 1, |
332 | .has_zl10353 = 1, | 336 | .has_zl10353 = 1, |
333 | .has_eeprom = 1, | 337 | .has_eeprom = 1, |
338 | .has_remote = 0, | ||
339 | .has_input_comp = 0, | ||
340 | .has_input_svid = 0, | ||
334 | }, | 341 | }, |
335 | .gpio = { | 342 | .gpio = { |
336 | .tuner_reset = TM6010_GPIO_0, | 343 | .tuner_reset = TM6010_GPIO_0, |
@@ -346,10 +353,13 @@ struct tm6000_board tm6000_boards[] = { | |||
346 | .avideo = TM6000_AIP_SIF1, | 353 | .avideo = TM6000_AIP_SIF1, |
347 | .aradio = TM6000_AIP_LINE1, | 354 | .aradio = TM6000_AIP_LINE1, |
348 | .caps = { | 355 | .caps = { |
349 | .has_tuner = 1, | 356 | .has_tuner = 1, |
350 | .has_dvb = 0, | 357 | .has_dvb = 0, |
351 | .has_zl10353 = 0, | 358 | .has_zl10353 = 0, |
352 | .has_eeprom = 1, | 359 | .has_eeprom = 1, |
360 | .has_remote = 0, | ||
361 | .has_input_comp = 0, | ||
362 | .has_input_svid = 0, | ||
353 | }, | 363 | }, |
354 | .gpio = { | 364 | .gpio = { |
355 | .tuner_reset = TM6010_GPIO_0, | 365 | .tuner_reset = TM6010_GPIO_0, |
diff --git a/drivers/staging/tm6000/tm6000-stds.c b/drivers/staging/tm6000/tm6000-stds.c index a4c07e5a6f1d..da3e51bde109 100644 --- a/drivers/staging/tm6000/tm6000-stds.c +++ b/drivers/staging/tm6000/tm6000-stds.c | |||
@@ -1161,8 +1161,6 @@ int tm6000_set_standard(struct tm6000_core *dev, v4l2_std_id * norm) | |||
1161 | rc = tm6000_load_std(dev, svideo_stds[i].common, | 1161 | rc = tm6000_load_std(dev, svideo_stds[i].common, |
1162 | sizeof(svideo_stds[i]. | 1162 | sizeof(svideo_stds[i]. |
1163 | common)); | 1163 | common)); |
1164 | tm6000_set_audio_std(dev, svideo_stds[i].audio_default_std); | ||
1165 | |||
1166 | goto ret; | 1164 | goto ret; |
1167 | } | 1165 | } |
1168 | } | 1166 | } |
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index b5503409ca55..c80a316d9d8f 100644 --- a/drivers/staging/tm6000/tm6000-video.c +++ b/drivers/staging/tm6000/tm6000-video.c | |||
@@ -1080,18 +1080,27 @@ static int vidioc_s_std (struct file *file, void *priv, v4l2_std_id *norm) | |||
1080 | static int vidioc_enum_input(struct file *file, void *priv, | 1080 | static int vidioc_enum_input(struct file *file, void *priv, |
1081 | struct v4l2_input *inp) | 1081 | struct v4l2_input *inp) |
1082 | { | 1082 | { |
1083 | struct tm6000_fh *fh = priv; | ||
1084 | struct tm6000_core *dev = fh->dev; | ||
1085 | |||
1083 | switch (inp->index) { | 1086 | switch (inp->index) { |
1084 | case TM6000_INPUT_TV: | 1087 | case TM6000_INPUT_TV: |
1085 | inp->type = V4L2_INPUT_TYPE_TUNER; | 1088 | inp->type = V4L2_INPUT_TYPE_TUNER; |
1086 | strcpy(inp->name, "Television"); | 1089 | strcpy(inp->name, "Television"); |
1087 | break; | 1090 | break; |
1088 | case TM6000_INPUT_COMPOSITE: | 1091 | case TM6000_INPUT_COMPOSITE: |
1089 | inp->type = V4L2_INPUT_TYPE_CAMERA; | 1092 | if (dev->caps.has_input_comp) { |
1090 | strcpy(inp->name, "Composite"); | 1093 | inp->type = V4L2_INPUT_TYPE_CAMERA; |
1094 | strcpy(inp->name, "Composite"); | ||
1095 | } else | ||
1096 | return -EINVAL; | ||
1091 | break; | 1097 | break; |
1092 | case TM6000_INPUT_SVIDEO: | 1098 | case TM6000_INPUT_SVIDEO: |
1093 | inp->type = V4L2_INPUT_TYPE_CAMERA; | 1099 | if (dev->caps.has_input_svid) { |
1094 | strcpy(inp->name, "S-Video"); | 1100 | inp->type = V4L2_INPUT_TYPE_CAMERA; |
1101 | strcpy(inp->name, "S-Video"); | ||
1102 | } else | ||
1103 | return -EINVAL; | ||
1095 | break; | 1104 | break; |
1096 | default: | 1105 | default: |
1097 | return -EINVAL; | 1106 | return -EINVAL; |
diff --git a/drivers/staging/tm6000/tm6000.h b/drivers/staging/tm6000/tm6000.h index ccd120fe1340..99ae50e82b28 100644 --- a/drivers/staging/tm6000/tm6000.h +++ b/drivers/staging/tm6000/tm6000.h | |||
@@ -129,6 +129,8 @@ struct tm6000_capabilities { | |||
129 | unsigned int has_zl10353:1; | 129 | unsigned int has_zl10353:1; |
130 | unsigned int has_eeprom:1; | 130 | unsigned int has_eeprom:1; |
131 | unsigned int has_remote:1; | 131 | unsigned int has_remote:1; |
132 | unsigned int has_input_comp:1; | ||
133 | unsigned int has_input_svid:1; | ||
132 | }; | 134 | }; |
133 | 135 | ||
134 | struct tm6000_dvb { | 136 | struct tm6000_dvb { |