diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-12-10 14:16:34 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 17:18:56 +0300 |
commit | 04bf12c2d313478a3e5c9ff59a7ba92ce418bee6 (patch) | |
tree | 2058ac111a789342dee0bbb87bcf15e75ca4f932 /drivers | |
parent | 188d2d551244f4196b616c90f3411732a6ebb2ab (diff) | |
download | linux-04bf12c2d313478a3e5c9ff59a7ba92ce418bee6.tar.xz |
[media] dvbdev: enable all interface links at init
Interface links are normally enabled, meaning that the interfaces are
bound to the entities. So, any ioctl sent to the interface are reflected
at the entities managed by the interface.
However, when a device is in use, other interfaces for the same hardware
could be decoupled from the entities linked to them, because the
hardware may have some parts busy.
That's for example, what happens when an hybrid TV device is in use.
If it is streaming analog TV or capturing signals from S-Video/Composite
connectors, typically the digital part of the hardware can't be used and
vice-versa.
This is generally due to some internal hardware or firmware limitation,
that it is not easily mapped via data pipelines.
What the Kernel drivers do internally is that they decouple the hardware
from the interface. So, all changes, if allowed, are done only at some
interface cache, but not physically changed at the hardware.
The usage is similar to the usage of the MEDIA_LNK_FL_ENABLED on data
links. So, let's use the same flag to indicate if either the interface
to entity link is bound/enabled or not.
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb-core/dvbdev.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index a8e7e2398f7a..5c4fb41060b4 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -396,7 +396,8 @@ static void dvb_register_media_device(struct dvb_device *dvbdev, if (!dvbdev->entity || !dvbdev->intf_devnode) return; - media_create_intf_link(dvbdev->entity, &dvbdev->intf_devnode->intf, 0); + media_create_intf_link(dvbdev->entity, &dvbdev->intf_devnode->intf, + MEDIA_LNK_FL_ENABLED); #endif } @@ -583,20 +584,24 @@ void dvb_create_media_graph(struct dvb_adapter *adap) /* Create indirect interface links for FE->tuner, DVR->demux and CA->ca */ media_device_for_each_intf(intf, mdev) { if (intf->type == MEDIA_INTF_T_DVB_CA && ca) - media_create_intf_link(ca, intf, 0); + media_create_intf_link(ca, intf, MEDIA_LNK_FL_ENABLED); if (intf->type == MEDIA_INTF_T_DVB_FE && tuner) - media_create_intf_link(tuner, intf, 0); + media_create_intf_link(tuner, intf, + MEDIA_LNK_FL_ENABLED); if (intf->type == MEDIA_INTF_T_DVB_DVR && demux) - media_create_intf_link(demux, intf, 0); + media_create_intf_link(demux, intf, + MEDIA_LNK_FL_ENABLED); media_device_for_each_entity(entity, mdev) { if (entity->type == MEDIA_ENT_T_DVB_TSOUT) { if (!strcmp(entity->name, DVR_TSOUT)) - media_create_intf_link(entity, intf, 0); + media_create_intf_link(entity, intf, + MEDIA_LNK_FL_ENABLED); if (!strcmp(entity->name, DEMUX_TSOUT)) - media_create_intf_link(entity, intf, 0); + media_create_intf_link(entity, intf, + MEDIA_LNK_FL_ENABLED); break; } } |