| 1 | --- a/configure.in |
| 2 | +++ b/configure.in |
| 3 | @@ -1665,6 +1665,30 @@ AC_ARG_WITH(cflags, |
| 4 | ] |
| 5 | ) |
| 6 | |
| 7 | +dnl overwrite default FW file name |
| 8 | +AC_ARG_WITH(fw-file, |
| 9 | + AS_HELP_STRING( |
| 10 | + [--with-fw-file=val], |
| 11 | + [overwrite default FW file name] |
| 12 | + ), |
| 13 | + [ |
| 14 | + AC_MSG_RESULT([using firmware file $withval]) |
| 15 | + AC_DEFINE_UNQUOTED([TD_FW_FILE], ["$withval"], [using firmware file]) |
| 16 | + ] |
| 17 | +) |
| 18 | + |
| 19 | +dnl overwrite default BBD file name |
| 20 | +AC_ARG_WITH(bbd-file, |
| 21 | + AS_HELP_STRING( |
| 22 | + [--with-bbd-file=val], |
| 23 | + [overwrite default BBD file name] |
| 24 | + ), |
| 25 | + [ |
| 26 | + AC_MSG_RESULT([using BBD file $withval]) |
| 27 | + AC_DEFINE_UNQUOTED([TD_BBD_FILE], ["$withval"], [using BBD file]) |
| 28 | + ] |
| 29 | +) |
| 30 | + |
| 31 | AC_CONFIG_FILES([Makefile]) |
| 32 | AC_CONFIG_FILES([src/Makefile]) |
| 33 | |
| 34 | --- a/src/device_vmmc.c |
| 35 | +++ b/src/device_vmmc.c |
| 36 | @@ -49,40 +49,55 @@ |
| 37 | |
| 38 | |
| 39 | #ifdef USE_FILESYSTEM |
| 40 | +#ifdef TD_BBD_FILE |
| 41 | + IFX_char_t* sBBD_CRAM_File_VMMC = TD_BBD_FILE; |
| 42 | + IFX_char_t* sBBD_CRAM_File_VMMC_Old = TD_BBD_FILE; |
| 43 | +#else |
| 44 | + /** File holding coefficients. */ |
| 45 | +#ifdef DANUBE |
| 46 | + /** Prepare file names for DANUBE */ |
| 47 | + IFX_char_t* sBBD_CRAM_File_VMMC = "danube_bbd.bin"; |
| 48 | + IFX_char_t* sBBD_CRAM_File_VMMC_Old = "danube_bbd_fxs.bin"; |
| 49 | +#elif AR9 |
| 50 | + IFX_char_t* sBBD_CRAM_File_VMMC = "ar9_bbd.bin"; |
| 51 | + IFX_char_t* sBBD_CRAM_File_VMMC_Old = "ar9_bbd_fxs.bin"; |
| 52 | +#elif VINAX |
| 53 | + IFX_char_t* sBBD_CRAM_File_VMMC = "bbd.bin"; |
| 54 | + IFX_char_t* sBBD_CRAM_File_VMMC_Old = ""; |
| 55 | +#elif VR9 |
| 56 | + IFX_char_t* sBBD_CRAM_File_VMMC = "vr9_bbd.bin"; |
| 57 | + IFX_char_t* sBBD_CRAM_File_VMMC_Old = "vr9_bbd_fxs.bin"; |
| 58 | +#else |
| 59 | +#endif |
| 60 | +#endif /* TD_BBD_FILE */ |
| 61 | +#ifdef TD_FW_FILE |
| 62 | + IFX_char_t* sPRAMFile_VMMC = TD_FW_FILE; |
| 63 | + IFX_char_t* sPRAMFile_VMMC_Old = TD_FW_FILE; |
| 64 | + IFX_char_t* sDRAMFile_VMMC = ""; |
| 65 | +#else |
| 66 | #ifdef DANUBE |
| 67 | /** Prepare file names for DANUBE */ |
| 68 | IFX_char_t* sPRAMFile_VMMC = "voice_danube_firmware.bin"; |
| 69 | IFX_char_t* sPRAMFile_VMMC_Old = "danube_firmware.bin"; |
| 70 | IFX_char_t* sDRAMFile_VMMC = ""; |
| 71 | - /** File holding coefficients. */ |
| 72 | - IFX_char_t* sBBD_CRAM_File_VMMC = "danube_bbd.bin"; |
| 73 | - IFX_char_t* sBBD_CRAM_File_VMMC_Old = "danube_bbd_fxs.bin"; |
| 74 | #elif AR9 |
| 75 | /** Prepare file names for AR9 */ |
| 76 | IFX_char_t* sPRAMFile_VMMC = "voice_ar9_firmware.bin"; |
| 77 | IFX_char_t* sPRAMFile_VMMC_Old = "ar9_firmware.bin"; |
| 78 | IFX_char_t* sDRAMFile_VMMC = ""; |
| 79 | - /** File holding coefficients. */ |
| 80 | - IFX_char_t* sBBD_CRAM_File_VMMC = "ar9_bbd.bin"; |
| 81 | - IFX_char_t* sBBD_CRAM_File_VMMC_Old = "ar9_bbd_fxs.bin"; |
| 82 | #elif VINAX |
| 83 | /** Prepare file names for VINAX */ |
| 84 | IFX_char_t* sPRAMFile_VMMC = "voice_vinax_firmware.bin"; |
| 85 | IFX_char_t* sPRAMFile_VMMC_Old = "firmware.bin"; |
| 86 | IFX_char_t* sDRAMFile_VMMC = ""; |
| 87 | - /** File holding coefficients. */ |
| 88 | - IFX_char_t* sBBD_CRAM_File_VMMC = "bbd.bin"; |
| 89 | - IFX_char_t* sBBD_CRAM_File_VMMC_Old = ""; |
| 90 | #elif VR9 |
| 91 | /** Prepare file names for VR9 */ |
| 92 | IFX_char_t* sPRAMFile_VMMC = "voice_vr9_firmware.bin"; |
| 93 | IFX_char_t* sPRAMFile_VMMC_Old = "vr9_firmware.bin"; |
| 94 | IFX_char_t* sDRAMFile_VMMC = ""; |
| 95 | - /** File holding coefficients. */ |
| 96 | - IFX_char_t* sBBD_CRAM_File_VMMC = "vr9_bbd.bin"; |
| 97 | - IFX_char_t* sBBD_CRAM_File_VMMC_Old = "vr9_bbd_fxs.bin"; |
| 98 | #else |
| 99 | #endif |
| 100 | +#endif /* TD_FW_FILE */ |
| 101 | #endif /* USE_FILESYSTEM */ |
| 102 | |
| 103 | /** Device names */ |
| 104 | --- a/src/common.c |
| 105 | +++ b/src/common.c |
| 106 | @@ -509,6 +509,10 @@ IFX_return_t Common_CheckDownloadPath(IF |
| 107 | if (IFX_TRUE != Common_FindBBD_CRAM(pCpuDevice, psPath, psFile)) |
| 108 | { |
| 109 | ret = IFX_ERROR; |
| 110 | + if(bPrintTrace) |
| 111 | + TRACE(TAPIDEMO, DBG_LEVEL_LOW, |
| 112 | + ("Download path %s does not contain the required file %s.\n", |
| 113 | + psPath, psFile)); |
| 114 | } |
| 115 | |
| 116 | if ((IFX_SUCCESS == ret) && |
| 117 | @@ -521,6 +525,10 @@ IFX_return_t Common_CheckDownloadPath(IF |
| 118 | { |
| 119 | ret = Common_CheckFileExists(psFile); |
| 120 | } |
| 121 | + if(bPrintTrace && ret != IFX_SUCCESS) |
| 122 | + TRACE(TAPIDEMO, DBG_LEVEL_LOW, |
| 123 | + ("Download path %s does not contain the required file %s.\n", |
| 124 | + psPath, psFile)); |
| 125 | } |
| 126 | #ifndef TAPI_VERSION4 |
| 127 | if (IFX_SUCCESS == ret) |
| 128 | @@ -532,13 +540,6 @@ IFX_return_t Common_CheckDownloadPath(IF |
| 129 | } |
| 130 | #endif |
| 131 | |
| 132 | - if (IFX_ERROR == ret) |
| 133 | - { |
| 134 | - if(bPrintTrace) |
| 135 | - TRACE(TAPIDEMO, DBG_LEVEL_LOW, |
| 136 | - ("Download path %s does not contain the required files.\n", |
| 137 | - psPath)); |
| 138 | - } |
| 139 | |
| 140 | return ret; |
| 141 | } /* Common_CheckDownloadPath */ |
| 142 | |