[media] vpif_capture: move routing info from subdev to input
Routing information is a property of the input, not of the subdev. One subdev may provide multiple inputs, each with its own routing information. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sekhar Nori <nsekhar@ti.com> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Tested-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
33bf178660
commit
7aaad13124
@@ -1464,6 +1464,9 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)
|
||||
|
||||
chan_cfg = &config->chan_config[ch->channel_id];
|
||||
|
||||
if (index >= chan_cfg->input_count)
|
||||
return -EINVAL;
|
||||
|
||||
if (common->started) {
|
||||
vpif_err("Streaming in progress\n");
|
||||
return -EBUSY;
|
||||
@@ -1502,8 +1505,8 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index)
|
||||
}
|
||||
}
|
||||
|
||||
input = subdev_info->input;
|
||||
output = subdev_info->output;
|
||||
input = chan_cfg->inputs[index].input_route;
|
||||
output = chan_cfg->inputs[index].output_route;
|
||||
ret = v4l2_subdev_call(vpif_obj.sd[sd_index], video, s_routing,
|
||||
input, output, 0);
|
||||
if (ret < 0 && ret != -ENOIOCTLCMD) {
|
||||
|
Reference in New Issue
Block a user