Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] au0828: use standard demod pads struct

As we want au0828 to use the core function to create the MC
graphs, use enum demod_pad_index instead of
enum au8522_media_pads.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

+13 -19
-9
drivers/media/dvb-frontends/au8522.h
··· 89 89 AU8522_AUDIO_NONE, 90 90 AU8522_AUDIO_SIF, 91 91 }; 92 - 93 - enum au8522_media_pads { 94 - AU8522_PAD_INPUT, 95 - AU8522_PAD_VID_OUT, 96 - AU8522_PAD_VBI_OUT, 97 - AU8522_PAD_AUDIO_OUT, 98 - 99 - AU8522_NUM_PADS 100 - }; 101 92 #endif /* __AU8522_H__ */
+4 -4
drivers/media/dvb-frontends/au8522_decoder.c
··· 763 763 v4l2_i2c_subdev_init(sd, client, &au8522_ops); 764 764 #if defined(CONFIG_MEDIA_CONTROLLER) 765 765 766 - state->pads[AU8522_PAD_INPUT].flags = MEDIA_PAD_FL_SINK; 767 - state->pads[AU8522_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; 768 - state->pads[AU8522_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE; 769 - state->pads[AU8522_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE; 766 + state->pads[DEMOD_PAD_IF_INPUT].flags = MEDIA_PAD_FL_SINK; 767 + state->pads[DEMOD_PAD_VID_OUT].flags = MEDIA_PAD_FL_SOURCE; 768 + state->pads[DEMOD_PAD_VBI_OUT].flags = MEDIA_PAD_FL_SOURCE; 769 + state->pads[DEMOD_PAD_AUDIO_OUT].flags = MEDIA_PAD_FL_SOURCE; 770 770 sd->entity.function = MEDIA_ENT_F_ATV_DECODER; 771 771 772 772 ret = media_entity_pads_init(&sd->entity, ARRAY_SIZE(state->pads),
+2 -1
drivers/media/dvb-frontends/au8522_priv.h
··· 30 30 #include <linux/videodev2.h> 31 31 #include <media/v4l2-device.h> 32 32 #include <media/v4l2-ctrls.h> 33 + #include <media/v4l2-mc.h> 33 34 #include <linux/i2c.h> 34 35 #include "dvb_frontend.h" 35 36 #include "au8522.h" ··· 71 70 struct v4l2_ctrl_handler hdl; 72 71 73 72 #ifdef CONFIG_MEDIA_CONTROLLER 74 - struct media_pad pads[AU8522_NUM_PADS]; 73 + struct media_pad pads[DEMOD_NUM_PADS]; 75 74 #endif 76 75 }; 77 76
+1 -1
drivers/media/usb/au0828/au0828-core.c
··· 218 218 switch (new->function) { 219 219 case MEDIA_ENT_F_AUDIO_MIXER: 220 220 ret = media_create_pad_link(dev->decoder, 221 - AU8522_PAD_AUDIO_OUT, 221 + DEMOD_PAD_AUDIO_OUT, 222 222 new, 0, 223 223 MEDIA_LNK_FL_ENABLED); 224 224 if (ret)
+4 -4
drivers/media/usb/au0828/au0828-video.c
··· 686 686 if (tuner) { 687 687 dev->tuner = tuner; 688 688 ret = media_create_pad_link(tuner, TUNER_PAD_OUTPUT, 689 - decoder, AU8522_PAD_INPUT, 0); 689 + decoder, DEMOD_PAD_IF_INPUT, 0); 690 690 if (ret) 691 691 return ret; 692 692 } 693 - ret = media_create_pad_link(decoder, AU8522_PAD_VID_OUT, 693 + ret = media_create_pad_link(decoder, DEMOD_PAD_VID_OUT, 694 694 &dev->vdev.entity, 0, 695 695 MEDIA_LNK_FL_ENABLED); 696 696 if (ret) 697 697 return ret; 698 - ret = media_create_pad_link(decoder, AU8522_PAD_VBI_OUT, 698 + ret = media_create_pad_link(decoder, DEMOD_PAD_VBI_OUT, 699 699 &dev->vbi_dev.entity, 0, 700 700 MEDIA_LNK_FL_ENABLED); 701 701 if (ret) ··· 723 723 case AU0828_VMUX_SVIDEO: 724 724 /* FIXME: fix the decoder PAD */ 725 725 ret = media_create_pad_link(ent, 0, decoder, 726 - AU8522_PAD_INPUT, 0); 726 + DEMOD_PAD_IF_INPUT, 0); 727 727 if (ret) 728 728 return ret; 729 729 break;
+2
include/media/v4l2-mc.h
··· 87 87 * @DEMOD_PAD_IF_INPUT: IF input sink pad. 88 88 * @DEMOD_PAD_VID_OUT: Video output source pad. 89 89 * @DEMOD_PAD_VBI_OUT: Vertical Blank Interface (VBI) output source pad. 90 + * @DEMOD_PAD_AUDIO_OUT: Audio output source pad. 90 91 * @DEMOD_NUM_PADS: Maximum number of output pads. 91 92 */ 92 93 enum demod_pad_index { 93 94 DEMOD_PAD_IF_INPUT, 94 95 DEMOD_PAD_VID_OUT, 95 96 DEMOD_PAD_VBI_OUT, 97 + DEMOD_PAD_AUDIO_OUT, 96 98 DEMOD_NUM_PADS 97 99 }; 98 100