diff options
author | Mauro Carvalho Chehab | 2018-07-31 08:03:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab | 2018-09-17 13:16:19 -0400 |
commit | c1a37dd5e87dc6a4c37e5fc68d7b26fb4a3ef097 (patch) | |
tree | b1df188a467b3bdb15fd197875265de0aa7fb1eb /include/media | |
parent | 092a37875a22fbb75098e834fb1cc1c6220f0eaa (diff) |
media: v4l2: taint pads with the signal types for consumer devices
Consumer devices are provided with a wide different range of types
supported by the same driver, allowing different configutations.
In order to make easier to setup media controller links, "taint"
pads with the signal type it carries.
While here, get rid of DEMOD_PAD_VBI_OUT, as the signal it carries
is actually the same as the normal video output.
The difference happens at the video/VBI interface:
- for VBI, only the hidden lines are streamed;
- for video, the stream is usually cropped to hide the
vbi lines.
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/media-entity.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/media/media-entity.h b/include/media/media-entity.h index 3aa3d58d1d58..b7a53f5d3e12 100644 --- a/include/media/media-entity.h +++ b/include/media/media-entity.h @@ -156,11 +156,40 @@ struct media_link { }; /** + * enum media_pad_signal_type - type of the signal inside a media pad + * + * @PAD_SIGNAL_DEFAULT: + * Default signal. Use this when all inputs or all outputs are + * uniquely identified by the pad number. + * @PAD_SIGNAL_ANALOG: + * The pad contains an analog signal. It can be Radio Frequency, + * Intermediate Frequency, a baseband signal or sub-cariers. + * Tuner inputs, IF-PLL demodulators, composite and s-video signals + * should use it. + * @PAD_SIGNAL_DV: + * Contains a digital video signal, with can be a bitstream of samples + * taken from an analog TV video source. On such case, it usually + * contains the VBI data on it. + * @PAD_SIGNAL_AUDIO: + * Contains an Intermediate Frequency analog signal from an audio + * sub-carrier or an audio bitstream. IF signals are provided by tuners + * and consumed by audio AM/FM decoders. Bitstream audio is provided by + * an audio decoder. + */ +enum media_pad_signal_type { + PAD_SIGNAL_DEFAULT = 0, + PAD_SIGNAL_ANALOG, + PAD_SIGNAL_DV, + PAD_SIGNAL_AUDIO, +}; + +/** * struct media_pad - A media pad graph object. * * @graph_obj: Embedded structure containing the media object common data * @entity: Entity this pad belongs to * @index: Pad index in the entity pads array, numbered from 0 to n + * @sig_type: Type of the signal inside a media pad * @flags: Pad flags, as defined in * :ref:`include/uapi/linux/media.h <media_header>` * (seek for ``MEDIA_PAD_FL_*``) @@ -169,6 +198,7 @@ struct media_pad { struct media_gobj graph_obj; /* must be first field in struct */ struct media_entity *entity; u16 index; + enum media_pad_signal_type sig_type; unsigned long flags; }; |