Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1332441
| From | Shuah Khan <shuahkh@osg.samsung.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v3 17/22] media: au0828 disable tuner to demod link |
| Date | 2016-02-12 00:50 +0100 |
| Message-ID | <r199L-7jD-15@gated-at.bofh.it> (permalink) |
| References | <r199L-7jD-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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: Shuah Khan <shuahkh@osg.samsung.com>
---
drivers/media/usb/au0828/au0828-core.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
index 66b44c9..92d22ed 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -255,7 +255,7 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
#ifdef CONFIG_MEDIA_CONTROLLER
struct media_device *mdev = dev->media_dev;
struct media_entity *entity;
- struct media_entity *tuner = NULL, *decoder = NULL;
+ struct media_entity *tuner = NULL, *decoder = NULL, *demod = NULL;
int i, ret;
if (!mdev)
@@ -269,6 +269,9 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
case MEDIA_ENT_F_ATV_DECODER:
decoder = entity;
break;
+ case MEDIA_ENT_F_DTV_DEMOD:
+ demod = entity;
+ break;
}
}
@@ -325,6 +328,21 @@ static int au0828_create_media_graph(struct au0828_dev *dev)
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
return 0;
}
--
2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH v3 17/22] media: au0828 disable tuner to demod link Shuah Khan <shuahkh@osg.samsung.com> - 2016-02-12 00:50 +0100
csiph-web