diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-05 07:56:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 16:13:59 -0400 |
commit | f659f0e7a66245295e1930ad21dfabf80c1403bf (patch) | |
tree | 752dd5316d29ba88a151216d323e11ec16384a36 | |
parent | 1a806401656129e5fed10da24973e59e9f1d2e88 (diff) |
[media] ivtv: fix v4l2-compliance error: inconsistent std reporting
The tuner input has a different standard mask than a S-Video or Composite input.
Changing the standard should change tvnorms as well for all device nodes.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 0b0250a7583f..e5ce970266f3 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c | |||
@@ -987,6 +987,8 @@ static int ivtv_g_input(struct file *file, void *fh, unsigned int *i) | |||
987 | int ivtv_s_input(struct file *file, void *fh, unsigned int inp) | 987 | int ivtv_s_input(struct file *file, void *fh, unsigned int inp) |
988 | { | 988 | { |
989 | struct ivtv *itv = fh2id(fh)->itv; | 989 | struct ivtv *itv = fh2id(fh)->itv; |
990 | v4l2_std_id std; | ||
991 | int i; | ||
990 | 992 | ||
991 | if (inp < 0 || inp >= itv->nof_inputs) | 993 | if (inp < 0 || inp >= itv->nof_inputs) |
992 | return -EINVAL; | 994 | return -EINVAL; |
@@ -1008,6 +1010,13 @@ int ivtv_s_input(struct file *file, void *fh, unsigned int inp) | |||
1008 | input type. */ | 1010 | input type. */ |
1009 | itv->audio_input = itv->card->video_inputs[inp].audio_index; | 1011 | itv->audio_input = itv->card->video_inputs[inp].audio_index; |
1010 | 1012 | ||
1013 | if (itv->card->video_inputs[inp].video_type == IVTV_CARD_INPUT_VID_TUNER) | ||
1014 | std = itv->tuner_std; | ||
1015 | else | ||
1016 | std = V4L2_STD_ALL; | ||
1017 | for (i = 0; i <= IVTV_ENC_STREAM_TYPE_VBI; i++) | ||
1018 | itv->streams[i].vdev->tvnorms = std; | ||
1019 | |||
1011 | /* prevent others from messing with the streams until | 1020 | /* prevent others from messing with the streams until |
1012 | we're finished changing inputs. */ | 1021 | we're finished changing inputs. */ |
1013 | ivtv_mute(itv); | 1022 | ivtv_mute(itv); |