lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 11 Feb 2016 16:41:33 -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, albert@...tsing.nl,
	linux-kernel@...r.kernel.org, linux-media@...r.kernel.org,
	alsa-devel@...a-project.org
Subject: [PATCH v3 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 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

Powered by blists - more mailing lists