[media] v4l2-mc.h Add pads for audio and video IF-PLL decoders
The audio and video IF-PLL decoders have one sink and one source PAD. Add macro names for those pads and describe what kind of signals are represented at such pads. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
@@ -696,17 +696,32 @@ static int tuner_probe(struct i2c_client *client,
|
|||||||
/* Should be just before return */
|
/* Should be just before return */
|
||||||
register_client:
|
register_client:
|
||||||
#if defined(CONFIG_MEDIA_CONTROLLER)
|
#if defined(CONFIG_MEDIA_CONTROLLER)
|
||||||
|
t->sd.entity.name = t->name;
|
||||||
|
/*
|
||||||
|
* Handle the special case where the tuner has actually
|
||||||
|
* two stages: the PLL to tune into a frequency and the
|
||||||
|
* IF-PLL demodulator (tda988x).
|
||||||
|
*/
|
||||||
|
if (t->type == TUNER_TDA9887) {
|
||||||
|
t->pad[IF_VID_DEC_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK;
|
||||||
|
t->pad[IF_VID_DEC_PAD_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
||||||
|
ret = media_entity_pads_init(&t->sd.entity,
|
||||||
|
IF_VID_DEC_PAD_NUM_PADS,
|
||||||
|
&t->pad[0]);
|
||||||
|
t->sd.entity.function = MEDIA_ENT_F_IF_VID_DECODER;
|
||||||
|
} else {
|
||||||
t->pad[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
|
t->pad[TUNER_PAD_RF_INPUT].flags = MEDIA_PAD_FL_SINK;
|
||||||
t->pad[TUNER_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
|
t->pad[TUNER_PAD_OUTPUT].flags = MEDIA_PAD_FL_SOURCE;
|
||||||
t->pad[TUNER_PAD_AUD_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
t->pad[TUNER_PAD_AUD_OUT].flags = MEDIA_PAD_FL_SOURCE;
|
||||||
|
ret = media_entity_pads_init(&t->sd.entity, TUNER_NUM_PADS,
|
||||||
|
&t->pad[0]);
|
||||||
t->sd.entity.function = MEDIA_ENT_F_TUNER;
|
t->sd.entity.function = MEDIA_ENT_F_TUNER;
|
||||||
t->sd.entity.name = t->name;
|
}
|
||||||
|
|
||||||
ret = media_entity_pads_init(&t->sd.entity, TUNER_NUM_PADS, &t->pad[0]);
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
tuner_err("failed to initialize media entity!\n");
|
tuner_err("failed to initialize media entity!\n");
|
||||||
kfree(t);
|
kfree(t);
|
||||||
return -ENODEV;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Sets a default mode */
|
/* Sets a default mode */
|
||||||
|
@@ -42,3 +42,35 @@ enum tuner_pad_index {
|
|||||||
TUNER_PAD_AUD_OUT,
|
TUNER_PAD_AUD_OUT,
|
||||||
TUNER_NUM_PADS
|
TUNER_NUM_PADS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum if_vid_dec_index - video IF-PLL pad index for
|
||||||
|
* MEDIA_ENT_F_IF_VID_DECODER
|
||||||
|
*
|
||||||
|
* @IF_VID_DEC_PAD_IF_INPUT: video Intermediate Frequency (IF) sink pad
|
||||||
|
* @IF_VID_DEC_PAD_OUT: IF-PLL video output source pad. Contains the
|
||||||
|
* video chrominance and luminance IF signals.
|
||||||
|
* @IF_VID_DEC_PAD_NUM_PADS: Number of pads of the video IF-PLL.
|
||||||
|
*/
|
||||||
|
enum if_vid_dec_pad_index {
|
||||||
|
IF_VID_DEC_PAD_IF_INPUT,
|
||||||
|
IF_VID_DEC_PAD_OUT,
|
||||||
|
IF_VID_DEC_PAD_NUM_PADS
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* enum if_aud_dec_index - audio/sound IF-PLL pad index for
|
||||||
|
* MEDIA_ENT_F_IF_AUD_DECODER
|
||||||
|
*
|
||||||
|
* @IF_AUD_DEC_PAD_IF_INPUT: audio Intermediate Frequency (IF) sink pad
|
||||||
|
* @IF_AUD_DEC_PAD_OUT: IF-PLL audio output source pad. Contains the
|
||||||
|
* audio sampled stream data, usually connected
|
||||||
|
* to the bridge bus via an Inter-IC Sound (I2S)
|
||||||
|
* bus.
|
||||||
|
* @IF_AUD_DEC_PAD_NUM_PADS: Number of pads of the audio IF-PLL.
|
||||||
|
*/
|
||||||
|
enum if_aud_dec_pad_index {
|
||||||
|
IF_AUD_DEC_PAD_IF_INPUT,
|
||||||
|
IF_AUD_DEC_PAD_OUT,
|
||||||
|
IF_AUD_DEC_PAD_NUM_PADS
|
||||||
|
};
|
||||||
|
Reference in New Issue
Block a user