diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-05 08:56:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 17:13:59 -0300 |
commit | f659f0e7a66245295e1930ad21dfabf80c1403bf (patch) | |
tree | 752dd5316d29ba88a151216d323e11ec16384a36 /drivers/media/pci | |
parent | 1a806401656129e5fed10da24973e59e9f1d2e88 (diff) | |
download | linux-f659f0e7a66245295e1930ad21dfabf80c1403bf.tar.gz linux-f659f0e7a66245295e1930ad21dfabf80c1403bf.tar.bz2 linux-f659f0e7a66245295e1930ad21dfabf80c1403bf.zip |
[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>
Diffstat (limited to 'drivers/media/pci')
-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) int ivtv_s_input(struct file *file, void *fh, unsigned int inp) { struct ivtv *itv = fh2id(fh)->itv; + v4l2_std_id std; + int i; if (inp < 0 || inp >= itv->nof_inputs) return -EINVAL; @@ -1008,6 +1010,13 @@ int ivtv_s_input(struct file *file, void *fh, unsigned int inp) input type. */ itv->audio_input = itv->card->video_inputs[inp].audio_index; + if (itv->card->video_inputs[inp].video_type == IVTV_CARD_INPUT_VID_TUNER) + std = itv->tuner_std; + else + std = V4L2_STD_ALL; + for (i = 0; i <= IVTV_ENC_STREAM_TYPE_VBI; i++) + itv->streams[i].vdev->tvnorms = std; + /* prevent others from messing with the streams until we're finished changing inputs. */ ivtv_mute(itv); |