Skip to content

Better handle pads for tuning/decoder part of the devices

Mauro Carvalho Chehab linux-media 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest14 patches 1 replyIn review
  2. v113 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- Fix some issues noticed while testing with WinTV USB2. As result of such tests, I opted to use just one type for all analog signals.

- Added a patch to provide some info if something gets wrong while creating the links.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14media: v4l2: remove VBI output paddrivers/media/dvb-frontends/au8522_decoder.c drivers/media/i2c/saa7115.c drivers/media/i2c/tvp5150.c +3 more+1 -70 replies
2/14media: v4l2: taint pads with the signal types for consumer devicesdrivers/media/dvb-frontends/au8522_decoder.c drivers/media/i2c/msp3400-driver.c drivers/media/i2c/saa7115.c +6 more+50 -10 replies
3/14v4l2-mc: switch it to use the new approach to setup pipelinesdrivers/media/media-entity.c drivers/media/v4l2-core/v4l2-mc.c include/media/media-entity.h+101 -170 replies
4/14media: v4l2-mc: add print messages when media graph failsdrivers/media/v4l2-core/v4l2-mc.c+61 -190 replies
5/14media: dvb: use signals to discover padsdrivers/media/dvb-core/dvbdev.c+14 -50 replies
6/14media: au0828: use signals instead of hardcoding a pad numberdrivers/media/usb/au0828/au0828-core.c+7 -50 replies
7/14media: au8522: declare its own padsdrivers/media/dvb-frontends/au8522_decoder.c drivers/media/dvb-frontends/au8522_priv.h+14 -70 replies
8/14media: msp3400: declare its own padsdrivers/media/i2c/msp3400-driver.c drivers/media/i2c/msp3400-driver.h+11 -50 replies
9/14media: saa7115: declare its own padsdrivers/media/i2c/saa7115.c+13 -60 replies
10/14media: tvp5150: declare its own padsdrivers/media/i2c/tvp5150.c+14 -80 replies
11/14media: si2157: declare its own padsdrivers/media/tuners/si2157.c drivers/media/tuners/si2157_priv.h+16 -80 replies
12/14media: saa7134: declare its own padsdrivers/media/pci/saa7134/saa7134-core.c drivers/media/pci/saa7134/saa7134.h+12 -60 replies
13/14media: mxl111sf: declare its own padsdrivers/media/usb/dvb-usb-v2/mxl111sf.c drivers/media/usb/dvb-usb-v2/mxl111sf.h+12 -60 replies
14/14media: v4l2-mc: get rid of global pad indexesdrivers/media/v4l2-core/tuner-core.c include/media/v4l2-mc.h+48 -770 replies

Reviews trailers per patch

13 of 14 patches have a Reviewed-by or Acked-by.

PatchHans Verkuil
1/14A-b
2/14A-b
3/14A-b
4/14
5/14A-b
6/14A-b
7/14A-b
8/14A-b
9/14A-b
10/14A-b
11/14A-b
12/14A-b
13/14A-b
14/14A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 00/14] Better handle pads for tuning/decoder part of the devices

At PC consumer devices, it is very common that the bridge same driver to be attached to different types of tuners and demods. We need a way for the Kernel to properly identify what kind of signal is provided by each PAD, in order to properly setup the pipelines.

The previous approach were to hardcode a fixed number of PADs for all elements of the same type. This is not good, as different devices may actually have a different number of pads.

It was acceptable in the past, as there were a promisse of adding "soon" a properties API that would allow to identify the type for each PADs, but this was never merged (or even a patchset got submitted).

So, replace this approach by another one: add a "taint" mark to pads that contain different types of signals.

I tried to minimize the number of signals, in order to make it simpler to convert from the past way.

For now, it is tested only with a simple grabber device. I intend to do more tests before merging it, but it would be interesting to have this merged for Kernel 4.19, as we'll now be exposing the pad index via the MC API version 2.

--

v2:

- Fix some issues noticed while testing with WinTV USB2. As result of such tests, I opted to use just one type for all analog signals.

- Added a patch to provide some info if something gets wrong while creating the links.

Mauro Carvalho Chehab (14):
media: v4l2: remove VBI output pad
media: v4l2: taint pads with the signal types for consumer devices
v4l2-mc: switch it to use the new approach to setup pipelines
media: v4l2-mc: add print messages when media graph fails
media: dvb: use signals to discover pads
media: au0828: use signals instead of hardcoding a pad number
media: au8522: declare its own pads
media: msp3400: declare its own pads
media: saa7115: declare its own pads
media: tvp5150: declare its own pads
media: si2157: declare its own pads
media: saa7134: declare its own pads
media: mxl111sf: declare its own pads
media: v4l2-mc: get rid of global pad indexes

 drivers/media/dvb-core/dvbdev.c              |  19 ++-
 drivers/media/dvb-frontends/au8522_decoder.c |  10 +-
 drivers/media/dvb-frontends/au8522_priv.h    |   9 +-
 drivers/media/i2c/msp3400-driver.c           |   6 +-
 drivers/media/i2c/msp3400-driver.h           |   8 +-
 drivers/media/i2c/saa7115.c                  |  18 ++-
 drivers/media/i2c/tvp5150.c                  |  21 ++-
 drivers/media/media-entity.c                 |  26 ++++
 drivers/media/pci/saa7134/saa7134-core.c     |   9 +-
 drivers/media/pci/saa7134/saa7134.h          |   8 +-
 drivers/media/tuners/si2157.c                |  11 +-
 drivers/media/tuners/si2157_priv.h           |   9 +-
 drivers/media/usb/au0828/au0828-core.c       |  12 +-
 drivers/media/usb/dvb-usb-v2/mxl111sf.c      |   8 +-
 drivers/media/usb/dvb-usb-v2/mxl111sf.h      |   8 +-
 drivers/media/v4l2-core/tuner-core.c         |  54 +++++++-
 drivers/media/v4l2-core/v4l2-mc.c            | 135 +++++++++++++++----
 include/media/media-entity.h                 |  48 +++++++
 include/media/v4l2-mc.h                      |  78 -----------
 19 files changed, 347 insertions(+), 150 deletions(-)
Signature · 1 line
2.17.1