Commit e9ef88bd authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] em28xx-dvb: create RF connector on DVB-only mode

When in analog mode, the RF connector will be created by
em28xx-video. However, when the device is in digital mode only,
the RF connector is not shown. In this case, let the DVB
core to create it for us.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 67873d4e
...@@ -905,6 +905,7 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, ...@@ -905,6 +905,7 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
struct em28xx *dev, struct device *device) struct em28xx *dev, struct device *device)
{ {
int result; int result;
bool create_rf_connector = false;
mutex_init(&dvb->lock); mutex_init(&dvb->lock);
...@@ -998,7 +999,11 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module, ...@@ -998,7 +999,11 @@ static int em28xx_register_dvb(struct em28xx_dvb *dvb, struct module *module,
/* register network adapter */ /* register network adapter */
dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx);
result = dvb_create_media_graph(&dvb->adapter, false); /* If the analog part won't create RF connectors, DVB will do it */
if (!dev->has_video || (dev->tuner_type == TUNER_ABSENT))
create_rf_connector = true;
result = dvb_create_media_graph(&dvb->adapter, create_rf_connector);
if (result < 0) if (result < 0)
goto fail_create_graph; goto fail_create_graph;
......
...@@ -990,7 +990,8 @@ static void em28xx_v4l2_create_entities(struct em28xx *dev) ...@@ -990,7 +990,8 @@ static void em28xx_v4l2_create_entities(struct em28xx *dev)
ent->function = MEDIA_ENT_F_CONN_SVIDEO; ent->function = MEDIA_ENT_F_CONN_SVIDEO;
break; break;
default: /* EM28XX_VMUX_TELEVISION or EM28XX_RADIO */ default: /* EM28XX_VMUX_TELEVISION or EM28XX_RADIO */
ent->function = MEDIA_ENT_F_CONN_RF; if (dev->tuner_type != TUNER_ABSENT)
ent->function = MEDIA_ENT_F_CONN_RF;
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment