mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
media: common: saa7146: allow S_STD(G_STD)
If the requested TV standard is identical to the current TV standard, then return 0, even when the vb2 queues are busy. This fixes a V4L2 compliance issue. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
ff6dad2f95
commit
b2943a0e9a
1 changed files with 8 additions and 3 deletions
|
@ -463,14 +463,19 @@ static int vidioc_s_std(struct file *file, void *fh, v4l2_std_id id)
|
||||||
|
|
||||||
DEB_EE("VIDIOC_S_STD\n");
|
DEB_EE("VIDIOC_S_STD\n");
|
||||||
|
|
||||||
|
for (i = 0; i < dev->ext_vv_data->num_stds; i++)
|
||||||
|
if (id & dev->ext_vv_data->stds[i].id)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (i != dev->ext_vv_data->num_stds &&
|
||||||
|
vv->standard == &dev->ext_vv_data->stds[i])
|
||||||
|
return 0;
|
||||||
|
|
||||||
if (vb2_is_busy(&vv->video_dmaq.q) || vb2_is_busy(&vv->vbi_dmaq.q)) {
|
if (vb2_is_busy(&vv->video_dmaq.q) || vb2_is_busy(&vv->vbi_dmaq.q)) {
|
||||||
DEB_D("cannot change video standard while streaming capture is active\n");
|
DEB_D("cannot change video standard while streaming capture is active\n");
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < dev->ext_vv_data->num_stds; i++)
|
|
||||||
if (id & dev->ext_vv_data->stds[i].id)
|
|
||||||
break;
|
|
||||||
if (i != dev->ext_vv_data->num_stds) {
|
if (i != dev->ext_vv_data->num_stds) {
|
||||||
vv->standard = &dev->ext_vv_data->stds[i];
|
vv->standard = &dev->ext_vv_data->stds[i];
|
||||||
if (NULL != dev->ext_vv_data->std_callback)
|
if (NULL != dev->ext_vv_data->std_callback)
|
||||||
|
|
Loading…
Reference in a new issue