aboutsummaryrefslogtreecommitdiffstats
path: root/package/ifx-tapidemo
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2010-03-31 11:12:33 +0000
committerJohn Crispin <blogic@openwrt.org>2010-03-31 11:12:33 +0000
commite0259bb9116d33a46f90b3edf9174834635a1ec6 (patch)
tree7aa5abef16700e83d3873c24c2095d6390f5b22a /package/ifx-tapidemo
parent3f269166c14acd27187e0c37ae3e95c6900ac0fa (diff)
downloadupstream-e0259bb9116d33a46f90b3edf9174834635a1ec6.tar.gz
upstream-e0259bb9116d33a46f90b3edf9174834635a1ec6.tar.bz2
upstream-e0259bb9116d33a46f90b3edf9174834635a1ec6.zip
[ifxmips] adds voip support
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20637 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/ifx-tapidemo')
-rw-r--r--package/ifx-tapidemo/Config.in36
-rw-r--r--package/ifx-tapidemo/Makefile70
-rw-r--r--package/ifx-tapidemo/files/bringup_tapidemo89
-rw-r--r--package/ifx-tapidemo/patches/100-ifxmips.patch78
-rw-r--r--package/ifx-tapidemo/patches/110-no_echo_cancelation.patch12
5 files changed, 285 insertions, 0 deletions
diff --git a/package/ifx-tapidemo/Config.in b/package/ifx-tapidemo/Config.in
new file mode 100644
index 0000000000..32594ba9cb
--- /dev/null
+++ b/package/ifx-tapidemo/Config.in
@@ -0,0 +1,36 @@
+choice
+ prompt "board selection"
+ default VOICE_CPE_TAPIDEMO_BOARD_EASY50712_V3 if TARGET_ifxmips_platform_danube
+ default VOICE_CPE_TAPIDEMO_BOARD_EASY508xx if TARGET_ifxmips_platform_ar9
+ default VOICE_CPE_TAPIDEMO_BOARD_EASY80910 if TARGET_ifxmips_platform_vr9
+ default VOICE_CPE_TAPIDEMO_BOARD_EASY50812
+ help
+ Select the target platform.
+
+ config VOICE_CPE_TAPIDEMO_BOARD_EASY50712
+ bool "Danube reference board"
+
+ config VOICE_CPE_TAPIDEMO_BOARD_EASY50712_V3
+ bool "Danube reference board V3"
+
+ config VOICE_CPE_TAPIDEMO_BOARD_EASY508xx
+ bool "AR9/GR9 reference board"
+
+ config VOICE_CPE_TAPIDEMO_BOARD_EASY80910
+ bool "VR9 reference board"
+endchoice
+
+config VOICE_CPE_TAPIDEMO_QOS
+ bool "enable QOS support"
+ default n
+ help
+ Option to enable the KPI2UDP RTP packet acceleration path
+ (highly recommended for VoIP).
+
+config VOICE_CPE_TAPIDEMO_FAX_T.38_FW
+ bool "enable T.38 fax relay"
+ depends on (TARGET_ifxmips_platform_ar9 || TARGET_ifxmips_platform_vr9)
+ default n
+ help
+ enable T.38 fax relay demo.
+
diff --git a/package/ifx-tapidemo/Makefile b/package/ifx-tapidemo/Makefile
new file mode 100644
index 0000000000..217d4641a5
--- /dev/null
+++ b/package/ifx-tapidemo/Makefile
@@ -0,0 +1,70 @@
+#
+# Copyright (C) 2008 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id: $
+
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/kernel.mk
+
+PKG_NAME:=tapidemo
+PKG_VERSION:=5.0.1.27
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
+PKG_MD5SUM:=a38a7bf3242aad607f50f57b988bc87c
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ifx-tapidemo
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=TAPIdemo application for Lantiq boards
+ URL:=http://www.lantiq.com/
+ MAINTAINER:=Lantiq
+ DEPENDS:=+kmod-ifx-tapi +kmod-ifx-vmmc @BROKEN
+endef
+
+define Package/ifx-tapidemo/description
+ Voice Access mini-PBX Demo Application
+endef
+
+define Package/ifx-tapidemo/config
+ if PACKAGE_ifx-tapidemo
+ source "$(SOURCE)/Config.in"
+ endif
+endef
+
+CONFIGURE_ARGS += \
+ ARCH=$(LINUX_KARCH) \
+ --enable-linux-26 \
+ --enable-kernelincl="$(LINUX_DIR)/include" \
+ --with-drvincl="$(STAGING_DIR)/usr/include" \
+ $(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_QOS,qos) \
+ $(call autoconf_bool,CONFIG_VOICE_CPE_TAPIDEMO_FAX_T,fax-t38) \
+ --enable-trace \
+ --enable-fs
+
+ifeq ($(CONFIG_VOICE_CPE_TAPIDEMO_BOARD_EASY50712),y)
+ CONFIGURE_ARGS += --enable-boardname=EASY50712
+endif
+ifeq ($(CONFIG_VOICE_CPE_TAPIDEMO_BOARD_EASY50712_V3),y)
+ CONFIGURE_ARGS += --enable-boardname=EASY50712_V3
+endif
+ifeq ($(CONFIG_VOICE_CPE_TAPIDEMO_BOARD_EASY508xx),y)
+ CONFIGURE_ARGS += --enable-boardname=EASY508XX
+endif
+ifeq ($(CONFIG_VOICE_CPE_TAPIDEMO_BOARD_EASY80910),y)
+ CONFIGURE_ARGS += --enable-boardname=EASY508XX
+endif
+
+define Package/ifx-tapidemo/install
+ $(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/tapidemo $(1)/usr/sbin
+ $(INSTALL_BIN) ./files/bringup_tapidemo $(1)/etc/init.d/tapidemo
+endef
+
+$(eval $(call BuildPackage,ifx-tapidemo))
diff --git a/package/ifx-tapidemo/files/bringup_tapidemo b/package/ifx-tapidemo/files/bringup_tapidemo
new file mode 100644
index 0000000000..e3abd56390
--- /dev/null
+++ b/package/ifx-tapidemo/files/bringup_tapidemo
@@ -0,0 +1,89 @@
+#!/bin/sh /etc/rc.common
+# (C) 2008 openwrt.org
+
+START=96
+
+[ ! -f /dev/vmmc10 ] && {
+ mknod /dev/vmmc10 c 122 10
+ mknod /dev/vmmc11 c 122 11
+ mknod /dev/vmmc12 c 122 12
+ mknod /dev/vmmc13 c 122 13
+ mknod /dev/vmmc14 c 122 14
+ mknod /dev/vmmc15 c 122 15
+ mknod /dev/vmmc16 c 122 16
+ mknod /dev/vmmc17 c 122 17
+ mknod /dev/vmmc18 c 122 18
+}
+
+TD_EXTRA_FLAGS_FXO=
+TD_EXTRA_FLAGS_KPI2UDP=
+TD_DOWNLOAD_PATH=/opt/lantiq/downloads/
+DEV_NODE_TERIDIAN=ter10
+
+ # Show help
+help()
+{
+ echo "Usage:"
+ echo " - $0 WAN-IF-NAME - start TAPIDEMO without FXO support"
+ echo " - $0 WAN-IF-NAME fxo - start TAPIDEMO with FXO support."
+ echo " - $0 stop - stop TAPIDEMO"
+}
+
+# Check if device node for Teridian exists
+checkFxoSupport()
+{
+ if [ ! -e /dev/$DEV_NODE_TERIDIAN ];then
+ echo "FXO support is disabled. Can not find required driver's device node."
+ else
+ TD_EXTRA_FLAGS_FXO="-x"
+ fi
+}
+
+# Check if module drv_kpi2udp is loaded
+checkKpi2UdpSupport()
+{
+ tmp=`cat /proc/modules | grep 'drv_kpi2udp '`
+ if [ "$tmp" != "" ]; then
+ TD_EXTRA_FLAGS_KPI2UDP="-q"
+ fi
+}
+
+start()
+{
+ TD_WANIF=$1
+
+ TD_WANIF_IP=`ifconfig $TD_WANIF | grep 'inet addr:' | cut -f2 -d: | cut -f1 -d' '`
+ if [ "$TD_WANIF_IP" = "" ]; then
+ echo "Error, getting IP address for network device $TD_WANIF failed."
+ exit 1
+ fi
+
+ if [ "$2" = "" ];then
+ # FXO support is disabled.
+ continue
+ elif [ "$2" = "fxo" ];then
+ checkFxoSupport
+ else
+ echo "Error, unknown second parameter."
+ help
+ exit 1
+ fi
+
+ checkKpi2UdpSupport
+
+ if [ -r /etc/rc.conf ]; then
+ . /etc/rc.conf
+ fi
+
+ TD_DEBUG_LEVEL=$tapiDebugLevel
+ if [ "$TD_DEBUG_LEVEL" = "" ]; then
+ TD_DEBUG_LEVEL=3
+ fi
+
+ /usr/sbin/tapidemo -d $TD_DEBUG_LEVEL $TD_EXTRA_FLAGS_FXO $TD_EXTRA_FLAGS_KPI2UDP -i $TD_WANIF_IP -l $TD_DOWNLOAD_PATH &
+}
+
+stop()
+{
+ killall tapidemo > /dev/null 2> /dev/null
+}
diff --git a/package/ifx-tapidemo/patches/100-ifxmips.patch b/package/ifx-tapidemo/patches/100-ifxmips.patch
new file mode 100644
index 0000000000..43fa988ef7
--- /dev/null
+++ b/package/ifx-tapidemo/patches/100-ifxmips.patch
@@ -0,0 +1,78 @@
+--- a/src/board_easy50712.c Mon Mar 15 14:47:53 2010 +0300
++++ b/src/board_easy50712.c Tue Mar 16 17:25:55 2010 +0300
+@@ -40,7 +40,9 @@
+ #endif /* DUSLIC_FXO */
+ #endif /* EASY50712_V3 */
+
+-#include "asm/ifx/ifx_gpio.h"
++#ifdef FXO
++# include "asm/ifx/ifx_gpio.h"
++#endif
+
+ /* ============================= */
+ /* Defines */
+@@ -896,6 +898,7 @@
+ /* Global function definition */
+ /* ============================= */
+
++#ifdef FXO
+ /**
+ Set direction of GPIO pin to out which is used for set/clear reset.
+
+@@ -944,7 +947,7 @@
+ return IFX_SUCCESS;
+ }
+ break;
+-
++
+ case GPIO_DUSLIC_EASY50510:
+ {
+ TRACE(TAPIDEMO, DBG_LEVEL_LOW,
+@@ -982,8 +985,9 @@
+
+ return IFX_SUCCESS;
+ };
++#endif
+
+-
++#ifdef FXO
+ /*
+ Set/Clear reset of device by using GPIO port.
+
+@@ -1086,7 +1090,9 @@
+ /* usleep(100000); karol - workaround, */
+ return ret;
+ }
++#endif
+
++#ifdef EASY50510
+ /**
+ Set PCM master mode.
+
+@@ -1178,15 +1184,16 @@
+
+ return ret;
+ }
++#endif
+
+ /**
+ Register board.
+
+ \param pBoard - pointer to board
+-
++
+ \return IFX_SUCCESS if successful, otherwise IFX_ERROR.
+
+- \remarks
++ \remarks
+ */
+ IFX_return_t BOARD_Easy50712_Register(BOARD_t* pBoard)
+ {
+@@ -1204,7 +1211,3 @@
+ pBoard->RemoveBoard = BOARD_Easy50712_RemoveBoard;
+ return IFX_SUCCESS;
+ }
+-
+-
+-
+-
diff --git a/package/ifx-tapidemo/patches/110-no_echo_cancelation.patch b/package/ifx-tapidemo/patches/110-no_echo_cancelation.patch
new file mode 100644
index 0000000000..d424d48470
--- /dev/null
+++ b/package/ifx-tapidemo/patches/110-no_echo_cancelation.patch
@@ -0,0 +1,12 @@
+Index: tapidemo-5.0.1.27/src/device_vmmc.c
+===================================================================
+--- tapidemo-5.0.1.27.orig/src/device_vmmc.c 2009-11-09 15:40:31.000000000 +0100
++++ tapidemo-5.0.1.27/src/device_vmmc.c 2010-03-30 21:32:51.000000000 +0200
+@@ -240,7 +240,6 @@
+ TRACE(TAPIDEMO, DBG_LEVEL_HIGH,
+ ("Error, BBD file %s is not found.\n(File: %s, line: %d)\n",
+ pCpuDevice->pszBBD_CRAM_File, __FILE__, __LINE__));
+- return IFX_ERROR;
+ }
+
+ #endif /* USE_FILESYSTEM */