[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <ce0a0d11f4ebe26b7d7ff7011cf98c4b64892905.1454557589.git.shuahkh@osg.samsung.com>
Date: Wed, 3 Feb 2016 21:03:49 -0700
From: Shuah Khan <shuahkh@....samsung.com>
To: mchehab@....samsung.com, tiwai@...e.com, clemens@...isch.de,
hans.verkuil@...co.com, laurent.pinchart@...asonboard.com,
sakari.ailus@...ux.intel.com, javier@....samsung.com
Cc: Shuah Khan <shuahkh@....samsung.com>, pawel@...iak.com,
m.szyprowski@...sung.com, kyungmin.park@...sung.com,
perex@...ex.cz, arnd@...db.de, dan.carpenter@...cle.com,
tvboxspy@...il.com, crope@....fi, ruchandani.tina@...il.com,
corbet@....net, chehabrafael@...il.com, k.kozlowski@...sung.com,
stefanr@...6.in-berlin.de, inki.dae@...sung.com,
jh1009.sung@...sung.com, elfring@...rs.sourceforge.net,
prabhakar.csengg@...il.com, sw0312.kim@...sung.com,
p.zabel@...gutronix.de, ricardo.ribalda@...il.com,
labbott@...oraproject.org, pierre-louis.bossart@...ux.intel.com,
ricard.wanderlof@...s.com, julian@...st.de, takamichiho@...il.com,
dominic.sacre@....de, misterpib@...il.com, daniel@...que.org,
gtmkramer@...all.nl, normalperson@...t.net, joe@...po.co.uk,
linuxbugs@...tgam.net, johan@...ud.se, klock.android@...il.com,
nenggun.kim@...sung.com, j.anaszewski@...sung.com,
geliangtang@....com, linux-kernel@...r.kernel.org,
linux-media@...r.kernel.org, linux-api@...r.kernel.org,
alsa-devel@...a-project.org
Subject: [PATCH v2 17/22] 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: Shuah Khan <shuahkh@....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 868babe..b02a122 100644
--- a/drivers/media/usb/au0828/au0828-core.c
+++ b/drivers/media/usb/au0828/au0828-core.c
@@ -254,7 +254,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)
@@ -268,6 +268,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;
}
}
@@ -322,6 +325,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
Powered by blists - more mailing lists