]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
[media] cx25840: better document the media controller TODO
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 18 Feb 2015 15:15:39 +0000 (12:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 26 Feb 2015 11:44:40 +0000 (08:44 -0300)
Analog video inputs are the tuner, plus composite, svideo, etc,
 e. g. the input pat should actually be like:

                ___________
TUNER --------> |         |
                |         |
SVIDEO .......> | cx25840 |
                |         |
COMPOSITE1 ...> |_________|

(in the above, dashes represent the enabled link, and periods
represent the disabled ones)

In other words, if we want to properly represent the pipeline,
it should be possible to see via the media controller if the tuner
is being used as an image source, or if the source is something else.

I didn't map those other inputs here yet, due to a few things:
- The extra inputs would require subdevs that won't be controlled
- I was in doubt about the best way for doing that
- That would likely require some extra setup for cx25840 caller
  drivers, in order to represent what of the possible internal
  inputs are actually used on each specific board

Actually, at least for now, I was unable to see much benefit
on adding such map now, so let's just document it, as this could
be added later on, as needed.

Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/i2c/cx25840/cx25840-core.c

index bdb5bb6b58daa5c135bacd4ccfdf21704db14d2f..cb4e03de9b751df67d3b50f928398fc07e268a29 100644 (file)
@@ -5182,7 +5182,20 @@ static int cx25840_probe(struct i2c_client *client,
        sd = &state->sd;
        v4l2_i2c_subdev_init(sd, client, &cx25840_ops);
 #if defined(CONFIG_MEDIA_CONTROLLER)
-       /* TODO: need to represent analog inputs too */
+       /*
+        * TODO: add media controller support for analog video inputs like
+        * composite, svideo, etc.
+        * A real input pad for this analog demod would be like:
+        *                 ___________
+        * TUNER --------> |         |
+        *                 |         |
+        * SVIDEO .......> | cx25840 |
+        *                 |         |
+        * COMPOSITE1 ...> |_________|
+        *
+        * However, at least for now, there's no much gain on modelling
+        * those extra inputs. So, let's add it only when needed.
+        */
        state->pads[0].flags = MEDIA_PAD_FL_SINK;       /* Tuner or input */
        state->pads[1].flags = MEDIA_PAD_FL_SOURCE;     /* Video */
        state->pads[2].flags = MEDIA_PAD_FL_SOURCE;     /* VBI */