]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - include/media/v4l2-mc.h
[media] saa7134: Get rid of struct saa7134_input.tv field
[mirror_ubuntu-hirsute-kernel.git] / include / media / v4l2-mc.h
CommitLineData
6aad127d
MCC
1/*
2 * v4l2-mc.h - Media Controller V4L2 types and prototypes
3 *
4 * Copyright (C) 2016 Mauro Carvalho Chehab <mchehab@osg.samsung.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 */
16
54d0dbac
MCC
17#include <media/media-device.h>
18
6aad127d
MCC
19/**
20 * enum tuner_pad_index - tuner pad index for MEDIA_ENT_F_TUNER
21 *
22 * @TUNER_PAD_RF_INPUT: Radiofrequency (RF) sink pad, usually linked to a
23 * RF connector entity.
5c9077ea
MCC
24 * @TUNER_PAD_OUTPUT: Tuner video output source pad. Contains the video
25 * chrominance and luminance or the hole bandwidth
26 * of the signal converted to an Intermediate Frequency
27 * (IF) or to baseband (on zero-IF tuners).
28 * @TUNER_PAD_AUD_OUT: Tuner audio output source pad. Tuners used to decode
29 * analog TV signals have an extra pad for audio output.
30 * Old tuners use an analog stage with a saw filter for
31 * the audio IF frequency. The output of the pad is, in
32 * this case, the audio IF, with should be decoded either
33 * by the bridge chipset (that's the case of cx2388x
34 * chipsets) or may require an external IF sound
35 * processor, like msp34xx. On modern silicon tuners,
36 * the audio IF decoder is usually incorporated at the
37 * tuner. On such case, the output of this pad is an
38 * audio sampled data.
6aad127d
MCC
39 * @TUNER_NUM_PADS: Number of pads of the tuner.
40 */
41enum tuner_pad_index {
42 TUNER_PAD_RF_INPUT,
43 TUNER_PAD_OUTPUT,
5c9077ea 44 TUNER_PAD_AUD_OUT,
6aad127d 45 TUNER_NUM_PADS
5c9077ea 46};
953a457e
MCC
47
48/**
49 * enum if_vid_dec_index - video IF-PLL pad index for
50 * MEDIA_ENT_F_IF_VID_DECODER
51 *
52 * @IF_VID_DEC_PAD_IF_INPUT: video Intermediate Frequency (IF) sink pad
53 * @IF_VID_DEC_PAD_OUT: IF-PLL video output source pad. Contains the
54 * video chrominance and luminance IF signals.
55 * @IF_VID_DEC_PAD_NUM_PADS: Number of pads of the video IF-PLL.
56 */
57enum if_vid_dec_pad_index {
58 IF_VID_DEC_PAD_IF_INPUT,
59 IF_VID_DEC_PAD_OUT,
60 IF_VID_DEC_PAD_NUM_PADS
61};
62
63/**
64 * enum if_aud_dec_index - audio/sound IF-PLL pad index for
65 * MEDIA_ENT_F_IF_AUD_DECODER
66 *
67 * @IF_AUD_DEC_PAD_IF_INPUT: audio Intermediate Frequency (IF) sink pad
68 * @IF_AUD_DEC_PAD_OUT: IF-PLL audio output source pad. Contains the
69 * audio sampled stream data, usually connected
70 * to the bridge bus via an Inter-IC Sound (I2S)
71 * bus.
72 * @IF_AUD_DEC_PAD_NUM_PADS: Number of pads of the audio IF-PLL.
73 */
74enum if_aud_dec_pad_index {
75 IF_AUD_DEC_PAD_IF_INPUT,
76 IF_AUD_DEC_PAD_OUT,
77 IF_AUD_DEC_PAD_NUM_PADS
78};
e4001e95
MCC
79
80/**
81 * enum demod_pad_index - analog TV pad index for MEDIA_ENT_F_ATV_DECODER
82 *
83 * @DEMOD_PAD_IF_INPUT: IF input sink pad.
84 * @DEMOD_PAD_VID_OUT: Video output source pad.
85 * @DEMOD_PAD_VBI_OUT: Vertical Blank Interface (VBI) output source pad.
86 * @DEMOD_NUM_PADS: Maximum number of output pads.
87 */
88enum demod_pad_index {
89 DEMOD_PAD_IF_INPUT,
90 DEMOD_PAD_VID_OUT,
91 DEMOD_PAD_VBI_OUT,
92 DEMOD_NUM_PADS
93};
54d0dbac
MCC
94
95/**
96 * v4l2_mc_create_media_graph() - create Media Controller links at the graph.
97 *
98 * @mdev: pointer to the &media_device struct.
99 *
100 * Add links between the entities commonly found on PC customer's hardware at
101 * the V4L2 side: camera sensors, audio and video PLL-IF decoders, tuners,
102 * analog TV decoder and I/O entities (video, VBI and Software Defined Radio).
103 * NOTE: webcams are modelled on a very simple way: the sensor is
104 * connected directly to the I/O entity. All dirty details, like
105 * scaler and crop HW are hidden. While such mapping is enough for v4l2
106 * interface centric PC-consumer's hardware, V4L2 subdev centric camera
107 * hardware should not use this routine, as it will not build the right graph.
108 */
109#ifdef CONFIG_MEDIA_CONTROLLER
110int v4l2_mc_create_media_graph(struct media_device *mdev);
111#else
112static inline int v4l2_mc_create_media_graph(struct media_device *mdev)
113{
114 return 0;
115}
116#endif