[media] em28xx: add media controller support

Add the needed bits to make em28xx to create a media
controller graph.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
This commit is contained in:
Mauro Carvalho Chehab
2016-01-27 07:07:24 -02:00
parent ac88fce987
commit 37ecc7b127
5 changed files with 366 additions and 10 deletions

View File

@@ -916,6 +916,9 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
dev->name, result);
goto fail_adapter;
}
#ifdef CONFIG_MEDIA_CONTROLLER_DVB
dvb->adapter.mdev = dev->media_dev;
#endif
/* Ensure all frontends negotiate bus access */
dvb->fe[0]->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl;
@@ -994,8 +997,15 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
/* register network adapter */
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
result = dvb_create_media_graph(&dvb->adapter, false);
if (result < 0)
goto fail_create_graph;
return 0;
fail_create_graph:
dvb_net_release(&dvb->net);
fail_fe_conn:
dvb->demux.dmx.remove_frontend(&dvb->demux.dmx, &dvb->fe_mem);
fail_fe_mem: