Commit b1769651 authored by Shuah Khan's avatar Shuah Khan Committed by Mauro Carvalho Chehab

[media] media: au0828 disable tuner to demod link

Change au0828_create_media_graph() to find and disable
tuner and demod link. This helps avoid an additional
disable step when tuner is requested by video or audio.
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 2926d7f4
...@@ -657,7 +657,7 @@ static int au0828_create_media_graph(struct au0828_dev *dev) ...@@ -657,7 +657,7 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
#ifdef CONFIG_MEDIA_CONTROLLER #ifdef CONFIG_MEDIA_CONTROLLER
struct media_device *mdev = dev->media_dev; struct media_device *mdev = dev->media_dev;
struct media_entity *entity; struct media_entity *entity;
struct media_entity *tuner = NULL, *decoder = NULL; struct media_entity *tuner = NULL, *decoder = NULL, *demod = NULL;
int i, ret; int i, ret;
if (!mdev) if (!mdev)
...@@ -671,6 +671,9 @@ static int au0828_create_media_graph(struct au0828_dev *dev) ...@@ -671,6 +671,9 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
case MEDIA_ENT_F_ATV_DECODER: case MEDIA_ENT_F_ATV_DECODER:
decoder = entity; decoder = entity;
break; break;
case MEDIA_ENT_F_DTV_DEMOD:
demod = entity;
break;
} }
} }
...@@ -725,6 +728,21 @@ static int au0828_create_media_graph(struct au0828_dev *dev) ...@@ -725,6 +728,21 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
break; break;
} }
} }
/*
* Disable tuner to demod link to avoid disable step
* when tuner is requested by video or audio
*/
if (tuner && demod) {
struct media_link *link;
list_for_each_entry(link, &demod->links, list) {
if (link->sink->entity == demod &&
link->source->entity == tuner) {
media_entity_setup_link(link, 0);
}
}
}
#endif #endif
return 0; return 0;
} }
......
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