summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/au0828
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-08-31 13:23:28 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-11 12:18:58 -0200
commit28b6ba1106b5864e6bdd1b75840ccf5b1ca3d1b7 (patch)
tree8e6d67eb832c1b49059bc995c026cfb9b2f48d5b /drivers/media/usb/au0828
parentd1f337375aedb2999bdca24b40ba6e5c1a796eb4 (diff)
downloadblackbird-obmc-linux-28b6ba1106b5864e6bdd1b75840ccf5b1ca3d1b7.tar.gz
blackbird-obmc-linux-28b6ba1106b5864e6bdd1b75840ccf5b1ca3d1b7.zip
[media] au0828: Create connector links
Now that connectors are entities, we need to represent the connector links. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/usb/au0828')
-rw-r--r--drivers/media/usb/au0828/au0828-core.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 02aa6d3edffd..0d77e9cc303b 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -259,6 +259,7 @@ static void au0828_create_media_graph(struct au0828_dev *dev)
struct media_device *mdev = dev->media_dev;
struct media_entity *entity;
struct media_entity *tuner = NULL, *decoder = NULL;
+ int i;
if (!mdev)
return;
@@ -276,6 +277,7 @@ static void au0828_create_media_graph(struct au0828_dev *dev)
/* Analog setup, using tuner as a link */
+ /* Something bad happened! */
if (!decoder)
return;
@@ -286,6 +288,30 @@ static void au0828_create_media_graph(struct au0828_dev *dev)
MEDIA_LNK_FL_ENABLED);
media_create_pad_link(decoder, 2, &dev->vbi_dev.entity, 0,
MEDIA_LNK_FL_ENABLED);
+
+ for (i = 0; i < AU0828_MAX_INPUT; i++) {
+ struct media_entity *ent = &dev->input_ent[i];
+
+ if (AUVI_INPUT(i).type == AU0828_VMUX_UNDEFINED)
+ break;
+
+ switch (AUVI_INPUT(i).type) {
+ case AU0828_VMUX_CABLE:
+ case AU0828_VMUX_TELEVISION:
+ case AU0828_VMUX_DVB:
+ if (tuner)
+ media_create_pad_link(ent, 0, tuner,
+ TUNER_PAD_RF_INPUT,
+ MEDIA_LNK_FL_ENABLED);
+ break;
+ case AU0828_VMUX_COMPOSITE:
+ case AU0828_VMUX_SVIDEO:
+ default: /* AU0828_VMUX_DEBUG */
+ /* FIXME: fix the decoder PAD */
+ media_create_pad_link(ent, 0, decoder, 0, 0);
+ break;
+ }
+ }
#endif
}
OpenPOWER on IntegriCloud