06 Aug, 2020

1 commit

  • Silence documentation build warnings by correcting kernel-doc comment
    v4l2_create_fwnode_links_to_pad and v4l2_create_fwnode_links functions.

    ./include/media/v4l2-mc.h:110: warning: Function parameter or member 'src_sd' not described in 'v4l2_create_fwnode_links_to_pad'
    ./include/media/v4l2-mc.h:110: warning: Function parameter or member 'sink' not described in 'v4l2_create_fwnode_links_to_pad'
    ./include/media/v4l2-mc.h:134: warning: Function parameter or member 'src_sd' not described in 'v4l2_create_fwnode_links'
    ./include/media/v4l2-mc.h:134: warning: Function parameter or member 'sink_sd' not described in 'v4l2_create_fwnode_links'

    Signed-off-by: Colton Lewis
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Colton Lewis
     

18 May, 2020

1 commit

  • Add functions to create media links between source and sink subdevices,
    based on the fwnode endpoint connections between them:

    v4l2_create_fwnode_links_to_pad() - create links from a source subdev to
    a single sink pad based on fwnode
    endpoint connections.

    v4l2_create_fwnode_links() - create all links from a source to sink subdev
    based on fwnode endpoint connections.

    These functions can be used in a sink's v4l2-async notifier subdev
    bound callback to make the links from the bound subdev.

    Signed-off-by: Steve Longerbeam
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Steve Longerbeam
     

02 Mar, 2020

1 commit

  • Currently, v4l2_pipeline_pm_use() prototype is:

    int v4l2_pipeline_pm_use(struct media_entity *entity, int use)

    Where the 'use' argument shall only be set to '1' for enable/power-on,
    or to '0' for disable/power-off. The integer return is specified
    as only meaningful when 'use' is set to '1'.

    Let's enforce this semantic by splitting the function in two:
    v4l2_pipeline_pm_get and v4l2_pipeline_pm_put. This is done
    for several reasons.

    It makes the API easier to use (or harder to misuse).
    It removes the constraint on the values the 'use' argument
    shall take. Also, it removes the need to constraint
    the return value, by making v4l2_pipeline_pm_put void return.

    And last, it's more consistent with other kernel APIs, such
    as the runtime pm APIs, which makes the code more symmetric.

    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Ezequiel Garcia
     

31 May, 2019

1 commit

  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

18 Sep, 2018

2 commits


22 Sep, 2016

1 commit

  • As warned by linuxdoc[1] tool, using:

    $ for i in $(git grep kernel-doc Documentation/media/kapi/|cut -d: -f4); do kernel-lintdoc --sloppy $i; done

    include/media/v4l2-dev.h:118 :WARN: function name from comment differs: v4l2_prio_close v4l2_prio_check
    include/media/v4l2-mc.h:56 [kernel-doc WARN] : enum name from comment differs: if_vid_dec_index if_vid_dec_pad_index
    include/media/v4l2-mc.h:71 [kernel-doc WARN] : enum name from comment differs: if_aud_dec_index if_aud_dec_pad_index
    include/media/v4l2-mem2mem.h:396 [kernel-doc WARN] : function name from comment differs: v4l2_m2m_num_src_bufs_ready v4l2_m2m_num_dst_bufs_ready
    drivers/media/dvb-core/dvb_math.h:28 [kernel-doc WARN] : function name from comment differs: cintlog2 intlog2
    include/media/v4l2-subdev.h:215 [kernel-doc WARN] : struct name from comment differs: s_radio v4l2_subdev_tuner_ops
    include/media/v4l2-subdev.h:890 [kernel-doc WARN] : function name from comment differs: v4l2_set_subdevdata v4l2_set_subdev_hostdata
    include/media/v4l2-subdev.h:901 [kernel-doc WARN] : function name from comment differs: v4l2_get_subdevdata v4l2_get_subdev_hostdata
    drivers/media/dvb-core/dvb_ringbuffer.h:196 [kernel-doc WARN] : function name from comment differs: dvb_ringbuffer_writeuser dvb_ringbuffer_write_user
    include/media/videobuf2-core.h:399 [kernel-doc WARN] : struct name from comment differs: vb2_ops vb2_buf_ops
    include/media/media-entity.h:132 [kernel-doc ERROR] : duplicate parameter definition 'source'
    include/media/media-entity.h:477 [kernel-doc WARN] : function name from comment differs: media_entity_enum_test media_entity_enum_test_and_set
    include/media/media-entity.h:535 [kernel-doc WARN] : function name from comment differs: gobj_to_entity gobj_to_pad
    include/media/media-entity.h:544 [kernel-doc WARN] : function name from comment differs: gobj_to_entity gobj_to_link
    include/media/media-entity.h:553 [kernel-doc WARN] : function name from comment differs: gobj_to_entity gobj_to_intf
    include/media/media-entity.h:562 [kernel-doc WARN] : function name from comment differs: gobj_to_entity intf_to_devnode
    include/media/rc-core.h:234 [kernel-doc WARN] : function name from comment differs: rc_open rc_close
    include/media/v4l2-ctrls.h:397 [kernel-doc WARN] : missing initial short description of 'v4l2_ctrl_handler_init'
    include/media/v4l2-dev.h:118 [kernel-doc WARN] : function name from comment differs: v4l2_prio_close v4l2_prio_check
    include/media/v4l2-event.h:225 [kernel-doc WARN] : missing initial short description of 'v4l2_src_change_event_subscribe'

    [1] https://return42.github.io/linuxdoc/linux.html

    The above are real issues at the documentation. On several cases,
    caused by cut-and-paste.

    Fix them.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

18 Jul, 2016

1 commit

  • The conversion from DocBook lead into some conversion issues,
    basically due to the lack of proper support at kernel-doc.

    So, address them:

    - Now, the C files with the exported symbols also need to be
    added. So, all headers need to be included twice: one to
    get the structs/enums/.. and another one for the functions;

    - Notes should use the ReST tag, as kernel-doc doesn't
    recognizes it anymore;

    - Identation needs to be fixed, as ReST uses it to identify
    when a format "tag" ends.

    - kernel-doc doesn't escape things like *pointer, so we
    need to manually add a escape char before it.

    - On some cases, kernel-doc conversion requires violating
    the 80-cols, as otherwise it won't properly parse the
    source code.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

15 Jun, 2016

1 commit

  • For the third time in three years, I'm changing my e-mail at
    Samsung. That's bad, as it may stop communications with me for
    a while. So, this time, I'll also the mchehab@kernel.org e-mail,
    as it remains stable since ever.

    Cc: stable@vger.kernel.org
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

04 Mar, 2016

2 commits

  • The newly added functions have an extra semicolon, which
    prevents compilation, and they need to be marked inline:

    In file included from ../include/media/tuner.h:23:0,
    from ../drivers/media/tuners/tuner-simple.c:10:
    ../include/media/v4l2-mc.h:233:1: error: expected identifier or '(' before '{' token

    Remove spurious return, remove copy-and-pasted semi-colons, add static
    inline.

    Fixes: a77bf7048add ("v4l2-mc.h: Add stubs for the V4L2 PM/pipeline routines")

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Fix these warnings when CONFIG_MEDIA_CONTROLLER is not defined:

    In file included from drivers/media/v4l2-core/v4l2-fh.c:32:0:
    include/media/v4l2-mc.h:173:12: warning: 'v4l_enable_media_source' defined but not used [-Wunused-function]
    static int v4l_enable_media_source(struct video_device *vdev)
    ^
    include/media/v4l2-mc.h:183:12: warning: 'v4l_vb2q_enable_media_source' defined but not used [-Wunused-function]
    static int v4l_vb2q_enable_media_source(struct vb2_queue *q)
    ^
    In file included from include/media/tuner.h:23:0,
    from drivers/media/tuners/tuner-types.c:9:
    include/media/v4l2-mc.h:173:12: warning: 'v4l_enable_media_source' defined but not used [-Wunused-function]
    static int v4l_enable_media_source(struct video_device *vdev)
    ^
    include/media/v4l2-mc.h:178:13: warning: 'v4l_disable_media_source' defined but not used [-Wunused-function]
    static void v4l_disable_media_source(struct video_device *vdev)
    ^

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

03 Mar, 2016

4 commits


27 Feb, 2016

1 commit

  • Add a new interfaces to be used by v4l-core to invoke enable
    source and disable_source handlers in the media_device. The
    enable_source helper function invokes the enable_source handler
    to find media source entity connected to the entity and check
    is it is available or busy. If source is available, link is
    activated and pipeline is started. The disable_source helper
    function invokes the disable_source handler to deactivate and
    stop the pipeline.

    Signed-off-by: Shuah Khan
    Signed-off-by: Mauro Carvalho Chehab

    Shuah Khan
     

23 Feb, 2016

1 commit

  • Those ancillary functions could be called even when compiled
    without V4L2 support, as warned by ktest build robot:

    All errors (new ones prefixed by >>):

    >> ERROR: "__v4l2_mc_usb_media_device_init" [drivers/media/usb/dvb-usb/dvb-usb.ko] undefined!
    >> ERROR: "__v4l2_mc_usb_media_device_init" [drivers/media/usb/dvb-usb-v2/dvb_usb_v2.ko] undefined!
    >> ERROR: "__v4l2_mc_usb_media_device_init" [drivers/media/usb/au0828/au0828.ko] undefined!

    Also, there's nothing there that are specific to V4L2. So, move
    those ancillary functions to MC core.

    No functional changes. Just function rename.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

16 Feb, 2016

2 commits


10 Feb, 2016

2 commits


01 Feb, 2016

4 commits

  • We also need to standardize the PAD index macros for demods,
    as they all should look the same in a media graph.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The audio and video IF-PLL decoders have one sink and one source
    PAD. Add macro names for those pads and describe what kind of
    signals are represented at such pads.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Analog TV tuners have a separate output pad for the audio
    IF or audio sampled data. This pad is connected to a different
    chipset.

    Add an extra pad for it and improve the documentation.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The customer PC hardware can be shipped with lots of different
    configurations, as vendors use to replace some of the chips on
    their hardware along the time. All drivers that support such
    devices are prepared to handle the hardware differences, using
    their own auto-probing logic.

    They do it in a way that number of inputs and outputs for a given
    hardware type doesn't change.

    Now that we're adding media controller capabilities to those drivers,
    we need to standardize the number of inputs and outputs for each
    hardware type, as we want to have a generic function at the V4L2
    core that would create the links for the entities that are expected
    on such hardware.

    Such standard is already there for tuners, but tuner.h is not the
    best place to store such data, as we'll need to add definitions also
    for analog TV demodulators.

    Also, we'll need a place to put a set of MC handling functions. So,
    let's create a v4l2-mc.h to store such kind of definitions.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab