mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-01 10:33:27 +00:00
[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>
This commit is contained in:
parent
1a80640165
commit
f659f0e7a6
1 changed files with 9 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue