diff options
author | Dmitri Belimov <d.belimov@gmail.com> | 2011-03-17 21:08:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 17:20:14 -0300 |
commit | 2aefbc1acb5370b0753d16c9d6e65e01fe586c75 (patch) | |
tree | 418679b6cf415d846e845eab259460d7b840a505 /drivers/staging/tm6000/tm6000-video.c | |
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/tm6000/tm6000-video.c')
-rw-r--r-- | drivers/staging/tm6000/tm6000-video.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/staging/tm6000/tm6000-video.c b/drivers/staging/tm6000/tm6000-video.c index b5503409ca5..c80a316d9d8 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) static int vidioc_enum_input(struct file *file, void *priv, struct v4l2_input *inp) { + struct tm6000_fh *fh = priv; + struct tm6000_core *dev = fh->dev; + switch (inp->index) { case TM6000_INPUT_TV: inp->type = V4L2_INPUT_TYPE_TUNER; strcpy(inp->name, "Television"); break; case TM6000_INPUT_COMPOSITE: - inp->type = V4L2_INPUT_TYPE_CAMERA; - strcpy(inp->name, "Composite"); + if (dev->caps.has_input_comp) { + inp->type = V4L2_INPUT_TYPE_CAMERA; + strcpy(inp->name, "Composite"); + } else + return -EINVAL; break; case TM6000_INPUT_SVIDEO: - inp->type = V4L2_INPUT_TYPE_CAMERA; - strcpy(inp->name, "S-Video"); + if (dev->caps.has_input_svid) { + inp->type = V4L2_INPUT_TYPE_CAMERA; + strcpy(inp->name, "S-Video"); + } else + return -EINVAL; break; default: return -EINVAL; |