diff mbox

[2/2,media] docs-rst: add V4L2_INPUT_TYPE_DEFAULT

Message ID 1490889738-30009-2-git-send-email-helen.koike@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Helen Mae Koike Fornazier March 30, 2017, 4:02 p.m. UTC
add documentation for V4L2_INPUT_TYPE_DEFAULT

Signed-off-by: Helen Koike <helen.koike@collabora.com>
---
 Documentation/media/uapi/v4l/vidioc-enuminput.rst | 3 +++
 1 file changed, 3 insertions(+)

Comments

Sakari Ailus March 30, 2017, 8:26 p.m. UTC | #1
Hi Helen and others,

On Thu, Mar 30, 2017 at 01:02:18PM -0300, Helen Koike wrote:
> add documentation for V4L2_INPUT_TYPE_DEFAULT
> 
> Signed-off-by: Helen Koike <helen.koike@collabora.com>
> ---
>  Documentation/media/uapi/v4l/vidioc-enuminput.rst | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/media/uapi/v4l/vidioc-enuminput.rst b/Documentation/media/uapi/v4l/vidioc-enuminput.rst
> index 17aaaf9..0237e10 100644
> --- a/Documentation/media/uapi/v4l/vidioc-enuminput.rst
> +++ b/Documentation/media/uapi/v4l/vidioc-enuminput.rst
> @@ -112,6 +112,9 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
>      :stub-columns: 0
>      :widths:       3 1 4
>  
> +    * - ``V4L2_INPUT_TYPE_DEFAULT``
> +      - 0
> +      - This is the default value returned when no input is supported.
>      * - ``V4L2_INPUT_TYPE_TUNER``
>        - 1
>        - This input uses a tuner (RF demodulator).

What would you think of calling this input as "unknown" instead of
"default"? That's what an input which isn't really specified actually is.
Mauro Carvalho Chehab March 31, 2017, 9:47 a.m. UTC | #2
Em Thu, 30 Mar 2017 23:26:26 +0300
Sakari Ailus <sakari.ailus@iki.fi> escreveu:

> Hi Helen and others,
> 
> On Thu, Mar 30, 2017 at 01:02:18PM -0300, Helen Koike wrote:
> > add documentation for V4L2_INPUT_TYPE_DEFAULT
> > 
> > Signed-off-by: Helen Koike <helen.koike@collabora.com>
> > ---
> >  Documentation/media/uapi/v4l/vidioc-enuminput.rst | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/Documentation/media/uapi/v4l/vidioc-enuminput.rst b/Documentation/media/uapi/v4l/vidioc-enuminput.rst
> > index 17aaaf9..0237e10 100644
> > --- a/Documentation/media/uapi/v4l/vidioc-enuminput.rst
> > +++ b/Documentation/media/uapi/v4l/vidioc-enuminput.rst
> > @@ -112,6 +112,9 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
> >      :stub-columns: 0
> >      :widths:       3 1 4
> >  
> > +    * - ``V4L2_INPUT_TYPE_DEFAULT``
> > +      - 0
> > +      - This is the default value returned when no input is supported.

Input *IS* supported. The device has one input. So, the description is wrong ;)

> >      * - ``V4L2_INPUT_TYPE_TUNER``
> >        - 1
> >        - This input uses a tuner (RF demodulator).  
> 
> What would you think of calling this input as "unknown" instead of
> "default"? That's what an input which isn't really specified actually is.

Yeah, default seems a bad name to me, too.

Actually, I think that the best here would be to not create a new type.
just use V4L2_INPUT_TYPE_CAMERA. That's actually the default for the
embedded drivers. If a driver is providing input for something else,
then it should implement vidioc_enuminput method.

Thanks,
Mauro
diff mbox

Patch

diff --git a/Documentation/media/uapi/v4l/vidioc-enuminput.rst b/Documentation/media/uapi/v4l/vidioc-enuminput.rst
index 17aaaf9..0237e10 100644
--- a/Documentation/media/uapi/v4l/vidioc-enuminput.rst
+++ b/Documentation/media/uapi/v4l/vidioc-enuminput.rst
@@ -112,6 +112,9 @@  at index zero, incrementing by one until the driver returns ``EINVAL``.
     :stub-columns: 0
     :widths:       3 1 4
 
+    * - ``V4L2_INPUT_TYPE_DEFAULT``
+      - 0
+      - This is the default value returned when no input is supported.
     * - ``V4L2_INPUT_TYPE_TUNER``
       - 1
       - This input uses a tuner (RF demodulator).