16 Apr, 2020

1 commit


15 Apr, 2020

1 commit

  • test_drivers/ folder is not being added by media Makefile, so it is not
    being compiled.

    Add test_drivers/ folder in Makefile folder's list.

    Fixes: 4b32216adb010 ("media: split test drivers from platform directory")
    Signed-off-by: Helen Koike
    Signed-off-by: Mauro Carvalho Chehab

    Helen Koike
     

29 May, 2019

1 commit

  • It is really weird that the media controller sources are all top-level
    in drivers/media. It is a bit of a left-over from long ago when most
    media sources were all at the top-level. At some point we reorganized
    the directory structure, but the media-*.c sources where never moved
    to their own directory.

    So create a new mc directory and move all sources there. Also rename
    the prefix from media- to mc-.

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

    Hans Verkuil
     

22 Apr, 2019

1 commit

  • Media Device Allocator API to allows multiple drivers share a media device.
    This API solves a very common use-case for media devices where one physical
    device (an USB stick) provides both audio and video. When such media device
    exposes a standard USB Audio class, a proprietary Video class, two or more
    independent drivers will share a single physical USB bridge. In such cases,
    it is necessary to coordinate access to the shared resource.

    Using this API, drivers can allocate a media device with the shared struct
    device as the key. Once the media device is allocated by a driver, other
    drivers can get a reference to it. The media device is released when all
    the references are released.

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

    Shuah Khan
     

31 Aug, 2018

1 commit

  • Add initial media request support:

    1) Add MEDIA_IOC_REQUEST_ALLOC ioctl support to media-device.c
    2) Add struct media_request to store request objects.
    3) Add struct media_request_object to represent a request object.
    4) Add MEDIA_REQUEST_IOC_QUEUE/REINIT ioctl support.

    Basic lifecycle: the application allocates a request, adds
    objects to it, queues the request, polls until it is completed
    and can then read the final values of the objects at the time
    of completion. When it closes the file descriptor the request
    memory will be freed (actually, when the last user of that request
    releases the request).

    Drivers will bind an object to a request (the 'adds objects to it'
    phase), when MEDIA_REQUEST_IOC_QUEUE is called the request is
    validated (req_validate op), then queued (the req_queue op).

    When done with an object it can either be unbound from the request
    (e.g. when the driver has finished with a vb2 buffer) or marked as
    completed (e.g. for controls associated with a buffer). When all
    objects in the request are completed (or unbound), then the request
    fd will signal an exception (poll).

    Co-developed-by: Sakari Ailus
    Co-developed-by: Laurent Pinchart
    Co-developed-by: Alexandre Courbot

    Signed-off-by: Hans Verkuil
    Signed-off-by: Sakari Ailus
    Reviewed-by: Mauro Carvalho Chehab
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

05 Jun, 2017

1 commit

  • The CEC framework is used by both drm and media. That makes it tricky
    to get the dependencies right.

    This patch moves the CEC_CORE and MEDIA_CEC_NOTIFIER config options
    out of the media menu and instead drivers that want to use CEC should
    select CEC_CORE and MEDIA_CEC_NOTIFIER (if needed).

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

    Hans Verkuil
     

19 Apr, 2017

1 commit

  • The Kconfig options for the CEC subsystem were a bit messy. In
    addition there were two cec sources (cec-edid.c and cec-notifier.c)
    that were outside of the media/cec directory, which was weird.

    Move those sources to media/cec as well.

    The cec-edid and cec-notifier functionality is now part of the cec
    module and these are no longer separate modules.

    Also remove the MEDIA_CEC_EDID config option and include it with the
    main CEC config option (which defined CEC_EDID anyway).

    Added static inlines to cec-edid.h for dummy functions when CEC_CORE
    isn't defined.

    CEC drivers should now depend on CEC_CORE.

    CEC drivers that need the cec-notifier functionality must explicitly
    select CEC_NOTIFIER.

    The s5p-cec and stih-cec drivers depended on VIDEO_DEV instead of
    CEC_CORE, fix that as well.

    Signed-off-by: Hans Verkuil
    Acked-by: Benjamin Gaignard
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

10 Apr, 2017

1 commit

  • Add support for CEC notifiers, which is used to convey CEC physical address
    information from video drivers to their CEC counterpart driver(s).

    Based on an earlier version from Russell King:

    https://patchwork.kernel.org/patch/9277043/

    The cec_notifier is a reference counted object containing the CEC physical address
    state of a video device.

    When a new notifier is registered the current state will be reported to
    that notifier at registration time.

    Signed-off-by: Hans Verkuil
    Tested-by: Marek Szyprowski
    Tested-by: Benjamin Gaignard
    Acked-by: Daniel Vetter
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     

17 Nov, 2016

1 commit


20 Sep, 2016

1 commit

  • You can read datasheet here:
    http://www.c-dis.net/media/871/GS1662_Datasheet.pdf

    It's a component which supports HD and SD CEA or SDI formats
    to SDI output. It's configured through SPI bus.

    GS1662 driver is implemented as v4l2 subdev.

    Signed-off-by: Charles-Antoine Couret
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Charles-Antoine Couret
     

09 Jul, 2016

1 commit

  • - Use IS_REACHABLE(RC_CORE) instead of IS_ENABLED: if cec is built-in and
    RC_CORE is a module, then CEC can't reach the RC symbols.
    - Both cec and cec-edid should be bool and use the same build 'mode' as
    MEDIA_SUPPORT (just as is done for the media controller code).
    - Add a note to staging that this should be changed once the cec framework
    is moved out of staging.

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

    Hans Verkuil
     

28 Jun, 2016

1 commit

  • The cec-edid module contains helper functions to find and manipulate
    the CEC physical address inside an EDID. Even if the CEC support itself
    is disabled, drivers will still need these functions. Which is the
    reason this is module is separate from the upcoming CEC framework.

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

    Hans Verkuil
     

17 Dec, 2014

1 commit

  • These drivers haven't been tested in a long, long time. The hardware is
    ancient and hopelessly obsolete. These drivers also need to be converted
    to newer media frameworks but due to the lack of hardware that's going
    to be impossible. In addition, cheaper and vastly better hardware is
    available today.

    So these drivers are a prime candidate for removal. If someone is
    interested in working on these drivers to prevent their removal, then
    please contact the linux-media mailinglist.

    Let's be honest, the age of parallel port webcams and ISA video capture
    boards is really gone.

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

    Hans Verkuil
     

07 Sep, 2012

1 commit

  • Based on a patch from Sylvester Nawrocki

    This fixes regression introduced with commmit cb7a01ac324bf2ee2,
    "[media] move i2c files into drivers/media/i2c".

    The linked order affect what drivers will be initialized first, when
    they're built-in at Kernel. While there are macros that allow changing
    the init order, like subsys_initcall(), late_initcall() & friends,
    when all drivers linked belong to the same subsystem, it is easier
    to change the order at the Makefile.

    All I2C modules must be linked before any drivers that actually use it,
    in order to ensure proper module initialization order.

    Also, the core drivers should be initialized before the drivers that use
    them.

    This patch reorders the drivers init, in order to fulfill the above
    requirements.

    Reported-by: Sylwester Nawrocki
    Acked-by: Sylwester Nawrocki
    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     

16 Aug, 2012

3 commits


14 Aug, 2012

8 commits


22 Mar, 2011

3 commits

  • As video hardware pipelines become increasingly complex and
    configurable, the current hardware description through v4l2 subdevices
    reaches its limits. In addition to enumerating and configuring
    subdevices, video camera drivers need a way to discover and modify at
    runtime how those subdevices are connected. This is done through new
    elements called entities, pads and links.

    An entity is a basic media hardware building block. It can correspond to
    a large variety of logical blocks such as physical hardware devices
    (CMOS sensor for instance), logical hardware devices (a building block
    in a System-on-Chip image processing pipeline), DMA channels or physical
    connectors.

    A pad is a connection endpoint through which an entity can interact with
    other entities. Data (not restricted to video) produced by an entity
    flows from the entity's output to one or more entity inputs. Pads should
    not be confused with physical pins at chip boundaries.

    A link is a point-to-point oriented connection between two pads, either
    on the same entity or on different entities. Data flows from a source
    pad to a sink pad.

    Links are stored in the source entity. To make backwards graph walk
    faster, a copy of all links is also stored in the sink entity. The copy
    is known as a backlink and is only used to help graph traversal.

    The entity API is made of three functions:

    - media_entity_init() initializes an entity. The caller must provide an
    array of pads as well as an estimated number of links. The links array
    is allocated dynamically and will be reallocated if it grows beyond the
    initial estimate.

    - media_entity_cleanup() frees resources allocated for an entity. It
    must be called during the cleanup phase after unregistering the entity
    and before freeing it.

    - media_entity_create_link() creates a link between two entities. An
    entry in the link array of each entity is allocated and stores pointers
    to source and sink pads.

    When a media device is unregistered, all its entities are unregistered
    automatically.

    The code is based on Hans Verkuil initial work.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Sakari Ailus
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • The media_device structure abstracts functions common to all kind of
    media devices (v4l2, dvb, alsa, ...). It manages media entities and
    offers a userspace API to discover and configure the media device
    internal topology.

    Signed-off-by: Laurent Pinchart
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • The media_devnode structure provides support for registering and
    unregistering character devices using a dynamic major number. Reference
    counting is handled internally, making device drivers easier to write
    without having to solve the open/disconnect race condition issue over
    and over again.

    The code is based on video/v4l2-dev.c.

    [mchehab@redhat.com: Remove linux/smp_lock.h include to not break compilation on bisect]
    Signed-off-by: Laurent Pinchart
    Acked-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     

29 Dec, 2010

1 commit


16 Dec, 2009

1 commit


05 Jun, 2008

1 commit

  • After commit 039d40019f3c5e26ea50ec5af4270189f63365e1
    (V4L/DVB (7898): Fix VIDEO_MEDIA Kconfig logic)
    VIDEO_MEDIA is no longer usable in Makefile's for deciding
    which directories we enter, resulting in compile errors like the
    following with CONFIG_VIDEO_DEV=y, CONFIG_DVB_CORE=m:

    ...
    MODPOST 187 modules
    ...
    make[2]: *** [__modpost] Error 1

    The easiest solution is to always enter video/

    Signed-off-by: Adrian Bunk
    Acked-by: Ingo Molnar
    Signed-off-by: Mauro Carvalho Chehab

    Adrian Bunk
     

09 May, 2008

1 commit

  • Fix allmodconfig build bug introduced in latest -git by commit
    7c91f0624a9 ("V4L/DVB(7767): Move tuners to common/tuners"):

    LD kernel/built-in.o
    LD drivers/built-in.o
    ld: drivers/media/built-in.o: No such file: No such file or directory

    which happens if all media drivers are modular:

    http://redhat.com/~mingo/misc/config-Wed_Apr_30_09_24_48_CEST_2008.bad

    In that case there's no obj-y rule connecting all the built-in.o files and
    the link tree breaks.

    The fix is to add a guaranteed obj-y rule for the core vmlinux to build.
    (which results in an empty object file if all media drivers are modular)

    Signed-off-by: Ingo Molnar
    Acked-by: Sam Ravnborg
    Signed-off-by: Stephen Rothwell
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     

30 Apr, 2008

1 commit


07 Apr, 2008

1 commit


14 Dec, 2007

1 commit


09 May, 2007

1 commit

  • Change Kconfig objects from "menu, config" into "menuconfig" so
    that the user can disable the whole feature without having to
    enter the menu first.
    Also remove one indirection (CONFIG_DVB) that does not seem to
    be really used inside the kernel.

    Signed-off-by: Jan Engelhardt
    Signed-off-by: Mauro Carvalho Chehab

    Jan Engelhardt
     

10 Sep, 2005

1 commit


17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds