diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-21 14:32:38 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 15:18:48 +0100 |
commit | 8ddb90d2e5dc1b80c538d371bfe361e1bae29297 (patch) | |
tree | 28d3b3780745ab2f70eb0ba4686200cc0ca2764d /drivers/media | |
parent | [media] media: add a linked list to track interfaces by mdev (diff) | |
download | linux-8ddb90d2e5dc1b80c538d371bfe361e1bae29297.tar.xz linux-8ddb90d2e5dc1b80c538d371bfe361e1bae29297.zip |
[media] dvbdev: add support for indirect interface links
Some interfaces indirectly control multiple entities.
Add support for those.
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/dvb-core/dvbdev.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 6bf61d42c017..ada0738d26f2 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -441,6 +441,7 @@ void dvb_create_media_graph(struct dvb_adapter *adap) struct media_device *mdev = adap->mdev; struct media_entity *entity, *tuner = NULL, *fe = NULL; struct media_entity *demux = NULL, *dvr = NULL, *ca = NULL; + struct media_interface *intf; if (!mdev) return; @@ -476,6 +477,16 @@ void dvb_create_media_graph(struct dvb_adapter *adap) if (demux && ca) media_create_pad_link(demux, 1, ca, 0, MEDIA_LNK_FL_ENABLED); + + /* Create indirect interface links for FE->tuner, DVR->demux and CA->ca */ + list_for_each_entry(intf, &mdev->interfaces, list) { + if (intf->type == MEDIA_INTF_T_DVB_CA && ca) + media_create_intf_link(ca, intf, 0); + if (intf->type == MEDIA_INTF_T_DVB_FE && tuner) + media_create_intf_link(tuner, intf, 0); + if (intf->type == MEDIA_INTF_T_DVB_DVR && demux) + media_create_intf_link(demux, intf, 0); + } } EXPORT_SYMBOL_GPL(dvb_create_media_graph); #endif |