diff --git a/projects/Cuboxi/bootloader/boot.cfg b/projects/Cuboxi/bootloader/boot.cfg new file mode 100644 index 0000000000..f86e107bcf --- /dev/null +++ b/projects/Cuboxi/bootloader/boot.cfg @@ -0,0 +1,3 @@ +setenv bootargs 'console=ttymxc0,115200 video=mxcfb0:dev=hdmi,1920x1080M@60,if=RGB24,bpp=32' +fatload mmc 0:1 0x10800000 /KERNEL +bootm 0x10800000 diff --git a/projects/Cuboxi/linux/linux.arm.conf b/projects/Cuboxi/linux/linux.arm.conf new file mode 100644 index 0000000000..fc311d663b --- /dev/null +++ b/projects/Cuboxi/linux/linux.arm.conf @@ -0,0 +1,3075 @@ +# +# Automatically generated make config: don't edit +# Linux/arm 3.0.35 Kernel Configuration +# +CONFIG_ARM=y +CONFIG_HAVE_PWM=y +CONFIG_SYS_SUPPORTS_APM_EMULATION=y +CONFIG_HAVE_SCHED_CLOCK=y +CONFIG_GENERIC_GPIO=y +# CONFIG_ARCH_USES_GETTIMEOFFSET is not set +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y +CONFIG_KTIME_SCALAR=y +CONFIG_HAVE_PROC_CPU=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_LOCKBREAK=y +CONFIG_RWSEM_GENERIC_SPINLOCK=y +CONFIG_ARCH_HAS_CPUFREQ=y +CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_FIQ=y +CONFIG_VECTORS_BASE=0xffff0000 +# CONFIG_ARM_PATCH_PHYS_VIRT is not set +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_HAVE_IRQ_WORK=y + +# +# General setup +# +CONFIG_EXPERIMENTAL=y +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_HAVE_KERNEL_GZIP=y +CONFIG_HAVE_KERNEL_LZMA=y +CONFIG_HAVE_KERNEL_LZO=y +CONFIG_KERNEL_GZIP=y +# CONFIG_KERNEL_LZMA is not set +# CONFIG_KERNEL_LZO is not set +CONFIG_DEFAULT_HOSTNAME="openelec" +CONFIG_SWAP=y +CONFIG_SYSVIPC=y +CONFIG_SYSVIPC_SYSCTL=y +CONFIG_POSIX_MQUEUE=y +CONFIG_POSIX_MQUEUE_SYSCTL=y +# CONFIG_BSD_PROCESS_ACCT is not set +CONFIG_FHANDLE=y +# CONFIG_TASKSTATS is not set +# CONFIG_AUDIT is not set +CONFIG_HAVE_GENERIC_HARDIRQS=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_HARDIRQS=y +CONFIG_HAVE_SPARSE_IRQ=y +CONFIG_GENERIC_IRQ_SHOW=y +# CONFIG_SPARSE_IRQ is not set + +# +# RCU Subsystem +# +CONFIG_TREE_PREEMPT_RCU=y +CONFIG_PREEMPT_RCU=y +# CONFIG_RCU_TRACE is not set +CONFIG_RCU_FANOUT=32 +# CONFIG_RCU_FANOUT_EXACT is not set +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_BOOST is not set +CONFIG_IKCONFIG=m +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=17 +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +# CONFIG_CGROUP_FREEZER is not set +# CONFIG_CGROUP_DEVICE is not set +# CONFIG_CPUSETS is not set +# CONFIG_CGROUP_CPUACCT is not set +# CONFIG_RESOURCE_COUNTERS is not set +# CONFIG_CGROUP_SCHED is not set +# CONFIG_BLK_CGROUP is not set +# CONFIG_NAMESPACES is not set +# CONFIG_SCHED_AUTOGROUP is not set +# CONFIG_SYSFS_DEPRECATED is not set +# CONFIG_RELAY is not set +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE=" " +CONFIG_INITRAMFS_ROOT_UID=0 +CONFIG_INITRAMFS_ROOT_GID=0 +CONFIG_RD_GZIP=y +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +CONFIG_INITRAMFS_COMPRESSION_NONE=y +# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set +# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_EXPERT=y +# CONFIG_UID16 is not set +CONFIG_SYSCTL_SYSCALL=y +CONFIG_KALLSYMS=y +# CONFIG_KALLSYMS_ALL is not set +CONFIG_HOTPLUG=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_SHMEM=y +# CONFIG_AIO is not set +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y +CONFIG_PERF_USE_VMALLOC=y + +# +# Kernel Performance Events And Counters +# +# CONFIG_PERF_EVENTS is not set +# CONFIG_PERF_COUNTERS is not set +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_SLUB_DEBUG is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_PROFILING is not set +CONFIG_HAVE_OPROFILE=y +# CONFIG_KPROBES is not set +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_USE_GENERIC_SMP_HELPERS=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +# CONFIG_MODULE_FORCE_LOAD is not set +CONFIG_MODULE_UNLOAD=y +# CONFIG_MODULE_FORCE_UNLOAD is not set +# CONFIG_MODVERSIONS is not set +# CONFIG_MODULE_SRCVERSION_ALL is not set +CONFIG_STOP_MACHINE=y +CONFIG_BLOCK=y +CONFIG_LBDAF=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_INTEGRITY is not set + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +# CONFIG_DEFAULT_CFQ is not set +CONFIG_DEFAULT_NOOP=y +CONFIG_DEFAULT_IOSCHED="noop" +# CONFIG_INLINE_SPIN_TRYLOCK is not set +# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK is not set +# CONFIG_INLINE_SPIN_LOCK_BH is not set +# CONFIG_INLINE_SPIN_LOCK_IRQ is not set +# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set +# CONFIG_INLINE_SPIN_UNLOCK is not set +# CONFIG_INLINE_SPIN_UNLOCK_BH is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set +# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_READ_TRYLOCK is not set +# CONFIG_INLINE_READ_LOCK is not set +# CONFIG_INLINE_READ_LOCK_BH is not set +# CONFIG_INLINE_READ_LOCK_IRQ is not set +# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set +# CONFIG_INLINE_READ_UNLOCK is not set +# CONFIG_INLINE_READ_UNLOCK_BH is not set +# CONFIG_INLINE_READ_UNLOCK_IRQ is not set +# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set +# CONFIG_INLINE_WRITE_TRYLOCK is not set +# CONFIG_INLINE_WRITE_LOCK is not set +# CONFIG_INLINE_WRITE_LOCK_BH is not set +# CONFIG_INLINE_WRITE_LOCK_IRQ is not set +# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set +# CONFIG_INLINE_WRITE_UNLOCK is not set +# CONFIG_INLINE_WRITE_UNLOCK_BH is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set +# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set +CONFIG_MUTEX_SPIN_ON_OWNER=y +# CONFIG_FREEZER is not set + +# +# System Type +# +CONFIG_MMU=y +# CONFIG_ARCH_INTEGRATOR is not set +# CONFIG_ARCH_REALVIEW is not set +# CONFIG_ARCH_VERSATILE is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_AT91 is not set +# CONFIG_ARCH_BCMRING is not set +# CONFIG_ARCH_CLPS711X is not set +# CONFIG_ARCH_CNS3XXX is not set +# CONFIG_ARCH_GEMINI is not set +# CONFIG_ARCH_EBSA110 is not set +# CONFIG_ARCH_EP93XX is not set +# CONFIG_ARCH_FOOTBRIDGE is not set +CONFIG_ARCH_MXC=y +# CONFIG_ARCH_MXS is not set +# CONFIG_ARCH_NETX is not set +# CONFIG_ARCH_H720X is not set +# CONFIG_ARCH_IOP13XX is not set +# CONFIG_ARCH_IOP32X is not set +# CONFIG_ARCH_IOP33X is not set +# CONFIG_ARCH_IXP23XX is not set +# CONFIG_ARCH_IXP2000 is not set +# CONFIG_ARCH_IXP4XX is not set +# CONFIG_ARCH_DOVE is not set +# CONFIG_ARCH_KIRKWOOD is not set +# CONFIG_ARCH_LOKI is not set +# CONFIG_ARCH_LPC32XX is not set +# CONFIG_ARCH_MV78XX0 is not set +# CONFIG_ARCH_ORION5X is not set +# CONFIG_ARCH_MMP is not set +# CONFIG_ARCH_KS8695 is not set +# CONFIG_ARCH_W90X900 is not set +# CONFIG_ARCH_NUC93X is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_PNX4008 is not set +# CONFIG_ARCH_PXA is not set +# CONFIG_ARCH_MSM is not set +# CONFIG_ARCH_SHMOBILE is not set +# CONFIG_ARCH_RPC is not set +# CONFIG_ARCH_SA1100 is not set +# CONFIG_ARCH_S3C2410 is not set +# CONFIG_ARCH_S3C64XX is not set +# CONFIG_ARCH_S5P64X0 is not set +# CONFIG_ARCH_S5PC100 is not set +# CONFIG_ARCH_S5PV210 is not set +# CONFIG_ARCH_EXYNOS4 is not set +# CONFIG_ARCH_SHARK is not set +# CONFIG_ARCH_TCC_926 is not set +# CONFIG_ARCH_U300 is not set +# CONFIG_ARCH_U8500 is not set +# CONFIG_ARCH_NOMADIK is not set +# CONFIG_ARCH_DAVINCI is not set +# CONFIG_ARCH_OMAP is not set +# CONFIG_PLAT_SPEAR is not set +# CONFIG_ARCH_VT8500 is not set +CONFIG_GPIO_PCA953X=y +CONFIG_IMX_HAVE_PLATFORM_DMA=y +CONFIG_IMX_HAVE_PLATFORM_MXC_MLB=y +CONFIG_IMX_HAVE_PLATFORM_FEC=y +CONFIG_IMX_HAVE_PLATFORM_FLEXCAN=y +CONFIG_IMX_HAVE_PLATFORM_FSL_USB2_UDC=y +CONFIG_IMX_HAVE_PLATFORM_GPMI_NFC=y +CONFIG_IMX_HAVE_PLATFORM_IMX2_WDT=y +CONFIG_IMX_HAVE_PLATFORM_IMX_SNVS_RTC=y +CONFIG_IMX_HAVE_PLATFORM_IMX_CAAM=y +CONFIG_IMX_HAVE_PLATFORM_IMX_I2C=y +CONFIG_IMX_HAVE_PLATFORM_IMX_SSI=y +CONFIG_IMX_HAVE_PLATFORM_IMX_ESAI=y +CONFIG_IMX_HAVE_PLATFORM_IMX_UART=y +CONFIG_IMX_HAVE_PLATFORM_MXC_EHCI=y +CONFIG_IMX_HAVE_PLATFORM_MXC_PWM=y +CONFIG_IMX_HAVE_PLATFORM_SDHCI_ESDHC_IMX=y +CONFIG_IMX_HAVE_PLATFORM_SPI_IMX=y +CONFIG_IMX_HAVE_PLATFORM_IMX_IPUV3=y +CONFIG_IMX_HAVE_PLATFORM_IMX_VPU=y +CONFIG_IMX_HAVE_PLATFORM_IMX_DVFS=y +CONFIG_IMX_HAVE_PLATFORM_AHCI=y +CONFIG_IMX_HAVE_PLATFORM_IMX_OCOTP=y +CONFIG_IMX_HAVE_PLATFORM_IMX_VIIM=y +CONFIG_IMX_HAVE_PLATFORM_PERFMON=y +CONFIG_IMX_HAVE_PLATFORM_LDB=y +CONFIG_IMX_HAVE_PLATFORM_IMX_PXP=y +CONFIG_IMX_HAVE_PLATFORM_IMX_ELCDIF=y +CONFIG_IMX_HAVE_PLATFORM_IMX_EPDC=y +CONFIG_IMX_HAVE_PLATFORM_IMX_SPDIF=y +CONFIG_IMX_HAVE_PLATFORM_VIV_GPU=y +CONFIG_IMX_HAVE_PLATFORM_MXC_HDMI=y +CONFIG_IMX_HAVE_PLATFORM_IMX_ANATOP_THERMAL=y +CONFIG_IMX_HAVE_PLATFORM_FSL_OTG=y +CONFIG_IMX_HAVE_PLATFORM_FSL_USB_WAKEUP=y +CONFIG_IMX_HAVE_PLATFORM_IMX_PM=y +CONFIG_IMX_HAVE_PLATFORM_IMX_ASRC=y +CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_DSI=y +CONFIG_IMX_HAVE_PLATFORM_IMX_MIPI_CSI2=y +CONFIG_IMX_HAVE_PLATFORM_IMX_VDOA=y +CONFIG_IMX_HAVE_PLATFORM_IMX_PCIE=y + +# +# Freescale MXC Implementations +# +# CONFIG_ARCH_MX1 is not set +# CONFIG_ARCH_MX2 is not set +# CONFIG_ARCH_MX25 is not set +# CONFIG_ARCH_MX3 is not set +# CONFIG_ARCH_MX503 is not set +# CONFIG_ARCH_MX51 is not set +CONFIG_ARCH_MX6=y +CONFIG_ARCH_MX6Q=y +CONFIG_FORCE_MAX_ZONEORDER=14 +CONFIG_SOC_IMX6Q=y +CONFIG_MACH_MICROSOM=y +CONFIG_MACH_MX6Q_ARM2=y +# CONFIG_MACH_MX6SL_ARM2 is not set +# CONFIG_MACH_MX6SL_EVK is not set +CONFIG_MACH_MX6Q_SABRELITE=y +CONFIG_MACH_MX6Q_SABRESD=y +CONFIG_MACH_MX6Q_SABREAUTO=y +CONFIG_MACH_MX6Q_HDMIDONGLE=y +CONFIG_MACH_C1=y +CONFIG_MACH_CUBOX_I=y + +# +# MX6 Options: +# +# CONFIG_IMX_PCIE is not set +CONFIG_USB_EHCI_ARC_H1=y +CONFIG_USB_FSL_ARC_OTG=y +# CONFIG_MX6_INTER_LDO_BYPASS is not set +# CONFIG_MX6_CLK_FOR_BOOTUI_TRANS is not set +CONFIG_ISP1504_MXC=y +# CONFIG_MXC_IRQ_PRIOR is not set +CONFIG_MXC_PWM=y +# CONFIG_MXC_DEBUG_BOARD is not set +CONFIG_MXC_REBOOT_MFGMODE=y +# CONFIG_MXC_REBOOT_ANDROID_CMD is not set +CONFIG_ARCH_MXC_IOMUX_V3=y +CONFIG_ARCH_MXC_AUDMUX_V2=y +CONFIG_IRAM_ALLOC=y +CONFIG_CLK_DEBUG=y +CONFIG_DMA_ZONE_SIZE=184 + +# +# System MMU +# + +# +# Processor Type +# +CONFIG_CPU_V7=y +CONFIG_CPU_32v6K=y +CONFIG_CPU_32v7=y +CONFIG_CPU_ABRT_EV7=y +CONFIG_CPU_PABRT_V7=y +CONFIG_CPU_CACHE_V7=y +CONFIG_CPU_CACHE_VIPT=y +CONFIG_CPU_COPY_V6=y +CONFIG_CPU_TLB_V7=y +CONFIG_CPU_HAS_ASID=y +CONFIG_CPU_CP15=y +CONFIG_CPU_CP15_MMU=y + +# +# Processor Features +# +CONFIG_ARM_THUMB=y +# CONFIG_ARM_THUMBEE is not set +# CONFIG_SWP_EMULATE is not set +# CONFIG_CPU_ICACHE_DISABLE is not set +# CONFIG_CPU_DCACHE_DISABLE is not set +# CONFIG_CPU_BPREDICT_DISABLE is not set +CONFIG_OUTER_CACHE=y +CONFIG_OUTER_CACHE_SYNC=y +CONFIG_CACHE_L2X0=y +CONFIG_CACHE_PL310=y +CONFIG_ARM_L1_CACHE_SHIFT=5 +CONFIG_ARM_DMA_MEM_BUFFERABLE=y +CONFIG_CPU_HAS_PMU=y +# CONFIG_ARM_ERRATA_430973 is not set +# CONFIG_ARM_ERRATA_458693 is not set +# CONFIG_ARM_ERRATA_460075 is not set +# CONFIG_ARM_ERRATA_742230 is not set +# CONFIG_ARM_ERRATA_742231 is not set +# CONFIG_PL310_ERRATA_588369 is not set +# CONFIG_ARM_ERRATA_720789 is not set +# CONFIG_PL310_ERRATA_727915 is not set +CONFIG_ARM_ERRATA_743622=y +CONFIG_ARM_ERRATA_751472=y +# CONFIG_ARM_ERRATA_753970 is not set +CONFIG_ARM_ERRATA_754322=y +# CONFIG_ARM_ERRATA_754327 is not set +CONFIG_ARM_ERRATA_775420=y +CONFIG_ARM_GIC=y + +# +# Bus support +# +CONFIG_ARM_AMBA=y +# CONFIG_PCI_SYSCALL is not set +CONFIG_ARCH_SUPPORTS_MSI=y +# CONFIG_PCCARD is not set +CONFIG_ARM_ERRATA_764369=y +CONFIG_PL310_ERRATA_769419=y + +# +# Kernel Features +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_GENERIC_CLOCKEVENTS_BUILD=y +CONFIG_SMP=y +CONFIG_SMP_ON_UP=y +CONFIG_HAVE_ARM_SCU=y +CONFIG_HAVE_ARM_TWD=y +# CONFIG_VMSPLIT_3G is not set +CONFIG_VMSPLIT_2G=y +# CONFIG_VMSPLIT_1G is not set +CONFIG_PAGE_OFFSET=0x80000000 +CONFIG_NR_CPUS=4 +CONFIG_HOTPLUG_CPU=y +CONFIG_LOCAL_TIMERS=y +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_HZ=100 +# CONFIG_THUMB2_KERNEL is not set +CONFIG_AEABI=y +# CONFIG_OABI_COMPAT is not set +# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set +# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HIGHMEM=y +# CONFIG_HIGHPTE is not set +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_FLATMEM_MANUAL=y +CONFIG_FLATMEM=y +CONFIG_FLAT_NODE_MEM_MAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_PAGEFLAGS_EXTENDED=y +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +# CONFIG_PHYS_ADDR_T_64BIT is not set +CONFIG_ZONE_DMA_FLAG=1 +CONFIG_BOUNCE=y +CONFIG_VIRT_TO_BUS=y +CONFIG_KSM=y +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +CONFIG_CLEANCACHE=y +CONFIG_ALIGNMENT_TRAP=y +# CONFIG_UACCESS_WITH_MEMCPY is not set +# CONFIG_SECCOMP is not set +# CONFIG_CC_STACKPROTECTOR is not set +# CONFIG_DEPRECATED_PARAM_STRUCT is not set + +# +# Boot options +# +# CONFIG_USE_OF is not set +CONFIG_ZBOOT_ROM_TEXT=0x0 +CONFIG_ZBOOT_ROM_BSS=0x0 +CONFIG_CMDLINE="root=/dev/ram0 rdinit=/init consoleblank=0 gpumem=64M fbmem=10M" +# CONFIG_CMDLINE_FROM_BOOTLOADER is not set +CONFIG_CMDLINE_EXTEND=y +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_XIP_KERNEL is not set +# CONFIG_KEXEC is not set +# CONFIG_CRASH_DUMP is not set +# CONFIG_AUTO_ZRELADDR is not set + +# +# CPU Power Management +# + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_TABLE=y +# CONFIG_CPU_FREQ_STAT is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_IMX=y +# CONFIG_CPU_IDLE is not set + +# +# Floating point emulation +# + +# +# At least one emulation must be selected +# +CONFIG_VFP=y +CONFIG_VFPv3=y +CONFIG_NEON=y + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_HAVE_AOUT=y +# CONFIG_BINFMT_AOUT is not set +# CONFIG_BINFMT_MISC is not set + +# +# Power management options +# +# CONFIG_SUSPEND is not set +CONFIG_PM_RUNTIME=y +CONFIG_PM=y +CONFIG_PM_DEBUG=y +# CONFIG_PM_ADVANCED_DEBUG is not set +CONFIG_APM_EMULATION=y +CONFIG_PM_RUNTIME_CLK=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y +CONFIG_NET=y + +# +# Networking options +# +CONFIG_PACKET=y +CONFIG_UNIX=y +# CONFIG_NET_KEY is not set +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +# CONFIG_IP_ADVANCED_ROUTER is not set +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +# CONFIG_IP_PNP_RARP is not set +# CONFIG_NET_IPIP is not set +# CONFIG_NET_IPGRE_DEMUX is not set +CONFIG_IP_MROUTE=y +# CONFIG_IP_PIMSM_V1 is not set +# CONFIG_IP_PIMSM_V2 is not set +# CONFIG_ARPD is not set +# CONFIG_SYN_COOKIES is not set +# CONFIG_INET_AH is not set +# CONFIG_INET_ESP is not set +# CONFIG_INET_IPCOMP is not set +# CONFIG_INET_XFRM_TUNNEL is not set +CONFIG_INET_TUNNEL=m +# CONFIG_INET_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET_XFRM_MODE_TUNNEL is not set +# CONFIG_INET_XFRM_MODE_BEET is not set +CONFIG_INET_LRO=y +# CONFIG_INET_DIAG is not set +# CONFIG_TCP_CONG_ADVANCED is not set +CONFIG_TCP_CONG_CUBIC=y +CONFIG_DEFAULT_TCP_CONG="cubic" +# CONFIG_TCP_MD5SIG is not set +CONFIG_IPV6=y +# CONFIG_IPV6_PRIVACY is not set +# CONFIG_IPV6_ROUTER_PREF is not set +# CONFIG_IPV6_OPTIMISTIC_DAD is not set +# CONFIG_INET6_AH is not set +# CONFIG_INET6_ESP is not set +# CONFIG_INET6_IPCOMP is not set +# CONFIG_IPV6_MIP6 is not set +# CONFIG_INET6_XFRM_TUNNEL is not set +# CONFIG_INET6_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set +# CONFIG_INET6_XFRM_MODE_TUNNEL is not set +# CONFIG_INET6_XFRM_MODE_BEET is not set +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_SIT=m +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +# CONFIG_IPV6_TUNNEL is not set +# CONFIG_IPV6_MULTIPLE_TABLES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETWORK_SECMARK is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +# CONFIG_NETFILTER_ADVANCED is not set + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_NETLINK=m +CONFIG_NETFILTER_NETLINK_LOG=m +CONFIG_NF_CONNTRACK=m +CONFIG_NF_CONNTRACK_FTP=m +CONFIG_NF_CONNTRACK_IRC=m +CONFIG_NF_CONNTRACK_SIP=m +CONFIG_NF_CT_NETLINK=m +CONFIG_NETFILTER_XTABLES=m + +# +# Xtables combined modules +# +# CONFIG_NETFILTER_XT_MARK is not set + +# +# Xtables targets +# +# CONFIG_NETFILTER_XT_TARGET_NFLOG is not set +# CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set + +# +# Xtables matches +# +# CONFIG_NETFILTER_XT_MATCH_CONNTRACK is not set +# CONFIG_NETFILTER_XT_MATCH_STATE is not set +# CONFIG_IP_SET is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=m +CONFIG_NF_CONNTRACK_IPV4=m +# CONFIG_NF_CONNTRACK_PROC_COMPAT is not set +CONFIG_IP_NF_IPTABLES=m +CONFIG_IP_NF_FILTER=m +CONFIG_IP_NF_TARGET_REJECT=m +CONFIG_IP_NF_TARGET_LOG=m +# CONFIG_IP_NF_TARGET_ULOG is not set +CONFIG_NF_NAT=m +CONFIG_NF_NAT_NEEDED=y +CONFIG_IP_NF_TARGET_MASQUERADE=m +CONFIG_NF_NAT_FTP=m +CONFIG_NF_NAT_IRC=m +# CONFIG_NF_NAT_TFTP is not set +# CONFIG_NF_NAT_AMANDA is not set +# CONFIG_NF_NAT_PPTP is not set +# CONFIG_NF_NAT_H323 is not set +CONFIG_NF_NAT_SIP=m +# CONFIG_IP_NF_MANGLE is not set + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=m +CONFIG_NF_CONNTRACK_IPV6=m +CONFIG_IP6_NF_IPTABLES=m +# CONFIG_IP6_NF_MATCH_IPV6HEADER is not set +# CONFIG_IP6_NF_TARGET_LOG is not set +CONFIG_IP6_NF_FILTER=m +CONFIG_IP6_NF_TARGET_REJECT=m +# CONFIG_IP6_NF_MANGLE is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +# CONFIG_L2TP is not set +CONFIG_STP=m +CONFIG_BRIDGE=m +CONFIG_BRIDGE_IGMP_SNOOPING=y +# CONFIG_NET_DSA is not set +CONFIG_VLAN_8021Q=m +# CONFIG_VLAN_8021Q_GVRP is not set +# CONFIG_DECNET is not set +CONFIG_LLC=m +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_ECONET is not set +# CONFIG_WAN_ROUTER is not set +# CONFIG_PHONET is not set +# CONFIG_IEEE802154 is not set +# CONFIG_NET_SCHED is not set +# CONFIG_DCB is not set +CONFIG_DNS_RESOLVER=y +# CONFIG_BATMAN_ADV is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y + +# +# Network testing +# +# CONFIG_NET_PKTGEN is not set +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=m +CONFIG_BT_L2CAP=y +# CONFIG_BT_SCO is not set +CONFIG_BT_RFCOMM=m +CONFIG_BT_RFCOMM_TTY=y +# CONFIG_BT_BNEP is not set +CONFIG_BT_HIDP=m + +# +# Bluetooth device drivers +# +CONFIG_BT_HCIBTUSB=m +# CONFIG_BT_HCIBTSDIO is not set +# CONFIG_BT_HCIUART is not set +CONFIG_BT_HCIBCM203X=m +CONFIG_BT_HCIBPA10X=m +CONFIG_BT_HCIBFUSB=m +# CONFIG_BT_HCIVHCI is not set +# CONFIG_BT_MRVL is not set +CONFIG_BT_ATH3K=m +# CONFIG_AF_RXRPC is not set +CONFIG_WIRELESS=y +CONFIG_WIRELESS_EXT=y +CONFIG_WEXT_CORE=y +CONFIG_WEXT_PROC=y +CONFIG_WEXT_PRIV=y +CONFIG_CFG80211=m +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_REG_DEBUG is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_DEBUGFS is not set +CONFIG_CFG80211_INTERNAL_REGDB=y +CONFIG_CFG80211_WEXT=y +CONFIG_WIRELESS_EXT_SYSFS=y +CONFIG_LIB80211=y +# CONFIG_LIB80211_DEBUG is not set +CONFIG_MAC80211=m +CONFIG_MAC80211_HAS_RC=y +# CONFIG_MAC80211_RC_PID is not set +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +CONFIG_MAC80211_LEDS=y +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +# CONFIG_WIMAX is not set +# CONFIG_RFKILL is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set + +# +# Device Drivers +# + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER_PATH="" +CONFIG_DEVTMPFS=y +# CONFIG_DEVTMPFS_MOUNT is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +# CONFIG_BLK_DEV_CRYPTOLOOP is not set + +# +# DRBD disabled because PROC_FS, INET or CONNECTOR not selected +# +CONFIG_BLK_DEV_NBD=y +# CONFIG_BLK_DEV_UB is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=4096 +# CONFIG_BLK_DEV_XIP is not set +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_MG_DISK is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_SENSORS_LIS3LV02D is not set +CONFIG_MISC_DEVICES=y +# CONFIG_AD525X_DPOT is not set +# CONFIG_INTEL_MID_PTI is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1780 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_TI_DAC7512 is not set +# CONFIG_BMP085 is not set +CONFIG_MXS_PERFMON=m +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_AT25 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +CONFIG_EEPROM_93CX6=m +# CONFIG_IWMC3200TOP is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_SPI is not set +# CONFIG_SENSORS_LIS3_I2C is not set +CONFIG_HAVE_IDE=y +# CONFIG_IDE is not set + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_TGT is not set +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_PROC_FS is not set + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +CONFIG_BLK_DEV_SR=y +# CONFIG_BLK_DEV_SR_VENDOR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +CONFIG_SCSI_MULTI_LUN=y +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set +CONFIG_SCSI_WAIT_SCAN=m + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +CONFIG_SCSI_ISCSI_ATTRS=y +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +CONFIG_ISCSI_TCP=y +CONFIG_ISCSI_BOOT_SYSFS=y +# CONFIG_LIBFC is not set +# CONFIG_LIBFCOE is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_ATA=y +# CONFIG_ATA_NONSTANDARD is not set +CONFIG_ATA_VERBOSE_ERROR=y +# CONFIG_SATA_PMP is not set + +# +# Controllers with non-SFF native interface +# +CONFIG_SATA_AHCI_PLATFORM=y +CONFIG_ATA_SFF=y + +# +# SFF controllers with custom DMA interface +# +CONFIG_ATA_BMDMA=y + +# +# SATA SFF controllers with BMDMA +# +# CONFIG_SATA_MV is not set + +# +# PATA SFF controllers with BMDMA +# +# CONFIG_PATA_ARASAN_CF is not set + +# +# PIO-only SFF controllers +# +# CONFIG_PATA_PLATFORM is not set + +# +# Generic fallback / legacy drivers +# +# CONFIG_MD is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_MACVLAN is not set +# CONFIG_EQUALIZER is not set +CONFIG_TUN=y +# CONFIG_VETH is not set +CONFIG_MII=y +CONFIG_PHYLIB=y + +# +# MII PHY device drivers +# +# CONFIG_MARVELL_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_ICPLUS_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_NATIONAL_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_LSI_ET1011C_PHY is not set +CONFIG_MICREL_PHY=m +# CONFIG_FIXED_PHY is not set +# CONFIG_MDIO_BITBANG is not set +CONFIG_NET_ETHERNET=y +# CONFIG_AX88796 is not set +# CONFIG_SMC91X is not set +# CONFIG_DM9000 is not set +# CONFIG_ENC28J60 is not set +# CONFIG_ETHOC is not set +# CONFIG_SMC911X is not set +CONFIG_SMSC911X=m +# CONFIG_SMSC911X_ARCH_HOOKS is not set +# CONFIG_DNET is not set +# CONFIG_IBM_NEW_EMAC_ZMII is not set +# CONFIG_IBM_NEW_EMAC_RGMII is not set +# CONFIG_IBM_NEW_EMAC_TAH is not set +# CONFIG_IBM_NEW_EMAC_EMAC4 is not set +# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set +# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set +# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set +# CONFIG_B44 is not set +# CONFIG_KS8842 is not set +# CONFIG_KS8851 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_FEC=y +CONFIG_FEC_NAPI=y +# CONFIG_FEC_1588 is not set +# CONFIG_FTMAC100 is not set +# CONFIG_NETDEV_1000 is not set +# CONFIG_NETDEV_10000 is not set +CONFIG_WLAN=y +# CONFIG_LIBERTAS_THINFIRM is not set +# CONFIG_AT76C50X_USB is not set +CONFIG_USB_ZD1201=m +CONFIG_USB_NET_RNDIS_WLAN=m +CONFIG_RTL8187=m +CONFIG_RTL8187_LEDS=y +# CONFIG_MAC80211_HWSIM is not set +CONFIG_ATH_COMMON=m +# CONFIG_ATH_DEBUG is not set +CONFIG_ATH9K_HW=m +CONFIG_ATH9K_COMMON=m +CONFIG_ATH9K=m +CONFIG_ATH9K_AHB=y +# CONFIG_ATH9K_DEBUGFS is not set +CONFIG_ATH9K_RATE_CONTROL=y +CONFIG_ATH9K_HTC=m +# CONFIG_ATH9K_HTC_DEBUGFS is not set +CONFIG_CARL9170=m +CONFIG_CARL9170_LEDS=y +CONFIG_CARL9170_WPC=y +CONFIG_ATH6KL=m +# CONFIG_ATH6KL_DEBUG is not set +CONFIG_B43=m +# CONFIG_B43_SDIO is not set +CONFIG_B43_PIO=y +CONFIG_B43_PHY_N=y +CONFIG_B43_PHY_LP=y +CONFIG_B43_LEDS=y +CONFIG_B43_HWRNG=y +# CONFIG_B43_DEBUG is not set +# CONFIG_B43LEGACY is not set +CONFIG_BRCMUTIL=m +CONFIG_BRCMFMAC=m +CONFIG_BRCMFMAC_SDIO=y +# CONFIG_BRCMFMAC_SDIO_OOB is not set +CONFIG_BRCMFMAC_USB=y +# CONFIG_BRCMDBG is not set +# CONFIG_HOSTAP is not set +# CONFIG_IWM is not set +# CONFIG_LIBERTAS is not set +CONFIG_P54_COMMON=m +CONFIG_P54_USB=m +# CONFIG_P54_SPI is not set +CONFIG_P54_LEDS=y +CONFIG_RT2X00=m +CONFIG_RT2500USB=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT33XX=y +CONFIG_RT2800USB_RT35XX=y +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RT2800_LIB=m +CONFIG_RT2X00_LIB_USB=m +CONFIG_RT2X00_LIB=m +CONFIG_RT2X00_LIB_FIRMWARE=y +CONFIG_RT2X00_LIB_CRYPTO=y +CONFIG_RT2X00_LIB_LEDS=y +# CONFIG_RT2X00_DEBUG is not set +CONFIG_RTL8192SE=m +# CONFIG_RTL8192CU is not set +CONFIG_RTLWIFI=m +CONFIG_RTL8192C_COMMON=m +# CONFIG_WL1251 is not set +# CONFIG_WL12XX_MENU is not set +CONFIG_ZD1211RW=m +# CONFIG_ZD1211RW_DEBUG is not set +# CONFIG_MWIFIEX is not set + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# + +# +# USB Network Adapters +# +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_USBNET=m +CONFIG_USB_NET_AX8817X=m +CONFIG_USB_NET_CDCETHER=m +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_CDC_NCM=m +# CONFIG_USB_NET_DM9601 is not set +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=m +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +CONFIG_USB_NET_RNDIS_HOST=m +CONFIG_USB_NET_CDC_SUBSET=m +# CONFIG_USB_ALI_M5632 is not set +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=m +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_USB_VL600 is not set +# CONFIG_WAN is not set + +# +# CAIF transport drivers +# +CONFIG_PPP=y +# CONFIG_PPP_MULTILINK is not set +# CONFIG_PPP_FILTER is not set +CONFIG_PPP_ASYNC=m +# CONFIG_PPP_SYNC_TTY is not set +CONFIG_PPP_DEFLATE=m +CONFIG_PPP_BSDCOMP=m +CONFIG_PPP_MPPE=m +CONFIG_PPPOE=m +# CONFIG_SLIP is not set +CONFIG_SLHC=y +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_ISDN is not set +# CONFIG_PHONE is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_FF_MEMLESS=y +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set + +# +# Userland interfaces +# +CONFIG_INPUT_MOUSEDEV=y +# CONFIG_INPUT_MOUSEDEV_PSAUX is not set +CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 +CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +# CONFIG_INPUT_APMPOWER is not set + +# +# Input Device Drivers +# +# CONFIG_INPUT_KEYBOARD is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +# CONFIG_JOYSTICK_ANALOG is not set +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +# CONFIG_JOYSTICK_SIDEWINDER is not set +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=m +CONFIG_JOYSTICK_XPAD_FF=y +CONFIG_JOYSTICK_XPAD_LEDS=y +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +CONFIG_INPUT_ATI_REMOTE=m +CONFIG_INPUT_ATI_REMOTE2=m +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +CONFIG_INPUT_UINPUT=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_CMA3000 is not set +# CONFIG_INPUT_ISL29023 is not set + +# +# Hardware I/O ports +# +# CONFIG_SERIO is not set +# CONFIG_GAMEPORT is not set + +# +# Character devices +# +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +# CONFIG_DEVKMEM is not set + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_AMBA_PL010 is not set +# CONFIG_SERIAL_AMBA_PL011 is not set +# CONFIG_SERIAL_MAX3100 is not set +# CONFIG_SERIAL_MAX3107 is not set +CONFIG_SERIAL_IMX=y +CONFIG_SERIAL_IMX_CONSOLE=y +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_TIMBERDALE is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_IFX6X60 is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_TTY_PRINTK is not set +CONFIG_FSL_OTP=y +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +CONFIG_HW_RANDOM=y +# CONFIG_HW_RANDOM_TIMERIOMEM is not set +# CONFIG_R3964 is not set +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_RAMOOPS is not set +CONFIG_MXS_VIIM=y +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +# CONFIG_I2C_MUX is not set +CONFIG_I2C_HELPER_AUTO=y + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_DESIGNWARE is not set +# CONFIG_I2C_GPIO is not set +CONFIG_I2C_IMX=y +# CONFIG_I2C_OCORES is not set +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +CONFIG_SPI=y +# CONFIG_SPI_DEBUG is not set +CONFIG_SPI_MASTER=y + +# +# SPI Master Controller Drivers +# +# CONFIG_SPI_ALTERA is not set +CONFIG_SPI_BITBANG=y +# CONFIG_SPI_GPIO is not set +CONFIG_SPI_IMX_VER_2_3=y +CONFIG_SPI_IMX=y +# CONFIG_SPI_OC_TINY is not set +# CONFIG_SPI_PL022 is not set +# CONFIG_SPI_PXA2XX_PCI is not set +# CONFIG_SPI_XILINX is not set +# CONFIG_SPI_DESIGNWARE is not set + +# +# SPI Protocol Masters +# +CONFIG_SPI_SPIDEV=y +# CONFIG_SPI_TLE62X0 is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# + +# +# Enable Device Drivers -> PPS to see the PTP clock options. +# +CONFIG_ARCH_REQUIRE_GPIOLIB=y +CONFIG_GPIOLIB=y +# CONFIG_DEBUG_GPIO is not set +CONFIG_GPIO_SYSFS=y + +# +# Memory mapped GPIO drivers: +# +# CONFIG_GPIO_BASIC_MMIO is not set +# CONFIG_GPIO_IT8761E is not set +# CONFIG_GPIO_PL061 is not set + +# +# I2C GPIO expanders: +# +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X_IRQ is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_WM8994 is not set +# CONFIG_GPIO_ADP5588 is not set + +# +# PCI GPIO expanders: +# + +# +# SPI GPIO expanders: +# +# CONFIG_GPIO_MAX7301 is not set +# CONFIG_GPIO_MCP23S08 is not set +# CONFIG_GPIO_MC33880 is not set +# CONFIG_GPIO_74X164 is not set + +# +# AC97 GPIO expanders: +# + +# +# MODULbus GPIO expanders: +# +# CONFIG_W1 is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_APM_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_BQ20Z75 is not set +# CONFIG_BATTERY_BQ27x00 is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_BATTERY_MAX17042 is not set +# CONFIG_CHARGER_ISP1704 is not set +# CONFIG_CHARGER_MAX8903 is not set +CONFIG_SABRESD_MAX8903=y +# CONFIG_CHARGER_GPIO is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADCXX is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM70 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_MAX1111 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +CONFIG_SENSORS_MAX17135=y +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH5627 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_ADS7871 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +CONFIG_SENSORS_MAG3110=m +# CONFIG_MXC_MMA8450 is not set +CONFIG_MXC_MMA8451=y +CONFIG_THERMAL=y +# CONFIG_THERMAL_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_WATCHDOG_NOWAYOUT=y + +# +# Watchdog Device Drivers +# +# CONFIG_SOFT_WATCHDOG is not set +# CONFIG_ARM_SP805_WATCHDOG is not set +# CONFIG_MPCORE_WATCHDOG is not set +# CONFIG_MAX63XX_WATCHDOG is not set +CONFIG_IMX2_WDT=y + +# +# USB-based Watchdog Cards +# +# CONFIG_USBPCWATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +CONFIG_SSB=m +CONFIG_SSB_BLOCKIO=y +CONFIG_SSB_SDIOHOST_POSSIBLE=y +# CONFIG_SSB_SDIOHOST is not set +# CONFIG_SSB_SILENT is not set +# CONFIG_SSB_DEBUG is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set +CONFIG_MFD_SUPPORT=y +CONFIG_MFD_CORE=y +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_ASIC3 is not set +# CONFIG_HTC_EGPIO is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_UCB1400_CORE is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_T7L66XB is not set +# CONFIG_MFD_TC6387XB is not set +# CONFIG_MFD_TC6393XB is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM831X_SPI is not set +# CONFIG_MFD_WM8350_I2C is not set +CONFIG_MFD_WM8994=y +# CONFIG_MFD_PCF50633 is not set +# CONFIG_PMIC_DIALOG is not set +# CONFIG_MFD_MC_PMIC is not set +# CONFIG_MFD_MC34708 is not set +CONFIG_MFD_PFUZE=y +# CONFIG_MFD_MC13XXX is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_EZX_PCAP is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_TPS65910 is not set +CONFIG_MFD_MAX17135=y +CONFIG_MFD_MXC_HDMI=y +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +# CONFIG_REGULATOR_DUMMY is not set +CONFIG_REGULATOR_FIXED_VOLTAGE=y +# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set +# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set +# CONFIG_REGULATOR_BQ24022 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_WM8994 is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_MC34708 is not set +CONFIG_REGULATOR_PFUZE100=y +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_AD5398 is not set +CONFIG_REGULATOR_ANATOP=y +# CONFIG_REGULATOR_TPS6524X is not set +CONFIG_REGULATOR_MAX17135=y +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +# CONFIG_MEDIA_CONTROLLER is not set +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_COMMON=y +CONFIG_DVB_CORE=m +CONFIG_VIDEO_MEDIA=m + +# +# Multimedia drivers +# +CONFIG_RC_CORE=y +CONFIG_LIRC=y +CONFIG_RC_MAP=y +CONFIG_IR_NEC_DECODER=y +CONFIG_IR_RC5_DECODER=y +CONFIG_IR_RC6_DECODER=y +CONFIG_IR_JVC_DECODER=y +CONFIG_IR_SONY_DECODER=y +CONFIG_IR_RC5_SZ_DECODER=y +CONFIG_IR_LIRC_CODEC=y +CONFIG_IR_IMON=m +CONFIG_IR_MCEUSB=m +CONFIG_IR_REDRAT3=m +CONFIG_IR_STREAMZAP=m +# CONFIG_RC_LOOPBACK is not set +CONFIG_IR_GPIO_CIR=y +CONFIG_MEDIA_ATTACH=y +CONFIG_MEDIA_TUNER=m +# CONFIG_MEDIA_TUNER_CUSTOMISE is not set +CONFIG_MEDIA_TUNER_SIMPLE=m +CONFIG_MEDIA_TUNER_TDA8290=m +CONFIG_MEDIA_TUNER_TDA827X=m +CONFIG_MEDIA_TUNER_TDA18271=m +CONFIG_MEDIA_TUNER_TDA9887=m +CONFIG_MEDIA_TUNER_TEA5761=m +CONFIG_MEDIA_TUNER_TEA5767=m +CONFIG_MEDIA_TUNER_MT20XX=m +CONFIG_MEDIA_TUNER_MT2060=m +CONFIG_MEDIA_TUNER_MT2266=m +CONFIG_MEDIA_TUNER_QT1010=m +CONFIG_MEDIA_TUNER_XC2028=m +CONFIG_MEDIA_TUNER_XC5000=m +CONFIG_MEDIA_TUNER_MXL5005S=m +CONFIG_MEDIA_TUNER_MXL5007T=m +CONFIG_MEDIA_TUNER_MC44S803=m +CONFIG_MEDIA_TUNER_MAX2165=m +CONFIG_MEDIA_TUNER_TDA18218=m +CONFIG_MEDIA_TUNER_TDA18212=m +CONFIG_VIDEO_V4L2=y +CONFIG_VIDEOBUF_GEN=y +CONFIG_VIDEOBUF_VMALLOC=m +CONFIG_VIDEOBUF_DMA_CONTIG=y +CONFIG_VIDEOBUF_DVB=m +CONFIG_VIDEO_TVEEPROM=m +CONFIG_VIDEO_TUNER=m +CONFIG_VIDEO_CAPTURE_DRIVERS=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEO_HELPER_CHIPS_AUTO=y +CONFIG_VIDEO_IR_I2C=y + +# +# Audio decoders, processors and mixers +# +CONFIG_VIDEO_MSP3400=m +CONFIG_VIDEO_CS53L32A=m +CONFIG_VIDEO_WM8775=m + +# +# RDS decoders +# + +# +# Video decoders +# +CONFIG_VIDEO_SAA711X=m +CONFIG_VIDEO_TVP5150=m + +# +# Video and audio decoders +# +CONFIG_VIDEO_CX25840=m + +# +# MPEG video encoders +# +CONFIG_VIDEO_CX2341X=m + +# +# Video encoders +# + +# +# Camera sensor devices +# +CONFIG_VIDEO_MT9V011=m + +# +# Video improvement chips +# + +# +# Miscelaneous helper chips +# +# CONFIG_VIDEO_VIVI is not set +CONFIG_VIDEO_MXC_CAMERA=m + +# +# MXC Camera/V4L2 PRP Features support +# +CONFIG_VIDEO_MXC_IPU_CAMERA=y +# CONFIG_VIDEO_MXC_CSI_CAMERA is not set +# CONFIG_MXC_CAMERA_MICRON111 is not set +# CONFIG_MXC_CAMERA_OV2640 is not set +CONFIG_MXC_CAMERA_OV3640=m +CONFIG_MXC_CAMERA_OV5640=m +CONFIG_MXC_CAMERA_OV8820_MIPI=m +CONFIG_MXC_CAMERA_OV5642=m +CONFIG_MXC_TVIN_ADV7180=m +CONFIG_MXC_CAMERA_OV5640_MIPI=m +# CONFIG_MXC_MIPI_CSI2_TVIN_ADV7280 is not set +CONFIG_MXC_CAMERA_SENSOR_CLK=m +CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m +CONFIG_MXC_IPU_PRP_ENC=m +CONFIG_MXC_IPU_CSI_ENC=m +CONFIG_VIDEO_MXC_OUTPUT=y +CONFIG_VIDEO_MXC_IPU_OUTPUT=y +# CONFIG_VIDEO_MXC_IPUV1_WVGA_OUTPUT is not set +# CONFIG_VIDEO_MXC_OPL is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_VIDEO_TIMBERDALE is not set +# CONFIG_VIDEO_AU0828 is not set +# CONFIG_VIDEO_SR030PC30 is not set +# CONFIG_VIDEO_NOON010PC30 is not set +# CONFIG_SOC_CAMERA is not set +CONFIG_V4L_USB_DRIVERS=y +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +# CONFIG_USB_M5602 is not set +# CONFIG_USB_STV06XX is not set +# CONFIG_USB_GL860 is not set +# CONFIG_USB_GSPCA_BENQ is not set +# CONFIG_USB_GSPCA_CONEX is not set +# CONFIG_USB_GSPCA_CPIA1 is not set +# CONFIG_USB_GSPCA_ETOMS is not set +# CONFIG_USB_GSPCA_FINEPIX is not set +# CONFIG_USB_GSPCA_JEILINJ is not set +# CONFIG_USB_GSPCA_KINECT is not set +# CONFIG_USB_GSPCA_KONICA is not set +# CONFIG_USB_GSPCA_MARS is not set +# CONFIG_USB_GSPCA_MR97310A is not set +# CONFIG_USB_GSPCA_NW80X is not set +# CONFIG_USB_GSPCA_OV519 is not set +# CONFIG_USB_GSPCA_OV534 is not set +# CONFIG_USB_GSPCA_OV534_9 is not set +# CONFIG_USB_GSPCA_PAC207 is not set +# CONFIG_USB_GSPCA_PAC7302 is not set +# CONFIG_USB_GSPCA_PAC7311 is not set +# CONFIG_USB_GSPCA_SN9C2028 is not set +# CONFIG_USB_GSPCA_SN9C20X is not set +# CONFIG_USB_GSPCA_SONIXB is not set +# CONFIG_USB_GSPCA_SONIXJ is not set +# CONFIG_USB_GSPCA_SPCA500 is not set +# CONFIG_USB_GSPCA_SPCA501 is not set +# CONFIG_USB_GSPCA_SPCA505 is not set +# CONFIG_USB_GSPCA_SPCA506 is not set +# CONFIG_USB_GSPCA_SPCA508 is not set +# CONFIG_USB_GSPCA_SPCA561 is not set +# CONFIG_USB_GSPCA_SPCA1528 is not set +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +# CONFIG_USB_GSPCA_SQ930X is not set +# CONFIG_USB_GSPCA_STK014 is not set +# CONFIG_USB_GSPCA_STV0680 is not set +# CONFIG_USB_GSPCA_SUNPLUS is not set +# CONFIG_USB_GSPCA_T613 is not set +# CONFIG_USB_GSPCA_TV8532 is not set +# CONFIG_USB_GSPCA_VC032X is not set +# CONFIG_USB_GSPCA_VICAM is not set +# CONFIG_USB_GSPCA_XIRLINK_CIT is not set +# CONFIG_USB_GSPCA_ZC3XX is not set +CONFIG_VIDEO_PVRUSB2=m +CONFIG_VIDEO_PVRUSB2_SYSFS=y +CONFIG_VIDEO_PVRUSB2_DVB=y +# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set +# CONFIG_VIDEO_HDPVR is not set +CONFIG_VIDEO_EM28XX=m +CONFIG_VIDEO_EM28XX_ALSA=m +CONFIG_VIDEO_EM28XX_DVB=m +CONFIG_VIDEO_TLG2300=m +CONFIG_VIDEO_CX231XX=m +CONFIG_VIDEO_CX231XX_RC=y +CONFIG_VIDEO_CX231XX_ALSA=m +CONFIG_VIDEO_CX231XX_DVB=m +# CONFIG_VIDEO_USBVISION is not set +# CONFIG_USB_ET61X251 is not set +# CONFIG_USB_SN9C102 is not set +# CONFIG_USB_PWC is not set +# CONFIG_USB_ZR364XX is not set +# CONFIG_USB_STKWEBCAM is not set +# CONFIG_USB_S2255 is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_RADIO_ADAPTERS is not set +CONFIG_DVB_MAX_ADAPTERS=8 +# CONFIG_DVB_DYNAMIC_MINORS is not set +CONFIG_DVB_CAPTURE_DRIVERS=y +# CONFIG_TTPCI_EEPROM is not set + +# +# Supported USB Adapters +# +CONFIG_DVB_USB=m +# CONFIG_DVB_USB_DEBUG is not set +# CONFIG_DVB_USB_A800 is not set +CONFIG_DVB_USB_DIBUSB_MB=m +CONFIG_DVB_USB_DIBUSB_MB_FAULTY=y +CONFIG_DVB_USB_DIBUSB_MC=m +CONFIG_DVB_USB_DIB0700=m +# CONFIG_DVB_USB_UMT_010 is not set +CONFIG_DVB_USB_CXUSB=m +# CONFIG_DVB_USB_M920X is not set +# CONFIG_DVB_USB_GL861 is not set +# CONFIG_DVB_USB_AU6610 is not set +# CONFIG_DVB_USB_DIGITV is not set +CONFIG_DVB_USB_VP7045=m +# CONFIG_DVB_USB_VP702X is not set +# CONFIG_DVB_USB_GP8PSK is not set +CONFIG_DVB_USB_NOVA_T_USB2=m +CONFIG_DVB_USB_TTUSB2=m +CONFIG_DVB_USB_DTT200U=m +CONFIG_DVB_USB_OPERA1=m +CONFIG_DVB_USB_AF9005=m +CONFIG_DVB_USB_AF9005_REMOTE=m +CONFIG_DVB_USB_DW2102=m +CONFIG_DVB_USB_CINERGY_T2=m +CONFIG_DVB_USB_ANYSEE=m +CONFIG_DVB_USB_DTV5100=m +CONFIG_DVB_USB_AF9015=m +CONFIG_DVB_USB_CE6230=m +# CONFIG_DVB_USB_FRIIO is not set +CONFIG_DVB_USB_EC168=m +CONFIG_DVB_USB_AZ6027=m +CONFIG_DVB_USB_LME2510=m +CONFIG_DVB_USB_TECHNISAT_USB2=m +CONFIG_SMS_SIANO_MDTV=m + +# +# Siano module components +# +CONFIG_SMS_USB_DRV=m +# CONFIG_SMS_SDIO_DRV is not set + +# +# Supported FlexCopII (B2C2) Adapters +# +CONFIG_DVB_B2C2_FLEXCOP=m +CONFIG_DVB_B2C2_FLEXCOP_USB=m +# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set + +# +# Supported DVB Frontends +# +# CONFIG_DVB_FE_CUSTOMISE is not set + +# +# Multistandard (satellite) frontends +# +CONFIG_DVB_STB0899=m +CONFIG_DVB_STB6100=m +CONFIG_DVB_STV090x=m +CONFIG_DVB_STV6110x=m + +# +# DVB-S (satellite) frontends +# +CONFIG_DVB_CX24123=m +CONFIG_DVB_MT312=m +CONFIG_DVB_ZL10039=m +CONFIG_DVB_S5H1420=m +CONFIG_DVB_STV0288=m +CONFIG_DVB_STB6000=m +CONFIG_DVB_STV0299=m +CONFIG_DVB_STV6110=m +CONFIG_DVB_STV0900=m +CONFIG_DVB_TDA10086=m +CONFIG_DVB_TUNER_ITD1000=m +CONFIG_DVB_TUNER_CX24113=m +CONFIG_DVB_TDA826X=m +CONFIG_DVB_CX24116=m +CONFIG_DVB_SI21XX=m +CONFIG_DVB_DS3000=m + +# +# DVB-T (terrestrial) frontends +# +CONFIG_DVB_CX22702=m +CONFIG_DVB_DRXD=m +CONFIG_DVB_MT352=m +CONFIG_DVB_ZL10353=m +CONFIG_DVB_DIB3000MB=m +CONFIG_DVB_DIB3000MC=m +CONFIG_DVB_DIB7000M=m +CONFIG_DVB_DIB7000P=m +CONFIG_DVB_TDA10048=m +CONFIG_DVB_AF9013=m +CONFIG_DVB_EC100=m +CONFIG_DVB_CXD2820R=m + +# +# DVB-C (cable) frontends +# +CONFIG_DVB_TDA10023=m +CONFIG_DVB_STV0297=m + +# +# ATSC (North American/Korean Terrestrial/Cable DTV) frontends +# +CONFIG_DVB_NXT200X=m +CONFIG_DVB_BCM3510=m +CONFIG_DVB_LGDT330X=m +CONFIG_DVB_LGDT3305=m +CONFIG_DVB_S5H1409=m +CONFIG_DVB_S5H1411=m + +# +# ISDB-T (terrestrial) frontends +# +CONFIG_DVB_S921=m +CONFIG_DVB_DIB8000=m +CONFIG_DVB_MB86A20S=m + +# +# Digital terrestrial only tuners/PLL +# +CONFIG_DVB_PLL=m +CONFIG_DVB_TUNER_DIB0070=m +CONFIG_DVB_TUNER_DIB0090=m + +# +# SEC control devices for DVB-S +# +CONFIG_DVB_LNBP21=m +CONFIG_DVB_ISL6421=m +CONFIG_DVB_ISL6423=m +CONFIG_DVB_LGS8GXX=m +CONFIG_DVB_ATBM8830=m +CONFIG_DVB_IX2505V=m + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set + +# +# Graphics support +# +# CONFIG_DRM is not set +# CONFIG_VGASTATE is not set +# CONFIG_VIDEO_OUTPUT_CONTROL is not set +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_WMT_GE_ROPS is not set +CONFIG_FB_DEFERRED_IO=y +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +CONFIG_FB_MODE_HELPERS=y +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_ARMCLCD is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_TMIO is not set +# CONFIG_FB_UDL is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_BACKLIGHT_LCD_SUPPORT is not set + +# +# Display device support +# +# CONFIG_DISPLAY_SUPPORT is not set +CONFIG_FB_MXC=y +CONFIG_FB_MXC_EDID=y +CONFIG_FB_MXC_SYNC_PANEL=y +# CONFIG_FB_MXC_EPSON_VGA_SYNC_PANEL is not set +CONFIG_FB_MXC_LDB=y +# CONFIG_FB_MXC_MIPI_DSI is not set +# CONFIG_FB_MXC_CLAA_WVGA_SYNC_PANEL is not set +# CONFIG_FB_MXC_SEIKO_WVGA_SYNC_PANEL is not set +# CONFIG_FB_MXC_SII902X is not set +# CONFIG_FB_MXC_CH7026 is not set +# CONFIG_FB_MXC_TVOUT_CH7024 is not set +# CONFIG_FB_MXC_ASYNC_PANEL is not set +CONFIG_FB_MXC_EINK_PANEL=y +# CONFIG_FB_MXC_EINK_AUTO_UPDATE_MODE is not set +# CONFIG_FB_MXC_SIPIX_PANEL is not set +# CONFIG_FB_MXC_ELCDIF_FB is not set +CONFIG_FB_MXC_HDMI=y + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_FRAMEBUFFER_CONSOLE=y +# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set +# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set +CONFIG_FONTS=y +# CONFIG_FONT_8x8 is not set +CONFIG_FONT_8x16=y +# CONFIG_FONT_6x11 is not set +# CONFIG_FONT_7x14 is not set +# CONFIG_FONT_PEARL_8x8 is not set +# CONFIG_FONT_ACORN_8x8 is not set +# CONFIG_FONT_MINI_4x6 is not set +# CONFIG_FONT_SUN8x16 is not set +# CONFIG_FONT_SUN12x22 is not set +# CONFIG_FONT_10x18 is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_HWDEP=m +CONFIG_SND_RAWMIDI=m +CONFIG_SND_JACK=y +# CONFIG_SND_SEQUENCER is not set +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +# CONFIG_SND_HRTIMER is not set +# CONFIG_SND_DYNAMIC_MINORS is not set +# CONFIG_SND_SUPPORT_OLD_API is not set +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +# CONFIG_SND_RAWMIDI_SEQ is not set +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_ALOOP is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set +CONFIG_SND_ARM=y +# CONFIG_SND_ARMAACI is not set +CONFIG_SND_SPI=y +CONFIG_SND_USB=y +CONFIG_SND_USB_AUDIO=m +CONFIG_SND_USB_UA101=m +CONFIG_SND_USB_CAIAQ=m +CONFIG_SND_USB_CAIAQ_INPUT=y +CONFIG_SND_USB_6FIRE=m +CONFIG_SND_SOC=y +# CONFIG_SND_SOC_CACHE_LZO is not set +CONFIG_SND_SOC_AC97_BUS=y +CONFIG_SND_IMX_SOC=y +CONFIG_SND_MXC_SOC_MX2=y +CONFIG_SND_MXC_SOC_SPDIF_DAI=y +CONFIG_SND_SOC_IMX_SGTL5000=y +# CONFIG_SND_SOC_IMX_WM8958 is not set +CONFIG_SND_SOC_IMX_WM8962=y +CONFIG_SND_SOC_IMX_CS42888=y +# CONFIG_SND_SOC_IMX_SI4763 is not set +CONFIG_SND_SOC_IMX_SPDIF=y +CONFIG_SND_SOC_IMX_HDMI=y +CONFIG_SND_SOC_I2C_AND_SPI=y +# CONFIG_SND_SOC_ALL_CODECS is not set +CONFIG_SND_SOC_MXC_HDMI=y +CONFIG_SND_SOC_MXC_SPDIF=y +CONFIG_SND_SOC_SGTL5000=y +CONFIG_SND_SOC_CS42888=y +CONFIG_SND_SOC_WM8962=y +# CONFIG_SOUND_PRIME is not set +CONFIG_AC97_BUS=y +CONFIG_HID_SUPPORT=y +CONFIG_HID=y +CONFIG_HIDRAW=y + +# +# USB Input Devices +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=y +# CONFIG_HID_ACRUX is not set +CONFIG_HID_APPLE=y +CONFIG_HID_AUREAL=y +CONFIG_HID_BELKIN=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_PRODIKEYS is not set +CONFIG_HID_CYPRESS=y +# CONFIG_HID_DRAGONRISE is not set +# CONFIG_HID_EMS_FF is not set +# CONFIG_HID_ELECOM is not set +CONFIG_HID_EZKEY=y +# CONFIG_HID_KEYTOUCH is not set +CONFIG_HID_KYE=y +# CONFIG_HID_UCLOGIC is not set +# CONFIG_HID_WALTOP is not set +CONFIG_HID_GYRATION=y +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +CONFIG_HID_LOGITECH=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWII_FF=y +# CONFIG_HID_MAGICMOUSE is not set +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +# CONFIG_HID_MULTITOUCH is not set +# CONFIG_HID_NTRIG is not set +CONFIG_HID_ORTEK=y +# CONFIG_HID_PANTHERLORD is not set +CONFIG_HID_PETALYNX=y +# CONFIG_HID_PICOLCD is not set +# CONFIG_HID_QUANTA is not set +# CONFIG_HID_ROCCAT is not set +# CONFIG_HID_ROCCAT_ARVO is not set +# CONFIG_HID_ROCCAT_KONE is not set +# CONFIG_HID_ROCCAT_KONEPLUS is not set +# CONFIG_HID_ROCCAT_KOVAPLUS is not set +# CONFIG_HID_ROCCAT_PYRA is not set +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_HID_SPINELPLUS=y +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_GREENASIA is not set +# CONFIG_HID_SMARTJOYPLUS is not set +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THRUSTMASTER is not set +# CONFIG_HID_WACOM is not set +# CONFIG_HID_ZEROPLUS is not set +CONFIG_HID_ZYDACRON=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_ARCH_HAS_HCD=y +# CONFIG_USB_ARCH_HAS_OHCI is not set +CONFIG_USB_ARCH_HAS_EHCI=y +CONFIG_USB=y +# CONFIG_USB_DEBUG is not set +CONFIG_USB_ANNOUNCE_NEW_DEVICES=y + +# +# Miscellaneous USB options +# +# CONFIG_USB_DEVICEFS is not set +# CONFIG_USB_DEVICE_CLASS is not set +# CONFIG_USB_DYNAMIC_MINORS is not set +CONFIG_USB_SUSPEND=y +CONFIG_USB_OTG=y +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +CONFIG_USB_MON=m +# CONFIG_USB_WUSB is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_FSL_USB_TEST_MODE is not set +CONFIG_USB_EHCI_ARC=y +CONFIG_USB_EHCI_ARC_OTG=y +# CONFIG_USB_EHCI_ARC_HSIC is not set +# CONFIG_USB_STATIC_IRAM is not set +CONFIG_USB_EHCI_ROOT_HUB_TT=y +CONFIG_USB_EHCI_TT_NEWSCHED=y +# CONFIG_USB_EHCI_MXC is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1760_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HWA_HCD is not set +# CONFIG_USB_MUSB_HDRC is not set + +# +# USB Device Class drivers +# +CONFIG_USB_ACM=m +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +# CONFIG_USB_STORAGE_REALTEK is not set +# CONFIG_USB_STORAGE_DATAFAB is not set +# CONFIG_USB_STORAGE_FREECOM is not set +# CONFIG_USB_STORAGE_ISD200 is not set +# CONFIG_USB_STORAGE_USBAT is not set +# CONFIG_USB_STORAGE_SDDR09 is not set +# CONFIG_USB_STORAGE_SDDR55 is not set +# CONFIG_USB_STORAGE_JUMPSHOT is not set +# CONFIG_USB_STORAGE_ALAUDA is not set +# CONFIG_USB_STORAGE_ONETOUCH is not set +# CONFIG_USB_STORAGE_KARMA is not set +# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set +# CONFIG_USB_STORAGE_ENE_UB6250 is not set +# CONFIG_USB_UAS is not set +# CONFIG_USB_LIBUSUAL is not set + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set + +# +# USB port drivers +# +CONFIG_USB_SERIAL=m +CONFIG_USB_EZUSB=y +CONFIG_USB_SERIAL_GENERIC=y +# CONFIG_USB_SERIAL_AIRCABLE is not set +# CONFIG_USB_SERIAL_ARK3116 is not set +# CONFIG_USB_SERIAL_BELKIN is not set +# CONFIG_USB_SERIAL_CH341 is not set +# CONFIG_USB_SERIAL_WHITEHEAT is not set +# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set +CONFIG_USB_SERIAL_CP210X=m +# CONFIG_USB_SERIAL_CYPRESS_M8 is not set +# CONFIG_USB_SERIAL_EMPEG is not set +CONFIG_USB_SERIAL_FTDI_SIO=m +# CONFIG_USB_SERIAL_FUNSOFT is not set +# CONFIG_USB_SERIAL_VISOR is not set +# CONFIG_USB_SERIAL_IPAQ is not set +# CONFIG_USB_SERIAL_IR is not set +# CONFIG_USB_SERIAL_EDGEPORT is not set +# CONFIG_USB_SERIAL_EDGEPORT_TI is not set +# CONFIG_USB_SERIAL_GARMIN is not set +# CONFIG_USB_SERIAL_IPW is not set +CONFIG_USB_SERIAL_IUU=m +# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set +# CONFIG_USB_SERIAL_KEYSPAN is not set +# CONFIG_USB_SERIAL_KLSI is not set +# CONFIG_USB_SERIAL_KOBIL_SCT is not set +# CONFIG_USB_SERIAL_MCT_U232 is not set +# CONFIG_USB_SERIAL_MOS7720 is not set +# CONFIG_USB_SERIAL_MOS7840 is not set +# CONFIG_USB_SERIAL_MOTOROLA is not set +# CONFIG_USB_SERIAL_NAVMAN is not set +CONFIG_USB_SERIAL_PL2303=m +# CONFIG_USB_SERIAL_OTI6858 is not set +# CONFIG_USB_SERIAL_QCAUX is not set +# CONFIG_USB_SERIAL_QUALCOMM is not set +# CONFIG_USB_SERIAL_SPCP8X5 is not set +# CONFIG_USB_SERIAL_HP4X is not set +# CONFIG_USB_SERIAL_SAFE is not set +# CONFIG_USB_SERIAL_SIEMENS_MPI is not set +# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set +# CONFIG_USB_SERIAL_SYMBOL is not set +# CONFIG_USB_SERIAL_TI is not set +# CONFIG_USB_SERIAL_CYBERJACK is not set +# CONFIG_USB_SERIAL_XIRCOM is not set +# CONFIG_USB_SERIAL_OPTION is not set +# CONFIG_USB_SERIAL_OMNINET is not set +# CONFIG_USB_SERIAL_OPTICON is not set +# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set +# CONFIG_USB_SERIAL_ZIO is not set +# CONFIG_USB_SERIAL_SSU100 is not set +# CONFIG_USB_SERIAL_DEBUG is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_LED is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_SELECTED=y +CONFIG_USB_GADGET_ARC=y +# CONFIG_IMX_USB_CHARGER is not set +CONFIG_USB_ARC=y +# CONFIG_USB_GADGET_FSL_USB2 is not set +# CONFIG_USB_GADGET_FUSB300 is not set +# CONFIG_USB_GADGET_R8A66597 is not set +# CONFIG_USB_GADGET_PXA_U2O is not set +# CONFIG_USB_GADGET_M66592 is not set +# CONFIG_USB_GADGET_DUMMY_HCD is not set +CONFIG_USB_GADGET_DUALSPEED=y +# CONFIG_USB_ZERO is not set +CONFIG_USB_AUDIO=m +CONFIG_USB_ETH=m +CONFIG_USB_ETH_RNDIS=y +# CONFIG_USB_ETH_EEM is not set +# CONFIG_USB_G_NCM is not set +# CONFIG_USB_GADGETFS is not set +# CONFIG_USB_FUNCTIONFS is not set +CONFIG_USB_FILE_STORAGE=m +# CONFIG_FSL_UTP is not set +# CONFIG_USB_FILE_STORAGE_TEST is not set +# CONFIG_USB_MASS_STORAGE is not set +CONFIG_USB_G_SERIAL=m +# CONFIG_USB_MIDI_GADGET is not set +# CONFIG_USB_G_PRINTER is not set +# CONFIG_USB_CDC_COMPOSITE is not set +# CONFIG_USB_G_MULTI is not set +# CONFIG_USB_G_HID is not set +# CONFIG_USB_G_DBGP is not set +# CONFIG_USB_G_WEBCAM is not set + +# +# OTG and related infrastructure +# +CONFIG_USB_OTG_UTILS=y +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ULPI is not set +# CONFIG_NOP_USB_XCEIV is not set +CONFIG_MXC_OTG=y +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_MMC_UNSAFE_RESUME=y +# CONFIG_MMC_CLKGATE is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=32 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_ARMMMCI is not set +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_IO_ACCESSORS=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_SDHCI_ESDHC_IMX=y +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y + +# +# LED drivers +# +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_PCA9532 is not set +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_GPIO_PLATFORM=y +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_DAC124S085 is not set +# CONFIG_LEDS_PWM is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +CONFIG_LEDS_TRIGGERS=y + +# +# LED Triggers +# +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +CONFIG_LEDS_TRIGGER_GPIO=y +CONFIG_LEDS_TRIGGER_DEFAULT_ON=y + +# +# iptables trigger is under Netfilter config (LED target) +# + +# +# LED Triggers +# +# CONFIG_NFC_DEVICES is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +CONFIG_RTC_DRV_PCF8523=y +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set + +# +# SPI RTC drivers +# +# CONFIG_RTC_DRV_M41T93 is not set +# CONFIG_RTC_DRV_M41T94 is not set +# CONFIG_RTC_DRV_DS1305 is not set +# CONFIG_RTC_DRV_DS1390 is not set +# CONFIG_RTC_DRV_MAX6902 is not set +# CONFIG_RTC_DRV_R9701 is not set +# CONFIG_RTC_DRV_RS5C348 is not set +# CONFIG_RTC_DRV_DS3234 is not set +# CONFIG_RTC_DRV_PCF2123 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_CMOS is not set +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_MXC is not set +# CONFIG_RTC_DRV_MXC_V2 is not set +CONFIG_RTC_DRV_SNVS=y +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_PL030 is not set +# CONFIG_RTC_DRV_PL031 is not set +CONFIG_DMADEVICES=y +# CONFIG_DMADEVICES_DEBUG is not set + +# +# DMA Devices +# +# CONFIG_AMBA_PL08X is not set +# CONFIG_DW_DMAC is not set +CONFIG_MXC_PXP_V2=y +CONFIG_MXC_PXP_CLIENT_DEVICE=y +# CONFIG_TIMB_DMA is not set +CONFIG_IMX_SDMA=y +CONFIG_MXS_DMA=y +CONFIG_DMA_ENGINE=y + +# +# DMA Clients +# +# CONFIG_NET_DMA is not set +# CONFIG_ASYNC_TX_DMA is not set +# CONFIG_DMATEST is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +CONFIG_STAGING=y +# CONFIG_VIDEO_TM6000 is not set +# CONFIG_USBIP_CORE is not set +# CONFIG_W35UND is not set +# CONFIG_PRISM2_USB is not set +# CONFIG_ECHO is not set +# CONFIG_ASUS_OLED is not set +CONFIG_R8712U=m +# CONFIG_R8712_AP is not set +# CONFIG_TRANZPORT is not set +# CONFIG_POHMELFS is not set +# CONFIG_LINE6_USB is not set +# CONFIG_USB_SERIAL_QUATECH2 is not set +# CONFIG_USB_SERIAL_QUATECH_USB2 is not set +CONFIG_VT6656=m +# CONFIG_IIO is not set +# CONFIG_XVMALLOC is not set +# CONFIG_ZRAM is not set +# CONFIG_ZCACHE is not set +# CONFIG_FB_SM7XX is not set +CONFIG_LIRC_STAGING=y +CONFIG_LIRC_IGORPLUGUSB=m +# CONFIG_LIRC_IMON is not set +CONFIG_LIRC_SASEM=m +CONFIG_LIRC_SERIAL=m +CONFIG_LIRC_SERIAL_TRANSMITTER=y +# CONFIG_LIRC_SIR is not set +CONFIG_LIRC_TTUSBIR=m +CONFIG_LIRC_ZILOG=m +# CONFIG_EASYCAP is not set +CONFIG_MACH_NO_WESTBRIDGE=y +# CONFIG_ATH6K_LEGACY is not set +# CONFIG_USB_ENESTORAGE is not set +# CONFIG_BCM_WIMAX is not set +# CONFIG_FT1000 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set +# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_CLKSRC_MMIO=y + +# +# MXC support drivers +# +CONFIG_MXC_IPU=y +CONFIG_MXC_IPU_V3=y +CONFIG_MXC_IPU_V3H=y + +# +# MXC SSI support +# +# CONFIG_MXC_SSI is not set + +# +# MXC Digital Audio Multiplexer support +# +# CONFIG_MXC_DAM is not set + +# +# MXC PMIC support +# +# CONFIG_MXC_PMIC_MC13783 is not set +# CONFIG_MXC_PMIC_MC13892 is not set +# CONFIG_MXC_PMIC_MC34704 is not set +# CONFIG_MXC_PMIC_MC9SDZ60 is not set +# CONFIG_MXC_PMIC_MC9S08DZ60 is not set + +# +# MXC Security Drivers +# +# CONFIG_MXC_SECURITY_SCC is not set +# CONFIG_MXC_SECURITY_RNG is not set + +# +# MXC MPEG4 Encoder Kernel module support +# +# CONFIG_MXC_HMP4E is not set + +# +# MXC HARDWARE EVENT +# +# CONFIG_MXC_HWEVENT is not set + +# +# MXC VPU(Video Processing Unit) support +# +CONFIG_MXC_VPU=y +# CONFIG_MXC_VPU_DEBUG is not set +# CONFIG_MX6_VPU_352M is not set + +# +# MXC Asynchronous Sample Rate Converter support +# +CONFIG_MXC_ASRC=y + +# +# MXC Bluetooth support +# + +# +# Broadcom GPS ioctrl support +# + +# +# MXC Media Local Bus Driver +# +CONFIG_MXC_MLB=y +CONFIG_MXC_MLB150=m + +# +# i.MX ADC support +# +# CONFIG_IMX_ADC is not set + +# +# MXC Vivante GPU support +# +CONFIG_MXC_GPU_VIV=y + +# +# ANATOP_THERMAL +# +CONFIG_ANATOP_THERMAL=y + +# +# MXC MIPI Support +# +CONFIG_MXC_MIPI_CSI2=y + +# +# MXC HDMI CEC (Consumer Electronics Control) support +# +CONFIG_MXC_HDMI_CEC=y + +# +# File systems +# +# CONFIG_EXT2_FS is not set +# CONFIG_EXT3_FS is not set +CONFIG_EXT4_FS=y +CONFIG_EXT4_USE_FOR_EXT23=y +# CONFIG_EXT4_FS_XATTR is not set +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_REISERFS_FS=y +# CONFIG_REISERFS_CHECK is not set +# CONFIG_REISERFS_PROC_INFO is not set +# CONFIG_REISERFS_FS_XATTR is not set +CONFIG_JFS_FS=y +# CONFIG_JFS_POSIX_ACL is not set +# CONFIG_JFS_SECURITY is not set +# CONFIG_JFS_DEBUG is not set +# CONFIG_JFS_STATISTICS is not set +CONFIG_XFS_FS=y +# CONFIG_XFS_QUOTA is not set +# CONFIG_XFS_POSIX_ACL is not set +# CONFIG_XFS_RT is not set +# CONFIG_XFS_DEBUG is not set +# CONFIG_GFS2_FS is not set +CONFIG_BTRFS_FS=y +# CONFIG_BTRFS_FS_POSIX_ACL is not set +# CONFIG_NILFS2_FS is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +CONFIG_FILE_LOCKING=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +# CONFIG_QUOTA is not set +# CONFIG_QUOTACTL is not set +CONFIG_AUTOFS4_FS=y +CONFIG_FUSE_FS=m +# CONFIG_CUSE is not set +CONFIG_GENERIC_ACL=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=y +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +# CONFIG_MSDOS_FS is not set +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="ascii" +# CONFIG_NTFS_FS is not set + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_HUGETLB_PAGE is not set +# CONFIG_CONFIGFS_FS is not set +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +CONFIG_HFS_FS=y +CONFIG_HFSPLUS_FS=y +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=y +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_LZO=y +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set +# CONFIG_PSTORE is not set +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +CONFIG_NETWORK_FILESYSTEMS=y +CONFIG_NFS_FS=y +CONFIG_NFS_V3=y +# CONFIG_NFS_V3_ACL is not set +CONFIG_NFS_V4=y +CONFIG_NFS_V4_1=y +CONFIG_PNFS_FILE_LAYOUT=y +CONFIG_ROOT_NFS=y +# CONFIG_NFS_USE_LEGACY_DNS is not set +CONFIG_NFS_USE_KERNEL_DNS=y +# CONFIG_NFS_USE_NEW_IDMAPPER is not set +# CONFIG_NFSD is not set +CONFIG_LOCKD=y +CONFIG_LOCKD_V4=y +CONFIG_NFS_COMMON=y +CONFIG_SUNRPC=y +CONFIG_SUNRPC_GSS=y +# CONFIG_CEPH_FS is not set +CONFIG_CIFS=y +CONFIG_CIFS_STATS=y +CONFIG_CIFS_STATS2=y +# CONFIG_CIFS_WEAK_PW_HASH is not set +# CONFIG_CIFS_UPCALL is not set +# CONFIG_CIFS_XATTR is not set +# CONFIG_CIFS_DEBUG2 is not set +# CONFIG_CIFS_DFS_UPCALL is not set +# CONFIG_NCP_FS is not set +# CONFIG_CODA_FS is not set +# CONFIG_AFS_FS is not set + +# +# Partition Types +# +CONFIG_PARTITION_ADVANCED=y +# CONFIG_ACORN_PARTITION is not set +# CONFIG_OSF_PARTITION is not set +# CONFIG_AMIGA_PARTITION is not set +# CONFIG_ATARI_PARTITION is not set +# CONFIG_MAC_PARTITION is not set +CONFIG_MSDOS_PARTITION=y +# CONFIG_BSD_DISKLABEL is not set +# CONFIG_MINIX_SUBPARTITION is not set +# CONFIG_SOLARIS_X86_PARTITION is not set +# CONFIG_UNIXWARE_DISKLABEL is not set +# CONFIG_LDM_PARTITION is not set +# CONFIG_SGI_PARTITION is not set +# CONFIG_ULTRIX_PARTITION is not set +# CONFIG_SUN_PARTITION is not set +# CONFIG_KARMA_PARTITION is not set +CONFIG_EFI_PARTITION=y +# CONFIG_SYSV68_PARTITION is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="utf8" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +# CONFIG_NLS_CODEPAGE_936 is not set +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +CONFIG_NLS_UTF8=y + +# +# Kernel hacking +# +CONFIG_PRINTK_TIME=y +CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4 +# CONFIG_ENABLE_WARN_DEPRECATED is not set +# CONFIG_ENABLE_MUST_CHECK is not set +CONFIG_FRAME_WARN=1024 +# CONFIG_MAGIC_SYSRQ is not set +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_UNUSED_SYMBOLS is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_DEBUG_KERNEL=y +# CONFIG_DEBUG_SHIRQ is not set +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_HARDLOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_SCHEDSTATS is not set +# CONFIG_TIMER_STATS is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_PREEMPT is not set +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_RT_MUTEX_TESTER is not set +# CONFIG_DEBUG_SPINLOCK is not set +# CONFIG_DEBUG_MUTEXES is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_SPINLOCK_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_DEBUG_STACK_USAGE is not set +# CONFIG_DEBUG_KOBJECT is not set +# CONFIG_DEBUG_HIGHMEM is not set +# CONFIG_DEBUG_BUGVERBOSE is not set +# CONFIG_DEBUG_INFO is not set +# CONFIG_DEBUG_VM is not set +# CONFIG_DEBUG_WRITECOUNT is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_LIST is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set +CONFIG_FRAME_POINTER=y +# CONFIG_BOOT_PRINTK_DELAY is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=60 +# CONFIG_RCU_CPU_STALL_VERBOSE is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +# CONFIG_LKDTM is not set +# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_SYSCTL_SYSCALL_CHECK is not set +# CONFIG_DEBUG_PAGEALLOC is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set +# CONFIG_DYNAMIC_DEBUG is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_ATOMIC64_SELFTEST is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM_UNWIND is not set +# CONFIG_DEBUG_USER is not set +# CONFIG_DEBUG_LL is not set +CONFIG_OC_ETM=y + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_KEYS_DEBUG_PROC_KEYS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +# CONFIG_SECURITY is not set +# CONFIG_SECURITYFS is not set +CONFIG_DEFAULT_SECURITY_DAC=y +CONFIG_DEFAULT_SECURITY="" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_PCOMP2=y +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=y +# CONFIG_CRYPTO_NULL is not set +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +# CONFIG_CRYPTO_CRYPTD is not set +CONFIG_CRYPTO_AUTHENC=y +# CONFIG_CRYPTO_TEST is not set +# CONFIG_CRYPTO_CRYPTODEV is not set + +# +# Authenticated Encryption with Associated Data +# +# CONFIG_CRYPTO_CCM is not set +# CONFIG_CRYPTO_GCM is not set +# CONFIG_CRYPTO_SEQIV is not set + +# +# Block modes +# +# CONFIG_CRYPTO_CBC is not set +# CONFIG_CRYPTO_CTR is not set +# CONFIG_CRYPTO_CTS is not set +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +# CONFIG_CRYPTO_XTS is not set + +# +# Hash modes +# +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +# CONFIG_CRYPTO_GHASH is not set +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +CONFIG_CRYPTO_MICHAEL_MIC=y +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +CONFIG_CRYPTO_SHA1=m +# CONFIG_CRYPTO_SHA256 is not set +# CONFIG_CRYPTO_SHA512 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +# CONFIG_CRYPTO_DEFLATE is not set +# CONFIG_CRYPTO_ZLIB is not set +CONFIG_CRYPTO_LZO=y + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +CONFIG_CRYPTO_HW=y +CONFIG_CRYPTO_DEV_FSL_CAAM=y +CONFIG_CRYPTO_DEV_FSL_CAAM_RINGSIZE=9 +CONFIG_CRYPTO_DEV_FSL_CAAM_INTC=y +CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD=255 +CONFIG_CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD=2048 +CONFIG_CRYPTO_DEV_FSL_CAAM_CRYPTO_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_AHASH_API=y +CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y +# CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_TEST is not set +CONFIG_CRYPTO_DEV_FSL_CAAM_SM=y +CONFIG_CRYPTO_DEV_FSL_CAAM_SM_SLOTSIZE=7 +CONFIG_CRYPTO_DEV_FSL_CAAM_SM_TEST=y +CONFIG_CRYPTO_DEV_FSL_CAAM_SECVIO=y +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_RATIONAL=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC7 is not set +CONFIG_LIBCRC32C=y +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_XZ_DEC=y +# CONFIG_XZ_DEC_X86 is not set +# CONFIG_XZ_DEC_POWERPC is not set +# CONFIG_XZ_DEC_IA64 is not set +# CONFIG_XZ_DEC_ARM is not set +# CONFIG_XZ_DEC_ARMTHUMB is not set +# CONFIG_XZ_DEC_SPARC is not set +# CONFIG_XZ_DEC_BCJ is not set +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_IOPORT=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_NLATTR=y +CONFIG_AVERAGE=y diff --git a/projects/Cuboxi/options b/projects/Cuboxi/options new file mode 100644 index 0000000000..752bbd2d29 --- /dev/null +++ b/projects/Cuboxi/options @@ -0,0 +1,353 @@ +# Name of the Distro to build (full name, without special charcters) + DISTRONAME="OpenELEC" + +# short project description + DESCRIPTION="OpenELEC is a fast and userfriendly XBMC Mediacenter distribution." + +# Welcome Message for e.g. SSH Server (up to 5 Lines) + GREETING0="##############################################" + GREETING1="# OpenELEC - The living room PC for everyone #" + GREETING2="# ...... visit http://www.openelec.tv ...... #" + GREETING3="##############################################" + GREETING4="" + +# Hostname for target system (openelec) + HOSTNAME="openelec" + +# Root password to integrate in the target system + ROOT_PASSWORD="openelec" + +# The TARGET_CPU variable controls which processor should be targeted for +# generated code. + case $TARGET_ARCH in + i386) + # (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 + # athlon-fx athlon-mp athlon-xp athlon-4 + # athlon-tbird athlon k6-3 k6-2 k6 geode + # (Intel CPUs) atom core2 nocona prescott pentium4[m] pentium3[m] + # pentium-m pentium2 pentiumpro pentium-mmx pentium + # i686 i586 i486 i386 + # (VIA CPUs) c3 c3-2 + # + TARGET_CPU="atom" + ;; + + x86_64) + # (AMD CPUs) k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 + # athlon-fx amdfam10 barcelona + # (Intel CPUs) atom core2 nocona + # + TARGET_CPU="atom" + ;; + + arm) + # TARGET_CPU: + # arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d + # arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c + # arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t + # arm720t arm740t strongarm strongarm110 strongarm1100 + # strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t + # arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi + # arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e + # arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s + # arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4 + # cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312. + # + TARGET_CPU="cortex-a9" + + # TARGET_FLOAT: + # Specifies which floating-point ABI to use. Permissible values are: + # soft softfp hard + TARGET_FLOAT="hard" + + # TARGET_FPU: + # This specifies what floating point hardware (or hardware emulation) is + # available on the target. Permissible names are: + # fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16 + # vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16 + # neon-vfpv4. + TARGET_FPU="neon" + ;; + esac + +# Build optimizations (size/normal/speed) + OPTIMIZATIONS="size" + +# Project CFLAGS + PROJECT_CFLAGS="" + +# LTO (Link Time Optimization) support + LTO_SUPPORT="yes" + +# GOLD (Google Linker) support + GOLD_SUPPORT="yes" + +# Bootloader to use (syslinux / u-boot / atv-bootloader / bcm2835-bootloader) + BOOTLOADER="u-boot" + +# u-boot version to use (default) + UBOOT_VERSION="imx6-cuboxi" + +# Configuration for u-boot + UBOOT_CONFIG="mx6_cubox-i_config" + +# Target Configfile for u-boot + UBOOT_CONFIGFILE="" + +# GCC to use. values can be: +# default: default mainline gcc + GCC_VERSION="4.7" + +# Kernel to use. values can be: +# default: default mainline kernel + LINUX="imx6" + +# use linux-next (latest rc) instead latest released version + LINUX_NEXT="no" + +# SquashFS compression method (gzip / lzo / xz) + SQUASHFS_COMPRESSION="gzip" + +# Mediacenter to use (xbmc / no) + MEDIACENTER="xbmc" + +# Skins to install (Confluence) +# Space separated list is supported, +# e.g. SKINS="Confluence" + SKINS="Confluence" + +# Default Skin (Confluence) + SKIN_DEFAULT="Confluence" + +# install extra subtitle Fonts for XBMC (yes / no) + XBMC_EXTRA_FONTS="yes" + +# build and install 'RSXS' Screensaver (yes / no) + XBMC_SCR_RSXS="no" + +# build and install 'ProjectM' Visualization (yes / no) + XBMC_VIS_PROJECTM="no" + +# build and install 'GOOM' Visualization (yes / no) + XBMC_VIS_GOOM="no" + +# build and install 'Waveform' Visualization (yes / no) + XBMC_VIS_WAVEFORM="yes" + +# build and install 'Spectrum' Visualization (yes / no) + XBMC_VIS_SPECTRUM="yes" + +# build and install 'FishBMC' Visualization (yes / no) + # does not work on RPi + XBMC_VIS_FISHBMC="no" + +# build and install ALSA Audio support (yes / no) + ALSA_SUPPORT="yes" + +# build and install PulseAudio support (yes / no) + PULSEAUDIO_SUPPORT="no" + +# build and install with non-free support +# (RAR compression support in XBMC) (yes / no) + NONFREE_SUPPORT="yes" + +# build and install with DVDCSS support +# (DVD decryption support in XBMC) (yes / no) + DVDCSS_SUPPORT="yes" + +# build and install with LAME cdrip encoder support + ENCODER_LAME="yes" + +# build and install with VORBIS cdrip encoder support + ENCODER_VORBIS="yes" + +# build and install with BluRay support (yes / no) + BLURAY_SUPPORT="yes" + +# additional drivers to install: +# for a list of additinoal drivers see packages/linux-drivers +# Space separated list is supported, +# e.g. ADDITIONAL_DRIVERS="DRIVER1 DRIVER2" +# ADDITIONAL_DRIVERS="RTL8192CU RTL8188EU dvbhdhomerun" + ADDITIONAL_DRIVERS="RTL8188EU" + +# build with network support (yes / no) + NETWORK="yes" + +# build and install bluetooth support (yes / no) + BLUETOOTH_SUPPORT="yes" + +# build and install with XBMC webfrontend (yes / no) + WEBSERVER="yes" + +# build and install Avahi (Zeroconf) daemon (yes / no) + AVAHI_DAEMON="yes" + +# build with UPnP support (yes / no) + UPNP_SUPPORT="yes" + +# build with MySQL support (yes / no) + MYSQL_SUPPORT="yes" + +# build xbmc with sshlib support (yes / no) + SSHLIB_SUPPORT="yes" + +# build xbmc with optical drive support (yes / no) + OPTICAL_DRIVE_SUPPORT="yes" + +# build with AirPlay support (stream videos from iDevices to XBMC) (yes / no) + AIRPLAY_SUPPORT="yes" + +# build with AirTunes support (stream music from iDevices to XBMC) (yes / no) + AIRTUNES_SUPPORT="yes" + +# build with libnfs support (mounting nfs shares with XBMC) (yes / no) + NFS_SUPPORT="yes" + +# build with afpfs-ng support (mounting AFP shares with XBMC) (yes / no) + AFP_SUPPORT="yes" + +# build and install Samba Client support (yes / no) + SAMBA_SUPPORT="yes" + +# build and install Samba Server (yes / no) + SAMBA_SERVER="yes" + +# build and install SFTP Server (yes / no) + SFTP_SERVER="yes" + +# build and install PPP support (yes / no) + PPTP_SUPPORT="yes" + +# build and install OpenVPN support (yes / no) + OPENVPN_SUPPORT="yes" + +# build and install diskmounter support (udevil) +# this service provide auto mounting support for external drives in the +# mediacenter also automount internally drives at boottime via udev (yes / no) + UDEVIL="yes" + +# build and install exFAT fuse support (yes / no) + EXFAT="yes" + +# build and install NTFS-3G fuse support (yes / no) + NTFS3G="yes" + +# build and install hfs filesystem utilities (yes / no) + HFSTOOLS="yes" + +# OpenGL(X) implementation to use (no / Mesa) + OPENGL="no" + +# OpenGL-ES implementation to use (no / bcm2835-driver / gpu-viv-bin-mx6q) + OPENGLES="gpu-viv-bin-mx6q" + +# Windowmanager to use (ratpoison / none) + WINDOWMANAGER="none" + +# include uvesafb support (yes / no) + UVESAFB_SUPPORT="no" + +# Displayserver to use (xorg-server / no) + DISPLAYSERVER="no" + +# Xorg Graphic drivers to use (all / i915,i965,r200,r300,r600,nvidia,nouveau,vmware) +# Space separated list is supported, +# e.g. GRAPHIC_DRIVERS="i915 i965 r300 r600 radeon nvidia nouveau" + GRAPHIC_DRIVERS="" + +# XBMC Player implementation to use (default / bcm2835-driver) + XBMCPLAYER_DRIVER="libfslvpuwrap" + +# Use VDPAU video acceleration (needs nVidia driver and a supported card) + VDPAU="no" + +# Use VAAPI video acceleration (needs intel i965 driver and a supported card) + VAAPI="no" + +# Use Broadcom CrystalHD Decoder Card for video acceleration +# (needs Kernelsupport for Broadcom Decoder Card and a supported card) + CRYSTALHD="no" + +# build and install remote support (yes / no) + REMOTE_SUPPORT="yes" + +# build and install ATV IR remote support (yes / no) + ATVCLIENT_SUPPORT="no" + +# build and install IRServer IR/LCD support (yes / no) + IRSERVER_SUPPORT="no" + +# build and install Joystick support (yes / no) + JOYSTICK_SUPPORT="yes" + +# build and install CEC adapter support (yes / no) + CEC_SUPPORT="yes" + +# build and install iSCSI support - iscsistart (yes / no) + ISCSI_SUPPORT="yes" + +# LCD driver to Use - Possible drivers are ( Comma seperated: +# bayrad,CFontz,CFontz633,CFontzPacket,curses,CwLnx,dm140, +# ea65,EyeboxOne,g15,glcdlib,glk,hd44780,i2500vfd, +# icp_a106,imon,imonlcd,IOWarrior,irman,irtrans, +# joy,lb216,lcdm001,lcterm,lirc,lis,MD8800,mdm166a, +# ms6931,mtc_s16209x,MtxOrb,mx5000,NoritakeVFD, +# picolcd,pyramid,sed1330,sed1520,serialPOS, +# serialVFD,shuttleVFD,sli,stv5730,SureElec,svga,vlsys_m428 +# 'all' compiles all drivers; +# 'all,!xxx,!yyy' de-selects previously selected drivers +# "none" for disable LCD support + LCD_DRIVER="irtrans,imon,imonlcd,mdm166a,MtxOrb,lis,dm140,hd44780,CFontz,SureElec,vlsys_m428" + +# Modules to install in initramfs for early boot + INITRAMFS_MODULES="" + +# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware) +# Space separated list is supported, +# e.g. FIRMWARE="dvb-firmware misc-firmware wlan-firmware" + FIRMWARE="firmware-imx misc-firmware wlan-firmware dvb-firmware" + +# build with lm_sensors hardware monitoring support (yes / no) + SENSOR_SUPPORT="yes" + +# build with swap support (yes / no) + SWAP_SUPPORT="no" + +# swap support enabled per default (yes / no) + SWAP_ENABLED_DEFAULT="no" + +# swapfile size if SWAP_SUPPORT=yes in MB + SWAPFILESIZE="128" + +# build with installer (yes / no) + INSTALLER_SUPPORT="no" + +# Testpackages for development (yes / no) + TESTING="no" + +# OEM packages for OEM's (yes / no) + OEM_SUPPORT="no" + +# build and install nano text editor (yes / no) + NANO_EDITOR="yes" + +# cron support (yes / no) + CRON_SUPPORT="yes" + +# Perf support in development builds (yes / no) + PERF_SUPPORT="yes" + +# Coreboot support (yes / no) + COREBOOT="no" + +# Distribution Specific source location + DISTRO_MIRROR="http://sources.openelec.tv/mirror" + DISTRO_SRC="http://sources.openelec.tv/$OPENELEC_VERSION" + +# Addon Server Url + ADDON_SERVER_URL="http://addons.openelec.tv" + +# set the addon dirs + ADDON_PATH="$ADDON_VERSION/$PROJECT/$TARGET_ARCH" + ADDON_URL="$ADDON_SERVER_URL/$ADDON_PATH" diff --git a/projects/Cuboxi/patches/libcec/libcec-01-Early_support_for_i.MX6.patch b/projects/Cuboxi/patches/libcec/libcec-01-Early_support_for_i.MX6.patch new file mode 100644 index 0000000000..47637c761c --- /dev/null +++ b/projects/Cuboxi/patches/libcec/libcec-01-Early_support_for_i.MX6.patch @@ -0,0 +1,817 @@ +From 90b994705ee2492afa00f914e0a070a0f0929f21 Mon Sep 17 00:00:00 2001 +From: wolfgar +Date: Sat, 28 Sep 2013 13:31:13 +0200 +Subject: [PATCH] Early support for i.MX6 + +--- + configure.ac | 19 ++ + include/cectypes.h | 14 +- + src/lib/CECTypeUtils.h | 2 + + src/lib/Makefile.am | 5 + + src/lib/adapter/AdapterFactory.cpp | 28 +- + src/lib/adapter/IMX/AdapterMessageQueue.h | 134 ++++++++++ + src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp | 281 +++++++++++++++++++++ + src/lib/adapter/IMX/IMXCECAdapterCommunication.h | 114 +++++++++ + src/lib/adapter/IMX/IMXCECAdapterDetection.cpp | 42 +++ + src/lib/adapter/IMX/IMXCECAdapterDetection.h | 36 +++ + 10 files changed, 672 insertions(+), 3 deletions(-) + create mode 100644 src/lib/adapter/IMX/AdapterMessageQueue.h + create mode 100644 src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp + create mode 100644 src/lib/adapter/IMX/IMXCECAdapterCommunication.h + create mode 100644 src/lib/adapter/IMX/IMXCECAdapterDetection.cpp + create mode 100644 src/lib/adapter/IMX/IMXCECAdapterDetection.h + +diff --git a/configure.ac b/configure.ac +index 9b2ac34..7875155 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -93,6 +93,14 @@ if test "x$use_rpi" != "xno"; then + esac + fi + ++## i.MX6 support ++AC_ARG_ENABLE([imx6], ++ [AS_HELP_STRING([--enable-imx6], ++ [enable support for freescale i.MX6 (default is no)])], ++ [use_imx6=$enableval], ++ [use_imx6=no]) ++ ++ + ## add the top dir and include to the include path, so we can include config.h and cec.h + CPPFLAGS="$CPPFLAGS -I\$(abs_top_srcdir)/src -I\$(abs_top_srcdir)/include" + +@@ -268,6 +276,17 @@ else + features="$features\n TDA995x support :\t\t\tno" + fi + ++## mark i.MX6 support as available ++if test "x$use_imx6" != "xno"; then ++ AC_DEFINE([HAVE_IMX_API],[1],[Define to 1 to include i.MX6 support]) ++ AM_CONDITIONAL(USE_IMX_API, true) ++ features="$features\n i.MX6 support :\t\t\tyes" ++ LIB_INFO="$LIB_INFO 'i.MX6'" ++else ++ AM_CONDITIONAL(USE_IMX_API, false) ++ features="$features\n i.MX6 support :\t\t\tno" ++fi ++ + ## check if our build system is complete + AC_CHECK_HEADER(algorithm,,AC_MSG_ERROR($msg_required_header_missing)) + AC_CHECK_HEADER(ctype.h,,AC_MSG_ERROR($msg_required_header_missing)) +diff --git a/include/cectypes.h b/include/cectypes.h +index a95243c..5c55283 100644 +--- a/include/cectypes.h ++++ b/include/cectypes.h +@@ -295,6 +295,17 @@ + #define CEC_TDA995x_VIRTUAL_COM "CuBox" + + /*! ++ * the path to use for the i.MX CEC wire ++ */ ++#define CEC_IMX_PATH "/dev/mxc_hdmi_cec" ++ ++/*! ++ * the name of the virtual COM port to use for the i.MX CEC wire ++ */ ++#define CEC_IMX_VIRTUAL_COM "i.MX" ++ ++ ++/*! + * Mimimum client version + */ + #define CEC_MIN_LIB_VERSION 2 +@@ -857,7 +868,8 @@ + ADAPTERTYPE_P8_EXTERNAL = 0x1, + ADAPTERTYPE_P8_DAUGHTERBOARD = 0x2, + ADAPTERTYPE_RPI = 0x100, +- ADAPTERTYPE_TDA995x = 0x200 ++ ADAPTERTYPE_TDA995x = 0x200, ++ ADAPTERTYPE_IMX = 0x300, + } cec_adapter_type; + + typedef struct cec_menu_language +diff --git a/src/lib/CECTypeUtils.h b/src/lib/CECTypeUtils.h +index 20e318b..dbb72b2 100644 +--- a/src/lib/CECTypeUtils.h ++++ b/src/lib/CECTypeUtils.h +@@ -852,6 +852,8 @@ + return "Raspberry Pi"; + case ADAPTERTYPE_TDA995x: + return "TDA995x"; ++ case ADAPTERTYPE_IMX: ++ return "i.MX"; + default: + return "unknown"; + } +diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am +index 35166f2..fbae7ad 100644 +--- a/src/lib/Makefile.am ++++ b/src/lib/Makefile.am +@@ -57,5 +57,10 @@ libcec_la_SOURCES += adapter/TDA995x/TDA995xCECAdapterDetection.cpp \ + adapter/TDA995x/TDA995xCECAdapterCommunication.cpp + endif + ++## i.MX6 support ++if USE_IMX_API ++libcec_la_SOURCES += adapter/IMX/IMXCECAdapterDetection.cpp \ ++ adapter/IMX/IMXCECAdapterCommunication.cpp ++endif + + libcec_la_LDFLAGS = @LIBS_LIBCEC@ -version-info @VERSION@ +diff --git a/src/lib/adapter/AdapterFactory.cpp b/src/lib/adapter/AdapterFactory.cpp +index 42cdd0b..3c83805 100644 +--- a/src/lib/adapter/AdapterFactory.cpp ++++ b/src/lib/adapter/AdapterFactory.cpp +@@ -52,6 +52,11 @@ + #include "TDA995x/TDA995xCECAdapterCommunication.h" + #endif + ++#if defined(HAVE_IMX_API) ++#include "IMX/IMXCECAdapterDetection.h" ++#include "IMX/IMXCECAdapterCommunication.h" ++#endif ++ + using namespace std; + using namespace CEC; + +@@ -109,7 +114,22 @@ int8_t CAdapterFactory::DetectAdapters(cec_adapter_descriptor *deviceList, uint8 + } + #endif + +-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) ++ ++#if defined(HAVE_IMX_API) ++ if (iAdaptersFound < iBufSize && CIMXCECAdapterDetection::FindAdapter() && ++ (!strDevicePath || !strcmp(strDevicePath, CEC_IMX_VIRTUAL_COM))) ++ { ++ snprintf(deviceList[iAdaptersFound].strComPath, sizeof(deviceList[iAdaptersFound].strComPath), CEC_IMX_PATH); ++ snprintf(deviceList[iAdaptersFound].strComName, sizeof(deviceList[iAdaptersFound].strComName), CEC_IMX_VIRTUAL_COM); ++ deviceList[iAdaptersFound].iVendorId = IMX_ADAPTER_VID; ++ deviceList[iAdaptersFound].iProductId = IMX_ADAPTER_PID; ++ deviceList[iAdaptersFound].adapterType = ADAPTERTYPE_IMX; ++ iAdaptersFound++; ++ } ++#endif ++ ++ ++#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_IMX_API) + #error "libCEC doesn't have support for any type of adapter. please check your build system or configuration" + #endif + +@@ -128,11 +148,15 @@ IAdapterCommunication *CAdapterFactory::GetInstance(const char *strPort, uint16_ + return new CRPiCECAdapterCommunication(m_lib->m_cec); + #endif + ++#if defined(HAVE_IMX_API) ++ return new CIMXCECAdapterCommunication(m_lib->m_cec); ++#endif ++ + #if defined(HAVE_P8_USB) + return new CUSBCECAdapterCommunication(m_lib->m_cec, strPort, iBaudRate); + #endif + +-#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) ++#if !defined(HAVE_RPI_API) && !defined(HAVE_P8_USB) && !defined(HAVE_TDA995X_API) && !defined(HAVE_IMX_API) + return NULL; + #endif + } +diff --git a/src/lib/adapter/IMX/AdapterMessageQueue.h b/src/lib/adapter/IMX/AdapterMessageQueue.h +new file mode 100644 +index 0000000..c8bcf71 +--- /dev/null ++++ b/src/lib/adapter/IMX/AdapterMessageQueue.h +@@ -0,0 +1,134 @@ ++#pragma once ++/* ++ * This file is part of the libCEC(R) library. ++ * ++ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. ++ * libCEC(R) is an original work, containing original code. ++ * ++ * libCEC(R) is a trademark of Pulse-Eight Limited. ++ * ++ * This program is dual-licensed; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * ++ * Alternatively, you can license this library under a commercial license, ++ * please contact Pulse-Eight Licensing for more information. ++ * ++ * For more information contact: ++ * Pulse-Eight Licensing ++ * http://www.pulse-eight.com/ ++ * http://www.pulse-eight.net/ ++ */ ++ ++#include "lib/platform/threads/mutex.h" ++ ++namespace CEC ++{ ++ using namespace PLATFORM; ++ ++ class CAdapterMessageQueueEntry ++ { ++ public: ++ CAdapterMessageQueueEntry(const cec_command &command) ++ : m_bWaiting(true), m_retval((uint32_t)-1), m_bSucceeded(false) ++ { ++ m_hash = hashValue( ++ uint32_t(command.opcode_set ? command.opcode : CEC_OPCODE_NONE), ++ command.initiator, command.destination); ++ } ++ ++ virtual ~CAdapterMessageQueueEntry(void) {} ++ ++ /*! ++ * @brief Query result from worker thread ++ */ ++ uint32_t Result() const ++ { ++ return m_retval; ++ } ++ ++ /*! ++ * @brief Signal waiting threads ++ */ ++ void Broadcast(void) ++ { ++ CLockObject lock(m_mutex); ++ m_condition.Broadcast(); ++ } ++ ++ /*! ++ * @brief Signal waiting thread(s) when message matches this entry ++ */ ++ bool CheckMatch(uint32_t opcode, cec_logical_address initiator, ++ cec_logical_address destination, uint32_t response) ++ { ++ uint32_t hash = hashValue(opcode, initiator, destination); ++ ++ if (hash == m_hash) ++ { ++ CLockObject lock(m_mutex); ++ ++ m_retval = response; ++ m_bSucceeded = true; ++ m_condition.Signal(); ++ return true; ++ } ++ ++ return false; ++ } ++ ++ /*! ++ * @brief Wait for a response to this command. ++ * @param iTimeout The timeout to use while waiting. ++ * @return True when a response was received before the timeout passed, false otherwise. ++ */ ++ bool Wait(uint32_t iTimeout) ++ { ++ CLockObject lock(m_mutex); ++ ++ bool bReturn = m_bSucceeded ? true : m_condition.Wait(m_mutex, m_bSucceeded, iTimeout); ++ m_bWaiting = false; ++ return bReturn; ++ } ++ ++ /*! ++ * @return True while a thread is waiting for a signal or isn't waiting yet, false otherwise. ++ */ ++ bool IsWaiting(void) ++ { ++ CLockObject lock(m_mutex); ++ return m_bWaiting; ++ } ++ ++ /*! ++ * @return Hash value for given cec_command ++ */ ++ static uint32_t hashValue(uint32_t opcode, ++ cec_logical_address initiator, ++ cec_logical_address destination) ++ { ++ return 1 | ((uint32_t)initiator << 8) | ++ ((uint32_t)destination << 16) | ((uint32_t)opcode << 16); ++ } ++ ++ private: ++ bool m_bWaiting; /**< true while a thread is waiting or when it hasn't started waiting yet */ ++ PLATFORM::CCondition m_condition; /**< the condition to wait on */ ++ PLATFORM::CMutex m_mutex; /**< mutex for changes to this class */ ++ uint32_t m_hash; ++ uint32_t m_retval; ++ bool m_bSucceeded; ++ }; ++ ++}; +diff --git a/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp +new file mode 100644 +index 0000000..f4783df +--- /dev/null ++++ b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp +@@ -0,0 +1,281 @@ ++/* ++ * This file is part of the libCEC(R) library. ++ * ++ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. ++ * libCEC(R) is an original work, containing original code. ++ * ++ * libCEC(R) is a trademark of Pulse-Eight Limited. ++ * ++ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin ++ * ++ * You can redistribute this file and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * ++ */ ++ ++#include "env.h" ++ ++#if defined(HAVE_IMX_API) ++#include "IMXCECAdapterCommunication.h" ++ ++#include "lib/CECTypeUtils.h" ++#include "lib/LibCEC.h" ++#include "lib/platform/sockets/cdevsocket.h" ++#include "lib/platform/util/StdString.h" ++#include "lib/platform/util/buffer.h" ++ ++/* ++ * Ioctl definitions from kernel header ++ */ ++#define HDMICEC_IOC_MAGIC 'H' ++#define HDMICEC_IOC_SETLOGICALADDRESS _IOW(HDMICEC_IOC_MAGIC, 1, unsigned char) ++#define HDMICEC_IOC_STARTDEVICE _IO(HDMICEC_IOC_MAGIC, 2) ++#define HDMICEC_IOC_STOPDEVICE _IO(HDMICEC_IOC_MAGIC, 3) ++#define HDMICEC_IOC_GETPHYADDRESS _IOR(HDMICEC_IOC_MAGIC, 4, unsigned char[4]) ++ ++#define MAX_CEC_MESSAGE_LEN 17 ++ ++#define MESSAGE_TYPE_RECEIVE_SUCCESS 1 ++#define MESSAGE_TYPE_NOACK 2 ++#define MESSAGE_TYPE_DISCONNECTED 3 ++#define MESSAGE_TYPE_CONNECTED 4 ++#define MESSAGE_TYPE_SEND_SUCCESS 5 ++ ++typedef struct hdmi_cec_event{ ++ int event_type; ++ int msg_len; ++ unsigned char msg[MAX_CEC_MESSAGE_LEN]; ++}hdmi_cec_event; ++ ++ ++using namespace std; ++using namespace CEC; ++using namespace PLATFORM; ++ ++#include "AdapterMessageQueue.h" ++ ++#define LIB_CEC m_callback->GetLib() ++ ++// these are defined in nxp private header file ++#define CEC_MSG_SUCCESS 0x00 /*Message transmisson Succeed*/ ++#define CEC_CSP_OFF_STATE 0x80 /*CSP in Off State*/ ++#define CEC_BAD_REQ_SERVICE 0x81 /*Bad .req service*/ ++#define CEC_MSG_FAIL_UNABLE_TO_ACCESS 0x82 /*Message transmisson failed: Unable to access CEC line*/ ++#define CEC_MSG_FAIL_ARBITRATION_ERROR 0x83 /*Message transmisson failed: Arbitration error*/ ++#define CEC_MSG_FAIL_BIT_TIMMING_ERROR 0x84 /*Message transmisson failed: Bit timming error*/ ++#define CEC_MSG_FAIL_DEST_NOT_ACK 0x85 /*Message transmisson failed: Destination Address not aknowledged*/ ++#define CEC_MSG_FAIL_DATA_NOT_ACK 0x86 /*Message transmisson failed: Databyte not acknowledged*/ ++ ++ ++CIMXCECAdapterCommunication::CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback) : ++ IAdapterCommunication(callback)/*, ++ m_bLogicalAddressChanged(false)*/ ++{ ++ CLockObject lock(m_mutex); ++ ++ m_iNextMessage = 0; ++ //m_logicalAddresses.Clear(); ++ m_logicalAddress = CECDEVICE_UNKNOWN; ++ m_dev = new CCDevSocket(CEC_IMX_PATH); ++} ++ ++CIMXCECAdapterCommunication::~CIMXCECAdapterCommunication(void) ++{ ++ Close(); ++ ++ CLockObject lock(m_mutex); ++ delete m_dev; ++ m_dev = 0; ++} ++ ++bool CIMXCECAdapterCommunication::IsOpen(void) ++{ ++ return IsInitialised() && m_dev->IsOpen(); ++} ++ ++bool CIMXCECAdapterCommunication::Open(uint32_t iTimeoutMs, bool UNUSED(bSkipChecks), bool bStartListening) ++{ ++ if (m_dev->Open(iTimeoutMs)) ++ { ++ if (!bStartListening || CreateThread()) { ++ if (m_dev->Ioctl(HDMICEC_IOC_STARTDEVICE, NULL) != 0) { ++ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to start device\n", __func__); ++ } ++ return true; ++ } ++ m_dev->Close(); ++ } ++ ++ return false; ++} ++ ++ ++void CIMXCECAdapterCommunication::Close(void) ++{ ++ StopThread(0); ++ if (m_dev->Ioctl(HDMICEC_IOC_STOPDEVICE, NULL) != 0) { ++ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: Unable to stop device\n", __func__); ++ } ++ m_dev->Close(); ++} ++ ++ ++std::string CIMXCECAdapterCommunication::GetError(void) const ++{ ++ std::string strError(m_strError); ++ return strError; ++} ++ ++ ++cec_adapter_message_state CIMXCECAdapterCommunication::Write( ++ const cec_command &data, bool &UNUSED(bRetry), uint8_t UNUSED(iLineTimeout), bool UNUSED(bIsReply)) ++{ ++ //cec_frame frame; ++ unsigned char message[MAX_CEC_MESSAGE_LEN]; ++ int msg_len = 1; ++ cec_adapter_message_state rc = ADAPTER_MESSAGE_STATE_ERROR; ++ ++ if ((size_t)data.parameters.size + data.opcode_set + 1 > sizeof(message)) ++ { ++ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: data size too large !", __func__); ++ return ADAPTER_MESSAGE_STATE_ERROR; ++ } ++ ++ message[0] = (data.initiator << 4) | (data.destination & 0x0f); ++ if (data.opcode_set) ++ { ++ message[1] = data.opcode; ++ msg_len++; ++ memcpy(&message[2], data.parameters.data, data.parameters.size); ++ msg_len+=data.parameters.size; ++ } ++ ++ if (m_dev->Write(message, msg_len) == msg_len) ++ { ++ rc = ADAPTER_MESSAGE_STATE_SENT_ACKED; ++ } ++ else ++ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: sent command error !", __func__); ++ ++ return rc; ++} ++ ++ ++uint16_t CIMXCECAdapterCommunication::GetFirmwareVersion(void) ++{ ++ /* FIXME add ioctl ? */ ++ return 0; ++} ++ ++ ++cec_vendor_id CIMXCECAdapterCommunication::GetVendorId(void) ++{ ++ /* FIXME TO be implemented : check how */ ++ return CEC_VENDOR_PANASONIC; ++} ++ ++ ++uint16_t CIMXCECAdapterCommunication::GetPhysicalAddress(void) ++{ ++ uint32_t info; ++ ++ if (m_dev->Ioctl(HDMICEC_IOC_GETPHYADDRESS, &info) != 0) ++ { ++ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_GETPHYADDRESS failed !", __func__); ++ return CEC_INVALID_PHYSICAL_ADDRESS; ++ } ++ ++ return info; ++} ++ ++ ++cec_logical_addresses CIMXCECAdapterCommunication::GetLogicalAddresses(void) ++{ ++ cec_logical_addresses addresses; ++ addresses.Clear(); ++ ++ CLockObject lock(m_mutex); ++ if ( m_logicalAddress != CECDEVICE_UNKNOWN) ++ addresses.Set(m_logicalAddress); ++ ++ return addresses; ++} ++ ++ ++bool CIMXCECAdapterCommunication::SetLogicalAddresses(const cec_logical_addresses &addresses) ++{ ++ int log_addr = addresses.primary; ++ ++ CLockObject lock(m_mutex); ++ if (m_logicalAddress == log_addr) ++ return true; ++ ++ ++ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, log_addr) != 0) ++ { ++ LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__); ++ return false; ++ } ++ ++ m_logicalAddress = (cec_logical_address)log_addr; ++ return true; ++} ++ ++ ++void *CIMXCECAdapterCommunication::Process(void) ++{ ++ bool bHandled; ++ hdmi_cec_event event; ++ int ret; ++ ++ uint32_t opcode, status; ++ cec_logical_address initiator, destination; ++ ++ while (!IsStopped()) ++ { ++ ret = m_dev->Read((char *)&event, sizeof(event), 5000); ++ if (ret > 0) ++ { ++ ++ initiator = cec_logical_address(event.msg[0] >> 4); ++ destination = cec_logical_address(event.msg[0] & 0x0f); ++ ++ //LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read data : type : %d initiator %d dest %d", __func__, event.event_type, initiator, destination); ++ if (event.event_type == MESSAGE_TYPE_RECEIVE_SUCCESS) ++ /* Message received */ ++ { ++ cec_command cmd; ++ ++ cec_command::Format( ++ cmd, initiator, destination, ++ ( event.msg_len > 1 ) ? cec_opcode(event.msg[1]) : CEC_OPCODE_NONE); ++ ++ for( uint8_t i = 2; i < event.msg_len; i++ ) ++ cmd.parameters.PushBack(event.msg[i]); ++ ++ if (!IsStopped()) ++ m_callback->OnCommandReceived(cmd); ++ } ++ /* We are not interested in other events */ ++ } /*else { ++ LIB_CEC->AddLog(CEC_LOG_DEBUG, "%s: Read returned %d", __func__, ret); ++ }*/ ++ ++ } ++ ++ return 0; ++} ++ ++#endif // HAVE_IMX_API +diff --git a/src/lib/adapter/IMX/IMXCECAdapterCommunication.h b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h +new file mode 100644 +index 0000000..910dd39 +--- /dev/null ++++ b/src/lib/adapter/IMX/IMXCECAdapterCommunication.h +@@ -0,0 +1,114 @@ ++#pragma once ++/* ++ * This file is part of the libCEC(R) library. ++ * ++ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. ++ * libCEC(R) is an original work, containing original code. ++ * ++ * libCEC(R) is a trademark of Pulse-Eight Limited. ++ * ++ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin ++ * ++ * You can redistribute this file and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * ++ */ ++ ++#if defined(HAVE_IMX_API) ++ ++#include "lib/platform/threads/mutex.h" ++#include "lib/platform/threads/threads.h" ++#include "lib/platform/sockets/socket.h" ++#include "lib/adapter/AdapterCommunication.h" ++#include ++ ++#define IMX_ADAPTER_VID 0x0471 /*FIXME TBD*/ ++#define IMX_ADAPTER_PID 0x1001 ++ ++ ++ ++namespace PLATFORM ++{ ++ class CCDevSocket; ++}; ++ ++ ++namespace CEC ++{ ++ class CAdapterMessageQueueEntry; ++ ++ class CIMXCECAdapterCommunication : public IAdapterCommunication, public PLATFORM::CThread ++ { ++ public: ++ /*! ++ * @brief Create a new USB-CEC communication handler. ++ * @param callback The callback to use for incoming CEC commands. ++ */ ++ CIMXCECAdapterCommunication(IAdapterCommunicationCallback *callback); ++ virtual ~CIMXCECAdapterCommunication(void); ++ ++ /** @name IAdapterCommunication implementation */ ++ ///{ ++ bool Open(uint32_t iTimeoutMs = CEC_DEFAULT_CONNECT_TIMEOUT, bool bSkipChecks = false, bool bStartListening = true); ++ void Close(void); ++ bool IsOpen(void); ++ std::string GetError(void) const; ++ cec_adapter_message_state Write(const cec_command &data, bool &bRetry, uint8_t iLineTimeout, bool bIsReply); ++ ++ bool SetLineTimeout(uint8_t UNUSED(iTimeout)) { return true; } ++ bool StartBootloader(void) { return false; } ++ bool SetLogicalAddresses(const cec_logical_addresses &addresses); ++ cec_logical_addresses GetLogicalAddresses(void); ++ bool PingAdapter(void) { return IsInitialised(); } ++ uint16_t GetFirmwareVersion(void); ++ uint32_t GetFirmwareBuildDate(void) { return 0; } ++ bool IsRunningLatestFirmware(void) { return true; } ++ bool PersistConfiguration(const libcec_configuration & UNUSED(configuration)) { return false; } ++ bool GetConfiguration(libcec_configuration & UNUSED(configuration)) { return false; } ++ std::string GetPortName(void) { return std::string("IMX"); } ++ uint16_t GetPhysicalAddress(void); ++ bool SetControlledMode(bool UNUSED(controlled)) { return true; } ++ cec_vendor_id GetVendorId(void); ++ bool SupportsSourceLogicalAddress(const cec_logical_address address) { return address > CECDEVICE_TV && address <= CECDEVICE_BROADCAST; } ++ cec_adapter_type GetAdapterType(void) { return ADAPTERTYPE_IMX; } ++ uint16_t GetAdapterVendorId(void) const { return IMX_ADAPTER_VID; } ++ uint16_t GetAdapterProductId(void) const { return IMX_ADAPTER_PID; } ++ void SetActiveSource(bool UNUSED(bSetTo), bool UNUSED(bClientUnregistered)) {} ++ ///} ++ ++ /** @name PLATFORM::CThread implementation */ ++ ///{ ++ void *Process(void); ++ ///} ++ ++ private: ++ bool IsInitialised(void) const { return m_dev != 0; }; ++ ++ std::string m_strError; /**< current error message */ ++ ++ //cec_logical_addresses m_logicalAddresses; ++ cec_logical_address m_logicalAddress; ++ ++ PLATFORM::CMutex m_mutex; ++ PLATFORM::CCDevSocket *m_dev; /**< the device connection */ ++ ++ PLATFORM::CMutex m_messageMutex; ++ uint32_t m_iNextMessage; ++ std::map m_messages; ++ }; ++ ++}; ++ ++#endif +diff --git a/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp b/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp +new file mode 100644 +index 0000000..6c93c45 +--- /dev/null ++++ b/src/lib/adapter/IMX/IMXCECAdapterDetection.cpp +@@ -0,0 +1,42 @@ ++/* ++ * This file is part of the libCEC(R) library. ++ * ++ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. ++ * libCEC(R) is an original work, containing original code. ++ * ++ * libCEC(R) is a trademark of Pulse-Eight Limited. ++ * ++ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin ++ * ++ * You can redistribute this file and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * ++ */ ++ ++#include "env.h" ++#include ++ ++#if defined(HAVE_IMX_API) ++#include "IMXCECAdapterDetection.h" ++ ++ ++using namespace CEC; ++ ++bool CIMXCECAdapterDetection::FindAdapter(void) ++{ ++ return access(CEC_IMX_PATH, 0) == 0; ++} ++ ++#endif +diff --git a/src/lib/adapter/IMX/IMXCECAdapterDetection.h b/src/lib/adapter/IMX/IMXCECAdapterDetection.h +new file mode 100644 +index 0000000..d54891d +--- /dev/null ++++ b/src/lib/adapter/IMX/IMXCECAdapterDetection.h +@@ -0,0 +1,36 @@ ++#pragma once ++/* ++ * This file is part of the libCEC(R) library. ++ * ++ * libCEC(R) is Copyright (C) 2011-2013 Pulse-Eight Limited. All rights reserved. ++ * libCEC(R) is an original work, containing original code. ++ * ++ * libCEC(R) is a trademark of Pulse-Eight Limited. ++ * ++ * IMX adpater port is Copyright (C) 2013 by Stephan Rafin ++ * ++ * You can redistribute this file and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ++ * ++ * ++ */ ++ ++namespace CEC ++{ ++ class CIMXCECAdapterDetection ++ { ++ public: ++ static bool FindAdapter(void); ++ }; ++} +-- +1.8.5.1 + diff --git a/projects/Cuboxi/patches/libcec/libcec-10-fix-compile-error.patch b/projects/Cuboxi/patches/libcec/libcec-10-fix-compile-error.patch new file mode 100644 index 0000000000..d79ff55d3b --- /dev/null +++ b/projects/Cuboxi/patches/libcec/libcec-10-fix-compile-error.patch @@ -0,0 +1,11 @@ +--- a/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 2013-10-02 18:39:38.933364683 +0200 ++++ b/src/lib/adapter/IMX/IMXCECAdapterCommunication.cpp 2013-10-02 18:39:38.945364681 +0200 +@@ -223,7 +223,7 @@ + return true; + + +- if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, log_addr) != 0) ++ if (m_dev->Ioctl(HDMICEC_IOC_SETLOGICALADDRESS, (void *)log_addr) != 0) + { + LIB_CEC->AddLog(CEC_LOG_ERROR, "%s: HDMICEC_IOC_SETLOGICALADDRESS failed !", __func__); + return false; diff --git a/projects/Cuboxi/patches/linux/linux-003-no_dev_console.patch b/projects/Cuboxi/patches/linux/linux-003-no_dev_console.patch new file mode 100644 index 0000000000..9b5e51437d --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-003-no_dev_console.patch @@ -0,0 +1,20 @@ +diff -Naur linux-2.6.34-rc7/init/main.c linux-2.6.34-rc7.patch/init/main.c +--- linux-2.6.34-rc7/init/main.c 2010-05-10 03:36:28.000000000 +0200 ++++ linux-2.6.34-rc7.patch/init/main.c 2010-05-15 12:28:34.767241760 +0200 +@@ -886,8 +886,14 @@ + do_basic_setup(); + + /* Open the /dev/console on the rootfs, this should never fail */ +- if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) +- printk(KERN_WARNING "Warning: unable to open an initial console.\n"); ++ char *console = "/dev_console"; ++ ++ if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) { ++ sys_mknod(console, S_IFCHR|0600, (TTYAUX_MAJOR<<8)|1); ++ if (sys_open(console, O_RDWR, 0) < 0) ++ printk(KERN_WARNING "Warning: unable to open an initial console.\n"); ++ sys_unlink(console); ++ } + + (void) sys_dup(0); + (void) sys_dup(0); diff --git a/projects/Cuboxi/patches/linux/linux-052-aureal_remote_quirk-0.1.patch b/projects/Cuboxi/patches/linux/linux-052-aureal_remote_quirk-0.1.patch new file mode 100644 index 0000000000..60cdbf0938 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-052-aureal_remote_quirk-0.1.patch @@ -0,0 +1,113 @@ +diff -Naur linux-2.6.37/drivers/hid/hid-aureal.c linux-2.6.37.patch/drivers/hid/hid-aureal.c +--- linux-2.6.37/drivers/hid/hid-aureal.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-2.6.37.patch/drivers/hid/hid-aureal.c 2011-01-07 22:35:31.413389936 +0100 +@@ -0,0 +1,60 @@ ++/* ++ * HID driver for some sunplus "special" devices ++ * ++ * Copyright (c) 1999 Andreas Gal ++ * Copyright (c) 2000-2005 Vojtech Pavlik ++ * Copyright (c) 2005 Michael Haboustak for Concept2, Inc ++ * Copyright (c) 2006-2007 Jiri Kosina ++ * Copyright (c) 2007 Paul Walmsley ++ * Copyright (c) 2008 Jiri Slaby ++ * Copyright (c) 2010 Franco Catrin ++ */ ++ ++/* ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the Free ++ * Software Foundation; either version 2 of the License, or (at your option) ++ * any later version. ++ */ ++ ++#include ++#include ++#include ++ ++#include "hid-ids.h" ++ ++static __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc, ++ unsigned int *rsize) ++{ ++ if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) { ++ dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 " ++ "report descriptor. Keyboard Logical Maximum = 101\n"); ++ rdesc[53] = 0x65; ++ } return rdesc; ++} ++ ++static const struct hid_device_id aureal_devices[] = { ++ { HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) }, ++ { } ++}; ++MODULE_DEVICE_TABLE(hid, aureal_devices); ++ ++static struct hid_driver aureal_driver = { ++ .name = "aureal", ++ .id_table = aureal_devices, ++ .report_fixup = aureal_report_fixup, ++}; ++ ++static int __init aureal_init(void) ++{ ++ return hid_register_driver(&aureal_driver); ++} ++ ++static void __exit aureal_exit(void) ++{ ++ hid_unregister_driver(&aureal_driver); ++} ++ ++module_init(aureal_init); ++module_exit(aureal_exit); ++MODULE_LICENSE("GPL"); +diff -Naur linux-2.6.37/drivers/hid/hid-ids.h linux-2.6.37.patch/drivers/hid/hid-ids.h +--- linux-2.6.37/drivers/hid/hid-ids.h 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37.patch/drivers/hid/hid-ids.h 2011-01-07 22:35:31.414389949 +0100 +@@ -6,6 +6,7 @@ + * Copyright (c) 2005 Michael Haboustak for Concept2, Inc + * Copyright (c) 2006-2007 Jiri Kosina + * Copyright (c) 2007 Paul Walmsley ++ * Copyright (c) 2010 Franco Catrin + */ + + /* +@@ -327,6 +328,9 @@ + #define USB_DEVICE_ID_KYE_ERGO_525V 0x0087 + #define USB_DEVICE_ID_KYE_GPEN_560 0x5003 + ++#define USB_VENDOR_ID_AUREAL 0x0755 ++#define USB_DEVICE_ID_AUREAL_W01RN 0x2626 ++ + #define USB_VENDOR_ID_LABTEC 0x1020 + #define USB_DEVICE_ID_LABTEC_WIRELESS_KEYBOARD 0x0006 + +diff -Naur linux-2.6.37/drivers/hid/Kconfig linux-2.6.37.patch/drivers/hid/Kconfig +--- linux-2.6.37/drivers/hid/Kconfig 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37.patch/drivers/hid/Kconfig 2011-01-07 22:35:31.467390603 +0100 +@@ -87,6 +87,13 @@ + Say Y here if you want support for keyboards of Apple iBooks, PowerBooks, + MacBooks, MacBook Pros and Apple Aluminum. + ++config HID_AUREAL ++ tristate "Aureal" if EMBEDDED ++ depends on USB_HID ++ default !EMBEDDED ++ ---help--- ++ Support for Aureal Cy se W-01RN Remote Controller ++ + config HID_BELKIN + tristate "Belkin Flip KVM and Wireless keyboard" if EMBEDDED + depends on USB_HID +diff -Naur linux-2.6.37/drivers/hid/Makefile linux-2.6.37.patch/drivers/hid/Makefile +--- linux-2.6.37/drivers/hid/Makefile 2011-01-05 01:50:19.000000000 +0100 ++++ linux-2.6.37.patch/drivers/hid/Makefile 2011-01-07 22:35:31.547391590 +0100 +@@ -29,6 +29,7 @@ + obj-$(CONFIG_HID_A4TECH) += hid-a4tech.o + obj-$(CONFIG_HID_ACRUX_FF) += hid-axff.o + obj-$(CONFIG_HID_APPLE) += hid-apple.o ++obj-$(CONFIG_HID_AUREAL) += hid-aureal.o + obj-$(CONFIG_HID_BELKIN) += hid-belkin.o + obj-$(CONFIG_HID_CANDO) += hid-cando.o + obj-$(CONFIG_HID_CHERRY) += hid-cherry.o diff --git a/projects/Cuboxi/patches/linux/linux-053-spinelplus-remote-0.1.patch b/projects/Cuboxi/patches/linux/linux-053-spinelplus-remote-0.1.patch new file mode 100644 index 0000000000..e1a5a76a52 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-053-spinelplus-remote-0.1.patch @@ -0,0 +1,148 @@ +diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-ids.h linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-ids.h +--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-ids.h 2014-01-12 18:38:32.000000000 +0100 ++++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-ids.h 2014-01-22 14:43:36.570838160 +0100 +@@ -561,6 +561,9 @@ + + #define USB_VENDOR_ID_PHILIPS 0x0471 + #define USB_DEVICE_ID_PHILIPS_IEEE802154_DONGLE 0x0617 ++#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1 0x206c ++#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2 0x20cc ++#define USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3 0x0613 + + #define USB_VENDOR_ID_PI_ENGINEERING 0x05f3 + #define USB_DEVICE_ID_PI_ENGINEERING_VEC_USB_FOOTPEDAL 0xff +diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-spinelplus.c linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-spinelplus.c +--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/hid-spinelplus.c 1970-01-01 01:00:00.000000000 +0100 ++++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/hid-spinelplus.c 2014-01-22 14:43:36.570838160 +0100 +@@ -0,0 +1,104 @@ ++/* ++ * HID driver for "PHILIPS MCE USB IR Receiver- Spinel plus" remotes ++ * ++ * Copyright (c) 2010 Panagiotis Skintzos ++ * ++ * Renamed to Spinel, cleanup and modified to also support ++ * Spinel Plus 0471:20CC by Stephan Raue 2012. ++ */ ++ ++/* ++ * This program is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License as published by the Free ++ * Software Foundation; either version 2 of the License, or (at your option) ++ * any later version. ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "hid-ids.h" ++ ++#define spinelplus_map_key(c) set_bit(EV_REP, hi->input->evbit); \ ++ hid_map_usage_clear(hi, usage, bit, max, EV_KEY, (c)) ++ ++static int spinelplus_input_mapping(struct hid_device *hdev, ++ struct hid_input *hi, struct hid_field *field, struct hid_usage *usage, ++ unsigned long **bit, int *max) ++{ ++ switch (usage->hid) { ++ case 0xffbc000d: spinelplus_map_key(KEY_MEDIA); break; ++ case 0xffbc0024: spinelplus_map_key(KEY_MEDIA); break; ++ case 0xffbc0027: spinelplus_map_key(KEY_ZOOM); break; ++ case 0xffbc0033: spinelplus_map_key(KEY_HOME); break; ++ case 0xffbc0035: spinelplus_map_key(KEY_CAMERA); break; ++ case 0xffbc0036: spinelplus_map_key(KEY_EPG); break; ++ case 0xffbc0037: spinelplus_map_key(KEY_DVD); break; ++ case 0xffbc0038: spinelplus_map_key(KEY_HOME); break; ++ case 0xffbc0039: spinelplus_map_key(KEY_MP3); break; ++ case 0xffbc003a: spinelplus_map_key(KEY_VIDEO); break; ++ case 0xffbc005a: spinelplus_map_key(KEY_TEXT); break; ++ case 0xffbc005b: spinelplus_map_key(KEY_RED); break; ++ case 0xffbc005c: spinelplus_map_key(KEY_GREEN); break; ++ case 0xffbc005d: spinelplus_map_key(KEY_YELLOW); break; ++ case 0xffbc005e: spinelplus_map_key(KEY_BLUE); break; ++ default: ++ return 0; ++ } ++ return 1; ++} ++ ++static int spinelplus_probe(struct hid_device *hdev, ++ const struct hid_device_id *id) ++{ ++ int ret; ++ /* Connect only to hid input (not hiddev & hidraw)*/ ++ unsigned int cmask = HID_CONNECT_HIDINPUT; ++ ++ ret = hid_parse(hdev); ++ if (ret) { ++ dev_err(&hdev->dev, "parse failed\n"); ++ goto err_free; ++ } ++ ++ ret = hid_hw_start(hdev, cmask); ++ if (ret) { ++ dev_err(&hdev->dev, "hw start failed\n"); ++ goto err_free; ++ } ++ ++ return 0; ++err_free: ++ return ret; ++} ++ ++static const struct hid_device_id spinelplus_devices[] = { ++ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_1) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_2) }, ++ { HID_USB_DEVICE(USB_VENDOR_ID_PHILIPS,USB_DEVICE_ID_PHILIPS_SPINEL_PLUS_3) }, ++ { } ++}; ++MODULE_DEVICE_TABLE(hid, spinelplus_devices); ++ ++static struct hid_driver spinelplus_driver = { ++ .name = "SpinelPlus", ++ .id_table = spinelplus_devices, ++ .input_mapping = spinelplus_input_mapping, ++ .probe = spinelplus_probe, ++}; ++ ++static int __init spinelplus_init(void) ++{ ++ return hid_register_driver(&spinelplus_driver); ++} ++ ++static void __exit spinelplus_exit(void) ++{ ++ hid_unregister_driver(&spinelplus_driver); ++} ++ ++module_init(spinelplus_init); ++module_exit(spinelplus_exit); ++MODULE_LICENSE("GPL"); +diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Kconfig linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Kconfig +--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Kconfig 2014-01-12 18:38:32.000000000 +0100 ++++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Kconfig 2014-01-22 14:43:36.571838106 +0100 +@@ -496,6 +496,12 @@ + ---help--- + Support for Sony PS3 controller. + ++config HID_SPINELPLUS ++ tristate "Spinel Plus remote control" ++ depends on USB_HID ++ ---help--- ++ Say Y here if you have a Spinel Plus (0471:206c/20cc/0613) remote ++ + config HID_SUNPLUS + tristate "Sunplus wireless desktop" + depends on USB_HID +diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Makefile linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Makefile +--- linux-imx_3.0.35_4.1.0-0f2006c/drivers/hid/Makefile 2014-01-12 18:38:32.000000000 +0100 ++++ linux-imx_3.0.35_4.1.0-0f2006c.patch/drivers/hid/Makefile 2014-01-22 14:44:22.868855680 +0100 +@@ -63,6 +63,7 @@ + obj-$(CONFIG_HID_SAMSUNG) += hid-samsung.o + obj-$(CONFIG_HID_SMARTJOYPLUS) += hid-sjoy.o + obj-$(CONFIG_HID_SONY) += hid-sony.o ++obj-$(CONFIG_HID_SPINELPLUS) += hid-spinelplus.o + obj-$(CONFIG_HID_SUNPLUS) += hid-sunplus.o + obj-$(CONFIG_HID_GREENASIA) += hid-gaff.o + obj-$(CONFIG_HID_THRUSTMASTER) += hid-tmff.o diff --git a/projects/Cuboxi/patches/linux/linux-056-Formosa-IR606.patch b/projects/Cuboxi/patches/linux/linux-056-Formosa-IR606.patch new file mode 100644 index 0000000000..bb17492572 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-056-Formosa-IR606.patch @@ -0,0 +1,12 @@ +diff -Naur linux-3.2.7/drivers/media/rc/mceusb.c linux-3.2.7.patch/drivers/media/rc/mceusb.c +--- linux-3.2.7/drivers/media/rc/mceusb.c 2012-02-20 22:42:16.000000000 +0100 ++++ linux-3.2.7.patch/drivers/media/rc/mceusb.c 2012-02-27 04:47:29.210888244 +0100 +@@ -361,6 +361,8 @@ + { USB_DEVICE(VENDOR_FORMOSA, 0xe03c) }, + /* Formosa Industrial Computing */ + { USB_DEVICE(VENDOR_FORMOSA, 0xe03e) }, ++ /* Formosa Industrial Computing AIM IR606 */ ++ { USB_DEVICE(VENDOR_FORMOSA, 0xe042) }, + /* Fintek eHome Infrared Transceiver (HP branded) */ + { USB_DEVICE(VENDOR_FINTEK, 0x5168) }, + /* Fintek eHome Infrared Transceiver */ diff --git a/projects/Cuboxi/patches/linux/linux-203-stb0899_enable_low_symbol_rate.patch b/projects/Cuboxi/patches/linux/linux-203-stb0899_enable_low_symbol_rate.patch new file mode 100644 index 0000000000..353893f011 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-203-stb0899_enable_low_symbol_rate.patch @@ -0,0 +1,12 @@ +diff -Naur linux-3.2.1/drivers/media/dvb/frontends/stb0899_drv.c linux-3.2.1.patch/drivers/media/dvb/frontends/stb0899_drv.c +--- linux-3.2.1/drivers/media/dvb/frontends/stb0899_drv.c 2012-01-12 20:42:45.000000000 +0100 ++++ linux-3.2.1.patch/drivers/media/dvb/frontends/stb0899_drv.c 2012-01-23 10:47:29.311211860 +0100 +@@ -1614,7 +1614,7 @@ + .frequency_max = 2150000, + .frequency_stepsize = 0, + .frequency_tolerance = 0, +- .symbol_rate_min = 5000000, ++ .symbol_rate_min = 1000000, + .symbol_rate_max = 45000000, + + .caps = FE_CAN_INVERSION_AUTO | diff --git a/projects/Cuboxi/patches/linux/linux-204-add_Formosa_eHome_Infrared_Receiver.patch b/projects/Cuboxi/patches/linux/linux-204-add_Formosa_eHome_Infrared_Receiver.patch new file mode 100644 index 0000000000..e2afb63e3d --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-204-add_Formosa_eHome_Infrared_Receiver.patch @@ -0,0 +1,11 @@ +--- linux-3.2.2.orig/drivers/media/rc/mceusb.c 2012-01-30 23:37:12.374473509 +0100 ++++ linux-3.2.2/drivers/media/rc/mceusb.c 2012-01-30 23:40:57.989652931 +0100 +@@ -350,6 +350,8 @@ + { USB_DEVICE(VENDOR_FORMOSA, 0xe015) }, + /* Formosa21 / eHome Infrared Receiver */ + { USB_DEVICE(VENDOR_FORMOSA, 0xe016) }, ++ /* Formosa21 / eHome Infrared Receiver */ ++ { USB_DEVICE(VENDOR_FORMOSA, 0xe042) }, + /* Formosa aim / Trust MCE Infrared Receiver */ + { USB_DEVICE(VENDOR_FORMOSA, 0xe017), + .driver_info = MCE_GEN2_NO_TX }, diff --git a/projects/Cuboxi/patches/linux/linux-212-mantis_stb0899_faster_lock.patch b/projects/Cuboxi/patches/linux/linux-212-mantis_stb0899_faster_lock.patch new file mode 100644 index 0000000000..23e28aea88 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-212-mantis_stb0899_faster_lock.patch @@ -0,0 +1,141 @@ +diff --git a/drivers/media/dvb/frontends/stb0899_algo.c b/drivers/media/dvb/frontends/stb0899_algo.c +index 2da55ec..3efde1e 100644 +--- a/drivers/media/dvb/frontends/stb0899_algo.c ++++ b/drivers/media/dvb/frontends/stb0899_algo.c +@@ -206,7 +206,6 @@ static enum stb0899_status stb0899_check_tmg(struct stb0899_state *state) + static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state) + { + struct stb0899_internal *internal = &state->internal; +- struct stb0899_params *params = &state->params; + + short int derot_step, derot_freq = 0, derot_limit, next_loop = 3; + int index = 0; +@@ -216,10 +215,9 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state) + + /* timing loop computation & symbol rate optimisation */ + derot_limit = (internal->sub_range / 2L) / internal->mclk; +- derot_step = (params->srate / 2L) / internal->mclk; ++ derot_step = internal->derot_step * 4; /* dertot_step = decreasing delta */ + + while ((stb0899_check_tmg(state) != TIMINGOK) && next_loop) { +- index++; + derot_freq += index * internal->direction * derot_step; /* next derot zig zag position */ + + if (abs(derot_freq) > derot_limit) +@@ -230,6 +228,7 @@ static enum stb0899_status stb0899_search_tmg(struct stb0899_state *state) + STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config->inversion * derot_freq)); + stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */ + } ++ index++; + internal->direction = -internal->direction; /* Change zigzag direction */ + } + +@@ -278,14 +277,18 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state) + { + struct stb0899_internal *internal = &state->internal; + +- short int derot_freq = 0, last_derot_freq = 0, derot_limit, next_loop = 3; ++ short int derot_freq = 0, last_derot_freq = 0, derot_limit, derot_step, next_loop = 3; + int index = 0; ++ int base_freq; + u8 cfr[2]; + u8 reg; + + internal->status = NOCARRIER; + derot_limit = (internal->sub_range / 2L) / internal->mclk; + derot_freq = internal->derot_freq; ++ derot_step = internal->derot_step * 2; ++ last_derot_freq = internal->derot_freq; ++ base_freq = internal->derot_freq; + + reg = stb0899_read_reg(state, STB0899_CFD); + STB0899_SETFIELD_VAL(CFD_ON, reg, 1); +@@ -294,11 +297,10 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state) + do { + dprintk(state->verbose, FE_DEBUG, 1, "Derot Freq=%d, mclk=%d", derot_freq, internal->mclk); + if (stb0899_check_carrier(state) == NOCARRIER) { +- index++; + last_derot_freq = derot_freq; +- derot_freq += index * internal->direction * internal->derot_step; /* next zig zag derotator position */ ++ derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */ + +- if(abs(derot_freq) > derot_limit) ++ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit) + next_loop--; + + if (next_loop) { +@@ -310,9 +312,10 @@ static enum stb0899_status stb0899_search_carrier(struct stb0899_state *state) + STB0899_SETFIELD_VAL(CFRL, cfr[1], LSB(state->config->inversion * derot_freq)); + stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */ + } ++ index++; ++ internal->direction = -internal->direction; /* Change zigzag direction */ + } + +- internal->direction = -internal->direction; /* Change zigzag direction */ + } while ((internal->status != CARRIEROK) && next_loop); + + if (internal->status == CARRIEROK) { +@@ -338,6 +341,7 @@ static enum stb0899_status stb0899_check_data(struct stb0899_state *state) + int lock = 0, index = 0, dataTime = 500, loop; + u8 reg; + ++ msleep(1); + internal->status = NODATA; + + /* RESET FEC */ +@@ -348,6 +352,7 @@ static enum stb0899_status stb0899_check_data(struct stb0899_state *state) + reg = stb0899_read_reg(state, STB0899_TSTRES); + STB0899_SETFIELD_VAL(FRESACS, reg, 0); + stb0899_write_reg(state, STB0899_TSTRES, reg); ++ msleep(1); + + if (params->srate <= 2000000) + dataTime = 2000; +@@ -360,6 +365,7 @@ static enum stb0899_status stb0899_check_data(struct stb0899_state *state) + + stb0899_write_reg(state, STB0899_DSTATUS2, 0x00); /* force search loop */ + while (1) { ++ msleep(1); // Alex: added 1 mSec + /* WARNING! VIT LOCKED has to be tested before VIT_END_LOOOP */ + reg = stb0899_read_reg(state, STB0899_VSTATUS); + lock = STB0899_GETFIELD(VSTATUS_LOCKEDVIT, reg); +@@ -387,20 +393,21 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state) + short int derot_freq, derot_step, derot_limit, next_loop = 3; + u8 cfr[2]; + u8 reg; +- int index = 1; ++ int index = 0; ++ int base_freq; + + struct stb0899_internal *internal = &state->internal; +- struct stb0899_params *params = &state->params; + +- derot_step = (params->srate / 4L) / internal->mclk; ++ derot_step = internal->derot_step; + derot_limit = (internal->sub_range / 2L) / internal->mclk; + derot_freq = internal->derot_freq; ++ base_freq = internal->derot_freq; + + do { + if ((internal->status != CARRIEROK) || (stb0899_check_data(state) != DATAOK)) { + + derot_freq += index * internal->direction * derot_step; /* next zig zag derotator position */ +- if (abs(derot_freq) > derot_limit) ++ if (derot_freq > base_freq + derot_limit || derot_freq < base_freq - derot_limit) + next_loop--; + + if (next_loop) { +@@ -414,9 +421,9 @@ static enum stb0899_status stb0899_search_data(struct stb0899_state *state) + stb0899_write_regs(state, STB0899_CFRM, cfr, 2); /* derotator frequency */ + + stb0899_check_carrier(state); +- index++; + } + } ++ index++; + internal->direction = -internal->direction; /* change zig zag direction */ + } while ((internal->status != DATAOK) && next_loop); + +-- +1.7.1 diff --git a/projects/Cuboxi/patches/linux/linux-213-cinergy_s2_usb_r2.patch b/projects/Cuboxi/patches/linux/linux-213-cinergy_s2_usb_r2.patch new file mode 100644 index 0000000000..155e5311f7 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-213-cinergy_s2_usb_r2.patch @@ -0,0 +1,46 @@ +diff -Naur linux-3.2.21/drivers/media/dvb/dvb-usb/dw2102.c linux-3.2.21.patch/drivers/media/dvb/dvb-usb/dw2102.c +--- linux-3.2.21/drivers/media/dvb/dvb-usb/dw2102.c 2012-06-20 00:18:30.000000000 +0200 ++++ linux-3.2.21.patch/drivers/media/dvb/dvb-usb/dw2102.c 2012-06-28 14:08:50.721691934 +0200 +@@ -1181,6 +1181,14 @@ + { + u8 obuf[3] = { 0xe, 0x80, 0 }; + u8 ibuf[] = { 0 }; ++ ++ if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0) ++ err("command 0x0e transfer failed."); ++ ++ //power on su3000 ++ obuf[0] = 0xe; ++ obuf[1] = 0x02; ++ obuf[2] = 1; + + if (dvb_usb_generic_rw(d->dev, obuf, 3, ibuf, 1, 0) < 0) + err("command 0x0e transfer failed."); +@@ -1448,6 +1456,7 @@ + {USB_DEVICE(0x3034, 0x7500)}, + {USB_DEVICE(0x1f4d, 0x3000)}, + {USB_DEVICE(USB_VID_TERRATEC, 0x00a8)}, ++ {USB_DEVICE(USB_VID_TERRATEC, 0x00b0)}, + {USB_DEVICE(0x9022, USB_PID_TEVII_S480_1)}, + {USB_DEVICE(0x9022, USB_PID_TEVII_S480_2)}, + {USB_DEVICE(0x1f4d, 0x3100)}, +@@ -1839,7 +1848,7 @@ + }}, + } + }, +- .num_device_descs = 3, ++ .num_device_descs = 4, + .devices = { + { "SU3000HD DVB-S USB2.0", + { &dw2102_table[10], NULL }, +@@ -1853,6 +1862,10 @@ + { &dw2102_table[14], NULL }, + { NULL }, + }, ++ { "Terratec Cinergy S2 USB HD Rev.2", ++ { &dw2102_table[17], NULL }, ++ { NULL }, ++ }, + } + }; + diff --git a/projects/Cuboxi/patches/linux/linux-215-technisat-usb2-module.patch b/projects/Cuboxi/patches/linux/linux-215-technisat-usb2-module.patch new file mode 100644 index 0000000000..acc664e699 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-215-technisat-usb2-module.patch @@ -0,0 +1,25 @@ +This patch adds a module-device-table-entry to the +technisat-usb2-driver which will help udev to on-demand load the +driver. This was obviously forgotten during initial commit. + +Signed-off-by: Patrick Boettcher +--- + drivers/media/dvb/dvb-usb/technisat-usb2.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/media/dvb/dvb-usb/technisat-usb2.c b/drivers/media/dvb/dvb-usb/technisat-usb2.c +index acefaa8..7a8c8c1 100644 +--- a/drivers/media/dvb/dvb-usb/technisat-usb2.c ++++ b/drivers/media/dvb/dvb-usb/technisat-usb2.c +@@ -677,6 +677,7 @@ static struct usb_device_id technisat_usb2_id_table[] = { + { USB_DEVICE(USB_VID_TECHNISAT, USB_PID_TECHNISAT_USB2_DVB_S2) }, + { 0 } /* Terminating entry */ + }; ++MODULE_DEVICE_TABLE(usb, technisat_usb2_id_table); + + /* device description */ + static struct dvb_usb_device_properties technisat_usb2_devices = { +-- +1.7.9.5 + +-- diff --git a/projects/Cuboxi/patches/linux/linux-imx-RC6.patch b/projects/Cuboxi/patches/linux/linux-imx-RC6.patch new file mode 100644 index 0000000000..e116d3ca2c --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-imx-RC6.patch @@ -0,0 +1,19 @@ +diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/arch/arm/mach-mx6/board-mx6q_cubox-i.c linux-imx_3.0.35_4.1.0-0f2006c.patch/arch/arm/mach-mx6/board-mx6q_cubox-i.c +--- linux-imx_3.0.35_4.1.0-0f2006c/arch/arm/mach-mx6/board-mx6q_cubox-i.c 2014-01-12 18:38:33.000000000 +0100 ++++ linux-imx_3.0.35_4.1.0-0f2006c.patch/arch/arm/mach-mx6/board-mx6q_cubox-i.c 2014-01-22 22:28:14.749986987 +0100 +@@ -53,6 +53,7 @@ + #include + #ifdef CONFIG_IR_GPIO_CIR + #include ++#include + #endif + + #include +@@ -257,6 +258,7 @@ + static struct gpio_ir_recv_platform_data cubox_i_ir_data = { + .gpio_nr = GPIO_IR_IN, + .active_low = 1, ++ .map_name = RC_MAP_RC6_MCE, + }; + + static struct platform_device cubox_i_ir = { diff --git a/projects/Cuboxi/patches/linux/linux-imx6-ipu_burst-size.patch b/projects/Cuboxi/patches/linux/linux-imx6-ipu_burst-size.patch new file mode 100644 index 0000000000..367b79cd1e --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-imx6-ipu_burst-size.patch @@ -0,0 +1,11 @@ +--- linux-linux-imx+bdde708ebf/drivers/mxc/ipu3/ipu_param_mem.h 2013-08-16 04:01:35.000000000 +0200 ++++ linux-linux-imx+bdde708ebf/drivers/mxc/ipu3/ipu_param_mem.h-new 2013-10-16 07:49:35.916193147 +0200 +@@ -382,7 +382,7 @@ + ipu_ch_param_set_field(¶ms, 1, 78, 7, 15); /* burst size */ + uv_stride = uv_stride*2; + } else { +- ipu_ch_param_set_field(¶ms, 1, 78, 7, 31); /* burst size */ ++ ipu_ch_param_set_field(¶ms, 1, 78, 7, 63); /* burst size */ + } + break; + case IPU_PIX_FMT_YVU420P: diff --git a/projects/Cuboxi/patches/linux/linux-imx_3.0.35_4.1.0-make_headers-fix.patch b/projects/Cuboxi/patches/linux/linux-imx_3.0.35_4.1.0-make_headers-fix.patch new file mode 100644 index 0000000000..7b8d417554 --- /dev/null +++ b/projects/Cuboxi/patches/linux/linux-imx_3.0.35_4.1.0-make_headers-fix.patch @@ -0,0 +1,14 @@ +diff -Naur linux-imx_3.0.35_4.1.0-0f2006c/include/linux/fsl_devices.h linux-imx_3.0.35_4.1.0-0f2006c.patch/include/linux/fsl_devices.h +--- linux-imx_3.0.35_4.1.0-0f2006c/include/linux/fsl_devices.h 2014-01-12 18:38:34.000000000 +0100 ++++ linux-imx_3.0.35_4.1.0-0f2006c.patch/include/linux/fsl_devices.h 2014-01-13 03:49:09.472692153 +0100 +@@ -18,7 +18,10 @@ + #define _FSL_DEVICE_H_ + + #include ++ ++#ifdef __KERNEL__ + #include ++#endif /* __KERNEL__ */ + + /* + * Some conventions on how we handle peripherals on Freescale chips diff --git a/projects/Cuboxi/patches/u-boot/u-boot-SPL.patch.bk b/projects/Cuboxi/patches/u-boot/u-boot-SPL.patch.bk new file mode 100644 index 0000000000..fee6ed3a3d --- /dev/null +++ b/projects/Cuboxi/patches/u-boot/u-boot-SPL.patch.bk @@ -0,0 +1,16 @@ +diff -Naur u-boot-imx6-cuboxi-920ea0f/include/configs/imx6_spl.h u-boot-imx6-cuboxi-920ea0f.patch/include/configs/imx6_spl.h +--- u-boot-imx6-cuboxi-920ea0f/include/configs/imx6_spl.h 2014-01-13 17:11:41.000000000 +0100 ++++ u-boot-imx6-cuboxi-920ea0f.patch/include/configs/imx6_spl.h 2014-01-22 18:48:21.331246468 +0100 +@@ -41,9 +41,9 @@ + #define CONFIG_SPL_BOARD_INIT + + #define CONFIG_SPL_BSS_START_ADDR 0x18200000 +-#define CONFIG_SPL_BSS_MAX_SIZE 0x100000 /* 1 MB */ +-#define CONFIG_SYS_SPL_MALLOC_START 0x18300000 +-#define CONFIG_SYS_SPL_MALLOC_SIZE 0x3200000 /* 50 MB */ ++#define CONFIG_SPL_BSS_MAX_SIZE 0x200000 /* 1 MB */ ++#define CONFIG_SYS_SPL_MALLOC_START 0x18400000 ++#define CONFIG_SYS_SPL_MALLOC_SIZE 0x3100000 /* 50 MB */ + #define CONFIG_SYS_TEXT_BASE 0x17800000 + #endif + diff --git a/projects/Cuboxi/patches/xbmc/xbmc-001-imx6_support.patch b/projects/Cuboxi/patches/xbmc/xbmc-001-imx6_support.patch new file mode 100644 index 0000000000..4aa7e4ecc0 --- /dev/null +++ b/projects/Cuboxi/patches/xbmc/xbmc-001-imx6_support.patch @@ -0,0 +1,3660 @@ +diff -Naur xbmc-master.test/configure.in xbmc-wolfgar-imx-wip.test/configure.in +--- xbmc-master.test/configure.in 2014-01-10 19:50:18.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/configure.in 2014-01-12 04:55:00.000000000 +0100 +@@ -558,7 +558,7 @@ + + AC_ARG_ENABLE([codec], + [AS_HELP_STRING([--enable-codec], +- [enable additional codecs from a list of comma separated names, (default is none, choices are amcodec, libstagefright)])], ++ [enable additional codecs from a list of comma separated names, (default is none, choices are amcodec, libstagefright and imxvpu)])], + [add_codecs=$enableval], + [add_codecs=no]) + +@@ -1973,6 +1973,17 @@ + *libstagefright*) + XB_ADD_CODEC([LIBSTAGEFRIGHT], [libstagefright], [$codecs]) + ;; ++ *imxvpu*) ++ AC_CHECK_HEADER([imx-mm/vpu/vpu_wrapper.h],, AC_MSG_ERROR($missing_headers)) ++ AC_CHECK_LIB([vpu], main, LIBS="$LIBS -lfslvpuwrap -lvpu", AC_MSG_ERROR($missing_library)) ++ XB_ADD_CODEC([IMXVPU], [imxvpu], [$codecs]) ++ CXXFLAGS="$CXXFLAGS -Wno-psabi -DLINUX " ++ CFLAGS="$CFLAGS -DLINUX" ++ if test "$use_x11" = "no"; then ++ CXXFLAGS="$CXXFLAGS -DEGL_API_FB" ++ CFLAGS="$CFLAGS -DEGL_API_FB" ++ fi ++ ;; + *) + esac + done +@@ -2648,6 +2659,7 @@ + AC_SUBST(USE_DOXYGEN) + AC_SUBST(USE_PVR_ADDONS) + ++ + # pushd and popd are not available in other shells besides bash, so implement + # our own pushd/popd functions + XB_DIRSTACK="$PWD" +diff -Naur xbmc-master.test/lib/ffmpeg/libavcodec/arm/dca.h xbmc-wolfgar-imx-wip.test/lib/ffmpeg/libavcodec/arm/dca.h +--- xbmc-master.test/lib/ffmpeg/libavcodec/arm/dca.h 2013-09-03 05:03:25.000000000 +0200 ++++ xbmc-wolfgar-imx-wip.test/lib/ffmpeg/libavcodec/arm/dca.h 2014-01-12 04:37:24.000000000 +0100 +@@ -30,9 +30,9 @@ + + #define decode_blockcodes decode_blockcodes + static inline int decode_blockcodes(int code1, int code2, int levels, +- int *values) ++ int32_t *values) + { +- int v0, v1, v2, v3, v4, v5; ++ int32_t v0, v1, v2, v3, v4, v5; + + __asm__ ("smmul %0, %6, %10 \n" + "smmul %3, %7, %10 \n" +@@ -101,3 +101,4 @@ + #endif + + #endif /* AVCODEC_ARM_DCA_H */ ++ +diff -Naur xbmc-master.test/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp +--- xbmc-master.test/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/AudioEngine/Sinks/AESinkALSA.cpp 2014-01-12 04:55:00.000000000 +0100 +@@ -714,7 +714,10 @@ + * will automatically add "@" instead to enable surroundXX mangling. + * We don't want to do that if "default" can handle multichannel + * itself (e.g. in case of a pulseaudio server). */ +- EnumerateDevice(list, "default", "", config); ++ ++ /* For Wandboard, we do not enurate default device as it will be grabbed ++ * as one of the sysdefault devices... */ ++ + + void **hints; + +@@ -765,8 +768,8 @@ + * found by the enumeration process. Skip them as well ("hw", "dmix", + * "plughw", "dsnoop"). */ + ++ /* For wandboard all devices are prefixed by sysdefault so do not ignore them */ + else if (baseName != "default" +- && baseName != "sysdefault" + && baseName != "surround40" + && baseName != "surround41" + && baseName != "surround50" +@@ -875,6 +878,22 @@ + + AEDeviceType CAESinkALSA::AEDeviceTypeFromName(const std::string &name) + { ++ std::size_t found; ++ ++ /* Hack : Check for specific wandboard sound device names */ ++ found = name.find("imxspdif"); ++ if (found!=std::string::npos) ++ return AE_DEVTYPE_IEC958; ++ ++ found = name.find("imxhdmisoc"); ++ if (found!=std::string::npos) ++ return AE_DEVTYPE_HDMI; ++ ++ found = name.find("sgtl5000audio"); ++ if (found!=std::string::npos) ++ return AE_DEVTYPE_PCM; ++ ++ + if (name.substr(0, 4) == "hdmi") + return AE_DEVTYPE_HDMI; + else if (name.substr(0, 6) == "iec958" || name.substr(0, 5) == "spdif") +diff -Naur xbmc-master.test/xbmc/cores/AudioEngine/Utils/AEConvert.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/AudioEngine/Utils/AEConvert.cpp +--- xbmc-master.test/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2013-09-03 05:03:26.000000000 +0200 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/AudioEngine/Utils/AEConvert.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -841,7 +841,7 @@ + _mm_empty(); + #else /* no SSE2 */ + for (uint32_t i = 0; i < samples; ++i) +- *dst++ = (safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0xFFFFFF) << 8; ++ *dst++ = safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0x00FFFFFF; + #endif + + return samples << 2; +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/DVDFactoryCodec.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -35,6 +35,9 @@ + #include "Video/DVDVideoCodecFFmpeg.h" + #include "Video/DVDVideoCodecOpenMax.h" + #include "Video/DVDVideoCodecLibMpeg2.h" ++#if defined(HAS_IMXVPU) ++#include "Video/DVDVideoCodecIMX.h" ++#endif + #include "Video/DVDVideoCodecStageFright.h" + #if defined(HAVE_LIBCRYSTALHD) + #include "Video/DVDVideoCodecCrystalHD.h" +@@ -194,7 +197,11 @@ + #elif defined(TARGET_POSIX) && !defined(TARGET_DARWIN) + hwSupport += "VAAPI:no "; + #endif +- ++#if defined(HAS_IMXVPU) ++ hwSupport += "iMXVPU:yes "; ++#else ++ hwSupport += "iMXVPU:no "; ++#endif + CLog::Log(LOGDEBUG, "CDVDFactoryCodec: compiled in hardware support: %s", hwSupport.c_str()); + #if defined(HAS_LIBAMCODEC) + // amcodec can handle dvd playback. +@@ -208,6 +215,15 @@ + } + } + ++/*#endif*/ ++ ++#if defined(HAS_IMXVPU) ++ if (!hint.software) ++ { ++ if ( (pCodec = OpenCodec(new CDVDVideoCodecIMX(), hint, options)) ) return pCodec; ++ } ++#endif ++ + #if defined(TARGET_DARWIN_OSX) + if (!hint.software && CSettings::Get().GetBool("videoplayer.usevda")) + { +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodec.h 2014-01-12 04:37:25.000000000 +0100 +@@ -38,7 +38,9 @@ + class COpenMax; + class COpenMaxVideo; + struct OpenMaxVideoBuffer; ++class CIMXOutputFrame; + class CDVDVideoCodecStageFright; ++ + class CDVDMediaCodecInfo; + typedef void* EGLImageKHR; + +@@ -64,17 +66,19 @@ + struct { + VAAPI::CHolder* vaapi; + }; +- + struct { + COpenMax *openMax; + OpenMaxVideoBuffer *openMaxBuffer; + }; +- + struct { + struct __CVBuffer *cvBufferRef; + }; + + struct { ++ CIMXOutputFrame *imxOutputFrame; ++ }; ++ ++ struct { + CDVDVideoCodecStageFright* stf; + EGLImageKHR eglimg; + }; +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -0,0 +1,1686 @@ ++/* ++ * Copyright (C) 2013 Stephan Rafin ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++ ++#include ++#include "DVDVideoCodecIMX.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include "threads/SingleLock.h" ++#include "utils/log.h" ++#include "DVDClock.h" ++#include "mfw_gst_ts.h" ++#include "threads/Atomics.h" ++ ++//#define NO_V4L_RENDERING ++ ++#ifdef IMX_PROFILE ++static unsigned long long render_ts[30]; ++static unsigned long long get_time() ++{ ++ struct timespec ts; ++ unsigned long long now; ++ ++ clock_gettime(CLOCK_MONOTONIC, &ts); ++ now = (((unsigned long long)ts.tv_sec) * 1000000000ULL) + ++ ((unsigned long long)ts.tv_nsec); ++ ++ return now; ++} ++#endif ++ ++/* video device on which the video will be rendered (/dev/video17 => /dev/fb1) */ ++const char *CIMXRenderingFrames::m_v4lDeviceName = "/dev/video17"; ++static long sg_singleton_lock_variable = 0; ++CIMXRenderingFrames* CIMXRenderingFrames::m_instance = 0; ++ ++CIMXRenderingFrames& ++CIMXRenderingFrames::GetInstance() ++{ ++ CAtomicSpinLock lock(sg_singleton_lock_variable); ++ if( ! m_instance ) ++ { ++ m_instance = new CIMXRenderingFrames(); ++ } ++ return *m_instance; ++} ++ ++CIMXRenderingFrames::CIMXRenderingFrames() ++{ ++ m_ready = false; ++ m_v4lfd = -1; ++ m_virtAddr = NULL; ++ m_v4lBuffers = NULL; ++ memset(&m_crop, 0, sizeof(m_crop)); ++ m_crop.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++} ++ ++bool CIMXRenderingFrames::AllocateBuffers(const struct v4l2_format *format, int nbBuffers) ++{ ++ int ret, i; ++ struct v4l2_requestbuffers bufReq; ++ struct v4l2_format fmt; ++ struct v4l2_buffer v4lBuf; ++ ++ CSingleLock lock(m_renderingFramesLock); ++ if (m_ready) ++ { ++ CLog::Log(LOGERROR, "%s - Try to re-allocate buffers while previous buffers were not freed.\n", __FUNCTION__); ++ return false; ++ } ++ ++ m_v4lfd = open(m_v4lDeviceName, O_RDWR|O_NONBLOCK, 0); ++ if (m_v4lfd < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while trying to open %s.\n", __FUNCTION__, m_v4lDeviceName); ++ __ReleaseBuffers(); ++ return false; ++ } ++ ++ ret = ioctl(m_v4lfd, VIDIOC_S_FMT, format); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while setting V4L format (ret %d : %s).\n", __FUNCTION__, ret, strerror(errno)); ++ __ReleaseBuffers(); ++ return false; ++ } ++ ++ fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ ret = ioctl(m_v4lfd, VIDIOC_G_FMT, &fmt); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while getting V4L format (ret %d : %s).\n", __FUNCTION__, ret, strerror(errno)); ++ __ReleaseBuffers(); ++ return false; ++ } ++ ++ m_bufferNum = nbBuffers; ++ /* Alloc V4L2 buffers */ ++ memset(&bufReq, 0, sizeof(bufReq)); ++ bufReq.count = m_bufferNum; ++ bufReq.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ bufReq.memory = V4L2_MEMORY_MMAP; ++ ret = ioctl(m_v4lfd, VIDIOC_REQBUFS, &bufReq); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - %d Hw buffer allocation error (%d)\n", __FUNCTION__, bufReq.count, ret); ++ __ReleaseBuffers(); ++ return false; ++ } ++ CLog::Log(LOGDEBUG, "%s - %d Hw buffer of %d bytes allocated\n", __FUNCTION__, bufReq.count, fmt.fmt.pix.sizeimage); ++ ++ m_virtAddr = new void*[m_bufferNum]; ++ if (m_virtAddr == NULL) ++ { ++ CLog::Log(LOGERROR, "%s - Allocation failure (m_virtAddr table of %d elements)\n", __FUNCTION__, m_bufferNum); ++ __ReleaseBuffers(); ++ return false; ++ } ++ m_v4lBuffers = new v4l2_buffer[m_bufferNum]; ++ if (m_v4lBuffers == NULL) ++ { ++ CLog::Log(LOGERROR, "%s - Allocation failure (m_v4lBuffers table of %d elements)\n", __FUNCTION__, m_bufferNum); ++ __ReleaseBuffers(); ++ return false; ++ } ++ ++ for (i = 0 ; i < m_bufferNum; i++) ++ { ++ memset(&v4lBuf, 0, sizeof(v4lBuf)); ++ v4lBuf.index = i; ++ v4lBuf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ v4lBuf.memory = V4L2_MEMORY_MMAP; ++ ret = ioctl (m_v4lfd, VIDIOC_QUERYBUF, &v4lBuf); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error during 1st query of V4L buffer (ret %d : %s)\n", __FUNCTION__, ret, strerror(errno)); ++ return false; ++ } ++ m_v4lBuffers[i] = v4lBuf; ++ m_virtAddr[i] = NULL; ++ } ++ memset(&m_crop, 0, sizeof(m_crop)); ++ m_crop.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ m_pushedFrames = 0; ++ m_streamOn = false; ++ m_currentField = VPU_FIELD_UNKNOWN; ++ m_ready = true; ++ return true; ++} ++ ++void *CIMXRenderingFrames::GetVirtAddr(int idx) ++{ ++ struct v4l2_buffer v4lBuf; ++ int ret; ++ ++ CSingleLock lock(m_renderingFramesLock); ++ if (!m_ready) ++ return NULL; ++ if ((idx < 0) || (idx >= m_bufferNum)) ++ return NULL; ++ ++ if (m_virtAddr[idx] == NULL) ++ { ++ v4lBuf = m_v4lBuffers[idx]; ++ m_virtAddr[idx] = mmap(NULL, v4lBuf.length, PROT_READ | PROT_WRITE, MAP_SHARED, m_v4lfd, v4lBuf.m.offset); ++ ++ /* 2nd query to retrieve real Physical address after mmap (iMX6 bug) */ ++ ret = ioctl (m_v4lfd, VIDIOC_QUERYBUF, &v4lBuf); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error during 2nd query of V4L buffer (ret %d : %s)\n", __FUNCTION__, ret, strerror(errno)); ++ } ++ m_v4lBuffers[idx] = v4lBuf; ++ } ++ return m_virtAddr[idx]; ++} ++ ++void *CIMXRenderingFrames::GetPhyAddr(int idx) ++{ ++ ++ CSingleLock lock(m_renderingFramesLock); ++ if (!m_ready) ++ return NULL; ++ if ((idx < 0) || (idx >= m_bufferNum)) ++ return NULL; ++ ++ return (void *)m_v4lBuffers[idx].m.offset; ++} ++ ++int CIMXRenderingFrames::FindBuffer(void *phyAddr) ++{ ++ int i; ++ ++ CSingleLock lock(m_renderingFramesLock); ++ if (!m_ready) ++ return -1; ++ ++ for (i = 0; i < m_bufferNum; i++) ++ { ++ if (m_v4lBuffers[i].m.offset == (unsigned int)phyAddr) ++ { ++ // CLog::Log(LOGNOTICE, "%s - found buffer OK %d!\n", __FUNCTION__, i); ++ return i; ++ } ++ } ++ return -1; ++} ++ ++int CIMXRenderingFrames::DeQueue(bool wait) ++{ ++ int ret; ++ int status; ++ struct v4l2_buffer buf; ++ ++ CSingleLock lock(m_renderingFramesLock); ++ if (!m_ready) ++ { ++ CLog::Log(LOGNOTICE, "%s - Cannot dequeue frame as buffers were released !\n", ++ __FUNCTION__); ++ return -1; ++ } ++ if (!m_streamOn) ++ { ++ return -1; ++ } ++ ++ if (wait) { ++ status = fcntl(m_v4lfd, F_GETFL); ++ fcntl(m_v4lfd, F_SETFL, status & (~O_NONBLOCK)); ++ } ++ buf.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ buf.memory = V4L2_MEMORY_MMAP; ++ ret = ioctl(m_v4lfd, VIDIOC_DQBUF, &buf); ++ if (wait) ++ fcntl(m_v4lfd, F_SETFL, status | O_NONBLOCK); ++ if (ret != 0) ++ { ++ if (errno != EAGAIN) ++ CLog::Log(LOGERROR, "%s - Dequeue buffer error (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ return -1; ++ } ++ ++#ifdef IMX_PROFILE ++ CLog::Log(LOGDEBUG, "%s - Time render to dequeue (%d) %llu\n", ++ __FUNCTION__, buf.index, get_time() - render_ts[buf.index]); ++#endif ++ return buf.index; ++} ++ ++void CIMXRenderingFrames::Queue(CIMXOutputFrame *picture, struct v4l2_crop &destRect) ++{ ++ /* Warning : called from renderer thread ++ * Especially do not call any VPU functions as they are not thread safe ++ */ ++ ++ int ret, type; ++ struct timeval queue_ts; ++ struct v4l2_format fmt; ++ int stream_trigger; ++ struct v4l2_control ctrl; ++ struct v4l2_rect rect; ++ bool crop_update = false; ++ ++ CSingleLock lock(m_renderingFramesLock); ++ if (!m_ready) ++ { ++ CLog::Log(LOGNOTICE, "%s - Cannot queue frame as buffers were released !\n", ++ __FUNCTION__); ++ return; ++ } ++ ++ /*CLog::Log(LOGDEBUG, "%s - queuing frame %d - picture adress : %p\n", ++ __FUNCTION__, picture->v4l2BufferIdx, picture);*/ ++ ++ if ((picture->v4l2BufferIdx < 0) || (picture->v4l2BufferIdx >= m_bufferNum)) ++ { ++ CLog::Log(LOGERROR, "%s - Invalid buffer index : %d - picture adress : %p\n", ++ __FUNCTION__, picture->v4l2BufferIdx, picture); ++ } ++ else ++ { ++ /* Set field type for each buffer otherwise the mxc_vout driver reverts to progressive */ ++ switch (picture->field) ++ { ++ case VPU_FIELD_TB: ++ m_v4lBuffers[picture->v4l2BufferIdx].field = V4L2_FIELD_INTERLACED_TB; ++ break; ++ case VPU_FIELD_BT: ++ m_v4lBuffers[picture->v4l2BufferIdx].field= V4L2_FIELD_INTERLACED_BT; ++ break; ++ case VPU_FIELD_NONE: ++ default: ++ m_v4lBuffers[picture->v4l2BufferIdx].field = V4L2_FIELD_NONE; ++ break; ++ } ++ ++ /* mxc_vout driver does not display immediatly ++ * if timestamp is set to 0 ++ * (instead this driver expects a 30fps rate) ++ * So we explicitly set current time for immediate display ++ */ ++ gettimeofday (&queue_ts, NULL); ++ m_v4lBuffers[picture->v4l2BufferIdx].timestamp = queue_ts; ++#ifndef NO_V4L_RENDERING ++ ret = ioctl(m_v4lfd, VIDIOC_QBUF, &m_v4lBuffers[picture->v4l2BufferIdx]); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - V4L Queue buffer failed (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ /* If it fails odds are very high picture is invalid so just exit now */ ++ return; ++ } else ++ m_pushedFrames++; ++ ++ /* Force cropping dimensions to be aligned */ ++ destRect.c.top &= 0xFFFFFFF8; ++ destRect.c.left &= 0xFFFFFFF8; ++ destRect.c.width &= 0xFFFFFFF8; ++ destRect.c.height &= 0xFFFFFFF8; ++ if ((m_crop.c.top != destRect.c.top) || ++ (m_crop.c.left != destRect.c.left) || ++ (m_crop.c.width != destRect.c.width) || ++ (m_crop.c.height != destRect.c.height)) ++ { ++ CLog::Log(LOGNOTICE, "%s - Newcrop : %d % d %d %d\n", ++ __FUNCTION__, destRect.c.top, destRect.c.left, destRect.c.width, destRect.c.height); ++ m_crop.c = destRect.c; ++ crop_update = true; ++ } ++ ++ if (!m_streamOn) ++ { ++ if (picture->field != m_currentField) ++ { ++ CLog::Log(LOGNOTICE, "%s - New field is %d\n", ++ __FUNCTION__, picture->field); ++ ++ /* Handle interlace field */ ++ fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ ret = ioctl (m_v4lfd, VIDIOC_G_FMT, &fmt); ++ if (ret < 0) { ++ CLog::Log(LOGERROR, "%s - V4L VIDIOC_G_FMT failed (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ } else { ++ switch (picture->field) ++ { ++ case VPU_FIELD_TOP: ++ case VPU_FIELD_BOTTOM: ++ CLog::Log(LOGERROR, "%s - mxc_out driver does not handle this field type :%d\n", ++ __FUNCTION__, picture->field); ++ fmt.fmt.pix.field = V4L2_FIELD_NONE; ++ break; ++ case VPU_FIELD_TB: ++ fmt.fmt.pix.field = V4L2_FIELD_INTERLACED_TB; ++ break; ++ case VPU_FIELD_BT: ++ fmt.fmt.pix.field = V4L2_FIELD_INTERLACED_BT; ++ break; ++ case VPU_FIELD_NONE: ++ default: ++ fmt.fmt.pix.field = V4L2_FIELD_NONE; ++ break; ++ } ++ ++ /* Take into account cropping from decoded video (for input picture) */ ++ rect.left = picture->picCrop.nLeft; ++ rect.top = picture->picCrop.nTop; ++ rect.width = picture->picCrop.nRight - picture->picCrop.nLeft; ++ rect.height = picture->picCrop.nBottom - picture->picCrop.nTop; ++ fmt.fmt.pix.priv = (unsigned int)▭ ++ ++ fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ ret = ioctl (m_v4lfd, VIDIOC_S_FMT, &fmt); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - V4L VIDIOC_S_FMT failed (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ } ++ else ++ m_currentField = picture->field; ++ } ++ } ++ if (m_currentField == VPU_FIELD_NONE) ++ stream_trigger = 1; ++ else { ++ stream_trigger = 2; /* should be 3 if V4L2_CID_MXC_MOTION < 2 */ ++ ++ /* FIXME : How to select the most appropriate motion type ? */ ++ ctrl.id = V4L2_CID_MXC_MOTION; ++ ctrl.value = 2; /* 2 stands for high motion */ ++ ret = ioctl (m_v4lfd, VIDIOC_S_CTRL, &ctrl); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while setting V4L motion (ret %d : %s).\n", __FUNCTION__, ret, strerror(errno)); ++ } ++ } ++ CLog::Log(LOGDEBUG, "%s - Number of required frames before streaming : %d\n", ++ __FUNCTION__, stream_trigger); ++ ++ if (m_pushedFrames >= stream_trigger) { ++ type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ ret = ioctl(m_v4lfd, VIDIOC_STREAMON, &type); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - V4L Stream ON failed (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ } ++ else ++ { ++ CLog::Log(LOGDEBUG, "%s - V4L Stream ON OK\n", ++ __FUNCTION__); ++ m_streamOn = true; ++ } ++ /* We have to repeat crop command after streamon for some vids ++ * FIXME check why in drivers... ++ */ ++ ret = ioctl(m_v4lfd, VIDIOC_S_CROP, &m_crop); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - S_CROP failed (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ } ++ } ++ } ++ else ++ { ++ if (crop_update) ++ { ++ ret = ioctl(m_v4lfd, VIDIOC_S_CROP, &m_crop); ++ if (ret < 0) ++ { ++ CLog::Log(LOGERROR, "%s - S_CROP failed (ret %d : %s)\n", ++ __FUNCTION__, ret, strerror(errno)); ++ } ++ } ++ } ++#endif ++ ++#ifdef IMX_PROFILE ++ render_ts[picture->v4l2BufferIdx] = get_time(); ++ CLog::Log(LOGDEBUG, "%s - Time push to render (%d) %llu\n", ++ __FUNCTION__, picture->v4l2BufferIdx, render_ts[picture->v4l2BufferIdx] - picture->pushTS); ++#endif ++ ++ delete picture; ++ } ++} ++ ++void CIMXRenderingFrames::ReleaseBuffers() ++{ ++ CSingleLock lock(m_renderingFramesLock); ++ if (!m_ready) ++ { ++ CLog::Log(LOGERROR, "%s - AllocateBuffers was not previously called\n", __FUNCTION__); ++ return; ++ } ++ __ReleaseBuffers(); ++} ++ ++/* Note : Has to be called with m_renderingFramesLock held */ ++void CIMXRenderingFrames::__ReleaseBuffers() ++{ ++ int type, i; ++ ++ if (m_v4lfd >= 0) ++ { ++ /* stream off */ ++ type = V4L2_BUF_TYPE_VIDEO_OUTPUT; ++ ioctl (m_v4lfd, VIDIOC_STREAMOFF, &type); ++ m_streamOn = false; ++ } ++ ++ if (m_virtAddr != NULL) ++ { ++ for (i = 0; i < m_bufferNum; i++) ++ { ++ if (m_virtAddr[i] != NULL) ++ munmap (m_virtAddr[i], m_v4lBuffers[i].length); ++ } ++ delete m_virtAddr; ++ m_virtAddr = NULL; ++ } ++ ++ if (m_v4lfd >= 0) ++ { ++ /* Close V4L2 device */ ++ close(m_v4lfd); ++ m_v4lfd = -1; ++ } ++ ++ if (m_v4lBuffers != NULL) ++ { ++ delete m_v4lBuffers; ++ m_v4lBuffers = NULL; ++ } ++ m_bufferNum = 0; ++ m_ready = false; ++} ++ ++/* FIXME get rid of these defines properly */ ++#define FRAME_ALIGN 16 ++#define MEDIAINFO 1 ++#define _4CC(c1,c2,c3,c4) (((uint32_t)(c4)<<24)|((uint32_t)(c3)<<16)|((uint32_t)(c2)<<8)|(uint32_t)(c1)) ++#define Align(ptr,align) (((unsigned int)ptr + (align) - 1)/(align)*(align)) ++#define min(a, b) (av4l2BufferIdx]); ++ m_outputBuffers[m_outputFrame.imxOutputFrame->v4l2BufferIdx] = NULL; ++ delete m_outputFrame.imxOutputFrame; ++ m_outputFrameReady = false; ++ } ++} ++ ++bool CDVDVideoCodecIMX::VpuAllocBuffers(VpuMemInfo *pMemBlock) ++{ ++ int i, size; ++ unsigned char * ptr; ++ VpuMemDesc vpuMem; ++ VpuDecRetCode ret; ++ ++ for(i=0; inSubBlockNum; i++) ++ { ++ size = pMemBlock->MemSubBlock[i].nAlignment + pMemBlock->MemSubBlock[i].nSize; ++ if (pMemBlock->MemSubBlock[i].MemType == VPU_MEM_VIRT) ++ { // Allocate standard virtual memory ++ ptr = (unsigned char *)malloc(size); ++ if(ptr == NULL) ++ { ++ CLog::Log(LOGERROR, "%s - Unable to malloc %d bytes.\n", __FUNCTION__, size); ++ goto AllocFailure; ++ } ++ pMemBlock->MemSubBlock[i].pVirtAddr = (unsigned char*)Align(ptr, pMemBlock->MemSubBlock[i].nAlignment); ++ ++ m_decMemInfo.virtMem[m_decMemInfo.nVirtNum] = (unsigned int)ptr; ++ m_decMemInfo.nVirtNum++; ++ } ++ else ++ { // Allocate contigous mem for DMA ++ vpuMem.nSize = size; ++ ret = VPU_DecGetMem(&vpuMem); ++ if(ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - Unable alloc %d bytes of physical memory (%d).\n", __FUNCTION__, size, ret); ++ goto AllocFailure; ++ } ++ pMemBlock->MemSubBlock[i].pVirtAddr = (unsigned char*)Align(vpuMem.nVirtAddr, pMemBlock->MemSubBlock[i].nAlignment); ++ pMemBlock->MemSubBlock[i].pPhyAddr = (unsigned char*)Align(vpuMem.nPhyAddr, pMemBlock->MemSubBlock[i].nAlignment); ++ ++ m_decMemInfo.phyMem_phyAddr[m_decMemInfo.nPhyNum] = (unsigned int)vpuMem.nPhyAddr; ++ m_decMemInfo.phyMem_virtAddr[m_decMemInfo.nPhyNum] = (unsigned int)vpuMem.nVirtAddr; ++ m_decMemInfo.phyMem_cpuAddr[m_decMemInfo.nPhyNum] = (unsigned int)vpuMem.nCpuAddr; ++ m_decMemInfo.phyMem_size[m_decMemInfo.nPhyNum] = size; ++ m_decMemInfo.nPhyNum++; ++ } ++ } ++ ++ return true; ++ ++AllocFailure: ++ VpuFreeBuffers(); ++ return false; ++} ++ ++bool CDVDVideoCodecIMX::VpuFreeBuffers(void) ++{ ++ int i; ++ VpuMemDesc vpuMem; ++ VpuDecRetCode vpuRet; ++ bool ret = true; ++ ++ //free virtual mem ++ for(i=0; ipDisplayFrameBuf; ++ CIMXOutputFrame *outputFrame = new CIMXOutputFrame(); ++ CIMXRenderingFrames &renderingFrames = CIMXRenderingFrames::GetInstance(); ++ int i; ++ //outputFrameType outputFrame; ++ double pts; ++ ++ pts = (double)TSManagerSend2(m_tsm, frameBuffer) / (double)1000.0; ++ if (m_dropState) ++ { ++ /* If we are dropping frame then release current frame immediatly */ ++ VPU_DecOutFrameDisplayed(m_vpuHandle, frameBuffer); ++ return false; ++ } ++ ++ /* Find Frame given physical address */ ++ i = renderingFrames.FindBuffer(frameBuffer->pbufY); ++ if (i == -1) ++ { ++ CLog::Log(LOGERROR, "%s - V4L buffer not found\n", __FUNCTION__); ++ return false; ++ } ++ if (m_outputBuffers[i] != NULL) ++ { ++ CLog::Log(LOGERROR, "%s - Try to reuse buffer which was not dequeued !\n", __FUNCTION__); ++ return false; ++ } ++ if (m_outputFrameReady) ++ { ++ CLog::Log(LOGERROR, "%s - Called while GetPicture has not consumed previous frame\n", __FUNCTION__); ++ } ++ ++ /* Store the pointer to be able to invoke VPU_DecOutFrameDisplayed when the buffer will be dequeued */ ++ m_outputBuffers[i] = frameBuffer; ++ //CLog::Log(LOGDEBUG, "%s - set ouputBuffer idx %d : %x\n", __FUNCTION__, i, frameBuffer); ++ ++ outputFrame = new CIMXOutputFrame(); ++ outputFrame->v4l2BufferIdx = i; ++ outputFrame->field = frameInfo->eFieldType; ++ outputFrame->picCrop = frameInfo->pExtInfo->FrmCropRect; ++ outputFrame->nQ16ShiftWidthDivHeightRatio = frameInfo->pExtInfo->nQ16ShiftWidthDivHeightRatio; ++ m_outputFrame.imxOutputFrame = outputFrame; ++ ++ m_outputFrame.pts = pts; ++ m_outputFrame.dts = DVD_NOPTS_VALUE; ++ /* ++ m_outputFrame.iWidth = frameInfo->pExtInfo->nFrmWidth; ++ m_outputFrame.iHeight = frameInfo->pExtInfo->nFrmHeight; ++ */ ++ m_outputFrame.iWidth = frameInfo->pExtInfo->FrmCropRect.nRight - frameInfo->pExtInfo->FrmCropRect.nLeft; ++ m_outputFrame.iHeight = frameInfo->pExtInfo->FrmCropRect.nBottom - frameInfo->pExtInfo->FrmCropRect.nTop; ++ /* FIXME plug aspect ratio correction here frameInfo->nQ16ShiftWidthDivHeightRatio */ ++ m_outputFrame.format = RENDER_FMT_IMX; ++ m_outputFrameReady = true; ++ ++#ifdef IMX_PROFILE ++ m_outputFrame.imxOutputFrame->pushTS = get_time(); ++ CLog::Log(LOGDEBUG, "%s - Time between push %llu\n", ++ __FUNCTION__, m_outputFrame.imxOutputFrame->pushTS - previous_ts); ++ previous_ts =m_outputFrame.imxOutputFrame->pushTS; ++#endif ++ ++ return true; ++ ++} ++ ++int CDVDVideoCodecIMX::GetAvailableBufferNb(void) ++{ ++ int i, nb; ++ ++ nb = 0; ++ for (i = 0; i < m_vpuFrameBufferNum; i++) ++ { ++ if (m_outputBuffers[i] == NULL) ++ nb++; ++ } ++ return nb; ++} ++ ++bool CDVDVideoCodecIMX::VpuDeQueueFrame(bool wait) ++{ ++ int idx; ++ CIMXRenderingFrames &renderingFrames = CIMXRenderingFrames::GetInstance(); ++ ++ idx = renderingFrames.DeQueue(wait); ++ if (idx != -1) ++ { ++ VPU_DecOutFrameDisplayed(m_vpuHandle, m_outputBuffers[idx]); ++ m_outputBuffers[idx] = NULL; ++ return true; ++ } ++ else ++ { ++#ifdef NO_V4L_RENDERING ++ int i; ++ for (i = 0; i < m_vpuFrameBufferNum; i++) ++ { ++ if (m_outputBuffers[i] != NULL) ++ { ++ VPU_DecOutFrameDisplayed(m_vpuHandle, m_outputBuffers[i]); ++ m_outputBuffers[i] = NULL; ++ } ++ } ++#endif ++ return false; ++ } ++} ++ ++CDVDVideoCodecIMX::CDVDVideoCodecIMX() ++{ ++ m_pFormatName = "iMX-xxx"; ++ memset(&m_decMemInfo, 0, sizeof(DecMemInfo)); ++ m_vpuHandle = 0; ++ m_vpuFrameBuffers = NULL; ++ m_outputBuffers = NULL; ++ m_extraMem = NULL; ++ m_vpuFrameBufferNum = 0; ++ m_tsSyncRequired = true; ++ m_dropState = false; ++ m_tsm = NULL; ++ m_convert_bitstream = false; ++} ++ ++CDVDVideoCodecIMX::~CDVDVideoCodecIMX() ++{ ++ Dispose(); ++} ++ ++bool CDVDVideoCodecIMX::Open(CDVDStreamInfo &hints, CDVDCodecOptions &options) ++{ ++ if (hints.software) ++ { ++ CLog::Log(LOGNOTICE, "iMX VPU : software decoding requested.\n"); ++ return false; ++ } ++ ++ m_outputFrameReady = false; ++ m_hints = hints; ++ CLog::Log(LOGDEBUG, "Let's decode with iMX VPU\n"); ++ ++#ifdef MEDIAINFO ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: fpsrate %d / fpsscale %d\n", m_hints.fpsrate, m_hints.fpsscale); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: CodecID %d \n", m_hints.codec); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: StreamType %d \n", m_hints.type); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Level %d \n", m_hints.level); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Profile %d \n", m_hints.profile); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: PTS_invalid %d \n", m_hints.ptsinvalid); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Tag %d \n", m_hints.codec_tag); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: %dx%d \n", m_hints.width, m_hints.height); ++ { uint8_t *pb = (uint8_t*)&m_hints.codec_tag; ++ if (isalnum(pb[0]) && isalnum(pb[1]) && isalnum(pb[2]) && isalnum(pb[3])) ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: Tag fourcc %c%c%c%c\n", pb[0], pb[1], pb[2], pb[3]); ++ } ++ if (m_hints.extrasize) ++ { ++ unsigned int i; ++ char buf[4096]; ++ ++ for (i = 0; i < m_hints.extrasize; i++) ++ sprintf(buf+i*2, "%02x", ((uint8_t*)m_hints.extradata)[i]); ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: extradata %d %s\n", m_hints.extrasize, buf); ++ } ++ CLog::Log(LOGDEBUG, "Decode: MEDIAINFO: %d / %d \n", m_hints.width, m_hints.height); ++ CLog::Log(LOGDEBUG, "Decode: aspect %f - forced aspect %d\n", m_hints.aspect, m_hints.forced_aspect); ++#endif ++ ++ m_convert_bitstream = false; ++ switch(m_hints.codec) ++ { ++ case CODEC_ID_MPEG2VIDEO: ++ case CODEC_ID_MPEG2VIDEO_XVMC: ++ m_decOpenParam.CodecFormat = VPU_V_MPEG2; ++ m_pFormatName = "iMX-mpeg2"; ++ break; ++ case CODEC_ID_H263: ++ m_decOpenParam.CodecFormat = VPU_V_H263; ++ m_pFormatName = "iMX-h263"; ++ break; ++ case CODEC_ID_H264: ++ m_decOpenParam.CodecFormat = VPU_V_AVC; ++ m_pFormatName = "iMX-h264"; ++ if (hints.extrasize >= 7) ++ { ++ if ( *(char*)hints.extradata == 1 ) ++ m_convert_bitstream = bitstream_convert_init(hints.extradata,hints.extrasize); ++ } ++ break; ++ case CODEC_ID_VC1: ++ m_decOpenParam.CodecFormat = VPU_V_VC1_AP; ++ m_pFormatName = "iMX-vc1"; ++ break; ++/* FIXME TODO ++ * => for this type we have to set height, width, nChromaInterleave and nMapType ++ case CODEC_ID_MJPEG: ++ m_decOpenParam.CodecFormat = VPU_V_MJPG; ++ m_pFormatName = "iMX-mjpg"; ++ break;*/ ++ case CODEC_ID_CAVS: ++ case CODEC_ID_AVS: ++ m_decOpenParam.CodecFormat = VPU_V_AVS; ++ m_pFormatName = "iMX-AVS"; ++ break; ++ case CODEC_ID_RV10: ++ case CODEC_ID_RV20: ++ case CODEC_ID_RV30: ++ case CODEC_ID_RV40: ++ m_decOpenParam.CodecFormat = VPU_V_RV; ++ m_pFormatName = "iMX-RV"; ++ break; ++ case CODEC_ID_KMVC: ++ m_decOpenParam.CodecFormat = VPU_V_AVC_MVC; ++ m_pFormatName = "iMX-MVC"; ++ break; ++ case CODEC_ID_VP8: ++ m_decOpenParam.CodecFormat = VPU_V_VP8; ++ m_pFormatName = "iMX-vp8"; ++ break; ++ case CODEC_ID_MSMPEG4V3: ++ m_decOpenParam.CodecFormat = VPU_V_XVID; /* VPU_V_DIVX3 */ ++ m_pFormatName = "iMX-divx3"; ++ break; ++ case CODEC_ID_MPEG4: ++ switch(m_hints.codec_tag) ++ { ++ case _4CC('D','I','V','X'): ++ m_decOpenParam.CodecFormat = VPU_V_XVID; /* VPU_V_DIVX4 */ ++ m_pFormatName = "iMX-divx4"; ++ break; ++ case _4CC('D','X','5','0'): ++ case _4CC('D','I','V','5'): ++ m_decOpenParam.CodecFormat = VPU_V_XVID; /* VPU_V_DIVX56 */ ++ m_pFormatName = "iMX-divx5"; ++ break; ++ case _4CC('X','V','I','D'): ++ case _4CC('M','P','4','V'): ++ case _4CC('P','M','P','4'): ++ case _4CC('F','M','P','4'): ++ m_decOpenParam.CodecFormat = VPU_V_XVID; ++ m_pFormatName = "iMX-xvid"; ++ break; ++ default: ++ CLog::Log(LOGERROR, "iMX VPU : MPEG4 codec tag %d is not (yet) handled.\n", m_hints.codec_tag); ++ return false; ++ } ++ break; ++ default: ++ CLog::Log(LOGERROR, "iMX VPU : codecid %d is not (yet) handled.\n", m_hints.codec); ++ return false; ++ } ++ ++ m_tsm = createTSManager(0); ++ setTSManagerFrameRate(m_tsm, m_hints.fpsrate, m_hints.fpsscale); ++ return true; ++} ++ ++void CDVDVideoCodecIMX::Dispose(void) ++{ ++ VpuDecRetCode ret; ++ int i; ++ bool VPU_loaded = m_vpuHandle; ++ CIMXRenderingFrames &renderingFrames = CIMXRenderingFrames::GetInstance(); ++ ++ FlushOutputFrame(); ++ if (m_vpuHandle) ++ { ++ ret = VPU_DecFlushAll(m_vpuHandle); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU flush failed with error code %d.\n", __FUNCTION__, ret); ++ } ++ ret = VPU_DecClose(m_vpuHandle); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU close failed with error code %d.\n", __FUNCTION__, ret); ++ } ++ m_vpuHandle = 0; ++ } ++ ++ VpuFreeBuffers(); ++ ++ if (m_outputBuffers != NULL) ++ { ++ while (VpuDeQueueFrame(false)); ++ renderingFrames.ReleaseBuffers(); ++ RestoreFB(); ++ delete m_outputBuffers; ++ m_outputBuffers = NULL; ++ } ++ ++ /* Free extramem */ ++ if (m_extraMem != NULL) ++ { ++ for (i = 0; i < m_vpuFrameBufferNum; i++) ++ { ++ if (m_extraMem[i].nSize > 0) ++ { ++ ret = VPU_DecFreeMem(&m_extraMem[i]); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - Release extra mem failed with error code %d.\n", __FUNCTION__, ret); ++ } ++ m_extraMem[i].nSize = 0; ++ } ++ } ++ delete m_extraMem; ++ m_extraMem = NULL; ++ } ++ m_vpuFrameBufferNum = 0; ++ ++ if (m_vpuFrameBuffers != NULL) ++ { ++ delete m_vpuFrameBuffers; ++ m_vpuFrameBuffers = NULL; ++ } ++ ++ if (VPU_loaded) ++ { ++ ret = VPU_DecUnLoad(); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU unload failed with error code %d.\n", __FUNCTION__, ret); ++ } ++ } ++ ++ if (m_tsm != NULL) ++ { ++ destroyTSManager(m_tsm); ++ m_tsm = NULL; ++ } ++ ++ if (m_convert_bitstream) ++ { ++ if (m_sps_pps_context.sps_pps_data) ++ { ++ free(m_sps_pps_context.sps_pps_data); ++ m_sps_pps_context.sps_pps_data = NULL; ++ } ++ } ++ return; ++} ++ ++int CDVDVideoCodecIMX::Decode(BYTE *pData, int iSize, double dts, double pts) ++{ ++ VpuDecFrameLengthInfo frameLengthInfo; ++ VpuBufferNode inData; ++ VpuDecRetCode ret; ++ VpuDecOutFrameInfo frameInfo; ++ int decRet = 0; ++ int retSatus = 0; ++ int demuxer_bytes = iSize; ++ uint8_t *demuxer_content = pData; ++ bool bitstream_convered = false; ++ bool retry = false; ++ ++#ifdef IMX_PROFILE ++ static unsigned long long previous, current; ++#endif ++ ++ if (!m_vpuHandle) ++ { ++ VpuOpen(); ++ if (!m_vpuHandle) ++ return VC_ERROR; ++ } ++ ++#ifdef IMX_PROFILE ++ current = get_time(); ++ CLog::Log(LOGDEBUG, "%s - delta time decode : %llu - demux size : %d dts : %f - pts : %f\n", __FUNCTION__, current - previous, iSize, dts, pts); ++ previous = current; ++#endif ++/* FIXME tests ++ CLog::Log(LOGDEBUG, "%s - demux size : %d dts : %f - pts : %f - %x %x %x %x\n", __FUNCTION__, iSize, dts, pts, ((unsigned int *)pData)[0], ((unsigned int *)pData)[1], ((unsigned int *)pData)[2], ((unsigned int *)pData)[3]); ++ ((unsigned int *)pData)[0] = htonl(iSize-4); ++*/ ++ ++ while (VpuDeQueueFrame(false)); ++ ++ if (pData && iSize) ++ { ++ if (m_convert_bitstream) ++ { ++ // convert demuxer packet from bitstream to bytestream (AnnexB) ++ int bytestream_size = 0; ++ uint8_t *bytestream_buff = NULL; ++ ++ if (!bitstream_convert(demuxer_content, demuxer_bytes, &bytestream_buff, &bytestream_size)) ++ { ++ CLog::Log(LOGERROR, "%s - bitstream convert error...\n", __FUNCTION__); ++ return VC_ERROR; ++ } ++ ++ if (bytestream_buff && (bytestream_size > 0)) ++ { ++ bitstream_convered = true; ++ demuxer_bytes = bytestream_size; ++ demuxer_content = bytestream_buff; ++ } ++ } ++ ++ if (pts != DVD_NOPTS_VALUE) ++ { ++ if (m_tsSyncRequired) ++ { ++ m_tsSyncRequired = false; ++ resyncTSManager(m_tsm, llrint(pts) * 1000, MODE_AI); ++ } ++ TSManagerReceive2(m_tsm, llrint(pts) * 1000, iSize); ++ } ++ else ++ { ++ //If no pts but dts available (AVI container for instance) then use this one ++ if (dts != DVD_NOPTS_VALUE) ++ { ++ if (m_tsSyncRequired) ++ { ++ m_tsSyncRequired = false; ++ resyncTSManager(m_tsm, llrint(dts) * 1000, MODE_AI); ++ } ++ TSManagerReceive2(m_tsm, llrint(dts) * 1000, iSize); ++ } ++ } ++ ++ //CLog::Log(LOGDEBUG, "%s - Query2 : %lld\n", __FUNCTION__, TSManagerQuery2(m_tsm, NULL)); ++ TSManagerQuery2(m_tsm, NULL); ++ inData.nSize = demuxer_bytes; ++ inData.pPhyAddr = NULL; ++ inData.pVirAddr = demuxer_content; ++ /* FIXME TODO VP8 & DivX3 require specific sCodecData values */ ++ if ((m_decOpenParam.CodecFormat == VPU_V_MPEG2) || ++ (m_decOpenParam.CodecFormat == VPU_V_VC1_AP)|| ++ (m_decOpenParam.CodecFormat == VPU_V_XVID)) ++ { ++ inData.sCodecData.pData = (unsigned char *)m_hints.extradata; ++ inData.sCodecData.nSize = m_hints.extrasize; ++ } ++ else ++ { ++ inData.sCodecData.pData = NULL; ++ inData.sCodecData.nSize = 0; ++ } ++ ++ do // Decode as long as the VPU consumes data ++ { ++ retry = false; ++ ret = VPU_DecDecodeBuf(m_vpuHandle, &inData, &decRet); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU decode failed with error code %d.\n", __FUNCTION__, ret); ++ goto out_error; ++ } ++ ++ if (decRet & VPU_DEC_INIT_OK) ++ /* VPU decoding init OK : We can retrieve stream info */ ++ { ++ ret = VPU_DecGetInitialInfo(m_vpuHandle, &m_initInfo); ++ if (ret == VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGDEBUG, "%s - VPU Init Stream Info : %dx%d (interlaced : %d - Minframe : %d)"\ ++ " - Align : %d bytes - crop : %d %d %d %d - Q16Ratio : %x\n", __FUNCTION__, ++ m_initInfo.nPicWidth, m_initInfo.nPicHeight, m_initInfo.nInterlace, m_initInfo.nMinFrameBufferCount, ++ m_initInfo.nAddressAlignment, m_initInfo.PicCropRect.nLeft, m_initInfo.PicCropRect.nTop, ++ m_initInfo.PicCropRect.nRight, m_initInfo.PicCropRect.nBottom, m_initInfo.nQ16ShiftWidthDivHeightRatio); ++ if (VpuAllocFrameBuffers()) ++ { ++ ret = VPU_DecRegisterFrameBuffer(m_vpuHandle, m_vpuFrameBuffers, m_vpuFrameBufferNum); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU error while registering frame buffers (%d).\n", __FUNCTION__, ret); ++ goto out_error; ++ } ++ } ++ else ++ { ++ goto out_error; ++ } ++ } ++ else ++ { ++ CLog::Log(LOGERROR, "%s - VPU get initial info failed (%d).\n", __FUNCTION__, ret); ++ goto out_error; ++ } ++ }//VPU_DEC_INIT_OK ++ ++ if (decRet & VPU_DEC_ONE_FRM_CONSUMED) ++ { ++ ret = VPU_DecGetConsumedFrameInfo(m_vpuHandle, &frameLengthInfo); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU error retireving info about consummed frame (%d).\n", __FUNCTION__, ret); ++ } ++ TSManagerValid2(m_tsm, frameLengthInfo.nFrameLength + frameLengthInfo.nStuffLength, frameLengthInfo.pFrame); ++ //CLog::Log(LOGDEBUG, "%s - size : %d - key consummed : %x\n", __FUNCTION__, frameLengthInfo.nFrameLength + frameLengthInfo.nStuffLength, frameLengthInfo.pFrame); ++ }//VPU_DEC_ONE_FRM_CONSUMED ++ ++ if ((decRet & VPU_DEC_OUTPUT_DIS) || ++ (decRet & VPU_DEC_OUTPUT_MOSAIC_DIS)) ++ /* Frame ready to be displayed */ ++ { ++ if (retSatus & VC_PICTURE) ++ CLog::Log(LOGERROR, "%s - Second picture in the same decode call !\n", __FUNCTION__); ++ ++ ret = VPU_DecGetOutputFrame(m_vpuHandle, &frameInfo); ++ if(ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU Cannot get output frame(%d).\n", __FUNCTION__, ret); ++ goto out_error; ++ } ++ if (VpuPushFrame(&frameInfo)) ++ { ++ retSatus |= VC_PICTURE; ++ } ++ } //VPU_DEC_OUTPUT_DIS ++ ++ if (decRet & VPU_DEC_OUTPUT_REPEAT) ++ { ++ TSManagerSend(m_tsm); ++ CLog::Log(LOGDEBUG, "%s - Frame repeat.\n", __FUNCTION__); ++ } ++ if (decRet & VPU_DEC_OUTPUT_DROPPED) ++ { ++ TSManagerSend(m_tsm); ++ CLog::Log(LOGDEBUG, "%s - Frame dropped.\n", __FUNCTION__); ++ } ++ if (decRet & VPU_DEC_NO_ENOUGH_BUF) ++ { ++ CLog::Log(LOGERROR, "%s - No frame buffer available.\n", __FUNCTION__); ++ } ++ if (decRet & VPU_DEC_SKIP) ++ { ++ TSManagerSend(m_tsm); ++ CLog::Log(LOGDEBUG, "%s - Frame skipped.\n", __FUNCTION__); ++ } ++ if (decRet & VPU_DEC_FLUSH) ++ { ++ CLog::Log(LOGNOTICE, "%s - VPU requires a flush.\n", __FUNCTION__); ++ ret = VPU_DecFlushAll(m_vpuHandle); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU flush failed(%d).\n", __FUNCTION__, ret); ++ } ++ retSatus = VC_FLUSHED; ++ } ++ if (decRet & VPU_DEC_OUTPUT_EOS) ++ { ++ CLog::Log(LOGNOTICE, "%s - EOS encountered.\n", __FUNCTION__); ++ } ++ if (decRet & VPU_DEC_NO_ENOUGH_INBUF) ++ { ++ // We are done with VPU decoder that time ++ break; ++ } ++ if (!(decRet & VPU_DEC_INPUT_USED)) ++ { ++ CLog::Log(LOGERROR, "%s - input not used : addr %p size :%d!\n", __FUNCTION__, inData.pVirAddr, inData.nSize); ++ TSManagerSend(m_tsm); ++ } ++ ++ ++ if (!(decRet & VPU_DEC_OUTPUT_DIS) && ++ (inData.nSize != 0)) ++ { ++ /* Let's process again as VPU_DEC_NO_ENOUGH_INBUF was not set ++ * and we don't have an image ready if we reach that point ++ */ ++ inData.pVirAddr = NULL; ++ inData.nSize = 0; ++ retry = true; ++ } ++ ++ } while (retry == true); ++ } //(pData && iSize) ++ ++ ++ if (GetAvailableBufferNb() > (m_vpuFrameBufferNum - m_extraVpuBuffers)) ++ retSatus |= VC_BUFFER; ++ else ++ if (retSatus == 0) { ++ /* No Picture ready and Not enough VPU buffers. ++ * Lets wait for the IPU to free a buffer ++ * Anyway we have several decoded frames ready... */ ++ usleep(5000); ++ } ++ ++ ++#ifdef IMX_PROFILE ++ CLog::Log(LOGDEBUG, "%s - returns %x - duration %lld\n", __FUNCTION__, retSatus, get_time() - previous); ++#endif ++ ++ if (bitstream_convered) ++ free(demuxer_content); ++ ++ return retSatus; ++ ++out_error: ++ if (bitstream_convered) ++ free(demuxer_content); ++ return VC_ERROR; ++} ++ ++void CDVDVideoCodecIMX::Reset() ++{ ++ int ret; ++ ++ CLog::Log(LOGDEBUG, "%s - called\n", __FUNCTION__); ++ ++ /* We have to resync timestamp manager */ ++ m_tsSyncRequired = true; ++ ++ /* Flush the output frame */ ++ FlushOutputFrame(); ++ ++ /* Flush VPU */ ++ ret = VPU_DecFlushAll(m_vpuHandle); ++ if (ret != VPU_DEC_RET_SUCCESS) ++ { ++ CLog::Log(LOGERROR, "%s - VPU flush failed with error code %d.\n", __FUNCTION__, ret); ++ } ++ ++} ++ ++unsigned CDVDVideoCodecIMX::GetAllowedReferences() ++{ ++ // Note : It is useless if CLinuxRendererGLES::GetProcessorSize returns 0 for RENDER_FMT_IMX ++ return min(3, m_extraVpuBuffers / 2); ++} ++ ++static double GetPlayerPtsSeconds() ++{ ++ double clock_pts = 0.0; ++ CDVDClock *playerclock = CDVDClock::GetMasterClock(); ++ if (playerclock) ++ clock_pts = playerclock->GetClock() / DVD_TIME_BASE; ++ ++ return clock_pts; ++} ++ ++bool CDVDVideoCodecIMX::GetPicture(DVDVideoPicture* pDvdVideoPicture) ++{ ++ double currentPlayerPts; ++ double ts = DVD_NOPTS_VALUE; ++ ++ if (!m_outputFrameReady) ++ { ++ CLog::Log(LOGERROR, "%s called while no picture ready\n", __FUNCTION__); ++ return false; ++ } ++ ++ pDvdVideoPicture->iFlags &= DVP_FLAG_DROPPED; ++ if ((pDvdVideoPicture->iFlags != 0) || (m_dropState)) ++ { ++ CLog::Log(LOGERROR, "%s - Flushing video picture\n", __FUNCTION__); ++ pDvdVideoPicture->iFlags = DVP_FLAG_DROPPED; ++ FlushOutputFrame(); ++ } ++ else ++ { ++ ts = m_outputFrame.pts; ++ currentPlayerPts = GetPlayerPtsSeconds() * (double)DVD_TIME_BASE; ++ if (currentPlayerPts > ts) ++ { ++ CLog::Log(LOGERROR, "%s - player is ahead of time (%f)\n", __FUNCTION__, currentPlayerPts - ts); ++ } ++ //CLog::Log(LOGINFO, "%s - idx : %d - delta call %f - delta ts %f \n", __FUNCTION__, outputFrame.v4l2_buffer->index,ts - previous, ts - currentPlayerPts); ++ } ++ ++#ifdef NO_V4L_RENDERING ++ VPU_DecOutFrameDisplayed(m_vpuHandle, m_outputBuffers[m_outputFrame.imxOutputFrame->v4l2BufferIdx]); ++ m_outputBuffers[m_outputFrame.imxOutputFrame->v4l2BufferIdx] = NULL; ++#endif ++ ++ pDvdVideoPicture->pts = m_outputFrame.pts; ++ pDvdVideoPicture->dts = m_outputFrame.dts; ++ pDvdVideoPicture->iWidth = m_outputFrame.iWidth; ++ pDvdVideoPicture->iHeight = m_outputFrame.iHeight; ++ pDvdVideoPicture->iDisplayWidth = ((pDvdVideoPicture->iWidth * m_outputFrame.imxOutputFrame->nQ16ShiftWidthDivHeightRatio) + 32767) >> 16; ++ pDvdVideoPicture->iDisplayHeight = pDvdVideoPicture->iHeight; ++ pDvdVideoPicture->format = m_outputFrame.format; ++ pDvdVideoPicture->imxOutputFrame = m_outputFrame.imxOutputFrame; ++ m_outputFrameReady = false; ++ return true; ++} ++ ++void CDVDVideoCodecIMX::SetDropState(bool bDrop) ++{ ++ /* We are fast enough to continue to really decode every frames ++ * and avoid artefacts... ++ * (Of course these frames won't be rendered but only decoded !) ++ */ ++ if (m_dropState != bDrop) ++ { ++ CLog::Log(LOGNOTICE, "%s : %d.\n", __FUNCTION__, bDrop); ++ m_dropState = bDrop; ++ } ++} ++ ++/* bitstream convert : Shameless copy from openmax */ ++/* TODO : Have a look at it as the malloc/copy/free strategy is obviously not the most efficient one */ ++ ++bool CDVDVideoCodecIMX::bitstream_convert_init(void *in_extradata, int in_extrasize) ++{ ++ // based on h264_mp4toannexb_bsf.c (ffmpeg) ++ // which is Copyright (c) 2007 Benoit Fouet ++ // and Licensed GPL 2.1 or greater ++ ++ m_sps_pps_size = 0; ++ m_sps_pps_context.sps_pps_data = NULL; ++ ++ // nothing to filter ++ if (!in_extradata || in_extrasize < 6) ++ return false; ++ ++ uint16_t unit_size; ++ uint32_t total_size = 0; ++ uint8_t *out = NULL, unit_nb, sps_done = 0; ++ const uint8_t *extradata = (uint8_t*)in_extradata + 4; ++ static const uint8_t nalu_header[4] = {0, 0, 0, 1}; ++ ++ // retrieve length coded size ++ m_sps_pps_context.length_size = (*extradata++ & 0x3) + 1; ++ if (m_sps_pps_context.length_size == 3) ++ return false; ++ ++ // retrieve sps and pps unit(s) ++ unit_nb = *extradata++ & 0x1f; // number of sps unit(s) ++ if (!unit_nb) ++ { ++ unit_nb = *extradata++; // number of pps unit(s) ++ sps_done++; ++ } ++ while (unit_nb--) ++ { ++ unit_size = extradata[0] << 8 | extradata[1]; ++ total_size += unit_size + 4; ++ if ( (extradata + 2 + unit_size) > ((uint8_t*)in_extradata + in_extrasize) ) ++ { ++ free(out); ++ return false; ++ } ++ uint8_t* new_out = (uint8_t*)realloc(out, total_size); ++ if (new_out) ++ { ++ out = new_out; ++ } ++ else ++ { ++ CLog::Log(LOGERROR, "bitstream_convert_init failed - %s : could not realloc the buffer out", __FUNCTION__); ++ free(out); ++ return false; ++ } ++ ++ memcpy(out + total_size - unit_size - 4, nalu_header, 4); ++ memcpy(out + total_size - unit_size, extradata + 2, unit_size); ++ extradata += 2 + unit_size; ++ ++ if (!unit_nb && !sps_done++) ++ unit_nb = *extradata++; // number of pps unit(s) ++ } ++ ++ m_sps_pps_context.sps_pps_data = out; ++ m_sps_pps_context.size = total_size; ++ m_sps_pps_context.first_idr = 1; ++ ++ return true; ++} ++ ++bool CDVDVideoCodecIMX::bitstream_convert(BYTE* pData, int iSize, uint8_t **poutbuf, int *poutbuf_size) ++{ ++ // based on h264_mp4toannexb_bsf.c (ffmpeg) ++ // which is Copyright (c) 2007 Benoit Fouet ++ // and Licensed GPL 2.1 or greater ++ ++ uint8_t *buf = pData; ++ uint32_t buf_size = iSize; ++ uint8_t unit_type; ++ int32_t nal_size; ++ uint32_t cumul_size = 0; ++ const uint8_t *buf_end = buf + buf_size; ++ ++ do ++ { ++ if (buf + m_sps_pps_context.length_size > buf_end) ++ goto fail; ++ ++ if (m_sps_pps_context.length_size == 1) ++ nal_size = buf[0]; ++ else if (m_sps_pps_context.length_size == 2) ++ nal_size = buf[0] << 8 | buf[1]; ++ else ++ nal_size = buf[0] << 24 | buf[1] << 16 | buf[2] << 8 | buf[3]; ++ ++ // FIXME CLog::Log(LOGERROR, "%s - nal_size : %d \n", __FUNCTION__, nal_size); ++ buf += m_sps_pps_context.length_size; ++ unit_type = *buf & 0x1f; ++ ++ if (buf + nal_size > buf_end || nal_size < 0) ++ goto fail; ++ ++ // prepend only to the first type 5 NAL unit of an IDR picture ++ if (m_sps_pps_context.first_idr && unit_type == 5) ++ { ++ bitstream_alloc_and_copy(poutbuf, poutbuf_size, ++ m_sps_pps_context.sps_pps_data, m_sps_pps_context.size, buf, nal_size); ++ m_sps_pps_context.first_idr = 0; ++ } ++ else ++ { ++ bitstream_alloc_and_copy(poutbuf, poutbuf_size, NULL, 0, buf, nal_size); ++ if (!m_sps_pps_context.first_idr && unit_type == 1) ++ m_sps_pps_context.first_idr = 1; ++ } ++ ++ buf += nal_size; ++ cumul_size += nal_size + m_sps_pps_context.length_size; ++ } while (cumul_size < buf_size); ++ ++ return true; ++ ++fail: ++ free(*poutbuf); ++ *poutbuf = NULL; ++ *poutbuf_size = 0; ++ return false; ++} ++ ++void CDVDVideoCodecIMX::bitstream_alloc_and_copy( ++ uint8_t **poutbuf, int *poutbuf_size, ++ const uint8_t *sps_pps, uint32_t sps_pps_size, ++ const uint8_t *in, uint32_t in_size) ++{ ++ // based on h264_mp4toannexb_bsf.c (ffmpeg) ++ // which is Copyright (c) 2007 Benoit Fouet ++ // and Licensed GPL 2.1 or greater ++ ++ #define CHD_WB32(p, d) { \ ++ ((uint8_t*)(p))[3] = (d); \ ++ ((uint8_t*)(p))[2] = (d) >> 8; \ ++ ((uint8_t*)(p))[1] = (d) >> 16; \ ++ ((uint8_t*)(p))[0] = (d) >> 24; } ++ ++ uint32_t offset = *poutbuf_size; ++ uint8_t nal_header_size = offset ? 3 : 4; ++ ++ *poutbuf_size += sps_pps_size + in_size + nal_header_size; ++ *poutbuf = (uint8_t*)realloc(*poutbuf, *poutbuf_size); ++ if (sps_pps) ++ memcpy(*poutbuf + offset, sps_pps, sps_pps_size); ++ ++ memcpy(*poutbuf + sps_pps_size + nal_header_size + offset, in, in_size); ++ if (!offset) ++ { ++ CHD_WB32(*poutbuf + sps_pps_size, 1); ++ } ++ else ++ { ++ (*poutbuf + offset + sps_pps_size)[0] = 0; ++ (*poutbuf + offset + sps_pps_size)[1] = 0; ++ (*poutbuf + offset + sps_pps_size)[2] = 1; ++ } ++} +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecIMX.h 2014-01-12 04:37:25.000000000 +0100 +@@ -0,0 +1,162 @@ ++#pragma once ++/* ++ * Copyright (C) 2010-2013 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++#include ++#include ++#include ++#include "DVDVideoCodec.h" ++#include "DVDStreamInfo.h" ++#include "threads/CriticalSection.h" ++ ++ ++//#define IMX_PROFILE ++ ++/* FIXME TODO Develop real proper CVPUBuffer class */ ++#define VPU_DEC_MAX_NUM_MEM_NUM 20 ++typedef struct ++{ ++ //virtual mem info ++ int nVirtNum; ++ unsigned int virtMem[VPU_DEC_MAX_NUM_MEM_NUM]; ++ ++ //phy mem info ++ int nPhyNum; ++ unsigned int phyMem_virtAddr[VPU_DEC_MAX_NUM_MEM_NUM]; ++ unsigned int phyMem_phyAddr[VPU_DEC_MAX_NUM_MEM_NUM]; ++ unsigned int phyMem_cpuAddr[VPU_DEC_MAX_NUM_MEM_NUM]; ++ unsigned int phyMem_size[VPU_DEC_MAX_NUM_MEM_NUM]; ++} DecMemInfo; ++ ++/* Output frame properties */ ++struct CIMXOutputFrame { ++ int v4l2BufferIdx; ++ VpuFieldType field; ++ VpuRect picCrop; ++ unsigned int nQ16ShiftWidthDivHeightRatio; ++#ifdef IMX_PROFILE ++ unsigned long long pushTS; ++#endif ++}; ++ ++class CIMXRenderingFrames ++{ ++public: ++ static CIMXRenderingFrames& GetInstance(); ++ bool AllocateBuffers(const struct v4l2_format *, int); ++ void *GetVirtAddr(int idx); ++ void *GetPhyAddr(int idx); ++ void ReleaseBuffers(); ++ int FindBuffer(void *); ++ int DeQueue(bool wait); ++ void Queue(CIMXOutputFrame *, struct v4l2_crop &); ++ ++private: ++ CIMXRenderingFrames(); ++ void __ReleaseBuffers(); ++ ++ static const char *m_v4lDeviceName; // V4L2 device Name ++ static CIMXRenderingFrames* m_instance; // Unique instance of the class ++ ++ CCriticalSection m_renderingFramesLock; // Lock to ensure multithreading safety for class fields ++ bool m_ready; // Buffers are allocated and frames can be Queued/Dequeue ++ int m_v4lfd; // fd on V4L2 device ++ struct v4l2_buffer *m_v4lBuffers; // Table of V4L buffer info (as returned by VIDIOC_QUERYBUF) ++ int m_bufferNum; // Number of allocated V4L2 buffers ++ struct v4l2_crop m_crop; // Current cropping properties ++ bool m_streamOn; // Flag that indicates whether streaming in on (from V4L point of view) ++ VpuFieldType m_currentField; // Current field type ++ int m_pushedFrames; // Number of frames queued in V4L2 ++ void **m_virtAddr; // Table holding virtual adresses of mmaped V4L2 buffers ++}; ++ ++class CDVDVideoCodecIMX : public CDVDVideoCodec ++{ ++public: ++ CDVDVideoCodecIMX(); ++ virtual ~CDVDVideoCodecIMX(); ++ ++ // Methods from CDVDVideoCodec which require overrides ++ virtual bool Open(CDVDStreamInfo &hints, CDVDCodecOptions &options); ++ virtual void Dispose(void); ++ virtual int Decode(BYTE *pData, int iSize, double dts, double pts); ++ virtual void Reset(void); ++ virtual bool GetPicture(DVDVideoPicture *pDvdVideoPicture); ++ virtual void SetDropState(bool bDrop); ++ virtual const char* GetName(void) { return (const char*)m_pFormatName; } ++ virtual unsigned GetAllowedReferences(); ++ ++protected: ++ ++ bool VpuOpen(void); ++ bool VpuAllocBuffers(VpuMemInfo *); ++ bool VpuFreeBuffers(void); ++ bool VpuAllocFrameBuffers(void); ++ bool VpuPushFrame(VpuDecOutFrameInfo*); ++ bool VpuDeQueueFrame(bool); ++ int GetAvailableBufferNb(void); ++ void InitFB(void); ++ void RestoreFB(void); ++ void FlushOutputFrame(void); ++ ++ static const int m_extraVpuBuffers; // Number of additional buffers for VPU ++ ++ CDVDStreamInfo m_hints; // Hints from demuxer at stream opening ++ const char *m_pFormatName; // Current decoder format name ++ VpuDecOpenParam m_decOpenParam; // Parameters required to call VPU_DecOpen ++ DecMemInfo m_decMemInfo; // VPU dedicated memory description ++ VpuDecHandle m_vpuHandle; // Handle for VPU library calls ++ VpuDecInitInfo m_initInfo; // Initial info returned from VPU at decoding start ++ void *m_tsm; // fsl Timestamp manager (from gstreamer implementation) ++ bool m_tsSyncRequired; // state whether timestamp manager has to be sync'ed ++ bool m_dropState; // Current drop state ++ int m_vpuFrameBufferNum; // Total number of allocated frame buffers ++ VpuFrameBuffer *m_vpuFrameBuffers; // Table of VPU frame buffers description ++ VpuMemDesc *m_extraMem; // Table of allocated extra Memory ++ VpuFrameBuffer **m_outputBuffers; // Table of buffer pointers from VPU (index is V4L buf index) (used to call properly VPU_DecOutFrameDisplayed) ++ DVDVideoPicture m_outputFrame; // Decoded frame ready to be retrieved by GetPicture ++ bool m_outputFrameReady; // State whether m_outputFrame is available or not ++ ++ ++ /* FIXME : Rework is still required for fields below this line */ ++ ++ /* create a real class and share with openmax ? */ ++ // bitstream to bytestream (Annex B) conversion support. ++ bool bitstream_convert_init(void *in_extradata, int in_extrasize); ++ bool bitstream_convert(BYTE* pData, int iSize, uint8_t **poutbuf, int *poutbuf_size); ++ static void bitstream_alloc_and_copy( uint8_t **poutbuf, int *poutbuf_size, ++ const uint8_t *sps_pps, uint32_t sps_pps_size, const uint8_t *in, uint32_t in_size); ++ typedef struct omx_bitstream_ctx { ++ uint8_t length_size; ++ uint8_t first_idr; ++ uint8_t *sps_pps_data; ++ uint32_t size; ++ omx_bitstream_ctx() ++ { ++ length_size = 0; ++ first_idr = 0; ++ sps_pps_data = NULL; ++ size = 0; ++ } ++ } omx_bitstream_ctx; ++ uint32_t m_sps_pps_size; ++ omx_bitstream_ctx m_sps_pps_context; ++ bool m_convert_bitstream; ++ ++}; +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/Makefile.in 2014-01-12 04:37:25.000000000 +0100 +@@ -23,6 +23,22 @@ + SRCS += OpenMaxVideo.cpp + SRCS += DVDVideoCodecOpenMax.cpp + endif ++ifeq (@USE_IMXVPU@,1) ++SRCS += DVDVideoCodecIMX.cpp mfw_gst_ts.c ++endif ++ ++ifeq (@USE_LIBSTAGEFRIGHT@,1) ++SRCS += StageFrightVideo.cpp ++SRCS += StageFrightVideoPrivate.cpp ++SRCS += DVDVideoCodecStageFright.cpp ++INCLUDES += -I${prefix}/opt/android-source/frameworks/base/include ++INCLUDES += -I${prefix}/opt/android-source/frameworks/base/native/include ++INCLUDES += -I${prefix}/opt/android-source/frameworks/base/include/media/stagefright ++INCLUDES += -I${prefix}/opt/android-source/frameworks/base/include/media/stagefright/openmax ++INCLUDES += -I${prefix}/opt/android-source/system/core/include ++INCLUDES += -I${prefix}/opt/android-source/libhardware/include ++endif ++ + ifeq (@USE_LIBAMCODEC@,1) + SRCS += AMLCodec.cpp + SRCS += DVDVideoCodecAmlogic.cpp +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.c xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.c +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.c 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.c 2014-01-12 04:37:25.000000000 +0100 +@@ -0,0 +1,752 @@ ++/* ++ * Copyright (c) 2010-2012, Freescale Semiconductor, Inc. All rights reserved. ++ * ++ */ ++ ++/* ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library 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 ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++/* ++ * Module Name: TimeStamp.c ++ * ++ * Description: include TimeStamp stratege for VPU / SW video decoder plugin ++ * ++ * Portability: This code is written for Linux OS and Gstreamer ++ */ ++ ++/* ++ * Changelog: ++ 11/2/2010 draft version Lyon Wang ++ * ++ */ ++#include ++#include ++#include ++ ++#include "mfw_gst_ts.h" ++ ++ ++const char *debug_env = "ME_DEBUG"; ++char *debug = NULL; ++int debug_level = 0; ++ ++ ++enum ++{ ++ DEBUG_LEVEL_ERROR = 1, ++ DEBUG_LEVEL_WARNING, ++ DEBUG_LEVEL_LOG, ++ DEBUG_LEVEL_VERBOSE, ++}; ++ ++ ++#define TSM_MESSAGE(level, fmt, ...)\ ++ do{\ ++ if (debug_level>=(level)){\ ++ printf("TSM:"fmt, ##__VA_ARGS__);\ ++ }\ ++ }while(0) ++ ++#define TSM_ERROR(...) TSM_MESSAGE(DEBUG_LEVEL_ERROR, ##__VA_ARGS__) ++#define TSM_WARNING(...) TSM_MESSAGE(DEBUG_LEVEL_WARNING, ##__VA_ARGS__) ++#define TSM_LOG(...) TSM_MESSAGE(DEBUG_LEVEL_LOG, ##__VA_ARGS__) ++#define TSM_VERBOSE(...) TSM_MESSAGE(DEBUG_LEVEL_VERBOSE, ##__VA_ARGS__) ++ ++#define TSM_HISTORY_POWER 5 ++#define TSM_HISTORY_SIZE (1<dur_history_total>>TSM_HISTORY_POWER) ++ ++#define TSM_SECOND ((TSM_TIMESTAMP)1000000000) ++#define TSM_DEFAULT_INTERVAL (TSM_SECOND/30) ++#define TSM_DEFAULT_TS_BUFFER_SIZE (128) ++ ++#define TSM_TS_IS_VALID(ts) \ ++ ((ts) != TSM_TIMESTAMP_NONE) ++ ++#define TSM_KEY_IS_VALID(key) \ ++ ((key) != TSM_KEY_NONE) ++ ++#define TSM_DISTANCE(tsm)\ ++ (((tsm->rx)>=(tsm->tx))?((tsm->rx)-(tsm->tx)):(tsm->ts_buf_size-(tsm->tx)+(tsm->rx))) ++ ++#define TSM_PLUS_AGE(tsm)\ ++ (TSM_DISTANCE(tsm)+tsm->invalid_ts_count+2) ++ ++#define TSM_ABS(ts0, ts1)\ ++ (((ts0)>(ts1))?((ts0)-(ts1)):((ts1)-(ts0))) ++ ++#define TSM_TIME_FORMAT "u:%02u:%02u.%09u" ++ ++#define TSM_TIME_ARGS(t) \ ++ TSM_TS_IS_VALID (t) ? \ ++ (unsigned int) (((TSM_TIMESTAMP)(t)) / (TSM_SECOND * 60 * 60)) : 99, \ ++ TSM_TS_IS_VALID (t) ? \ ++ (unsigned int) ((((TSM_TIMESTAMP)(t)) / (TSM_SECOND * 60)) % 60) : 99, \ ++ TSM_TS_IS_VALID (t) ? \ ++ (unsigned int) ((((TSM_TIMESTAMP)(t)) / TSM_SECOND) % 60) : 99, \ ++ TSM_TS_IS_VALID (t) ? \ ++ (unsigned int) (((TSM_TIMESTAMP)(t)) % TSM_SECOND) : 999999999 ++ ++#define TSM_BUFFER_SET(buf, value, size) \ ++ do {\ ++ int i;\ ++ for (i=0;i<(size);i++){\ ++ (buf)[i] = (value);\ ++ }\ ++ }while(0) ++ ++#define TSM_RECEIVED_NUNBER 512 ++ ++ ++typedef struct ++{ ++ TSM_TIMESTAMP ts; ++ unsigned long long age; ++ void *key; ++} TSMControl; ++ ++typedef struct _TSMReceivedEntry ++{ ++ TSM_TIMESTAMP ts; ++ struct _TSMReceivedEntry *next; ++ unsigned int used:1; ++ unsigned int subentry:1; ++ int size; ++} TSMReceivedEntry; ++ ++typedef struct _TSMReceivedEntryMemory ++{ ++ struct _TSMReceivedEntryMemory *next; ++ TSMReceivedEntry entrys[TSM_RECEIVED_NUNBER]; ++} TSMReceivedEntryMemory; ++ ++typedef struct ++{ ++ TSMReceivedEntry *head; ++ TSMReceivedEntry *tail; ++ TSMReceivedEntry *free; ++ TSMReceivedEntryMemory *memory; ++ int cnt; ++} TSMRecivedCtl; ++ ++typedef struct _TSManager ++{ ++ int first_tx; ++ int first_rx; ++ int rx; //timestamps received ++ int tx; //timestamps transfered ++ TSM_TIMESTAMP last_ts_sent; //last time stamp sent ++ TSM_TIMESTAMP last_ts_received; ++ TSM_TIMESTAMP suspicious_ts; ++ ++ TSM_TIMESTAMP discont_threshold; ++ ++ unsigned int invalid_ts_count; ++ TSMGR_MODE mode; ++ int ts_buf_size; ++ int dur_history_tx; ++ TSM_TIMESTAMP dur_history_total; ++ TSM_TIMESTAMP dur_history_buf[TSM_HISTORY_SIZE]; ++ TSMControl *ts_buf; ++ unsigned long long age; ++ int tx_cnt; ++ int rx_cnt; ++ int cnt; ++ int valid_ts_received:1; ++ int big_cnt; ++ ++ TSMRecivedCtl rctl; ++} TSManager; ++ ++ ++static void ++tsm_free_received_entry (TSMRecivedCtl * rctl, TSMReceivedEntry * entry) ++{ ++ entry->next = rctl->free; ++ rctl->free = entry; ++} ++ ++ ++static TSMReceivedEntry * ++tsm_new_received_entry (TSMRecivedCtl * rctl) ++{ ++ TSMReceivedEntry *ret = NULL; ++ if (rctl->free) { ++ ret = rctl->free; ++ rctl->free = ret->next; ++ } else { ++ TSMReceivedEntryMemory *p = malloc (sizeof (TSMReceivedEntryMemory)); ++ if (p) { ++ int i; ++ for (i = 1; i < TSM_RECEIVED_NUNBER; i++) { ++ TSMReceivedEntry *e = &p->entrys[i]; ++ tsm_free_received_entry (rctl, e); ++ }; ++ ++ p->next = rctl->memory; ++ rctl->memory = p; ++ ++ ret = p->entrys; ++ } ++ } ++ return ret; ++} ++ ++ ++void ++TSManagerReceive2 (void *handle, TSM_TIMESTAMP timestamp, int size) ++{ ++#define CLEAR_TSM_RENTRY(entry)\ ++ do { \ ++ (entry)->used = 0; \ ++ (entry)->subentry = 0; \ ++ (entry)->next = NULL; \ ++ } while (0) ++ TSManager *tsm = (TSManager *) handle; ++ ++ TSM_VERBOSE ("receive2 %" TSM_TIME_FORMAT " size %d\n", ++ TSM_TIME_ARGS (timestamp), size); ++ ++ if (tsm) { ++ if (size > 0) { ++ TSMRecivedCtl *rctl = &tsm->rctl; ++ TSMReceivedEntry *e = tsm_new_received_entry (rctl); ++ if (e) { ++ CLEAR_TSM_RENTRY (e); ++ if ((rctl->tail) && (rctl->tail->ts == timestamp)) { ++ e->subentry = 1; ++ } ++ e->ts = timestamp; ++ e->size = size; ++ if (rctl->tail) { ++ rctl->tail->next = e; ++ rctl->tail = e; ++ } else { ++ rctl->head = rctl->tail = e; ++ } ++ } ++ rctl->cnt++; ++ } else { ++ TSManagerReceive (handle, timestamp); ++ } ++ } ++} ++ ++ ++static TSM_TIMESTAMP ++TSManagerGetLastTimeStamp (TSMRecivedCtl * rctl, int size, int use) ++{ ++ TSM_TIMESTAMP ts = TSM_TIMESTAMP_NONE; ++ TSMReceivedEntry *e; ++ while ((size > 0) && (e = rctl->head)) { ++ ts = ((e->used) ? (TSM_TIMESTAMP_NONE) : (e->ts)); ++ if (use) ++ e->used = 1; ++ if (size >= e->size) { ++ rctl->head = e->next; ++ if (rctl->head == NULL) { ++ rctl->tail = NULL; ++ } else { ++ if (rctl->head->subentry) { ++ rctl->head->used = e->used; ++ } ++ } ++ size -= e->size; ++ rctl->cnt--; ++ tsm_free_received_entry (rctl, e); ++ } else { ++ e->size -= size; ++ size = 0; ++ } ++ } ++ return ts; ++} ++ ++ ++void ++TSManagerFlush2 (void *handle, int size) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ if (tsm) { ++ TSManagerGetLastTimeStamp (&tsm->rctl, size, 0); ++ } ++ ++} ++ ++ ++/*====================================================================================== ++FUNCTION: mfw_gst_receive_ts ++ ++DESCRIPTION: Check timestamp and do frame dropping if enabled ++ ++ARGUMENTS PASSED: pTimeStamp_Object - TimeStamp Manager to handle related timestamp ++ timestamp - time stamp of the input buffer which has video data. ++ ++RETURN VALUE: None ++PRE-CONDITIONS: None ++POST-CONDITIONS: None ++IMPORTANT NOTES: None ++=======================================================================================*/ ++static void ++_TSManagerReceive (void *handle, TSM_TIMESTAMP timestamp, void *key) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ ++ if (tsm) { ++ if (TSM_TS_IS_VALID (timestamp) && (tsm->rx_cnt)) ++ tsm->valid_ts_received = 1; ++ tsm->rx_cnt++; ++ if (tsm->cnt < tsm->ts_buf_size - 1) { ++ tsm->cnt++; ++ if (tsm->mode == MODE_AI) { ++ ++ if (TSM_TS_IS_VALID (timestamp)) { ++ if (tsm->first_rx) { ++ tsm->last_ts_received = timestamp; ++ tsm->first_rx = 0; ++ } else { ++ if (tsm->suspicious_ts) { ++ if (timestamp >= tsm->suspicious_ts) { ++ tsm->last_ts_received = timestamp; ++ } ++ tsm->suspicious_ts = 0; ++ } ++ if ((timestamp > tsm->last_ts_received) ++ && (timestamp - tsm->last_ts_received > tsm->discont_threshold)) { ++ tsm->suspicious_ts = timestamp; ++ timestamp = TSM_TIMESTAMP_NONE; ++ } ++ } ++ } ++ ++ if (TSM_TS_IS_VALID (timestamp)) // && (TSM_ABS(timestamp, tsm->last_ts_sent)ts_buf[tsm->rx].ts = timestamp; ++ tsm->ts_buf[tsm->rx].age = tsm->age + TSM_PLUS_AGE (tsm); ++ tsm->ts_buf[tsm->rx].key = key; ++ tsm->last_ts_received = timestamp; ++#ifdef DEBUG ++ //printf("age should %lld %lld\n", tsm->age, tsm->ts_buf[tsm->rx].age); ++ //printf("++++++ distance = %d tx=%d, rx=%d, invalid count=%d\n", TSM_DISTANCE(tsm), tsm->tx, tsm->rx,tsm->invalid_ts_count); ++#endif ++ tsm->rx = ((tsm->rx + 1) % tsm->ts_buf_size); ++ } else { ++ tsm->invalid_ts_count++; ++ } ++ } else if (tsm->mode == MODE_FIFO) { ++ tsm->ts_buf[tsm->rx].ts = timestamp; ++ tsm->rx = ((tsm->rx + 1) % tsm->ts_buf_size); ++ } ++ TSM_LOG ("++Receive %d:%" TSM_TIME_FORMAT ++ ", invalid:%d, size:%d key %p\n", tsm->rx_cnt, ++ TSM_TIME_ARGS (timestamp), tsm->invalid_ts_count, tsm->cnt, key); ++ } else { ++ TSM_ERROR ("Too many timestamps recieved!! (cnt=%d)\n", tsm->cnt); ++ } ++ } ++} ++ ++ ++void ++TSManagerValid2 (void *handle, int size, void *key) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ ++ TSM_VERBOSE ("valid2 size %d\n", size); ++ ++ if (tsm) { ++ TSM_TIMESTAMP ts; ++ ts = TSManagerGetLastTimeStamp (&tsm->rctl, size, 1); ++ _TSManagerReceive (tsm, ts, key); ++ } ++} ++ ++ ++void ++TSManagerReceive (void *handle, TSM_TIMESTAMP timestamp) ++{ ++ _TSManagerReceive (handle, timestamp, TSM_KEY_NONE); ++} ++ ++ ++/*====================================================================================== ++FUNCTION: TSManagerSend ++ ++DESCRIPTION: Check timestamp and do frame dropping if enabled ++ ++ARGUMENTS PASSED: pTimeStamp_Object - TimeStamp Manager to handle related timestamp ++ ptimestamp - returned timestamp to use at render ++ ++RETURN VALUE: None ++PRE-CONDITIONS: None ++POST-CONDITIONS: None ++IMPORTANT NOTES: None ++=======================================================================================*/ ++static TSM_TIMESTAMP ++_TSManagerSend2 (void *handle, void *key, int send) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ int i = tsm->tx; ++ int index = -1; ++ TSM_TIMESTAMP ts0 = 0, tstmp = TSM_TIMESTAMP_NONE; ++ unsigned long long age = 0; ++ TSM_TIMESTAMP half_interval = TSM_ADAPTIVE_INTERVAL (tsm) >> 1; ++ ++ if (tsm) { ++ if (send) { ++ tsm->tx_cnt++; ++ } else { ++ tsm->cnt++; ++ tsm->invalid_ts_count++; ++ } ++ if (tsm->cnt > 0) { ++ if (send) { ++ tsm->cnt--; ++ } ++ if (tsm->mode == MODE_AI) { ++ ++ if (tsm->first_tx == 0) { ++ tstmp = tsm->last_ts_sent + TSM_ADAPTIVE_INTERVAL (tsm); ++ } else { ++ tstmp = tsm->last_ts_sent; ++ } ++ ++ while (i != tsm->rx) { ++ if (index >= 0) { ++ if (tsm->ts_buf[i].ts < ts0) { ++ ts0 = tsm->ts_buf[i].ts; ++ age = tsm->ts_buf[i].age; ++ index = i; ++ } ++ } else { ++ ts0 = tsm->ts_buf[i].ts; ++ age = tsm->ts_buf[i].age; ++ index = i; ++ } ++ if ((TSM_KEY_IS_VALID (key)) && (key == tsm->ts_buf[i].key)) ++ break; ++ i = ((i + 1) % tsm->ts_buf_size); ++ } ++ if (index >= 0) { ++ if ((tsm->invalid_ts_count) && (ts0 >= ((tstmp) + half_interval)) ++ && (age > tsm->age)) { ++ /* use calculated ts0 */ ++ if (send) { ++ tsm->invalid_ts_count--; ++ } ++ } else { ++ ++ if (send) { ++ if (index != tsm->tx) { ++ tsm->ts_buf[index] = tsm->ts_buf[tsm->tx]; ++ } ++ tsm->tx = ((tsm->tx + 1) % tsm->ts_buf_size); ++ ++ } ++#if 0 ++ if (ts0 >= ((tstmp) + half_interval)) ++ tstmp = tstmp; ++ else ++ tstmp = ts0; ++#else ++ tstmp = ts0; ++#endif ++ } ++ ++ } else { ++ if (send) { ++ tsm->invalid_ts_count--; ++ } ++ } ++ ++ if (tsm->first_tx == 0) { ++ ++ if (tstmp > tsm->last_ts_sent) { ++ ts0 = (tstmp - tsm->last_ts_sent); ++ } else { ++ ts0 = 0; ++ tstmp = tsm->last_ts_sent; ++ } ++ ++ if (ts0 > TSM_ADAPTIVE_INTERVAL (tsm) * 3 / 2) { ++ TSM_WARNING ("Jitter1:%" TSM_TIME_FORMAT " %" TSM_TIME_FORMAT "\n", ++ TSM_TIME_ARGS (ts0), ++ TSM_TIME_ARGS (TSM_ADAPTIVE_INTERVAL (tsm) * 3 / 2)); ++ } else if (ts0 == 0) { ++ TSM_WARNING ("Jitter:%" TSM_TIME_FORMAT "\n", TSM_TIME_ARGS (ts0)); ++ } ++ ++ if (send) { ++ if ((ts0 < TSM_ADAPTIVE_INTERVAL (tsm) * 2) || (tsm->big_cnt > 3)) { ++ tsm->big_cnt = 0; ++ tsm->dur_history_total -= ++ tsm->dur_history_buf[tsm->dur_history_tx]; ++ tsm->dur_history_buf[tsm->dur_history_tx] = ts0; ++ tsm->dur_history_tx = ++ ((tsm->dur_history_tx + 1) % TSM_HISTORY_SIZE); ++ tsm->dur_history_total += ts0; ++ } else { ++ tsm->big_cnt++; ++ } ++ } ++ } ++ ++ if (send) { ++ tsm->last_ts_sent = tstmp; ++ tsm->age++; ++ tsm->first_tx = 0; ++ } ++ ++ } else if (tsm->mode == MODE_FIFO) { ++ tstmp = tsm->ts_buf[tsm->tx].ts; ++ if (send) { ++ tsm->tx = ((tsm->tx + 1) % tsm->ts_buf_size); ++ } ++ ts0 = tstmp - tsm->last_ts_sent; ++ if (send) { ++ tsm->last_ts_sent = tstmp; ++ } ++ } ++ ++ if (send) { ++ TSM_LOG ("--Send %d:%" TSM_TIME_FORMAT ", int:%" TSM_TIME_FORMAT ++ ", avg:%" TSM_TIME_FORMAT " inkey %p\n", tsm->tx_cnt, ++ TSM_TIME_ARGS (tstmp), TSM_TIME_ARGS (ts0), ++ TSM_TIME_ARGS (TSM_ADAPTIVE_INTERVAL (tsm)), key); ++ } ++ ++ } else { ++ if (tsm->valid_ts_received == 0) { ++ if (tsm->first_tx) { ++ tstmp = tsm->last_ts_sent; ++ } else { ++ tstmp = tsm->last_ts_sent + TSM_ADAPTIVE_INTERVAL (tsm); ++ } ++ if (send) { ++ tsm->first_tx = 0; ++ tsm->last_ts_sent = tstmp; ++ } ++ } ++ TSM_ERROR ("Too many timestamps send!!\n"); ++ } ++ ++ if (send == 0) { ++ tsm->cnt--; ++ tsm->invalid_ts_count--; ++ } ++ ++ } ++ ++ return tstmp; ++} ++ ++ ++TSM_TIMESTAMP ++TSManagerSend2 (void *handle, void *key) ++{ ++ return _TSManagerSend2 (handle, key, 1); ++} ++ ++ ++TSM_TIMESTAMP ++TSManagerQuery2 (void *handle, void *key) ++{ ++ return _TSManagerSend2 (handle, key, 0); ++} ++ ++ ++TSM_TIMESTAMP ++TSManagerSend (void *handle) ++{ ++ return TSManagerSend2 (handle, TSM_KEY_NONE); ++} ++ ++ ++TSM_TIMESTAMP ++TSManagerQuery (void *handle) ++{ ++ return TSManagerQuery2 (handle, TSM_KEY_NONE); ++} ++ ++ ++void ++resyncTSManager (void *handle, TSM_TIMESTAMP synctime, TSMGR_MODE mode) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ if (tsm) { ++ TSMRecivedCtl *rctl = &tsm->rctl; ++ TSMReceivedEntry *e = rctl->head; ++ ++ while ((e = rctl->head)) { ++ rctl->head = e->next; ++ tsm_free_received_entry (rctl, e); ++ }; ++ rctl->cnt = 0; ++ ++ rctl->tail = NULL; ++ ++ tsm->first_tx = 1; ++ tsm->first_rx = 1; ++ tsm->suspicious_ts = 0; ++ ++ if (TSM_TS_IS_VALID (synctime)) ++ tsm->last_ts_sent = synctime; ++ ++ tsm->tx = tsm->rx = 0; ++ tsm->invalid_ts_count = 0; ++ tsm->mode = mode; ++ tsm->age = 0; ++ tsm->rx_cnt = tsm->tx_cnt = tsm->cnt = 0; ++ tsm->valid_ts_received = 0; ++ ++ tsm->big_cnt = 0; ++ } ++} ++ ++ ++/*====================================================================================== ++FUNCTION: mfw_gst_init_ts ++ ++DESCRIPTION: malloc and initialize timestamp strcture ++ ++ARGUMENTS PASSED: ppTimeStamp_Object - pointer of TimeStamp Manager to handle related timestamp ++ ++RETURN VALUE: TimeStamp structure pointer ++PRE-CONDITIONS: None ++POST-CONDITIONS: None ++IMPORTANT NOTES: None ++=======================================================================================*/ ++void * ++createTSManager (int ts_buf_size) ++{ ++ TSManager *tsm = (TSManager *) malloc (sizeof (TSManager)); ++ debug = getenv (debug_env); ++ if (debug) { ++ debug_level = atoi (debug); ++ } ++ // printf("debug = %s \n ++++++++++++++++++++++++++++",debug); ++ if (tsm) { ++ memset (tsm, 0, sizeof (TSManager)); ++ if (ts_buf_size <= 0) { ++ ts_buf_size = TSM_DEFAULT_TS_BUFFER_SIZE; ++ } ++ tsm->ts_buf_size = ts_buf_size; ++ tsm->ts_buf = malloc (sizeof (TSMControl) * ts_buf_size); ++ ++ if (tsm->ts_buf == NULL) { ++ goto fail; ++ } ++ ++ resyncTSManager (tsm, (TSM_TIMESTAMP) 0, MODE_AI); ++ ++ tsm->dur_history_tx = 0; ++ TSM_BUFFER_SET (tsm->dur_history_buf, TSM_DEFAULT_INTERVAL, ++ TSM_HISTORY_SIZE); ++ tsm->dur_history_total = TSM_DEFAULT_INTERVAL << TSM_HISTORY_POWER; ++ ++ tsm->discont_threshold = 10000000000LL; // 10s ++ } ++ return tsm; ++fail: ++ if (tsm) { ++ if (tsm->ts_buf) { ++ free (tsm->ts_buf); ++ } ++ free (tsm); ++ tsm = NULL; ++ } ++ return tsm; ++} ++ ++ ++void ++destroyTSManager (void *handle) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ if (tsm) { ++ TSMRecivedCtl *rctl = &tsm->rctl; ++ TSMReceivedEntryMemory *rmem; ++ if (tsm->ts_buf) { ++ free (tsm->ts_buf); ++ } ++ ++ while ((rmem = rctl->memory)) { ++ rctl->memory = rmem->next; ++ free (rmem); ++ } ++ free (tsm); ++ tsm = NULL; ++ } ++} ++ ++ ++void ++setTSManagerFrameRate (void *handle, int fps_n, int fps_d) ++//void setTSManagerFrameRate(void * handle, float framerate) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ TSM_TIMESTAMP ts; ++ if ((fps_n > 0) && (fps_d > 0) && (fps_n / fps_d <= 80)) ++ ts = TSM_SECOND * fps_d / fps_n; ++ else ++ ts = TSM_DEFAULT_INTERVAL; ++ // TSM_TIMESTAMP ts = TSM_SECOND / framerate; ++ ++ if (tsm) { ++ TSM_BUFFER_SET (tsm->dur_history_buf, ts, TSM_HISTORY_SIZE); ++ tsm->dur_history_total = (ts << TSM_HISTORY_POWER); ++ if (debug) ++ TSM_LOG ("Set frame intrval:%" TSM_TIME_FORMAT "\n", TSM_TIME_ARGS (ts)); ++ } ++} ++ ++ ++TSM_TIMESTAMP ++getTSManagerFrameInterval (void *handle) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ TSM_TIMESTAMP ts = 0; ++ if (tsm) { ++ ts = TSM_ADAPTIVE_INTERVAL (tsm); ++ } ++ return ts; ++} ++ ++ ++TSM_TIMESTAMP ++getTSManagerPosition (void *handle) ++{ ++ TSManager *tsm = (TSManager *) handle; ++ TSM_TIMESTAMP ts = 0; ++ if (tsm) { ++ ts = tsm->last_ts_sent; ++ } ++ return ts; ++} ++ ++ ++int ++getTSManagerPreBufferCnt (void *handle) ++{ ++ int i = 0; ++ TSManager *tsm = (TSManager *) handle; ++ if (tsm) { ++ i = tsm->rctl.cnt; ++ } ++ return i; ++} +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.h xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.h +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDCodecs/Video/mfw_gst_ts.h 2014-01-12 04:37:25.000000000 +0100 +@@ -0,0 +1,170 @@ ++/* ++ * Copyright (c) 2010-2012, Freescale Semiconductor, Inc. All rights reserved. ++ * ++ */ ++ ++/* ++ * This library is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Library General Public ++ * License as published by the Free Software Foundation; either ++ * version 2 of the License, or (at your option) any later version. ++ * ++ * This library 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 ++ * Library General Public License for more details. ++ * ++ * You should have received a copy of the GNU Library General Public ++ * License along with this library; if not, write to the ++ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, ++ * Boston, MA 02111-1307, USA. ++ */ ++ ++/* ++ * Module Name: TimeStamp.h ++ * ++ * Description: include TimeStamp stratege for VPU / SW video decoder plugin ++ * ++ * Portability: This code is written for Linux OS and Gstreamer ++ */ ++ ++/* ++ * Changelog: ++ 11/2/2010 draft version Lyon Wang ++ * ++ */ ++ ++#ifndef _TIMESTAMP_H_ ++#define _TIMESTAMP_H_ ++ ++ ++/** ++ * GST_CLOCK_TIME_NONE: ++ * ++ * Constant to define an undefined clock time. ++ */ ++ ++typedef long long TSM_TIMESTAMP; ++ ++typedef enum ++{ ++ MODE_AI, ++ MODE_FIFO, ++} TSMGR_MODE; ++ ++#define TSM_TIMESTAMP_NONE ((long long)(-1)) ++#define TSM_KEY_NONE ((void *)0) ++ ++/** ++ * GST_CLOCK_TIME_IS_VALID: ++ * @time: clock time to validate ++ * ++ * Tests if a given #GstClockTime represents a valid defined time. ++ */ ++ ++#ifdef __cplusplus ++#define EXTERN ++#else ++#define EXTERN extern ++#endif ++ ++#ifdef __cplusplus ++extern "C" ++{ ++#endif ++ ++/*! ++ * This function receive timestamp into timestamp manager. ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @param timestamp timestamp received ++ * ++ * @return ++ */ ++ EXTERN void TSManagerReceive (void *handle, TSM_TIMESTAMP timestamp); ++ ++ EXTERN void TSManagerReceive2 (void *handle, TSM_TIMESTAMP timestamp, ++ int size); ++ ++ EXTERN void TSManagerFlush2 (void *handle, int size); ++ ++ EXTERN void TSManagerValid2 (void *handle, int size, void *key); ++ ++/*! ++ * This function send the timestamp for next output frame. ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @return timestamp for next output frame. ++ */ ++ EXTERN TSM_TIMESTAMP TSManagerSend (void *handle); ++ ++ EXTERN TSM_TIMESTAMP TSManagerSend2 (void *handle, void *key); ++ ++ EXTERN TSM_TIMESTAMP TSManagerQuery2 (void *handle, void *key); ++ ++ EXTERN TSM_TIMESTAMP TSManagerQuery (void *handle); ++/*! ++ * This function resync timestamp handler when reset and seek ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @param synctime the postion time needed to set, if value invalid, position keeps original ++ * ++ * @param mode playing mode (AI or FIFO) ++ * ++ * @return ++ */ ++ EXTERN void resyncTSManager (void *handle, TSM_TIMESTAMP synctime, ++ TSMGR_MODE mode); ++/*! ++ * This function create and reset timestamp handler ++ * ++ * @param ts_buf_size time stamp queue buffer size ++ * ++ * @return ++ */ ++ EXTERN void *createTSManager (int ts_buf_size); ++/*! ++ * This function destory timestamp handler ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @return ++ */ ++ EXTERN void destroyTSManager (void *handle); ++/*! ++ * This function set history buffer frame interval by fps_n and fps_d ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @param framerate the framerate to be set ++ * ++ * @return ++ */ ++ EXTERN void setTSManagerFrameRate (void *handle, int fps_n, int fps_d); ++//EXTERN void setTSManagerFrameRate(void * handle, float framerate); ++/*! ++ * This function set the current calculated Frame Interval ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @return ++ */ ++ EXTERN TSM_TIMESTAMP getTSManagerFrameInterval (void *handle); ++/*! ++ * This function get the current time stamp postion ++ * ++ * @param handle handle of timestamp manager. ++ * ++ * @return ++ */ ++ EXTERN TSM_TIMESTAMP getTSManagerPosition (void *handle); ++ EXTERN int getTSManagerPreBufferCnt (void *handle); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /*_TIMESTAMP_H_ */ +diff -Naur xbmc-master.test/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp +--- xbmc-master.test/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/dvdplayer/DVDPlayerVideo.cpp 2014-01-12 04:55:00.000000000 +0100 +@@ -994,6 +994,7 @@ + case RENDER_FMT_CVBREF: return "BGRA"; + case RENDER_FMT_EGLIMG: return "EGLIMG"; + case RENDER_FMT_BYPASS: return "BYPASS"; ++ case RENDER_FMT_IMX: return "IMX"; + case RENDER_FMT_MEDIACODEC:return "MEDIACODEC"; + case RENDER_FMT_NONE: return "NONE"; + } +diff -Naur xbmc-master.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp +--- xbmc-master.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -20,6 +20,10 @@ + + //#define DEBUG_VERBOSE 1 + ++#ifdef HAS_IMXVPU ++#include ++#endif ++ + #include "system.h" + #if (defined HAVE_CONFIG_H) && (!defined TARGET_WINDOWS) + #include "config.h" +@@ -63,6 +67,11 @@ + #ifdef TARGET_DARWIN_IOS + #include "osx/DarwinUtils.h" + #endif ++ ++#ifdef HAS_IMXVPU ++#include "DVDCodecs/Video/DVDVideoCodecIMX.h" ++#endif ++ + #if defined(HAS_LIBSTAGEFRIGHT) + #include + #include +@@ -100,6 +109,10 @@ + #if defined(TARGET_ANDROID) + mediacodec = NULL; + #endif ++#ifdef HAS_IMXVPU ++ imxOutputFrame = NULL; ++#endif ++ + } + + CLinuxRendererGLES::YUVBUFFER::~YUVBUFFER() +@@ -110,6 +123,23 @@ + { + m_textureTarget = GL_TEXTURE_2D; + ++ /* FIXME a verifier */ ++#if 0 ++ ++ for (int i = 0; i < NUM_BUFFERS; i++) ++ { ++#if defined(HAVE_LIBOPENMAX) ++ m_buffers[i].openMaxBuffer = 0; ++#endif ++#ifdef HAVE_VIDEOTOOLBOXDECODER ++ m_buffers[i].cvBufferRef = NULL; ++#endif ++#ifdef HAS_IMXVPU ++ m_buffers[i].imx = NULL; ++#endif ++ } ++#endif ++ + m_renderMethod = RENDER_GLSL; + m_oldRenderMethod = m_renderMethod; + m_renderQuality = RQ_SINGLEPASS; +@@ -491,6 +521,8 @@ + + if (m_renderMethod & RENDER_BYPASS) + { ++ ++ + ManageDisplay(); + // if running bypass, then the player might need the src/dst rects + // for sizing video playback on a layer other than the gles layer. +@@ -498,17 +530,51 @@ + (*m_RenderUpdateCallBackFn)(m_RenderUpdateCallBackCtx, m_sourceRect, m_destRect); + + CRect old = g_graphicsContext.GetScissors(); ++ RESOLUTION res = GetResolution(); ++ int iWidth = CDisplaySettings::Get().GetResolutionInfo(res).iWidth; ++ int iHeight = CDisplaySettings::Get().GetResolutionInfo(res).iHeight; + + g_graphicsContext.BeginPaint(); ++ if (clear) ++ { ++ glScissor(0, ++ 0, ++ iWidth, ++ iHeight); ++ glClearColor(GLfloat(0.0), GLfloat(0.0), GLfloat(0.0), 0); ++ glClear(GL_COLOR_BUFFER_BIT); ++ } ++ + g_graphicsContext.SetScissors(m_destRect); ++ /* CLog::Log(LOGDEBUG, "%s - m_destRect : %f %f %f %f\n", ++ __FUNCTION__, m_destRect.x1, m_destRect.x2, m_destRect.y1,m_destRect.y2);*/ + +- glEnable(GL_BLEND); +- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); +- glClearColor(0, 0, 0, 0); ++ ++/* glEnable(GL_BLEND); ++ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);*/ ++ glClearColor(GLfloat(2.0/31.0), GLfloat(2.0/63.0), GLfloat(2.0/31.0), 0); + glClear(GL_COLOR_BUFFER_BIT); + + g_graphicsContext.SetScissors(old); + g_graphicsContext.EndPaint(); ++ ++ // FIXME : move in its own render mode instead of mixup with BYPASS ++ if (m_format == RENDER_FMT_IMX) ++ { ++ CIMXRenderingFrames &renderingFrames = CIMXRenderingFrames::GetInstance(); ++ int index = m_iYV12RenderBuffer; ++ struct v4l2_crop crop; ++ crop.c.top = (int)m_destRect.y1; ++ crop.c.left = (int)m_destRect.x1; ++ crop.c.width = (int)(m_destRect.x2 - m_destRect.x1); ++ crop.c.height = (int)(m_destRect.y2 - m_destRect.y1); ++ CIMXOutputFrame *imxPicture = m_buffers[index].imxOutputFrame; ++ if (imxPicture != NULL) ++ { ++ renderingFrames.Queue(imxPicture, crop); ++ m_buffers[index].imxOutputFrame = NULL; ++ } ++ } + return; + } + +@@ -597,6 +663,9 @@ + #ifdef HAVE_VIDEOTOOLBOXDECODER + m_formats.push_back(RENDER_FMT_CVBREF); + #endif ++#ifdef HAS_IMXVPU ++ m_formats.push_back(RENDER_FMT_IMX); ++#endif + #ifdef HAS_LIBSTAGEFRIGHT + m_formats.push_back(RENDER_FMT_EGLIMG); + #endif +@@ -726,6 +795,13 @@ + m_renderMethod = RENDER_CVREF; + break; + } ++ else if (m_format == RENDER_FMT_IMX) ++ { ++ CLog::Log(LOGNOTICE, "GL: IMX format Uses BYPASS render method"); ++ m_renderMethod = RENDER_BYPASS; ++ break; ++ } ++ + #if defined(TARGET_DARWIN_IOS) + else if (ios_version < 5.0 && m_format == RENDER_FMT_YUV420P) + { +@@ -2667,6 +2743,15 @@ + CVBufferRetain(buf.cvBufferRef); + } + #endif ++ ++#ifdef HAS_IMXVPU ++void CLinuxRendererGLES::AddProcessor(CIMXOutputFrame *imx, int index) ++{ ++ YUVBUFFER &buf = m_buffers[index]; ++ buf.imxOutputFrame = imx; ++} ++#endif ++ + #ifdef HAS_LIBSTAGEFRIGHT + void CLinuxRendererGLES::AddProcessor(CDVDVideoCodecStageFright* stf, EGLImageKHR eglimg, int index) + { +@@ -2688,6 +2773,7 @@ + } + #endif + ++ + #if defined(TARGET_ANDROID) + void CLinuxRendererGLES::AddProcessor(CDVDMediaCodecInfo *mediacodec, int index) + { +diff -Naur xbmc-master.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.h xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.h +--- xbmc-master.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.h 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/LinuxRendererGLES.h 2014-01-12 04:55:00.000000000 +0100 +@@ -42,6 +42,7 @@ + class COpenMaxVideo; + class CDVDVideoCodecStageFright; + class CDVDMediaCodecInfo; ++class CIMXOutputFrame; + typedef std::vector Features; + + +@@ -169,6 +170,9 @@ + #ifdef HAS_LIBSTAGEFRIGHT + virtual void AddProcessor(CDVDVideoCodecStageFright* stf, EGLImageKHR eglimg, int index); + #endif ++#ifdef HAS_IMXVPU ++ virtual void AddProcessor(CIMXOutputFrame *imx, int index); ++#endif + #if defined(TARGET_ANDROID) + // mediaCodec + virtual void AddProcessor(CDVDMediaCodecInfo *mediacodec, int index); +@@ -280,6 +284,9 @@ + #ifdef HAVE_VIDEOTOOLBOXDECODER + struct __CVBuffer *cvBufferRef; + #endif ++#ifdef HAS_IMXVPU ++ CIMXOutputFrame *imxOutputFrame; ++#endif + #ifdef HAS_LIBSTAGEFRIGHT + CDVDVideoCodecStageFright* stf; + EGLImageKHR eglimg; +diff -Naur xbmc-master.test/xbmc/cores/VideoRenderers/RenderFormats.h xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/RenderFormats.h +--- xbmc-master.test/xbmc/cores/VideoRenderers/RenderFormats.h 2013-10-03 04:06:35.000000000 +0200 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/RenderFormats.h 2014-01-12 04:37:25.000000000 +0100 +@@ -35,6 +35,7 @@ + RENDER_FMT_OMXEGL, + RENDER_FMT_CVBREF, + RENDER_FMT_BYPASS, ++ RENDER_FMT_IMX, + RENDER_FMT_EGLIMG, + RENDER_FMT_MEDIACODEC, + }; +diff -Naur xbmc-master.test/xbmc/cores/VideoRenderers/RenderManager.cpp xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/RenderManager.cpp +--- xbmc-master.test/xbmc/cores/VideoRenderers/RenderManager.cpp 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/cores/VideoRenderers/RenderManager.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -920,6 +920,10 @@ + else if(pic.format == RENDER_FMT_VAAPI) + m_pRenderer->AddProcessor(*pic.vaapi, index); + #endif ++#ifdef HAS_IMXVPU ++ else if(pic.format == RENDER_FMT_IMX) ++ m_pRenderer->AddProcessor(pic.imxOutputFrame, index); ++#endif + #ifdef HAS_LIBSTAGEFRIGHT + else if(pic.format == RENDER_FMT_EGLIMG) + m_pRenderer->AddProcessor(pic.stf, pic.eglimg, index); +diff -Naur xbmc-master.test/xbmc/input/linux/LinuxInputDevices.cpp xbmc-wolfgar-imx-wip.test/xbmc/input/linux/LinuxInputDevices.cpp +--- xbmc-master.test/xbmc/input/linux/LinuxInputDevices.cpp 2014-01-10 19:50:19.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/input/linux/LinuxInputDevices.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -1222,7 +1222,8 @@ + + if ((now - m_lastHotplugCheck) >= 10) + { +- CheckHotplugged(); ++ // Comment for now as it has visible issue on video decoding when USB devices are available ++ //CheckHotplugged(); + m_lastHotplugCheck = now; + } + } +diff -Naur xbmc-master.test/xbmc/powermanagement/PowerManager.cpp xbmc-wolfgar-imx-wip.test/xbmc/powermanagement/PowerManager.cpp +diff -Naur xbmc-master.test/xbmc/video/dialogs/GUIDialogVideoOSD.cpp xbmc-wolfgar-imx-wip.test/xbmc/video/dialogs/GUIDialogVideoOSD.cpp +diff -Naur xbmc-master.test/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp +--- xbmc-master.test/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp 2014-01-10 19:50:20.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLNativeTypeAmlogic.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -17,6 +17,7 @@ + * . + * + */ ++#include + + #include "EGLNativeTypeAmlogic.h" + #include "guilib/gui3d.h" +@@ -24,7 +25,6 @@ + #include "utils/StringUtils.h" + + #include +-#include + #include + #include + +diff -Naur xbmc-master.test/xbmc/windowing/egl/EGLNativeTypeIMX.cpp xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLNativeTypeIMX.cpp +--- xbmc-master.test/xbmc/windowing/egl/EGLNativeTypeIMX.cpp 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLNativeTypeIMX.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -0,0 +1,272 @@ ++/* ++ * Copyright (C) 2011-2013 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++ ++#include ++#include "system.h" ++#include ++ ++#include "EGLNativeTypeIMX.h" ++#include ++#include ++#include ++#include "utils/log.h" ++#include "utils/StringUtils.h" ++#include "guilib/gui3d.h" ++ ++CEGLNativeTypeIMX::CEGLNativeTypeIMX() ++{ ++} ++ ++CEGLNativeTypeIMX::~CEGLNativeTypeIMX() ++{ ++} ++ ++bool CEGLNativeTypeIMX::CheckCompatibility() ++{ ++ char name[256] = {0}; ++ get_sysfs_str("/sys/class/graphics/fb0/device/modalias", name, 255); ++ CStdString strName = name; ++ StringUtils::Trim(strName); ++ if (strName == "platform:mxc_sdc_fb") ++ return true; ++ return false; ++} ++ ++void CEGLNativeTypeIMX::Initialize() ++{ ++ struct mxcfb_gbl_alpha alpha; ++ int fd, fd2; ++ ++ ++ fd = open("/dev/fb0",O_RDWR); ++ if (fd < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while opening /dev/fb0.\n", __FUNCTION__); ++ return; ++ } ++ fd2 = open("/dev/fb1",O_RDWR); ++ if (fd2 < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while opening /dev/fb1.\n", __FUNCTION__); ++ return; ++ } ++ ++ /* Store screen info */ ++ if (ioctl(fd, FBIOGET_VSCREENINFO, &m_screeninfo) != 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while querying frame buffer.\n", __FUNCTION__); ++ return; ++ } ++ /* Configure overlay in the same way as BG plane */ ++ if (ioctl(fd2, FBIOPUT_VSCREENINFO, &m_screeninfo) != 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while setting overlay frame buffer.\n", __FUNCTION__); ++ return; ++ } ++ ++ /* set fb0 as the only visible layer - ioctl on /dev/fb0 so that fb0 is BG and fb1 is FG */ ++ alpha.alpha = 255; ++ alpha.enable = 1; ++ if (ioctl(fd, MXCFB_SET_GBL_ALPHA, &alpha) != 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while initializing frame buffer.\n", __FUNCTION__); ++ } ++ ++ /* Unblank the fbs */ ++ if (ioctl(fd, FBIOBLANK, 0) < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while unblanking fb0.\n", __FUNCTION__); ++ } ++ if (ioctl(fd2, FBIOBLANK, 0) < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while unblanking fb0.\n", __FUNCTION__); ++ } ++ ++ close(fd); ++ close(fd2); ++ ++ return; ++} ++ ++void CEGLNativeTypeIMX::Destroy() ++{ ++ struct fb_fix_screeninfo fixed_info; ++ void *fb_buffer; ++ struct mxcfb_gbl_alpha alpha; ++ int fd; ++ ++ fd = open("/dev/fb0",O_RDWR); ++ if (fd < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while opening /dev/fb0.\n", __FUNCTION__); ++ return; ++ } ++ /* only fb0 visible */ ++ alpha.alpha = 255; ++ alpha.enable = 1; ++ if (ioctl(fd, MXCFB_SET_GBL_ALPHA, &alpha) != 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while initializing frame buffer.\n", __FUNCTION__); ++ } ++ ++ ioctl( fd, FBIOGET_FSCREENINFO, &fixed_info); ++ /* Black fb0 */ ++ fb_buffer = mmap(NULL, fixed_info.smem_len, PROT_WRITE, MAP_SHARED, fd, 0); ++ if (fb_buffer == MAP_FAILED) ++ { ++ CLog::Log(LOGERROR, "%s - fb mmap failed %s.\n", __FUNCTION__, strerror(errno)); ++ } ++ else ++ { ++ memset(fb_buffer, 0x0, fixed_info.smem_len); ++ munmap(fb_buffer, fixed_info.smem_len); ++ } ++ ++ close(fd); ++ ++ /* Blank overlay */ ++ fd = open("/dev/fb1",O_RDWR); ++ if (fd < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while opening /dev/fb1.\n", __FUNCTION__); ++ return; ++ } ++ if (ioctl(fd, FBIOBLANK, 1) < 0) ++ { ++ CLog::Log(LOGERROR, "%s - Error while blanking fb1.\n", __FUNCTION__); ++ } ++ close(fd); ++ ++ return; ++} ++ ++bool CEGLNativeTypeIMX::CreateNativeDisplay() ++{ ++ /* EGL will be rendered on fb0 */ ++ m_display = fbGetDisplayByIndex(0); ++ m_nativeDisplay = &m_display; ++ return true; ++} ++ ++bool CEGLNativeTypeIMX::CreateNativeWindow() ++{ ++ m_window = fbCreateWindow(m_display, 0, 0, m_screeninfo.xres, m_screeninfo.yres); ++ m_nativeWindow = &m_window; ++ return true; ++} ++ ++bool CEGLNativeTypeIMX::GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const ++{ ++ if (!nativeDisplay) ++ return false; ++ *nativeDisplay = (XBNativeDisplayType*)m_nativeDisplay; ++ return true; ++} ++ ++bool CEGLNativeTypeIMX::GetNativeWindow(XBNativeWindowType **nativeWindow) const ++{ ++ if (!nativeWindow) ++ return false; ++ *nativeWindow = (XBNativeWindowType*)m_nativeWindow; ++ return true; ++} ++ ++bool CEGLNativeTypeIMX::DestroyNativeDisplay() ++{ ++ return true; ++} ++ ++bool CEGLNativeTypeIMX::DestroyNativeWindow() ++{ ++ return true; ++} ++ ++bool CEGLNativeTypeIMX::GetNativeResolution(RESOLUTION_INFO *res) const ++{ ++ double drate = 0, hrate = 0, vrate = 0; ++ if (!res) ++ return false; ++ ++ drate = 1e12 / m_screeninfo.pixclock; ++ hrate = drate / (m_screeninfo.left_margin + m_screeninfo.xres + m_screeninfo.right_margin + m_screeninfo.hsync_len); ++ vrate = hrate / (m_screeninfo.upper_margin + m_screeninfo.yres + m_screeninfo.lower_margin + m_screeninfo.vsync_len); ++ ++ res->iWidth = m_screeninfo.xres; ++ res->iHeight = m_screeninfo.yres; ++ res->iScreenWidth = res->iWidth; ++ res->iScreenHeight = res->iHeight; ++ res->fRefreshRate = lrint(vrate); ++ res->dwFlags= D3DPRESENTFLAG_PROGRESSIVE; ++ res->iScreen = 0; ++ res->bFullScreen = true; ++ res->iSubtitles = (int)(0.965 * res->iHeight); ++ res->fPixelRatio = 1.0f; ++ res->strMode = StringUtils::Format("%dx%d @ %.2f%s - Full Screen", res->iScreenWidth, res->iScreenHeight, res->fRefreshRate, ++ res->dwFlags & D3DPRESENTFLAG_INTERLACED ? "i" : ""); ++ ++ return res->iWidth > 0 && res->iHeight> 0; ++} ++ ++bool CEGLNativeTypeIMX::SetNativeResolution(const RESOLUTION_INFO &res) ++{ ++ return false; ++} ++ ++bool CEGLNativeTypeIMX::ProbeResolutions(std::vector &resolutions) ++{ ++ RESOLUTION_INFO res; ++ bool ret = false; ++ ret = GetNativeResolution(&res); ++ if (ret && res.iWidth > 1 && res.iHeight > 1) ++ { ++ resolutions.push_back(res); ++ return true; ++ } ++ return false; ++} ++ ++bool CEGLNativeTypeIMX::GetPreferredResolution(RESOLUTION_INFO *res) const ++{ ++ return false; ++} ++ ++bool CEGLNativeTypeIMX::ShowWindow(bool show) ++{ ++ // CLog::Log(LOGERROR, "%s - call CEGLNativeTypeIMX::ShowWindow with %d.\n", __FUNCTION__, show); ++ return false; ++} ++ ++int CEGLNativeTypeIMX::get_sysfs_str(const char *path, char *valstr, const int size) const ++{ ++ int fd = open(path, O_RDONLY); ++ if (fd >= 0) ++ { ++ int len = read(fd, valstr, size - 1); ++ if (len != -1 ) ++ valstr[len] = '\0'; ++ close(fd); ++ } ++ else ++ { ++ sprintf(valstr, "%s", "fail"); ++ return -1; ++ } ++ return 0; ++} +diff -Naur xbmc-master.test/xbmc/windowing/egl/EGLNativeTypeIMX.h xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLNativeTypeIMX.h +--- xbmc-master.test/xbmc/windowing/egl/EGLNativeTypeIMX.h 1970-01-01 01:00:00.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLNativeTypeIMX.h 2014-01-12 04:37:25.000000000 +0100 +@@ -0,0 +1,62 @@ ++#pragma once ++ ++/* ++ * Copyright (C) 2011-2013 Team XBMC ++ * http://www.xbmc.org ++ * ++ * This Program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2, or (at your option) ++ * any later version. ++ * ++ * 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. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with XBMC; see the file COPYING. If not, see ++ * . ++ * ++ */ ++#include ++#include "EGLNativeType.h" ++#include "EGL/eglvivante.h" ++ ++class CEGLNativeTypeIMX : public CEGLNativeType ++{ ++public: ++ CEGLNativeTypeIMX(); ++ virtual ~CEGLNativeTypeIMX(); ++ virtual std::string GetNativeName() const { return "iMX"; }; ++ virtual bool CheckCompatibility(); ++ virtual void Initialize(); ++ virtual void Destroy(); ++ virtual int GetQuirks() { return EGL_QUIRK_NONE; }; ++ ++ virtual bool CreateNativeDisplay(); ++ virtual bool CreateNativeWindow(); ++ virtual bool GetNativeDisplay(XBNativeDisplayType **nativeDisplay) const; ++ virtual bool GetNativeWindow(XBNativeWindowType **nativeWindow) const; ++ ++ virtual bool DestroyNativeWindow(); ++ virtual bool DestroyNativeDisplay(); ++ ++ virtual bool GetNativeResolution(RESOLUTION_INFO *res) const; ++ virtual bool SetNativeResolution(const RESOLUTION_INFO &res); ++ virtual bool ProbeResolutions(std::vector &resolutions); ++ virtual bool GetPreferredResolution(RESOLUTION_INFO *res) const; ++ ++ virtual bool ShowWindow(bool show); ++ ++ protected: ++ int get_sysfs_str(const char *path, char *valstr, const int size) const; ++ bool ModeToResolution(const char *mode, RESOLUTION_INFO *res) const; ++ ++ EGLNativeDisplayType m_display; ++ EGLNativeWindowType m_window; ++ ++protected: ++ struct fb_var_screeninfo m_screeninfo; ++ ++}; +diff -Naur xbmc-master.test/xbmc/windowing/egl/EGLWrapper.cpp xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLWrapper.cpp +--- xbmc-master.test/xbmc/windowing/egl/EGLWrapper.cpp 2014-01-10 19:50:20.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/EGLWrapper.cpp 2014-01-12 04:37:25.000000000 +0100 +@@ -17,11 +17,10 @@ + * . + * + */ +- ++#include "EGLNativeTypeIMX.h" + #include "system.h" + + #ifdef HAS_EGL +- + #include "utils/log.h" + #include "EGLNativeTypeAndroid.h" + #include "EGLNativeTypeAmlogic.h" +@@ -83,7 +82,8 @@ + if ((nativeGuess = CreateEGLNativeType(implementation)) || + (nativeGuess = CreateEGLNativeType(implementation)) || + (nativeGuess = CreateEGLNativeType(implementation)) || +- (nativeGuess = CreateEGLNativeType(implementation))) ++ (nativeGuess = CreateEGLNativeType(implementation)) || ++ (nativeGuess = CreateEGLNativeType(implementation))) + { + m_nativeTypes = nativeGuess; + +diff -Naur xbmc-master.test/xbmc/windowing/egl/Makefile.in xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/Makefile.in +--- xbmc-master.test/xbmc/windowing/egl/Makefile.in 2014-01-10 19:50:20.000000000 +0100 ++++ xbmc-wolfgar-imx-wip.test/xbmc/windowing/egl/Makefile.in 2014-01-12 04:37:25.000000000 +0100 +@@ -5,6 +5,7 @@ + SRCS+= EGLNativeTypeAndroid.cpp + SRCS+= EGLNativeTypeRaspberryPI.cpp + SRCS+= EGLNativeTypeWayland.cpp ++SRCS+= EGLNativeTypeIMX.cpp + SRCS+= EGLWrapper.cpp + + # Wayland specific detail diff --git a/projects/Cuboxi/patches/xbmc/xbmc-010-FLACcodec-improve-performance.patch b/projects/Cuboxi/patches/xbmc/xbmc-010-FLACcodec-improve-performance.patch new file mode 100644 index 0000000000..11f1e13f1d --- /dev/null +++ b/projects/Cuboxi/patches/xbmc/xbmc-010-FLACcodec-improve-performance.patch @@ -0,0 +1,245 @@ +diff -u axbmc/cores/paplayer/FLACcodec.cpp b/xbmc/cores/paplayer/FLACcodec.cpp +--- a/xbmc/cores/paplayer/FLACcodec.cpp 2013-05-02 16:46:47.000000000 +0200 ++++ b/xbmc/cores/paplayer/FLACcodec.cpp 2013-11-02 17:37:24.000000000 +0100 +@@ -23,6 +23,8 @@ + #include "cores/AudioEngine/Utils/AEUtil.h" + #include "music/tags/TagLoaderTagLib.h" + ++#define NUM_FRAMES 3 ++ + FLACCodec::FLACCodec() + { + m_SampleRate = 0; +@@ -37,8 +39,9 @@ + + m_pBuffer=NULL; + m_BufferSize=0; ++ m_BufferHead=0; ++ m_BufferTail=0; + m_MaxFrameSize=0; +- + } + + FLACCodec::~FLACCodec() +@@ -104,9 +107,13 @@ + delete[] m_pBuffer; + m_pBuffer=NULL; + } ++ + // allocate the buffer to hold the audio data, +- // it is 5 times bigger then a single decoded frame +- m_pBuffer=new BYTE[m_MaxFrameSize*5]; ++ // it is (NUM_FRAMES + 1) times bigger then a single decoded frame ++ m_BufferSize = m_MaxFrameSize * (NUM_FRAMES + 1); ++ m_pBuffer = new BYTE[m_BufferSize]; ++ m_BufferHead = 0; ++ m_BufferTail = 0; + + return true; + } +@@ -129,7 +136,7 @@ + // set the buffer size to 0 first, as this invokes a WriteCallback which + // may be called when the buffer is almost full (resulting in a buffer + // overrun unless we reset m_BufferSize first). +- m_BufferSize=0; ++ m_BufferHead = m_BufferTail; + if(!m_dll.FLAC__stream_decoder_seek_absolute(m_pFlacDecoder, (int64_t)(iSeekTime*m_SampleRate)/1000)) + CLog::Log(LOGERROR, "FLACCodec::Seek - failed to seek"); + +@@ -145,44 +152,39 @@ + + int FLACCodec::ReadPCM(BYTE *pBuffer, int size, int *actualsize) + { +- *actualsize=0; +- +- bool eof=false; +- if (m_dll.FLAC__stream_decoder_get_state(m_pFlacDecoder)==FLAC__STREAM_DECODER_END_OF_STREAM) +- eof=true; +- +- if (!eof) +- { +- // fill our buffer 4 decoded frame (the buffer could hold 5) +- while(m_BufferSize < m_MaxFrameSize*4 && ++ // fill our buffer NUM_FRAMES decoded frame (the buffer could hold NUM_FRAMES + 1) ++ while(BufferFillCount() < m_MaxFrameSize * NUM_FRAMES && + m_dll.FLAC__stream_decoder_get_state(m_pFlacDecoder)!=FLAC__STREAM_DECODER_END_OF_STREAM) ++ { ++ if (!m_dll.FLAC__stream_decoder_process_single(m_pFlacDecoder)) + { +- if (!m_dll.FLAC__stream_decoder_process_single(m_pFlacDecoder)) +- { +- CLog::Log(LOGERROR, "FLACCodec: Error decoding single block"); +- return READ_ERROR; +- } ++ CLog::Log(LOGERROR, "FLACCodec: Error decoding single block"); ++ *actualsize=0; ++ return READ_ERROR; + } + } + +- if (size 0) + { +- memcpy(pBuffer, m_pBuffer, m_BufferSize); +- *actualsize=m_BufferSize; +- m_BufferSize=0; +- } ++ int portion = BufferGetCount(); ++ ++ if (portion <= 0) ++ break; + +- if (eof && m_BufferSize==0) +- return READ_EOF; ++ if (portion > size) ++ portion = size; + +- return READ_SUCCESS; ++ memcpy(pTemp, m_pBuffer + m_BufferHead, portion); ++ pTemp += portion; ++ size -= portion; ++ m_BufferHead = (m_BufferHead + portion) % m_BufferSize; ++ } ++ *actualsize = pTemp - pBuffer; ++ ++ return (m_BufferHead == m_BufferTail && ++ m_dll.FLAC__stream_decoder_get_state(m_pFlacDecoder)==FLAC__STREAM_DECODER_END_OF_STREAM) ++ ? READ_EOF : READ_SUCCESS; + } + + bool FLACCodec::CanInit() +@@ -262,43 +264,67 @@ + return FLAC__STREAM_DECODER_WRITE_STATUS_ABORT; + + const int bytes_per_sample = frame->header.bits_per_sample/8; +- BYTE* outptr = pThis->m_pBuffer+pThis->m_BufferSize; +- FLAC__int16* outptr16 = (FLAC__int16 *) outptr; +- FLAC__int32* outptr32 = (FLAC__int32 *) outptr; ++ BYTE* outptr = pThis->m_pBuffer + pThis->m_BufferTail; ++ int outcnt = 0, outlen = pThis->BufferPutCount(); ++ ++ #ifdef __BIG_ENDIAN__ ++ int endian_shift = 32 - frame->header.bits_per_sample; ++ #endif + +- unsigned int current_sample = 0; +- for(current_sample = 0; current_sample < frame->header.blocksize; current_sample++) ++ for(unsigned int current_sample = 0; current_sample < frame->header.blocksize; current_sample++) + { + for(unsigned int channel = 0; channel < frame->header.channels; channel++) + { +- switch(bytes_per_sample) ++ FLAC__int32 v = buffer[channel][current_sample]; ++ ++ // make 1 byte samples unsigned ++ if (bytes_per_sample == 1) ++ v ^= 0x80; ++ ++ #ifdef __BIG_ENDIAN__ ++ v <<= endian_shift; ++ #endif ++ ++ if (outlen - outcnt >= 4) + { +- case 2: +- outptr16[current_sample*frame->header.channels + channel] = (FLAC__int16) buffer[channel][current_sample]; +- break; +- case 3: +- outptr[2] = (buffer[channel][current_sample] >> 16) & 0xff; +- outptr[1] = (buffer[channel][current_sample] >> 8 ) & 0xff; +- outptr[0] = (buffer[channel][current_sample] >> 0 ) & 0xff; +- outptr += bytes_per_sample; +- break; +- default: +- outptr32[current_sample*frame->header.channels + channel] = buffer[channel][current_sample]; +- break; ++ *((FLAC__int32 *)outptr) = v; ++ ++ outptr += bytes_per_sample; ++ outcnt += bytes_per_sample; ++ ++ if (outcnt >= outlen) ++ { ++ pThis->m_BufferTail = (pThis->m_BufferTail + outcnt) % pThis->m_BufferSize; ++ outcnt = 0; ++ outlen = pThis->BufferPutCount(); ++ outptr = pThis->m_pBuffer + pThis->m_BufferTail; ++ } ++ ++ continue; + } +- } +- } + +- if (bytes_per_sample == 1) +- { +- for(unsigned int i=0;im_pBuffer+pThis->m_BufferSize; +- outptr[i]^=0x80; ++ for(int byte_no = 0; byte_no < bytes_per_sample; byte_no++) ++ { ++ #ifdef __BIG_ENDIAN__ ++ *outptr++ = (BYTE)(v >> 24); ++ v <<= 8; ++ #else ++ *outptr++ = (BYTE)v; ++ v >>= 8; ++ #endif ++ ++ if (++outcnt >= outlen) ++ { ++ pThis->m_BufferTail = (pThis->m_BufferTail + outcnt) % pThis->m_BufferSize; ++ outcnt = 0; ++ outlen = pThis->BufferPutCount(); ++ outptr = pThis->m_pBuffer + pThis->m_BufferTail; ++ } ++ } + } + } + +- pThis->m_BufferSize += current_sample*bytes_per_sample*frame->header.channels; ++ pThis->m_BufferTail = (pThis->m_BufferTail + outcnt) % pThis->m_BufferSize; + + return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; + } +diff -u a/xbmc/cores/paplayer/FLACcodec.h b/xbmc/cores/paplayer/FLACcodec.h +--- a/xbmc/cores/paplayer/FLACcodec.h 2013-05-02 16:46:47.000000000 +0200 ++++ b/xbmc/cores/paplayer/FLACcodec.h 2013-11-02 17:44:53.000000000 +0100 +@@ -51,8 +51,27 @@ + + DllLibFlac m_dll; + BYTE* m_pBuffer; // buffer to hold the decoded audio data +- int m_BufferSize; // size of buffer is filled with decoded audio data ++ int m_BufferSize; // allocated size of buffer ++ int m_BufferHead; // buffer head index ++ int m_BufferTail; // buffer tail index + int m_MaxFrameSize; // size of a single decoded frame + FLAC__StreamDecoder* m_pFlacDecoder; + CAEChannelInfo m_ChannelInfo; ++ ++ int BufferFillCount() const ++ { ++ int i = m_BufferTail - m_BufferHead; ++ return (i < 0) ? (i + m_BufferSize) : i; ++ } ++ ++ int BufferGetCount() const ++ { ++ return ((m_BufferTail >= m_BufferHead) ? m_BufferTail : m_BufferSize) - m_BufferHead; ++ } ++ ++ int BufferPutCount() const ++ { ++ return ((m_BufferTail >= m_BufferHead) ? ++ (m_BufferSize + ((m_BufferHead == 0) ? 0 : 1)) : m_BufferHead) - m_BufferTail - 1; ++ } + };