misc: tspp: adding TSPP driver files

The TSPP driver manages the transport stream packet processor.  This core
is used to offload the main CPU by handling MPEG TS packets, generally
coming from a broadcast modem using the ISDB-T (or variant) protocol.

Change-Id: Ia4c16dcce970ae0f52d8d17957a92fce34ecdb44
Signed-off-by: Joel Nider <jnider@codeaurora.org>
This commit is contained in:
Joel Nider
2011-10-16 10:52:13 +02:00
parent 3c8b8dba52
commit 5556a85245
3 changed files with 2127 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef _MSM_TSPP_H_
#define _MSM_TSPP_H_
struct msm_tspp_platform_data {
int num_gpios;
const struct msm_gpio *gpios;
const char *tsif_pclk;
const char *tsif_ref_clk;
};
#endif /* _MSM_TSPP_H_ */

2019
drivers/misc/tspp.c Normal file

File diff suppressed because it is too large Load Diff

84
include/linux/tspp.h Normal file
View File

@@ -0,0 +1,84 @@
#ifndef _TSPP_H_
#define _TSPP_H_
#include <linux/ioctl.h>
#define TSPP_NUM_SYSTEM_KEYS 8
enum tspp_key_parity {
TSPP_KEY_PARITY_EVEN,
TSPP_KEY_PARITY_ODD
};
enum tspp_source {
TSPP_SOURCE_TSIF0,
TSPP_SOURCE_TSIF1,
TSPP_SOURCE_MEM,
TSPP_SOURCE_NONE = -1
};
enum tspp_mode {
TSPP_MODE_DISABLED,
TSPP_MODE_PES,
TSPP_MODE_RAW,
TSPP_MODE_RAW_NO_SUFFIX
};
struct tspp_filter {
int pid;
int mask;
enum tspp_mode mode;
int priority; /* 0 - 15 */
int decrypt;
enum tspp_source source;
};
struct tspp_select_source {
enum tspp_source source;
};
struct tspp_pid {
int pid;
};
struct tspp_key {
enum tspp_key_parity parity;
int lsb;
int msb;
};
struct tspp_iv {
int data[2];
};
struct tspp_system_keys {
int data[TSPP_NUM_SYSTEM_KEYS];
};
struct tspp_buffer {
int size;
};
/* defines for IOCTL functions */
/* read Documentation/ioctl-number.txt */
/* some random number to avoid coinciding with other ioctl numbers */
#define TSPP_IOCTL_BASE 0xAA
#define TSPP_IOCTL_SELECT_SOURCE \
_IOW(TSPP_IOCTL_BASE, 0, struct tspp_select_source)
#define TSPP_IOCTL_ADD_FILTER \
_IOW(TSPP_IOCTL_BASE, 1, struct tspp_filter)
#define TSPP_IOCTL_REMOVE_FILTER \
_IOW(TSPP_IOCTL_BASE, 2, struct tspp_pid)
#define TSPP_IOCTL_SET_KEY \
_IOW(TSPP_IOCTL_BASE, 3, struct tspp_key)
#define TSPP_IOCTL_SET_IV \
_IOW(TSPP_IOCTL_BASE, 4, struct tspp_iv)
#define TSPP_IOCTL_SET_SYSTEM_KEYS \
_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_ */