diff options
author | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-01-03 16:35:53 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-02-13 21:10:15 -0200 |
commit | 3bde1b78408b7b1136cd64722b6cd8b2eb70b217 (patch) | |
tree | 8f901792c379ff4441c0de27884fe2da91653dd5 /drivers/media/dvb-core/dvbdev.c | |
parent | d35a9855a8b6e675013bce6946e36c13db66b765 (diff) |
[media] dvbdev: represent frontend with two pads
While on some devices the tuner is bound inside the frontend,
other devices use a separate subdevice for it.
So, in order to be more generic, better to map it with two
pads.
That will allows to use the media controller to lock the tuner
between the DVB and the V4L2 sub-drivers, on hybrid devices.
While here, change the logic to use pad 0 as sink for devices
with both sink and source pads.
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/dvb-core/dvbdev.c')
-rw-r--r-- | drivers/media/dvb-core/dvbdev.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/media/dvb-core/dvbdev.c b/drivers/media/dvb-core/dvbdev.c index 79c96edf71ef..c5de02455b17 100644 --- a/drivers/media/dvb-core/dvbdev.c +++ b/drivers/media/dvb-core/dvbdev.c @@ -200,6 +200,7 @@ static void dvb_register_media_device(struct dvb_device *dvbdev, switch (type) { case DVB_DEVICE_CA: case DVB_DEVICE_DEMUX: + case DVB_DEVICE_FRONTEND: npads = 2; break; case DVB_DEVICE_NET: @@ -221,12 +222,13 @@ static void dvb_register_media_device(struct dvb_device *dvbdev, switch (type) { case DVB_DEVICE_FRONTEND: dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_FE; - dvbdev->pads[0].flags = MEDIA_PAD_FL_SOURCE; + dvbdev->pads[0].flags = MEDIA_PAD_FL_SINK; + dvbdev->pads[1].flags = MEDIA_PAD_FL_SOURCE; break; case DVB_DEVICE_DEMUX: dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_DEMUX; - dvbdev->pads[0].flags = MEDIA_PAD_FL_SOURCE; - dvbdev->pads[1].flags = MEDIA_PAD_FL_SINK; + dvbdev->pads[0].flags = MEDIA_PAD_FL_SINK; + dvbdev->pads[1].flags = MEDIA_PAD_FL_SOURCE; break; case DVB_DEVICE_DVR: dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_DVR; @@ -234,8 +236,8 @@ static void dvb_register_media_device(struct dvb_device *dvbdev, break; case DVB_DEVICE_CA: dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_CA; - dvbdev->pads[0].flags = MEDIA_PAD_FL_SOURCE; - dvbdev->pads[1].flags = MEDIA_PAD_FL_SINK; + dvbdev->pads[0].flags = MEDIA_PAD_FL_SINK; + dvbdev->pads[1].flags = MEDIA_PAD_FL_SOURCE; break; case DVB_DEVICE_NET: dvbdev->entity->type = MEDIA_ENT_T_DEVNODE_DVB_NET; |