Skip to content

Commit

Permalink
media: mxb: update the tvnorms when changing input
Browse files Browse the repository at this point in the history
The tuner input uses different tvnorms compared to the
S-Video/Composite inputs. So update the tvnorms field
in struct video_device when switching inputs.

This fixes a V4L2 compliance issue.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Apr 15, 2023
1 parent b2943a0 commit 1ba2615
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/pci/saa7146/mxb.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,9 @@ static int vidioc_s_input(struct file *file, void *fh, unsigned int input)
if (err)
return err;

mxb->video_dev.tvnorms = mxb_inputs[input].std;
mxb->vbi_dev.tvnorms = mxb_inputs[input].std;

/* switch video in saa7111a */
if (saa7111a_call(mxb, video, s_routing, i, SAA7111_FMT_CCIR, 0))
pr_err("VIDIOC_S_INPUT: could not address saa7111a\n");
Expand Down

0 comments on commit 1ba2615

Please sign in to comment.