CONFIG_AMLOGIC_WDT_MESON=y
CONFIG_AMLOGIC_WIFI=y
CONFIG_AMLOGIC_BT_DEVICE=y
+CONFIG_AMLOGIC_DVB_COMPAT=y
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
this option is provided for control amlogic
drivers, if you want to use amlogic driver
please open it
+
if AMLOGIC_DRIVER
menu "Amlogic Device Drivers"
source "drivers/amlogic/bluetooth/Kconfig"
+source "drivers/amlogic/dvb/Kconfig"
+
endmenu
endif
--- /dev/null
+menu "DVB COMPAT support"
+config AMLOGIC_DVB_COMPAT
+ bool "Amlogic DVB drivers"
+ depends on COMPAT
+ help
+ select it to support amlogic dvb driver
+endmenu
return ret;
}
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+static long dvb_demux_compat_ioctl(struct file *filp,
+ unsigned int cmd, unsigned long args)
+{
+ unsigned long ret;
+
+ args = (unsigned long)compat_ptr(args);
+ ret = dvb_demux_ioctl(filp, cmd, args);
+ return ret;
+}
+#endif
+
static const struct file_operations dvb_demux_fops = {
.owner = THIS_MODULE,
.read = dvb_demux_read,
.release = dvb_demux_release,
.poll = dvb_demux_poll,
.llseek = default_llseek,
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+ .compat_ioctl = dvb_demux_compat_ioctl,
+#endif
};
static const struct dvb_device dvbdev_demux = {
return mask;
}
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+static long dvb_dvr_compat_ioctl(struct file *filp,
+ unsigned int cmd, unsigned long args)
+{
+ unsigned long ret;
+
+ args = (unsigned long)compat_ptr(args);
+ ret = dvb_dvr_ioctl(filp, cmd, args);
+ return ret;
+}
+#endif
+
static const struct file_operations dvb_dvr_fops = {
.owner = THIS_MODULE,
.read = dvb_dvr_read,
.release = dvb_dvr_release,
.poll = dvb_dvr_poll,
.llseek = default_llseek,
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+ .compat_ioctl = dvb_dvr_compat_ioctl,
+#endif
};
static const struct dvb_device dvbdev_dvr = {
}
EXPORT_SYMBOL(dvb_ca_en50221_init);
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+static long dvb_ca_en50221_compat_ioctl(struct file *filp,
+ unsigned int cmd, unsigned long args)
+{
+ unsigned long ret;
+
+ args = (unsigned long)compat_ptr(args);
+ ret = dvb_ca_en50221_io_ioctl(filp, cmd, args);
+ return ret;
+}
+#endif
static const struct file_operations dvb_ca_fops = {
.owner = THIS_MODULE,
.release = dvb_ca_en50221_io_release,
.poll = dvb_ca_en50221_io_poll,
.llseek = noop_llseek,
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+ .compat_ioctl = dvb_ca_en50221_compat_ioctl,
+#endif
};
static const struct dvb_device dvbdev_ca = {
return ret;
}
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+static long dvb_frontend_compat_ioctl(struct file *filp,
+ unsigned int cmd, unsigned long args)
+{
+ unsigned long ret;
+ struct dtv_properties tvps;
+
+ args = (unsigned long)compat_ptr(args);
+
+ if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) {
+ if (copy_from_user(&tvps, (void *)args,
+ sizeof(struct dtv_properties)))
+ return -EFAULT;
+ tvps.props = compat_ptr((unsigned long)tvps.props);
+ if (copy_to_user((void *)args, (void *)&tvps,
+ sizeof(struct dtv_properties)))
+ return -EFAULT;
+ }
+
+ ret = dvb_generic_ioctl(filp, cmd, args);
+ return ret;
+}
+#endif
+
static const struct file_operations dvb_frontend_fops = {
.owner = THIS_MODULE,
.unlocked_ioctl = dvb_generic_ioctl,
.open = dvb_frontend_open,
.release = dvb_frontend_release,
.llseek = noop_llseek,
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+ .compat_ioctl = dvb_frontend_compat_ioctl,
+#endif
};
int dvb_frontend_suspend(struct dvb_frontend *fe)
unsigned char cw[8];
} ca_descr_t;
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+
+/* CW type. */
+enum ca_cw_type {
+ CA_CW_DVB_CSA_EVEN,
+ CA_CW_DVB_CSA_ODD,
+ CA_CW_AES_EVEN,
+ CA_CW_AES_ODD,
+ CA_CW_AES_EVEN_IV,
+ CA_CW_AES_ODD_IV
+};
+
+struct ca_descr_ex {
+ unsigned int index;
+ enum ca_cw_type type;
+ int flags;
+#define CA_CW_FROM_KL 1
+ unsigned char cw[16];
+};
+
+#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
+
typedef struct ca_pid {
unsigned int pid;
int index; /* -1 == disable*/
#define CA_SET_DESCR _IOW('o', 134, ca_descr_t)
#define CA_SET_PID _IOW('o', 135, ca_pid_t)
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+#define CA_SET_DESCR_EX _IOW('o', 200, struct ca_descr_ex)
+#endif
+
#endif
#define DMX_ONESHOT 2
#define DMX_IMMEDIATE_START 4
#define DMX_KERNEL_CLIENT 0x8000
+
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+#define DMX_USE_SWFILTER 0x100
+#endif
};
DMX_SOURCE_DVR0 = 16,
DMX_SOURCE_DVR1,
DMX_SOURCE_DVR2,
- DMX_SOURCE_DVR3
+ DMX_SOURCE_DVR3,
+
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+ DMX_SOURCE_FRONT0_OFFSET = 100,
+ DMX_SOURCE_FRONT1_OFFSET,
+ DMX_SOURCE_FRONT2_OFFSET
+#endif
} dmx_source_t;
struct dmx_stc {
INTERLEAVING_720,
};
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+struct fe_blind_scan_parameters {
+ /* minimum tuner frequency in kHz */
+ __u32 min_frequency;
+ /* maximum tuner frequency in kHz */
+ __u32 max_frequency;
+ /* minimum symbol rate in sym/sec */
+ __u32 min_symbol_rate;
+ /* maximum symbol rate in sym/sec */
+ __u32 max_symbol_rate;
+ /* search range in kHz. freq -/+freqRange will be searched */
+ __u32 frequency_range;
+ /* tuner step frequency in kHz */
+ __u32 frequency_step;
+ /* blindscan event timeout */
+ __s32 timeout;
+};
+#endif
+
/* S2API Commands */
#define DTV_UNDEFINED 0
#define DTV_TUNE 1
#define DTV_STAT_ERROR_BLOCK_COUNT 68
#define DTV_STAT_TOTAL_BLOCK_COUNT 69
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+
+/* Get tne TS input of the frontend */
+#define DTV_TS_INPUT 70
+/* Blind scan */
+#define DTV_START_BLIND_SCAN 71
+#define DTV_CANCEL_BLIND_SCAN 72
+#define DTV_BLIND_SCAN_STATUS 73
+
+#define DTV_MAX_COMMAND DTV_BLIND_SCAN_STATUS
+
+#else /*!defined(CONFIG_AMLOGIC_DVB_COMPAT)*/
+
#define DTV_MAX_COMMAND DTV_STAT_TOTAL_BLOCK_COUNT
+#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
+
+
enum fe_pilot {
PILOT_ON,
PILOT_OFF,
struct dtv_properties {
__u32 num;
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+ union {
+ struct dtv_property *props;
+ __u64 reserved;
+ };
+#else
struct dtv_property *props;
+#endif
};
#if defined(__DVB_CORE__) || !defined (__KERNEL__)
} u;
};
+#ifdef CONFIG_AMLOGIC_DVB_COMPAT
+
+struct dvb_frontend_parameters_ex {
+ __u32 frequency; /* (absolute) frequency in Hz for DVB-C/DVB-T/ATSC */
+ /* intermediate frequency in kHz for DVB-S */
+ fe_spectral_inversion_t inversion;
+ union {
+ struct dvb_qpsk_parameters qpsk; /* DVB-S */
+ struct dvb_qam_parameters qam; /* DVB-C */
+ struct dvb_ofdm_parameters ofdm; /* DVB-T */
+ struct dvb_vsb_parameters vsb; /* ATSC */
+ /* Add extenstion data here */
+ } u;
+};
+
+static char dvb_check_frontend_parameters_size[
+ (sizeof(struct dvb_frontend_parameters_ex)
+ == sizeof(struct dvb_frontend_parameters)) ? 1 : -1]
+ __attribute__((__unused__));
+
+#endif /*CONFIG_AMLOGIC_DVB_COMPAT*/
+
struct dvb_frontend_event {
fe_status_t status;
struct dvb_frontend_parameters parameters;