Commit c1a37dd5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 092a3787
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -719,8 +719,11 @@ static int au8522_probe(struct i2c_client *client,
#if defined(CONFIG_MEDIA_CONTROLLER)

	state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
	state->pads[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
	state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
	state->pads[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;
	state->pads[DEMOD_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE;
	state->pads[DEMOD_PAD_AUDIO_OUT].sig_type = PAD_SIGNAL_AUDIO;
	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;

	ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
+2 −0
Original line number Diff line number Diff line
@@ -704,7 +704,9 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id)

#if defined(CONFIG_MEDIA_CONTROLLER)
	state->pads[IF_AUD_DEC_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
	state->pads[IF_AUD_DEC_PAD_IF_INPUT].sig_type = PAD_SIGNAL_AUDIO;
	state->pads[IF_AUD_DEC_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
	state->pads[IF_AUD_DEC_PAD_OUT].sig_type = PAD_SIGNAL_AUDIO;

	sd->entity.function = MEDIA_ENT_F_IF_AUD_DECODER;

+2 −0
Original line number Diff line number Diff line
@@ -1835,7 +1835,9 @@ static int saa711x_probe(struct i2c_client *client,

#if defined(CONFIG_MEDIA_CONTROLLER)
	state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
	state->pads[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
	state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
	state->pads[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;

	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;

+2 −0
Original line number Diff line number Diff line
@@ -1500,7 +1500,9 @@ static int tvp5150_probe(struct i2c_client *c,

#if defined(CONFIG_MEDIA_CONTROLLER)
	core->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
	core->pads[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
	core->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
	core->pads[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;

	sd->entity.function = MEDIA_ENT_F_ATV_DECODER;

+2 −0
Original line number Diff line number Diff line
@@ -846,7 +846,9 @@ static void saa7134_create_entities(struct saa7134_dev *dev)
	if (!decoder) {
		dev->demod.name = "saa713x";
		dev->demod_pad[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
		dev->demod_pad[DEMOD_PAD_IF_INPUT].sig_type = PAD_SIGNAL_ANALOG;
		dev->demod_pad[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE;
		dev->demod_pad[DEMOD_PAD_VID_OUT].sig_type = PAD_SIGNAL_DV;
		dev->demod.function = MEDIA_ENT_F_ATV_DECODER;

		ret = media_entity_pads_init(&dev->demod, DEMOD_NUM_PADS,
Loading