tspp: add kernel api for video demux component

The demux is an in-kernel software component whose purpose is to take
an incoming TSIF stream and split it into multiple output channels
based on the PID field in each TS packet. Each output channel can be
used for a different purpose, such as audio, video or channel
information. In order to get good performance when moving such large
data streams around, the demux was placed in kernel-space as to
prevent copying memory buffers between kernel-space and user-space, at
least at this early stage in processing the traffic. Originally the
design of the TSPP driver was based on the earlier TSIF driver, so it
contained only a user-space API.

Signed-off-by: Joel Nider <jnider@codeaurora.org>
(cherry picked from commit 435ad8e2157eec5783a435f1e7ec47f67d759882)

Change-Id: I0dadf04ec2694c82fc8378fbed5fbf81fc889337
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
diff --git a/include/linux/tspp.h b/include/linux/tspp.h
index d5a5ffc..3f0cc81 100644
--- a/include/linux/tspp.h
+++ b/include/linux/tspp.h
@@ -24,6 +24,12 @@
 	TSPP_MODE_RAW_NO_SUFFIX
 };
 
+enum tspp_tsif_mode {
+	TSPP_TSIF_MODE_LOOPBACK, /* loopback mode */
+	TSPP_TSIF_MODE_1,        /* without sync */
+	TSPP_TSIF_MODE_2         /* with sync signal */
+};
+
 struct tspp_filter {
 	int pid;
 	int mask;
@@ -35,6 +41,7 @@
 
 struct tspp_select_source {
 	enum tspp_source source;
+	enum tspp_tsif_mode mode;
 };
 
 struct tspp_pid {
@@ -77,8 +84,5 @@
 	_IOW(TSPP_IOCTL_BASE, 5, struct tspp_system_keys)
 #define TSPP_IOCTL_BUFFER_SIZE		\
 	_IOW(TSPP_IOCTL_BASE, 6, struct tspp_buffer)
-#define TSPP_IOCTL_LOOPBACK			\
-	_IOW(TSPP_IOCTL_BASE, 0xFF, int)
-
 
 #endif /* _TSPP_H_ */