[PATCH v2 14/19] media: Add enable_source handler field to struct media_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a new field to enable_source handler to find source entity
for the sink entity and check if it is available, and activate
the link using media_entity_setup_link() interface. Bridge driver
is expected to implement and set the handler when media_device is
registered or when bridge driver finds the media_device during
probe. This is to enable the use-case to find tuner entity
connected to the decoder entity and check if it is available,
and activate the using media_entity_setup_link() if it is available.
This hanlder can be invoked from media core (v4l-core, dvb-core)
as well as other drivers such as ALSA that control the media device.

Signed-off-by: Shuah Khan <shuahkh@xxxxxxxxxxxxxxx>
---
 include/media/media-device.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/media/media-device.h b/include/media/media-device.h
index e73642c..377102b 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -84,6 +84,18 @@ struct media_device {
 	/* Serializes graph operations. */
 	spinlock_t graph_lock;
 
+	/* Handler to find source entity for the sink entity and
+	 * check if it is available, and activate the link using
+	 * media_entity_setup_link() interface.
+	 * Bridge driver is expected to implement and set the
+	 * handler when media_device is registered or when
+	 * bridge driver finds the media_device during probe.
+	 *
+	 * Use-case: find tuner entity connected to the decoder
+	 * entity and check if it is available, and activate the
+	 * using media_entity_setup_link() if it is available.
+	*/
+	int (*enable_source)(struct media_entity *sink);
 	int (*link_notify)(struct media_link *link, u32 flags,
 			   unsigned int notification);
 };
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux