update ltq-tapidemo to 5.1.0.53

SVN-Revision: 27533
owl
John Crispin 2011-07-07 18:20:11 +00:00
parent dc69e5f2e3
commit 985d4dd88f
5 changed files with 224 additions and 95 deletions

View File

@ -1,12 +1,9 @@
#menu "Configuration"
# depends on PACKAGE_ltq-tapidemo
choice
prompt "board selection"
depends on PACKAGE_ltq-tapidemo
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
default VOICE_CPE_TAPIDEMO_BOARD_EASY50712_V3 if TARGET_lantiq_xway
default VOICE_CPE_TAPIDEMO_BOARD_EASY508xx if TARGET_lantiq_ar9
default VOICE_CPE_TAPIDEMO_BOARD_EASY80910 if TARGET_lantiq_vr9
help
Select the target platform.
@ -26,16 +23,25 @@ endchoice
config VOICE_CPE_TAPIDEMO_QOS
bool "enable QOS support"
depends on PACKAGE_ltq-tapidemo
default n
select PACKAGE_kmod-ltq-kpi2udp
default y
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) && PACKAGE_ltq
depends on (TARGET_lantiq_ar9 || TARGET_lantiq_vr9) && PACKAGE_ltq-tapidemo
default n
help
enable T.38 fax relay demo.
#endmenu
config VOICE_CPE_TAPIDEMO_FW_FILE
string "override default firmware file"
depends on PACKAGE_ltq-tapidemo
default "falcon_voip_fw.bin" if TARGET_lantiq_falcon
config VOICE_CPE_TAPIDEMO_BBD_FILE
string "override default coefficient file"
depends on PACKAGE_ltq-tapidemo
default "falcon_bbd.bin" if TARGET_lantiq_falcon

View File

@ -9,18 +9,21 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=tapidemo
PKG_VERSION:=5.0.1.27
PKG_VERSION:=5.1.0.53
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
PKG_MD5SUM:=a38a7bf3242aad607f50f57b988bc87c
PKG_MD5SUM:=c970becc46b2935fb9e18f795d4e8469
PKG_FIXUP:=autoreconf
include $(INCLUDE_DIR)/package.mk
define Package/ltq-tapidemo
SECTION:=utils
CATEGORY:=Utilities
SUBMENU:=Telephony
SECTION:=net
CATEGORY:=Network
TITLE:=TAPIdemo application for Lantiq boards
URL:=http://www.lantiq.com/
DEPENDS:=+kmod-ltq-tapi +kmod-ltq-vmmc
@ -41,6 +44,8 @@ CONFIGURE_ARGS += \
--enable-linux-26 \
--enable-kernelincl="$(LINUX_DIR)/include" \
--with-drvincl="$(STAGING_DIR)/usr/include" \
--with-ifxos-incl=$(STAGING_DIR)/usr/include/ifxos \
--with-ifxos-lib=$(STAGING_DIR)/usr/lib \
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPI_QOS,qos) \
$(call autoconf_bool,CONFIG_VOICE_CPE_TAPIDEMO_FAX_T,fax-t38) \
--enable-trace \
@ -58,6 +63,12 @@ endif
ifeq ($(CONFIG_VOICE_CPE_TAPIDEMO_BOARD_EASY80910),y)
CONFIGURE_ARGS += --enable-boardname=EASY508XX
endif
ifneq ($(CONFIG_VOICE_CPE_TAPIDEMO_FW_FILE),)
CONFIGURE_ARGS += --with-fw-file="$(strip $(subst ",, $(CONFIG_VOICE_CPE_TAPIDEMO_FW_FILE)))"
endif
ifneq ($(CONFIG_VOICE_CPE_TAPIDEMO_BBD_FILE), "")
CONFIGURE_ARGS += --with-bbd-file="$(strip $(subst ",, $(CONFIG_VOICE_CPE_TAPIDEMO_BBD_FILE)))"
endif
define Package/ltq-tapidemo/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/etc/init.d/

View File

@ -1,78 +1,61 @@
--- 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"
--- a/src/board_easy50712.c
+++ b/src/board_easy50712.c
@@ -32,7 +32,9 @@
#ifdef OLD_BSP
#include "asm/danube/port.h"
#else
- #include "asm/ifx/ifx_gpio.h"
+#ifdef FXO
+# include "asm/ifx/ifx_gpio.h"
+#endif
#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
--- a/src/board_easy508xx.c
+++ b/src/board_easy508xx.c
@@ -32,8 +32,6 @@
#endif /* FXO */
#include "pcm.h"
-#include "asm/ifx/ifx_gpio.h"
-
+#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)
#ifdef TD_DECT
#include "td_dect.h"
#endif /* TD_DECT */
--- a/src/common.c
+++ b/src/common.c
@@ -7117,7 +7117,7 @@ IFX_return_t Common_GPIO_ClosePort(IFX_c
IFX_return_t Common_GPIO_ReservePin(IFX_int32_t nFd, IFX_int32_t nPort,
IFX_int32_t nPin, IFX_int32_t nModule)
{
@@ -1204,7 +1211,3 @@
pBoard->RemoveBoard = BOARD_Easy50712_RemoveBoard;
return IFX_SUCCESS;
}
-
-
-
-
-#ifndef OLD_BSP
+#if !defined(OLD_BSP) && defined(IFX_GPIO_IOC_PIN_RESERVE)
TD_PARAMETER_CHECK((NO_GPIO_FD >= nFd), nFd, IFX_ERROR);
IFX_return_t nRet;
@@ -7155,7 +7155,7 @@ IFX_return_t Common_GPIO_ReservePin(IFX_
IFX_return_t Common_GPIO_FreePin(IFX_int32_t nFd, IFX_int32_t nPort,
IFX_int32_t nPin, IFX_int32_t nModule)
{
-#ifndef OLD_BSP
+#if !defined(OLD_BSP) && defined(IFX_GPIO_IOC_PIN_RESERVE)
TD_PARAMETER_CHECK((NO_GPIO_FD >= nFd), nFd, IFX_ERROR);
IFX_return_t nRet;
--- a/src/common.h
+++ b/src/common.h
@@ -79,12 +79,12 @@
#ifdef OLD_BSP
#include "asm/danube/port.h"
#else
- #include "asm/ifx/ifx_gpio.h"
+ /*#include "asm/ifx/ifx_gpio.h"*/
#endif
#endif
#if (defined(AR9) || defined(VR9))
- #include "asm/ifx/ifx_gpio.h"
+ /*#include "asm/ifx/ifx_gpio.h"*/
#endif
#ifdef TD_DECT

View File

@ -0,0 +1,141 @@
--- a/configure.in
+++ b/configure.in
@@ -1665,6 +1665,30 @@ AC_ARG_WITH(cflags,
]
)
+dnl overwrite default FW file name
+AC_ARG_WITH(fw-file,
+ AS_HELP_STRING(
+ [--with-fw-file=val],
+ [overwrite default FW file name]
+ ),
+ [
+ AC_MSG_RESULT([using firmware file $withval])
+ AC_DEFINE_UNQUOTED([TD_FW_FILE], ["$withval"], [using firmware file])
+ ]
+)
+
+dnl overwrite default BBD file name
+AC_ARG_WITH(bbd-file,
+ AS_HELP_STRING(
+ [--with-bbd-file=val],
+ [overwrite default BBD file name]
+ ),
+ [
+ AC_MSG_RESULT([using BBD file $withval])
+ AC_DEFINE_UNQUOTED([TD_BBD_FILE], ["$withval"], [using BBD file])
+ ]
+)
+
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
--- a/src/device_vmmc.c
+++ b/src/device_vmmc.c
@@ -49,40 +49,55 @@
#ifdef USE_FILESYSTEM
+#ifdef TD_BBD_FILE
+ IFX_char_t* sBBD_CRAM_File_VMMC = TD_BBD_FILE;
+ IFX_char_t* sBBD_CRAM_File_VMMC_Old = TD_BBD_FILE;
+#else
+ /** File holding coefficients. */
+#ifdef DANUBE
+ /** Prepare file names for DANUBE */
+ IFX_char_t* sBBD_CRAM_File_VMMC = "danube_bbd.bin";
+ IFX_char_t* sBBD_CRAM_File_VMMC_Old = "danube_bbd_fxs.bin";
+#elif AR9
+ IFX_char_t* sBBD_CRAM_File_VMMC = "ar9_bbd.bin";
+ IFX_char_t* sBBD_CRAM_File_VMMC_Old = "ar9_bbd_fxs.bin";
+#elif VINAX
+ IFX_char_t* sBBD_CRAM_File_VMMC = "bbd.bin";
+ IFX_char_t* sBBD_CRAM_File_VMMC_Old = "";
+#elif VR9
+ IFX_char_t* sBBD_CRAM_File_VMMC = "vr9_bbd.bin";
+ IFX_char_t* sBBD_CRAM_File_VMMC_Old = "vr9_bbd_fxs.bin";
+#else
+#endif
+#endif /* TD_BBD_FILE */
+#ifdef TD_FW_FILE
+ IFX_char_t* sPRAMFile_VMMC = TD_FW_FILE;
+ IFX_char_t* sPRAMFile_VMMC_Old = TD_FW_FILE;
+ IFX_char_t* sDRAMFile_VMMC = "";
+#else
#ifdef DANUBE
/** Prepare file names for DANUBE */
IFX_char_t* sPRAMFile_VMMC = "voice_danube_firmware.bin";
IFX_char_t* sPRAMFile_VMMC_Old = "danube_firmware.bin";
IFX_char_t* sDRAMFile_VMMC = "";
- /** File holding coefficients. */
- IFX_char_t* sBBD_CRAM_File_VMMC = "danube_bbd.bin";
- IFX_char_t* sBBD_CRAM_File_VMMC_Old = "danube_bbd_fxs.bin";
#elif AR9
/** Prepare file names for AR9 */
IFX_char_t* sPRAMFile_VMMC = "voice_ar9_firmware.bin";
IFX_char_t* sPRAMFile_VMMC_Old = "ar9_firmware.bin";
IFX_char_t* sDRAMFile_VMMC = "";
- /** File holding coefficients. */
- IFX_char_t* sBBD_CRAM_File_VMMC = "ar9_bbd.bin";
- IFX_char_t* sBBD_CRAM_File_VMMC_Old = "ar9_bbd_fxs.bin";
#elif VINAX
/** Prepare file names for VINAX */
IFX_char_t* sPRAMFile_VMMC = "voice_vinax_firmware.bin";
IFX_char_t* sPRAMFile_VMMC_Old = "firmware.bin";
IFX_char_t* sDRAMFile_VMMC = "";
- /** File holding coefficients. */
- IFX_char_t* sBBD_CRAM_File_VMMC = "bbd.bin";
- IFX_char_t* sBBD_CRAM_File_VMMC_Old = "";
#elif VR9
/** Prepare file names for VR9 */
IFX_char_t* sPRAMFile_VMMC = "voice_vr9_firmware.bin";
IFX_char_t* sPRAMFile_VMMC_Old = "vr9_firmware.bin";
IFX_char_t* sDRAMFile_VMMC = "";
- /** File holding coefficients. */
- IFX_char_t* sBBD_CRAM_File_VMMC = "vr9_bbd.bin";
- IFX_char_t* sBBD_CRAM_File_VMMC_Old = "vr9_bbd_fxs.bin";
#else
#endif
+#endif /* TD_FW_FILE */
#endif /* USE_FILESYSTEM */
/** Device names */
--- a/src/common.c
+++ b/src/common.c
@@ -509,6 +509,10 @@ IFX_return_t Common_CheckDownloadPath(IF
if (IFX_TRUE != Common_FindBBD_CRAM(pCpuDevice, psPath, psFile))
{
ret = IFX_ERROR;
+ if(bPrintTrace)
+ TRACE(TAPIDEMO, DBG_LEVEL_LOW,
+ ("Download path %s does not contain the required file %s.\n",
+ psPath, psFile));
}
if ((IFX_SUCCESS == ret) &&
@@ -521,6 +525,10 @@ IFX_return_t Common_CheckDownloadPath(IF
{
ret = Common_CheckFileExists(psFile);
}
+ if(bPrintTrace && ret != IFX_SUCCESS)
+ TRACE(TAPIDEMO, DBG_LEVEL_LOW,
+ ("Download path %s does not contain the required file %s.\n",
+ psPath, psFile));
}
#ifndef TAPI_VERSION4
if (IFX_SUCCESS == ret)
@@ -532,13 +540,6 @@ IFX_return_t Common_CheckDownloadPath(IF
}
#endif
- if (IFX_ERROR == ret)
- {
- if(bPrintTrace)
- TRACE(TAPIDEMO, DBG_LEVEL_LOW,
- ("Download path %s does not contain the required files.\n",
- psPath));
- }
return ret;
} /* Common_CheckDownloadPath */

View File

@ -1,12 +0,0 @@
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 */