[Feature]add MT2731_MP2_MR2_SVN388 baseline version
Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/LICENSE b/src/multimedia/audio-tuning/audio-xml-parser/LICENSE
new file mode 100644
index 0000000..77f59ed
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/LICENSE
@@ -0,0 +1,31 @@
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2015. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/Makefile b/src/multimedia/audio-tuning/audio-xml-parser/Makefile
new file mode 100644
index 0000000..e6fe494
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/Makefile
@@ -0,0 +1,31 @@
+ifeq ($(strip $(TARGET_PLATFORM)), mt2635)
+ DIR_MAKEFILE = mt2635
+else
+ DIR_MAKEFILE = audio_big_sw
+endif
+BUILD_OBJ=$(DIR_MAKEFILE)/obj
+
+build:
+ for i in $(DIR_MAKEFILE); do \
+ (cd $$i && make); \
+ if [ $$? != 0 ]; then \
+ exit 1; \
+ fi \
+ done
+
+install:
+ for i in $(DIR_MAKEFILE); do \
+ (cd $$i && make install); \
+ if [ $$? != 0 ]; then \
+ exit 1; \
+ fi \
+ done
+
+clean:
+ for i in $(DIR_MAKEFILE); do \
+ (cd $$i && make clean); \
+ if [ $$? != 0 ]; then \
+ exit 1; \
+ fi \
+ done
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/README b/src/multimedia/audio-tuning/audio-xml-parser/README
new file mode 100644
index 0000000..e763e58
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/README
@@ -0,0 +1,14 @@
+This module creates the audio parameter parser shared library file.
+
+
+WHAT IT DOES?
+=============
+
+The audio parameter parser library is used to parse the xml files which contain the audio parameters,
+User could get/set these parameters through the audio parameter parser APIs.
+
+
+HOW TO USE IT?
+==============
+
+Link the audio parameter library and using it's APIs to retrieve audio parameters you want.
\ No newline at end of file
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioCategory.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioCategory.c
new file mode 100644
index 0000000..b41a074
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioCategory.c
@@ -0,0 +1,303 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement CategoryType related APIs
+ */
+#include "AudioParamParserPriv.h"
+
+EXPORT CategoryAlias *categoryAliasCreate(const char *alias, Category *category) {
+ CategoryAlias *categoryAlias = NULL;
+ categoryAlias = (CategoryAlias *)malloc(sizeof(CategoryAlias));
+ categoryAlias->alias = strdup(alias);
+ categoryAlias->category = category;
+
+ return categoryAlias;
+}
+
+EXPORT void categoryAliasRelease(CategoryAlias *categoryAlias) {
+ free(categoryAlias->alias);
+ free(categoryAlias);
+}
+
+EXPORT CategoryType *categoryTypeCreate(const char *name, const char *wording, AudioType *audioType, int visible) {
+ CategoryType *categoryType = NULL;
+ categoryType = (CategoryType *)malloc(sizeof(CategoryType));
+ categoryType->name = strdup(name);
+ categoryType->wording = strdup(wording);
+ categoryType->audioType = audioType;
+ categoryType->visible = visible;
+ categoryType->categoryHash = NULL;
+ categoryType->categoryAliasHash = NULL;
+ categoryType->categoryGroupHash = NULL;
+ categoryType->allCategoryHash = NULL;
+ return categoryType;
+}
+
+EXPORT void categoryTypeRelease(CategoryType *categoryType) {
+ free(categoryType->name);
+ free(categoryType->wording);
+
+ if (categoryType->allCategoryHash) {
+ Category *tmp, *item;
+ HASH_ITER(hh2, categoryType->allCategoryHash, item, tmp) {
+ HASH_DELETE(hh2, categoryType->allCategoryHash, item);
+ }
+ }
+
+ if (categoryType->categoryHash) {
+ Category *tmp, *item;
+ HASH_ITER(hh, categoryType->categoryHash, item, tmp) {
+ HASH_DEL(categoryType->categoryHash, item);
+ categoryRelease(item);
+ }
+ }
+
+ if (categoryType->categoryAliasHash) {
+ CategoryAlias *tmp, *item;
+ HASH_ITER(hh, categoryType->categoryAliasHash, item, tmp) {
+ HASH_DEL(categoryType->categoryAliasHash, item);
+ categoryAliasRelease(item);
+ }
+ }
+ free(categoryType);
+}
+
+EXPORT size_t categoryTypeGetNumOfCategory(CategoryType *categoryType) {
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(categoryType->categoryHash);
+}
+
+EXPORT size_t categoryTypeGetNumOfAllCategory(CategoryType *categoryType) {
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL!\n");
+ return 0;
+ }
+
+ return HASH_CNT(hh2, categoryType->allCategoryHash);
+}
+
+EXPORT size_t categoryTypeGetNumOfCategoryGroup(CategoryType *categoryType) {
+ if (!categoryType) {
+ ERR_LOG("CategoryType is NULL\n");
+ return 0;
+ }
+
+ return HASH_COUNT(categoryType->categoryGroupHash);
+}
+
+EXPORT Category *categoryTypeGetAllCategoryByIndex(CategoryType *categoryType, size_t index) {
+ Category *category = NULL;
+ size_t i = 0;
+
+ for (category = categoryType->allCategoryHash; category ; category = category->hh2.next) {
+ if (index == i++) {
+ return category;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Category *categoryTypeGetCategoryByIndex(CategoryType *categoryType, size_t index) {
+ Category *category = NULL;
+ size_t i = 0;
+
+ for (category = categoryType->categoryHash; category ; category = category->hh.next) {
+ if (index == i++) {
+ return category;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByIndex(CategoryType *categoryType, size_t index) {
+ CategoryGroup *categoryGroup = NULL;
+ size_t i = 0;
+
+ if (!categoryType) {
+ ERR_LOG("CategoryType is NULL\n");
+ return NULL;
+ }
+
+ for (categoryGroup = categoryType->categoryGroupHash; categoryGroup ; categoryGroup = categoryGroup->hh.next) {
+ if (index == i++) {
+ return categoryGroup;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryAlias *categoryTypeGetCategoryByAlias(CategoryType *categoryType, const char *alais) {
+ CategoryAlias *categoryAlias;
+
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(categoryType->categoryAliasHash, alais, categoryAlias);
+
+ return categoryAlias;
+}
+
+EXPORT Category *categoryTypeGetCategoryByName(CategoryType *categoryType, const char *name) {
+ CategoryGroup *categoryGroup;
+ Category *category;
+
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ if (!name) {
+ ERR_LOG("name is NULL\n");
+ return NULL;
+ }
+
+ for (categoryGroup = categoryType->categoryGroupHash; categoryGroup; categoryGroup = categoryGroup->hh.next) {
+ for (category = categoryGroup->categoryHash; category; category = category->hh.next) {
+ if (!strncmp(category->name, name, strlen(name) + 1)) {
+ return category;
+ }
+ }
+ }
+
+ for (category = categoryType->categoryHash; category; category = category->hh.next)
+ {
+ if (!strcmp(category->name, name))
+ {
+ return category;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Category *categoryTypeGetCategoryByWording(CategoryType *categoryType, const char *wording) {
+ Category *category;
+
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(categoryType->categoryHash, wording, category);
+
+ return category;
+}
+
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByWording(CategoryType *categoryType, const char *wording) {
+ CategoryGroup *categoryGroup;
+
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(categoryType->categoryGroupHash, wording, categoryGroup);
+
+ return categoryGroup;
+}
+
+EXPORT CategoryGroup *categoryGroupCreate(const char *name, const char *wording, CategoryType *categoryType, int visible) {
+ CategoryGroup *categoryGroup = NULL;
+ categoryGroup = (CategoryGroup *)malloc(sizeof(CategoryGroup));
+ categoryGroup->name = strdup(name);
+ categoryGroup->wording = strdup(wording);
+ categoryGroup->categoryType = categoryType;
+ categoryGroup->visible = visible;
+ categoryGroup->categoryHash = NULL;
+ return categoryGroup;
+}
+
+EXPORT void categoryGroupRelease(CategoryGroup *categoryGroup) {
+ free(categoryGroup->name);
+ free(categoryGroup->wording);
+ if (categoryGroup->categoryHash) {
+ Category *tmp, *item;
+ HASH_ITER(hh, categoryGroup->categoryHash, item, tmp) {
+ HASH_DEL(categoryGroup->categoryHash, item);
+ categoryRelease(item);
+ }
+ }
+ free(categoryGroup);
+}
+
+EXPORT size_t categoryGroupGetNumOfCategory(CategoryGroup *categoryGroup) {
+ if (!categoryGroup) {
+ ERR_LOG("categoryGroup is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(categoryGroup->categoryHash);
+}
+
+EXPORT Category *categoryCreate(const char *name, const char *wording, CATEGORY_PARENT_TYPE isCategoryGroup, void *parent, int visible) {
+ Category *category = NULL;
+ category = (Category *)malloc(sizeof(Category));
+ category->name = strdup(name);
+ category->wording = strdup(wording);
+ category->parentType = isCategoryGroup;
+ if (isCategoryGroup) {
+ category->parent.categoryType = (CategoryType *)parent;
+ } else {
+ category->parent.category = (Category *)parent;
+ }
+ category->visible = visible;
+
+ return category;
+}
+
+EXPORT void categoryRelease(Category *category) {
+ free(category->name);
+ free(category->wording);
+ free(category);
+}
+
+EXPORT Category *categoryGroupGetCategoryByIndex(CategoryGroup *categoryGroup, size_t index) {
+ Category *category = NULL;
+ size_t i = 0;
+
+ if (!categoryGroup) {
+ ERR_LOG("categoryGroup is NULL!\n");
+ return NULL;
+ }
+
+ for (category = categoryGroup->categoryHash; category ; category = category->hh.next) {
+ if (index == i++) {
+ return category;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Category *categoryGroupGetCategoryByWording(CategoryGroup *categoryGroup, const char *wording) {
+ Category *category;
+
+ if (!categoryGroup) {
+ ERR_LOG("categoryGroup is NULL!\n");
+ return 0;
+ }
+
+ HASH_FIND_STR(categoryGroup->categoryHash, wording, category);
+
+ return category;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParam.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParam.c
new file mode 100644
index 0000000..7dd8642
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParam.c
@@ -0,0 +1,578 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement Param related APIs
+ */
+
+#include "AudioParamParserPriv.h"
+#include <errno.h>
+
+Param *paramCreate(const char *name, ParamInfo *paramInfo, const char *paramValue) {
+
+ Param *param = NULL;
+ if (!paramInfo) {
+ ERR_LOG("The paramInfo is NULL, cannot create %s param!\n", name);
+ return NULL;
+ }
+
+ param = (Param *)malloc(sizeof(Param));
+ param->data = NULL;
+ param->name = strdup(name);
+ param->paramInfo = paramInfo;
+ paramSetupDataInfoByStr(param, paramValue);
+
+ return param;
+}
+
+EXPORT void paramRelease(Param *param) {
+ if (param) {
+ if (param->name) {
+ free(param->name);
+ }
+ if (param->data) {
+ free(param->data);
+ }
+ free(param);
+ }
+}
+
+EXPORT Param *paramHashClone(Param *paramHash) {
+ Param *param = NULL, *item, *newItem;
+ size_t i;
+ if (!paramHash) {
+ ERR_LOG("paramHash is NULL\n");
+ return NULL;
+ }
+
+ for (item = paramHash; item != NULL; item = item->hh.next) {
+ newItem = malloc(sizeof(Param));
+ newItem->arraySize = item->arraySize;
+ newItem->paramInfo = item->paramInfo;
+ newItem->paramUnit = item->paramUnit;
+ newItem->name = strdup(item->name);
+
+ switch (item->paramInfo->dataType) {
+ case TYPE_STR:
+ newItem->data = strdup(item->data);
+ break;
+ case TYPE_INT:
+ newItem->data = malloc(sizeof(int));
+ *(int *)newItem->data = *(int *)item->data;
+ break;
+ case TYPE_UINT:
+ newItem->data = malloc(sizeof(unsigned int));
+ *(unsigned int *)newItem->data = *(unsigned int *)item->data;
+ break;
+ case TYPE_FLOAT:
+ newItem->data = malloc(sizeof(float));
+ *(float *)newItem->data = *(float *)item->data;
+ break;
+ case TYPE_BYTE_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(char) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((char *)newItem->data)[i] = ((char *)item->data)[i];
+ }
+ break;
+ case TYPE_UBYTE_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(unsigned char) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((unsigned char *)newItem->data)[i] = ((unsigned char *)item->data)[i];
+ }
+ break;
+ case TYPE_SHORT_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(short) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((short *)newItem->data)[i] = ((short *)item->data)[i];
+ }
+ break;
+ case TYPE_USHORT_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(unsigned short) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((unsigned short *)newItem->data)[i] = ((unsigned short *)item->data)[i];
+ }
+ break;
+ case TYPE_INT_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(int) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((int *)newItem->data)[i] = ((int *)item->data)[i];
+ }
+ break;
+ case TYPE_UINT_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(unsigned int) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((unsigned int *)newItem->data)[i] = ((unsigned int *)item->data)[i];
+ }
+ break;
+ case TYPE_DOUBLE_ARRAY:
+ if (item->arraySize > 0) {
+ newItem->data = malloc(sizeof(double) * item->arraySize);
+ if (NULL == newItem->data) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ for (i = 0; i < item->arraySize; i++) {
+ ((double *)newItem->data)[i] = ((double *)item->data)[i];
+ }
+ break;
+ case TYPE_FIELD:
+ case TYPE_UNKNOWN:
+ break;
+ }
+
+ if (newItem->name != NULL) {
+ HASH_ADD_KEYPTR(hh, param, newItem->name, strlen(newItem->name), newItem);
+ }
+ }
+
+ return param;
+}
+
+EXPORT DATA_TYPE paramDataTypeToEnum(const char *dataType) {
+ if (!dataType) {
+ ERR_LOG("dataType is NULL\n");
+ return TYPE_UNKNOWN;
+ }
+
+ if (!strncmp(DATA_TYPE_STR_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_STR;
+ } else if (!strncmp(DATA_TYPE_INT_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_INT;
+ } else if (!strncmp(DATA_TYPE_UINT_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_UINT;
+ } else if (!strncmp(DATA_TYPE_FLOAT_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_FLOAT;
+ } else if (!strncmp(DATA_TYPE_BYTE_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_BYTE_ARRAY;
+ } else if (!strncmp(DATA_TYPE_UBYTE_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_UBYTE_ARRAY;
+ } else if (!strncmp(DATA_TYPE_SHORT_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_SHORT_ARRAY;
+ } else if (!strncmp(DATA_TYPE_USHORT_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_USHORT_ARRAY;
+ } else if (!strncmp(DATA_TYPE_INT_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_INT_ARRAY;
+ } else if (!strncmp(DATA_TYPE_UINT_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_UINT_ARRAY;
+ } else if (!strncmp(DATA_TYPE_DOUBLE_ARRAY_STRING, dataType, strlen(dataType) + 1)) {
+ return TYPE_DOUBLE_ARRAY;
+ } else {
+ return TYPE_UNKNOWN;
+ }
+}
+
+EXPORT const char *paramDataTypeToStr(DATA_TYPE dataType) {
+ switch (dataType) {
+ case TYPE_STR:
+ return DATA_TYPE_STR_STRING;
+ case TYPE_INT:
+ return DATA_TYPE_INT_STRING;
+ case TYPE_UINT:
+ return DATA_TYPE_UINT_STRING;
+ case TYPE_FLOAT:
+ return DATA_TYPE_FLOAT_STRING;
+ case TYPE_BYTE_ARRAY:
+ return DATA_TYPE_BYTE_ARRAY_STRING;
+ case TYPE_UBYTE_ARRAY:
+ return DATA_TYPE_UBYTE_ARRAY_STRING;
+ case TYPE_SHORT_ARRAY:
+ return DATA_TYPE_SHORT_ARRAY_STRING;
+ case TYPE_USHORT_ARRAY:
+ return DATA_TYPE_USHORT_ARRAY_STRING;
+ case TYPE_INT_ARRAY:
+ return DATA_TYPE_INT_ARRAY_STRING;
+ case TYPE_UINT_ARRAY:
+ return DATA_TYPE_UINT_ARRAY_STRING;
+ case TYPE_DOUBLE_ARRAY:
+ return DATA_TYPE_DOUBLE_ARRAY_STRING;
+ case TYPE_UNKNOWN:
+ return DATA_TYPE_UNKNOWN_STRING;
+ case TYPE_FIELD:
+ return DATA_TYPE_FIELD_STRING;
+ }
+ return DATA_TYPE_UNKNOWN_STRING;
+}
+
+EXPORT APP_STATUS paramSetupDataInfoByStr(Param *param, const char *str) {
+ return utilConvDataStringToNative(param->paramInfo->dataType, str, ¶m->data, ¶m->arraySize);
+}
+
+EXPORT size_t paramGetArraySizeFromString(const char *str) {
+ size_t numOfSeperator = 0;
+
+ if (!str) {
+ ERR_LOG("str is NULL!\n");
+ return 0;
+ }
+
+ while ((str = strstr(str, ARRAY_SEPERATOR)) != NULL) {
+ numOfSeperator++;
+ str++;
+ }
+
+ return numOfSeperator + 1;
+}
+
+EXPORT size_t paramGetNumOfBytes(Param* param)
+{
+ uint16_t numOfBytes = 0;
+ switch (param->paramInfo->dataType) {
+ case TYPE_BYTE_ARRAY:
+ numOfBytes = sizeof(char) * param->arraySize;
+ break;
+ case TYPE_UBYTE_ARRAY:
+ numOfBytes = sizeof(unsigned char) * param->arraySize;
+ break;
+ case TYPE_SHORT_ARRAY:
+ numOfBytes = sizeof(short) * param->arraySize;
+ break;
+ case TYPE_USHORT_ARRAY:
+ numOfBytes = sizeof(unsigned short) * param->arraySize;
+ break;
+ case TYPE_INT_ARRAY:
+ numOfBytes = sizeof(int) * param->arraySize;
+ break;
+ case TYPE_UINT_ARRAY:
+ numOfBytes = sizeof(unsigned int) * param->arraySize;
+ break;
+ case TYPE_DOUBLE_ARRAY:
+ numOfBytes = sizeof(double) * param->arraySize;
+ break;
+ case TYPE_STR:
+ numOfBytes = strlen(param->data) + 1;
+ break;
+ case TYPE_INT:
+ numOfBytes = sizeof(int);
+ break;
+ case TYPE_UINT:
+ numOfBytes = sizeof(unsigned int);
+ break;
+ case TYPE_FLOAT:
+ numOfBytes = sizeof(float);
+ break;
+ default:
+ ALOGE("%s(), Not an available param(%s) dataType(%d)", __FUNCTION__, param->paramInfo->name, param->paramInfo->dataType);
+ break;
+
+ }
+
+ ALOGV("%s(), param name = %s, type = %d, arraySize = %d, bytes = %d", __FUNCTION__, param->paramInfo->name, param->paramInfo->dataType, param->arraySize, numOfBytes);
+ return numOfBytes;
+}
+
+EXPORT APP_STATUS paramGetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int *val) {
+ unsigned char uchar;
+ unsigned short ushort;
+ unsigned int uint;
+
+ if (!param) {
+ WARN_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fieldInfo) {
+ WARN_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->arrayIndex >= param->arraySize) {
+ WARN_LOG("Param's array size is less than field index. (param=%s, field index="APP_SIZE_T_FT" >= array size="APP_SIZE_T_FT")\n", param->name, fieldInfo->arrayIndex, param->arraySize);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->startBit < 0) {
+ WARN_LOG("The startBit < 0 (param=%s, startBit=%d)\n", param->name, fieldInfo->startBit);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->endBit >= 32) {
+ WARN_LOG("The startBit >= 32 (param=%s, endBit=%d)\n", param->name, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ switch (param->paramInfo->dataType) {
+ case TYPE_BYTE_ARRAY:
+ case TYPE_UBYTE_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 8) {
+ WARN_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+ uchar = ((unsigned char *)param->data)[fieldInfo->arrayIndex];
+ *val = ((uchar >> (fieldInfo->startBit)) & ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1));
+ return APP_NO_ERROR;
+ case TYPE_SHORT_ARRAY:
+ case TYPE_USHORT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 16) {
+ WARN_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+ ushort = ((unsigned short *)param->data)[fieldInfo->arrayIndex];
+ *val = ((ushort >> (fieldInfo->startBit)) & ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1));
+ return APP_NO_ERROR;
+ case TYPE_INT_ARRAY:
+ case TYPE_UINT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 32) {
+ WARN_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+ uint = ((unsigned int *)param->data)[fieldInfo->arrayIndex];
+ *val = ((uint >> (fieldInfo->startBit)) & ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1));
+ return APP_NO_ERROR;
+ default:
+ WARN_LOG("Param didn't support field info (param=%s, type=%s)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType));
+ return APP_ERROR;
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT char *paramNewDataStr(Param *param) {
+ return utilConvDataToString(param->paramInfo->dataType, param->data, param->arraySize, 1);
+}
+
+EXPORT char *paramNewDataStrWithMode(Param *param, int uArrayHexMode) {
+ return utilConvDataToString(param->paramInfo->dataType, param->data, param->arraySize, uArrayHexMode);
+}
+
+EXPORT APP_STATUS paramSetupDataInfoByVal(Param *param, void *data, int arraySize) {
+ int i;
+
+ if (!param) {
+ ERR_LOG("Param is NULL\n");
+ return APP_ERROR;
+ }
+
+ switch (param->paramInfo->dataType) {
+ case TYPE_BYTE_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(char) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((char *)param->data)[i] = ((char *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_UBYTE_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(unsigned char) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((unsigned char *)param->data)[i] = ((unsigned char *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_SHORT_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(short) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((short *)param->data)[i] = ((short *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_USHORT_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(unsigned short) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((unsigned short *)param->data)[i] = ((unsigned short *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_INT_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(int) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((int *)param->data)[i] = ((int *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_UINT_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(unsigned int) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((unsigned int *)param->data)[i] = ((unsigned int *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_DOUBLE_ARRAY:
+ if (arraySize > 0) {
+ param->data = malloc(sizeof(double) * arraySize);
+ if (NULL == param->data) {
+ ERR_LOG("allocate working buf fail");
+ return APP_ERROR;
+ }
+ }
+ for (i = 0; i < arraySize; i++) {
+ ((double *)param->data)[i] = ((double *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_STR:
+ param->data = strdup((const char *)data);
+ break;
+ case TYPE_INT:
+ param->data = malloc(sizeof(int));
+ *(int *)param->data = *(int *)data;
+ break;
+ case TYPE_UINT:
+ param->data = malloc(sizeof(unsigned int));
+ *(unsigned int *)param->data = *(unsigned int *)data;
+ break;
+ case TYPE_FLOAT:
+ param->data = malloc(sizeof(float));
+ *(float *)param->data = *(float *)data;
+ break;
+ default:
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS paramSetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int val) {
+ unsigned long mask;
+
+ if (!param) {
+ ERR_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fieldInfo) {
+ ERR_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->arrayIndex >= param->arraySize) {
+ ERR_LOG("Param's array size is less than field index. (param=%s, field index="APP_SIZE_T_FT" >= array size="APP_SIZE_T_FT")\n", param->name, fieldInfo->arrayIndex, param->arraySize);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->startBit < 0) {
+ ERR_LOG("The startBit < 0 (param=%s, startBit=%d)\n", param->name, fieldInfo->startBit);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->endBit >= 32) {
+ ERR_LOG("The startBit >= 32 (param=%s, endBit=%d)\n", param->name, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->endBit == 31 && fieldInfo->startBit == 0) {
+ mask = 0xFFFFFFFF;
+ } else {
+ mask = ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1);
+ }
+
+ switch (param->paramInfo->dataType) {
+ case TYPE_BYTE_ARRAY:
+ case TYPE_UBYTE_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 8) {
+ ERR_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ ((unsigned char *)param->data)[fieldInfo->arrayIndex] =
+ ((((unsigned char *)param->data)[fieldInfo->arrayIndex] & ~(mask << fieldInfo->startBit)) | (unsigned char)(val & mask) << fieldInfo->startBit);
+ return APP_NO_ERROR;
+ case TYPE_SHORT_ARRAY:
+ case TYPE_USHORT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 16) {
+ ERR_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ ((unsigned short *)param->data)[fieldInfo->arrayIndex] =
+ ((((unsigned short *)param->data)[fieldInfo->arrayIndex] & ~(mask << fieldInfo->startBit)) | (unsigned short)(val & mask) << fieldInfo->startBit);
+ return APP_NO_ERROR;
+ case TYPE_INT_ARRAY:
+ case TYPE_UINT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 32) {
+ ERR_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ ((unsigned int *)param->data)[fieldInfo->arrayIndex] =
+ ((((unsigned int *)param->data)[fieldInfo->arrayIndex] & ~(mask << fieldInfo->startBit)) | (val & mask) << fieldInfo->startBit);
+ return APP_NO_ERROR;
+ default:
+ ERR_LOG("Param is not array type, cannot query field value (param=%s, type=%s)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType));
+ return APP_ERROR;
+ }
+
+ return APP_ERROR;
+}
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamFieldInfo.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamFieldInfo.c
new file mode 100644
index 0000000..b3ee7e4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamFieldInfo.c
@@ -0,0 +1,169 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement ParamInfo & FieldInfo related APIs
+ */
+
+#include "AudioParamParserPriv.h"
+
+EXPORT size_t paramInfoGetNumOfFieldInfo(ParamInfo *paramInfo) {
+ if (!paramInfo) {
+ ERR_LOG("paramInfo is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(paramInfo->fieldInfoHash);
+}
+
+EXPORT FieldInfo *paramInfoGetFieldInfoByIndex(ParamInfo *paramInfo, size_t index) {
+ FieldInfo *fieldInfo = NULL;
+ size_t i = 0;
+
+ if (!paramInfo) {
+ ERR_LOG("paramInfo is NULL!\n");
+ return NULL;
+ }
+
+ for (fieldInfo = paramInfo->fieldInfoHash; fieldInfo ; fieldInfo = fieldInfo->hh.next) {
+ if (index == i++) {
+ return fieldInfo;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT FieldInfo *paramInfoGetFieldInfoByName(ParamInfo *paramInfo, const char *fieldName) {
+ FieldInfo *fieldInfo;
+
+ if (!paramInfo) {
+ ERR_LOG("paramInfo is NULL!\n");
+ return NULL;
+ }
+
+ /* Query Param name */
+ HASH_FIND_STR(paramInfo->fieldInfoHash, fieldName, fieldInfo);
+
+ return fieldInfo;
+}
+
+EXPORT ParamInfo *paramInfoCreate(const char *name, DATA_TYPE dataType, AudioType *audioType) {
+ ParamInfo *paramInfo = (ParamInfo *)malloc(sizeof(ParamInfo));
+ paramInfo->audioType = audioType;
+ paramInfo->name = strdup(name);
+ paramInfo->dataType = dataType;
+ paramInfo->fieldInfoHash = NULL;
+ return paramInfo;
+}
+
+EXPORT FieldInfo *fieldInfoCreate(const char *fieldName, unsigned int arrayIndex, int startBit, int endBit, const char *checkList, ParamInfo *paramInfo) {
+ FieldInfo *fieldInfo = (FieldInfo *)malloc(sizeof(FieldInfo));
+ /* Setup members */
+ fieldInfo->name = strdup(fieldName);
+ fieldInfo->arrayIndex = arrayIndex;
+ fieldInfo->startBit = startBit;
+ fieldInfo->endBit = endBit;
+ fieldInfo->paramInfo = paramInfo;
+
+
+ if (checkList) {
+ fieldInfo->checkListStr = strdup(checkList);
+ } else {
+#ifdef WIN32
+ fieldInfo->checkListStr = utilGenCheckList(endBit - startBit + 1);
+#else
+ /* Reduce memory usage, don't generate check list automatically */
+ fieldInfo->checkListStr = strdup("");
+#endif
+ }
+
+ return fieldInfo;
+}
+
+EXPORT void paramInfoRelease(ParamInfo *paramInfo) {
+ if (paramInfo == NULL) {
+ return;
+ }
+
+ if (paramInfo->fieldInfoHash) {
+ FieldInfo *tmp, *item;
+ HASH_ITER(hh, paramInfo->fieldInfoHash, item, tmp) {
+ HASH_DEL(paramInfo->fieldInfoHash, item);
+ fieldInfoRelease(item);
+ }
+ }
+
+ free(paramInfo->name);
+ free(paramInfo);
+}
+
+EXPORT void fieldInfoRelease(FieldInfo *fieldInfo) {
+ if (fieldInfo == NULL) {
+ return;
+ }
+
+ if (fieldInfo->checkListStr) {
+ free(fieldInfo->checkListStr);
+ }
+
+ free(fieldInfo->name);
+ free(fieldInfo);
+}
+
+EXPORT APP_STATUS fieldInfoGetCheckListValue(FieldInfo *fieldInfo, const char *checkName, unsigned int *checkVal) {
+ char *checkList;
+ char *valStr;
+ char *nameStr;
+ char *restOfStr = NULL;
+ if (!fieldInfo) {
+ ERR_LOG("fieldInfo is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!checkName) {
+ ERR_LOG("checkName is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!checkVal) {
+ ERR_LOG("checkVal is NULL\n");
+ return APP_ERROR;
+ }
+
+ checkList = strdup(fieldInfo->checkListStr);
+ valStr = utilStrtok(checkList, ARRAY_SEPERATOR, &restOfStr);
+ if (!valStr) {
+ ERR_LOG("Cannot parse valStr\n");
+ free(checkList);
+ return APP_ERROR;
+ }
+
+ while ((nameStr = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr)) != NULL) {
+ if (!strncmp(nameStr, checkName, strlen(checkName) + 1)) {
+ *checkVal = strtoul(valStr, NULL, 0);
+ free(checkList);
+ return APP_NO_ERROR;
+ }
+
+ valStr = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr);
+ if (!valStr) {
+ ERR_LOG("Cannot parse valStr\n");
+ free(checkList);
+ return APP_ERROR;
+ }
+ }
+
+ free(checkList);
+ return APP_ERROR;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParser.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParser.c
new file mode 100644
index 0000000..3fb27ad
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParser.c
@@ -0,0 +1,1614 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement AppHandle related APIs
+ */
+
+#include "AudioParamParserPriv.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#ifdef __linux__
+#include <dirent.h>
+#include <unistd.h>
+#else
+#include <windows.h>
+#include <io.h>
+#pragma warning( disable : 4996 )
+#endif
+
+static AppHandle appHandleInst;
+static int appHandleInited = 0;
+
+#ifdef FORCE_DEBUG_LEVEL
+int appDebugLevel = DEBUG_LEVEL; /* Global debug level setting */
+#else
+int appDebugLevel = WARN_LEVEL; /* Global debug level setting */
+#endif
+
+const char **appAudioTypeLoadingList = NULL;
+
+FILE *appLogFp = NULL;
+int outputLogToStdout = 0;
+
+#ifndef WIN32
+static pthread_rwlock_t appHandleInstLock = PTHREAD_RWLOCK_INITIALIZER;
+static const char *appHandleInstLockCallerFun = NULL; /* Used to cache the lock holder */
+#else
+int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, PVOID pvReserved) {
+ return TRUE;
+}
+#endif
+
+int getDebugLevel() {
+#if !defined(WIN32) && !defined(SYS_IMPL)
+ int debugLevel;;
+ char appDebugLevelStr[MAX_PROP_VALUE_LEN];
+
+ property_get(PROPERTY_KEY_APP_LOG_LEVEL, appDebugLevelStr, "-1");
+ debugLevel = atoi(appDebugLevelStr);
+ MUST_LOG("debug level = %d", debugLevel);
+
+ if (debugLevel != -1) {
+ return debugLevel;
+ }
+#endif
+
+ return appDebugLevel;
+}
+
+EXPORT APP_STATUS appHandleInit(AppHandle *appHandle) {
+#ifdef _DEBUG
+ /* Alwasy show the output console for debug build */
+ appHandleRedirectIOToConsole();
+#endif
+
+ INFO_LOG("appHandle = 0x%p\n", appHandle);
+
+ if (appHandle) {
+ appHandle->xmlDir = NULL;
+ appHandle->xmlCusDir = NULL;
+ appHandle->audioTypeHash = NULL;
+ appHandle->featureOptionsHash = NULL;
+ appHandle->featureOptionsDoc = NULL;
+ appHandle->noficyCbList = NULL;
+ appHandle->xmlCusDirReady = 0;
+ appHandle->saveXmlWithHexMode = 1;
+#ifndef WIN32
+ appHandle->lockCallerFun = NULL;
+ appHandle->appThreadExit = 0;
+ appHandle->inotifyFd = -1;
+ appHandle->xmlChangedNotifyEnabled = isCustXmlEnable();
+
+ pthread_rwlock_init(&appHandle->lock, NULL);
+ pthread_rwlock_init(&appHandle->notifyLock, NULL);
+#else
+ appHandle->xmlChangedNotifyEnabled = 1;
+#endif
+ appDebugLevel = getDebugLevel();
+ appHandleShowAudioTypeSupportedVerInfo(appHandle);
+ utilDumpAudioTypeLoadingList(appAudioTypeLoadingList);
+ return APP_NO_ERROR;
+ } else {
+ WARN_LOG("AppHandle is NULL!\n");
+ return APP_ERROR;
+ }
+}
+
+EXPORT APP_STATUS appHandleUninit(AppHandle *appHandle) {
+ INFO_LOG("appHandle = 0x%p\n", appHandle);
+
+ if (!appHandle) {
+ WARN_LOG("AppHandle is NULL!\n");
+ return APP_ERROR;
+ } else {
+ NotifyCb *notifyCb, *tmp;
+
+#if defined(SYS_IMPL)
+ /* sys: Unload hw module & unregister hidl callback function */
+ unregisterAudioParameterChangedCallback(appHandle);
+#endif
+
+ /* Lock */
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ if (appHandle->xmlDir != XML_FOLDER_LIST_ON_DEVICE && appHandle->xmlDir != XML_FOLDER_LIST_ON_TUNING_TOOL) {
+ /* Free the xmlDir which get from property */
+ free((void *)appHandle->xmlDir[0]);
+ free((void *)appHandle->xmlDir);
+ }
+ appHandle->xmlDir = NULL;
+
+ if (appHandle->xmlCusDir) {
+ free(appHandle->xmlCusDir);
+ }
+ appHandle->xmlCusDir = NULL;
+
+ if (appHandle->featureOptionsDoc) {
+ xmlFreeDoc(appHandle->featureOptionsDoc);
+ }
+ appHandle->featureOptionsDoc = NULL;
+
+#ifndef WIN32
+ if (appHandle->appThreadExit == 0) {
+ void *status;
+ appHandle->appThreadExit = 1;
+ INFO_LOG("Send signal to appThread\n");
+ pthread_kill(appHandle->appThread, SIGUSR1);
+
+ /* TODO: Don't join the inotify thread, since the read function is block waiting */
+ INFO_LOG("Waiting inotify thread join...\n");
+ pthread_join(appHandle->appThread, &status);
+ INFO_LOG("inotify thread joined\n");
+ appHandle->inotifyFd = 0;
+ }
+#endif
+
+ // release notify callback list
+ LL_FOREACH_SAFE(appHandle->noficyCbList, notifyCb, tmp) {
+ LL_DELETE(appHandle->noficyCbList, notifyCb);
+ free(notifyCb);
+ }
+ appHandle->noficyCbList = NULL;
+
+ /* If appHandle is singleton instance, reset the init info */
+ if (appHandle == &appHandleInst) {
+ appHandleInited = 0;
+ }
+
+ appHandleReleaseAudioTypeHash(appHandle);
+
+ appHandleReleaseFeatureOptionsHash(appHandle);
+
+ xmlCleanupParser();
+
+ /* Flush app log */
+ if (appLogFp) {
+ fflush(appLogFp);
+ }
+
+ appAudioTypeLoadingList = NULL;
+
+ /* Unlock */
+ appHandleUnlock(appHandle);
+
+ return APP_NO_ERROR;
+ }
+}
+
+EXPORT const char *appHandleGetBuildTimeStamp() {
+#ifdef WIN32
+ return __DATE__ " " __TIME__;
+#else
+ return "";
+#endif
+}
+
+EXPORT int appHandleWriteLock(AppHandle *appHandle, const char *callerFun) {
+ int res = 0;
+
+ if (!appHandle) {
+ WARN_LOG("appHandle is NULL\n");
+ return res;
+ }
+
+#ifndef WIN32
+ while (1) {
+ if (pthread_rwlock_trywrlock(&appHandle->lock) == 0) {
+ appHandle->lockCallerFun = callerFun;
+ DEBUG_LOG("AppHandle lock is locked by %s()\n", appHandle->lockCallerFun);
+ break;
+ } else {
+ DEBUG_LOG("Cannot lock the AppHandle lock, delay some time. (the locker is %s())\n", appHandle->lockCallerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return res;
+}
+
+EXPORT int appHandleReadLock(AppHandle *appHandle, const char *callerFun) {
+ int res = 0;
+
+ if (!appHandle) {
+ WARN_LOG("appHandle is NULL\n");
+ return res;
+ }
+
+#ifndef WIN32
+ while (1) {
+ if (pthread_rwlock_tryrdlock(&appHandle->lock) == 0) {
+ appHandle->lockCallerFun = callerFun;
+ DEBUG_LOG("AppHandle lock is locked by %s()\n", appHandle->lockCallerFun);
+ break;
+ } else {
+ DEBUG_LOG("Cannot lock the AppHandle lock, delay some time. (the locker is %s())\n", appHandle->lockCallerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return res;
+}
+
+EXPORT int appHandleUnlock(AppHandle *appHandle) {
+ int res = 0;
+
+ if (!appHandle) {
+ WARN_LOG("appHandle is NULL\n");
+ return res;
+ }
+
+#ifndef WIN32
+ DEBUG_LOG("Unlock appHandle lock\n");
+ res = pthread_rwlock_unlock(&appHandle->lock);
+#endif
+ return res;
+}
+
+EXPORT int appHandleInstWriteLock(const char *callerFun) {
+ int res = 0;
+
+#ifndef WIN32
+ while (1) {
+ if (pthread_rwlock_trywrlock(&appHandleInstLock) == 0) {
+ appHandleInstLockCallerFun = callerFun;
+ DEBUG_LOG("%s acquired the appHandleInstLock\n", callerFun);
+ break;
+ } else {
+ DEBUG_LOG("Cannot lock the appHandleInstLock, delay some time. (the locker is %s)\n", callerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return res;
+}
+
+EXPORT int appHandleInstUnlock() {
+ int res = 0;
+#ifndef WIN32
+ DEBUG_LOG("Unlock appHandleInst lock\n");
+ res = pthread_rwlock_unlock(&appHandleInstLock);
+#endif
+ return res;
+}
+
+EXPORT FeatureOption *featureOptionCreate(const char *name, const char *value) {
+ FeatureOption *featureOption = malloc(sizeof(FeatureOption));
+ featureOption->name = strdup(name);
+ featureOption->value = strdup(value);
+ return featureOption;
+}
+
+EXPORT void featureOptionRelease(FeatureOption *featureOption) {
+ free(featureOption->name);
+ free(featureOption->value);
+ free(featureOption);
+}
+
+EXPORT void appHandleReleaseFeatureOptionsHash(AppHandle *appHandle) {
+ if (appHandle->featureOptionsHash) {
+ FeatureOption *tmp, *item;
+ HASH_ITER(hh, appHandle->featureOptionsHash, item, tmp) {
+ HASH_DEL(appHandle->featureOptionsHash, item);
+ featureOptionRelease(item);
+ }
+ }
+ appHandle->featureOptionsHash = NULL;
+}
+
+EXPORT AppHandle *appHandleGetInstance() {
+ appHandleInstWriteLock(__FUNCTION__);
+
+ if (!appHandleInited) {
+ appHandleInit(&appHandleInst);
+#ifdef WIN32
+ appHandleParseXml(&appHandleInst, XML_FOLDER_LIST_ON_TUNING_TOOL, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#else
+ char **xmlDirFromProperty = appGetXmlDirFromProperty();
+
+ if (xmlDirFromProperty) {
+ appHandleParseXml(&appHandleInst, (const char**)xmlDirFromProperty, XML_CUS_FOLDER_ON_DEVICE);
+ } else {
+ appHandleParseXml(&appHandleInst, XML_FOLDER_LIST_ON_DEVICE, XML_CUS_FOLDER_ON_DEVICE);
+ }
+#endif
+ appHandleInited = 1;
+ }
+
+ appHandleInstUnlock();
+
+ return &appHandleInst;
+}
+
+EXPORT APP_STATUS appHandleParseXml(AppHandle *appHandle, const char *dir[], const char *cusDir) {
+ int i;
+ INFO_LOG("appHandle = 0x%p, dir = %s, cusDir = %s\n", appHandle, dir[0], cusDir);
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ if (!dir) {
+ ERR_LOG("dir is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (appHandle->xmlDir || appHandle->xmlCusDir) {
+ ERR_LOG("XML already parsed, don't call the appHandleParseXml twice!\n");
+ return APP_ERROR;
+ }
+
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ appHandle->xmlDir = dir;
+ appHandle->xmlCusDir = strdup(cusDir);
+ for (i = 0; appHandle->xmlDir[i]; i++) {
+ INFO_LOG("XmlDir[%d] = %s\n", i, appHandle->xmlDir[i]);
+ }
+ INFO_LOG("XmlCusDir = %s\n", appHandle->xmlCusDir);
+
+#if !defined(SYS_IMPL)
+ /* Load feature options information */
+ appHandleLoadDirFeatureOptionsInfo(appHandle);
+
+ /* Load audio type information */
+ appHandleLoadDirAudioTypeInfo(appHandle);
+#endif
+
+ appHandleUnlock(appHandle);
+
+#ifndef WIN32
+#if defined(SYS_IMPL)
+ /* sys: For system AudioParamParser, it's need to register AudioParamParserChanged HIDL callback with AudioHAL */
+ registerAudioParameterChangedCallback(appHandle);
+#else
+ /* For vendor AudioParamParser, it's need to monitor file change */
+ /* Setup file system monitor thread */
+ if (pthread_create(&appHandle->appThread, NULL, appHandleThreadLoop, (void *)appHandle)) {
+ ERR_LOG("Create app thread fail!\n");
+ return APP_ERROR;
+ } else {
+ INFO_LOG("Create app thread successfully\n");
+ }
+#endif
+#endif
+
+ return APP_NO_ERROR;
+}
+
+EXPORT void appHandleCustXmlEnableChanged(AppHandle *appHandle, int enable) {
+#ifndef WIN32
+#if defined(SYS_IMPL)
+ /* SYS: Notify vendor parser to change the cust XML monitor status */
+ if (enable) {
+ audioSystemSetParameters("SET_CUST_XML_ENABLE=1");
+ } else {
+ audioSystemSetParameters("SET_CUST_XML_ENABLE=0");
+ }
+#else
+ /* VND: Reload XML or disable the XML changed notification */
+ if (!appHandle) {
+ ERR_LOG("AppHandle is NULL\n");
+ return;
+ }
+
+ if (enable == 1) {
+ pthread_t reloadCustXmlThread;
+
+ appHandle->xmlChangedNotifyEnabled = 1;
+ INFO_LOG("xmlChangedNotifyEnabled = %d\n", appHandle->xmlChangedNotifyEnabled);
+
+ /* Create a thread to reload all cust XML */
+ if (pthread_create(&reloadCustXmlThread, NULL, reloadCustXmlThreadLoop, (void *)appHandle)) {
+ ERR_LOG("Create reload cust xml thread fail!\n");
+ }
+ } else {
+ appHandle->xmlChangedNotifyEnabled = 0;
+ INFO_LOG("xmlChangedNotifyEnabled = %d\n", appHandle->xmlChangedNotifyEnabled);
+ }
+#endif
+#endif
+}
+
+EXPORT APP_STATUS appHandleLoadDirFeatureOptionsInfo(AppHandle *appHandle) {
+ struct stat fileStat;
+ int strLen;
+ char *featureOptionsFile = NULL;
+ xmlNode *node = NULL;
+ xmlNode *root = NULL;
+ xmlChar *name = NULL;
+ xmlChar *value = NULL;
+ int i = 0;
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ if (!appHandle->xmlDir) {
+ ERR_LOG("xmlDir is NULL!\n");
+ return APP_ERROR;
+ }
+
+ if (appHandle->featureOptionsHash) {
+ WARN_LOG("Feature options already loaded, don't reload it!\n");
+ return APP_NO_ERROR;
+ }
+
+ /* Get feature option file path */
+ for (i = 0; appHandle->xmlDir[i]; i++) {
+ strLen = strlen(appHandle->xmlDir[i]) + strlen(FEATURE_OPTIONS_XML) + 2;
+ featureOptionsFile = (char *)malloc(strLen);
+ snprintf(featureOptionsFile, strLen, "%s%s%s", appHandle->xmlDir[i], FOLDER, FEATURE_OPTIONS_XML);
+ ERR_LOG("Feature option file: %s", featureOptionsFile);
+
+ if (stat(featureOptionsFile, &fileStat) == -1) {
+ INFO_LOG("No %s file\n", featureOptionsFile);
+ free(featureOptionsFile);
+ featureOptionsFile = NULL;
+ } else {
+ break;
+ }
+ }
+
+ if (featureOptionsFile == NULL) {
+ ERR_LOG("Feature option file not found!");
+ return APP_ERROR;
+ }
+
+ appHandle->featureOptionsDoc = xmlParseFile(featureOptionsFile);
+ if (appHandle->featureOptionsDoc == NULL) {
+ ERR_LOG("Failed to parse %s\n", featureOptionsFile);
+ free(featureOptionsFile);
+ return APP_ERROR;
+ } else {
+ INFO_LOG("Load xml file successfully. (%s)\n", featureOptionsFile);
+ }
+ free(featureOptionsFile);
+
+ /* Parse informatino to feature options hash */
+ root = xmlDocGetRootElement(appHandle->featureOptionsDoc);
+ if (!root) {
+ ERR_LOG("Root element is NULL\n");
+ return APP_ERROR;
+ }
+
+ node = findXmlNodeByElemName(root, ELEM_AUDIO_FEATURE_OPTIONS);
+ if (node && node->children) {
+ node = node->children;
+ } else {
+ ERR_LOG("No feature options found!\n");
+ return APP_ERROR;
+ }
+
+ while ((node = findXmlNodeByElemName(node->next, ELEM_PARAM))) {
+ FeatureOption *featureOption;
+ name = xmlGetProp(node, (const xmlChar *)ATTRI_NAME);
+ value = xmlGetProp(node, (const xmlChar *)ATTRI_VALUE);
+
+ featureOption = featureOptionCreate((const char *)name, (const char *)value);
+ HASH_ADD_KEYPTR(hh, appHandle->featureOptionsHash, featureOption->name, strlen(featureOption->name), featureOption);
+
+ if (name) {
+ xmlFree(name);
+ }
+
+ if (value) {
+ xmlFree(value);
+ }
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleLoadDirAudioTypeInfo(AppHandle *appHandle) {
+ char audioType[MAX_AUDIO_TYPE_LEN + 1];
+
+#ifdef __linux__
+ struct dirent **namelist;
+ int n;
+ int dirIndex;
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ /* Release old audio type first */
+ appHandleReleaseAudioTypeHash(appHandle);
+ for (dirIndex = 0; appHandle->xmlDir[dirIndex]; dirIndex++) {
+ n = scandir(appHandle->xmlDir[dirIndex], &namelist, 0, alphasort);
+ if (n < 0) {
+ INFO_LOG("Scandir error (%s)\n", appHandle->xmlDir[dirIndex]);
+ } else {
+ while (n--) {
+ if (strstr(namelist[n]->d_name, AUDIO_PARAM_XML_POSFIX) == NULL) {
+ DEBUG_LOG("File name's posfix is not AudioParam.xml (%s)\n", namelist[n]->d_name);
+ free(namelist[n]);
+ continue;
+ }
+ sscanf(namelist[n]->d_name, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioType);
+ if (appHandleIsValidAudioType(appHandle, audioType)) {
+ appHandleAddAudioType(appHandle, audioType);
+ } else {
+ MUST_LOG("Don't load audio param xml = %s\n", namelist[n]->d_name);
+ }
+ free(namelist[n]);
+ }
+ free(namelist);
+ }
+ }
+
+ INFO_LOG("xmlCusDirReady = %d\n", appHandle->xmlCusDirReady);
+#else
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+ UT_string *path = NULL;
+ int i;
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ /* Release old audio type first */
+ appHandleReleaseAudioTypeHash(appHandle);
+
+ /* Check preload xml folder */
+ for (i = 0; appHandle->xmlDir[i]; i++) {
+ utstring_new(path);
+ utstring_printf(path, "%s"FOLDER"*"AUDIO_PARAM_XML_POSFIX, appHandle->xmlDir[i]);
+ hFind = FindFirstFile(utstring_body(path), &FindFileData);
+ utstring_free(path);
+
+ if (hFind == INVALID_HANDLE_VALUE) {
+ WARN_LOG("No xml found! (%s)\n", appHandle->xmlDir[i]);
+ continue;
+ }
+
+ do {
+ sscanf(FindFileData.cFileName, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioType);
+
+ if (appHandleIsValidAudioType(appHandle, audioType)) {
+ appHandleAddAudioType(appHandle, audioType);
+ } else {
+ INFO_LOG("Invalid audio param xml = %s\n", FindFileData.cFileName);
+ }
+ } while (FindNextFile(hFind, &FindFileData));
+ }
+
+ /* Assume xml cust dir always ready */
+ appHandle->xmlCusDirReady = 1;
+#endif
+
+ /* Load all XMLs */
+ appHandleLoadAllAudioTypeXml(appHandle);
+ INFO_LOG("Load all audio type XML - ok\n");
+
+ /* Remove audio type if it's feature options disabled */
+ appHandleRemoveAudioTypeByFeatureOptions(appHandle);
+
+ /* Modify data depends on feature options */
+ appHandleReviseXmlDocByFeatureOptions(appHandle);
+
+ /* Load hash info from XML */
+ appHandleLoadAllAudioTypeHash(appHandle);
+ INFO_LOG("Load all audio Hash - ok\n");
+
+ if (appDebugLevel == DEBUG_LEVEL) {
+ appHandleDumpAudioTypeList(appHandle);
+ }
+
+ /* Unload all audio type xml */
+ appHandleReleaseAllAudioTypeXml(appHandle);
+
+ return APP_NO_ERROR;
+}
+
+EXPORT size_t appHandleGetNumOfAudioType(AppHandle *appHandle) {
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ return HASH_COUNT(appHandle->audioTypeHash);
+}
+
+EXPORT APP_STATUS appHandleLoadAllAudioTypeXml(AppHandle *appHandle) {
+ size_t i;
+ size_t count = appHandleGetNumOfAudioType(appHandle);
+
+ for (i = 0; i < count; i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Load xml struct */
+ if (appHandleLoadAudioTypeXml(appHandle, audioType) == APP_ERROR) {
+ WARN_LOG("Load audio type XML failed. (%s)\n", audioType->name);
+ }
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleLoadAudioTypeXml(AppHandle *appHandle, AudioType *audioType) {
+ char *audioTypeFile;
+
+ INFO_LOG("audioType = %s\n", audioType->name);
+
+ // Load AudioParamXml
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, AUDIO_PARAM_XML_POSFIX);
+ if (audioTypeFile == NULL) {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, AUDIO_PARAM_XML_POSFIX);
+ return APP_ERROR;
+ }
+
+ audioType->audioParamDoc = xmlParseFile(audioTypeFile);
+
+ if (audioType->audioParamDoc == NULL) {
+ ERR_LOG("Failed to parse %s\n", audioTypeFile);
+ free(audioTypeFile);
+
+ // Audio param file broken, load preload xml file instead
+ audioTypeFile = appHandleGetPreloadAudioTypeFilePath(appHandle, audioType->name, AUDIO_PARAM_XML_POSFIX);
+ if (audioTypeFile == NULL) {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, AUDIO_PARAM_XML_POSFIX);
+ return APP_ERROR;
+ }
+
+ WARN_LOG("Trying to load preload %s file instead of broken XML file!\n", audioTypeFile);
+ audioType->audioParamDoc = xmlParseFile(audioTypeFile);
+ if (audioType->audioParamDoc == NULL) {
+ ERR_LOG("Failed to parse %s\n", audioTypeFile);
+ free(audioTypeFile);
+ return APP_ERROR;
+ } else {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+ } else {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+
+ free(audioTypeFile);
+
+ // Load ParamUnitDescXml
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, PARAM_UNIT_DESC_XML_POSFIX);
+ if (audioTypeFile == NULL) {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, PARAM_UNIT_DESC_XML_POSFIX);
+ return APP_ERROR;
+ }
+
+ audioType->paramUnitDescDoc = xmlParseFile(audioTypeFile);
+ if (audioType->paramUnitDescDoc == NULL) {
+ ERR_LOG("Failed to parse %s%s\n", audioTypeFile, PARAM_UNIT_DESC_XML_POSFIX);
+ free(audioTypeFile);
+ return APP_ERROR;
+ } else {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+ free(audioTypeFile);
+
+#ifdef WIN32
+ // Load ParamTreeViewXml only for tuning tool
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, PARAM_TREE_VIEW_XML_POSFIX);
+ if (audioTypeFile == NULL) {
+ INFO_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, PARAM_TREE_VIEW_XML_POSFIX);
+ free(audioTypeFile);
+ } else {
+ audioType->paramTreeViewDoc = xmlParseFile(audioTypeFile);
+ if (audioType->paramTreeViewDoc == NULL) {
+ DEBUG_LOG("Failed to parse %s%s\n", audioTypeFile, PARAM_TREE_VIEW_XML_POSFIX);
+ } else {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+ free(audioTypeFile);
+ }
+#endif
+
+ /* Get tab name info */
+ audioTypeParseTabName(audioType);
+
+ /* Get version info */
+ if (audioTypeParseXmlVer(audioType) == APP_ERROR) {
+ ERR_LOG("Cannot parse xml version info. (%s)\n", audioType->name);
+ return APP_ERROR;
+ }
+
+#ifndef WIN32
+ /* XML Version check for device driver or HAL */
+ if (!audioTypeIsDeviceSupportedXmlVer(audioType)) {
+ abort();
+ }
+#endif
+
+ return APP_NO_ERROR;
+}
+
+EXPORT char *appHandleGetAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix) {
+ /* Check cus folder xml first */
+ struct stat fileStat;
+ int strLen;
+ char *path;
+ int i;
+
+ if (appHandle->xmlChangedNotifyEnabled && appHandle->xmlCusDir && !strncmp(posfix, AUDIO_PARAM_XML_POSFIX, strlen(AUDIO_PARAM_XML_POSFIX) + 1)) {
+ strLen = strlen(appHandle->xmlCusDir) + strlen(audioType) + strlen(posfix) + 2;
+ path = (char *)malloc(strLen);
+ snprintf(path, strLen, "%s%s%s%s", appHandle->xmlCusDir, FOLDER, audioType, posfix);
+
+ if (stat(path, &fileStat) != -1) {
+ return path;
+ } else {
+ free(path);
+ }
+ }
+
+ /* Check default folder */
+ for (i = 0; appHandle->xmlDir[i]; i++) {
+ strLen = strlen(appHandle->xmlDir[i]) + strlen(audioType) + strlen(posfix) + 2;
+ path = (char *)malloc(strLen);
+ snprintf(path, strLen, "%s%s%s%s", appHandle->xmlDir[i], FOLDER, audioType, posfix);
+
+ if (stat(path, &fileStat) != -1) {
+ return path;
+ }
+
+ free(path);
+ }
+
+ return NULL;
+}
+
+EXPORT char *appHandleGetPreloadAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix) {
+ /* Check cus folder xml first */
+ struct stat fileStat;
+ int strLen;
+ char *path;
+ int i;
+
+ /* Check default folder */
+ for (i = 0; appHandle->xmlDir[i]; i++) {
+ strLen = strlen(appHandle->xmlDir[i]) + strlen(audioType) + strlen(posfix) + 2;
+ path = (char *)malloc(strLen);
+ snprintf(path, strLen, "%s%s%s%s", appHandle->xmlDir[i], FOLDER, audioType, posfix);
+
+ if (stat(path, &fileStat) != -1) {
+ return path;
+ }
+
+ free(path);
+ }
+ return NULL;
+}
+
+EXPORT int appHandleIsValidAudioType(AppHandle *appHandle, const char *audioType) {
+ char *filePath;
+
+ assert(appHandle != NULL);
+
+#ifndef WIN32
+ /* UI parameter is valid for win32 */
+ if (utilIsUIAudioType(audioType)) {
+ return 0;
+ }
+#endif
+
+ if (utilIsAudioTypeInLoadingList(audioType) == 0) {
+ return 0;
+ }
+
+ filePath = appHandleGetAudioTypeFilePath(appHandle, audioType, PARAM_UNIT_DESC_XML_POSFIX);
+ if (filePath == NULL) {
+ ERR_LOG("%s audio type is not valid! (%s is not exist)\n", audioType, filePath);
+ free(filePath);
+ return 0;
+ }
+
+ free(filePath);
+ return 1;
+}
+
+EXPORT AudioType *appHandleAddAudioType(AppHandle *appHandle, const char *audioTypeName) {
+ AudioType *audioType = NULL;
+
+ if (!appHandle) {
+ ERR_LOG("The appHandle is NULL\n");
+ return NULL;
+ }
+
+ if (!audioTypeName) {
+ ERR_LOG("The audioTypeName is NULL\n");
+ return NULL;
+ }
+
+ if (appHandleGetAudioTypeByName(appHandle, audioTypeName) == NULL) {
+ audioType = audioTypeCreate(appHandle, audioTypeName);
+
+ /* Add audio type to hash */
+ HASH_ADD_KEYPTR(hh, appHandle->audioTypeHash, audioType->name, strlen(audioType->name), audioType);
+ } else {
+ INFO_LOG("%s(), %s Audio type alread added\n", __FUNCTION__, audioTypeName);
+ }
+ return audioType;
+}
+
+EXPORT AudioType *appHandleGetAudioTypeByIndex(AppHandle *appHandle, size_t index) {
+ AudioType *audioType = NULL;
+ size_t i = 0;
+
+ DEBUG_LOG("appHandle = 0x%p, index = "APP_SIZE_T_FT"\n", appHandle, index);
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return NULL;
+ }
+
+ for (audioType = appHandle->audioTypeHash; audioType ; audioType = audioType->hh.next) {
+ if (index == i++) {
+ return audioType;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT AudioType *appHandleGetAudioTypeByName(AppHandle *appHandle, const char *name) {
+ AudioType *audioType = NULL;
+
+ INFO_LOG("appHandle = 0x%p, name = %s\n", appHandle, name);
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(appHandle->audioTypeHash, name, audioType);
+
+ return audioType;
+}
+
+EXPORT void appHandleReleaseAudioTypeHash(AppHandle *appHandle) {
+ if (appHandle->audioTypeHash) {
+ AudioType *tmp, *item;
+ HASH_ITER(hh, appHandle->audioTypeHash, item, tmp) {
+ HASH_DEL(appHandle->audioTypeHash, item);
+ audioTypeRelease(item);
+ }
+ }
+ appHandle->audioTypeHash = NULL;
+}
+
+EXPORT void appHandleDumpAudioTypeList(AppHandle *appHandle) {
+ size_t index = 0;
+ size_t numOfAudioType = appHandleGetNumOfAudioType(appHandle);
+ INFO_LOG("=================================\n");
+ INFO_LOG("Totoal num of Audio Type List = "APP_SIZE_T_FT"\n", numOfAudioType);
+ for (index = 0; index < numOfAudioType; index++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ INFO_LOG("AudioType["APP_SIZE_T_FT"] = %s\n", index, audioType->name);
+ audioTypeDump(audioType);
+ }
+}
+
+EXPORT APP_STATUS appHandleLoadAllAudioTypeHash(AppHandle *appHandle) {
+ size_t index = 0;
+ size_t numOfAudioType = appHandleGetNumOfAudioType(appHandle);
+ /* Load stage1 information */
+ for (index = 0; index < numOfAudioType; index++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ audioTypeLoadStage1Hash(audioType);
+ }
+
+ /* Load stage2 information (ex: ParamTreeView's switch object)*/
+ for (index = 0; index < numOfAudioType; index++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ audioTypeLoadStage2Hash(audioType);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleReleaseAllAudioTypeXml(AppHandle *appHandle) {
+ size_t index = 0;
+ size_t numOfAudioType = appHandleGetNumOfAudioType(appHandle);
+
+ for (index = 0; index < numOfAudioType; index++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ if (audioType->paramUnitDescDoc) {
+ xmlFreeDoc(audioType->paramUnitDescDoc);
+ audioType->paramUnitDescDoc = NULL;
+ }
+
+ if (audioType->audioParamDoc) {
+ xmlFreeDoc(audioType->audioParamDoc);
+ audioType->audioParamDoc = NULL;
+ }
+ }
+
+ if (appHandle->featureOptionsDoc) {
+ xmlFreeDoc(appHandle->featureOptionsDoc);
+ appHandle->featureOptionsDoc = NULL;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT void appHandleRegXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN callbackFun) {
+ INFO_LOG("appHandle = 0x%p, callbackFun = 0x%p\n", appHandle, callbackFun);
+
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ if (appHandle && callbackFun) {
+ /* Checking the duplicated callback function registration */
+ NotifyCb *notifyCb;
+ LL_FOREACH(appHandle->noficyCbList, notifyCb) {
+ if (notifyCb->cb == callbackFun) {
+ INFO_LOG("Same callback function found. ignore it\n");
+ appHandleUnlock(appHandle);
+ return;
+ }
+ }
+
+ notifyCb = malloc(sizeof(NotifyCb));
+ notifyCb->cb = callbackFun;
+ LL_APPEND(appHandle->noficyCbList, notifyCb);
+ } else {
+ WARN_LOG("Cannot register xml callback! (AppHandle = 0x%p, callbackFun = 0x%p)\n", appHandle, callbackFun);
+ }
+
+ appHandleUnlock(appHandle);
+}
+
+EXPORT void appHandleUnregXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN callbackFun) {
+ INFO_LOG("appHandle = 0x%p, callbackFun = 0x%p\n", appHandle, callbackFun);
+
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ if (appHandle && callbackFun) {
+ NotifyCb *notifyCb, *tmp;
+ LL_FOREACH_SAFE(appHandle->noficyCbList, notifyCb, tmp) {
+ if (notifyCb->cb == callbackFun) {
+ LL_DELETE(appHandle->noficyCbList, notifyCb);
+ free(notifyCb);
+ INFO_LOG("Callback function unregistered. (0x%p, 0x%p)\n", callbackFun, callbackFun);
+ break;
+ }
+ }
+ } else {
+ WARN_LOG("Cannot unregister xml callback! (AppHandle = 0x%p, callbackFun = %p)\n", appHandle, callbackFun);
+ }
+
+ appHandleUnlock(appHandle);
+}
+
+EXPORT void appHandleReloadCustXml(AppHandle *appHandle) {
+#ifndef WIN32
+ char audioTypeName[MAX_AUDIO_TYPE_LEN + 1];
+ AudioType *audioType;
+ struct dirent **namelist;
+ int n;
+
+ if (!appHandle) {
+ ERR_LOG("AppHandle is NULL\n");
+ return;
+ }
+
+ INFO_LOG("Scan the folder for applying cust audio parameter\n");
+
+ n = scandir(appHandle->xmlCusDir, &namelist, 0, alphasort);
+ if (n < 0) {
+ ERR_LOG("Scandir error (%s)\n", appHandle->xmlCusDir);
+ } else {
+ while (n--) {
+ /* File name checking */
+ if (strstr(namelist[n]->d_name, AUDIO_PARAM_XML_POSFIX) == NULL) {
+ DEBUG_LOG("File name's posfix is not AudioParam.xml (%s)\n", namelist[n]->d_name);
+ free(namelist[n]);
+ continue;
+ }
+
+ /* Find related audio type handle */
+ sscanf(namelist[n]->d_name, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioTypeName);
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType) {
+ ERR_LOG("Cannot find the audioType handle (%s)\n", audioTypeName);
+ free(namelist[n]);
+ continue;
+ }
+ audioType->allowReload = 1;
+ MUST_LOG("Notify xml file changed. (%s)\n", audioType->name);
+
+ appHandleNotifyAllCallbacks(appHandle, audioTypeName);
+
+ /* Reload AudioType automatically */
+ appHandleReloadAudioType(appHandle, audioTypeName);
+ MUST_LOG("Reload audio type done. (%s)\n", audioType->name);
+
+ free(namelist[n]);
+ }
+ free(namelist);
+ }
+#endif
+}
+
+#ifndef WIN32
+EXPORT void *reloadCustXmlThreadLoop(void *arg) {
+ AppHandle *appHandle = (AppHandle *)arg;
+ if (!appHandle) {
+ ERR_LOG("AppHandle is NULL\n");
+ return NULL;
+ }
+
+ /* Reload cust XML */
+ while (appHandle->inotifyFd < 0) {
+ WARN_LOG("inotify not ready, waiting 1 sec...");
+ utilUsleep(1000000);
+ }
+ appHandleReloadCustXml(appHandle);
+
+ return NULL;
+}
+
+EXPORT void *appHandleThreadLoop(void *arg) {
+ /* This thread only work on linux platform */
+ /* Only eng load could monitor custom folder */
+ AppHandle *appHandle = (AppHandle *)arg;
+ ssize_t len;
+ char buf[INOTIFY_BUF_SIZE];
+ char *ptr;
+ const struct inotify_event *event;
+ int remonitor = 0;
+ uint32_t iNotifyReMonitorMask = IN_DELETE_SELF | IN_UNMOUNT | IN_IGNORED | IN_Q_OVERFLOW;
+ uint32_t iNotifyReloadMask = IN_CLOSE_WRITE;
+ uint32_t iNotifyWatchEvent = IN_ALL_EVENTS | iNotifyReMonitorMask;
+
+ if (!appHandle->xmlCusDir) {
+ WARN_LOG("xmlCusDir is NULL, don't run the appHandleThreadLoop !!!");
+ exit(1);
+ }
+
+ do { /* Re-monitor loop */
+ /* Create folder first to make inotify work */
+ utilMkdir(appHandle->xmlCusDir);
+
+ /* Register signal handler */
+ struct sigaction sa;
+ sa.sa_handler = NULL;
+ sa.sa_sigaction = &signalHandler;
+ sa.sa_flags = SA_SIGINFO;
+ sigemptyset(&sa.sa_mask);
+
+ if (sigaction(SIGUSR1, &sa, NULL) < 0) {
+ ERR_LOG("sigaction fail");
+ exit(1);
+ }
+
+ /* inotify registration */
+ appHandle->inotifyFd = inotify_init();
+ if (appHandle->inotifyFd < 0) {
+ ERR_LOG("inotify_init failed !!!");
+ exit(1);
+ }
+
+ INFO_LOG("Add inotify monitor path = %s, fd = %d, remonitor = %d\n", appHandle->xmlCusDir, appHandle->inotifyFd, remonitor);
+
+ while (1) { /* Add watch loop */
+ if (inotify_add_watch(appHandle->inotifyFd, appHandle->xmlCusDir, iNotifyWatchEvent) < 0) {
+ INFO_LOG("inotify_add_watch failed !!! try again...");
+ utilMkdir(appHandle->xmlCusDir);
+ utilUsleep(1000000);
+ } else {
+ break;
+ }
+ }
+
+ /* If the cust xml storage not ready before, reload XMLs here */
+ if (appHandle->xmlCusDirReady == 0) {
+ appHandleReloadCustXml(appHandle);
+ appHandle->xmlCusDirReady = 1;
+ }
+
+ while (!appHandle->appThreadExit) { /* Read event loop */
+ remonitor = 0;
+ INFO_LOG("inotify read waiting... (fd = %d)\n", appHandle->inotifyFd);
+ len = read(appHandle->inotifyFd, buf, sizeof(buf));
+
+ if (len < 0) {
+ if (appHandle->appThreadExit) {
+ break;
+ }
+
+ ERR_LOG("inotify read error!\n");
+ pthread_exit(NULL);
+ }
+
+ /* Loop over all events in the buffer */
+ for (ptr = buf; ptr < buf + len; ptr += sizeof(struct inotify_event) + event->len) {
+ event = (const struct inotify_event *) ptr;
+
+ /* Checking event type that if we have to re-monitor */
+ if (event->mask & iNotifyReMonitorMask) {
+ WARN_LOG("Got IN_DELETE_SELF|IN_UNMOUNT|IN_IGNORED event! set xmlCusDirReady with 0. (0x%x)", event->mask);
+ remonitor = 1;
+ appHandle->xmlCusDirReady = 0;
+ break;
+ }
+
+ /* Check if it's reload event */
+ if (!(event->mask & iNotifyReloadMask)) {
+ INFO_LOG("Not reload event! (0x%x)", event->mask);
+ continue;
+ }
+
+ if (event->len) {
+ char audioTypeName[MAX_AUDIO_TYPE_LEN + 1];
+ AudioType *audioType;
+
+ if (strstr(event->name, AUDIO_PARAM_XML_POSFIX) == NULL) {
+ INFO_LOG("File name's posfix is not AudioParam.xml (%s)\n", event->name);
+ continue;
+ }
+
+ sscanf(event->name, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioTypeName);
+ INFO_LOG("XML File chanegd (%s)\n", event->name);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (audioType) {
+ audioType->allowReload = 1;
+ }
+
+ appHandleNotifyAllCallbacks(appHandle, audioTypeName);
+
+ /* Reload AudioType automatically */
+ appHandleReloadAudioType(appHandle, audioTypeName);
+ }
+ }
+
+ /* Once inode changed, try to remonitor it! */
+ if (remonitor) {
+ INFO_LOG("remonitor = %d, remount inotify change!", remonitor);
+ break;
+ }
+ }
+
+ inotify_rm_watch(appHandle->inotifyFd, IN_ALL_EVENTS);
+
+ if (appHandle->inotifyFd) {
+ INFO_LOG("close inotify handle %d, remonitor = %d\n", appHandle->inotifyFd, remonitor);
+ close(appHandle->inotifyFd);
+ }
+ } while (remonitor);
+
+ INFO_LOG("appHandleThreadLoop exit\n");
+ return NULL;
+}
+
+EXPORT void appHandleNotifyAllCallbacks(AppHandle *appHandle, const char *audioTypeName) {
+ if (!appHandle) {
+ ERR_LOG("AppHandle is NULL\n");
+ return;
+ }
+
+ if (appHandle->xmlChangedNotifyEnabled == 1) {
+ /* notify users */
+ NotifyCb *notifyCb;
+ pthread_rwlock_wrlock(&appHandle->notifyLock);
+ INFO_LOG("Notify all callback function.\n");
+ LL_FOREACH(appHandle->noficyCbList, notifyCb) {
+ INFO_LOG("Notify callback function. (0x%p, %pf)\n", notifyCb->cb, notifyCb->cb);
+ (*notifyCb->cb)(appHandle, audioTypeName);
+ }
+ pthread_rwlock_unlock(&appHandle->notifyLock);
+ } else {
+ INFO_LOG("appHandle->xmlChangedNotifyEnabled = %d, don't notify callback!\n", appHandle->xmlChangedNotifyEnabled);
+ }
+}
+#endif
+
+EXPORT APP_STATUS appHandleReloadAudioType(AppHandle *appHandle, const char *audioTypeName) {
+ /* Release old audioType */
+ char *audioTypeFile;
+ AudioType *audioType;
+ xmlDocPtr newAudioParamDoc;
+
+ INFO_LOG("appHandle = 0x%p, audioTypeName = %s\n", appHandle, audioTypeName);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType) {
+ ERR_LOG("Invalid AudioType name = %s\n", audioTypeName);
+ return APP_ERROR;
+ }
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ /* Checking if the audioType reloaded */
+ if (!audioType->allowReload) {
+ INFO_LOG("AudioType is already reloaded!\n");
+ audioTypeUnlock(audioType);
+ return APP_NO_ERROR;
+ }
+
+ /* Load AudioParam XML */
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, AUDIO_PARAM_XML_POSFIX);
+ if (audioTypeFile == NULL) {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, AUDIO_PARAM_XML_POSFIX);
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ newAudioParamDoc = xmlParseFile(audioTypeFile);
+ if (newAudioParamDoc == NULL) {
+ ERR_LOG("Failed to parse %s, ignore the audio type reload\n", audioTypeFile);
+ free(audioTypeFile);
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+ MUST_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ free(audioTypeFile);
+
+ /* Release audio param XML & data */
+ audioTypeReleaseAudioParam(audioType);
+ if (audioType->audioParamDoc) {
+ xmlFreeDoc(audioType->audioParamDoc);
+ audioType->audioParamDoc = NULL;
+ }
+
+ /* Update audioParamDoc */
+ audioType->audioParamDoc = newAudioParamDoc;
+
+ /* Load AudioParam hash */
+ if (audioTypeLoadParamUnitHash(audioType) == APP_ERROR) {
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamTreeHash(audioType) == APP_ERROR) {
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ if (audioType->audioParamDoc) {
+ xmlFreeDoc(audioType->audioParamDoc);
+ audioType->audioParamDoc = NULL;
+ }
+
+ /* AudioType reloaded */
+ audioType->allowReload = 0;
+
+ audioTypeUnlock(audioType);
+ return APP_NO_ERROR;
+}
+
+EXPORT const char *appHandleGetFeatureOptionValue(AppHandle *appHandle, const char *featureOptionName) {
+ FeatureOption *featureOption = NULL;
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL\n");
+ return NULL;
+ }
+
+ if (!featureOptionName) {
+ DEBUG_LOG("featureOptionName is NULL\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(appHandle->featureOptionsHash, featureOptionName, featureOption);
+ if (featureOption) {
+ INFO_LOG("Cache found: %s = %s", featureOptionName, featureOption->value);
+ return featureOption->value;
+ } else {
+ INFO_LOG("Cache not found: %s", featureOptionName);
+ }
+
+#if defined(SYS_IMPL)
+ char *featureOptionStr = NULL;
+ UT_string *str = NULL;
+ utstring_new(str);
+ utstring_printf(str, APP_GET_FO_KEY "#%s", featureOptionName);
+ featureOptionStr = audioSystemGetParameters(utstring_body(str));
+ utstring_free(str);
+
+ // Cache FO value
+ featureOption = featureOptionCreate(featureOptionName, featureOptionStr);
+ HASH_ADD_KEYPTR(hh, appHandle->featureOptionsHash, featureOption->name, strlen(featureOption->name), featureOption);
+
+ return featureOption->value;
+#else
+ return NULL;
+#endif
+}
+
+EXPORT int appHandleIsFeatureOptionEnabled(AppHandle *appHandle, const char *featureOptionName) {
+ const char *featureOptionValueStr;
+ if (!appHandle) {
+ WARN_LOG("appHandle is NULL\n");
+ return 0;
+ }
+
+ if (!featureOptionName) {
+ WARN_LOG("featureOptionName is NULL\n");
+ return 0;
+ }
+
+ featureOptionValueStr = appHandleGetFeatureOptionValue(appHandle, featureOptionName);
+ if (featureOptionValueStr) {
+ return !strncmp(featureOptionValueStr, "yes", strlen("yes") + 1);
+ } else {
+ DEBUG_LOG("No %s such feature option\n", featureOptionName);
+ return 0;
+ }
+}
+
+EXPORT size_t appHandleGetNumOfFeatureOption(AppHandle *appHandle) {
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ return HASH_COUNT(appHandle->featureOptionsHash);
+}
+
+EXPORT FeatureOption *appHandleGetFeatureOptionByIndex(AppHandle *appHandle, size_t index) {
+ FeatureOption *featureOption = NULL;
+ size_t i = 0;
+
+ if (!appHandle) {
+ ERR_LOG("appHandle is NULL\n");
+ return NULL;
+ }
+
+ for (featureOption = appHandle->featureOptionsHash; featureOption ; featureOption = featureOption->hh.next) {
+ if (index == i++) {
+ return featureOption;
+ }
+ }
+
+ return NULL;
+}
+
+/* This function is only work for windows */
+EXPORT void appHandleRedirectIOToConsole() {
+ INFO_LOG("");
+#ifdef WIN32
+ if (outputLogToStdout == 0) {
+ outputLogToStdout = 1;
+ redirectIOToConsole();
+ }
+#endif
+}
+
+int removeNodeByFeatureOption(AppHandle *appHandle, xmlNode *node) {
+ /* Process Category of CategoryTpe Node */
+ xmlChar *featureOption = xmlNodeGetProp(node, ATTRI_FEATURE_OPTION);
+ xmlChar *featureOptionFullStr = featureOption;
+ if (featureOption) {
+ int not = 0;
+ if (featureOption[0] == '!') {
+ not = 1;
+ featureOption++;
+ }
+
+ if (!(not ^ appHandleIsFeatureOptionEnabled(appHandle, (char *)featureOption))) {
+ xmlChar *deleteNodeName;
+ xmlNode *deleteNode = node;
+ node = node->next;
+
+ deleteNodeName = xmlNodeGetProp(deleteNode, ATTRI_NAME);
+ INFO_LOG("Remove %s category (%s feature option is disabled)\n", deleteNodeName, featureOption);
+ xmlFree(deleteNodeName);
+ xmlUnlinkNode(deleteNode);
+ xmlFreeNode(deleteNode);
+ xmlFree(featureOptionFullStr);
+ return 1;
+ }
+ xmlFree(featureOptionFullStr);
+ }
+
+ return 0;
+}
+
+EXPORT int appHandleIsNodeFeatureOptionEnabled(AppHandle *appHandle, xmlNode *node, int defaultValue) {
+ xmlChar *featureOption = xmlNodeGetProp(node, ATTRI_FEATURE_OPTION);
+ xmlChar *featureOptionFullStr = featureOption;
+ int ret = defaultValue;
+ if (featureOption) {
+ int not = 0;
+ if (featureOption[0] == '!') {
+ not = 1;
+ featureOption++;
+ }
+
+ if (!(not ^ appHandleIsFeatureOptionEnabled(appHandle, (char *)featureOption))) {
+ ret = 0;
+ } else {
+ ret = 1;
+ }
+
+ xmlFree(featureOptionFullStr);
+ }
+
+ return ret;
+}
+
+EXPORT void appHandleRemoveAudioTypeByFeatureOptions(AppHandle *appHandle) {
+ int i;
+ size_t numOfAudioType = appHandleGetNumOfAudioType(appHandle);
+ for (i = numOfAudioType - 1; i >= 0; i--) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+ xmlNode *paramUnitDescNode = audioTypeGetParamUnitDescNode(audioType);
+
+ if (paramUnitDescNode) {
+ /* Checking if the ParamUnitDesc node's feature option is disabled */
+ if (appHandleIsNodeFeatureOptionEnabled(appHandle, paramUnitDescNode, 1) == 0) {
+ INFO_LOG("%s AudioType's feature option is disabled, remove it!", audioType->name);
+ HASH_DEL(appHandle->audioTypeHash, audioType);
+ audioTypeRelease(audioType);
+ }
+ }
+ }
+}
+
+EXPORT void appHandleReviseXmlDocByFeatureOptions(AppHandle *appHandle) {
+ // Travel all audioType's category & category group node
+ size_t i;
+ size_t numOfAppHandle = appHandleGetNumOfAudioType(appHandle);
+ for (i = 0; i < numOfAppHandle; i++) {
+ xmlNode *categoryTypeListNode, *categoryTypeNode, *categoryGroupNode, *categoryNode, *prevCategoryGroupNode, *prevCategoryNode, *prevCategoryTypeNode;
+ xmlNode *paramUnitNode, *paramNode, *fieldNode, *preFieldNode;
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Revise param unit */
+ paramUnitNode = audioTypeGetParamUnitNode(audioType);
+ if (paramUnitNode) {
+ paramNode = paramUnitNode->children;
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM))) {
+ fieldNode = paramNode->children;
+ while (fieldNode && (fieldNode = findXmlNodeByElemName(fieldNode->next, ELEM_FIELD))) {
+ preFieldNode = fieldNode->prev;
+ if (removeNodeByFeatureOption(appHandle, fieldNode)) {
+ fieldNode = preFieldNode;
+ continue;
+ }
+ }
+ }
+ }
+
+
+ /* Revise category */
+ categoryTypeListNode = audioTypeGetCategoryTypeListNode(audioType);
+ if (!categoryTypeListNode) {
+ continue;
+ }
+
+ categoryTypeNode = categoryTypeListNode->children;
+ while ((categoryTypeNode = findXmlNodeByElemName(categoryTypeNode->next, ELEM_CATEGORY_TYPE))) {
+ prevCategoryTypeNode = categoryTypeNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryTypeNode)) {
+ categoryTypeNode = prevCategoryTypeNode;
+ continue;
+ }
+
+ /* Process CategoryType node */
+ categoryGroupNode = categoryTypeNode->children;
+ while ((categoryGroupNode = findXmlNodeByElemName(categoryGroupNode->next, ELEM_CATEGORY_GROUP))) {
+ /* Process CategoryGroup of CategoryType Node */
+ prevCategoryGroupNode = categoryGroupNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryGroupNode)) {
+ categoryGroupNode = prevCategoryGroupNode;
+ continue;
+ }
+
+ categoryNode = categoryGroupNode->children;
+ while ((categoryNode = findXmlNodeByElemName(categoryNode->next, ELEM_CATEGORY))) {
+ /* Process Category of CategoryGroup Node */
+ prevCategoryNode = categoryNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryNode)) {
+ categoryNode = prevCategoryNode;
+ }
+ }
+ }
+
+ categoryNode = categoryTypeNode->children;
+ while ((categoryNode = findXmlNodeByElemName(categoryNode->next, ELEM_CATEGORY))) {
+ prevCategoryNode = categoryNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryNode)) {
+ categoryNode = prevCategoryNode;
+ }
+ }
+ }
+ }
+}
+
+EXPORT APP_STATUS appHandleCompressFiles(const char *srcDir, const char *destFile) {
+#ifdef WIN32
+ INFO_LOG("%s(), src = %s, dest = %s\n", __FUNCTION__, srcDir, destFile);
+ if (!srcDir || !destFile) {
+ ERR_LOG("%s(), srcDir or destFile is NULL\n", __FUNCTION__);
+ return APP_ERROR;
+ } else {
+ UT_string *path = NULL;
+ utstring_new(path);
+ utstring_printf(path, "a -tzip %s %s\\*", destFile, srcDir);
+ utilShellExecute("7za.exe", utstring_body(path));
+ utstring_free(path);
+ }
+#else
+ ERR_LOG("Not support on linux (src:%s, dst:%s)\n", srcDir, destFile);
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleUncompressFile(const char *srcFile, const char *destDir) {
+#ifdef WIN32
+ INFO_LOG("%s(), src = %s, dest = %s\n", __FUNCTION__, srcFile, destDir);
+ if (!srcFile || !destDir) {
+ ERR_LOG("%s(), srcFile or destDir is NULL\n", __FUNCTION__);
+ return APP_ERROR;
+ } else {
+ UT_string *path = NULL;
+ utstring_new(path);
+ utstring_printf(path, "x %s -y -o%s\\", srcFile, destDir);
+ utilShellExecute("7za.exe", utstring_body(path));
+ utstring_free(path);
+ }
+#else
+ ERR_LOG("Not support on linux(src:%s, dest:%s)\n", srcFile, destDir);
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleGetAudioTypeSupportedVerInfo(const char *audioTypeName, int *paramUnitDescVerMaj, int *paramUnitDescVerMin, int *audioParamVerMaj, int *audioParamVerMin) {
+ int i = 0;
+ while (audioTypeSupportVerInfo[i].audioTypeName != NULL) {
+ if (!strncmp(audioTypeName, audioTypeSupportVerInfo[i].audioTypeName, strlen(audioTypeName) + 1)) {
+ *paramUnitDescVerMaj = audioTypeSupportVerInfo[i].paramUnitDescVerMaj;
+ *paramUnitDescVerMin = audioTypeSupportVerInfo[i].paramUnitDescVerMin;
+ *audioParamVerMaj = audioTypeSupportVerInfo[i].audioParamVerMaj;
+ *audioParamVerMin = audioTypeSupportVerInfo[i].audioParamVerMin;
+ return APP_NO_ERROR;
+ }
+ i++;
+ }
+
+ /* No audio type info found, using default version */
+ *paramUnitDescVerMaj = 1;
+ *paramUnitDescVerMin = 0;
+ *audioParamVerMaj = 1;
+ *audioParamVerMin = 0;
+
+ INFO_LOG("%s AudioType version support info not found! Set the version with default 1.0\n", audioTypeName);
+ return APP_NO_ERROR;
+}
+
+EXPORT void appHandleShowAudioTypeSupportedVerInfo(AppHandle *appHandle) {
+ int i = 0;
+ INFO_LOG("===========(AppHandle = 0x%p)============\n", appHandle);
+ while (audioTypeSupportVerInfo[i].audioTypeName != NULL) {
+ INFO_LOG("[%d] %s, ParamUnitDesc ver(%d.%d), AudioParam ver(%d.%d)\n",
+ i,
+ audioTypeSupportVerInfo[i].audioTypeName, audioTypeSupportVerInfo[i].paramUnitDescVerMaj,
+ audioTypeSupportVerInfo[i].paramUnitDescVerMin, audioTypeSupportVerInfo[i].audioParamVerMaj, audioTypeSupportVerInfo[i].audioParamVerMin);
+ i++;
+ }
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParser.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParser.h
new file mode 100644
index 0000000..eef274e
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParser.h
@@ -0,0 +1,1425 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Explor all public AudioParamParser APIs
+ */
+
+#ifndef AUDIO_PARAM_PARSER_H
+#define AUDIO_PARAM_PARSER_H
+
+#include <libxml/parser.h>
+#include <libxml/xmlreader.h>
+#include <libxml/tree.h>
+
+#ifdef WIN32
+#pragma warning( disable : 4996 )
+#ifdef __cplusplus
+#define EXPORT extern "C" __declspec(dllexport)
+#else
+#define EXPORT __declspec(dllexport)
+#endif
+#else /* WIN32*/
+#define EXPORT
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif
+
+#include "utstring.h"
+#include "uthash.h"
+#include "utlist.h"
+
+#ifndef WIN32
+#include <dlfcn.h>
+#include <pthread.h>
+#if defined(MTK_YOCTO_AUDIO)
+#include <logger/utils/Log.h>
+#else
+#include <utils/Log.h>
+#endif
+
+#endif
+
+/* Enable cus xml support */
+#define APP_FORCE_ENABLE_CUS_XML
+
+/* Debugging Macro Definition */
+//#define FORCE_DEBUG_LEVEL
+
+static const char *XML_FOLDER_LIST_ON_TUNING_TOOL[] = {
+ ".\\preload_xml\\",
+ NULL
+};
+#define XML_CUS_FOLDER_ON_TUNING_TOOL ".\\cus_xml\\"
+
+static const char *XML_FOLDER_LIST_ON_DEVICE[] = {
+ "/odm/etc/audio_param/",
+ "/vendor/etc/audio_param/",
+ "/system/etc/audio_param/",
+ NULL
+};
+
+/* For AudioParamParser on EM, No valid audio type list */
+static const char *EM_AUDIO_TYPE_LOADING_LIST[] = {
+ NULL
+};
+
+static const char *ATCMDHANDLER_AUDIO_TYPE_LOADING_LIST[] = {
+ "PlaybackACF",
+ "PlaybackDRC",
+ "PlaybackHCF",
+ "PlaybackVolDigi",
+ "SpeechVol",
+ "VoIPVol",
+ "Volume",
+ "VolumeGainMap",
+ NULL
+};
+
+#if defined(SYS_IMPL)
+#define APP_LIB_NAME "libaudio_param_parser-sys.so"
+#else
+#if defined(MTK_YOCTO_AUDIO)
+#define APP_LIB_NAME "libaudioparamparser.so.1.0.0"
+#else
+#define APP_LIB_NAME "libaudio_param_parser-vnd.so"
+#endif
+#endif
+
+#ifndef XML_CUS_FOLDER_ON_DEVICE
+#if defined(MTK_YOCTO_AUDIO)
+#define XML_CUS_FOLDER_ON_DEVICE "/home/root/.audio_param/"
+#else
+#define XML_CUS_FOLDER_ON_DEVICE "/data/vendor/audiohal/audio_param/"
+#endif
+#endif
+
+#define MAX_AUDIO_TYPE_LEN 50
+#define INOTIFY_BUF_SIZE 512
+
+#define AUDIO_PARAM_XML_POSFIX "_AudioParam.xml"
+#define PARAM_UNIT_DESC_XML_POSFIX "_ParamUnitDesc.xml"
+#define PARAM_TREE_VIEW_XML_POSFIX "_ParamTreeView.xml"
+#define FEATURE_OPTIONS_XML "AudioParamOptions.xml"
+
+/* XML element definition */
+#define ELEM_AUDIO_FEATURE_OPTIONS "AudioParamOptions"
+#define ELEM_PARAM "Param"
+#define ELEM_PARAM_UNIT_DESC "ParamUnitDesc"
+#define ELEM_CATEGORY_TYPE_LIST "CategoryTypeList"
+#define ELEM_CATEGORY_TYPE "CategoryType"
+#define ELEM_CATEGORY_GROUP "CategoryGroup"
+#define ELEM_CATEGORY "Category"
+
+#define ELEM_AUDIO_PARAM "AudioParam"
+#define ELEM_PARAM_TREE "ParamTree"
+#define ELEM_PARAM_UNIT_POOL "ParamUnitPool"
+#define ELEM_PARAM_UNIT "ParamUnit"
+#define ELEM_PARAM "Param"
+#define ELEM_FIELD "Field"
+
+#define ELEM_PARAM_TREE_VIEW "ParamTreeView"
+#define ELEM_TREE_ROOT "TreeRoot"
+#define ELEM_SHEET "Sheet"
+#define ELEM_FEATURE "Feature"
+#define ELEM_FIELD_LIST "FieldList"
+#define ELEM_CATEGORY_PATH_LIST "CategoryPathList"
+
+/* XML attribute definition */
+#define ATTRI_NAME "name"
+#define ATTRI_TAB_NAME "tab_name"
+#define ATTRI_VERSION "version"
+#define ATTRI_WORDING "wording"
+#define ATTRI_PARAM_ID "param_id"
+#define ATTRI_PATH "path"
+#define ATTRI_VALUE "value"
+#define ATTRI_TYPE "type"
+#define ATTRI_ARRAY_INDEX "array_index"
+#define ATTRI_BIT "bit"
+#define ATTRI_CHECK_LIST "check_list"
+#define ATTRI_ALIAS "alias"
+#define ATTRI_FEATURE_OPTION "feature_option"
+#define ATTRI_SWITCH_AUDIO_TYPE "switch_audio_type"
+#define ATTRI_SWITCH_PARAM "switch_param"
+#define ATTRI_SWITCH_FIELD "switch_field"
+#define ATTRI_AUDIO_TYPE "audio_type"
+#define ATTRI_PARAM "param"
+#define ATTRI_VISIBLE "visible"
+#define ATTRI_PATH_DESC "path_desc"
+
+/* DATA_TYPE string */
+#define DATA_TYPE_UNKNOWN_STRING "unknown"
+#define DATA_TYPE_STR_STRING "string"
+#define DATA_TYPE_INT_STRING "int"
+#define DATA_TYPE_UINT_STRING "uint"
+#define DATA_TYPE_FLOAT_STRING "float"
+#define DATA_TYPE_BYTE_ARRAY_STRING "byte_array"
+#define DATA_TYPE_UBYTE_ARRAY_STRING "ubyte_array"
+#define DATA_TYPE_SHORT_ARRAY_STRING "short_array"
+#define DATA_TYPE_USHORT_ARRAY_STRING "ushort_array"
+#define DATA_TYPE_INT_ARRAY_STRING "int_array"
+#define DATA_TYPE_UINT_ARRAY_STRING "uint_array"
+#define DATA_TYPE_DOUBLE_ARRAY_STRING "double_array"
+#define DATA_TYPE_FIELD_STRING "Field"
+
+#define ARRAY_SEPERATOR ","
+#define ARRAY_SEPERATOR_CH ','
+#define PARAM_FIELD_NAME_SEPERATOR "/"
+
+#define AUDIO_TYPE_FMT_STR(STR_LEN) AUDIO_TYPE_FMT(STR_LEN)
+#define AUDIO_TYPE_FMT(STR_LEN) "%"#STR_LEN"[^_]"
+
+#define APP_GET_FIELD_KEY "APP_GET_FIELD"
+#define APP_GET_FO_KEY "APP_GET_FO"
+#define APP_GET_PARAM_KEY "APP_GET_PARAM"
+#define APP_GET_CATEGORY_KEY "APP_GET_CATEGORY"
+#define APP_SET_PARAM_KEY "APP_SET_PARAM"
+#define APP_SET_FIELD_KEY "APP_SET_FIELD"
+#define APP_SAVE_XML_KEY "APP_SAVE_XML"
+#define APP_GET_CHECKLIST_KEY "APP_GET_CHECKLIST"
+
+typedef struct _AppHandle AppHandle;
+typedef struct _AudioType AudioType;
+typedef struct _FieldInfo FieldInfo;
+typedef struct _Category Category;
+typedef struct _CategoryAlias CategoryAlias;
+typedef struct _CategoryGroup CategoryGroup;
+typedef struct _CategoryNameAlias CategoryNameAlias;
+typedef struct _CategoryPath CategoryPath;
+typedef struct _CategoryType CategoryType;
+typedef struct _Feature Feature;
+typedef struct _FeatureField FeatureField;
+typedef struct _FeatureOption FeatureOption;
+typedef struct _Param Param;
+typedef struct _ParamInfo ParamInfo;
+typedef struct _ParamTreeView ParamTreeView;
+typedef struct _ParamUnit ParamUnit;
+typedef struct _TreeRoot TreeRoot;
+typedef struct _NotifyCb NotifyCb;
+
+typedef void(*NOTIFY_CB_FUN)(AppHandle *appHandle, const char *audioType);
+
+typedef enum {
+ DEBUG_LEVEL = 0,
+ INFO_LEVEL,
+ WARN_LEVEL,
+ ERR_LEVEL,
+} MSG_LEVEL;
+
+typedef enum {
+ APP_ERROR = 0,
+ APP_NO_ERROR = 1,
+} APP_STATUS;
+
+typedef enum {
+ PARENT_IS_CATEGORY_GROUP = 0,
+ PARENT_IS_CATEGORY_TYPE = 1,
+} CATEGORY_PARENT_TYPE;
+
+/*
+ Due to the system/media/camera/include/system/camera_metadata.h declare the same TYPE_FLOAT enum name,
+ If module include the camera_metadata.h and AudioParamParser.h, AudioParamParser change the DATA_TYPE
+ enum decleration to avoid conflict.
+ User could using the APP_TYPE_FLOAT enum instead the TYPE_FLOAT.
+*/
+#ifndef SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_METADATA_H
+typedef enum {
+ TYPE_UNKNOWN = -1,
+ TYPE_STR,
+ TYPE_INT,
+ TYPE_UINT,
+ TYPE_FLOAT,
+ TYPE_BYTE_ARRAY,
+ TYPE_UBYTE_ARRAY,
+ TYPE_SHORT_ARRAY,
+ TYPE_USHORT_ARRAY,
+ TYPE_INT_ARRAY,
+ TYPE_UINT_ARRAY,
+ TYPE_DOUBLE_ARRAY,
+ TYPE_FIELD,
+} DATA_TYPE;
+#else
+typedef enum {
+ APP_TYPE_UNKNOWN = -1,
+ APP_TYPE_STR,
+ APP_TYPE_INT,
+ APP_TYPE_UINT,
+ APP_TYPE_FLOAT,
+ APP_TYPE_BYTE_ARRAY,
+ APP_TYPE_UBYTE_ARRAY,
+ APP_TYPE_SHORT_ARRAY,
+ APP_TYPE_USHORT_ARRAY,
+ APP_TYPE_INT_ARRAY,
+ APP_TYPE_UINT_ARRAY,
+ APP_TYPE_DOUBLE_ARRAY,
+ APP_TYPE_FIELD,
+} DATA_TYPE;
+#endif
+
+typedef union CategoryParent {
+ Category *category; /* Link to parent Category if it's not CategoryGroup */
+ CategoryType *categoryType; /* Link to parent CategoryType if it's CategoryGroup */
+} CategoryParent;
+
+/* UHash the parameter tree info from ParamTreeView.xml */
+struct _CategoryPath {
+ char *path;
+ Feature *feature;
+ UT_hash_handle hh;
+};
+
+struct _FeatureField {
+ FieldInfo *fieldInfo;
+ UT_hash_handle hh;
+};
+
+struct _Feature {
+ char *name;
+ char *featureOption;
+ FieldInfo *switchFieldInfo;
+ CategoryPath *categoryPathHash;
+ FeatureField *featureFieldHash;
+ AudioType *audioType;
+ UT_hash_handle hh;
+};
+
+struct _TreeRoot {
+ char *name; /* Key */
+ FieldInfo *switchFieldInfo;
+ xmlNode *treeRootNode; /* Used to traversal tree */
+ Feature *featureHash; /* Used to opt feature information */
+ ParamTreeView *paramTreeView; /* Belong to which paramTreeView */
+ UT_hash_handle hh;
+};
+
+struct _ParamTreeView {
+ int verMaj;
+ int verMin;
+ AudioType *audioType;
+ TreeRoot *treeRootHash;
+};
+
+/* Hash the Param & Field info from ParamUnitDesc.xml */
+struct _FieldInfo {
+ char *name; /* key */
+ size_t arrayIndex;
+ int startBit;
+ int endBit;
+ char *checkListStr; /* check list string array */
+ struct _ParamInfo *paramInfo; /* Link to parent ParamInfo */
+ UT_hash_handle hh; /* hash handle */
+};
+
+struct _ParamInfo {
+ char *name; /* key */
+ DATA_TYPE dataType;
+ struct _FieldInfo *fieldInfoHash;
+ AudioType *audioType; /* Link to parent AudioType */
+ UT_hash_handle hh; /* hash handle */
+};
+
+/* Hash the param name with value from AudioParam.xml */
+struct _Param {
+ char *name; /* key */
+ void *data; /* raw data */
+ size_t arraySize; /* Array size if the data is the array pointer */
+ ParamInfo *paramInfo;
+ struct _ParamUnit *paramUnit; /* Link to it's ParamUnit */
+ UT_hash_handle hh; /* hash handle */
+};
+
+/* Hash the id with ParamUnit from AudioParam.xml */
+struct _ParamUnit {
+ int paramId; /* key */
+ int refCount;
+ AudioType *audioType; /* Link to it's AudioType */
+ struct _Param *paramHash; /* ParamUnit's params */
+ UT_hash_handle hh;
+};
+
+/* Hash ParamTree info from AudioParam.xml */
+typedef struct {
+ char *categoryPath; /* key */
+ int paramId; /* Param id */
+ UT_hash_handle hh;
+} ParamTree;
+
+struct _Category {
+ char *wording; /* key */
+ char *name;
+ int visible;
+ CategoryParent parent;
+ CATEGORY_PARENT_TYPE parentType;
+ UT_hash_handle hh; /* Used to handle CategoryType->categoryHash */
+ UT_hash_handle hh2; /* Used to handle CategoryType->allCategoryHash */
+};
+
+struct _CategoryAlias {
+ char *alias; /* key */
+ Category *category;
+ UT_hash_handle hh;
+};
+
+struct _CategoryGroup {
+ char *wording; /* key */
+ char *name;
+ int visible;
+ Category *categoryHash; /* Link to children */
+ CategoryType *categoryType; /* Link to parent */
+ UT_hash_handle hh;
+};
+
+struct _CategoryType {
+ char *wording; /* key */
+ char *name;
+ int visible;
+ CategoryGroup *categoryGroupHash; /* Link to children */
+ Category *categoryHash; /* Link to children (not include these category under CategoryGroup) */
+ Category *allCategoryHash; /* Link to children (include these category under CategoryGroup) */
+ CategoryAlias *categoryAliasHash; /* Save category alias information */
+ AudioType *audioType; /* Link to parent */
+ UT_hash_handle hh;
+};
+
+struct _AudioType {
+ char *name;
+ char *tabName;
+ int paramUnitDescVerMaj; /* ParamUniDesc version */
+ int paramUnitDescVerMin;
+ int audioParamVerMaj; /* AudioParam version */
+ int audioParamVerMin;
+ xmlDocPtr audioParamDoc;
+ xmlDocPtr paramUnitDescDoc;
+ xmlDocPtr paramTreeViewDoc;
+ ParamTree *paramTreeHash;
+ ParamUnit *paramUnitHash;
+ ParamInfo *paramInfoHash;
+ ParamTreeView *paramTreeView;
+ int unusedParamId;
+ int dirty; /* Indicate if the audio type modified without saveing*/
+ int allowReload; /* Indicate the audio type can be reload since xml updated */
+ CategoryType *categoryTypeHash;
+#ifndef WIN32
+ pthread_rwlock_t lock;
+ const char *lockCallerFun; /* Used to cache the lock holder */
+#endif
+ AppHandle *appHandle; /* Link to it's appHandle parent */
+ UT_hash_handle hh;
+};
+
+struct _FeatureOption {
+ char *name;
+ char *value;
+ UT_hash_handle hh;
+};
+
+struct _NotifyCb {
+ NOTIFY_CB_FUN cb;
+ struct _NotifyCb *next, *pre;
+};
+
+struct _AppHandle {
+ const char **xmlDir;
+ char *xmlCusDir;
+ AudioType *audioTypeHash;
+ FeatureOption *featureOptionsHash;
+ xmlDocPtr featureOptionsDoc;
+ int xmlCusDirReady;
+ int xmlChangedNotifyEnabled; /* Used to identify notify enabled */
+#ifndef WIN32
+ pthread_t appThread;
+ int appThreadExit; /* Used to identify thread exit */
+ int inotifyFd;
+ pthread_rwlock_t lock;
+ pthread_rwlock_t notifyLock;
+ const char *lockCallerFun; /* Used to cache the lock holder */
+#endif
+ NotifyCb *noficyCbList;
+ int saveXmlWithHexMode;
+ int normalizeXmlContent; /* Breakdown all parameter tree element & add category path */
+};
+
+typedef struct AudioTypeVerInfo {
+ const char *audioTypeName;
+ int paramUnitDescVerMaj;
+ int paramUnitDescVerMin;
+ int audioParamVerMaj;
+ int audioParamVerMin;
+} AudioTypeVerInfo;
+
+/*
+ AudioParamParser will built-in ParamUnitDesc/AudioParam's maj number checking,
+ The ParamUnitDesc/AudioParam's min number is checking by client.
+*/
+static const AudioTypeVerInfo audioTypeSupportVerInfo [] = {
+ /* AudioType name, ParamUnitDescVer (maj, min), AudioParamVer (maj, min) */
+ {"AudioCommonSetting", 1, 0, 1, 0},
+ {"PlaybackACF", 1, 0, 1, 0},
+ {"Playback", 1, 0, 1, 0},
+ {"PlaybackDRC", 1, 0, 1, 0},
+ {"PlaybackHCF", 1, 0, 1, 0},
+ {"PlaybackVolAna", 1, 0, 1, 0},
+ {"PlaybackVolDigi", 1, 0, 1, 0},
+ {"PlaybackVolUI", 1, 0, 1, 0},
+ {"Record", 1, 0, 1, 0},
+ {"RecordDMNR", 1, 0, 1, 0},
+ {"RecordFIR", 1, 0, 1, 0},
+ {"RecordUI", 1, 0, 1, 0},
+ {"RecordVol", 1, 0, 1, 0},
+ {"RecordVolUI", 1, 0, 1, 0},
+ {"Speech", 1, 0, 1, 0},
+ {"SpeechDMNR", 1, 0, 1, 0},
+ {"SpeechGeneral", 1, 0, 1, 0},
+ {"SpeechMagiClarity", 1, 0, 1, 0},
+ {"SpeechUI", 1, 0, 1, 0},
+ {"SpeechVol", 1, 0, 1, 0},
+ {"SpeechVolUI", 1, 0, 1, 0},
+ {"VoIP", 1, 0, 1, 0},
+ {"VoIPDMNR", 1, 0, 1, 0},
+ {"VoIPGeneral", 1, 0, 1, 0},
+ {"VoIPUI", 1, 0, 1, 0},
+ {"VoIPVol", 1, 0, 1, 0},
+ {"VoIPVolUI", 1, 0, 1, 0},
+ {"Volume", 1, 0, 1, 0},
+ {"VolumeGainMap", 1, 0, 1, 0},
+ {"SpeechDeReverb", 1, 0, 1, 0},
+ {NULL, 0, 0, 0, 0}
+};
+
+typedef struct AppOps {
+ void *handle;
+ AppHandle *(*appHandleGetInstance)(void);
+
+ int (*appSetAudioTypeLoadingList)(const char *audioTypeLoadingList[]);
+ const char *(*appGetAudioTypeLoadingList)(void);
+
+ void (*appSetDebugLevel)(MSG_LEVEL level);
+ MSG_LEVEL (*appGetDebugLevel)(void);
+
+ APP_STATUS (*appHandleInit)(AppHandle *appHandle);
+ APP_STATUS (*appHandleUninit)(AppHandle *appHandle);
+ void (*appHandleRedirectIOToConsole)(void);
+ size_t (*appHandleGetNumOfAudioType)(AppHandle *appHandle);
+ AudioType *(*appHandleGetAudioTypeByIndex)(AppHandle *appHandle, size_t index);
+ AudioType *(*appHandleGetAudioTypeByName)(AppHandle *appHandle, const char *name);
+ const char *(*appHandleGetFeatureOptionValue)(AppHandle *appHandle, const char *featureOptionName);
+ int (*appHandleIsFeatureOptionEnabled)(AppHandle *appHandle, const char *featureOptionName);
+ size_t (*appHandleGetNumOfFeatureOption)(AppHandle *appHandle);
+ FeatureOption *(*appHandleGetFeatureOptionByIndex)(AppHandle *appHandle, size_t index);
+ const char *(*appHandleGetBuildTimeStamp)(void);
+ APP_STATUS (*appHandleCompressFiles)(const char *srcDir, const char *destFile);
+ APP_STATUS (*appHandleUncompressFile)(const char *srcFile, const char *destDir);
+
+ /* Following 2 APIs will acquire app handle write lock automatically */
+ APP_STATUS (*appHandleParseXml)(AppHandle *appHandle, const char *dir[], const char *cusDir);
+ APP_STATUS (*appHandleReloadAudioType)(AppHandle *appHandle, const char *audioTypeName);
+
+ /* AudioType API */
+ APP_STATUS (*audioTypeIsTuningToolSupportedXmlVer)(AudioType *audioType);
+ APP_STATUS (*audioTypeIsDeviceSupportedXmlVer)(AudioType *audioType);
+ size_t (*audioTypeGetNumOfCategoryType)(AudioType *audioType);
+ CategoryType *(*audioTypeGetCategoryTypeByIndex)(AudioType *audioType, size_t idnex);
+ CategoryType *(*audioTypeGetCategoryTypeByName)(AudioType *audioType, const char *categoryTypeName);
+ CategoryType *(*audioTypeGetCategoryTypeByWording)(AudioType *audioType, const char *categoryTypeWording);
+ xmlNode *(*audioTypeGetCategoryTypeListNode)(AudioType *audioType);
+ xmlNode *(*audioTypeGetParamUnitNode)(AudioType *audioType);
+ ParamUnit *(*audioTypeGetParamUnit)(AudioType *audioType, const char *categoryPath);
+ size_t (*audioTypeGetNumOfParamInfo)(AudioType *audioType);
+ ParamInfo *(*audioTypeGetParamInfoByIndex)(AudioType *audioType, size_t index);
+ ParamInfo *(*audioTypeGetParamInfoByName)(AudioType *audioType, const char *paramName);
+ APP_STATUS (*audioTypeSaveAudioParamXml)(AudioType *audioType, const char *saveDir, int clearDirtyBit);
+ int (*audioTypeReadLock)(AudioType *audioType, const char *callerFun);
+ int (*audioTypeWriteLock)(AudioType *audioType, const char *callerFun);
+ int (*audioTypeUnlock)(AudioType *audioType);
+ TreeRoot *(*audioTypeGetTreeRoot)(AudioType *audioType, const char *treeRootName);
+
+ /* Following 3 write APIs will acquire write lock automatically */
+ APP_STATUS (*audioTypeSetParamData)(AudioType *audioType, const char *categoryPath, ParamInfo *paramName, void *dataPtr, int arraySize);
+ APP_STATUS (*audioTypeSetFieldData)(AudioType *audioType, const char *categoryPath, FieldInfo *fieldInfo, unsigned int val);
+ APP_STATUS (*audioTypeParamUnitCopy)(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath);
+
+ /* CategoryType API */
+ size_t (*categoryTypeGetNumOfCategoryGroup)(CategoryType *categoryType);
+ CategoryGroup *(*categoryTypeGetCategoryGroupByIndex)(CategoryType *categoryType, size_t index);
+ CategoryGroup *(*categoryTypeGetCategoryGroupByWording)(CategoryType *categoryType, const char *wording);
+ size_t (*categoryTypeGetNumOfCategory)(CategoryType *categoryType);
+ Category *(*categoryTypeGetCategoryByIndex)(CategoryType *categoryType, size_t index);
+ Category *(*categoryTypeGetCategoryByWording)(CategoryType *categoryType, const char *wording);
+ Category *(*categoryTypeGetCategoryByName)(CategoryType *categoryType, const char *name);
+
+ /* CategoryGroup API */
+ size_t (*categoryGroupGetNumOfCategory)(CategoryGroup *categoryGroup);
+ Category *(*categoryGroupGetCategoryByIndex)(CategoryGroup *categoryGroup, size_t index);
+ Category *(*categoryGroupGetCategoryByWording)(CategoryGroup *categoryGroup, const char *index);
+
+ /* CategoryAlias API */
+ CategoryAlias *(*categoryAliasCreate)(const char *alias, Category *category);
+ void (*categoryAliasRelease)(CategoryAlias *categoryAlias);
+
+ /* ParamInfo API */
+ size_t (*paramInfoGetNumOfFieldInfo)(ParamInfo *paramInfo);
+ FieldInfo *(*paramInfoGetFieldInfoByIndex)(ParamInfo *paramInfo, size_t index);
+ FieldInfo *(*paramInfoGetFieldInfoByName)(ParamInfo *paramInfo, const char *fieldName);
+ char *(*paramNewDataStr)(Param *param);
+ char *(*paramNewDataStrWithMode)(Param *param, int uArrayHexMode);
+
+ /* ParamUnit API */
+ size_t (*paramUnitGetNumOfParam)(ParamUnit *paramUnit);
+ Param *(*paramUnitGetParamByIndex)(ParamUnit *paramUnit, size_t index);
+ Param *(*paramUnitGetParamByName)(ParamUnit *paramUnit, const char *paramName);
+ ParamInfo *(*paramUnitGetParamInfo)(ParamUnit *paramUnit, const char *paramInfoName);
+ FieldInfo *(*paramUnitGetFieldInfo)(ParamUnit *paramUnit, const char *paramName, const char *fieldName);
+ APP_STATUS (*paramUnitGetFieldVal)(ParamUnit *paramUnit, const char *paramName, const char *fieldName, unsigned int *val);
+
+ /* Param API */
+ size_t (*paramGetArraySizeFromString)(const char *str);
+ size_t (*paramGetNumOfBytes)(Param *param);
+ APP_STATUS (*paramGetFieldVal)(Param *param, FieldInfo *fieldInfo, unsigned int *val);
+ APP_STATUS (*paramSetFieldVal)(Param *param, FieldInfo *fieldInfo, unsigned int val);
+ DATA_TYPE (*paramDataTypeToEnum)(const char *dataType);
+ const char *(*paramDataTypeToStr)(DATA_TYPE dataType);
+
+ /* Field API */
+ APP_STATUS (*fieldInfoGetCheckListValue)(FieldInfo *fieldInfo, const char *checkName, unsigned int *checkVal);
+
+ /* TreeRoot API */
+ Feature *(*treeRootGetFeatureByName)(TreeRoot *treeRoot, const char *featureName);
+ int (*featureIsCategoryPathSupport)(Feature *feature, const char *categoryPath);
+
+ /* Xml Node related APIs */
+ xmlNode *(*findXmlNodeByElemName)(xmlNode *node, const char *elemName);
+ xmlChar *(*xmlNodeGetProp)(xmlNode *node, const char *prop);
+ xmlChar *(*xmlNodeGetWording)(xmlNode *node);
+
+ /* Control cust XML enabl API */
+ void (*appHandleCustXmlEnableChanged)(AppHandle* appHandle, int enable);
+
+ /* XML changed callback APIs */
+ void (*appHandleRegXmlChangedCb)(AppHandle *appHandle, NOTIFY_CB_FUN nofiyCallback);
+ void (*appHandleUnregXmlChangedCb)(AppHandle *appHandle, NOTIFY_CB_FUN nofiyCallback);
+
+ /* Utils APIs */
+ APP_STATUS (*utilConvDataStringToNative)(DATA_TYPE dataType, const char *paramDataStr, void **paramData, size_t *arraySize);
+
+ /* Unit test */
+ APP_STATUS (*unitTest)(AppHandle *appHandle);
+ char *(*utilGetStdin)(char *buf, int bufSize);
+
+ /* Following APIs is designed for EM tool integration */
+ APP_STATUS (*utilNativeSetField)(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName, const char *fieldValueStr);
+ APP_STATUS (*utilNativeSetParam)(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *paramDataStr);
+ char *(*utilNativeGetCategory)(const char *audioTypeName, const char *categoryTypeName);
+ char *(*utilNativeGetParam)(const char *audioTypeName, const char *categoryPath, const char *paramName);
+ unsigned int (*utilNativeGetField)(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName);
+ APP_STATUS (*utilNativeSaveXml)(const char *audioTypeName);
+ const char *(*utilNativeGetChecklist)(const char *audioTypeName, const char *paramName, const char *fieldName);
+} AppOps;
+
+extern const char **appAudioTypeLoadingList;
+extern int appDebugLevel;
+static AppOps appOps;
+static short appOpsInited = 0;
+
+#ifndef WIN32
+EXPORT static AppOps *appOpsGetInstance(void) {
+const char *error;
+const char *funName = NULL;
+
+if (appOpsInited == 0) {
+ ALOGD("%s(), init AppOps struct, lib is %s", __FUNCTION__, APP_LIB_NAME);
+
+ /* dlopen */
+ appOps.handle = dlopen(APP_LIB_NAME, RTLD_LAZY);
+ if (!appOps.handle) {
+ ALOGE("%s(), dlopen fail! (%s)\n", __FUNCTION__, dlerror());
+ return NULL;
+ }
+ dlerror(); /* Clear any existing error */
+
+ funName = "appHandleGetInstance";
+ appOps.appHandleGetInstance = (AppHandle * ( *)(void)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* dlsym */
+ funName = "appSetAudioTypeLoadingList";
+ appOps.appSetAudioTypeLoadingList = (int ( *)(const char *audioTypeLoadingList[])) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appGetAudioTypeLoadingList";
+ appOps.appGetAudioTypeLoadingList = (const char*( *)(void)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appSetDebugLevel";
+ appOps.appSetDebugLevel = (void ( *)(MSG_LEVEL level)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appGetDebugLevel";
+ appOps.appGetDebugLevel = (MSG_LEVEL( *)(void)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* appHandle API */
+ funName = "appHandleInit";
+ appOps.appHandleInit = (APP_STATUS( *)(AppHandle * appHandle)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleUninit";
+ appOps.appHandleUninit = (APP_STATUS( *)(AppHandle * appHandle)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleRedirectIOToConsole";
+ appOps.appHandleRedirectIOToConsole = (void ( *)(void)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetNumOfAudioType";
+ appOps.appHandleGetNumOfAudioType = (size_t ( *)(AppHandle * appHandle)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetAudioTypeByIndex";
+ appOps.appHandleGetAudioTypeByIndex = (AudioType * ( *)(AppHandle * appHandle, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetAudioTypeByName";
+ appOps.appHandleGetAudioTypeByName = (AudioType * ( *)(AppHandle * appHandle, const char * name)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetFeatureOptionValue";
+ appOps.appHandleGetFeatureOptionValue = (const char * ( *)(AppHandle * appHandle, const char * featureOptionName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleIsFeatureOptionEnabled";
+ appOps.appHandleIsFeatureOptionEnabled = (int ( *)(AppHandle * appHandle, const char * featureOptionName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetNumOfFeatureOption";
+ appOps.appHandleGetNumOfFeatureOption = (size_t ( *)(AppHandle * appHandle)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetFeatureOptionByIndex";
+ appOps.appHandleGetFeatureOptionByIndex = (FeatureOption * ( *)(AppHandle * appHandle, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleGetBuildTimeStamp";
+ appOps.appHandleGetBuildTimeStamp = (const char * ( *)(void)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleCompressFiles";
+ appOps.appHandleCompressFiles = (APP_STATUS( *)(const char * srcDir, const char * destFile)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleUncompressFile";
+ appOps.appHandleUncompressFile = (APP_STATUS( *)(const char * srcFile, const char * destDir)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Following 2 APIs will acquire app handle write lock automatically */
+ funName = "appHandleParseXml";
+ appOps.appHandleParseXml = (APP_STATUS( *)(AppHandle * appHandle, const char * dir[], const char * cusDir)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleReloadAudioType";
+ appOps.appHandleReloadAudioType = (APP_STATUS( *)(AppHandle * appHandle, const char * audioTypeName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* AudioType API */
+ funName = "audioTypeIsTuningToolSupportedXmlVer";
+ appOps.audioTypeIsTuningToolSupportedXmlVer = (APP_STATUS( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeIsDeviceSupportedXmlVer";
+ appOps.audioTypeIsDeviceSupportedXmlVer = (APP_STATUS( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetNumOfCategoryType";
+ appOps.audioTypeGetNumOfCategoryType = (size_t ( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetCategoryTypeByIndex";
+ appOps.audioTypeGetCategoryTypeByIndex = (CategoryType * ( *)(AudioType * audioType, size_t idnex)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetCategoryTypeByName";
+ appOps.audioTypeGetCategoryTypeByName = (CategoryType * ( *)(AudioType * audioType, const char * categoryTypeName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetCategoryTypeByWording";
+ appOps.audioTypeGetCategoryTypeByWording = (CategoryType * ( *)(AudioType * audioType, const char * categoryTypeWording)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetCategoryTypeListNode";
+ appOps.audioTypeGetCategoryTypeListNode = (xmlNode * ( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetParamUnitNode";
+ appOps.audioTypeGetParamUnitNode = (xmlNode * ( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetParamUnit";
+ appOps.audioTypeGetParamUnit = (ParamUnit * ( *)(AudioType * audioType, const char * categoryPath)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetNumOfParamInfo";
+ appOps.audioTypeGetNumOfParamInfo = (size_t ( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetParamInfoByIndex";
+ appOps.audioTypeGetParamInfoByIndex = (ParamInfo * ( *)(AudioType * audioType, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetParamInfoByName";
+ appOps.audioTypeGetParamInfoByName = (ParamInfo * ( *)(AudioType * audioType, const char * paramName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeSaveAudioParamXml";
+ appOps.audioTypeSaveAudioParamXml = (APP_STATUS( *)(AudioType * audioType, const char * saveDir, int clearDirtyBit)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeReadLock";
+ appOps.audioTypeReadLock = (int ( *)(AudioType * audioType, const char * callerFun)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeWriteLock";
+ appOps.audioTypeWriteLock = (int ( *)(AudioType * audioType, const char * callerFun)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeUnlock";
+ appOps.audioTypeUnlock = (int ( *)(AudioType * audioType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeGetTreeRoot";
+ appOps.audioTypeGetTreeRoot = (TreeRoot * ( *)(AudioType * audioType, const char * treeRootName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Following 3 write APIs will acquire write lock automatically */
+ funName = "audioTypeSetParamData";
+ appOps.audioTypeSetParamData = (APP_STATUS( *)(AudioType * audioType, const char * categoryPath, ParamInfo * paramName, void * dataPtr, int arraySize)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeSetFieldData";
+ appOps.audioTypeSetFieldData = (APP_STATUS( *)(AudioType * audioType, const char * categoryPath, FieldInfo * fieldInfo, unsigned int val)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "audioTypeParamUnitCopy";
+ appOps.audioTypeParamUnitCopy = (APP_STATUS( *)(AudioType * audioType, const char * srcCategoryPath, const char * dstCategoryPath)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* CategoryType API */
+ funName = "categoryTypeGetNumOfCategoryGroup";
+ appOps.categoryTypeGetNumOfCategoryGroup = (size_t ( *)(CategoryType * categoryType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryTypeGetCategoryGroupByIndex";
+ appOps.categoryTypeGetCategoryGroupByIndex = (CategoryGroup * ( *)(CategoryType * categoryType, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryTypeGetCategoryGroupByWording";
+ appOps.categoryTypeGetCategoryGroupByWording = (CategoryGroup * ( *)(CategoryType * categoryType, const char * wording)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryTypeGetNumOfCategory";
+ appOps.categoryTypeGetNumOfCategory = (size_t ( *)(CategoryType * categoryType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryTypeGetCategoryByIndex";
+ appOps.categoryTypeGetCategoryByIndex = (Category * ( *)(CategoryType * categoryType, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryTypeGetCategoryByWording";
+ appOps.categoryTypeGetCategoryByWording = (Category * ( *)(CategoryType * categoryType, const char * wording)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryTypeGetCategoryByName";
+ appOps.categoryTypeGetCategoryByName = (Category * ( *)(CategoryType * categoryType, const char * name)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* CategoryGroup API */
+ funName = "categoryGroupGetNumOfCategory";
+ appOps.categoryGroupGetNumOfCategory = (size_t ( *)(CategoryGroup * categoryGroup)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryGroupGetCategoryByIndex";
+ appOps.categoryGroupGetCategoryByIndex = (Category * ( *)(CategoryGroup * categoryGroup, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryGroupGetCategoryByWording";
+ appOps.categoryGroupGetCategoryByWording = (Category * ( *)(CategoryGroup * categoryGroup, const char * index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* CategoryAlias API */
+ funName = "categoryAliasCreate";
+ appOps.categoryAliasCreate = (CategoryAlias * ( *)(const char * alias, Category * category)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "categoryAliasRelease";
+ appOps.categoryAliasRelease = (void ( *)(CategoryAlias * categoryAlias)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* ParamInfo API */
+ funName = "paramInfoGetNumOfFieldInfo";
+ appOps.paramInfoGetNumOfFieldInfo = (size_t ( *)(ParamInfo * paramInfo)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramInfoGetFieldInfoByIndex";
+ appOps.paramInfoGetFieldInfoByIndex = (FieldInfo * ( *)(ParamInfo * paramInfo, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramInfoGetFieldInfoByName";
+ appOps.paramInfoGetFieldInfoByName = (FieldInfo * ( *)(ParamInfo * paramInfo, const char * fieldName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramNewDataStr";
+ appOps.paramNewDataStr = (char * ( *)(Param * param)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramNewDataStrWithMode";
+ appOps.paramNewDataStrWithMode = (char * ( *)(Param * param, int uArrayHexMode)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* ParamUnit API */
+ funName = "paramUnitGetNumOfParam";
+ appOps.paramUnitGetNumOfParam = (size_t ( *)(ParamUnit * paramUnit)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramUnitGetParamByIndex";
+ appOps.paramUnitGetParamByIndex = (Param * ( *)(ParamUnit * paramUnit, size_t index)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramUnitGetParamByName";
+ appOps.paramUnitGetParamByName = (Param * ( *)(ParamUnit * paramUnit, const char * paramName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramUnitGetParamInfo";
+ appOps.paramUnitGetParamInfo = (ParamInfo * ( *)(ParamUnit * paramUnit, const char * paramInfoName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramUnitGetFieldInfo";
+ appOps.paramUnitGetFieldInfo = (FieldInfo * ( *)(ParamUnit * paramUnit, const char * paramName, const char * fieldName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramUnitGetFieldVal";
+ appOps.paramUnitGetFieldVal = (APP_STATUS( *)(ParamUnit * paramUnit, const char * paramName, const char * fieldName, unsigned int * val)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Param API */
+ funName = "paramGetArraySizeFromString";
+ appOps.paramGetArraySizeFromString = (size_t ( *)(const char * str)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramGetNumOfBytes";
+ appOps.paramGetNumOfBytes = (size_t ( *)(Param * param)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramGetFieldVal";
+ appOps.paramGetFieldVal = (APP_STATUS( *)(Param * param, FieldInfo * fieldInfo, unsigned int * val)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramSetFieldVal";
+ appOps.paramSetFieldVal = (APP_STATUS( *)(Param * param, FieldInfo * fieldInfo, unsigned int val)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramDataTypeToEnum";
+ appOps.paramDataTypeToEnum = (DATA_TYPE( *)(const char * dataType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "paramDataTypeToStr";
+ appOps.paramDataTypeToStr = (const char * ( *)(DATA_TYPE dataType)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Field API */
+ funName = "fieldInfoGetCheckListValue";
+ appOps.fieldInfoGetCheckListValue = (APP_STATUS( *)(FieldInfo * fieldInfo, const char * checkName, unsigned int * checkVal)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* TreeRoot API */
+ funName = "treeRootGetFeatureByName";
+ appOps.treeRootGetFeatureByName = (Feature * ( *)(TreeRoot * treeRoot, const char * featureName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "featureIsCategoryPathSupport";
+ appOps.featureIsCategoryPathSupport = (int ( *)(Feature * feature, const char * categoryPath)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Xml Node related APIs */
+ funName = "findXmlNodeByElemName";
+ appOps.findXmlNodeByElemName = (xmlNode * ( *)(xmlNode * node, const char * elemName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "xmlNodeGetProp";
+ appOps.xmlNodeGetProp = (xmlChar * ( *)(xmlNode * node, const char * prop)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "xmlNodeGetWording";
+ appOps.xmlNodeGetWording = (xmlChar * ( *)(xmlNode * node)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleCustXmlEnableChanged";
+ appOps.appHandleCustXmlEnableChanged = (void ( *)(AppHandle * appHandle, int enable)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* XML changed callback APIs */
+ funName = "appHandleRegXmlChangedCb";
+ appOps.appHandleRegXmlChangedCb = (void ( *)(AppHandle * appHandle, NOTIFY_CB_FUN nofiyCallback)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "appHandleUnregXmlChangedCb";
+ appOps.appHandleUnregXmlChangedCb = (void ( *)(AppHandle * appHandle, NOTIFY_CB_FUN nofiyCallback)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Utils APIs */
+ funName = "utilConvDataStringToNative";
+ appOps.utilConvDataStringToNative = (APP_STATUS( *)(DATA_TYPE dataType, const char * paramDataStr, void **paramData, size_t * arraySize)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Unit test */
+ funName = "unitTest";
+ appOps.unitTest = (APP_STATUS( *)(AppHandle * appHandle)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilGetStdin";
+ appOps.utilGetStdin = (char * ( *)(char * buf, int bufSize)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ /* Following APIs is designed for EM tool integration */
+ funName = "utilNativeSetField";
+ appOps.utilNativeSetField = (APP_STATUS( *)(const char * audioTypeName, const char * categoryPath, const char * paramName, const char * fieldName, const char * fieldValueStr)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilNativeSetParam";
+ appOps.utilNativeSetParam = (APP_STATUS( *)(const char * audioTypeName, const char * categoryPath, const char * paramName, const char * paramDataStr)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilNativeGetCategory";
+ appOps.utilNativeGetCategory = (char * ( *)(const char * audioTypeName, const char * categoryTypeName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilNativeGetParam";
+ appOps.utilNativeGetParam = (char * ( *)(const char * audioTypeName, const char * categoryPath, const char * paramName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilNativeGetField";
+ appOps.utilNativeGetField = (unsigned int ( *)(const char * audioTypeName, const char * categoryPath, const char * paramName, const char * fieldName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilNativeSaveXml";
+ appOps.utilNativeSaveXml = (APP_STATUS( *)(const char * audioTypeName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ funName = "utilNativeGetChecklist";
+ appOps.utilNativeGetChecklist = (const char * ( *)(const char * audioTypeName, const char * paramName, const char * fieldName)) dlsym(appOps.handle, funName);
+ error = dlerror();
+ if (error != NULL) {
+ ALOGE("%s(), dlsym %s fail. (%s)\n", __FUNCTION__, funName, error);
+ return NULL;
+ }
+
+ appOpsInited = 1;
+}
+
+return &appOps;
+}
+
+EXPORT static __attribute__((unused)) int appIsFeatureOptionEnabled(const char* fo) {
+ AppOps* appOps = appOpsGetInstance();
+ if (appOps == NULL) {
+ ALOGE("%s(), AppOps is NULL!\n", __FUNCTION__);
+ return -1;
+ }
+
+ AppHandle *appHandle = appOps->appHandleGetInstance();
+ if (appHandle == NULL) {
+ ALOGE("%s(), AppHandle is NULL!\n", __FUNCTION__);
+ return -1;
+ }
+
+ return appOps->appHandleIsFeatureOptionEnabled(appHandle, fo);
+}
+
+EXPORT static __attribute__((unused)) const char* appGetFeatureOptionValue(const char* fo) {
+ AppOps* appOps = appOpsGetInstance();
+ if (appOps == NULL) {
+ ALOGE("%s(), AppOps is NULL!\n", __FUNCTION__);
+ return NULL;
+ }
+
+ AppHandle *appHandle = appOps->appHandleGetInstance();
+ if (appHandle == NULL) {
+ ALOGE("%s(), AppHandle is NULL!\n", __FUNCTION__);
+ return NULL;
+ }
+
+ return appOps->appHandleGetFeatureOptionValue(appHandle, fo);
+}
+
+static __attribute__((unused)) void appOpsDelInstance() {
+if (appOpsInited == 1) {
+ dlclose(appOps.handle);
+ appOps.handle = NULL;
+ appOpsInited = 0;
+}
+}
+#endif
+
+#ifndef WIN32
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParserPriv.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParserPriv.h
new file mode 100644
index 0000000..bd35157
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamParserPriv.h
@@ -0,0 +1,419 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Explor all private AudioParamParser APIs
+ */
+
+#include "AudioParamParser.h"
+#include <math.h>
+
+#ifdef WIN32
+#ifdef __cplusplus
+#define EXPORT extern "C" __declspec(dllexport)
+#else
+#define EXPORT __declspec(dllexport)
+#endif
+#include <process.h>
+#include <Windows.h>
+#include <direct.h>
+#else /* WIN32*/
+#define EXPORT
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/inotify.h>
+#include <unistd.h>
+#include <utils/Timers.h>
+#include <cutils/properties.h>
+#if defined(MTK_YOCTO_AUDIO)
+#include <signal.h>
+#endif
+#endif
+
+#ifdef __linux__
+#define FOLDER "/"
+#else
+#define FOLDER "\\"
+#endif
+
+#define MAX_PROP_VALUE_LEN (512)
+
+#define PROPERTY_KEY_APP_LOG_LEVEL "vendor.audio.applog.level"
+#define PROPERTY_KEY_XML_DEF_PATH "persist.vendor.audio.tuning.def_path"
+
+extern FILE *appLogFp;
+extern int outputLogToStdout;
+
+#ifdef WIN32
+#define ERR_LOG(format, ...) \
+ if(appDebugLevel <= ERR_LEVEL) \
+ utilLog("ERROR[%d,%d](): %s(), " format"\n^^^^\n", _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define WARN_LOG(format, ...) \
+ if(appDebugLevel <= WARN_LEVEL) \
+ utilLog("WARNING[%d,%d]: %s(), " format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define INFO_LOG(format, ...) \
+ if(appDebugLevel <= INFO_LEVEL) \
+ utilLog("INFO[%d,%d]: %s(), " format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define DEBUG_LOG(format, ...) \
+ if(appDebugLevel <= DEBUG_LEVEL) \
+ utilLog("DEBUG[%d,%d]: %s(), " format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define MUST_LOG(format, ...) \
+ utilLog("INFO[%d,%d]: %s(), " format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define APP_SIZE_T_FT "%lu"
+#define snprintf _snprintf
+#else /* WIN32 */
+#undef LOG_TAG
+#if defined(SYS_IMPL)
+#define LOG_TAG "AudioParamParser-sys"
+#else
+#define LOG_TAG "AudioParamParser-vnd"
+#endif
+
+#include <utils/Log.h>
+
+#define ERR_LOG(format, args...) \
+ if(appDebugLevel <= ERR_LEVEL) \
+ ALOGE("%s(), " format, __FUNCTION__, ##args)
+
+#define WARN_LOG(format, args...) \
+ if(appDebugLevel <= WARN_LEVEL) \
+ ALOGW("%s(), " format, __FUNCTION__, ##args)
+
+#define INFO_LOG(format, args...) \
+ if(appDebugLevel <= INFO_LEVEL) \
+ ALOGI("%s(), " format, __FUNCTION__, ##args)
+
+#define DEBUG_LOG(format, args...) \
+ if(appDebugLevel <= DEBUG_LEVEL) \
+ ALOGD("%s(), " format, __FUNCTION__, ##args)
+
+#define MUST_LOG(format, args...) \
+ ALOGD("%s(), " format, __FUNCTION__, ##args)
+
+#define APP_SIZE_T_FT "%zu"
+#endif
+
+struct _CategoryPathRetrievedParam {
+AudioType *audioType;
+xmlNodePtr paramTreeNode;
+xmlNodePtr paramUnitPoolNode;
+size_t paramIdCounter;
+};
+typedef struct _CategoryPathRetrievedParam CategoryPathRetrievedParam;
+
+typedef void(*CATEGORY_PATH_RETRIEVED_CB_FUN)(const char *categoryPath, const char *fullCategoryPath, CategoryPathRetrievedParam *categoryPathRetrievedParam);
+
+/* Force adding following category group info and bypass categoryGroup path checking */
+static const char *HARD_CATEGORY_GROUP[][3] = {
+/* {AudioTypeName, CategoryTypeName, CategoryGroupName} */
+{"Speech", "Band", "NB"},
+{"Speech", "Band", "WB"},
+{NULL, NULL, NULL}
+};
+
+/***********************
+ * Public API
+ **********************/
+EXPORT int appSetAudioTypeLoadingList(const char *audioTypeLoadingList[]);
+EXPORT const char *appGetAudioTypeLoadingList(void);
+
+EXPORT void appSetDebugLevel(MSG_LEVEL level);
+EXPORT MSG_LEVEL appGetDebugLevel(void);
+
+EXPORT char **appGetXmlDirFromProperty(void);
+
+/* appHandle API */
+EXPORT APP_STATUS appHandleInit(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleUninit(AppHandle *appHandle);
+EXPORT void appHandleRedirectIOToConsole(void);
+EXPORT AppHandle *appHandleGetInstance(void); /* Never uninit global instance */
+EXPORT size_t appHandleGetNumOfAudioType(AppHandle *appHandle);
+EXPORT AudioType *appHandleGetAudioTypeByIndex(AppHandle *appHandle, size_t index);
+EXPORT AudioType *appHandleGetAudioTypeByName(AppHandle *appHandle, const char *name);
+EXPORT const char *appHandleGetFeatureOptionValue(AppHandle *appHandle, const char *featureOptionName);
+EXPORT int appHandleIsFeatureOptionEnabled(AppHandle *appHandle, const char *featureOptionName);
+EXPORT size_t appHandleGetNumOfFeatureOption(AppHandle *appHandle);
+EXPORT FeatureOption *appHandleGetFeatureOptionByIndex(AppHandle *appHandle, size_t index);
+EXPORT const char *appHandleGetBuildTimeStamp();
+EXPORT APP_STATUS appHandleCompressFiles(const char *srcDir, const char *destFile);
+EXPORT APP_STATUS appHandleUncompressFile(const char *srcFile, const char *destDir);
+EXPORT void appHandleCustXmlEnableChanged(AppHandle *appHandle, int enable);
+
+/* Following 4 APIs will acquire app handle write lock automatically */
+EXPORT APP_STATUS appHandleParseXml(AppHandle *appHandle, const char *dir[], const char *cusDir);
+EXPORT APP_STATUS appHandleReloadAudioType(AppHandle *appHandle, const char *audioTypeName);
+EXPORT void appHandleRegXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN nofiyCallback);
+EXPORT void appHandleUnregXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN nofiyCallback);
+
+/* AudioType API */
+EXPORT APP_STATUS audioTypeIsTuningToolSupportedXmlVer(AudioType *audioType);
+EXPORT APP_STATUS audioTypeIsDeviceSupportedXmlVer(AudioType *audioType);
+EXPORT size_t audioTypeGetNumOfCategoryType(AudioType *audioType);
+EXPORT CategoryType *audioTypeGetCategoryTypeByIndex(AudioType *audioType, size_t idnex);
+EXPORT CategoryType *audioTypeGetCategoryTypeByName(AudioType *audioType, const char *categoryTypeName);
+EXPORT CategoryType *audioTypeGetCategoryTypeByWording(AudioType *audioType, const char *categoryTypeWording);
+EXPORT xmlNode *audioTypeGetCategoryTypeListNode(AudioType *audioType);
+EXPORT ParamUnit *audioTypeGetParamUnit(AudioType *audioType, const char *categoryPath);
+EXPORT size_t audioTypeGetNumOfParamInfo(AudioType *audioType);
+EXPORT ParamInfo *audioTypeGetParamInfoByIndex(AudioType *audioType, size_t index);
+EXPORT ParamInfo *audioTypeGetParamInfoByName(AudioType *audioType, const char *paramName);
+EXPORT APP_STATUS audioTypeSaveAudioParamXml(AudioType *audioType, const char *saveDir, int clearDirtyBit);
+EXPORT int audioTypeReadLock(AudioType *audioType, const char *callerFun);
+EXPORT int audioTypeWriteLock(AudioType *audioType, const char *callerFun);
+EXPORT int audioTypeUnlock(AudioType *audioType);
+EXPORT TreeRoot *audioTypeGetTreeRoot(AudioType *audioType, const char *treeRootName);
+
+/* Following 3 write APIs will acquire write lock automatically */
+EXPORT APP_STATUS audioTypeSetParamData(AudioType *audioType, const char *categoryPath, ParamInfo *paramName, void *dataPtr, int arraySize);
+EXPORT APP_STATUS audioTypeSetFieldData(AudioType *audioType, const char *categoryPath, FieldInfo *fieldInfo, unsigned int val);
+EXPORT APP_STATUS audioTypeParamUnitCopy(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath);
+
+/* CategoryType API */
+EXPORT size_t categoryTypeGetNumOfCategoryGroup(CategoryType *categoryType);
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByIndex(CategoryType *categoryType, size_t index);
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByWording(CategoryType *categoryType, const char *wording);
+EXPORT size_t categoryTypeGetNumOfCategory(CategoryType *categoryType);
+EXPORT Category *categoryTypeGetCategoryByIndex(CategoryType *categoryType, size_t index);
+EXPORT Category *categoryTypeGetCategoryByWording(CategoryType *categoryType, const char *wording);
+
+/* CategoryGroup API */
+EXPORT size_t categoryGroupGetNumOfCategory(CategoryGroup *categoryGroup);
+EXPORT Category *categoryGroupGetCategoryByIndex(CategoryGroup *categoryGroup, size_t index);
+EXPORT Category *categoryGroupGetCategoryByWording(CategoryGroup *categoryGroup, const char *index);
+
+/* CategoryAlias API */
+EXPORT CategoryAlias *categoryAliasCreate(const char *alias, Category *category);
+EXPORT void categoryAliasRelease(CategoryAlias *categoryAlias);
+
+/* ParamInfo API */
+EXPORT size_t paramInfoGetNumOfFieldInfo(ParamInfo *paramInfo);
+EXPORT FieldInfo *paramInfoGetFieldInfoByIndex(ParamInfo *paramInfo, size_t index);
+EXPORT FieldInfo *paramInfoGetFieldInfoByName(ParamInfo *paramInfo, const char *fieldName);
+EXPORT char *paramNewDataStr(Param *param);
+EXPORT char *paramNewDataStrWithMode(Param *param, int uArrayHexMode);
+
+/* ParamUnit API */
+EXPORT size_t paramUnitGetNumOfParam(ParamUnit *paramUnit);
+EXPORT Param *paramUnitGetParamByIndex(ParamUnit *paramUnit, size_t index);
+EXPORT Param *paramUnitGetParamByName(ParamUnit *paramUnit, const char *paramName);
+EXPORT ParamInfo *paramUnitGetParamInfo(ParamUnit *paramUnit, const char *paramInfoName);
+EXPORT FieldInfo *paramUnitGetFieldInfo(ParamUnit *paramUnit, const char *paramName, const char *fieldName);
+EXPORT APP_STATUS paramUnitGetFieldVal(ParamUnit *paramUnit, const char *paramName, const char *fieldName, unsigned int *val);
+
+/* Param API */
+EXPORT size_t paramGetArraySizeFromString(const char *str);
+EXPORT size_t paramGetNumOfBytes(Param* param);
+EXPORT APP_STATUS paramGetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int *val);
+EXPORT APP_STATUS paramSetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int val);
+EXPORT DATA_TYPE paramDataTypeToEnum(const char *dataType);
+EXPORT const char *paramDataTypeToStr(DATA_TYPE dataType);
+
+/* Field API */
+EXPORT APP_STATUS fieldInfoGetCheckListValue(FieldInfo *fieldInfo, const char *checkName, unsigned int *checkVal);
+
+/* TreeRoot API */
+EXPORT Feature *treeRootGetFeatureByName(TreeRoot *treeRoot, const char *featureName);
+EXPORT int featureIsCategoryPathSupport(Feature *feature, const char *categoryPath);
+
+/* Xml Node related APIs */
+EXPORT xmlNode *findXmlNodeByElemName(xmlNode *node, const char *elemName);
+EXPORT xmlChar *xmlNodeGetProp(xmlNode *node, const char *prop);
+EXPORT xmlChar *xmlNodeGetWording(xmlNode *node);
+
+/* Utils APIs */
+EXPORT APP_STATUS utilConvDataStringToNative(DATA_TYPE dataType, const char *paramDataStr, void **paramData, size_t *arraySize);
+
+/* Unit test */
+EXPORT APP_STATUS unitTest(AppHandle *appHandle);
+EXPORT char *utilGetStdin(char *buf, int bufSize);
+
+/* Following APIs is designed for EM tool integration */
+EXPORT APP_STATUS utilNativeSetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName, const char *fieldValueStr);
+EXPORT APP_STATUS utilNativeSetParam(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *paramDataStr);
+EXPORT char *utilNativeGetCategory(const char *audioTypeName, const char *categoryTypeName);
+EXPORT char *utilNativeGetParam(const char *audioTypeName, const char *categoryPath, const char *paramName);
+EXPORT unsigned int utilNativeGetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName);
+EXPORT APP_STATUS utilNativeSaveXml(const char *audioTypeName);
+EXPORT const char *utilNativeGetChecklist(const char *audioTypeName, const char *paramName, const char *fieldName);
+
+/***********************
+ * Private APIs
+ **********************/
+/* appHandle API */
+EXPORT APP_STATUS appHandleLoadDirAudioTypeInfo(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleLoadAllAudioTypeXml(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleLoadAudioTypeXml(AppHandle *appHandle, AudioType *audioType);
+EXPORT APP_STATUS appHandleReleaseAllAudioTypeXml(AppHandle *appHandle);
+EXPORT int appHandleIsValidAudioType(AppHandle *appHandle, const char *audioType);
+EXPORT AudioType *appHandleAddAudioType(AppHandle *appHandle, const char *audioType);
+EXPORT AudioType *appHandleGetAudioType(AppHandle *appHandle, size_t index);
+EXPORT void appHandleReleaseAudioTypeHash(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleLoadDirFeatureOptionsInfo(AppHandle *appHandle);
+EXPORT void appHandleReleaseFeatureOptionsHash(AppHandle *appHandle);
+EXPORT void appHandleDumpAudioTypeList(AppHandle *appHandle);
+EXPORT char *appHandleGetAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix);
+EXPORT char *appHandleGetPreloadAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix);
+EXPORT APP_STATUS appHandleLoadAllAudioTypeHash(AppHandle *appHandle);
+EXPORT int appHandleWriteLock(AppHandle *appHandle, const char *callerFun);
+EXPORT int appHandleReadLock(AppHandle *appHandle, const char *callerFun);
+EXPORT int appHandleUnlock(AppHandle *appHandle);
+EXPORT int appHandleInstWriteLock(const char *callerFun);
+EXPORT int appHandleInstUnlock(void);
+EXPORT int appHandleIsNodeFeatureOptionEnabled(AppHandle *appHandle, xmlNode *node, int defaultValue);
+EXPORT void appHandleRemoveAudioTypeByFeatureOptions(AppHandle *appHandle);
+EXPORT void appHandleReviseXmlDocByFeatureOptions(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleGetAudioTypeSupportedVerInfo(const char *audioTypeName, int *paramUnitDescVerMaj, int *paramUnitDescVerMin, int *audioParamVerMaj, int *audioParamVerMin);
+EXPORT void appHandleShowAudioTypeSupportedVerInfo(AppHandle *appHandle);
+EXPORT void appHandleReloadCustXml(AppHandle *appHandle);
+EXPORT void appHandleNotifyAllCallbacks(AppHandle *appHandle, const char *audioTypeName);
+EXPORT void *appHandleThreadLoop(void *arg);
+EXPORT void *reloadCustXmlThreadLoop(void *arg);
+
+/* AudioType API */
+EXPORT AudioType *audioTypeCreate(AppHandle *appHandle, const char *audioTypeName);
+EXPORT void audioTypeRelease(AudioType *audioType);
+EXPORT void audioTypeReleaseAudioParam(AudioType *audioType);
+EXPORT void audioTypeDump(AudioType *audioType);
+EXPORT APP_STATUS audioTypeParseTabName(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadStage1Hash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadStage2Hash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamTreeHash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamTreeView(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamUnitHash(AudioType *audioType);
+EXPORT Param *audioTypeGetParamHash(AudioType *audioType, xmlNode *paramUnitNode);
+EXPORT xmlNode *audioTypeGetParamUnitDescNode(AudioType *audioType);
+EXPORT xmlNode *audioTypeGetParamUnitNode(AudioType *audioType);
+EXPORT APP_STATUS audioTypeParseXmlVer(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamFieldInfoHash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadCategoryTypeHash(AudioType *audioType);
+EXPORT size_t audioTypeGetNumOfParamTree(AudioType *audioType);
+EXPORT APP_STATUS audioTypeValidCategoryGroupName(AudioType *audioType, const char *name);
+EXPORT int audioTypeIsHardCategoryGroup(AudioType *audioType, const char *categoryName);
+EXPORT APP_STATUS audioTypeSetupAudioParamNode(AudioType *audioType, xmlNodePtr audioParamNode);
+
+/* CategoryType API */
+EXPORT CategoryType *categoryTypeCreate(const char *name, const char *wording, AudioType *audioType, int visible);
+EXPORT void categoryTypeRelease(CategoryType *categoryType);
+EXPORT size_t categoryTypeGetNumOfAllCategory(CategoryType *categoryType);
+EXPORT Category *categoryTypeGetAllCategoryByIndex(CategoryType *categoryType, size_t index);
+EXPORT CategoryAlias *categoryTypeGetCategoryByAlias(CategoryType *categoryType, const char *alias);
+EXPORT Category *categoryTypeGetCategoryByName(CategoryType *categoryType, const char *name);
+
+/* CategoryGroup API */
+EXPORT CategoryGroup *categoryGroupCreate(const char *categoryGroupName, const char *categoryGroupWording, CategoryType *categoryType, int visible);
+EXPORT void categoryGroupRelease(CategoryGroup *categoryGroup);
+
+/* Category API */
+EXPORT Category *categoryCreate(const char *name, const char *wording, CATEGORY_PARENT_TYPE parentTypeIsCategoryType, void *parent, int visible);
+EXPORT void categoryRelease(Category *category);
+
+/* ParamTree API */
+EXPORT ParamTree *paramTreeCreate(int paramId, const char *categoryPath);
+EXPORT void paramTreeRelease(ParamTree *paramTree);
+EXPORT size_t paramTreeGetNumOfParam(ParamTree *paramTree);
+
+/* ParamUnit API */
+EXPORT ParamUnit *paramUnitCreate(AudioType *audioType, int id, Param *param);
+EXPORT ParamUnit *paramUnitClone(ParamUnit *paramUnit);
+EXPORT void paramUnitRelease(ParamUnit *paramUnit);
+
+/* ParamInfo API */
+EXPORT ParamInfo *paramInfoCreate(const char *name, DATA_TYPE dataType, AudioType *audioType);
+EXPORT void paramInfoRelease(ParamInfo *paramInfo);
+
+/* FieldInfo API */
+EXPORT FieldInfo *fieldInfoCreate(const char *fieldName, unsigned int arrayIndex, int startBit, int endBit, const char *checkList, ParamInfo *paramInfo);
+EXPORT void fieldInfoRelease(FieldInfo *paramInfo);
+
+/* Param API */
+EXPORT Param *paramCreate(const char *paramName, ParamInfo *paramInfo, const char *paramValue);
+EXPORT void paramRelease(Param *param);
+EXPORT APP_STATUS paramSetupDataInfoByStr(Param *param, const char *str);
+EXPORT APP_STATUS paramSetupDataInfoByVal(Param *param, void *data, int arraySize);
+EXPORT Param *paramHashClone(Param *paramHash);
+
+/* ParamTreeView API */
+EXPORT ParamTreeView *paramTreeViewCreate(AudioType *audioType, int verMaj, int verMin);
+EXPORT void paramTreeViewRelease(ParamTreeView *paramTreeView);
+EXPORT TreeRoot *treeRootCreate(const char *name, xmlNode *treeRootNode, ParamTreeView *paramTreeView);
+EXPORT void treeRootRelease(TreeRoot *treeRoot);
+EXPORT Feature *featureCreate(const char *name, AudioType *audioType, FieldInfo *switchFieldInfo, const char *featureOption);
+EXPORT void featureRelease(Feature *feature);
+EXPORT CategoryPath *categoryPathCreate(Feature *feature, const char *path);
+EXPORT void categoryPathRelease(CategoryPath *categoryPath);
+EXPORT APP_STATUS categoryPathValidation(CategoryPath *categoryPath);
+EXPORT FeatureField *featureFieldCreate(FieldInfo *fieldInfo);
+EXPORT void featureFieldRelease(FeatureField *featureField);
+
+/* Feature Options API */
+EXPORT FeatureOption *featureOptionCreate(const char *name, const char *value);
+EXPORT void featureOptionRelease(FeatureOption *featureOption);
+
+/* Utils API */
+EXPORT char *utilConvDataToString(DATA_TYPE dataType, void *data, int arraySize, int uArrayHexMode);
+EXPORT UT_string *utilNormalizeCategoryPathForAudioType(const char *categoryPath, AudioType *audioType);
+EXPORT UT_string *utilNormalizeCategoryGroupPathForAudioType(const char *categoryPath, AudioType *audioType);
+EXPORT int utilFindUnusedParamId(AudioType *audioType);
+EXPORT void utilUsleep(unsigned int usec);
+EXPORT void utilLog(char *str, ...);
+EXPORT void utilLogClose(void);
+EXPORT FieldInfo *utilXmlNodeGetFieldInfo(AppHandle *appHandle, xmlNode *node, const char *audioTypeAttrName, const char *paramAttrName, const char *fieldAttrName);
+EXPORT void appDumpXmlDoc(xmlDoc *doc);
+EXPORT void redirectIOToConsole(void);
+EXPORT void utilMkdir(const char *dir);
+EXPORT void utilShowParamValue(Param *param);
+EXPORT char *utilStrtok(char *str, const char *delim, char **saveptr);
+EXPORT char *utilGenCheckList(int bits);
+EXPORT int utilCompNormalizeCategoryPath(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath);
+EXPORT int isCustXmlEnable(void);
+EXPORT void utilShellExecute(const char *prog, const char *params);
+EXPORT int utilIsAudioTypeInLoadingList(const char *audioType);
+EXPORT int utilIsUIAudioType(const char *audioType);
+EXPORT void utilDumpAudioTypeLoadingList(const char *audioTypeLoadingList[]);
+
+#if defined(SYS_IMPL)
+EXPORT APP_STATUS registerAudioParameterChangedCallback(AppHandle *appHandle);
+EXPORT APP_STATUS unregisterAudioParameterChangedCallback(AppHandle *appHandle);
+#endif
+
+#ifndef WIN32
+EXPORT void signalHandler(int sig, siginfo_t *info, void *ucontext);
+EXPORT char *audioSystemGetParameters(const char *str);
+EXPORT void audioSystemSetParameters(const char *str);
+#endif
+
+/* Unit Test */
+EXPORT void testDebugLevel(void);
+EXPORT void testHashParamTree(void);
+EXPORT void testHashParamUnit(void);
+EXPORT void testHashParam(void);
+EXPORT APP_STATUS testReadWriteParam(AppHandle *appHandle);
+EXPORT APP_STATUS testMemoryLeak(AppHandle *appHandle);
+EXPORT APP_STATUS testAudioTypeLock(AppHandle *appHandle);
+EXPORT APP_STATUS testAppHandleInitUninit(void);
+EXPORT void inotifyTest(const char *path);
+EXPORT void notifyCbTest(AppHandle *appHandle);
+
+#ifndef WIN32
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamTreeView.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamTreeView.c
new file mode 100644
index 0000000..91268e5
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamTreeView.c
@@ -0,0 +1,358 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement ParamTreeView related APIs
+ */
+
+#include "AudioParamParserPriv.h"
+
+EXPORT ParamTreeView *paramTreeViewCreate(AudioType *audioType, int verMaj, int verMin) {
+ ParamTreeView *paramTreeView = malloc(sizeof(ParamTreeView));
+ paramTreeView->audioType = audioType;
+ paramTreeView->verMaj = verMaj;
+ paramTreeView->verMin = verMin;
+ paramTreeView->treeRootHash = NULL;
+ return paramTreeView;
+}
+
+EXPORT void paramTreeViewRelease(ParamTreeView *paramTreeView) {
+ if (paramTreeView) {
+ if (paramTreeView->treeRootHash) {
+ TreeRoot *tmp, *item;
+ HASH_ITER(hh, paramTreeView->treeRootHash, item, tmp) {
+ HASH_DEL(paramTreeView->treeRootHash, item);
+ treeRootRelease(item);
+ }
+ }
+ free(paramTreeView);
+ }
+}
+
+EXPORT TreeRoot *treeRootCreate(const char *name, xmlNode *treeRootNode, ParamTreeView *paramTreeView) {
+ TreeRoot *treeRoot = malloc(sizeof(TreeRoot));
+ treeRoot->name = strdup(name);
+ treeRoot->treeRootNode = treeRootNode;
+ treeRoot->paramTreeView = paramTreeView;
+ treeRoot->featureHash = NULL;
+ treeRoot->switchFieldInfo = NULL;
+ return treeRoot;
+}
+
+EXPORT void treeRootRelease(TreeRoot *treeRoot) {
+ if (treeRoot) {
+ if (treeRoot->featureHash) {
+ Feature *tmp, *item;
+ HASH_ITER(hh, treeRoot->featureHash, item, tmp) {
+ HASH_DEL(treeRoot->featureHash, item);
+ featureRelease(item);
+ }
+ }
+
+ free(treeRoot->name);
+ free(treeRoot);
+ }
+}
+
+EXPORT Feature *featureCreate(const char *name, AudioType *audioType, FieldInfo *switchFieldInfo, const char *featureOption) {
+ Feature *feature = malloc(sizeof(Feature));
+ feature->name = strdup(name);
+ feature->audioType = audioType;
+
+ if (featureOption) {
+ feature->featureOption = strdup(featureOption);
+ } else {
+ feature->featureOption = NULL;
+ }
+
+ feature->categoryPathHash = NULL;
+ feature->featureFieldHash = NULL;
+ feature->switchFieldInfo = switchFieldInfo;
+ return feature;
+}
+
+EXPORT void featureRelease(Feature *feature) {
+ if (feature) {
+ if (feature->categoryPathHash) {
+ CategoryPath *tmp, *item;
+ HASH_ITER(hh, feature->categoryPathHash, item, tmp) {
+ HASH_DEL(feature->categoryPathHash, item);
+ categoryPathRelease(item);
+ }
+ }
+
+ if (feature->featureFieldHash) {
+ FeatureField *tmp, *item;
+ HASH_ITER(hh, feature->featureFieldHash, item, tmp) {
+ HASH_DEL(feature->featureFieldHash, item);
+ featureFieldRelease(item);
+ }
+ }
+
+ if (feature->name) {
+ free(feature->name);
+ }
+
+ if (feature->featureOption) {
+ free(feature->featureOption);
+ }
+
+ free(feature);
+ }
+}
+
+EXPORT APP_STATUS categoryPathValidation(CategoryPath *categoryPath) {
+ char *path;
+ char *categoryGroup;
+ char *restOfStr = NULL;
+
+ if (!strncmp(categoryPath->path, "", strlen("") + 1)) {
+ return APP_NO_ERROR;
+ }
+
+ path = strdup(categoryPath->path);
+ categoryGroup = utilStrtok(path, ARRAY_SEPERATOR, &restOfStr);
+ if (categoryGroup == NULL || audioTypeValidCategoryGroupName(categoryPath->feature->audioType, categoryGroup) == APP_ERROR) {
+ free(path);
+ return APP_ERROR;
+ }
+
+ while ((categoryGroup = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr)) != NULL) {
+ if (audioTypeValidCategoryGroupName(categoryPath->feature->audioType, categoryGroup) == APP_ERROR) {
+ free(path);
+ return APP_ERROR;
+ }
+ }
+
+ free(path);
+ return APP_NO_ERROR;
+}
+
+EXPORT CategoryPath *categoryPathCreate(Feature *feature, const char *path) {
+ CategoryPath *categoryPath = malloc(sizeof(CategoryPath));
+ categoryPath->path = strdup(path);
+ categoryPath->feature = feature;
+
+#ifdef WIN32
+ /* The category path validation only run on win32 */
+ if (categoryPathValidation(categoryPath) == APP_ERROR) {
+ ERR_LOG("The %s feature's category path is not belong to categoryGroup! (%s)\n", feature->name, categoryPath->path);
+ categoryPathRelease(categoryPath);
+ return NULL;
+ }
+#endif
+
+ return categoryPath;
+}
+
+EXPORT void categoryPathRelease(CategoryPath *categoryPath) {
+ if (categoryPath) {
+ free(categoryPath->path);
+ free(categoryPath);
+ }
+}
+
+EXPORT FeatureField *featureFieldCreate(FieldInfo *fieldInfo) {
+ FeatureField *featureField = malloc(sizeof(FeatureField));
+ featureField->fieldInfo = fieldInfo;
+
+ return featureField;
+}
+
+EXPORT void featureFieldRelease(FeatureField *featureField) {
+ if (featureField) {
+ free(featureField);
+ }
+}
+
+EXPORT Feature *treeRootGetFeatureByName(TreeRoot *treeRoot, const char *featureName) {
+ Feature *feature;
+ HASH_FIND_STR(treeRoot->featureHash, featureName, feature);
+ return feature;
+}
+
+CategoryPath *findFeatureCategoryPath(char **arr, int *Switch, int n, Feature *feature) {
+ CategoryPath *categoryPath = NULL;
+ UT_string *path = NULL;
+ int i;
+
+ /* Generate the search string */
+ utstring_new(path);
+ for (i = 0; i < n; ++i) {
+ if (i == n - 1) {
+ utstring_printf(path, "%s", arr[Switch[i]]);
+ } else {
+ utstring_printf(path, "%s,", arr[Switch[i]]);
+ }
+ }
+
+ /* Find the categoryPath */
+ HASH_FIND_STR(feature->categoryPathHash, utstring_body(path), categoryPath);
+ DEBUG_LOG("Search path = %s, paramTree = 0x%p\n", utstring_body(path), categoryPath);
+
+ utstring_free(path);
+ return categoryPath;
+}
+
+CategoryPath *fuzzySearchFeatureCategoryPath(char **arr, int totalSize, int pickSize, Feature *feature) {
+ CategoryPath *categoryPath = NULL;
+ int i, j, pos = pickSize - 1;
+ int *swpArray;
+
+ if (pickSize > totalSize) {
+ return categoryPath;
+ }
+
+ swpArray = (int *)malloc(sizeof(int) * totalSize);
+
+ for (i = 0; i < totalSize; ++i) {
+ swpArray[i] = i;
+ }
+
+ categoryPath = findFeatureCategoryPath(arr, swpArray, pickSize, feature);
+ if (categoryPath) {
+ free(swpArray);
+ return categoryPath;
+ }
+
+ do {
+ if (swpArray[pickSize - 1] == totalSize - 1) {
+ --pos;
+ } else {
+ pos = pickSize - 1;
+ }
+
+ ++swpArray[pos];
+
+ for (j = pos + 1; j < pickSize; ++j) {
+ swpArray[j] = swpArray[j - 1] + 1;
+ }
+
+ categoryPath = findFeatureCategoryPath(arr, swpArray, pickSize, feature);
+ if (categoryPath) {
+ free(swpArray);
+ return categoryPath;
+ }
+
+ } while (swpArray[0] < totalSize - pickSize);
+
+ free(swpArray);
+ return categoryPath;
+}
+
+CategoryPath *searchFeatureCategoryPath(Feature *feature, const char *categoryPath) {
+ CategoryPath *featureCategoryPath;
+ char **categoryArray;
+ char *category;
+ char *tmpStr;
+ char *restOfStr = NULL;
+ size_t numOfCategoryType;
+ size_t numOfCategory;
+ size_t i = 0;
+
+ DEBUG_LOG("+Feature = %s, categoryPath = %s\n", feature->name, categoryPath);
+
+ /* Full path search first */
+ HASH_FIND_STR(feature->categoryPathHash, categoryPath, featureCategoryPath);
+ if (featureCategoryPath) {
+ DEBUG_LOG("fuzzySearch paramTree found. (path = %s)\n", featureCategoryPath->path);
+ return featureCategoryPath;
+ } else if (!strncmp(categoryPath, "", strlen("") + 1)) {
+ return NULL;
+ }
+
+ /* Setup array for fuzzy search path enum */
+ numOfCategoryType = audioTypeGetNumOfCategoryType(feature->audioType);
+ if (numOfCategoryType > 0) {
+ categoryArray = malloc(sizeof(char *) * numOfCategoryType);
+ if (NULL == categoryArray) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ tmpStr = strdup(categoryPath ? categoryPath : "");
+ category = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+ if (!category) {
+ ERR_LOG("Cannot parse category\n");
+ free(categoryArray);
+ free(tmpStr);
+ return NULL;
+ }
+ categoryArray[i++] = category;
+
+ while ((category = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr)) != NULL) {
+ categoryArray[i++] = category;
+ }
+ numOfCategory = i;
+
+ /* Fuzzy search */
+ for (i = 1; i < numOfCategory; i++) {
+ featureCategoryPath = fuzzySearchFeatureCategoryPath(categoryArray, numOfCategory, numOfCategory - i, feature);
+ if (featureCategoryPath) {
+ break;
+ }
+ }
+
+ if (!featureCategoryPath) {
+ /* If no paramTree found, try to get the root paramTree */
+ UT_string *path = NULL;
+ utstring_new(path);
+ utstring_printf(path, "%s", "");
+ HASH_FIND_STR(feature->categoryPathHash, utstring_body(path), featureCategoryPath);
+ utstring_free(path);
+ }
+
+ free(categoryArray);
+ free(tmpStr);
+
+ DEBUG_LOG("-fuzzySearch featureCategoryPath %s found. \n", featureCategoryPath ? "" : "not ");
+ return featureCategoryPath;
+}
+
+EXPORT int featureIsCategoryPathSupport(Feature *feature, const char *categoryPath) {
+ /* Get the category path */
+ CategoryPath *featureCategoryPath = NULL;
+ UT_string *searchPath;
+
+ if (!feature) {
+ ERR_LOG("feature is NULL\n");
+ return 0;
+ }
+
+ if (!categoryPath) {
+ ERR_LOG("categoryPath is NULL\n");
+ return 0;
+ }
+
+ /* Check if feature support all categoryPath first */
+ featureCategoryPath = searchFeatureCategoryPath(feature, "");
+ if (featureCategoryPath) {
+ return 1;
+ }
+
+ searchPath = utilNormalizeCategoryGroupPathForAudioType(categoryPath, feature->audioType);
+ if (!searchPath) {
+ ERR_LOG("Cannot normalize categoryPath for %s AudioType. (path = %s)\n", feature->audioType->name, categoryPath);
+ return 0;
+ }
+
+ /* Search the feature's category path */
+ featureCategoryPath = searchFeatureCategoryPath(feature, utstring_body(searchPath));
+ utstring_free(searchPath);
+
+ if (featureCategoryPath) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamUnit.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamUnit.c
new file mode 100644
index 0000000..6e758f6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioParamUnit.c
@@ -0,0 +1,182 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement ParamUnit related APIs
+ */
+
+#include "AudioParamParserPriv.h"
+
+EXPORT ParamUnit *paramUnitCreate(AudioType *audioType, int id, Param *param) {
+ size_t numOfParam, i;
+ ParamUnit *paramUnit = (ParamUnit *)malloc(sizeof(ParamUnit));
+ paramUnit->paramId = id;
+ paramUnit->refCount = 0;
+ paramUnit->audioType = audioType;
+ paramUnit->paramHash = param;
+
+ /* Update param's param unit info */
+ numOfParam = paramUnitGetNumOfParam(paramUnit);
+ for (i = 0; i < numOfParam; i++) {
+ Param *param = paramUnitGetParamByIndex(paramUnit, i);
+ param->paramUnit = paramUnit;
+ }
+
+ return paramUnit;
+}
+
+EXPORT ParamUnit *paramUnitClone(ParamUnit *oldParamUnit) {
+ Param *item;
+ ParamUnit *paramUnit;
+
+ if (!oldParamUnit) {
+ ERR_LOG("Original ParamUnit is NULL\n");
+ return NULL;
+ }
+
+ paramUnit = (ParamUnit *)malloc(sizeof(ParamUnit));
+ paramUnit->paramId = oldParamUnit->paramId;
+ paramUnit->refCount = oldParamUnit->refCount;
+ paramUnit->audioType = oldParamUnit->audioType;
+ paramUnit->paramHash = paramHashClone(oldParamUnit->paramHash);
+
+ /* Update param's param unit info */
+ if (paramUnit->paramHash) {
+ for (item = paramUnit->paramHash; item != NULL; item = item->hh.next) {
+ item->paramUnit = paramUnit;
+ }
+ }
+
+ return paramUnit;
+}
+
+EXPORT void paramUnitRelease(ParamUnit *paramUnit) {
+ if (paramUnit) {
+ /* Free ParamUnit's param hash */
+ if (paramUnit->paramHash) {
+ Param *tmp, *item;
+ HASH_ITER(hh, paramUnit->paramHash, item, tmp) {
+ HASH_DEL(paramUnit->paramHash, item);
+ paramRelease(item);
+ }
+ free(paramUnit->paramHash);
+ }
+ free(paramUnit);
+ }
+}
+
+EXPORT size_t paramUnitGetNumOfParam(ParamUnit *paramUnit) {
+ if (!paramUnit) {
+ ERR_LOG("paramUnit is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(paramUnit->paramHash);
+}
+
+EXPORT Param *paramUnitGetParamByIndex(ParamUnit *paramUnit, size_t index) {
+ Param *param = NULL;
+ size_t i = 0;
+
+ if (!paramUnit) {
+ ERR_LOG("paramUnit is NULL!\n");
+ return NULL;
+ }
+
+ for (param = paramUnit->paramHash; param ; param = param->hh.next) {
+ if (index == i++) {
+ return param;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Param *paramUnitGetParamByName(ParamUnit *paramUnit, const char *name) {
+ Param *param = NULL;
+
+ if (!paramUnit) {
+ ERR_LOG("paramUnit is NULL!\n");
+ return NULL;
+ }
+
+ INFO_LOG("AudioType = %s, name = %s\n", paramUnit->audioType ? paramUnit->audioType->name : "NULL", name);
+
+ HASH_FIND_STR(paramUnit->paramHash, name, param);
+
+ if (param && appDebugLevel <= DEBUG_LEVEL) {
+ utilShowParamValue(param);
+ }
+
+ DEBUG_LOG("name = %s, param data = 0x%p, size = "APP_SIZE_T_FT"\n", name, param ? param->data : NULL, param ? param->arraySize : 0);
+ return param;
+}
+
+
+EXPORT APP_STATUS paramUnitGetFieldVal(ParamUnit *paramUnit, const char *paramName, const char *fieldName, unsigned int *val) {
+ ParamInfo *paramInfo;
+ FieldInfo *fieldInfo;
+ Param *param;
+
+ if (!paramUnit) {
+ ERR_LOG("paramUnit is NULL!\n");
+ return APP_ERROR;
+ }
+
+ /* Query field Info */
+ paramInfo = audioTypeGetParamInfoByName(paramUnit->audioType, paramName);
+ if (!paramInfo) {
+ WARN_LOG("Cannot find paramInfo. (param = %s\n)", paramName);
+ return APP_ERROR;
+ }
+
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ if (!fieldInfo) {
+ WARN_LOG("Cannot find fieldInfo. (fieldName = %s\n)", fieldName);
+ return APP_ERROR;
+ }
+
+ /* Query param */
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ if (!param) {
+ WARN_LOG("Cannot get param. (name = %s)\n", paramName);
+ return APP_ERROR;
+ }
+
+ /* Query field val */
+ return paramGetFieldVal(param, fieldInfo, val);
+}
+
+EXPORT ParamInfo *paramUnitGetParamInfo(ParamUnit *paramUnit, const char *paramInfoName) {
+ if (!paramUnit) {
+ ERR_LOG("paramUnit is NULL!\n");
+ return NULL;
+ }
+
+ return audioTypeGetParamInfoByName(paramUnit->audioType, paramInfoName);
+}
+
+EXPORT FieldInfo *paramUnitGetFieldInfo(ParamUnit *paramUnit, const char *paramName, const char *fieldName) {
+ ParamInfo *paramInfo;
+ if (!paramUnit || !paramName || !fieldName) {
+ WARN_LOG("Cannot get field info. (paramUnit id=%d, paramInfoName=%s, fieldInfoName=%s\n)", paramUnit ? paramUnit->paramId : -1, paramName, fieldName);
+ return NULL;
+ }
+
+ paramInfo = audioTypeGetParamInfoByName(paramUnit->audioType, paramName);
+ if (paramInfo) {
+ return paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ } else {
+ return NULL;
+ }
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioType.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioType.c
new file mode 100644
index 0000000..291dbb1
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioType.c
@@ -0,0 +1,1878 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement AudioType related APIs
+ */
+
+#include "AudioParamParserPriv.h"
+
+EXPORT AudioType *audioTypeCreate(AppHandle *appHandle, const char *audioTypeName) {
+ AudioType *audioType = malloc(sizeof(AudioType));
+ audioType->name = strdup(audioTypeName);
+ audioType->tabName = NULL;
+ audioType->audioParamDoc = NULL;
+ audioType->paramUnitDescDoc = NULL;
+ audioType->paramTreeViewDoc = NULL;
+ audioType->paramTreeHash = NULL;
+ audioType->paramTreeView = NULL;
+ audioType->paramUnitHash = NULL;
+ audioType->paramInfoHash = NULL;
+ audioType->categoryTypeHash = NULL;
+ audioType->unusedParamId = 0;
+ audioType->dirty = 0;
+ audioType->allowReload = 0;
+ audioType->appHandle = appHandle;
+ audioType->paramUnitDescVerMaj = 1;
+ audioType->paramUnitDescVerMin = 0;
+ audioType->audioParamVerMaj = 1;
+ audioType->audioParamVerMin = 0;
+#ifndef WIN32
+ pthread_rwlock_init(&audioType->lock, NULL);
+#endif
+
+ return audioType;
+}
+
+EXPORT void audioTypeReleaseAudioParam(AudioType *audioType) {
+ if (audioType->paramTreeHash) {
+ ParamTree *tmp, *item;
+ HASH_ITER(hh, audioType->paramTreeHash, item, tmp) {
+ HASH_DEL(audioType->paramTreeHash, item);
+ paramTreeRelease(item);
+ }
+ free(audioType->paramTreeHash);
+ }
+ audioType->paramTreeHash = NULL;
+
+ if (audioType->paramUnitHash) {
+ ParamUnit *tmp, *item;
+ HASH_ITER(hh, audioType->paramUnitHash, item, tmp) {
+ HASH_DEL(audioType->paramUnitHash, item);
+ paramUnitRelease(item);
+ }
+ free(audioType->paramUnitHash);
+ }
+ audioType->paramUnitHash = NULL;
+}
+
+EXPORT void audioTypeRelease(AudioType *audioType) {
+ // Release AudioType resources
+ INFO_LOG("Free %s AudioType\n", audioType->name);
+
+ /* release XML */
+ if (audioType->audioParamDoc) {
+ xmlFreeDoc(audioType->audioParamDoc);
+ }
+
+ if (audioType->paramUnitDescDoc) {
+ xmlFreeDoc(audioType->paramUnitDescDoc);
+ }
+
+ if (audioType->paramTreeViewDoc) {
+ xmlFreeDoc(audioType->paramTreeViewDoc);
+ }
+
+ /* Release hash & it's content */
+ if (audioType->categoryTypeHash) {
+ CategoryType *tmp, *item;
+ HASH_ITER(hh, audioType->categoryTypeHash, item, tmp) {
+ HASH_DEL(audioType->categoryTypeHash, item);
+ categoryTypeRelease(item);
+ }
+ }
+
+ if (audioType->paramInfoHash) {
+ ParamInfo *tmp, *item;
+ HASH_ITER(hh, audioType->paramInfoHash, item, tmp) {
+ HASH_DEL(audioType->paramInfoHash, item);
+ paramInfoRelease(item);
+ }
+ }
+
+ /* Release audio param info */
+ audioTypeReleaseAudioParam(audioType);
+
+ /* Release param treee view info */
+ paramTreeViewRelease(audioType->paramTreeView);
+
+#ifndef WIN32
+ pthread_rwlock_destroy(&audioType->lock);
+#endif
+
+ audioType->appHandle = NULL;
+ free(audioType->tabName);
+ free(audioType->name);
+ free(audioType);
+}
+
+EXPORT int audioTypeReadLock(AudioType *audioType, const char *callerFun) {
+ int ret = 0;
+
+ if (!audioType) {
+ WARN_LOG("audioType is NULL\n");
+ return ret;
+ }
+
+ /* Lock appHandle */
+ appHandleReadLock(audioType->appHandle, callerFun);
+
+#ifndef WIN32
+ while (1) {
+ if (pthread_rwlock_tryrdlock(&audioType->lock) == 0) {
+ audioType->lockCallerFun = callerFun;
+ DEBUG_LOG("%s audioType lock is locked by %s()\n", audioType->name, audioType->lockCallerFun);
+ break;
+ } else {
+ DEBUG_LOG("Cannot lock the %s audioType lock, delay some time. (the locker is %s())\n", audioType->name, audioType->lockCallerFun);
+ appHandleUnlock(audioType->appHandle);
+ utilUsleep(1);
+ appHandleReadLock(audioType->appHandle, callerFun);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+
+ return ret;
+}
+
+EXPORT int audioTypeWriteLock(AudioType *audioType, const char *callerFun) {
+ int ret = 0;
+
+ if (!audioType) {
+ WARN_LOG("audioType is NULL\n");
+ return ret;
+ }
+
+ /* Lock appHandle */
+ appHandleWriteLock(audioType->appHandle, callerFun);
+
+#ifndef WIN32
+ while (1) {
+ if (pthread_rwlock_trywrlock(&audioType->lock) == 0) {
+ audioType->lockCallerFun = callerFun;
+ DEBUG_LOG("%s audioType lock is locked by %s()\n", audioType->name, audioType->lockCallerFun);
+ break;
+ } else {
+ DEBUG_LOG("Cannot lock the %s audioType lock, delay some time. (the locker is %s())\n", audioType->name, audioType->lockCallerFun);
+ appHandleUnlock(audioType->appHandle);
+ utilUsleep(1);
+ appHandleWriteLock(audioType->appHandle, callerFun);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return ret;
+}
+
+EXPORT int audioTypeUnlock(AudioType *audioType) {
+ int ret = 0;
+
+ if (!audioType) {
+ WARN_LOG("audioType is NULL\n");
+ return ret;
+ }
+
+#ifndef WIN32
+ DEBUG_LOG("Unlock %s audioType lock\n", audioType->name);
+ ret = pthread_rwlock_unlock(&audioType->lock);
+#endif
+
+ /* Unlock appHandle */
+ appHandleUnlock(audioType->appHandle);
+ return ret;
+}
+
+EXPORT void audioTypeDump(AudioType *audioType) {
+ CategoryType *categoryType;
+ ParamUnit *paramUnit;
+ ParamTree *paramTree;
+ ParamInfo *paramInfo;
+
+ INFO_LOG("====================================");
+ INFO_LOG("name = %s\n", audioType->name);
+ INFO_LOG("tabName = %s\n", audioType->tabName);
+ INFO_LOG("paramUnitDescVerMaj = %d\n", audioType->paramUnitDescVerMaj);
+ INFO_LOG("paramUnitDescVerMin = %d\n", audioType->paramUnitDescVerMin);
+ INFO_LOG("audioParamVerMaj = %d\n", audioType->audioParamVerMaj);
+ INFO_LOG("audioParamVerMin = %d\n", audioType->audioParamVerMin);
+ INFO_LOG("unusedParamId = %d\n", audioType->unusedParamId);
+ INFO_LOG("dirty = %d\n", audioType->dirty);
+ INFO_LOG("allowReload = %d\n", audioType->allowReload);
+
+ /* Dump CategoryType */
+ for (categoryType = audioType->categoryTypeHash; categoryType; categoryType = categoryType->hh.next) {
+ // TODO: categoryTypeDump(categoryType);
+ }
+
+ /* Dump ParamInfo */
+ for (paramInfo = audioType->paramInfoHash; paramInfo; paramInfo = paramInfo->hh.next) {
+ // TODO: paramInfoDump(paramInfo);
+ }
+
+ /* Dump ParamUnit */
+ for (paramTree = audioType->paramTreeHash; paramTree; paramTree = paramTree->hh.next) {
+ // TODO: paramTreeDump(paramTree);
+ }
+
+ /* Dump ParamUnit */
+ for (paramUnit = audioType->paramUnitHash; paramUnit; paramUnit = paramUnit->hh.next) {
+ // TODO: paramUnitDump(paramUnit);
+ }
+}
+
+EXPORT APP_STATUS audioTypeIsTuningToolSupportedXmlVer(AudioType *audioType) {
+ int paramUnitDescVerMaj;
+ int paramUnitDescVerMin;
+ int audioParamVerMaj;
+ int audioParamVerMin;
+
+ INFO_LOG("AudioType = %s ParamUnitDesc ver = (%d.%d), AudioParam ver = (%d.%d)\n", audioType ? audioType->name : "NULL", audioType ? audioType->paramUnitDescVerMaj : -1, audioType ? audioType->paramUnitDescVerMin : -1, audioType ? audioType->audioParamVerMaj : -1, audioType ? audioType->audioParamVerMin : -1);
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (appHandleGetAudioTypeSupportedVerInfo(audioType->name, ¶mUnitDescVerMaj, ¶mUnitDescVerMin, &audioParamVerMaj, &audioParamVerMin) == APP_ERROR) {
+ WARN_LOG("Cannot find the %s AudioType support info, don't check it's version\n", audioType->name);
+ return APP_NO_ERROR;
+ }
+
+ if (audioType->paramUnitDescVerMaj > paramUnitDescVerMaj) {
+ ERR_LOG("%s AudioType XML ParamUnitDesc's maj version is not support! XML ver (%d.%d) > AppLib support ver (%d.%d)\n", audioType->name, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, paramUnitDescVerMaj, paramUnitDescVerMin);
+ return APP_ERROR;
+ }
+
+ if (audioType->audioParamVerMaj > audioParamVerMaj) {
+ ERR_LOG("%s AudioType XML AudioParam's maj version is not support! XML ver (%d.%d) > AppLib support ver (%d.%d)\n", audioType->name, audioType->audioParamVerMaj, audioType->audioParamVerMin, audioParamVerMaj, audioParamVerMin);
+ return APP_ERROR;
+ }
+
+ /* If XML ver is lower then tuning tool support, we can upgrade the XML content here automatically */
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeIsDeviceSupportedXmlVer(AudioType *audioType) {
+ int paramUnitDescVerMaj;
+ int paramUnitDescVerMin;
+ int audioParamVerMaj;
+ int audioParamVerMin;
+
+ INFO_LOG("AudioType = %s paramUnitDesc ver = (%d.%d), audioParam ver = (%d.%d)\n", audioType ? audioType->name : "NULL", audioType ? audioType->paramUnitDescVerMaj : -1, audioType ? audioType->paramUnitDescVerMin : -1, audioType ? audioType->audioParamVerMaj : -1, audioType ? audioType->audioParamVerMin : -1);
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (appHandleGetAudioTypeSupportedVerInfo(audioType->name, ¶mUnitDescVerMaj, ¶mUnitDescVerMin, &audioParamVerMaj, &audioParamVerMin) == APP_ERROR) {
+ ERR_LOG("Cannot find the %s AudioType support info\n", audioType->name);
+ return APP_ERROR;
+ }
+
+ if (audioType->paramUnitDescVerMaj > paramUnitDescVerMaj) {
+ ERR_LOG("%s AudioType XML ParamUnitDesc's maj version is not support! XML ver (%d.%d) != AppLib support ver (%d.%d)\n", audioType->name, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, paramUnitDescVerMaj, paramUnitDescVerMin);
+ return APP_ERROR;
+ }
+
+ if (audioType->audioParamVerMaj > audioParamVerMaj) {
+ ERR_LOG("%s AudioType XML AudioParam maj's version is not support! XML ver (%d.%d) != AppLib support ver (%d.%d)\n", audioType->name, audioType->audioParamVerMaj, audioType->audioParamVerMin, audioParamVerMaj, audioParamVerMin);
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeParseTabName(AudioType *audioType) {
+ xmlChar *tabName = NULL;
+ xmlNode *node = NULL;
+ xmlNode *root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+
+ if (!node) {
+ ERR_LOG("Cannnot find the %s element\n", ELEM_PARAM_UNIT_DESC);
+ return APP_ERROR;
+ }
+
+ tabName = xmlGetProp(node, (const xmlChar *)ATTRI_TAB_NAME);
+ if (tabName) {
+ audioType->tabName = strdup((char *)tabName);
+ xmlFree(tabName);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeParseXmlVer(AudioType *audioType) {
+ xmlChar *ver = NULL;
+ xmlNode *node = NULL;
+
+ /* Parse paramUnitDescVer */
+ xmlNode *root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+
+ if (root_element) {
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ }
+
+ if (node) {
+ ver = xmlGetProp(node, (const xmlChar *)ATTRI_VERSION);
+ }
+
+ if (ver) {
+ sscanf((const char *)ver, "%d.%d", &audioType->paramUnitDescVerMaj, &audioType->paramUnitDescVerMin);
+ xmlFree(ver);
+ } else {
+ audioType->paramUnitDescVerMaj = 1;
+ audioType->paramUnitDescVerMin = 0;
+ INFO_LOG("Cannot parse paramUnitDesc xml version (set as default ver = 1.0)\n");
+ }
+
+ /* Parse audioParamVer */
+ root_element = xmlDocGetRootElement(audioType->audioParamDoc);
+
+ if (root_element) {
+ node = findXmlNodeByElemName(root_element, ELEM_AUDIO_PARAM);
+ }
+
+ if (node) {
+ ver = xmlGetProp(node, (const xmlChar *)ATTRI_VERSION);
+ }
+
+ if (ver) {
+ sscanf((const char *)ver, "%d.%d", &audioType->audioParamVerMaj, &audioType->audioParamVerMin);
+ xmlFree(ver);
+ } else {
+ INFO_LOG("Cannot parse audioParam xml version (set as default ver = 1.0)\n");
+ audioType->audioParamVerMaj = 1;
+ audioType->audioParamVerMin = 0;
+ }
+
+ return APP_NO_ERROR;
+}
+
+ParamTree *findParamTree(char **arr, int *Switch, int n, AudioType *audioType) {
+ ParamTree *paramTree = NULL;
+ UT_string *path = NULL;
+ int i;
+
+ /* Generate the search string */
+ utstring_new(path);
+ for (i = 0; i < n; ++i) {
+ if (i == n - 1) {
+ utstring_printf(path, "%s", arr[Switch[i]]);
+ } else {
+ utstring_printf(path, "%s,", arr[Switch[i]]);
+ }
+ }
+
+ /* Find the paramTree */
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(path), paramTree);
+ INFO_LOG("Search path = %s, paramTree = 0x%p\n", utstring_body(path), paramTree);
+
+ utstring_free(path);
+ return paramTree;
+}
+
+ParamTree *fuzzySearchParamTree(char **arr, int totalSize, int pickSize, AudioType *audioType) {
+ ParamTree *paramTree = NULL;
+ int i, j, pos = pickSize - 1;
+ int *swpArray;
+
+ if (pickSize > totalSize) {
+ return paramTree;
+ }
+
+ swpArray = (int *)malloc(sizeof(int) * totalSize);
+
+ for (i = 0; i < totalSize; ++i) {
+ swpArray[i] = i;
+ }
+
+ paramTree = findParamTree(arr, swpArray, pickSize, audioType);
+ if (paramTree) {
+ free(swpArray);
+ return paramTree;
+ }
+
+ do {
+ if (swpArray[pickSize - 1] == totalSize - 1) {
+ --pos;
+ } else {
+ pos = pickSize - 1;
+ }
+
+ ++swpArray[pos];
+
+ for (j = pos + 1; j < pickSize; ++j) {
+ swpArray[j] = swpArray[j - 1] + 1;
+ }
+
+ paramTree = findParamTree(arr, swpArray, pickSize, audioType);
+ if (paramTree) {
+ free(swpArray);
+ return paramTree;
+ }
+
+ } while (swpArray[0] < totalSize - pickSize);
+
+ free(swpArray);
+ return paramTree;
+}
+
+ParamTree *searchParamTree(AudioType *audioType, const char *categoryPath) {
+ ParamTree *paramTree;
+ char **categoryArray;
+ char *category;
+ char *tmpStr;
+ char *restOfStr = NULL;
+ size_t numOfCategoryType;
+ size_t numOfCategory;
+ size_t i = 0;
+
+ if (audioType) {
+ DEBUG_LOG("+AudioType = %s, categoryPath = %s\n", audioType->name, categoryPath);
+ } else {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ /* Full path search first */
+ HASH_FIND_STR(audioType->paramTreeHash, categoryPath, paramTree);
+ if (paramTree) {
+ DEBUG_LOG("fuzzySearch paramTree found. (path = %s, id = %d)\n", categoryPath, paramTree->paramId);
+ return paramTree;
+ }
+
+ /* Setup array for fuzzy search path enum */
+ numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ if (numOfCategoryType > 0) {
+ categoryArray = malloc(sizeof(char *) * numOfCategoryType);
+ if (NULL == categoryArray) {
+ ERR_LOG("allocate working buf fail");
+ return NULL;
+ }
+ }
+ tmpStr = strdup(categoryPath ? categoryPath : "");
+ category = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+ if (!category) {
+ INFO_LOG("Cannot parse category\n");
+ free(categoryArray);
+ free(tmpStr);
+ return NULL;
+ }
+ categoryArray[i++] = category;
+
+ while ((category = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr)) != NULL) {
+ categoryArray[i++] = category;
+ }
+ numOfCategory = i;
+
+ /* Fuzzy search */
+ for (i = 1; i < numOfCategory; i++) {
+ paramTree = fuzzySearchParamTree(categoryArray, numOfCategory, numOfCategory - i, audioType);
+ if (paramTree) {
+ break;
+ }
+ }
+
+ if (!paramTree) {
+ /* If no paramTree found, try to get the root paramTree */
+ UT_string *path = NULL;
+ utstring_new(path);
+ utstring_printf(path, "%s", "");
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(path), paramTree);
+ utstring_free(path);
+ }
+
+ free(categoryArray);
+ free(tmpStr);
+
+ if (paramTree) {
+ DEBUG_LOG("-fuzzySearch paramTree %s found. (path = %s, id = %d)\n", paramTree ? "" : "not ", paramTree->categoryPath, paramTree->paramId);
+ }
+
+ return paramTree;
+}
+
+EXPORT ParamUnit *audioTypeGetParamUnit(AudioType *audioType, const char *categoryPath) {
+ /* Get the category path */
+ ParamTree *paramTree = NULL;
+ ParamUnit *paramUnit = NULL;
+ UT_string *searchPath;
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ if (!categoryPath) {
+ ERR_LOG("categoryPath is NULL (%s)\n", audioType->name);
+ return NULL;
+ }
+
+ searchPath = utilNormalizeCategoryPathForAudioType(categoryPath, audioType);
+ if (!searchPath) {
+ ERR_LOG("Cannot normalize categoryPath for %s AudioType. (path = %s)\n", audioType->name, categoryPath);
+ return NULL;
+ }
+
+ /* CategoryPath -> Param Id */
+ paramTree = searchParamTree(audioType, utstring_body(searchPath));
+
+ /* Param Id -> Param Unit */
+ if (paramTree) {
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, paramUnit);
+ MUST_LOG("AudioType = %s, Search category path = \"%s\" -> \"%s\" -> ref_id = %d -> ParamUnit = 0x%p\n", audioType->name, categoryPath, utstring_body(searchPath), paramTree ? paramTree->paramId : -1, paramUnit);
+ } else {
+ INFO_LOG("No match ref id!! (AudioType = %s, Search category path = \"%s\" -> \"%s\" -> ref id not found)\n", audioType->name, categoryPath, utstring_body(searchPath));
+ }
+
+ utstring_free(searchPath);
+
+ return paramUnit;
+}
+
+EXPORT APP_STATUS audioTypeLoadStage1Hash(AudioType *audioType) {
+ if (audioTypeLoadCategoryTypeHash(audioType) == APP_ERROR) {
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamFieldInfoHash(audioType) == APP_ERROR) {
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamUnitHash(audioType) == APP_ERROR) {
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamTreeHash(audioType) == APP_ERROR) {
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadStage2Hash(AudioType *audioType) {
+ if (audioTypeLoadParamTreeView(audioType) == APP_ERROR) {
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamTreeView(AudioType *audioType) {
+ xmlNode *root = NULL, *paramTreeViewNode = NULL, *treeRootNode = NULL;
+ if (!audioType) {
+ DEBUG_LOG("AudioType is NULL\n");
+ return APP_NO_ERROR;
+ }
+
+ if (!audioType->paramTreeViewDoc) {
+ DEBUG_LOG("No %s%s file exist\n", audioType->name, PARAM_TREE_VIEW_XML_POSFIX);
+ return APP_NO_ERROR;
+ }
+
+ if (audioType->paramTreeView) {
+ ERR_LOG("The audio type's paramTreeView already exist!\n");
+ return APP_ERROR;
+ }
+
+ root = xmlDocGetRootElement(audioType->paramTreeViewDoc);
+
+ if (root) {
+ paramTreeViewNode = findXmlNodeByElemName(root, ELEM_PARAM_TREE_VIEW);
+ }
+
+ if (paramTreeViewNode && paramTreeViewNode->children) {
+ /* Parse version info */
+ int maj, min;
+ xmlChar *ver = xmlGetProp(paramTreeViewNode, (const xmlChar *)ATTRI_VERSION);
+
+ if (ver) {
+ sscanf((const char *)ver, "%d.%d", &maj, &min);
+ } else {
+ INFO_LOG("Cannot parse xml version (ver = %s)\n", ver);
+ return APP_ERROR;
+ }
+
+ audioType->paramTreeView = paramTreeViewCreate(audioType, maj, min);
+ treeRootNode = paramTreeViewNode->children;
+ while ((treeRootNode = findXmlNodeByElemName(treeRootNode->next, ELEM_TREE_ROOT))) {
+ /* Process <TreeRoot> */
+ xmlChar *treeRootName = xmlNodeGetProp(treeRootNode, ATTRI_NAME);
+ TreeRoot *treeRoot = treeRootCreate((const char *)treeRootName, treeRootNode, audioType->paramTreeView);
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeView->treeRootHash, treeRoot->name, strlen(treeRoot->name), treeRoot);
+ INFO_LOG("Add treeRoot name = %s, audioType = %s\n", treeRoot->name, treeRoot->paramTreeView->audioType->name);
+
+ if (treeRootNode->children) {
+ /* Process <Sheet> */
+ xmlNode *featureNode = NULL;
+ xmlNode *sheetNode = findXmlNodeByElemName(treeRootNode->children, ELEM_SHEET);
+ if (sheetNode) {
+ treeRoot->switchFieldInfo = utilXmlNodeGetFieldInfo(audioType->appHandle, sheetNode, ATTRI_SWITCH_AUDIO_TYPE, ATTRI_SWITCH_PARAM, ATTRI_SWITCH_FIELD);
+ if (treeRoot->switchFieldInfo) {
+ INFO_LOG("Add Sheet %s=%s, %s=%s, %s=%s\n", ATTRI_SWITCH_AUDIO_TYPE, treeRoot->switchFieldInfo->paramInfo->audioType->name, ATTRI_SWITCH_PARAM, treeRoot->switchFieldInfo->paramInfo->name, ATTRI_SWITCH_FIELD, treeRoot->switchFieldInfo->name);
+ }
+ }
+
+ /* Process <Feature> */
+ featureNode = treeRootNode->children;
+ while ((featureNode = findXmlNodeByElemName(featureNode->next, ELEM_FEATURE))) {
+ xmlNode *fieldListNode, *fieldNode, *categoryPathListNode, *categoryNode = NULL;
+ FieldInfo *switchFieldInfo = NULL;
+ Feature *feature = NULL;
+
+ /* Check feature option first */
+ /* TODO: check feature options */
+ xmlChar *featureName = xmlGetProp(featureNode, (const xmlChar *)ATTRI_NAME);
+ xmlChar *featureOptionName = xmlGetProp(featureNode, (const xmlChar *)ATTRI_FEATURE_OPTION);
+ /*if (!appHandleIsFeatureOptionEnabled(audioType->appHandle, featureOptionName)) {
+ INFO_LOG("Feature %s not enabled! (depends on feature_option %s\n", featureName, featureOptionName);
+ continue;
+ }*/
+
+ /* Check switch info */
+ switchFieldInfo = utilXmlNodeGetFieldInfo(audioType->appHandle, featureNode, ATTRI_SWITCH_AUDIO_TYPE, ATTRI_SWITCH_PARAM, ATTRI_SWITCH_FIELD);
+
+ /* Create Feature */
+ feature = featureCreate((const char *)featureName, audioType, switchFieldInfo, (const char *)featureOptionName);
+ HASH_ADD_KEYPTR(hh, treeRoot->featureHash, feature->name, strlen(feature->name), feature);
+
+ if (feature->switchFieldInfo) {
+ INFO_LOG("Add Feature name = %s, feature_option = %s, %s=%s, %s=%s, %s=%s\n", featureName, featureOptionName, ATTRI_AUDIO_TYPE, feature->switchFieldInfo->paramInfo->audioType->name, ATTRI_PARAM, feature->switchFieldInfo->paramInfo->name, ATTRI_NAME, feature->switchFieldInfo->name);
+ }
+
+ /* Process <FieldList> */
+ fieldListNode = findXmlNodeByElemName(featureNode->children, ELEM_FIELD_LIST);
+ if (fieldListNode && fieldListNode->children) {
+ fieldNode = fieldListNode->children;
+ while ((fieldNode = findXmlNodeByElemName(fieldNode->next, ELEM_FIELD))) {
+ /* Process <Field> */
+ FieldInfo *fieldInfo = utilXmlNodeGetFieldInfo(audioType->appHandle, fieldNode, ATTRI_AUDIO_TYPE, ATTRI_PARAM, ATTRI_NAME);
+ if (fieldInfo) {
+ FeatureField *featureField = featureFieldCreate(fieldInfo);
+ HASH_ADD_KEYPTR(hh, feature->featureFieldHash, featureField->fieldInfo->name, strlen(featureField->fieldInfo->name), featureField);
+ INFO_LOG("Add FeatureField %s=%s, %s=%s, %s=%s\n", ATTRI_AUDIO_TYPE, featureField->fieldInfo->paramInfo->audioType->name, ATTRI_PARAM, featureField->fieldInfo->paramInfo->name, ATTRI_NAME, featureField->fieldInfo->name);
+ }
+ }
+ }
+
+ /* Process <CategoryPathList> */
+ categoryPathListNode = findXmlNodeByElemName(featureNode->children, ELEM_CATEGORY_PATH_LIST);
+ if (categoryPathListNode && categoryPathListNode->children) {
+ categoryNode = categoryPathListNode->children;
+ while ((categoryNode = findXmlNodeByElemName(categoryNode->next, ELEM_CATEGORY))) {
+ /* Process <Category> */
+ xmlChar *path = xmlGetProp(categoryNode, (const xmlChar *)ATTRI_PATH);
+ if (path) {
+ CategoryPath *categoryPath = categoryPathCreate(feature, (const char *)path);
+ if (categoryPath) {
+ HASH_ADD_KEYPTR(hh, feature->categoryPathHash, categoryPath->path, strlen(categoryPath->path), categoryPath);
+ INFO_LOG("Add CategoryPath path=%s\n", categoryPath->path);
+ } else {
+ ERR_LOG("CategoryPath creation fail! (%s)\n", path);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamTreeHash(AudioType *audioType) {
+ xmlNode *root = NULL, *audioParamNode = NULL, *paramTreeNode = NULL, *paramNode = NULL;
+ root = xmlDocGetRootElement(audioType->audioParamDoc);
+
+ if (root) {
+ audioParamNode = findXmlNodeByElemName(root, ELEM_AUDIO_PARAM);
+ }
+
+ if (audioParamNode) {
+ paramTreeNode = findXmlNodeByElemName(audioParamNode->children, ELEM_PARAM_TREE);
+ }
+
+ if (paramTreeNode && paramTreeNode->children) {
+ paramNode = paramTreeNode->children;
+ } else {
+ ERR_LOG("No param element found!\n");
+ return APP_ERROR;
+ }
+
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM))) {
+ xmlChar *paramId = xmlNodeGetProp(paramNode, ATTRI_PARAM_ID);
+ xmlChar *path = xmlNodeGetProp(paramNode, ATTRI_PATH);
+
+ if (paramId && path) {
+ ParamUnit *paramUnit = NULL;
+ ParamTree *item = paramTreeCreate((int)strtoul((char *)paramId, NULL, 0), (char *)path);
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+ DEBUG_LOG("Add param to ParamTree hash, path=\"%s\", paramId = %d\n", item->categoryPath, item->paramId);
+
+ /* Update the paramUnit's refCount */
+ HASH_FIND_INT(audioType->paramUnitHash, &item->paramId, paramUnit);
+ if (paramUnit) {
+ paramUnit->refCount++;
+ }
+ } else {
+ WARN_LOG("Invalid ParamTree item! (path=%s, param_id=%s)\n", (char *)path, (char *)paramId);
+ }
+
+ xmlFree(paramId);
+ xmlFree(path);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamUnitHash(AudioType *audioType) {
+ xmlNode *root = NULL, *audioParamNode = NULL, *paramTreeNode = NULL, *paramUnitNode = NULL;
+ root = xmlDocGetRootElement(audioType->audioParamDoc);
+
+ if (root) {
+ audioParamNode = findXmlNodeByElemName(root, ELEM_AUDIO_PARAM);
+ }
+
+ if (audioParamNode) {
+ paramTreeNode = findXmlNodeByElemName(audioParamNode->children, ELEM_PARAM_UNIT_POOL);
+ }
+
+ if (paramTreeNode && paramTreeNode->children) {
+ paramUnitNode = paramTreeNode->children;
+ } else {
+ ERR_LOG("No paramUnit element found!\n");
+ return APP_ERROR;
+ }
+
+ while ((paramUnitNode = findXmlNodeByElemName(paramUnitNode->next, ELEM_PARAM_UNIT))) {
+ xmlChar *paramIdXmlStr = xmlNodeGetProp(paramUnitNode, ATTRI_PARAM_ID);
+ int paramId = (int)strtoul((char *)paramIdXmlStr, NULL, 0);
+ Param *paramHash = audioTypeGetParamHash(audioType, paramUnitNode);
+ ParamUnit *paramUnit = paramUnitCreate(audioType, paramId, paramHash);
+
+ /* Insert to hash */
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, paramUnit);
+ DEBUG_LOG("Add ParamHash to ParamUnit hash. (id=%d, param = %p)\n", paramUnit->paramId, paramUnit->paramHash);
+ xmlFree(paramIdXmlStr);
+ }
+
+ return APP_NO_ERROR;
+}
+EXPORT Param *audioTypeGetParamHash(AudioType *audioType, xmlNode *paramUnitNode) {
+ Param *paramHash = NULL;
+ Param *paramItem = NULL;
+ ParamInfo *paramInfo = NULL;
+ xmlNode *paramNode = paramUnitNode->children;
+
+ if (!paramNode) {
+ return NULL;
+ }
+
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM))) {
+ /* Get param info */
+ xmlChar *paramName = xmlNodeGetProp(paramNode, ATTRI_NAME);
+ xmlChar *paramValue = xmlNodeGetProp(paramNode, ATTRI_VALUE);
+
+ if (paramName && paramValue) {
+ HASH_FIND_STR(audioType->paramInfoHash, (char *)paramName, paramInfo);
+
+ /* Add param to hash */
+ if (paramInfo) {
+ paramItem = paramCreate((char *)paramName, paramInfo, (char *)paramValue);
+ HASH_ADD_KEYPTR(hh, paramHash, paramItem->name, strlen(paramItem->name), paramItem);
+ DEBUG_LOG("Add param (name = %s, value = %s) to paramHash(0x%p)\n", paramName, paramValue, paramHash);
+ } else {
+ WARN_LOG("Invalid paramName = %s", paramName);
+ }
+ } else {
+ WARN_LOG("Invalid paramName = %s, paramValue = %s", paramName, paramValue);
+ }
+
+ if (paramName) {
+ xmlFree(paramName);
+ }
+
+ if (paramValue) {
+ xmlFree(paramValue);
+ }
+ }
+
+ return paramHash;
+}
+
+EXPORT APP_STATUS audioTypeLoadCategoryTypeHash(AudioType *audioType) {
+ xmlNode *node, *categoryTypeListNode, *categoryTypeNode, *categoryNode, *subCategoryNode;
+ xmlNode *root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ if (!root_element) {
+ return APP_ERROR;
+ }
+
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ if (!node) {
+ return APP_ERROR;
+ }
+
+ categoryTypeListNode = findXmlNodeByElemName(node->children, ELEM_CATEGORY_TYPE_LIST);
+ if (!categoryTypeListNode) {
+ return APP_ERROR;
+ }
+
+ categoryTypeNode = categoryTypeListNode->children;
+ if (!categoryTypeNode) {
+ return APP_ERROR;
+ }
+
+ while ((categoryTypeNode = findXmlNodeByElemName(categoryTypeNode->next, ELEM_CATEGORY_TYPE))) {
+ xmlChar *categoryTypeName = xmlNodeGetProp(categoryTypeNode, ATTRI_NAME);
+ xmlChar *categoryTypeWording = xmlNodeGetWording(categoryTypeNode);
+ xmlChar *categoryTypeVisibleStr = xmlNodeGetProp(categoryTypeNode, ATTRI_VISIBLE);
+ int categoryTypeVisible = categoryTypeVisibleStr ? strncmp((const char *)categoryTypeVisibleStr, "false", strlen("false") + 1) : 1;
+
+ CategoryType *categoryType = categoryTypeCreate((char *)categoryTypeName, (char *)categoryTypeWording, audioType, categoryTypeVisible);
+ HASH_ADD_KEYPTR(hh, audioType->categoryTypeHash, categoryType->wording, strlen(categoryType->wording), categoryType);
+
+ categoryNode = categoryTypeNode->children;
+ for (categoryNode = categoryTypeNode->children; categoryNode; categoryNode = categoryNode->next) {
+ if (!strncmp((char *)categoryNode->name, ELEM_CATEGORY, strlen(ELEM_CATEGORY) + 1)) {
+ int size;
+ xmlChar *categoryName = xmlNodeGetProp(categoryNode, ATTRI_NAME);
+ xmlChar *categoryWording = xmlNodeGetWording(categoryNode);
+ xmlChar *aliasStr = xmlNodeGetProp(categoryNode, ATTRI_ALIAS);
+ xmlChar *categoryVisibleStr = xmlNodeGetProp(categoryNode, ATTRI_VISIBLE);
+ int categoryVisible = categoryVisibleStr ? strncmp((const char *)categoryVisibleStr, "false", strlen("false") + 1) : 1;
+
+ /* Process wording info */
+ Category *category = categoryCreate((char *)categoryName, (char *)categoryWording, PARENT_IS_CATEGORY_TYPE, categoryType, categoryVisible);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryHash, category->wording, strlen(category->wording), category);
+ HASH_ADD_KEYPTR(hh2, categoryType->allCategoryHash, category->name, strlen(category->name), category);
+
+ /* Process alias info */
+ if (aliasStr) {
+ size = paramGetArraySizeFromString((char *)aliasStr);
+ if (size == 1) {
+ CategoryAlias *categoryAlias = categoryAliasCreate((char *)aliasStr, category);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryAliasHash, categoryAlias->alias, strlen(categoryAlias->alias), categoryAlias);
+ } else {
+ char *tmpStr = strdup((char *)aliasStr);
+ char *restOfStr = NULL;
+ char *alias = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ if (alias != NULL) {
+ CategoryAlias *categoryAlias = categoryAliasCreate(alias, category);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryAliasHash, categoryAlias->alias, strlen(categoryAlias->alias), categoryAlias);
+
+ while ((alias = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ categoryAlias = categoryAliasCreate(alias, category);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryAliasHash, categoryAlias->alias, strlen(categoryAlias->alias), categoryAlias);
+ }
+ }
+ free(tmpStr);
+ }
+ }
+
+ xmlFree(categoryName);
+ xmlFree(categoryWording);
+ xmlFree(aliasStr);
+ } else if (!strncmp((char *)categoryNode->name, ELEM_CATEGORY_GROUP, strlen(ELEM_CATEGORY_GROUP) + 1)) {
+ xmlChar *categoryGroupName = xmlNodeGetProp(categoryNode, ATTRI_NAME);
+ xmlChar *categoryGroupWording = xmlNodeGetWording(categoryNode);
+ xmlChar *categoryGroupVisibleStr = xmlNodeGetProp(categoryNode, ATTRI_VISIBLE);
+ int categoryGroupVisible = categoryGroupVisibleStr ? strncmp((const char *)categoryGroupVisibleStr, "false", strlen("false") + 1) : 1;
+
+ CategoryGroup *categoryGroup = categoryGroupCreate((char *)categoryGroupName, (char *)categoryGroupWording, categoryType, categoryGroupVisible);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryGroupHash, categoryGroup->wording, strlen(categoryGroup->wording), categoryGroup);
+
+ xmlFree(categoryGroupName);
+ xmlFree(categoryGroupWording);
+ xmlFree(categoryGroupVisibleStr);
+
+ //Category* subCategory = categoryCreate(subCategoryNode->name, xmlNodeGetWording(subCategoryNode), IS_CATEGORY_GROUP, categoryType, NULL);
+ for (subCategoryNode = categoryNode->children; subCategoryNode; subCategoryNode = subCategoryNode->next) {
+ if (!strncmp((char *)subCategoryNode->name, ELEM_CATEGORY, strlen(ELEM_CATEGORY) + 1)) {
+ xmlChar *categoryName = xmlNodeGetProp(subCategoryNode, ATTRI_NAME);
+ xmlChar *categoryWording = xmlNodeGetWording(subCategoryNode);
+ xmlChar *categoryVisibleStr = xmlNodeGetProp(subCategoryNode, ATTRI_VISIBLE);
+ int visible = categoryVisibleStr ? strncmp((const char *)categoryVisibleStr, "false", strlen("false") + 1) : 1;
+
+ Category *category = categoryCreate((char *)categoryName, (char *)categoryWording, PARENT_IS_CATEGORY_GROUP, categoryGroup, visible);
+ HASH_ADD_KEYPTR(hh, categoryGroup->categoryHash, category->wording, strlen(category->wording), category);
+ HASH_ADD_KEYPTR(hh2, categoryType->allCategoryHash, category->name, strlen(category->name), category);
+ //printf("\t\t%s wording = %s (name = %s)\n", subCategoryNode->name, xmlNodeGetWording(subCategoryNode), xmlNodeGetProp(subCategoryNode, ATTRI_NAME));
+
+ xmlFree(categoryName);
+ xmlFree(categoryWording);
+ xmlFree(categoryVisibleStr);
+ }
+ }
+
+ }
+ }
+ xmlFree(categoryTypeName);
+ xmlFree(categoryTypeWording);
+ xmlFree(categoryTypeVisibleStr);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamFieldInfoHash(AudioType *audioType) {
+ xmlNode *root = NULL, *audioParamUnitDescNode = NULL, *paramUnitNode = NULL, *paramNode = NULL, *fieldNode = NULL;
+ root = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+
+ if (root) {
+ audioParamUnitDescNode = findXmlNodeByElemName(root, ELEM_PARAM_UNIT_DESC);
+ }
+
+ if (audioParamUnitDescNode && audioParamUnitDescNode->children) {
+ paramUnitNode = findXmlNodeByElemName(audioParamUnitDescNode->children, ELEM_PARAM_UNIT);
+ }
+
+ if (paramUnitNode && paramUnitNode->children) {
+ paramNode = paramUnitNode->children;
+ } else {
+ ERR_LOG("No paramUnit element found!\n");
+ return APP_ERROR;
+ }
+
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM))) {
+ ParamInfo *paramInfo = NULL;
+ /* Get all param */
+ xmlChar *paramName = xmlNodeGetProp(paramNode, ATTRI_NAME);
+ xmlChar *paramTypeStr = xmlNodeGetProp(paramNode, ATTRI_TYPE);
+ DATA_TYPE paramType = paramDataTypeToEnum((char *)paramTypeStr);
+
+ if (!paramName) {
+ ERR_LOG("Cannot find the paramName\n");
+ if (!paramTypeStr) {
+ xmlFree(paramTypeStr);
+ }
+ continue;
+ }
+
+ if (!paramTypeStr) {
+ ERR_LOG("Cannot find the paramType\n");
+ xmlFree(paramName);
+ continue;
+ }
+
+ if (paramType == TYPE_UNKNOWN) {
+ /* The default data type of param element is string*/
+ paramType = TYPE_STR;
+ }
+
+ /* Insert to hash */
+ paramInfo = paramInfoCreate((char *)paramName, paramType, audioType);
+ HASH_ADD_KEYPTR(hh, audioType->paramInfoHash, paramInfo->name, strlen(paramInfo->name), paramInfo);
+ DEBUG_LOG("Add ParamInfo to paramInfoHash hash. (name=%s, type = %x)\n", paramInfo->name, (paramInfo->dataType));
+
+ fieldNode = paramNode->children;
+ if (!fieldNode) {
+ xmlFree(paramName);
+ xmlFree(paramTypeStr);
+ continue;
+ }
+
+ while ((fieldNode = findXmlNodeByElemName(fieldNode->next, ELEM_FIELD))) {
+ xmlChar *fieldName;
+ xmlChar *fieldArrayIndex;
+ xmlChar *fieldBit;
+ xmlChar *fieldCheckList;
+ char *tmpStr;
+ char *restOfStr = NULL;
+ char *startBitStr = NULL;
+ char *endBitStr = NULL;
+ size_t arrayIndex;
+ int startBit;
+ int endBit;
+ errno = 0;
+
+ /* Get name */
+ fieldName = xmlNodeGetProp(fieldNode, ATTRI_NAME);
+ if (!fieldName) {
+ ERR_LOG("Cannot find the fieldName\n");
+ continue;
+ }
+
+ /* Get array_index */
+ fieldArrayIndex = xmlNodeGetProp(fieldNode, ATTRI_ARRAY_INDEX);
+ if (!fieldArrayIndex) {
+ ERR_LOG("Cannot find the array_index\n");
+ xmlFree(fieldName);
+ continue;
+ }
+
+ arrayIndex = strtoul((const char *)fieldArrayIndex, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to array_index!\n", fieldArrayIndex);
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ continue;
+ }
+
+ /* Get bit */
+ fieldBit = xmlNodeGetProp(fieldNode, ATTRI_BIT);
+ if (!fieldBit) {
+ ERR_LOG("Cannot find the fieldBit\n");
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ continue;
+ }
+
+ tmpStr = strdup(fieldBit != NULL ? ((char *)fieldBit) : "");
+ startBitStr = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+ if (startBitStr == NULL) {
+ ERR_LOG("No start bit string");
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ free(tmpStr);
+ continue;
+ }
+
+ startBit = strtoul(startBitStr, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to startBit!\n", tmpStr);
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ free(tmpStr);
+ continue;
+ }
+
+ endBitStr = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr);
+ if (endBitStr == NULL) {
+ ERR_LOG("No end bit string");
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ free(tmpStr);
+ continue;
+ }
+
+ endBit = strtoul(endBitStr, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to endBit!\n", tmpStr);
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ free(tmpStr);
+ continue;
+ }
+ free(tmpStr);
+
+ /* Get check list */
+ fieldCheckList = xmlNodeGetProp(fieldNode, ATTRI_CHECK_LIST);
+ if (startBit >= 0 && endBit >= 0) {
+ FieldInfo *fieldInfo = fieldInfoCreate((char *)fieldName, arrayIndex, startBit, endBit, (char *)fieldCheckList, paramInfo);
+ HASH_ADD_KEYPTR(hh, paramInfo->fieldInfoHash, fieldInfo->name, strlen(fieldInfo->name), fieldInfo);
+ DEBUG_LOG("Add FieldInfo to fieldInfoHash hash. (name=%s, arrayIndex="APP_SIZE_T_FT", bit[%d,%d], check_list = %s, hash size="APP_SIZE_T_FT")\n", fieldInfo->name, arrayIndex, fieldInfo->startBit, fieldInfo->endBit, fieldCheckList, (size_t)paramInfoGetNumOfFieldInfo(paramInfo));
+ } else {
+ ERR_LOG("Cannot create field information. (name=%s, arrayIndex="APP_SIZE_T_FT", startBit=%d, endBit=%d, fieldCheckList=%s)\n", fieldName, arrayIndex, startBit, endBit, fieldCheckList);
+ }
+
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ xmlFree(fieldCheckList);
+ }
+
+ xmlFree(paramName);
+ xmlFree(paramTypeStr);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT ParamTree *paramTreeCreate(int paramId, const char *categoryPath) {
+ ParamTree *paramTree = (ParamTree *)malloc(sizeof(ParamTree));
+ paramTree->paramId = paramId;
+ paramTree->categoryPath = strdup(categoryPath ? categoryPath : "");
+ return paramTree;
+}
+
+EXPORT void paramTreeRelease(ParamTree *paramTree) {
+ if (paramTree) {
+ if (paramTree->categoryPath) {
+ free(paramTree->categoryPath);
+ }
+ free(paramTree);
+ }
+}
+
+EXPORT size_t audioTypeGetNumOfParamTree(AudioType *audioType) {
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return 0;
+ }
+
+ return HASH_COUNT(audioType->paramTreeHash);
+}
+
+EXPORT size_t audioTypeGetNumOfParamInfo(AudioType *audioType) {
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return 0;
+ }
+
+ return HASH_COUNT(audioType->paramInfoHash);
+}
+
+EXPORT ParamInfo *audioTypeGetParamInfoByIndex(AudioType *audioType, size_t index) {
+ ParamInfo *paramInfo = NULL;
+ size_t i = 0;
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ for (paramInfo = audioType->paramInfoHash; paramInfo ; paramInfo = paramInfo->hh.next) {
+ if (index == i++) {
+ return paramInfo;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT ParamInfo *audioTypeGetParamInfoByName(AudioType *audioType, const char *paramName) {
+ ParamInfo *paramInfo;
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ if (!paramName) {
+ ERR_LOG("AudioType = %s, paramName is NULL\n", audioType->name);
+ return NULL;
+ }
+
+ /* Query Param name */
+ HASH_FIND_STR(audioType->paramInfoHash, paramName, paramInfo);
+
+ return paramInfo;
+}
+
+EXPORT size_t audioTypeGetNumOfCategoryType(AudioType *audioType) {
+ return HASH_COUNT(audioType->categoryTypeHash);
+}
+
+EXPORT CategoryType *audioTypeGetCategoryTypeByIndex(AudioType *audioType, size_t index) {
+ CategoryType *categoryType = NULL;
+ size_t i = 0;
+
+ //INFO_LOG("audioType = %s, index = %d\n", audioType ? audioType->name : "NULL", index);
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ for (categoryType = audioType->categoryTypeHash; categoryType ; categoryType = categoryType->hh.next) {
+ if (index == i++) {
+ return categoryType;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryType *audioTypeGetCategoryTypeByName(AudioType *audioType, const char *categoryTypeName) {
+ CategoryType *categoryType = NULL;
+
+ //INFO_LOG("audioType = %s, name = %s\n", audioType ? audioType->name : "NULL", categoryTypeName);
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ for (categoryType = audioType->categoryTypeHash; categoryType ; categoryType = categoryType->hh.next) {
+ if (!strncmp(categoryType->name, categoryTypeName, strlen(categoryTypeName) + 1)) {
+ return categoryType;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryType *audioTypeGetCategoryTypeByWording(AudioType *audioType, const char *categoryTypeWording) {
+ CategoryType *categoryType;
+
+ //INFO_LOG("audioType = %s, categoryTypeWording = %s\n", audioType ? audioType->name : "NULL", categoryTypeWording);
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ /* Query Param name */
+ HASH_FIND_STR(audioType->categoryTypeHash, categoryTypeWording, categoryType);
+
+ return categoryType;
+}
+
+EXPORT APP_STATUS audioTypeSetParamData(AudioType *audioType, const char *fullCategoryPath, ParamInfo *paramInfo, void *paramData, int arraySize) {
+ ParamTree *paramTree = NULL;
+ UT_string *categoryPath = NULL;
+ char *paramDataStr;
+
+ INFO_LOG("+++\n");
+ if (!audioType) {
+ ERR_LOG("---audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fullCategoryPath) {
+ ERR_LOG("---categoryPath is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!paramInfo) {
+ ERR_LOG("---paramInfo is NULL\n");
+ return APP_ERROR;
+ }
+
+ categoryPath = utilNormalizeCategoryPathForAudioType(fullCategoryPath, audioType);
+ if (!categoryPath) {
+ ERR_LOG("---Cannot normalize categoryPath for %s AudioType. (path = %s)\n", audioType->name, fullCategoryPath);
+ return APP_ERROR;
+ }
+
+ paramDataStr = utilConvDataToString(paramInfo->dataType, paramData, arraySize, 1);
+ INFO_LOG("audioType = %s, fullCategoryPath = %s, param = %s, paramData = 0x%p, arraySize = %d\n", audioType->name, fullCategoryPath, paramInfo->name, paramData, arraySize);
+ INFO_LOG("paramData = %s\n", paramDataStr);
+ free(paramDataStr);
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ /* Check the target paramUnit status (category path exactly match? ref count?) */
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(categoryPath), paramTree);
+ if (paramTree) {
+ /* Category path exactly match */
+ ParamUnit *paramUnit = NULL;
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, paramUnit);
+
+ if (!paramUnit) {
+ ERR_LOG("---Cannot find target paramUnit for paramId %d for %s AudioType. (path = %s)\n", paramTree->paramId, audioType->name, utstring_body(categoryPath));
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ utstring_free(categoryPath);
+ return APP_ERROR;
+ }
+
+ if (paramUnit->refCount == 1) {
+ /* ParamUnit only used by itself, update param data directly */
+ Param *param = paramUnitGetParamByName(paramUnit, paramInfo->name);
+ if (param) {
+ void *oldData = param->data; // Keep old data ptr & free it after new data settled.
+ paramSetupDataInfoByVal(param, paramData, arraySize);
+ free(oldData);
+ DEBUG_LOG("Find the ParamUnit by full category path. (paramId = %d, refCount = %d, categoryPath = %s)\n", paramTree->paramId, paramUnit->refCount, paramTree->categoryPath);
+ }
+ } else {
+ /* ParamUnit not only used by itself, new ParamUnit */
+ Param *param;
+
+ /* New paramUnit */
+ ParamUnit *newParamUnit = paramUnitClone(paramUnit);
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* Update the paramId of ParamTree */
+ paramTree->paramId = newParamUnit->paramId;
+
+ /* Old ParamUnit ref count -1 */
+ paramUnit->refCount--;
+
+ /* Update new ParamUnit param */
+ param = paramUnitGetParamByName(newParamUnit, paramInfo->name);
+ if (param) {
+ free(param->data);
+ }
+ paramSetupDataInfoByVal(param, paramData, arraySize);
+ DEBUG_LOG("Find the ParamUnit by full category path.(ref count = %d, new ParamUnit id = %d, categoryPath = %s)\n", paramUnit->refCount, newParamUnit->paramId, paramTree->categoryPath);
+ }
+ } else {
+ /* No exactly match ParamUnit, create new ParamUnit & ParamTree */
+ /* New paramUnit */
+ Param *param;
+ ParamUnit *paramUnit = audioTypeGetParamUnit(audioType, fullCategoryPath);
+ ParamUnit *newParamUnit = paramUnitClone(paramUnit);
+
+ if (!paramUnit) {
+ ERR_LOG("---paramUnit is NULL\n");
+ audioTypeUnlock(audioType);
+ utstring_free(categoryPath);
+ return APP_NO_ERROR;
+ }
+
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* New ParamTree */
+ paramTree = paramTreeCreate(newParamUnit->paramId, utstring_body(categoryPath));
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, paramTree->categoryPath, strlen(paramTree->categoryPath), paramTree);
+
+ /* Update new ParamUnit param */
+ param = paramUnitGetParamByName(newParamUnit, paramInfo->name);
+ if (param) {
+ free(param->data);
+ }
+ paramSetupDataInfoByVal(param, paramData, arraySize);
+
+ DEBUG_LOG("Not found the match paramTree, new paramUnit & paramTree (paramId = %d, categoryPath = %s)\n", newParamUnit->paramId, utstring_body(categoryPath));
+ }
+
+ /* Param data modified, change the dirty info */
+ audioType->dirty = 1;
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(categoryPath);
+ INFO_LOG("---\n");
+ return APP_NO_ERROR;
+}
+
+EXPORT void categoryPathRetrievedHandler(const char *categoryPath, const char *fullCategoryPath, CategoryPathRetrievedParam *categoryPathRetrievedParam) {
+ /* Write category path's param unit to XML */
+ ParamUnit *paramUnit = audioTypeGetParamUnit(categoryPathRetrievedParam->audioType, fullCategoryPath);
+ UT_string *paramId;
+ Param *param;
+ xmlNodePtr paramNode, paramUnitNode;
+
+ utstring_new(paramId);
+ utstring_printf(paramId, APP_SIZE_T_FT, categoryPathRetrievedParam->paramIdCounter);
+
+ paramNode = xmlNewChild(categoryPathRetrievedParam->paramTreeNode, NULL, BAD_CAST ELEM_PARAM, NULL);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_PATH, BAD_CAST categoryPath);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_PARAM_ID, BAD_CAST utstring_body(paramId));
+
+ if (paramUnit) {
+ /* add ParamUnitPool */
+ paramUnitNode = xmlNewChild(categoryPathRetrievedParam->paramUnitPoolNode, NULL, BAD_CAST ELEM_PARAM_UNIT, NULL);
+ xmlNewProp(paramUnitNode, BAD_CAST ATTRI_PARAM_ID, BAD_CAST utstring_body(paramId));
+ /* Add category path information */
+ xmlNewProp(paramUnitNode, BAD_CAST ATTRI_PATH_DESC, BAD_CAST categoryPath);
+
+ /* Add Param */
+ for (param = paramUnit->paramHash; param != NULL; param = param->hh.next) {
+ char *data = paramNewDataStrWithMode(param, categoryPathRetrievedParam->audioType->appHandle->saveXmlWithHexMode);
+ paramNode = xmlNewChild(paramUnitNode, NULL, BAD_CAST ELEM_PARAM, NULL);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_NAME, BAD_CAST param->name);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_VALUE, BAD_CAST data);
+ free(data);
+ }
+ }
+
+ utstring_free(paramId);
+ categoryPathRetrievedParam->paramIdCounter++;
+}
+
+EXPORT APP_STATUS retrieveAllCategoryPath(AudioType *audioType, size_t curCategoryTypeIndex, size_t numOfCategoryType, size_t curCategoryIndex, const char *preCategoryPath, const char *preFullCategoryPath, CATEGORY_PATH_RETRIEVED_CB_FUN categoryPathRetrievedHandler, CategoryPathRetrievedParam *categoryPathRetrievedParam) {
+ CategoryType *categoryType;
+ size_t numOfAllCategory;
+ Category *category;
+ UT_string *categoryPath = NULL;
+ UT_string *fullCategoryPath = NULL;
+
+ if (curCategoryTypeIndex >= numOfCategoryType) {
+ //printf("%s\n", prePathStr);
+ categoryPathRetrievedHandler(preCategoryPath, preFullCategoryPath, categoryPathRetrievedParam);
+ return APP_NO_ERROR;
+ }
+
+ // Check category is valid
+ categoryType = audioTypeGetCategoryTypeByIndex(audioType, curCategoryTypeIndex);
+ numOfAllCategory = categoryTypeGetNumOfAllCategory(categoryType);
+ if (curCategoryIndex >= numOfAllCategory) {
+ return APP_NO_ERROR;
+ }
+
+ // category type & category are valid
+ utstring_new(categoryPath);
+ utstring_new(fullCategoryPath);
+ category = categoryTypeGetAllCategoryByIndex(categoryType, curCategoryIndex);
+ if (!strncmp(preCategoryPath, "", strlen("") + 1)) {
+ utstring_printf(categoryPath, "%s", category->name);
+ utstring_printf(fullCategoryPath, "%s,%s", categoryType->name, category->name);
+ } else {
+ utstring_printf(categoryPath, "%s,%s", preCategoryPath, category->name);
+ utstring_printf(fullCategoryPath, "%s,%s,%s", preFullCategoryPath, categoryType->name, category->name);
+ }
+
+ // Retrieve next CategoryType
+ retrieveAllCategoryPath(audioType, curCategoryTypeIndex + 1, numOfCategoryType, 0, utstring_body(categoryPath), utstring_body(fullCategoryPath), categoryPathRetrievedHandler, categoryPathRetrievedParam);
+
+ // Retrieve next Category
+ retrieveAllCategoryPath(audioType, curCategoryTypeIndex, numOfCategoryType, curCategoryIndex + 1, preCategoryPath, preFullCategoryPath, categoryPathRetrievedHandler, categoryPathRetrievedParam);
+
+ utstring_free(fullCategoryPath);
+ utstring_free(categoryPath);
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeSetupAudioParamNode(AudioType *audioType, xmlNodePtr audioParamNode) {
+ xmlNodePtr paramTreeNode = NULL, paramNode = NULL, paramUnitPoolNode = NULL, paramUnitNode = NULL;
+ AppHandle *appHandle = audioType->appHandle;
+ ParamTree *paramTreeItem;
+ ParamUnit *paramUnitItem;
+ Param *paramItem;
+ UT_string *str;
+
+ utstring_new(str);
+
+ if (appHandle->normalizeXmlContent == 1) {
+ size_t numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ CategoryPathRetrievedParam categoryPathRetrievedParam;
+
+ /* Create paramTree & paramUnit node */
+ paramTreeNode = xmlNewChild(audioParamNode, NULL, BAD_CAST ELEM_PARAM_TREE, NULL);
+ paramUnitPoolNode = xmlNewChild(audioParamNode, NULL, BAD_CAST ELEM_PARAM_UNIT_POOL, NULL);
+
+ /* Setup callback parameters */
+ categoryPathRetrievedParam.paramTreeNode = paramTreeNode;
+ categoryPathRetrievedParam.paramUnitPoolNode = paramUnitPoolNode;
+ categoryPathRetrievedParam.paramIdCounter = 0;
+
+ /* Setup callback parameters */
+ categoryPathRetrievedParam.audioType = audioType;
+
+ /* Add default category path("") */
+ categoryPathRetrievedHandler("", "", &categoryPathRetrievedParam);
+
+ /* Enum all category path */
+ retrieveAllCategoryPath(audioType, 0, numOfCategoryType, 0, "", "", categoryPathRetrievedHandler, &categoryPathRetrievedParam);
+ } else {
+ /* add ParamTree & Param */
+ paramTreeNode = xmlNewChild(audioParamNode, NULL, BAD_CAST ELEM_PARAM_TREE, NULL);
+ for (paramTreeItem = audioType->paramTreeHash; paramTreeItem != NULL; paramTreeItem = paramTreeItem->hh.next) {
+ paramNode = xmlNewChild(paramTreeNode, NULL, BAD_CAST ELEM_PARAM, NULL);
+ utstring_printf(str, "%d", paramTreeItem->paramId);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_PATH, BAD_CAST paramTreeItem->categoryPath);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_PARAM_ID, BAD_CAST utstring_body(str));
+ utstring_clear(str);
+ }
+
+ /* add ParamUnitPool */
+ paramUnitPoolNode = xmlNewChild(audioParamNode, NULL, BAD_CAST ELEM_PARAM_UNIT_POOL, NULL);
+ for (paramUnitItem = audioType->paramUnitHash; paramUnitItem != NULL; paramUnitItem = paramUnitItem->hh.next) {
+ paramUnitNode = xmlNewChild(paramUnitPoolNode, NULL, BAD_CAST ELEM_PARAM_UNIT, NULL);
+ utstring_printf(str, "%d", paramUnitItem->paramId);
+ xmlNewProp(paramUnitNode, BAD_CAST ATTRI_PARAM_ID, BAD_CAST utstring_body(str));
+ utstring_clear(str);
+
+ /* Add Param */
+ for (paramItem = paramUnitItem->paramHash; paramItem != NULL; paramItem = paramItem->hh.next) {
+ char *data = paramNewDataStrWithMode(paramItem, audioType->appHandle->saveXmlWithHexMode);
+ paramNode = xmlNewChild(paramUnitNode, NULL, BAD_CAST ELEM_PARAM, NULL);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_NAME, BAD_CAST paramItem->name);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_VALUE, BAD_CAST data);
+ free(data);
+ }
+ }
+ }
+
+ utstring_free(str);
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeSaveAudioParamXml(AudioType *audioType, const char *saveDir, int clearDirtyBit) {
+ xmlDocPtr doc = NULL;
+ xmlNodePtr audioParamNode = NULL;
+
+ UT_string *filePath, *str;
+ APP_STATUS result = APP_NO_ERROR;
+
+ INFO_LOG("audioType = %s, saveDir = %s\n", audioType ? audioType->name : "NULL", saveDir);
+
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!saveDir) {
+ ERR_LOG("saveDir is NULL\n");
+ return APP_ERROR;
+ }
+
+ utstring_new(filePath);
+ utstring_new(str);
+ doc = xmlNewDoc(BAD_CAST "1.0");
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ audioParamNode = xmlNewNode(NULL, BAD_CAST ELEM_AUDIO_PARAM);
+ utstring_printf(str, "%d.%d", audioType->audioParamVerMaj, audioType->audioParamVerMin);
+ xmlNewProp(audioParamNode, BAD_CAST ATTRI_VERSION, BAD_CAST utstring_body(str));
+ utstring_clear(str);
+ xmlDocSetRootElement(doc, audioParamNode);
+
+ audioTypeSetupAudioParamNode(audioType, audioParamNode);
+
+ utilMkdir(saveDir);
+
+ utstring_printf(filePath, "%s"FOLDER"%s"AUDIO_PARAM_XML_POSFIX, saveDir, audioType->name);
+ if (xmlSaveFormatFileEnc(utstring_body(filePath), doc, "UTF-8", 1) == -1) {
+ result = APP_ERROR;
+ } else {
+ if (clearDirtyBit) {
+ audioType->dirty = 0;
+ }
+ }
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ xmlFreeDoc(doc);
+ utstring_free(str);
+ utstring_free(filePath);
+
+ return result;
+}
+
+EXPORT APP_STATUS audioTypeSetFieldData(AudioType *audioType, const char *fullCategoryPath, FieldInfo *fieldInfo, unsigned int val) {
+ ParamTree *paramTree = NULL;
+ UT_string *categoryPath = NULL;
+
+ INFO_LOG("+++\n");
+ if (!audioType) {
+ ERR_LOG("---audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fullCategoryPath) {
+ ERR_LOG("---categoryPath is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fieldInfo) {
+ ERR_LOG("---fieldInfo is NULL\n");
+ return APP_ERROR;
+ }
+
+ INFO_LOG("audioType = %s, categoryPath = %s, field = %s, value = 0x%x\n", audioType->name, fullCategoryPath, fieldInfo->name, val);
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ categoryPath = utilNormalizeCategoryPathForAudioType(fullCategoryPath, audioType);
+ if (!categoryPath) {
+ ERR_LOG("---Cannot normalize categoryPath for %s AudioType. (path = %s)\n", audioType->name, fullCategoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ /* Check the target paramUnit status (category path exactly match? ref count?) */
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(categoryPath), paramTree);
+ if (paramTree) {
+ /* Category path exactly match */
+ ParamUnit *paramUnit = NULL;
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, paramUnit);
+
+ if (!paramUnit) {
+ ERR_LOG("---Cannot find target paramUnit for paramId %d for %s AudioType. (path = %s)\n", paramTree->paramId, audioType->name, fullCategoryPath);
+ utstring_free(categoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ if (paramUnit->refCount == 1) {
+ /* ParamUnit only used by itself, update field data directly */
+ Param *param = paramUnitGetParamByName(paramUnit, fieldInfo->paramInfo->name);
+ paramSetFieldVal(param, fieldInfo, val);
+ DEBUG_LOG("Find the ParamUnit by full category path. (paramId = %d, refCount = %d, categoryPath = %s)\n", paramTree->paramId, paramUnit->refCount, paramTree->categoryPath);
+
+ if (param && appDebugLevel <= DEBUG_LEVEL) {
+ utilShowParamValue(param);
+ }
+ } else {
+ /* ParamUnit not only used by itself, new ParamUnit */
+ Param *param;
+
+ /* New paramUnit */
+ ParamUnit *newParamUnit = paramUnitClone(paramUnit);
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* Update the paramId of ParamTree */
+ paramTree->paramId = newParamUnit->paramId;
+
+ /* Old ParamUnit ref count -1 */
+ paramUnit->refCount--;
+
+ /* Update new ParamUnit field */
+ param = paramUnitGetParamByName(newParamUnit, fieldInfo->paramInfo->name);
+ paramSetFieldVal(param, fieldInfo, val);
+ DEBUG_LOG("Find the ParamUnit by full category path.(ref count = %d, new ParamUnit id = %d, categoryPath = %s)\n", paramUnit->refCount, newParamUnit->paramId, paramTree->categoryPath);
+
+ if (param && appDebugLevel <= DEBUG_LEVEL) {
+ utilShowParamValue(param);
+ }
+ }
+ } else {
+ /* No exactly match ParamUnit, create new ParamUnit & ParamTree */
+ /* New paramUnit */
+ Param *param;
+ ParamUnit *paramUnit = audioTypeGetParamUnit(audioType, fullCategoryPath);
+ ParamUnit *newParamUnit;
+ if (!paramUnit) {
+ ERR_LOG("---Cannot find the param unit (category path = %s)\n", fullCategoryPath);
+ utstring_free(categoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+ newParamUnit = paramUnitClone(paramUnit);
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* New ParamTree */
+ paramTree = paramTreeCreate(newParamUnit->paramId, utstring_body(categoryPath));
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, paramTree->categoryPath, strlen(paramTree->categoryPath), paramTree);
+
+ /* Update new ParamUnit field */
+ param = paramUnitGetParamByName(newParamUnit, fieldInfo->paramInfo->name);
+ paramSetFieldVal(param, fieldInfo, val);
+ DEBUG_LOG("Not found the match paramTree, new paramUnit & paramTree (paramId = %d, categoryPath = %s)\n", newParamUnit->paramId, utstring_body(categoryPath));
+
+ if (param && appDebugLevel <= DEBUG_LEVEL) {
+ utilShowParamValue(param);
+ }
+ }
+
+ /* Param data modified, change the dirty info */
+ audioType->dirty = 1;
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(categoryPath);
+ INFO_LOG("---\n");
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeParamUnitCopy(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath) {
+ ParamTree *paramTree;
+ ParamUnit *dstParamUnit = NULL;
+ UT_string *searchPath;
+ ParamUnit *srcParamUnit;
+
+ INFO_LOG("+++audioType = %s, srcCategoryPath = %s, dstCategoryPath = %s\n", audioType ? audioType->name : "NULL", srcCategoryPath, dstCategoryPath);
+
+ if (utilCompNormalizeCategoryPath(audioType, srcCategoryPath, dstCategoryPath) == 1) {
+ WARN_LOG("---srcCategoryPath == dstCategoryPath, ignore it (%s)\n", srcCategoryPath);
+ return APP_NO_ERROR;
+ }
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ srcParamUnit = audioTypeGetParamUnit(audioType, srcCategoryPath);
+ if (!srcParamUnit) {
+ ERR_LOG("---Cannot find src param unit DONOT copy ParamUnit! (audioType=%s, category=%s)\n", audioType->name, srcCategoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ searchPath = utilNormalizeCategoryPathForAudioType(dstCategoryPath, audioType);
+ if (!searchPath) {
+ ERR_LOG("---Cannot normalize categoryPath for %s AudioType. DONOT copy ParamUnit. (path = %s)\n", audioType->name, dstCategoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ utstring_free(searchPath);
+ return APP_ERROR;
+ }
+
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(searchPath), paramTree);
+ if (paramTree) {
+ /* Exactly match ParamUnit found */
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, dstParamUnit);
+ if (!dstParamUnit) {
+ ERR_LOG("---Cannot find the dstParamUnit! DONOT copy ParamUnit. (%s -> %d -> NULL)\n", utstring_body(searchPath), paramTree->paramId);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ utstring_free(searchPath);
+ return APP_ERROR;
+ }
+
+ if (dstParamUnit->refCount == 1) {
+ /* Remove this param unit */
+ HASH_DEL(audioType->paramUnitHash, dstParamUnit);
+ paramUnitRelease(dstParamUnit);
+ dstParamUnit = NULL;
+ } else {
+ /* Update original ParamUnit ref count */
+ dstParamUnit->refCount--;
+ //INFO_LOG("dstParamUnit refCount = %d\n", dstParamUnit->refCount);
+ }
+
+ /* Update the paramTree's paramId info */
+ paramTree->paramId = srcParamUnit->paramId;
+ } else {
+ /* Add new ParamTree and refer to the srcParamUnit id */
+ paramTree = paramTreeCreate(srcParamUnit->paramId, utstring_body(searchPath));
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, paramTree->categoryPath, strlen(paramTree->categoryPath), paramTree);
+ }
+
+ /* Update src param unit ref count */
+ srcParamUnit->refCount++;
+ //INFO_LOG("srcParamUnit refCount = %d\n", srcParamUnit->refCount);
+
+ /* Param data modified, change the dirty info */
+ audioType->dirty = 1;
+ INFO_LOG("--- srcParamUnit = dstParamUnit(id = %d, ref count = %d), old dstParamUnit(ref count = %d)\n", srcParamUnit->paramId, srcParamUnit->refCount, dstParamUnit ? dstParamUnit->refCount : 0);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(searchPath);
+ return APP_NO_ERROR;
+}
+
+EXPORT xmlNode *audioTypeGetCategoryTypeListNode(AudioType *audioType) {
+ xmlNode *root_element, *node;
+
+ root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ if (!root_element) {
+ WARN_LOG("No root element!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ if (!node) {
+ WARN_LOG("No param unit desc node!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(node->children, ELEM_CATEGORY_TYPE_LIST);
+ if (!node) {
+ WARN_LOG("No category type list node!\n");
+ return NULL;
+ }
+
+ return node;
+}
+
+EXPORT xmlNode *audioTypeGetParamUnitNode(AudioType *audioType) {
+ xmlNode *root_element, *node;
+
+ root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ if (!root_element) {
+ WARN_LOG("No root element!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ if (!node) {
+ WARN_LOG("No param unit desc node!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(node->children, ELEM_PARAM_UNIT);
+ if (!node) {
+ WARN_LOG("No param unit node!\n");
+ return NULL;
+ }
+
+ return node;
+}
+
+EXPORT xmlNode *audioTypeGetParamUnitDescNode(AudioType *audioType) {
+ xmlNode *root_element, *node;
+
+ root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ if (!root_element) {
+ WARN_LOG("No root element!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ if (!node) {
+ WARN_LOG("No param unit desc node!\n");
+ return NULL;
+ }
+
+ return node;
+}
+
+EXPORT TreeRoot *audioTypeGetTreeRoot(AudioType *audioType, const char *treeRootName) {
+ TreeRoot *treeRoot = NULL;
+
+ INFO_LOG("audioType = %s, treeType = %s\n", audioType ? audioType->name : "NULL", treeRootName);
+
+ if (!audioType) {
+ ERR_LOG("AudioType is NULL!\n");
+ return NULL;
+ }
+
+ if (audioType->paramTreeView) {
+ HASH_FIND_STR(audioType->paramTreeView->treeRootHash, treeRootName, treeRoot);
+ } else {
+ ERR_LOG("paramTreeView is NULL\n");
+ }
+
+ return treeRoot;
+}
+
+EXPORT APP_STATUS audioTypeValidCategoryGroupName(AudioType *audioType, const char *name) {
+ CategoryType *categoryType;
+ CategoryGroup *categoryGroup;
+
+ if (audioTypeIsHardCategoryGroup(audioType, name)) {
+ return APP_NO_ERROR;
+ }
+
+ for (categoryType = audioType->categoryTypeHash; categoryType; categoryType = categoryType->hh.next) {
+ HASH_FIND_STR(categoryType->categoryGroupHash, name, categoryGroup);
+ if (categoryGroup) {
+ return APP_NO_ERROR;
+ }
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT int audioTypeIsHardCategoryGroup(AudioType *audioType, const char *categoryName) {
+ int arrayIndex;
+
+ if (audioType == NULL || categoryName == NULL) {
+ return 0;
+ }
+
+ for (arrayIndex = 0; HARD_CATEGORY_GROUP[arrayIndex][0]; arrayIndex++) {
+ if (!strncmp(HARD_CATEGORY_GROUP[arrayIndex][0], audioType->name, strlen(audioType->name) + 1)
+ && !strncmp(HARD_CATEGORY_GROUP[arrayIndex][2], categoryName, strlen(categoryName) + 1)) {
+ return 1;
+ }
+ }
+
+ return 0;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioUtils.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioUtils.c
new file mode 100644
index 0000000..8f3dbac
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/AudioUtils.c
@@ -0,0 +1,1636 @@
+#include "AudioParamParserPriv.h"
+#include <time.h>
+
+typedef struct StrPair {
+ char *key; /* key */
+ char *value;
+ UT_hash_handle hh; /* hash handle */
+} StrPair;
+
+StrPair *strPairCreate(const char *key, const char *value) {
+ StrPair *pair = malloc(sizeof(StrPair));
+ pair->key = strdup(key ? key : "");
+ pair->value = strdup(value ? value : "");
+ return pair;
+}
+
+void strPairRelease(StrPair *pair) {
+ if (pair) {
+ free(pair->key);
+ free(pair->value);
+ free(pair);
+ }
+}
+
+EXPORT void utilDumpAudioTypeLoadingList(const char *audioTypeLoadingList[]) {
+ int index = 0;
+ INFO_LOG("===AudioTypeLoadingList===\n");
+ if (audioTypeLoadingList != NULL) {
+ for (index = 0; audioTypeLoadingList[index] != NULL; index++) {
+ INFO_LOG("[%d] %s\n", index, audioTypeLoadingList[index]);
+ }
+ } else {
+ INFO_LOG("All audio type\n");
+ }
+}
+
+EXPORT char **appGetXmlDirFromProperty() {
+#if !defined(WIN32) && !defined(SYS_IMPL)&& !defined(MTK_YOCTO_AUDIO)
+ char **xmlDirList = NULL;
+ char *xmlDir = malloc(MAX_PROP_VALUE_LEN);
+
+ property_get(PROPERTY_KEY_XML_DEF_PATH, xmlDir, "");
+ if (strcmp(xmlDir, "")) {
+ MUST_LOG("%s = %s", PROPERTY_KEY_XML_DEF_PATH, xmlDir);
+ xmlDirList = malloc(sizeof(char*) * 2);
+ xmlDirList[0] = xmlDir;
+ xmlDirList[1] = NULL;
+ } else {
+ free(xmlDir);
+ }
+
+ return xmlDirList;
+#else
+ return NULL;
+#endif
+}
+
+EXPORT int appSetAudioTypeLoadingList(const char *audioTypeLoadingList[]) {
+ if (appAudioTypeLoadingList == NULL) {
+ appAudioTypeLoadingList = audioTypeLoadingList;
+ MUST_LOG("Set audioTypeLoadingList with %p\n", appAudioTypeLoadingList);
+ utilDumpAudioTypeLoadingList(appAudioTypeLoadingList);
+ return 1;
+ } else {
+ WARN_LOG("audioTypeLoadingList already been setup. (cur = %s, new = %s)\n", appAudioTypeLoadingList[0], audioTypeLoadingList[0]);
+ return 0;
+ }
+}
+
+EXPORT const char *appGetAudioTypeLoadingList(void) {
+ return (const char*)appAudioTypeLoadingList;
+}
+
+EXPORT void appSetDebugLevel(MSG_LEVEL level) {
+ INFO_LOG("appSetDebugLevel(), level = %d\n", level);
+#ifndef FORCE_DEBUG_LEVEL
+ appDebugLevel = level;
+#endif
+}
+
+EXPORT MSG_LEVEL appGetDebugLevel() {
+ INFO_LOG("appGetDebugLevel(), level = %d\n", appDebugLevel);
+ return appDebugLevel;
+}
+
+EXPORT xmlNode *findXmlNodeByElemName(xmlNode *node, const char *elemName) {
+ xmlNode *cur_node;
+
+ if (!node) {
+ DEBUG_LOG("xmlNode is NULL\n");
+ return NULL;
+ }
+
+ if (!elemName) {
+ DEBUG_LOG("elemName is NULL\n");
+ return NULL;
+ }
+
+ for (cur_node = node; cur_node; cur_node = cur_node->next) {
+ if (cur_node->type == XML_ELEMENT_NODE && !strncmp((const char *)cur_node->name, elemName, strlen(elemName) + 1)) {
+ return cur_node;
+ }
+ }
+ return NULL;
+}
+
+EXPORT int utilIsUIAudioType(const char *audioType) {
+ char* uiStr = strstr(audioType, "UI");
+ if (uiStr == NULL || strlen(uiStr) != 2) {
+ return 0;
+ }
+
+ return 1;
+}
+
+EXPORT int utilIsAudioTypeInLoadingList(const char *audioType) {
+
+ if (appAudioTypeLoadingList == NULL) {
+ /* If appAudioTypeLoadingList not specified, all audioType are allowed */
+ DEBUG_LOG("%s audio type is allow by default!\n", audioType);
+ return 1;
+ } else {
+ int index = 0;
+ for (index = 0; appAudioTypeLoadingList[index] != NULL; index++) {
+ if (!strcmp(audioType, appAudioTypeLoadingList[index])) {
+ DEBUG_LOG("%s audio type is in allow list!\n", audioType);
+ return 1;
+ }
+ }
+ DEBUG_LOG("%s audio type is not in allow list!\n", audioType);
+
+ return 0;
+ }
+}
+
+EXPORT xmlChar *xmlNodeGetProp(xmlNode *node, const char *prop) {
+ if (!node) {
+ ERR_LOG("xmlNode is NULL\n");
+ return NULL;
+ }
+
+ if (!prop) {
+ ERR_LOG("prop is NULL\n");
+ return NULL;
+ }
+
+ return xmlGetProp(node, (const xmlChar *)prop);
+}
+
+EXPORT xmlChar *xmlNodeGetWording(xmlNode *node) {
+ xmlChar *wording = xmlNodeGetProp(node, ATTRI_WORDING);
+ if (wording == NULL) {
+ wording = xmlNodeGetProp(node, ATTRI_NAME);
+ }
+ return wording;
+}
+
+void print_element_names(xmlNode *a_node) {
+ xmlNode *cur_node = NULL;
+
+ for (cur_node = a_node; cur_node; cur_node = cur_node->next) {
+ if (cur_node->type == XML_ELEMENT_NODE) {
+ printf("node type: Element, name: %s\n", cur_node->name);
+ }
+
+ print_element_names(cur_node->children);
+ }
+}
+
+void appDumpXmlDoc(xmlDoc *doc) {
+ /*Get the root element node */
+ xmlNode *root_element = xmlDocGetRootElement(doc);
+
+ print_element_names(root_element);
+}
+
+#ifndef WIN32
+EXPORT void signalHandler(int sig, siginfo_t *info, void *ucontext) {
+ INFO_LOG("Got thread notify signal. sig = %d, info = %p, ucontext = %p\n", sig, info, ucontext);
+}
+#endif
+
+EXPORT APP_STATUS utilConvDataStringToNative(DATA_TYPE dataType, const char *str, void **data, size_t *arraySize) {
+ errno = 0;
+ switch (dataType) {
+ case TYPE_STR:
+ *data = strdup(str);
+ *arraySize = 0;
+ break;
+ case TYPE_INT: {
+ int *val = malloc(sizeof(int));
+ *val = strtol(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to int!\n", str);
+ free(val);
+ return APP_ERROR;
+ }
+
+ *data = val;
+ *arraySize = 0;
+ break;
+ }
+ case TYPE_UINT: {
+ unsigned int *val = malloc(sizeof(unsigned int));
+ *val = strtoul(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to uint!\n", str);
+ free(val);
+ return APP_ERROR;
+ }
+
+ *data = val;
+ *arraySize = 0;
+ break;
+ }
+ case TYPE_FLOAT: {
+ float *val = malloc(sizeof(float));
+ *val = (float)strtod(str, NULL);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to float!\n", str);
+ free(val);
+ return APP_ERROR;
+ }
+
+ *data = val;
+ *arraySize = 0;
+ break;
+ }
+ case TYPE_BYTE_ARRAY: {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ char *val = malloc(sizeof(char) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtol(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to byte array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (char)convVal & 0xFF;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ /* Convert str */
+ if (elemData != NULL) {
+ convVal = strtol(elemData, NULL, 0);
+ } else {
+ errno = ERANGE;
+ }
+
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to byte array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (char)convVal & 0xFF;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to byte array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (char)convVal & 0xFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_UBYTE_ARRAY: {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ unsigned char *val = malloc(sizeof(unsigned char) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtoul(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to ubyte array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (unsigned char)convVal & 0xFF;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ /* Convert str */
+ if (elemData != NULL) {
+ convVal = strtoul(elemData, NULL, 0);
+ } else {
+ errno = ERANGE;
+ }
+
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to ubyte array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (unsigned char)convVal & 0xFF;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to ubyte array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (unsigned char)convVal & 0xFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_SHORT_ARRAY: {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ short *val = malloc(sizeof(short) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtol(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to short array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (short)convVal & 0xFFFF;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ /* Convert str */
+ if (elemData != NULL) {
+ convVal = strtol(elemData, NULL, 0);
+ } else {
+ errno = ERANGE;
+ }
+
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to short array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (short)convVal & 0xFFFF;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to short array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (short)convVal & 0xFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_USHORT_ARRAY: {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ unsigned short *val = malloc(sizeof(unsigned short) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtoul(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to ushort array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (unsigned short)convVal & 0xFFFF;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ /* Convert str */
+ if (elemData != NULL) {
+ convVal = strtoul(elemData, NULL, 0);
+ } else {
+ errno = ERANGE;
+ }
+
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to ushort array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (unsigned short)convVal & 0xFFFF;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to ushort array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (unsigned short)convVal & 0xFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_INT_ARRAY: {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ int *val = malloc(sizeof(int) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtol(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to int array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (int)convVal & 0xFFFFFFFF;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ /* Convert str */
+ if (elemData != NULL) {
+ convVal = strtol(elemData, NULL, 0);
+ } else {
+ errno = ERANGE;
+ }
+
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to int array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (int)convVal & 0xFFFFFFFF;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to int array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (int)convVal & 0xFFFFFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_UINT_ARRAY: {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ unsigned int *val = malloc(sizeof(unsigned int) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtoul(str, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to uint array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (unsigned int)convVal & 0xFFFFFFFF;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ /* Convert str */
+ if (elemData != NULL) {
+ convVal = strtoul(elemData, NULL, 0);
+ } else {
+ errno = ERANGE;
+ }
+
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to uint array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (unsigned int)convVal & 0xFFFFFFFF;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE) {
+ ERR_LOG("Cannot convert \"%s\" to uint array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (unsigned int)convVal & 0xFFFFFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_DOUBLE_ARRAY: {
+ char *elemData, *p;
+ double convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ double *val = malloc(sizeof(double) * size);
+
+ if (size == 1) {
+ /* Convert str */
+ convVal = strtod(str, &p);
+ if (p != (str + strlen(str))) {
+ ERR_LOG("Cannot convert \"%s\" to double array!\n", str);
+ result = APP_ERROR;
+ } else {
+ val[0] = (double)convVal;
+ }
+ } else {
+ char *tmpStr = strdup(str);
+ char *restOfStr = NULL;
+ elemData = utilStrtok(tmpStr, ARRAY_SEPERATOR, &restOfStr);
+
+ if (elemData) {
+ /* Convert str */
+ convVal = strtod(elemData, &p);
+ if (p != (elemData + strlen(elemData))) {
+ ERR_LOG("Cannot convert \"%s\" to double array!\n", elemData);
+ result = APP_ERROR;
+ } else {
+ val[index++] = (double)convVal;
+
+ while ((elemData = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ convVal = strtod(elemData, &p);
+ if (p != (elemData + strlen(elemData))) {
+ ERR_LOG("Cannot convert \"%s\" to double array!\n", elemData);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (double)convVal;
+ }
+ }
+ } else {
+ ERR_LOG("elemData is NULL");
+ result = APP_ERROR;
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR) {
+ *data = val;
+ *arraySize = size;
+ } else {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_UNKNOWN:
+ *data = strdup(str);
+ *arraySize = 0;
+ break;
+ default:
+ *data = NULL;
+ *arraySize = 0;
+ break;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT char *utilConvDataToString(DATA_TYPE dataType, void *data, int arraySize, int uArrayHexMode) {
+ char *str = NULL;
+ UT_string *dataStr = NULL;
+
+ switch (dataType) {
+ case TYPE_STR: {
+ str = strdup((char *)data);
+ return str;
+ }
+ case TYPE_INT: {
+ int value = *(int *) data;
+ utstring_new(dataStr);
+ utstring_printf(dataStr, "%d", value);
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UINT: {
+ unsigned int value = *(unsigned int *) data;
+ utstring_new(dataStr);
+ utstring_printf(dataStr, "%u", value);
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_FLOAT: {
+ float value = *(float *) data;
+ utstring_new(dataStr);
+ utstring_printf(dataStr, "%f", value);
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_BYTE_ARRAY: {
+ char *byteArray = (char *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, "%d", byteArray[i]);
+ } else {
+ utstring_printf(dataStr, "%d,", byteArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UBYTE_ARRAY: {
+ unsigned char *ubyteArray = (unsigned char *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, uArrayHexMode ? "0x%X" : "%d", ubyteArray[i]);
+ } else {
+ utstring_printf(dataStr, uArrayHexMode ? "0x%X," : "%d,", ubyteArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_SHORT_ARRAY: {
+ short *shortArray = (short *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, "%d", shortArray[i]);
+ } else {
+ utstring_printf(dataStr, "%d,", shortArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_USHORT_ARRAY: {
+ unsigned short *ushortArray = (unsigned short *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, uArrayHexMode ? "0x%X" : "%d", ushortArray[i]);
+ } else {
+ utstring_printf(dataStr, uArrayHexMode ? "0x%X," : "%d,", ushortArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_INT_ARRAY: {
+ int *intArray = (int *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, "%d", intArray[i]);
+ } else {
+ utstring_printf(dataStr, "%d,", intArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UINT_ARRAY: {
+ unsigned int *uintArray = (unsigned int *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, uArrayHexMode ? "0x%X" : "%d", uintArray[i]);
+ } else {
+ utstring_printf(dataStr, uArrayHexMode ? "0x%X," : "%d,", uintArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_DOUBLE_ARRAY: {
+ double *doubleArray = (double *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++) {
+ if (i == arraySize - 1) {
+ utstring_printf(dataStr, "%f", doubleArray[i]);
+ } else {
+ utstring_printf(dataStr, "%f,", doubleArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UNKNOWN:
+ case TYPE_FIELD:
+ break;
+ }
+
+ return str;
+}
+
+/* Convert category path to category group path. eg: HAC -> Handset */
+EXPORT UT_string *utilNormalizeCategoryGroupPathForAudioType(const char *categoryPath, AudioType *audioType) {
+ UT_string *searchPath = NULL;
+ char *categoryType, *category, *tmpCategoryPath;
+ char *restOfStr = NULL;
+ StrPair *strPairHash = NULL, *pair = NULL;
+ size_t numOfCategoryType, i;
+ utstring_new(searchPath);
+
+ /* Split string with token to parse category path info */
+ tmpCategoryPath = strdup(categoryPath);
+ if ((categoryType = utilStrtok(tmpCategoryPath, ARRAY_SEPERATOR, &restOfStr)) == NULL) {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ if ((category = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr)) == NULL) {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ while ((categoryType = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ if ((category = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ }
+ }
+ free(tmpCategoryPath);
+
+ /* Finding the audioType related Cateory*/
+ numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ for (i = 0; i < numOfCategoryType; i++) {
+ CategoryType *categoryType = audioTypeGetCategoryTypeByIndex(audioType, i);
+ HASH_FIND_STR(strPairHash, categoryType->name, pair);
+ if (pair) {
+ /* Checking if there is alias for the category name */
+ CategoryAlias *categoryAlias = categoryTypeGetCategoryByAlias(categoryType, pair->value);
+ if (categoryAlias) {
+ if (categoryAlias->category->parentType == PARENT_IS_CATEGORY_GROUP) {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, ((CategoryGroup *)categoryAlias->category->parent.category)->name);
+ } else {
+ WARN_LOG("Cannot get the categroup name of %s category!\n", categoryAlias->category->name);
+ }
+ } else {
+ Category *category = categoryTypeGetCategoryByName(categoryType, pair->value);
+ if (category && category->parentType == PARENT_IS_CATEGORY_GROUP) {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, ((CategoryGroup *)category->parent.category)->name);
+ } else {
+ /* If the category is not category group, checking the bypass list */
+ int arrayIndex = 0;
+ int bypassCategoryName = 0;
+
+ for (arrayIndex = 0; HARD_CATEGORY_GROUP[arrayIndex][0]; arrayIndex++) {
+ if (!strncmp(audioType->name, HARD_CATEGORY_GROUP[arrayIndex][0], strlen(audioType->name) + 1)
+ && !strncmp(pair->key, HARD_CATEGORY_GROUP[arrayIndex][1], strlen(pair->key) + 1)
+ && !strncmp(pair->value, HARD_CATEGORY_GROUP[arrayIndex][2], strlen(pair->value) + 1)) {
+ bypassCategoryName = 1;
+ break;
+ }
+ }
+
+ if (bypassCategoryName) {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, HARD_CATEGORY_GROUP[arrayIndex][2]);
+ } else {
+ WARN_LOG("Cannot get the categroup name of %s category!\n", pair->value);
+ }
+ }
+ }
+ }
+ }
+
+ /* Remove the end of seperator char */
+ {
+ char *ch = strrchr(utstring_body(searchPath), ARRAY_SEPERATOR_CH);
+ if (ch) {
+ *ch = '\0';
+ }
+ }
+
+ /* Release strPair */
+ if (strPairHash) {
+ StrPair *tmp, *item;
+ HASH_ITER(hh, strPairHash, item, tmp) {
+ HASH_DEL(strPairHash, item);
+ strPairRelease(item);
+ }
+ }
+
+ return searchPath;
+}
+
+EXPORT UT_string *utilNormalizeCategoryPathForAudioType(const char *categoryPath, AudioType *audioType) {
+ UT_string *searchPath = NULL;
+ char *categoryType, *category, *tmpCategoryPath;
+ char *restOfStr = NULL;
+ StrPair *strPairHash = NULL, *pair = NULL;
+ size_t numOfCategoryType, i;
+ utstring_new(searchPath);
+
+ /* Split string with token to parse category path info */
+ tmpCategoryPath = strdup(categoryPath);
+ if ((categoryType = utilStrtok(tmpCategoryPath, ARRAY_SEPERATOR, &restOfStr)) == NULL) {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ if ((category = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr)) == NULL) {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ while ((categoryType = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ if ((category = utilStrtok(NULL, ARRAY_SEPERATOR, &restOfStr))) {
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ }
+ }
+ free(tmpCategoryPath);
+
+ /* Finding the audioType related Cateory*/
+ numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ for (i = 0; i < numOfCategoryType; i++) {
+ CategoryType *categoryType = audioTypeGetCategoryTypeByIndex(audioType, i);
+ HASH_FIND_STR(strPairHash, categoryType->name, pair);
+ if (pair) {
+ /* Checking if there is alias for the category name */
+ CategoryAlias *categoryAlias = categoryTypeGetCategoryByAlias(categoryType, pair->value);
+ if (categoryAlias) {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, categoryAlias->category->name);
+ } else {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, pair->value);
+ }
+ }
+ }
+
+ /* Remove the end of seperator char */
+ {
+ char *ch = strrchr(utstring_body(searchPath), ARRAY_SEPERATOR_CH);
+ if (ch) {
+ *ch = '\0';
+ }
+ }
+
+ /* Release strPair */
+ if (strPairHash) {
+ StrPair *tmp, *item;
+ HASH_ITER(hh, strPairHash, item, tmp) {
+ HASH_DEL(strPairHash, item);
+ strPairRelease(item);
+ }
+ }
+
+ return searchPath;
+}
+
+EXPORT int utilFindUnusedParamId(AudioType *audioType) {
+ ParamUnit *paramUnit;
+ while (1) {
+ HASH_FIND_INT(audioType->paramUnitHash, &audioType->unusedParamId, paramUnit);
+ if (paramUnit) {
+ audioType->unusedParamId++;
+ } else {
+ INFO_LOG("Unsed param ID found (id = %d)\n", audioType->unusedParamId);
+ return audioType->unusedParamId++;
+ }
+ }
+
+ return 0;
+}
+
+
+EXPORT void utilUsleep(unsigned int usec) {
+#ifndef WIN32
+ usleep(usec);
+#else
+ Sleep(usec);
+#endif
+}
+
+EXPORT char *utilGetStdin(char *buf, int bufSize) {
+ char *input;
+ input = fgets(buf, bufSize, stdin);
+ if ((input = strchr(input, '\n')) != NULL) {
+ *input = '\0';
+ }
+ return buf;
+}
+
+EXPORT void utilLog(char *format, ...) {
+ time_t timep;
+ struct tm *p;
+ va_list arglist;
+
+ /* Get time struct */
+ time(&timep);
+ p = localtime(&timep);
+
+ if (appLogFp == NULL) {
+ /* Create file handle */
+ UT_string *fileName = NULL;
+ utstring_new(fileName);
+ utstring_printf(fileName, "%04d%02d%02d_%02d%02d%02d_AppLogFile.txt", 1900 + p->tm_year, 1 + p->tm_mon, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec);
+ appLogFp = fopen(utstring_body(fileName), "a");
+ utstring_free(fileName);
+
+ if (!appLogFp) {
+ printf("Log file open failed!\n");
+ exit(1);
+ }
+ }
+
+ /* Write to file */
+ fprintf(appLogFp, "%02d-%02d %02d:%02d:%02d ", 1 + p->tm_mon, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec);
+ va_start(arglist, format);
+ vfprintf(appLogFp, format, arglist);
+ va_end(arglist);
+
+ /* Show log to console */
+ if (outputLogToStdout) {
+ va_start(arglist, format);
+ vfprintf(stdout, format, arglist);
+ va_end(arglist);
+ }
+}
+
+EXPORT void utilLogClose() {
+ if (appLogFp) {
+ fflush(appLogFp);
+ fclose(appLogFp);
+ appLogFp = NULL;
+ }
+}
+
+EXPORT void utilShowParamValue(Param *param) {
+ if (!param) {
+ ERR_LOG("param is NULL\n");
+ return;
+ }
+
+ switch (param->paramInfo->dataType) {
+ case TYPE_STR: {
+ char *value = (char *)param->data;
+ printf("param name = %s, value = %s (type = %s, bytes = "APP_SIZE_T_FT")\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType), paramGetNumOfBytes(param));
+ break;
+ }
+ case TYPE_INT: {
+ int value = *(int *) param->data;
+ printf("param name = %s, value = %d (type = %s, bytes = "APP_SIZE_T_FT")\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType), paramGetNumOfBytes(param));
+ break;
+ }
+ case TYPE_UINT: {
+ unsigned int value = *(unsigned int *) param->data;
+ printf("param name = %s, value = %d (type = %s, bytes = "APP_SIZE_T_FT")\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType), paramGetNumOfBytes(param));
+ break;
+ }
+ case TYPE_FLOAT: {
+ float value = *(float *) param->data;
+ /* JH's platform cannot show the float type, wei chiu could show the value by %f*/
+ printf("param name = %s, value = %d (type = %s, bytes = "APP_SIZE_T_FT")\n", param->name, (int)value, paramDataTypeToStr(param->paramInfo->dataType), paramGetNumOfBytes(param));
+ break;
+ }
+ case TYPE_BYTE_ARRAY: {
+ char *byteArray = (char *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] 0x%x\n", i, byteArray[i]);
+ }
+ break;
+ }
+ case TYPE_UBYTE_ARRAY: {
+ unsigned char *ubyteArray = (unsigned char *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] 0x%x\n", i, ubyteArray[i]);
+ }
+ break;
+ }
+ case TYPE_SHORT_ARRAY: {
+ short *shortArray = (short *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] %d\n", i, shortArray[i]);
+ }
+ break;
+ }
+ case TYPE_USHORT_ARRAY: {
+ unsigned short *ushortArray = (unsigned short *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] 0x%x\n", i, ushortArray[i]);
+ }
+ break;
+ }
+ case TYPE_INT_ARRAY: {
+ int *intArray = (int *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] %d\n", i, intArray[i]);
+ }
+ break;
+ }
+ case TYPE_UINT_ARRAY: {
+ unsigned int *uintArray = (unsigned int *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] 0x%x\n", i, uintArray[i]);
+ }
+ break;
+ }
+ case TYPE_DOUBLE_ARRAY: {
+ double *doubleArray = (double *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d, bytes = "APP_SIZE_T_FT")\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize, paramGetNumOfBytes(param));
+ for (i = 0; i < arraySize; i++) {
+ printf("\tarray[%d] %f\n", i, doubleArray[i]);
+ }
+ break;
+ }
+ default:
+ printf("param name = %s, value = 0x%p (type = %s, bytes = "APP_SIZE_T_FT")\n", param->name, param->data, paramDataTypeToStr(param->paramInfo->dataType), paramGetNumOfBytes(param));
+ }
+}
+
+EXPORT FieldInfo *utilXmlNodeGetFieldInfo(AppHandle *appHandle, xmlNode *node, const char *audioTypeAttrName, const char *paramAttrName, const char *fieldAttrName) {
+ AudioType *audioType = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+
+ xmlChar *audioTypeName = NULL;
+ xmlChar *paramName = NULL;
+ xmlChar *fieldName = NULL;
+
+ audioTypeName = xmlNodeGetProp(node, audioTypeAttrName);
+ if (audioTypeName) {
+ audioType = appHandleGetAudioTypeByName(appHandle, (const char *)audioTypeName);
+ } else {
+ return NULL;
+ }
+
+ paramName = xmlNodeGetProp(node, paramAttrName);
+ if (audioType && paramName) {
+ paramInfo = audioTypeGetParamInfoByName(audioType, (const char *)paramName);
+ } else {
+ WARN_LOG("Cannot find FieldInfo (AudioType = %s, Param = %s, Field = %s)\n", audioTypeName, paramName, fieldName);
+ return NULL;
+ }
+
+ fieldName = xmlNodeGetProp(node, fieldAttrName);
+ if (paramInfo && fieldName) {
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, (const char *)fieldName);
+ } else {
+ WARN_LOG("Cannot find FieldInfo (AudioType = %s, Param = %s, Field = %s)\n", audioTypeName, paramName, fieldName);
+ return NULL;
+ }
+
+ if (!fieldInfo) {
+ WARN_LOG("Cannot find FieldInfo (AudioType = %s, Param = %s, Field = %s)\n", audioTypeName, paramName, fieldName);
+ }
+
+ return fieldInfo;
+}
+
+EXPORT char *utilGenCheckList(int bits) {
+ UT_string *dataStr = NULL;
+ double num = pow(2, bits);
+ int i = 0;
+ char *retStr = NULL;
+
+ utstring_new(dataStr);
+ for (i = 0; i < num; i++) {
+ if (i != num - 1) {
+ utstring_printf(dataStr, "%d,%d,", i, i);
+ } else {
+ utstring_printf(dataStr, "%d,%d", i, i);
+ }
+ }
+
+ retStr = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return retStr;
+}
+
+EXPORT void showTreeRoot(xmlNode *treeRootNode, const char *categoryPath) {
+}
+
+EXPORT void utilMkdir(const char *dir) {
+#ifdef WIN32
+ _mkdir(dir);
+#else
+ mkdir(dir, 0770);
+#endif
+}
+
+unsigned int utilNativeGetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName) {
+ INFO_LOG("audioTypeName = %s, categoryPath = %s, paramName = %s, fieldName = %s", audioTypeName, categoryPath, paramName, fieldName);
+
+ if (audioTypeName && categoryPath && paramName && fieldName) {
+#if defined(SYS_IMPL)
+ char *resultStr = NULL;
+ unsigned int result = 0;
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_GET_FIELD_KEY "#%s#%s#%s#%s", audioTypeName, categoryPath, paramName, fieldName);
+ resultStr = audioSystemGetParameters(utstring_body(str));
+ result = atoi(resultStr);
+ free(resultStr);
+ utstring_free(str);
+
+ return result;
+#else
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamUnit *paramUnit = NULL;
+ unsigned int fieldValue = 0;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle) {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ } else {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ if (audioType) {
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ } else {
+ ERR_LOG("categoryType is NULL\n");
+ }
+
+ if (paramUnitGetFieldVal(paramUnit, paramName, fieldName, &fieldValue) == APP_ERROR) {
+ ERR_LOG("Query field value fail!\n");
+ } else {
+ audioTypeUnlock(audioType);
+ return fieldValue;
+ }
+ audioTypeUnlock(audioType);
+#endif
+ } else {
+ ERR_LOG("Invalid parameter: audioType = %s, category path = %s, param = %s, field = %s\n", audioTypeName, categoryPath, paramName, fieldName);
+ }
+
+ return 0;
+}
+
+char *utilNativeGetParam(const char *audioTypeName, const char *categoryPath, const char *paramName) {
+ char *paramDataStr = NULL;
+ if (audioTypeName && categoryPath && paramName) {
+#if defined(SYS_IMPL)
+ INFO_LOG("audioTypeName = %s, categoryPath = %s, paramName = %s", audioTypeName, categoryPath, paramName);
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_GET_PARAM_KEY "#%s#%s#%s", audioTypeName, categoryPath, paramName);
+ paramDataStr = audioSystemGetParameters(utstring_body(str));
+ utstring_free(str);
+#else
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamUnit *paramUnit = NULL;
+ Param *param = NULL;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle) {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ } else {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ if (audioType) {
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ } else {
+ ERR_LOG("categoryType is NULL\n");
+ }
+
+ if (paramUnit) {
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ } else {
+ ERR_LOG("paramUnit is NULL\n");
+ }
+
+ if (param) {
+ paramDataStr = paramNewDataStr(param);
+ }
+
+ audioTypeUnlock(audioType);
+#endif
+ } else {
+ ERR_LOG("Invalid parameter: audioType = %s, category path = %s, param = %s\n", audioTypeName, categoryPath, paramName);
+ }
+
+ return paramDataStr;
+}
+
+EXPORT char *utilNativeGetCategory(const char *audioTypeName, const char *categoryTypeName) {
+ INFO_LOG("audioTypeName = %s, categoryTypeName = %s", audioTypeName, categoryTypeName);
+
+ if (audioTypeName && categoryTypeName) {
+#if defined(SYS_IMPL)
+ char *result = NULL;
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_GET_CATEGORY_KEY "#%s#%s", audioTypeName, categoryTypeName);
+ result = audioSystemGetParameters(utstring_body(str));
+ utstring_free(str);
+
+ return result;
+#else
+ UT_string *utString = NULL;
+ char *result;
+ int firstCategory = 1;
+ int numOfCategory, numOfCategoryGroup = 0;
+ int i, j, k;
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ CategoryType *categoryType = NULL;
+
+ utstring_new(utString);
+ appHandle = appHandleGetInstance();
+ if (appHandle) {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ } else {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ if (audioType) {
+ categoryType = audioTypeGetCategoryTypeByName(audioType, categoryTypeName);
+ } else {
+ ERR_LOG("audioType is NULL\n");
+ }
+
+ if (!categoryType) {
+ ERR_LOG("categoryType is NULL\n");
+ }
+
+ numOfCategoryGroup = categoryTypeGetNumOfCategoryGroup(categoryType);
+ for (i = 0; i < numOfCategoryGroup; i++) {
+ CategoryGroup *categoryGroup = categoryTypeGetCategoryGroupByIndex(categoryType, i);
+ numOfCategory = categoryGroupGetNumOfCategory(categoryGroup);
+ for (j = 0; j < numOfCategory; j++) {
+ Category *category = categoryGroupGetCategoryByIndex(categoryGroup, j);
+ if (firstCategory) {
+ utstring_printf(utString, "%s,%s", category->name, category->wording);
+ firstCategory = 0;
+ } else {
+ utstring_printf(utString, ",%s,%s", category->name, category->wording);
+ }
+ }
+ }
+
+ numOfCategory = categoryTypeGetNumOfCategory(categoryType);
+ for (k = 0; k < numOfCategory; k++) {
+ Category *category = categoryTypeGetCategoryByIndex(categoryType, k);
+ if (firstCategory) {
+ utstring_printf(utString, "%s,%s", category->name, category->wording);
+ firstCategory = 0;
+ } else {
+ utstring_printf(utString, ",%s,%s", category->name, category->wording);
+ }
+ }
+
+ result = strdup(utstring_body(utString));
+ utstring_free(utString);
+ return result;
+#endif
+ }
+
+ return NULL;
+}
+
+EXPORT APP_STATUS utilNativeSetParam(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *paramDataStr) {
+ INFO_LOG("audioTypeName = %s, categoryPath = %s, paramName = %s", audioTypeName, categoryPath, paramName);
+
+ if (audioTypeName && categoryPath && paramName && paramDataStr) {
+#if defined(SYS_IMPL)
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_SET_PARAM_KEY "=%s#%s#%s#%s", audioTypeName, categoryPath, paramName, paramDataStr);
+ audioSystemSetParameters(utstring_body(str));
+ utstring_free(str);
+
+ return APP_NO_ERROR;
+#else
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamInfo *paramInfo = NULL;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle) {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ } else {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ if (audioType) {
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ } else {
+ ERR_LOG("audioType is NULL\n");
+ }
+
+ if (paramInfo) {
+ void *paramData = NULL;
+ size_t arraySize = 0;
+
+ if (utilConvDataStringToNative(paramInfo->dataType, paramDataStr, ¶mData, &arraySize) == APP_NO_ERROR) {
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, paramData, arraySize) == APP_ERROR) {
+ ERR_LOG("audioTypeSetParamData fail! audioType = %s, categoryPath = %s, paramInfo = %s\n", audioType->name, categoryPath, paramInfo->name);
+ } else {
+ if (paramData) {
+ free(paramData);
+ }
+ return APP_NO_ERROR;
+ }
+ } else {
+ ERR_LOG("Cannot convert param string to native type (param str = %s)\n", paramDataStr);
+ }
+
+ if (paramData) {
+ free(paramData);
+ }
+ } else {
+ ERR_LOG("paramInfo is NULL\n");
+ }
+#endif
+ } else {
+ ERR_LOG("Invalid parameter\n");
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT APP_STATUS utilNativeSetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName, const char *fieldValueStr) {
+ INFO_LOG("audioTypeName = %s, categoryPath = %s, paramName = %s, fieldName = %s", audioTypeName, categoryPath, paramName, fieldName);
+
+ if (audioTypeName && categoryPath && paramName && fieldName && fieldValueStr) {
+#if defined(SYS_IMPL)
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_SET_FIELD_KEY "=%s#%s#%s#%s#%s", audioTypeName, categoryPath, paramName, fieldName, fieldValueStr);
+ audioSystemSetParameters(utstring_body(str));
+ utstring_free(str);
+
+ return APP_NO_ERROR;
+#else
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle) {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ } else {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ if (audioType) {
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ } else {
+ ERR_LOG("audioType is NULL\n");
+ }
+
+ if (paramInfo) {
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ } else {
+ ERR_LOG("paramInfo is NULL\n");
+ }
+
+ if (fieldInfo) {
+ if (audioTypeSetFieldData(audioType, categoryPath, fieldInfo, strtoul(fieldValueStr, NULL, 0)) == APP_ERROR) {
+ ERR_LOG("audioTypeSetFieldData fail!. audioType = %s, categoryPath = %s, paramInfo = %s, fieldInfo = %s, value = %s\n", audioType->name, categoryPath, paramInfo->name, fieldInfo->name, fieldValueStr);
+ } else {
+ return APP_NO_ERROR;
+ }
+ } else {
+ ERR_LOG("fieldInfo is NULL\n");
+ }
+#endif
+ } else {
+ ERR_LOG("Invalid parameter\n");
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT APP_STATUS utilNativeSaveXml(const char *audioTypeName) {
+
+#if defined(SYS_IMPL)
+ INFO_LOG("audioTypeName = %s", audioTypeName);
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_SAVE_XML_KEY "=%s", audioTypeName);
+ audioSystemSetParameters(utstring_body(str));
+ utstring_free(str);
+#else
+ AppHandle *appHandle = appHandleGetInstance();
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (audioType) {
+ if (audioType->dirty) {
+#ifdef WIN32
+ return audioTypeSaveAudioParamXml(audioType, XML_CUS_FOLDER_ON_TUNING_TOOL, 1) ;
+#else
+ return audioTypeSaveAudioParamXml(audioType, XML_CUS_FOLDER_ON_DEVICE, 1);
+#endif
+ } else {
+ INFO_LOG("%s AudioType's parameter not changed, don't save XML\n", audioType->name);
+ }
+ } else {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+#endif
+
+ return APP_NO_ERROR;
+}
+
+EXPORT const char *utilNativeGetChecklist(const char *audioTypeName, const char *paramName, const char *fieldName) {
+#if defined(SYS_IMPL)
+ INFO_LOG("audioTypeName = %s, paramName = %s, fieldName = %s", audioTypeName, paramName, fieldName);
+
+ char *result = NULL;
+ UT_string *str = NULL;
+
+ utstring_new(str);
+ utstring_printf(str, APP_GET_CHECKLIST_KEY "#%s#%s#%s", audioTypeName, paramName, fieldName);
+ result = audioSystemGetParameters(utstring_body(str));
+ utstring_free(str);
+
+ return result;
+#else
+ AppHandle *appHandle = appHandleGetInstance();
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+
+ if (!audioType) {
+ ERR_LOG("Cannot find %s AudioType\n", audioTypeName);
+ return NULL;
+ }
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ if (!paramInfo) {
+ ERR_LOG("Cannot find %s paramInfo of %s AudioType\n", paramName, audioTypeName);
+ return NULL;
+ }
+
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ if (!fieldInfo) {
+ ERR_LOG("Cannot find %s fieldInfo of %s paramInfo of %s AudioType\n", fieldName, paramName, audioTypeName);
+ return NULL;
+ }
+
+ return fieldInfo->checkListStr;
+#endif
+}
+
+EXPORT int utilCompNormalizeCategoryPath(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath) {
+ UT_string *srcNormalizedPath;
+ UT_string *dstNormalizedPath;
+ int equal = 0;
+
+ if (!strncmp(srcCategoryPath, dstCategoryPath, strlen(dstCategoryPath) + 1)) {
+ return 1;
+ }
+
+ srcNormalizedPath = utilNormalizeCategoryPathForAudioType(srcCategoryPath, audioType);
+ dstNormalizedPath = utilNormalizeCategoryPathForAudioType(dstCategoryPath, audioType);
+
+ if (!strncmp(utstring_body(srcNormalizedPath), utstring_body(dstNormalizedPath), strlen(utstring_body(dstNormalizedPath)) + 1)) {
+ equal = 1;
+ INFO_LOG("Src path %s and dst path %s are equal to %s\n", srcCategoryPath, dstCategoryPath, utstring_body(srcNormalizedPath));
+ } else {
+ equal = 0;
+ }
+
+ utstring_free(srcNormalizedPath);
+ utstring_free(dstNormalizedPath);
+
+ return equal;
+}
+
+EXPORT char *utilStrtok(char *str, const char *delim, char **saveptr) {
+#ifdef WIN32
+ return strtok(str, delim);
+#else
+ return strtok_r(str, delim, saveptr);
+#endif
+}
+
+EXPORT void utilShellExecute(const char *prog, const char *params) {
+#ifdef WIN32
+ SHELLEXECUTEINFO ShExecInfo = {0};
+ ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+ ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
+ ShExecInfo.hwnd = NULL;
+ ShExecInfo.lpVerb = NULL;
+ ShExecInfo.lpFile = prog;
+ ShExecInfo.lpParameters = params;
+ ShExecInfo.lpDirectory = NULL;
+ ShExecInfo.nShow = SW_HIDE;
+ ShExecInfo.hInstApp = NULL;
+ ShellExecuteEx(&ShExecInfo);
+ WaitForSingleObject(ShExecInfo.hProcess, INFINITE);
+#endif
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/DeployAudioParam.mk b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/DeployAudioParam.mk
new file mode 100644
index 0000000..1b62d6c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/DeployAudioParam.mk
@@ -0,0 +1,82 @@
+AUDIO_PARAM_OUT_DIR := $(TARGET_OUT_VENDOR_ETC)/audio_param
+EXTRACT_FILE_LIST := *_AudioParam.xml *_ParamUnitDesc.xml *_ParamTreeView.xml
+
+LOCAL_AUDIO_PARAM_FILE_PATTERN := $(subst *,%,$(EXTRACT_FILE_LIST))
+LOCAL_AUDIO_PARAM_INSTALLED :=
+
+ifneq (,$(strip $(INSTALL_AUDIO_PARAM_FILE_LIST))$(strip $(INSTALL_AUDIO_PARAM_DIR_LIST)))
+ $(warning $(newline)\
+*********************************************************************$(newline)\
+INSTALL_AUDIO_PARAM_FILE_LIST and INSTALL_AUDIO_PARAM_DIR_LIST are no$(newline)\
+longer supported, but observed the following usages:$(newline)$(newline)\
+$(if $(strip $(INSTALL_AUDIO_PARAM_FILE_LIST)),$(space)$(space)INSTALL_AUDIO_PARAM_FILE_LIST: $(INSTALL_AUDIO_PARAM_FILE_LIST)$(newline))\
+$(if $(strip $(INSTALL_AUDIO_PARAM_DIR_LIST)),$(space)$(space)INSTALL_AUDIO_PARAM_DIR_LIST: $(INSTALL_AUDIO_PARAM_DIR_LIST)$(newline))\
+$(newline)\
+To add custom AudioParam files, please use:$(newline)\
+$(space)$(space)CUSTOM_AUDIO_PARAM_FILE_LIST += $$(YOUR_FILES)$(newline)\
+Likewise, for custom AudioParam directories:$(newline)\
+$(space)$(space)CUSTOM_AUDIO_PARAM_DIR_LIST += $$(YOUR_DIRS)$(newline)\
+*********************************************************************)
+ $(error Please use CUSTOM_AUDIO_PARAM_FILE_LIST and CUSTOM_AUDIO_PARAM_DIR_LIST instead of INSTALL_AUDIO_PARAM_FILE_LIST and INSTALL_AUDIO_PARAM_DIR_LIST)
+endif
+
+# Add chip & project's default.audio_param by default
+CHIP := $(MTK_PLATFORM_DIR)
+CUSTOM_AUDIO_PARAM_FILE_LIST += $(MTK_TARGET_PROJECT_FOLDER)/default.audio_param device/mediatek/$(CHIP)/default.audio_param
+
+# Deploy these files in MTK_AUDIO_PARAM_FILE_LIST to LOCAL_DEFAULT_AUDIO_PARAM_FILE
+# Check if the audio_param exist, uncompress & delete it
+LOCAL_DEFAULT_AUDIO_PARAM_FILE := $(firstword $(wildcard $(CUSTOM_AUDIO_PARAM_FILE_LIST) $(MTK_AUDIO_PARAM_FILE_LIST)))
+
+ifneq (,$(filter custom_images,$(MAKECMDGOALS)))
+AUDIO_PARAM_CUSTOM_IMAGE_ZIP_FILE := $(LOCAL_DEFAULT_AUDIO_PARAM_FILE)
+AUDIO_PARAM_CUSTOM_IMAGE_XML_FILES :=
+AUDIO_PARAM_CUSTOM_IMAGE_ZIPPED_FILES :=
+endif
+
+ifneq ($(LOCAL_DEFAULT_AUDIO_PARAM_FILE),)
+LOCAL_AUDIO_PARAM_UNZIP_FILE_LIST := $(filter $(LOCAL_AUDIO_PARAM_FILE_PATTERN),$(shell unzip -Z -1 $(LOCAL_DEFAULT_AUDIO_PARAM_FILE)))
+
+# $(1): input.zip
+# $(2): output.file
+define unzip-audio-param-file
+$(2): $(1)
+ mkdir -p $$(dir $(2))
+ unzip -qo $(1) $$(notdir $(2)) -d $$(dir $(2))
+endef
+$(foreach f,$(LOCAL_AUDIO_PARAM_UNZIP_FILE_LIST),\
+ $(eval src := $(LOCAL_DEFAULT_AUDIO_PARAM_FILE))\
+ $(eval dst := $(AUDIO_PARAM_OUT_DIR)/$(notdir $(f)))\
+ $(if $(filter custom_images,$(MAKECMDGOALS)), \
+ $(eval AUDIO_PARAM_CUSTOM_IMAGE_ZIPPED_FILES += $(src)))\
+ $(eval LOCAL_AUDIO_PARAM_INSTALLED += $(dst))\
+ $(eval $(call unzip-audio-param-file,$(src),$(dst)))\
+)
+endif
+
+LOCAL_AUDIO_PARAM_COPY_FILE_LIST := $(filter $(LOCAL_AUDIO_PARAM_FILE_PATTERN),$(foreach d,$(CUSTOM_AUDIO_PARAM_DIR_LIST) $(MTK_AUDIO_PARAM_DIR_LIST),$(wildcard $(d)/*.xml)))
+LOCAL_AUDIO_PARAM_COPY_FILE_STEM := $(sort $(filter-out $(notdir $(LOCAL_AUDIO_PARAM_UNZIP_FILE_LIST)),$(notdir $(LOCAL_AUDIO_PARAM_COPY_FILE_LIST))))
+$(foreach f,$(LOCAL_AUDIO_PARAM_COPY_FILE_STEM),\
+ $(eval chk := $(filter %/$(f),$(LOCAL_AUDIO_PARAM_COPY_FILE_LIST)))\
+ $(eval src := $(firstword $(chk)))\
+ $(if $(filter custom_images,$(MAKECMDGOALS)),\
+ $(eval AUDIO_PARAM_CUSTOM_IMAGE_XML_FILES += $(src)))\
+ $(eval exc := $(filter-out $(src),$(chk)))\
+ $(if $(strip $(exc)),$(info AudioParam: $(src) overrides $(exc)))\
+ $(eval dst := $(AUDIO_PARAM_OUT_DIR)/$(f))\
+ $(eval LOCAL_AUDIO_PARAM_INSTALLED += $(dst))\
+ $(eval $(call copy-one-file,$(src),$(dst)))\
+)
+
+ifneq (,$(filter custom_images,$(MAKECMDGOALS)))
+AUDIO_PARAM_CUSTOM_IMAGE_ZIP_FILE := \
+ $(strip $(AUDIO_PARAM_CUSTOM_IMAGE_ZIP_FILE))
+AUDIO_PARAM_CUSTOM_IMAGE_ZIPPED_FILES := \
+ $(strip $(AUDIO_PARAM_CUSTOM_IMAGE_ZIPPED_FILES))
+AUDIO_PARAM_CUSTOM_IMAGE_XML_FILES := \
+ $(strip $(AUDIO_PARAM_CUSTOM_IMAGE_XML_FILES))
+endif
+
+ALL_DEFAULT_INSTALLED_MODULES += $(LOCAL_AUDIO_PARAM_INSTALLED)
+.PHONY: MODULES-IN-vendor-mediatek-proprietary-external-AudioParamParser
+MODULES-IN-vendor-mediatek-proprietary-external-AudioParamParser: $(LOCAL_AUDIO_PARAM_INSTALLED)
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/GenAudioParamOptionsXml.mk b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/GenAudioParamOptionsXml.mk
new file mode 100644
index 0000000..fd1eca7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/GenAudioParamOptionsXml.mk
@@ -0,0 +1,249 @@
+###########################################################
+## Options to be translated into XML nodes.
+###########################################################
+_audio_param_parser_FO_list := \
+ MTK_WB_SPEECH_SUPPORT \
+ MTK_AUDIO_HD_REC_SUPPORT \
+ MTK_DUAL_MIC_SUPPORT \
+ MTK_HANDSFREE_DMNR_SUPPORT \
+ DMNR_TUNNING_AT_MODEMSIDE \
+ MTK_VOIP_ENHANCEMENT_SUPPORT \
+ MTK_TB_WIFI_3G_MODE \
+ MTK_DISABLE_EARPIECE \
+ MTK_ASR_SUPPORT \
+ MTK_VOIP_NORMAL_DMNR \
+ MTK_VOIP_HANDSFREE_DMNR \
+ MTK_INCALL_NORMAL_DMNR \
+ MTK_VOICE_UNLOCK_SUPPORT \
+ MTK_VOICE_UI_SUPPORT \
+ MTK_ACF_AUTO_GEN_SUPPORT \
+ MTK_SPEAKER_MONITOR_SUPPORT \
+ MTK_AUDIO_BLOUD_CUSTOMPARAMETER_REV \
+ MTK_MAGICONFERENCE_SUPPORT \
+ MTK_HAC_SUPPORT \
+ MTK_AUDIO_SPH_LPBK_PARAM \
+ MTK_AUDIO_GAIN_TABLE_BT \
+ MTK_AUDIO_BT_NREC_WO_ENH_MODE \
+ MTK_AUDIO_TUNING_TOOL_V2_PHASE \
+ MATV_AUDIO_SUPPORT \
+ MTK_FM_SUPPORT \
+ MTK_HEADSET_ACTIVE_NOISE_CANCELLATION \
+ MTK_SUPPORT_TC1_TUNNING \
+ MTK_AUDIO_SPEAKER_PATH \
+ MTK_AUDIO_NUMBER_OF_MIC \
+ MTK_PLATFORM \
+ MTK_AURISYS_FRAMEWORK_SUPPORT \
+ MTK_BESLOUDNESS_RUN_WITH_HAL \
+ MTK_AUDIO \
+ USE_CUSTOM_AUDIO_POLICY \
+ USE_XML_AUDIO_POLICY_CONF \
+ MTK_AUDIO_TUNING_TOOL_VERSION \
+ MTK_AUDIO_TUNNELING_SUPPORT \
+ MTK_SMARTPA_DUMMY_LIB \
+ MTK_HIFIAUDIO_SUPPORT \
+ MTK_BESLOUDNESS_SUPPORT \
+ MTK_USB_PHONECALL \
+ MTK_AUDIO_NUMBER_OF_SPEAKER \
+ MTK_A2DP_OFFLOAD_SUPPORT
+
+###########################################################
+## Complex option customization are defined here.
+##
+## Prefix temporary variables with "_aupapa_" to prevent
+## the temporary variable from messing up global namespace.
+## The string will be stripped while assembling the XML.
+##
+## Finally add the variable to _audio_param_parser_FO_list.
+###########################################################
+# MTK_WIFI_ONLY_SUPPORT
+ifeq ($(MTK_TB_WIFI_3G_MODE),WIFI_ONLY)
+ _aupapa_VIR_WIFI_ONLY_SUPPORT := yes
+else
+ _aupapa_VIR_WIFI_ONLY_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_WIFI_ONLY_SUPPORT
+
+# MTK_3G_DATA_ONLY_SUPPORT
+ifneq ($(filter 3GDATA_SMS 3GDATA_ONLY,$(MTK_TB_WIFI_3G_MODE)),)
+ _aupapa_VIR_3G_DATA_ONLY_SUPPORT := yes
+else
+ _aupapa_VIR_3G_DATA_ONLY_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_3G_DATA_ONLY_SUPPORT
+
+# SUPPORT_ASR
+ifeq ($(MTK_ASR_SUPPORT),yes)
+ ifeq ($(MTK_DUAL_MIC_SUPPORT),yes)
+ _aupapa_VIR_ASR_SUPPORT := yes
+ else
+ _aupapa_VIR_ASR_SUPPORT := no
+ endif
+else
+ _aupapa_VIR_ASR_SUPPORT:=no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_ASR_SUPPORT
+
+# SUPPORT_VOIP_NORMAL_DMNR
+ifneq ($(MTK_DISABLE_EARPIECE),yes)
+ ifeq ($(MTK_DUAL_MIC_SUPPORT),yes)
+ ifeq ($(MTK_VOIP_NORMAL_DMNR),yes)
+ ifeq ($(MTK_VOIP_ENHANCEMENT_SUPPORT),yes)
+ _aupapa_VIR_VOIP_NORMAL_DMNR_SUPPORT := yes
+ else
+ _aupapa_VIR_VOIP_NORMAL_DMNR_SUPPORT := no
+ endif
+ else
+ _aupapa_VIR_VOIP_NORMAL_DMNR_SUPPORT := no
+ endif
+ else
+ _aupapa_VIR_VOIP_NORMAL_DMNR_SUPPORT := no
+ endif
+else
+ _aupapa_VIR_VOIP_NORMAL_DMNR_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_VOIP_NORMAL_DMNR_SUPPORT
+
+# SUPPORT_VOIP_HANDSFREE_DMNR
+ifeq ($(MTK_DUAL_MIC_SUPPORT),yes)
+ ifeq ($(MTK_VOIP_HANDSFREE_DMNR),yes)
+ ifeq ($(MTK_VOIP_ENHANCEMENT_SUPPORT),yes)
+ _aupapa_VIR_VOIP_HANDSFREE_DMNR_SUPPORT := yes
+ else
+ _aupapa_VIR_VOIP_HANDSFREE_DMNR_SUPPORT := no
+ endif
+ else
+ _aupapa_VIR_VOIP_HANDSFREE_DMNR_SUPPORT := no
+ endif
+else
+ _aupapa_VIR_VOIP_HANDSFREE_DMNR_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_VOIP_HANDSFREE_DMNR_SUPPORT
+
+# NO_SPEECH
+_aupapa_VIR_NO_SPEECH := no
+ifeq ($(_aupapa_VIR_WIFI_ONLY_SUPPORT),yes)
+ _aupapa_VIR_NO_SPEECH := yes
+endif
+ifeq ($(_aupapa_VIR_3G_DATA_ONLY_SUPPORT),yes)
+ _aupapa_VIR_NO_SPEECH := yes
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_NO_SPEECH
+
+# SUPPORT_INCALL_NORMAL_DMNR
+ifneq ($(MTK_DISABLE_EARPIECE),yes)
+ ifneq ($(_aupapa_VIR_NO_SPEECH),yes)
+ ifeq ($(MTK_DUAL_MIC_SUPPORT),yes)
+ ifneq ($(MTK_INCALL_NORMAL_DMNR),no)
+ _aupapa_VIR_INCALL_NORMAL_DMNR_SUPPORT := yes
+ else
+ _aupapa_VIR_INCALL_NORMAL_DMNR_SUPPORT := no
+ endif
+ else
+ _aupapa_VIR_INCALL_NORMAL_DMNR_SUPPORT := no
+ endif
+ else
+ _aupapa_VIR_INCALL_NORMAL_DMNR_SUPPORT := no
+ endif
+else
+ _aupapa_VIR_INCALL_NORMAL_DMNR_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_INCALL_NORMAL_DMNR_SUPPORT
+
+# SUPPORT_INCALL_HANDSFREE_DMNR
+ifneq ($(_aupapa_VIR_NO_SPEECH),yes)
+ ifeq ($(MTK_DUAL_MIC_SUPPORT),yes)
+ ifeq ($(MTK_INCALL_HANDSFREE_DMNR),yes)
+ _aupapa_VIR_INCALL_HANDSFREE_DMNR_SUPPORT := yes
+ else
+ _aupapa_VIR_INCALL_HANDSFREE_DMNR_SUPPORT := no
+ endif
+ else
+ _aupapa_VIR_INCALL_HANDSFREE_DMNR_SUPPORT := no
+ endif
+else
+ _aupapa_VIR_INCALL_HANDSFREE_DMNR_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_INCALL_HANDSFREE_DMNR_SUPPORT
+
+# SUPPORT_VOICE_UNLOCK
+ifeq ($(MTK_VOICE_UNLOCK_SUPPORT),yes)
+ _aupapa_VIR_VOICE_UNLOCK_SUPPORT := yes
+endif
+ifeq ($(MTK_VOICE_UI_SUPPORT),yes)
+ _aupapa_VIR_VOICE_UNLOCK_SUPPORT := yes
+endif
+_audio_param_parser_FO_list += VIR_VOICE_UNLOCK_SUPPORT
+
+# VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V5
+_aupapa_VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V5 := yes
+_audio_param_parser_FO_list += _aupapa_VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V5
+
+# VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V4
+_aupapa_VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V4 := no
+_audio_param_parser_FO_list += _aupapa_VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V4
+
+# SUPPORT_MAGI_CONFERENCE
+ifeq ($(MTK_MAGICONFERENCE_SUPPORT),yes)
+ ifeq ($(MTK_DUAL_MIC_SUPPORT),yes)
+ _aupapa_VIR_MAGI_CONFERENCE_SUPPORT := yes
+ else
+ _aupapa_VIR_MAGI_CONFERENCE_SUPPORT := no
+ endif
+else
+ _aupapa_VIR_MAGI_CONFERENCE_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_MAGI_CONFERENCE_SUPPORT
+
+# SUPPORT_AUDIO_LAYERED_PARAM
+ifneq ($(MTK_AUDIO_TUNING_TOOL_VERSION),)
+ ifneq ($(strip $(MTK_AUDIO_TUNING_TOOL_VERSION)),V1)
+ _aupapa_MTK_AUDIO_TUNING_TOOL_V2_PHASE := \
+ $(shell echo $(MTK_AUDIO_TUNING_TOOL_VERSION) | sed 's/V2\.//g')
+ _aupapa_MTK_AUDIO_HIERARCHICAL_PARAM_SUPPORT := yes
+ endif
+endif
+_audio_param_parser_FO_list += _aupapa_MTK_AUDIO_HIERARCHICAL_PARAM_SUPPORT
+_audio_param_parser_FO_list += _aupapa_MTK_AUDIO_TUNING_TOOL_V2_PHASE
+
+# VIR_MTK_XXXX_IIR_ENH_SUPPORT & VIR_MTK_VOIP_IIR_MIC_SUPPORT
+ifeq ($(MTK_AURISYS_FRAMEWORK_SUPPORT),yes)
+ _aupapa_VIR_MTK_RECORD_IIR_ENH_SUPPORT := yes
+ _aupapa_VIR_MTK_VOIP_IIR_ENH_SUPPORT := yes
+ _aupapa_VIR_MTK_VOIP_IIR_MIC_SUPPORT := yes
+else
+ _aupapa_VIR_MTK_RECORD_IIR_ENH_SUPPORT := no
+ _aupapa_VIR_MTK_VOIP_IIR_ENH_SUPPORT := no
+ _aupapa_VIR_MTK_VOIP_IIR_MIC_SUPPORT := no
+endif
+_audio_param_parser_FO_list += _aupapa_VIR_MTK_RECORD_IIR_ENH_SUPPORT
+_audio_param_parser_FO_list += _aupapa_VIR_MTK_VOIP_IIR_ENH_SUPPORT
+_audio_param_parser_FO_list += _aupapa_VIR_MTK_VOIP_IIR_MIC_SUPPORT
+
+###########################################################
+## Remove AUDIO_PARAM_OPTIONS_LIST duplicated item (keep first decleration)
+###########################################################
+
+$(foreach n,$(AUDIO_PARAM_OPTIONS_LIST),\
+ $(eval KEY := $(firstword $(subst =, ,$(n))))\
+ $(eval $(if $(filter $(KEY)=%,$(NEW_AUDIO_PARAM_OPTIONS_LIST)),$(info Ignore duplicated AUDIO_PARAM_OPTION: $(n)),NEW_AUDIO_PARAM_OPTIONS_LIST += $(n)))\
+)
+AUDIO_PARAM_OPTIONS_LIST := $(NEW_AUDIO_PARAM_OPTIONS_LIST)
+
+###########################################################
+## Target definition
+###########################################################
+AUDIOPARAM_XML_INSTALLED := $(TARGET_OUT_VENDOR_ETC)/audio_param/AudioParamOptions.xml
+AUDIOPARAM_XML_DEPS := \
+ $(LOCAL_PATH)/Android.mk \
+ $(lastword $(MAKEFILE_LIST))
+
+$(AUDIOPARAM_XML_INSTALLED): $(AUDIOPARAM_XML_DEPS)
+ @mkdir -p $(dir $@)
+ @echo '<?xml version="1.0" encoding="UTF-8"?>' >$@
+ @echo '<AudioParamOptions>' >>$@
+ @$(foreach i,$(_audio_param_parser_FO_list),echo ' <Param name="$(patsubst _aupapa_%,%,$(strip $(i)))" value="$(strip $($(i)))" />' >>$@;)
+ @$(foreach i,$(AUDIO_PARAM_OPTIONS_LIST),echo ' <Param name="$(firstword $(subst =, ,$(i)))" value="$(word 2,$(subst =, ,$(i)))" />' >>$@;)
+ @echo '</AudioParamOptions>' >>$@
+
+ALL_DEFAULT_INSTALLED_MODULES += $(AUDIOPARAM_XML_INSTALLED)
+$(LOCAL_BUILT_MODULE):$(AUDIOPARAM_XML_INSTALLED)
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/Makefile b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/Makefile
new file mode 100644
index 0000000..80d4de8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/Makefile
@@ -0,0 +1,52 @@
+all: libaudioparamparser.so.1.0.0
+
+LDFLAGS = $(BB_LDFLAGS_ADD) -Wl,--hash-style=gnu -shared -Wl,-soname -L. -L $(ROOT)/lib
+LOCAL_PATH = .
+
+OFLAGS = -fPIC
+
+INCLUDE= ${BB_INCLUDE_ADD} \
+ -I./include \
+ -I./include/alps_utils
+
+CSRC= AudioCategory.c \
+ AudioParam.c \
+ AudioParamFieldInfo.c \
+ AudioParamParser.c \
+ AudioParamTreeView.c \
+ AudioParamUnit.c \
+ AudioType.c \
+ AudioUtils.c \
+ UnitTest.c
+
+CXXSRC= guicon.cpp
+
+LIB_INCLUDE = -llog \
+ -lutils \
+ -lxml2
+
+CFLAGS += -DMTK_YOCTO_AUDIO
+
+
+CXXOBJS=$(CXXSRC:.cpp=.o)
+COBJS=$(CSRC:.c=.o)
+%.o : %.cpp
+ $(CXX) $(OFLAGS) $(INCLUDE) ${CFLAGS} -c -o $@ $<
+%.o : %.c
+ $(CC) $(OFLAGS) $(INCLUDE) ${CFLAGS} -c -o $@ $<
+
+libaudioparamparser.so.1.0.0: $(COBJS) $(CXXOBJS)
+ $(CXX) $(COBJS) $(CXXOBJS) $(LDFLAGS) $(LIB_INCLUDE) -shared -o libaudioparamparser.so.1.0.0
+
+install:
+ cp -af libaudioparamparser.so.1.0.0 ../
+ mkdir -p ../audio_param
+ cp -af $(TARGET_PLATFORM)/audio_param/* ../audio_param/
+ mkdir -p ../export_include
+ mkdir -p ../export_include/libxml
+ cp -af *h ../export_include
+ cp -af include/*.h ../export_include
+ cp -af include/libxml/*.h ../export_include/libxml
+
+clean:
+ rm -rf *.o
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/UnitTest.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/UnitTest.c
new file mode 100644
index 0000000..790a879
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/UnitTest.c
@@ -0,0 +1,533 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement unit test cases
+ */
+
+#include "AudioParamParserPriv.h"
+
+typedef APP_STATUS(*TEST_FUN)(AppHandle *appHandle);
+
+typedef struct {
+ AppHandle *appHandle;
+ int times;
+ TEST_FUN fun;
+} ThreadParam;
+
+EXPORT APP_STATUS unitTest(AppHandle *appHandle) {
+ APP_STATUS res = APP_NO_ERROR;
+ APP_STATUS finalRes = APP_NO_ERROR;
+
+ printf("===APP internal unit test===\n");
+#if 0
+ res = testAppHandleInitUninit();
+ if (res == APP_ERROR) {
+ finalRes = APP_ERROR;
+ }
+ printf("testAppHandleInitUninit: %s\n", res ? "pass" : "fail");
+#endif
+ res = testReadWriteParam(appHandle);
+ if (res == APP_ERROR) {
+ finalRes = APP_ERROR;
+ }
+ printf("testReadWriteParam: %s\n", res ? "pass" : "fail");
+
+ res = testMemoryLeak(appHandle);
+ if (res == APP_ERROR) {
+ finalRes = APP_ERROR;
+ }
+ printf("testMemoryLeak: %s\n", res ? "pass" : "fail");
+
+ res = testAudioTypeLock(appHandle);
+ if (res == APP_ERROR) {
+ finalRes = APP_ERROR;
+ }
+ printf("testAudioTypeLock: %s\n", res ? "pass" : "fail");
+ printf("=============================\n");
+
+ return finalRes;
+}
+
+
+EXPORT void *commonThreadLoop(void *arg) {
+ ThreadParam threadParam = *(ThreadParam *)arg;
+ int i = 0 ;
+ for (i = 0; i < threadParam.times; i++) {
+ (*threadParam.fun)(threadParam.appHandle);
+ INFO_LOG("2nd thread round = %d\n", i);
+ }
+ return NULL;
+}
+
+EXPORT void testDebugLevel() {
+ appSetDebugLevel(ERR_LEVEL);
+ ERR_LOG("error - pass\n");
+ WARN_LOG("warn - ok\n");
+ INFO_LOG("info - ok\n");
+ DEBUG_LOG("debug - ok\n");
+
+ appSetDebugLevel(WARN_LEVEL);
+ ERR_LOG("error - fail\n");
+ WARN_LOG("warn - pass\n");
+ INFO_LOG("info - ok\n");
+ DEBUG_LOG("debug - ok\n");
+
+ appSetDebugLevel(INFO_LEVEL);
+ ERR_LOG("error - fail\n");
+ WARN_LOG("warn - fail\n");
+ INFO_LOG("info - pass\n");
+ DEBUG_LOG("debug - ok\n");
+
+ appSetDebugLevel(DEBUG_LEVEL);
+ ERR_LOG("error - fail\n");
+ WARN_LOG("warn - fail\n");
+ INFO_LOG("info - fail\n");
+ DEBUG_LOG("debug - pass\n");
+}
+
+EXPORT void testHashParamTree() {
+ ParamTree *item;
+ ParamTree *ParamTreeHash = NULL, *tmp = NULL; /* Used for hash */
+ const char *key;
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "NB,Normal,,";
+ item->paramId = 1;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "WB,Normal,,";
+ item->paramId = 7;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "NB,Normal,0,GSM,";
+ item->paramId = 1;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "NB,HAC,0,GSM";
+ item->paramId = 0;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ /* Find string */
+ key = "WB,,,";
+ HASH_FIND_STR(ParamTreeHash, key, item);
+ if (item) { printf("[%s] id is %d\n", key, item->paramId); }
+
+ /* Free hash table content */
+ HASH_ITER(hh, ParamTreeHash, item, tmp) {
+ HASH_DEL(ParamTreeHash, item);
+ free(item);
+ }
+}
+
+EXPORT void testHashParamUnit() {
+ ParamUnit *item;
+ ParamUnit *ParamUnitHash = NULL, *tmp = NULL; /* Used for hash */
+ int key;
+
+ item = (ParamUnit *)malloc(sizeof(ParamUnit));
+ item->paramId = 0;
+ item->paramHash = (Param *) 0x1;
+ HASH_ADD_INT(ParamUnitHash, paramId, item);
+
+ item = (ParamUnit *)malloc(sizeof(ParamUnit));
+ item->paramId = 1;
+ item->paramHash = (Param *)0x2;
+ HASH_ADD_INT(ParamUnitHash, paramId, item);
+ item = (ParamUnit *)malloc(sizeof(ParamUnit));
+
+ item->paramId = 7;
+ item->paramHash = (Param *)0x3;
+ HASH_ADD_INT(ParamUnitHash, paramId, item);
+
+ /* Find string */
+ key = 0;
+ HASH_FIND_INT(ParamUnitHash, &key, item);
+ if (item) { INFO_LOG("[%d] Param is %p\n", key, item->paramHash); }
+
+ key = 1;
+ HASH_FIND_INT(ParamUnitHash, &key, item);
+ if (item) { INFO_LOG("[%d] Param is %p\n", key, item->paramHash); }
+
+ key = 7;
+ HASH_FIND_INT(ParamUnitHash, &key, item);
+ if (item) { INFO_LOG("[%d] Param is %p\n", key, item->paramHash); }
+
+ /* Free hash table content */
+ HASH_ITER(hh, ParamUnitHash, item, tmp) {
+ HASH_DEL(ParamUnitHash, item);
+ free(item);
+ }
+}
+
+EXPORT void testHashParam() {
+ Param *item;
+ Param *paramHash = NULL, *tmp = NULL; /* Used for hash */
+ const char *key;
+
+ item = (Param *)malloc(sizeof(Param));
+ memset(item, 0, sizeof(Param));
+ item->name = "speech_mode_para";
+ item->data = "0x0011,0x2233,0x4455";
+ HASH_ADD_KEYPTR(hh, paramHash, item->name, strlen(item->name), item);
+
+ item = (Param *)malloc(sizeof(Param));
+ memset(item, 0, sizeof(Param));
+ item->name = "uint_param";
+ item->data = "4294967295";
+ HASH_ADD_KEYPTR(hh, paramHash, item->name, strlen(item->name), item);
+
+ item = (Param *)malloc(sizeof(Param));
+ memset(item, 0, sizeof(Param));
+ item->name = "float_param";
+ item->data = "0.1234567";
+ HASH_ADD_KEYPTR(hh, paramHash, item->name, strlen(item->name), item);
+
+ /* Find string */
+ key = "speech_mode_para";
+ HASH_FIND_STR(paramHash, key, item);
+ if (item) { INFO_LOG("[%s] value is %s\n", key, (char *)item->data); }
+
+ key = "uint_param";
+ HASH_FIND_STR(paramHash, key, item);
+ if (item) { INFO_LOG("[%s] value is %s\n", key, (char *)item->data); }
+
+ key = "float_param";
+ HASH_FIND_STR(paramHash, key, item);
+ if (item) { INFO_LOG("[%s] value is %s\n", key, (char *)item->data); }
+
+ /* Free hash table content */
+ HASH_ITER(hh, paramHash, item, tmp) {
+ HASH_DEL(paramHash, item);
+ free(item);
+ }
+}
+
+void testCb(AppHandle *appHandle, const char *audioTypeName) {
+ printf("XML file changed. (cus folder = %s, audioType = %s)\n", appHandle->xmlCusDir, audioTypeName);
+}
+
+EXPORT void notifyCbTest(AppHandle *appHandle) {
+ NotifyCb *cb;
+
+ appHandleRegXmlChangedCb(appHandle, testCb);
+
+ LL_FOREACH(appHandle->noficyCbList, cb) {
+ (*cb->cb)(appHandle, "OK");
+ }
+
+ appHandleUnregXmlChangedCb(appHandle, testCb);
+
+ LL_FOREACH(appHandle->noficyCbList, cb) {
+ (*cb->cb)(appHandle, "FAIL");
+ }
+}
+
+EXPORT void inotifyTest(const char *path) {
+
+#ifndef WIN32
+#define INOTIFY_BUF_SIZE 512
+ /* inotify test */
+ int wd;
+ ssize_t len;
+ char buf[INOTIFY_BUF_SIZE];
+ char *ptr;
+ const struct inotify_event *event;
+
+ int fd = inotify_init();
+ if (fd < 0) {
+ printf("inotify_init failed !!!");
+ exit(1);
+ }
+
+ printf("inotify path = %s\n", path);
+ wd = inotify_add_watch(fd, path, IN_CLOSE_WRITE);
+ if (wd < 0) {
+ printf("inotify_add_watch failed !!!");
+ exit(1);
+ }
+
+ while (1) {
+ len = read(fd, buf, sizeof(buf));
+ if (len < 0) {
+ perror("read");
+ exit(EXIT_FAILURE);
+ }
+
+ /* Loop over all events in the buffer */
+ for (ptr = buf; ptr < buf + len; ptr += sizeof(struct inotify_event) + event->len) {
+ event = (const struct inotify_event *) ptr;
+
+ /* Print event type */
+ if (event->mask & IN_OPEN) {
+ printf("IN_OPEN: ");
+ }
+ if (event->mask & IN_CLOSE_NOWRITE) {
+ printf("IN_CLOSE_NOWRITE: ");
+ }
+ if (event->mask & IN_CLOSE_WRITE) {
+ printf("IN_CLOSE_WRITE: ");
+ }
+ if (event->mask & IN_ACCESS) {
+ printf("IN_ACCESS: ");
+ }
+
+ /* Print the name of the file */
+
+ if (event->len) {
+ printf("%s", event->name);
+ }
+
+ /* Print type of filesystem object */
+
+ if (event->mask & IN_ISDIR) {
+ printf(" [directory]\n");
+ } else {
+ printf(" [file]\n");
+ }
+ }
+ }
+ inotify_rm_watch(fd, IN_CLOSE_NOWRITE);
+#endif
+}
+
+/***********************************
+ * Test Steps:
+ * 1. Create thread to read/write param
+ * 2. Check the lock is work well
+ * Crash/deadlock checking
+ **********************************/
+EXPORT APP_STATUS testAudioTypeLockFun(AppHandle *appHandle) {
+ /* Read param */
+ char *audioTypeName = "Speech";
+ char *categoryPath = "Band,NB,Profile,4_pole_Headset,VolIndex,3";
+ char *paramName = "speech_mode_para";
+ unsigned short shortArray1[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7};
+ unsigned short shortArray2[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
+ int arraySize = 7;
+ AudioType *audioType;
+ ParamUnit *paramUnit;
+ ParamInfo *paramInfo;
+ Param *param;
+
+ appHandle = appHandleGetInstance();
+
+ /* Query AudioType */
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType) {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ /* Read Lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit) {
+ ERR_LOG("paramUnit is NULL\n");
+ return APP_ERROR;
+ }
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ if (!param) {
+ ERR_LOG("Error: Cannot query param value!\n");
+ return APP_ERROR;
+ }
+
+ /* Read unlock */
+ audioTypeUnlock(audioType);
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ /* Write param */
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)shortArray1, arraySize) == APP_ERROR) {
+ ERR_LOG("Cannot update the param data!!\n");
+ return APP_ERROR;
+ }
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)shortArray2, arraySize) == APP_ERROR) {
+ ERR_LOG("Cannot update the param data!!\n");
+ return APP_ERROR;
+ }
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ /* Save XML */
+ audioTypeSaveAudioParamXml(audioType, XML_CUS_FOLDER_ON_DEVICE, 1);
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ /* Reload XML */
+ if (appHandleReloadAudioType(appHandle, audioType->name) == APP_ERROR) {
+ ERR_LOG("Cannot reload AudioType!\n (%s)", audioType->name);
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS testAudioTypeLock(AppHandle *appHandle) {
+#ifndef WIN32
+ int i;
+ pthread_t appThread;
+ void *status;
+ ThreadParam threadParam;
+
+ threadParam.times = 50;
+ threadParam.appHandle = appHandle;
+ threadParam.fun = testAudioTypeLockFun;
+
+ if (pthread_create(&appThread, NULL, commonThreadLoop, &threadParam)) {
+ ERR_LOG("Create app thread fail!\n");
+ return APP_ERROR;
+ }
+
+ for (i = 0; i < threadParam.times; i++) {
+ (*threadParam.fun)(appHandle);
+ INFO_LOG("Main thread test round = %d\n", i);
+ }
+
+ /* Waiting 2nd thread join */
+ pthread_join(appThread, &status);
+#else
+ INFO_LOG("Not test this UT on windows\n");
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS testAppHandleInitUninit() {
+ int times = 10;
+ int i;
+ for (i = 0; i < times; i++) {
+ AppHandle testAppHandle;
+ appHandleInit(&testAppHandle);
+#ifdef WIN32
+ appHandleParseXml(&testAppHandle, XML_FOLDER_LIST_ON_TUNING_TOOL, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#else
+ char **xmlDirFromProperty = appGetXmlDirFromProperty();
+ if (xmlDirFromProperty) {
+ appHandleParseXml(&testAppHandle, (const char**)xmlDirFromProperty, XML_CUS_FOLDER_ON_DEVICE);
+ } else {
+ appHandleParseXml(&testAppHandle, XML_FOLDER_LIST_ON_DEVICE, XML_CUS_FOLDER_ON_DEVICE);
+ }
+#endif
+ appHandleUninit(&testAppHandle);
+ }
+ return APP_NO_ERROR;
+}
+
+/***********************************
+ * Test Steps:
+ * 1. Reload audio type xml 100 times
+ * Memory leak / crash checking
+ **********************************/
+EXPORT APP_STATUS testMemoryLeak(AppHandle *appHandle) {
+ int i = 0;
+ for (i = 0; i < 100; i++) {
+ /* stress test query / release / create */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ audioType->allowReload = 1;
+ if (appHandleReloadAudioType(appHandle, "Speech") == APP_ERROR) {
+ return APP_ERROR;
+ }
+ }
+
+ printf("Checking memory status and press enter key to continue\n");
+ getchar();
+ return APP_NO_ERROR;
+}
+
+/***********************************
+ * Test Steps:
+ * 1. Read param array
+ * 2. Update param array one item with 32767
+ * 3. Repeat array size times
+ * 4. Check the result
+ **********************************/
+APP_STATUS testReadWriteParam(AppHandle *appHandle) {
+ size_t i, j;
+ ParamUnit *paramUnit;
+ ParamInfo *paramInfo;
+ Param *param;
+ unsigned short *shortArray;
+ size_t arraySize = 1; // The size will update by real array size latter
+
+ const char *audioTypeName = "Speech";
+ const char *paraName = "speech_mode_para";
+ const char *categoryPath = "Band,NB,Profile,Normal,VolIndex,2,Network,GSM";
+
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+
+ /* Test steps */
+ for (j = 0; j < arraySize; j++) {
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit) {
+ ERR_LOG("Cannot find paramUnit\n");
+ return APP_ERROR;
+ }
+
+ param = paramUnitGetParamByName(paramUnit, paraName);
+ if (!param) {
+ ERR_LOG("Cannot query param value!\n");
+ return APP_ERROR;
+ }
+
+ shortArray = (unsigned short *)param->data;
+ arraySize = param->arraySize;
+ /*for(i = 0; i < param->arraySize; i++)
+ {
+ printf("[%d]0x%x\n", i, ((unsigned short*)param->data)[i])
+ }*/
+
+ shortArray[j] = 32767;
+
+ /* You should cache follow object in somewhere without query again */
+ paramInfo = audioTypeGetParamInfoByName(audioType, paraName);
+
+ /* The sph_in_fir param is short array type */
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)shortArray, param->arraySize) == APP_ERROR) {
+ return APP_ERROR;
+ }
+ }
+
+ /* Result check */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit) {
+ ERR_LOG("Cannot find paramUnit\n");
+ return APP_ERROR;
+ }
+
+ param = paramUnitGetParamByName(paramUnit, paraName);
+ if (!param) {
+ ERR_LOG("Cannot query param value!\n");
+ return APP_ERROR;
+ }
+
+ shortArray = (unsigned short *)param->data;
+ for (i = 0; i < param->arraySize; i++) {
+ if (shortArray[i] != 32767) {
+ ERR_LOG("Verify short array["APP_SIZE_T_FT"] = %d != 32767\n", i, shortArray[i]);
+ return APP_ERROR;
+ }
+ }
+
+ return APP_NO_ERROR;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/guicon.cpp b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/guicon.cpp
new file mode 100644
index 0000000..97fbcc8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/guicon.cpp
@@ -0,0 +1,254 @@
+#include "AudioParamParserPriv.h"
+
+#ifdef WIN32
+#include <windows.h>
+#include <io.h>
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement C++ & windows related APIs
+ */
+
+#include <iostream>
+#include <fstream>
+#include <fcntl.h>
+#include <stdio.h>
+
+#ifndef _USE_OLD_IOSTREAMS
+using namespace std;
+#endif
+#else /* !WIN32 */
+#include <inttypes.h>
+
+#if !defined(SYS_IMPL)
+#if !defined(MTK_YOCTO_AUDIO)
+#include "AudioCustParam.h"
+#endif
+#else
+#include <binder/ProcessState.h>
+#include <media/AudioSystem.h>
+#endif
+
+using namespace android;
+#endif
+
+
+#ifndef WIN32
+#if defined(SYS_IMPL)
+#include <android/hardware/audio/4.0/IDevicesFactory.h>
+#include <android/hardware/audio/4.0/IDevice.h>
+#include <vendor/mediatek/hardware/audio/4.1/IMTKPrimaryDevice.h>
+#include <vendor/mediatek/hardware/audio/4.1/IAudioParameterChangedCallback.h>
+#include "MTKPrimaryDevicesHalClientInterface.h"
+
+
+using ::android::hardware::audio::V4_0::IDevicesFactory;
+using ::android::hardware::audio::V4_0::IDevice;
+using ::android::hardware::audio::V4_0::Result;
+using ::android::hardware::hidl_death_recipient;
+using ::android::hardware::hidl_string;
+using ::android::hardware::Return;
+using ::android::hidl::base::V1_0::IBase;
+using ::vendor::mediatek::hardware::audio::V4_1::IAudioParameterChangedCallback;
+using ::vendor::mediatek::hardware::audio::V4_1::IMTKPrimaryDevice;
+
+
+/*
+ * Class declaration
+ */
+class AudioHalDeathRecipient : public hidl_death_recipient {
+public:
+ AudioHalDeathRecipient(void) {}
+ void serviceDied(uint64_t cookie, const wp<::android::hidl::base::V1_0::IBase> & /*who*/) override {
+#if 1
+ ERR_LOG("%s() AudioServer die... exit!(cookie = %" PRIu64 ")", __FUNCTION__, cookie);
+ exit(1);
+#else
+ /* Re-connect to server */
+ registerAudioParameterChangedCallback(appOpsGetInstance()->appHandleGetInstance());
+#endif
+ }
+};
+
+class AudioParameterChangedCallback : public IAudioParameterChangedCallback {
+ Return<void> audioParameterChangedCallback(const hidl_string &audioTypeName) override {
+ INFO_LOG("%s() got callback! (audioType: %s)", __FUNCTION__, audioTypeName.c_str());
+ AudioType* audioType = appHandleGetAudioTypeByName(appHandleGetInstance(), audioTypeName.c_str());
+ if (audioType) {
+ audioType->allowReload = 1;
+ }
+
+ /* Notify all callback function */
+ appHandleNotifyAllCallbacks(appHandleGetInstance(), audioTypeName.c_str());
+
+ return ::android::hardware::Void();
+ }
+};
+
+
+/*
+ * Global variable
+ */
+const sp<IDevice> *gDevice;
+sp<AudioHalDeathRecipient> gDeathRecipient;
+Result gRetval = Result::NOT_INITIALIZED;
+
+
+EXPORT APP_STATUS registerAudioParameterChangedCallback(AppHandle *appHandle) {
+ /* Get IDevicesFactory */
+ sp<IDevicesFactory> devicesFactory = IDevicesFactory::getService();
+ if (devicesFactory == 0) {
+ ALOGE("Failed to obtain IDevicesFactory service, terminating process.");
+ exit(1);
+ }
+
+ /* Open Device */
+ Return<void> ret = devicesFactory->openDevice(
+ "primary",
+ [&](Result r, const sp<IDevice> &result) {
+ gRetval = r;
+ if (gRetval == Result::OK) {
+ gDevice = new sp<IDevice>(result);
+ }
+ });
+
+ if (!ret.isOk() || gRetval != Result::OK) {
+ ERR_LOG("%s(), Load audio interface fail, (ret: %d, Result: %d)", __FUNCTION__, ret.isOk(), gRetval == Result::OK);
+ return APP_ERROR;
+ }
+ INFO_LOG("%s() audio interface loaded, dev %p", __FUNCTION__, gDevice->get());
+
+ /* Register AudioParameterChangedCallback */
+ sp<IAudioParameterChangedCallback> callback = new AudioParameterChangedCallback();
+ sp<IMTKPrimaryDevice> mtkPrimaryDev = IMTKPrimaryDevice::castFrom(*gDevice);
+ Return<Result> result = mtkPrimaryDev->setAudioParameterChangedCallback(callback);
+
+ if (!result.isOk()) {
+ ERR_LOG("setAudioParameterChangedCallback return fail!");
+ return APP_ERROR;
+ }
+
+ /* Link to death */
+ gDeathRecipient = new AudioHalDeathRecipient();
+ devicesFactory->linkToDeath(gDeathRecipient, 123456);
+ INFO_LOG("%s() linkToDeath success", __FUNCTION__);
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS unregisterAudioParameterChangedCallback(AppHandle *appHandle) {
+ INFO_LOG("%s()", __FUNCTION__);
+
+ /* Clear callback first */
+ sp<IMTKPrimaryDevice> mtkPrimaryDev = IMTKPrimaryDevice::castFrom(*gDevice);
+ mtkPrimaryDev->clearAudioParameterChangedCallback();
+
+ /* unlinkToDeath */
+ sp<IDevicesFactory> devicesFactory = IDevicesFactory::getService();
+ devicesFactory->unlinkToDeath(gDeathRecipient);
+
+ gDevice = NULL;
+
+ return APP_NO_ERROR;
+}
+
+#endif
+
+#if defined(SYS_IMPL)
+void initProcessState() {
+ static int processStateInited = 0;
+
+ /* Init ProcessState, */
+ if (!processStateInited) {
+ ProcessState::self()->startThreadPool();
+ sp<ProcessState> proc(ProcessState::self());
+ processStateInited = 1;
+ }
+}
+#endif
+
+EXPORT int isCustXmlEnable(void) {
+#if !defined(APP_FORCE_ENABLE_CUS_XML) && !defined(CONFIG_MT_ENG_BUILD)
+ int res = 0;
+#if !defined(SYS_IMPL)
+ /* Only vnd AudioParamParser can query NVRam */
+ AUDIO_CUSTOM_AUDIO_FUNC_SWITCH_PARAM_STRUCT eParaAudioFuncSwitch;
+ res = GetAudioFuncSwitchParamFromNV(&eParaAudioFuncSwitch);
+ if (res) {
+ INFO_LOG("%s(), Not eng load, Get cust xml enabled from NVRam: GET_CUST_XML_ENABLE=%d\n", __FUNCTION__, (eParaAudioFuncSwitch.cust_xml_enable == 1));
+ return (eParaAudioFuncSwitch.cust_xml_enable == 1);
+ } else
+#endif
+ {
+ /* If process cannot get parameter due to permission issue, using AudioSystem API instead */
+ ALOGW("%s(), Query nvram fail! don't enable cust XML", __FUNCTION__);
+ return 0;
+ }
+#else
+ INFO_LOG("%s(), always return 1\n", __FUNCTION__);
+ return 1;
+#endif
+}
+
+EXPORT char *audioSystemGetParameters(const char *str) {
+#if defined(SYS_IMPL)
+ String8 res;
+ const char* ret = NULL;
+ initProcessState();
+ res = AudioSystem::getParameters(0, String8(str));
+ ret = res.string() + strlen(str) + 1;
+ return strdup(ret);
+#else
+ return strdup("");
+#endif
+}
+
+EXPORT void audioSystemSetParameters(const char *str) {
+#if defined(SYS_IMPL)
+ initProcessState();
+ AudioSystem::setParameters(0, String8(str));
+#endif
+}
+#else /* WIN32 */
+
+/* For Tuning Tool show the debug message */
+EXPORT void redirectIOToConsole() {
+ CONSOLE_SCREEN_BUFFER_INFO consoleScreenBufferHandle;
+ AllocConsole();
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &consoleScreenBufferHandle);
+ consoleScreenBufferHandle.dwSize.Y = 600;
+ SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), consoleScreenBufferHandle.dwSize);
+
+ long stdHandle = (long) GetStdHandle(STD_INPUT_HANDLE);
+ int osfHandle = _open_osfhandle(stdHandle, _O_TEXT);
+ FILE *fp = _fdopen(osfHandle, "r");
+ *stdin = *fp;
+ setvbuf(stdin, NULL, _IONBF, 0);
+
+ stdHandle = (long) GetStdHandle(STD_OUTPUT_HANDLE);
+ osfHandle = _open_osfhandle(stdHandle, _O_TEXT);
+ fp = _fdopen(osfHandle, "w");
+ *stdout = *fp;
+ setvbuf(stdout, NULL, _IONBF, 0);
+
+ stdHandle = (long) GetStdHandle(STD_ERROR_HANDLE);
+ osfHandle = _open_osfhandle(stdHandle, _O_TEXT);
+ fp = _fdopen(osfHandle, "w");
+ *stderr = *fp;
+ setvbuf(stderr, NULL, _IONBF, 0);
+
+ ios::sync_with_stdio();
+
+}
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/DOCBparser.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/DOCBparser.h
new file mode 100644
index 0000000..9394fa7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/DOCBparser.h
@@ -0,0 +1,96 @@
+/*
+ * Summary: old DocBook SGML parser
+ * Description: interface for a DocBook SGML non-verifying parser
+ * This code is DEPRECATED, and should not be used anymore.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DOCB_PARSER_H__
+#define __DOCB_PARSER_H__
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_DOCB_ENABLED
+
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+
+#ifndef IN_LIBXML
+#ifdef __GNUC__
+#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Most of the back-end structures from XML and SGML are shared.
+ */
+typedef xmlParserCtxt docbParserCtxt;
+typedef xmlParserCtxtPtr docbParserCtxtPtr;
+typedef xmlSAXHandler docbSAXHandler;
+typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
+typedef xmlParserInput docbParserInput;
+typedef xmlParserInputPtr docbParserInputPtr;
+typedef xmlDocPtr docbDocPtr;
+
+/*
+ * There is only few public functions.
+ */
+XMLPUBFUN int XMLCALL
+ docbEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+
+XMLPUBFUN docbDocPtr XMLCALL
+ docbSAXParseDoc (xmlChar *cur,
+ const char *encoding,
+ docbSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbParseDoc (xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbSAXParseFile (const char *filename,
+ const char *encoding,
+ docbSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbParseFile (const char *filename,
+ const char *encoding);
+
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN void XMLCALL
+ docbFreeParserCtxt (docbParserCtxtPtr ctxt);
+XMLPUBFUN docbParserCtxtPtr XMLCALL
+ docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ docbParseChunk (docbParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+XMLPUBFUN docbParserCtxtPtr XMLCALL
+ docbCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ docbParseDocument (docbParserCtxtPtr ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DOCB_ENABLED */
+
+#endif /* __DOCB_PARSER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/HTMLparser.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/HTMLparser.h
new file mode 100644
index 0000000..625969d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/HTMLparser.h
@@ -0,0 +1,305 @@
+/*
+ * Summary: interface for an HTML 4.0 non-verifying parser
+ * Description: this module implements an HTML 4.0 non-verifying parser
+ * with API compatible with the XML parser ones. It should
+ * be able to parse "real world" HTML, even if severely
+ * broken from a specification point of view.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_PARSER_H__
+#define __HTML_PARSER_H__
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Most of the back-end structures from XML and HTML are shared.
+ */
+typedef xmlParserCtxt htmlParserCtxt;
+typedef xmlParserCtxtPtr htmlParserCtxtPtr;
+typedef xmlParserNodeInfo htmlParserNodeInfo;
+typedef xmlSAXHandler htmlSAXHandler;
+typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
+typedef xmlParserInput htmlParserInput;
+typedef xmlParserInputPtr htmlParserInputPtr;
+typedef xmlDocPtr htmlDocPtr;
+typedef xmlNodePtr htmlNodePtr;
+
+/*
+ * Internal description of an HTML element, representing HTML 4.01
+ * and XHTML 1.0 (which share the same structure).
+ */
+typedef struct _htmlElemDesc htmlElemDesc;
+typedef htmlElemDesc *htmlElemDescPtr;
+struct _htmlElemDesc {
+ const char *name; /* The tag name */
+ char startTag; /* Whether the start tag can be implied */
+ char endTag; /* Whether the end tag can be implied */
+ char saveEndTag; /* Whether the end tag should be saved */
+ char empty; /* Is this an empty element ? */
+ char depr; /* Is this a deprecated element ? */
+ char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
+ char isinline; /* is this a block 0 or inline 1 element */
+ const char *desc; /* the description */
+
+/* NRK Jan.2003
+ * New fields encapsulating HTML structure
+ *
+ * Bugs:
+ * This is a very limited representation. It fails to tell us when
+ * an element *requires* subelements (we only have whether they're
+ * allowed or not), and it doesn't tell us where CDATA and PCDATA
+ * are allowed. Some element relationships are not fully represented:
+ * these are flagged with the word MODIFIER
+ */
+ const char** subelts; /* allowed sub-elements of this element */
+ const char* defaultsubelt; /* subelement for suggested auto-repair
+ if necessary or NULL */
+ const char** attrs_opt; /* Optional Attributes */
+ const char** attrs_depr; /* Additional deprecated attributes */
+ const char** attrs_req; /* Required attributes */
+};
+
+/*
+ * Internal description of an HTML entity.
+ */
+typedef struct _htmlEntityDesc htmlEntityDesc;
+typedef htmlEntityDesc *htmlEntityDescPtr;
+struct _htmlEntityDesc {
+ unsigned int value; /* the UNICODE value for the character */
+ const char *name; /* The entity name */
+ const char *desc; /* the description */
+};
+
+/*
+ * There is only few public functions.
+ */
+XMLPUBFUN const htmlElemDesc * XMLCALL
+ htmlTagLookup (const xmlChar *tag);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlEntityLookup(const xmlChar *name);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlEntityValueLookup(unsigned int value);
+
+XMLPUBFUN int XMLCALL
+ htmlIsAutoClosed(htmlDocPtr doc,
+ htmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ htmlAutoCloseTag(htmlDocPtr doc,
+ const xmlChar *name,
+ htmlNodePtr elem);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlParseEntityRef(htmlParserCtxtPtr ctxt,
+ const xmlChar **str);
+XMLPUBFUN int XMLCALL
+ htmlParseCharRef(htmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ htmlParseElement(htmlParserCtxtPtr ctxt);
+
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlNewParserCtxt(void);
+
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+
+XMLPUBFUN int XMLCALL
+ htmlParseDocument(htmlParserCtxtPtr ctxt);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlSAXParseDoc (xmlChar *cur,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlParseDoc (xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlSAXParseFile(const char *filename,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlParseFile (const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ UTF8ToHtml (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+XMLPUBFUN int XMLCALL
+ htmlEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+XMLPUBFUN int XMLCALL
+ htmlIsScriptAttribute(const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ htmlHandleOmittedElem(int val);
+
+#ifdef LIBXML_PUSH_ENABLED
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ htmlParseChunk (htmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+XMLPUBFUN void XMLCALL
+ htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
+ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
+ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
+ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ HTML_PARSE_NONET = 1<<11,/* Forbid network access */
+ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
+ HTML_PARSE_COMPACT = 1<<16 /* compact small text nodes */
+} htmlParserOption;
+
+XMLPUBFUN void XMLCALL
+ htmlCtxtReset (htmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/* NRK/Jan2003: further knowledge of HTML structure
+ */
+typedef enum {
+ HTML_NA = 0 , /* something we don't check at all */
+ HTML_INVALID = 0x1 ,
+ HTML_DEPRECATED = 0x2 ,
+ HTML_VALID = 0x4 ,
+ HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
+} htmlStatus ;
+
+/* Using htmlElemDesc rather than name here, to emphasise the fact
+ that otherwise there's a lookup overhead
+*/
+XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
+XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
+XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
+XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
+/**
+ * htmlDefaultSubelement:
+ * @elt: HTML element
+ *
+ * Returns the default subelement for this element
+ */
+#define htmlDefaultSubelement(elt) elt->defaultsubelt
+/**
+ * htmlElementAllowedHereDesc:
+ * @parent: HTML parent element
+ * @elt: HTML element
+ *
+ * Checks whether an HTML element description may be a
+ * direct child of the specified element.
+ *
+ * Returns 1 if allowed; 0 otherwise.
+ */
+#define htmlElementAllowedHereDesc(parent,elt) \
+ htmlElementAllowedHere((parent), (elt)->name)
+/**
+ * htmlRequiredAttrs:
+ * @elt: HTML element
+ *
+ * Returns the attributes required for the specified element.
+ */
+#define htmlRequiredAttrs(elt) (elt)->attrs_req
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+#endif /* __HTML_PARSER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/HTMLtree.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/HTMLtree.h
new file mode 100644
index 0000000..c0e1103
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/HTMLtree.h
@@ -0,0 +1,147 @@
+/*
+ * Summary: specific APIs to process HTML tree, especially serialization
+ * Description: this module implements a few function needed to process
+ * tree in an HTML specific way.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_TREE_H__
+#define __HTML_TREE_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/HTMLparser.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * HTML_TEXT_NODE:
+ *
+ * Macro. A text node in a HTML document is really implemented
+ * the same way as a text node in an XML document.
+ */
+#define HTML_TEXT_NODE XML_TEXT_NODE
+/**
+ * HTML_ENTITY_REF_NODE:
+ *
+ * Macro. An entity reference in a HTML document is really implemented
+ * the same way as an entity reference in an XML document.
+ */
+#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
+/**
+ * HTML_COMMENT_NODE:
+ *
+ * Macro. A comment in a HTML document is really implemented
+ * the same way as a comment in an XML document.
+ */
+#define HTML_COMMENT_NODE XML_COMMENT_NODE
+/**
+ * HTML_PRESERVE_NODE:
+ *
+ * Macro. A preserved node in a HTML document is really implemented
+ * the same way as a CDATA section in an XML document.
+ */
+#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
+/**
+ * HTML_PI_NODE:
+ *
+ * Macro. A processing instruction in a HTML document is really implemented
+ * the same way as a processing instruction in an XML document.
+ */
+#define HTML_PI_NODE XML_PI_NODE
+
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlNewDoc (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlNewDocNoDtD (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN const xmlChar * XMLCALL
+ htmlGetMetaEncoding (htmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ htmlSetMetaEncoding (htmlDocPtr doc,
+ const xmlChar *encoding);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ htmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void XMLCALL
+ htmlDocDumpMemoryFormat (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN int XMLCALL
+ htmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ htmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ htmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpFile (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ htmlNodeDumpFileFormat (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN int XMLCALL
+ htmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ htmlSaveFileFormat (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN void XMLCALL
+ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ htmlIsBooleanAttr (const xmlChar *name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#endif /* __HTML_TREE_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/SAX.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/SAX.h
new file mode 100644
index 0000000..20093ce
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/SAX.h
@@ -0,0 +1,173 @@
+/*
+ * Summary: Old SAX version 1 handler, deprecated
+ * Description: DEPRECATED set of SAX version 1 interfaces used to
+ * build the DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX_H__
+#define __XML_SAX_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xlink.h>
+
+#ifdef LIBXML_LEGACY_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ getPublicId (void *ctx);
+XMLPUBFUN const xmlChar * XMLCALL
+ getSystemId (void *ctx);
+XMLPUBFUN void XMLCALL
+ setDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int XMLCALL
+ getLineNumber (void *ctx);
+XMLPUBFUN int XMLCALL
+ getColumnNumber (void *ctx);
+
+XMLPUBFUN int XMLCALL
+ isStandalone (void *ctx);
+XMLPUBFUN int XMLCALL
+ hasInternalSubset (void *ctx);
+XMLPUBFUN int XMLCALL
+ hasExternalSubset (void *ctx);
+
+XMLPUBFUN void XMLCALL
+ internalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void XMLCALL
+ externalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ getEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ getParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ resolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void XMLCALL
+ entityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void XMLCALL
+ attributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void XMLCALL
+ elementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ notationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void XMLCALL
+ unparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void XMLCALL
+ startDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ endDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ attribute (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ startElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XMLPUBFUN void XMLCALL
+ endElement (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ ignorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ processingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void XMLCALL
+ globalNamespace (void *ctx,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ setNamespace (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlNsPtr XMLCALL
+ getNamespace (void *ctx);
+XMLPUBFUN int XMLCALL
+ checkNamespace (void *ctx,
+ xmlChar *nameSpace);
+XMLPUBFUN void XMLCALL
+ namespaceDecl (void *ctx,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ cdataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN void XMLCALL
+ initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void XMLCALL
+ inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN void XMLCALL
+ initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
+#endif
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#endif /* __XML_SAX_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/SAX2.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/SAX2.h
new file mode 100644
index 0000000..daafd17
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/SAX2.h
@@ -0,0 +1,176 @@
+/*
+ * Summary: SAX2 parser interface used to build the DOM tree
+ * Description: those are the default SAX2 interfaces used by
+ * the library when building DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX2_H__
+#define __XML_SAX2_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xlink.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSAX2GetPublicId (void *ctx);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSAX2GetSystemId (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSAX2SetDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int XMLCALL
+ xmlSAX2GetLineNumber (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2GetColumnNumber (void *ctx);
+
+XMLPUBFUN int XMLCALL
+ xmlSAX2IsStandalone (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2HasInternalSubset (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2HasExternalSubset (void *ctx);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2InternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ExternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlSAX2GetEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlSAX2GetParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlSAX2ResolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2EntityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void XMLCALL
+ xmlSAX2AttributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ElementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlSAX2NotationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void XMLCALL
+ xmlSAX2UnparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndDocument (void *ctx);
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndElement (void *ctx,
+ const xmlChar *name);
+#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlSAX2IgnorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ProcessingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlSAX2CDataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlSAXDefaultVersion (int version);
+#endif /* LIBXML_SAX1_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ xmlSAXVersion (xmlSAXHandler *hdlr,
+ int version);
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
+XMLPUBFUN void XMLCALL
+ htmlDefaultSAXHandlerInit (void);
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
+XMLPUBFUN void XMLCALL
+ docbDefaultSAXHandlerInit (void);
+#endif
+XMLPUBFUN void XMLCALL
+ xmlDefaultSAXHandlerInit (void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_SAX2_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/c14n.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/c14n.h
new file mode 100644
index 0000000..b8971d9
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/c14n.h
@@ -0,0 +1,126 @@
+/*
+ * Summary: Provide Canonical XML and Exclusive XML Canonicalization
+ * Description: the c14n modules provides a
+ *
+ * "Canonical XML" implementation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * and an
+ *
+ * "Exclusive XML Canonicalization" implementation
+ * http://www.w3.org/TR/xml-exc-c14n
+
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XML_C14N_H__
+#define __XML_C14N_H__
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+/*
+ * XML Canonicazation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * Exclusive XML Canonicazation
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * Canonical form of an XML document could be created if and only if
+ * a) default attributes (if any) are added to all nodes
+ * b) all character and parsed entity references are resolved
+ * In order to achive this in libxml2 the document MUST be loaded with
+ * following global setings:
+ *
+ * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ * xmlSubstituteEntitiesDefault(1);
+ *
+ * or corresponding parser context setting:
+ * xmlParserCtxtPtr ctxt;
+ *
+ * ...
+ * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ * ctxt->replaceEntities = 1;
+ * ...
+ */
+
+/*
+ * xmlC14NMode:
+ *
+ * Predefined values for C14N modes
+ *
+ */
+typedef enum {
+ XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
+} xmlC14NMode;
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocSaveTo (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlChar **doc_txt_ptr);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocSave (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ const char* filename,
+ int compression);
+
+
+/**
+ * This is the core C14N function
+ */
+/**
+ * xmlC14NIsVisibleCallback:
+ * @user_data: user data
+ * @node: the curent node
+ * @parent: the parent node
+ *
+ * Signature for a C14N callback on visible nodes
+ *
+ * Returns 1 if the node should be included
+ */
+typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
+ xmlNodePtr node,
+ xmlNodePtr parent);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NExecute (xmlDocPtr doc,
+ xmlC14NIsVisibleCallback is_visible_callback,
+ void* user_data,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* LIBXML_C14N_ENABLED */
+#endif /* __XML_C14N_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/catalog.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/catalog.h
new file mode 100644
index 0000000..5a13f51
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/catalog.h
@@ -0,0 +1,182 @@
+/**
+ * Summary: interfaces to the Catalog handling system
+ * Description: the catalog module implements the support for
+ * XML Catalogs and SGML catalogs
+ *
+ * SGML Open Technical Resolution TR9401:1997.
+ * http://www.jclark.com/sp/catalog.htm
+ *
+ * XML Catalogs Working Draft 06 August 2001
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CATALOG_H__
+#define __XML_CATALOG_H__
+
+#include <stdio.h>
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_CATALOG_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_CATALOGS_NAMESPACE:
+ *
+ * The namespace for the XML Catalogs elements.
+ */
+#define XML_CATALOGS_NAMESPACE \
+ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
+/**
+ * XML_CATALOG_PI:
+ *
+ * The specific XML Catalog Processing Instuction name.
+ */
+#define XML_CATALOG_PI \
+ (const xmlChar *) "oasis-xml-catalog"
+
+/*
+ * The API is voluntarily limited to general cataloging.
+ */
+typedef enum {
+ XML_CATA_PREFER_NONE = 0,
+ XML_CATA_PREFER_PUBLIC = 1,
+ XML_CATA_PREFER_SYSTEM
+} xmlCatalogPrefer;
+
+typedef enum {
+ XML_CATA_ALLOW_NONE = 0,
+ XML_CATA_ALLOW_GLOBAL = 1,
+ XML_CATA_ALLOW_DOCUMENT = 2,
+ XML_CATA_ALLOW_ALL = 3
+} xmlCatalogAllow;
+
+typedef struct _xmlCatalog xmlCatalog;
+typedef xmlCatalog *xmlCatalogPtr;
+
+/*
+ * Operations on a given catalog.
+ */
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlNewCatalog (int sgml);
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlLoadACatalog (const char *filename);
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlLoadSGMLSuperCatalog (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlConvertSGMLCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int XMLCALL
+ xmlACatalogAdd (xmlCatalogPtr catal,
+ const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int XMLCALL
+ xmlACatalogRemove (xmlCatalogPtr catal,
+ const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolve (xmlCatalogPtr catal,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolveSystem(xmlCatalogPtr catal,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolvePublic(xmlCatalogPtr catal,
+ const xmlChar *pubID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolveURI (xmlCatalogPtr catal,
+ const xmlChar *URI);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlACatalogDump (xmlCatalogPtr catal,
+ FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int XMLCALL
+ xmlCatalogIsEmpty (xmlCatalogPtr catal);
+
+/*
+ * Global operations.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitializeCatalog (void);
+XMLPUBFUN int XMLCALL
+ xmlLoadCatalog (const char *filename);
+XMLPUBFUN void XMLCALL
+ xmlLoadCatalogs (const char *paths);
+XMLPUBFUN void XMLCALL
+ xmlCatalogCleanup (void);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlCatalogDump (FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolve (const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolveSystem (const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolvePublic (const xmlChar *pubID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolveURI (const xmlChar *URI);
+XMLPUBFUN int XMLCALL
+ xmlCatalogAdd (const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int XMLCALL
+ xmlCatalogRemove (const xmlChar *value);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseCatalogFile (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlCatalogConvert (void);
+
+/*
+ * Strictly minimal interfaces for per-document catalogs used
+ * by the parser.
+ */
+XMLPUBFUN void XMLCALL
+ xmlCatalogFreeLocal (void *catalogs);
+XMLPUBFUN void * XMLCALL
+ xmlCatalogAddLocal (void *catalogs,
+ const xmlChar *URL);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogLocalResolve (void *catalogs,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogLocalResolveURI(void *catalogs,
+ const xmlChar *URI);
+/*
+ * Preference settings.
+ */
+XMLPUBFUN int XMLCALL
+ xmlCatalogSetDebug (int level);
+XMLPUBFUN xmlCatalogPrefer XMLCALL
+ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
+XMLPUBFUN void XMLCALL
+ xmlCatalogSetDefaults (xmlCatalogAllow allow);
+XMLPUBFUN xmlCatalogAllow XMLCALL
+ xmlCatalogGetDefaults (void);
+
+
+/* DEPRECATED interfaces */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlCatalogGetSystem (const xmlChar *sysID);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlCatalogGetPublic (const xmlChar *pubID);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_CATALOG_ENABLED */
+#endif /* __XML_CATALOG_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/chvalid.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/chvalid.h
new file mode 100644
index 0000000..fb43016
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/chvalid.h
@@ -0,0 +1,230 @@
+/*
+ * Summary: Unicode character range checking
+ * Description: this module exports interfaces for the character
+ * range validation APIs
+ *
+ * This file is automatically generated from the cvs source
+ * definition files using the genChRanges.py Python script
+ *
+ * Generation date: Mon Mar 27 11:09:48 2006
+ * Sources: chvalid.def
+ * Author: William Brack <wbrack@mmm.com.hk>
+ */
+
+#ifndef __XML_CHVALID_H__
+#define __XML_CHVALID_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Define our typedefs and structures
+ *
+ */
+typedef struct _xmlChSRange xmlChSRange;
+typedef xmlChSRange *xmlChSRangePtr;
+struct _xmlChSRange {
+ unsigned short low;
+ unsigned short high;
+};
+
+typedef struct _xmlChLRange xmlChLRange;
+typedef xmlChLRange *xmlChLRangePtr;
+struct _xmlChLRange {
+ unsigned int low;
+ unsigned int high;
+};
+
+typedef struct _xmlChRangeGroup xmlChRangeGroup;
+typedef xmlChRangeGroup *xmlChRangeGroupPtr;
+struct _xmlChRangeGroup {
+ int nbShortRange;
+ int nbLongRange;
+ const xmlChSRange *shortRange; /* points to an array of ranges */
+ const xmlChLRange *longRange;
+};
+
+/**
+ * Range checking routine
+ */
+XMLPUBFUN int XMLCALL
+ xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
+
+
+/**
+ * xmlIsBaseChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)) || \
+ ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
+ ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
+ (0xf8 <= (c)))
+
+/**
+ * xmlIsBaseCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
+ xmlIsBaseChar_ch((c)) : \
+ xmlCharInRange((c), &xmlIsBaseCharGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
+
+/**
+ * xmlIsBlank_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlank_ch(c) (((c) == 0x20) || \
+ ((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd))
+
+/**
+ * xmlIsBlankQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlankQ(c) (((c) < 0x100) ? \
+ xmlIsBlank_ch((c)) : 0)
+
+
+/**
+ * xmlIsChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd) || \
+ (0x20 <= (c)))
+
+/**
+ * xmlIsCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCharQ(c) (((c) < 0x100) ? \
+ xmlIsChar_ch((c)) :\
+ (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
+ ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
+ ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
+
+/**
+ * xmlIsCombiningQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
+ 0 : \
+ xmlCharInRange((c), &xmlIsCombiningGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
+
+/**
+ * xmlIsDigit_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
+
+/**
+ * xmlIsDigitQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigitQ(c) (((c) < 0x100) ? \
+ xmlIsDigit_ch((c)) : \
+ xmlCharInRange((c), &xmlIsDigitGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
+
+/**
+ * xmlIsExtender_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtender_ch(c) (((c) == 0xb7))
+
+/**
+ * xmlIsExtenderQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
+ xmlIsExtender_ch((c)) : \
+ xmlCharInRange((c), &xmlIsExtenderGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
+
+/**
+ * xmlIsIdeographicQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
+ 0 :\
+ (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
+ ((c) == 0x3007) || \
+ ((0x3021 <= (c)) && ((c) <= 0x3029))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
+XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
+
+/**
+ * xmlIsPubidChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
+
+/**
+ * xmlIsPubidCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
+ xmlIsPubidChar_ch((c)) : 0)
+
+XMLPUBFUN int XMLCALL
+ xmlIsBaseChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsBlank(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsCombining(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsDigit(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsExtender(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsIdeographic(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsPubidChar(unsigned int ch);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_CHVALID_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/debugXML.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/debugXML.h
new file mode 100644
index 0000000..2377447
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/debugXML.h
@@ -0,0 +1,217 @@
+/*
+ * Summary: Tree debugging APIs
+ * Description: Interfaces to a set of routines used for debugging the tree
+ * produced by the XML parser.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DEBUG_XML__
+#define __DEBUG_XML__
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_DEBUG_ENABLED
+
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The standard Dump routines.
+ */
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpString (FILE *output,
+ const xmlChar *str);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpAttr (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpAttrList (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpOneNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpNodeList (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDocumentHead(FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDocument (FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDTD (FILE *output,
+ xmlDtdPtr dtd);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpEntities (FILE *output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * Checking routines *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN int XMLCALL
+ xmlDebugCheckDocument (FILE * output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * XML shell helpers *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN void XMLCALL
+ xmlLsOneNode (FILE *output, xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlLsCountNode (xmlNodePtr node);
+
+XMLPUBFUN const char * XMLCALL
+ xmlBoolToText (int boolval);
+
+/****************************************************************
+ * *
+ * The XML shell related structures and functions *
+ * *
+ ****************************************************************/
+
+#ifdef LIBXML_XPATH_ENABLED
+/**
+ * xmlShellReadlineFunc:
+ * @prompt: a string prompt
+ *
+ * This is a generic signature for the XML shell input function.
+ *
+ * Returns a string which will be freed by the Shell.
+ */
+typedef char * (* xmlShellReadlineFunc)(char *prompt);
+
+/**
+ * xmlShellCtxt:
+ *
+ * A debugging shell context.
+ * TODO: add the defined function tables.
+ */
+typedef struct _xmlShellCtxt xmlShellCtxt;
+typedef xmlShellCtxt *xmlShellCtxtPtr;
+struct _xmlShellCtxt {
+ char *filename;
+ xmlDocPtr doc;
+ xmlNodePtr node;
+ xmlXPathContextPtr pctxt;
+ int loaded;
+ FILE *output;
+ xmlShellReadlineFunc input;
+};
+
+/**
+ * xmlShellCmd:
+ * @ctxt: a shell context
+ * @arg: a string argument
+ * @node: a first node
+ * @node2: a second node
+ *
+ * This is a generic signature for the XML shell functions.
+ *
+ * Returns an int, negative returns indicating errors.
+ */
+typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+
+XMLPUBFUN void XMLCALL
+ xmlShellPrintXPathError (int errorType,
+ const char *arg);
+XMLPUBFUN void XMLCALL
+ xmlShellPrintXPathResult(xmlXPathObjectPtr list);
+XMLPUBFUN int XMLCALL
+ xmlShellList (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellBase (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellDir (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellLoad (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlShellPrintNode (xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlShellCat (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellWrite (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellSave (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlShellValidate (xmlShellCtxtPtr ctxt,
+ char *dtd,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#endif /* LIBXML_VALID_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlShellDu (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr tree,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellPwd (xmlShellCtxtPtr ctxt,
+ char *buffer,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+
+/*
+ * The Shell interface.
+ */
+XMLPUBFUN void XMLCALL
+ xmlShell (xmlDocPtr doc,
+ char *filename,
+ xmlShellReadlineFunc input,
+ FILE *output);
+
+#endif /* LIBXML_XPATH_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DEBUG_ENABLED */
+#endif /* __DEBUG_XML__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/dict.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/dict.h
new file mode 100644
index 0000000..492d65a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/dict.h
@@ -0,0 +1,69 @@
+/*
+ * Summary: string dictionnary
+ * Description: dictionary of reusable strings, just used to avoid allocation
+ * and freeing operations.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_DICT_H__
+#define __XML_DICT_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The dictionnary.
+ */
+typedef struct _xmlDict xmlDict;
+typedef xmlDict *xmlDictPtr;
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreate (void);
+XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreateSub(xmlDictPtr sub);
+XMLPUBFUN int XMLCALL
+ xmlDictReference(xmlDictPtr dict);
+XMLPUBFUN void XMLCALL
+ xmlDictFree (xmlDictPtr dict);
+
+/*
+ * Lookup of entry in the dictionnary.
+ */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictLookup (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictExists (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictQLookup (xmlDictPtr dict,
+ const xmlChar *prefix,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlDictOwns (xmlDictPtr dict,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlDictSize (xmlDictPtr dict);
+
+/*
+ * Cleanup function
+ */
+XMLPUBFUN void XMLCALL
+ xmlDictCleanup (void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_DICT_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/encoding.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/encoding.h
new file mode 100644
index 0000000..dbb3d66
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/encoding.h
@@ -0,0 +1,240 @@
+/*
+ * Summary: interface for the encoding conversion functions
+ * Description: interface for the encoding conversion functions needed for
+ * XML basic encoding and iconv() support.
+ *
+ * Related specs are
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
+ * [ISO-8859-1] ISO Latin-1 characters codes.
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
+ * Worldwide Character Encoding -- Version 1.0", Addison-
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
+ * described in Unicode Technical Report #4.
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
+ * Information Interchange, ANSI X3.4-1986.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CHAR_ENCODING_H__
+#define __XML_CHAR_ENCODING_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_ICONV_ENABLED
+#include <iconv.h>
+#endif
+#ifdef LIBXML_ICU_ENABLED
+#include <unicode/ucnv.h>
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlCharEncoding:
+ *
+ * Predefined values for some standard encodings.
+ * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
+ * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
+ *
+ * Anything else would have to be translated to UTF8 before being
+ * given to the parser itself. The BOM for UTF16 and the encoding
+ * declaration are looked at and a converter is looked for at that
+ * point. If not found the parser stops here as asked by the XML REC. A
+ * converter can be registered by the user using xmlRegisterCharEncodingHandler
+ * but the current form doesn't allow stateful transcoding (a serious
+ * problem agreed !). If iconv has been found it will be used
+ * automatically and allow stateful transcoding, the simplest is then
+ * to be sure to enable iconv and to provide iconv libs for the encoding
+ * support needed.
+ *
+ * Note that the generic "UTF-16" is not a predefined value. Instead, only
+ * the specific UTF-16LE and UTF-16BE are present.
+ */
+typedef enum {
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
+ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
+} xmlCharEncoding;
+
+/**
+ * xmlCharEncodingInputFunc:
+ * @out: a pointer to an array of bytes to store the UTF-8 result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of chars in the original encoding
+ * @inlen: the length of @in
+ *
+ * Take a block of chars in the original encoding and try to convert
+ * it to an UTF-8 block of chars out.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/**
+ * xmlCharEncodingOutputFunc:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to another
+ * encoding.
+ * Note: a first call designed to produce heading info is called with
+ * in = NULL. If stateful this should also initialize the encoder state.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets produced.
+ */
+typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/*
+ * Block defining the handlers for non UTF-8 encodings.
+ * If iconv is supported, there are two extra fields.
+ */
+#ifdef LIBXML_ICU_ENABLED
+struct _uconv_t {
+ UConverter *uconv; /* for conversion between an encoding and UTF-16 */
+ UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */
+};
+typedef struct _uconv_t uconv_t;
+#endif
+
+typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
+typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
+struct _xmlCharEncodingHandler {
+ char *name;
+ xmlCharEncodingInputFunc input;
+ xmlCharEncodingOutputFunc output;
+#ifdef LIBXML_ICONV_ENABLED
+ iconv_t iconv_in;
+ iconv_t iconv_out;
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ uconv_t *uconv_in;
+ uconv_t *uconv_out;
+#endif /* LIBXML_ICU_ENABLED */
+};
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/tree.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Interfaces for encoding handlers.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitCharEncodingHandlers (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupCharEncodingHandlers (void);
+XMLPUBFUN void XMLCALL
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlFindCharEncodingHandler (const char *name);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlNewCharEncodingHandler (const char *name,
+ xmlCharEncodingInputFunc input,
+ xmlCharEncodingOutputFunc output);
+
+/*
+ * Interfaces for encoding names and aliases.
+ */
+XMLPUBFUN int XMLCALL
+ xmlAddEncodingAlias (const char *name,
+ const char *alias);
+XMLPUBFUN int XMLCALL
+ xmlDelEncodingAlias (const char *alias);
+XMLPUBFUN const char * XMLCALL
+ xmlGetEncodingAlias (const char *alias);
+XMLPUBFUN void XMLCALL
+ xmlCleanupEncodingAliases (void);
+XMLPUBFUN xmlCharEncoding XMLCALL
+ xmlParseCharEncoding (const char *name);
+XMLPUBFUN const char * XMLCALL
+ xmlGetCharEncodingName (xmlCharEncoding enc);
+
+/*
+ * Interfaces directly used by the parsers.
+ */
+XMLPUBFUN xmlCharEncoding XMLCALL
+ xmlDetectCharEncoding (const unsigned char *in,
+ int len);
+
+XMLPUBFUN int XMLCALL
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+
+XMLPUBFUN int XMLCALL
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+XMLPUBFUN int XMLCALL
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+XMLPUBFUN int XMLCALL
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
+
+/*
+ * Export a few useful functions
+ */
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int XMLCALL
+ UTF8Toisolat1 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int XMLCALL
+ isolat1ToUTF8 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_CHAR_ENCODING_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/entities.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/entities.h
new file mode 100644
index 0000000..cefb97f
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/entities.h
@@ -0,0 +1,150 @@
+/*
+ * Summary: interface for the XML entities handling
+ * Description: this module provides some of the entity API needed
+ * for the parser and applications.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_ENTITIES_H__
+#define __XML_ENTITIES_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The different valid entity types.
+ */
+typedef enum {
+ XML_INTERNAL_GENERAL_ENTITY = 1,
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
+ XML_INTERNAL_PARAMETER_ENTITY = 4,
+ XML_EXTERNAL_PARAMETER_ENTITY = 5,
+ XML_INTERNAL_PREDEFINED_ENTITY = 6
+} xmlEntityType;
+
+/*
+ * An unit of storage for an entity, contains the string, the value
+ * and the linkind data needed for the linking in the hash table.
+ */
+
+struct _xmlEntity {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
+ const xmlChar *name; /* Entity name */
+ struct _xmlNode *children; /* First child link */
+ struct _xmlNode *last; /* Last child link */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlChar *orig; /* content without ref substitution */
+ xmlChar *content; /* content or ndata if unparsed */
+ int length; /* the content length */
+ xmlEntityType etype; /* The entity type */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
+
+ struct _xmlEntity *nexte; /* unused */
+ const xmlChar *URI; /* the full URI as computed */
+ int owner; /* does the entity own the childrens */
+ int checked; /* was the entity content checked */
+ /* this is also used to count entites
+ * references done from that entity */
+};
+
+/*
+ * All entities are stored in an hash table.
+ * There is 2 separate hash tables for global and parameter entities.
+ */
+
+typedef struct _xmlHashTable xmlEntitiesTable;
+typedef xmlEntitiesTable *xmlEntitiesTablePtr;
+
+/*
+ * External functions:
+ */
+
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlInitializePredefinedEntities (void);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlNewEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlAddDocEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlAddDtdEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetPredefinedEntity (const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetDocEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetDtdEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetParameterEntity (xmlDocPtr doc,
+ const xmlChar *name);
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlEncodeEntities (xmlDocPtr doc,
+ const xmlChar *input);
+#endif /* LIBXML_LEGACY_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlEncodeEntitiesReentrant(xmlDocPtr doc,
+ const xmlChar *input);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlEncodeSpecialChars (xmlDocPtr doc,
+ const xmlChar *input);
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+ xmlCreateEntitiesTable (void);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+ xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpEntitiesTable (xmlBufferPtr buf,
+ xmlEntitiesTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpEntityDecl (xmlBufferPtr buf,
+ xmlEntityPtr ent);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlCleanupPredefinedEntities(void);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+# endif /* __XML_ENTITIES_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/globals.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/globals.h
new file mode 100644
index 0000000..9d688e0
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/globals.h
@@ -0,0 +1,502 @@
+/*
+ * Summary: interface for all global variables of the library
+ * Description: all the global variables and thread handling for
+ * those variables is handled by this module.
+ *
+ * The bottom of this file is automatically generated by build_glob.py
+ * based on the description file global.data
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard
+ */
+
+#ifndef __XML_GLOBALS_H
+#define __XML_GLOBALS_H
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xmlerror.h>
+#include <libxml/SAX.h>
+#include <libxml/SAX2.h>
+#include <libxml/xmlmemory.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void XMLCALL xmlInitGlobals(void);
+XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
+
+/**
+ * xmlParserInputBufferCreateFilenameFunc:
+ * @URI: the URI to read from
+ * @enc: the requested source encoding
+ *
+ * Signature for the function doing the lookup for a suitable input method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
+
+/**
+ * xmlOutputBufferCreateFilenameFunc:
+ * @URI: the URI to write to
+ * @enc: the requested target encoding
+ *
+ * Signature for the function doing the lookup for a suitable output method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
+XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
+XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
+
+/*
+ * Externally global symbols which need to be protected for backwards
+ * compatibility support.
+ */
+
+#undef docbDefaultSAXHandler
+#undef htmlDefaultSAXHandler
+#undef oldXMLWDcompatibility
+#undef xmlBufferAllocScheme
+#undef xmlDefaultBufferSize
+#undef xmlDefaultSAXHandler
+#undef xmlDefaultSAXLocator
+#undef xmlDoValidityCheckingDefaultValue
+#undef xmlFree
+#undef xmlGenericError
+#undef xmlStructuredError
+#undef xmlGenericErrorContext
+#undef xmlStructuredErrorContext
+#undef xmlGetWarningsDefaultValue
+#undef xmlIndentTreeOutput
+#undef xmlTreeIndentString
+#undef xmlKeepBlanksDefaultValue
+#undef xmlLineNumbersDefaultValue
+#undef xmlLoadExtDtdDefaultValue
+#undef xmlMalloc
+#undef xmlMallocAtomic
+#undef xmlMemStrdup
+#undef xmlParserDebugEntities
+#undef xmlParserVersion
+#undef xmlPedanticParserDefaultValue
+#undef xmlRealloc
+#undef xmlSaveNoEmptyTags
+#undef xmlSubstituteEntitiesDefaultValue
+#undef xmlRegisterNodeDefaultValue
+#undef xmlDeregisterNodeDefaultValue
+#undef xmlLastError
+#undef xmlParserInputBufferCreateFilenameValue
+#undef xmlOutputBufferCreateFilenameValue
+
+/**
+ * xmlRegisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the registration callback of a created node
+ */
+typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
+/**
+ * xmlDeregisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the deregistration callback of a discarded node
+ */
+typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
+
+typedef struct _xmlGlobalState xmlGlobalState;
+typedef xmlGlobalState *xmlGlobalStatePtr;
+struct _xmlGlobalState
+{
+ const char *xmlParserVersion;
+
+ xmlSAXLocator xmlDefaultSAXLocator;
+ xmlSAXHandlerV1 xmlDefaultSAXHandler;
+ xmlSAXHandlerV1 docbDefaultSAXHandler;
+ xmlSAXHandlerV1 htmlDefaultSAXHandler;
+
+ xmlFreeFunc xmlFree;
+ xmlMallocFunc xmlMalloc;
+ xmlStrdupFunc xmlMemStrdup;
+ xmlReallocFunc xmlRealloc;
+
+ xmlGenericErrorFunc xmlGenericError;
+ xmlStructuredErrorFunc xmlStructuredError;
+ void *xmlGenericErrorContext;
+
+ int oldXMLWDcompatibility;
+
+ xmlBufferAllocationScheme xmlBufferAllocScheme;
+ int xmlDefaultBufferSize;
+
+ int xmlSubstituteEntitiesDefaultValue;
+ int xmlDoValidityCheckingDefaultValue;
+ int xmlGetWarningsDefaultValue;
+ int xmlKeepBlanksDefaultValue;
+ int xmlLineNumbersDefaultValue;
+ int xmlLoadExtDtdDefaultValue;
+ int xmlParserDebugEntities;
+ int xmlPedanticParserDefaultValue;
+
+ int xmlSaveNoEmptyTags;
+ int xmlIndentTreeOutput;
+ const char *xmlTreeIndentString;
+
+ xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+ xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+
+ xmlMallocFunc xmlMallocAtomic;
+ xmlError xmlLastError;
+
+ xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
+ xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
+
+ void *xmlStructuredErrorContext;
+};
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/threads.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
+
+XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
+
+XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
+
+XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
+ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
+ xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
+
+/** DOC_DISABLE */
+/*
+ * In general the memory allocation entry points are not kept
+ * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
+ * - xmlMalloc
+ * - xmlMallocAtomic
+ * - xmlRealloc
+ * - xmlMemStrdup
+ * - xmlFree
+ */
+
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
+#define xmlMalloc \
+(*(__xmlMalloc()))
+#else
+XMLPUBVAR xmlMallocFunc xmlMalloc;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
+#define xmlMallocAtomic \
+(*(__xmlMallocAtomic()))
+#else
+XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
+#define xmlRealloc \
+(*(__xmlRealloc()))
+#else
+XMLPUBVAR xmlReallocFunc xmlRealloc;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
+#define xmlFree \
+(*(__xmlFree()))
+#else
+XMLPUBVAR xmlFreeFunc xmlFree;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
+#define xmlMemStrdup \
+(*(__xmlMemStrdup()))
+#else
+XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif
+
+#else /* !LIBXML_THREAD_ALLOC_ENABLED */
+XMLPUBVAR xmlMallocFunc xmlMalloc;
+XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+XMLPUBVAR xmlReallocFunc xmlRealloc;
+XMLPUBVAR xmlFreeFunc xmlFree;
+XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif /* LIBXML_THREAD_ALLOC_ENABLED */
+
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define docbDefaultSAXHandler \
+(*(__docbDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
+#endif
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define htmlDefaultSAXHandler \
+(*(__htmlDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
+#endif
+#endif
+
+XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLastError \
+(*(__xmlLastError()))
+#else
+XMLPUBVAR xmlError xmlLastError;
+#endif
+
+/*
+ * Everything starting from the line below is
+ * Automatically generated by build_glob.py.
+ * Do not modify the previous line.
+ */
+
+
+XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define oldXMLWDcompatibility \
+(*(__oldXMLWDcompatibility()))
+#else
+XMLPUBVAR int oldXMLWDcompatibility;
+#endif
+
+XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlBufferAllocScheme \
+(*(__xmlBufferAllocScheme()))
+#else
+XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
+#endif
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
+
+XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultBufferSize \
+(*(__xmlDefaultBufferSize()))
+#else
+XMLPUBVAR int xmlDefaultBufferSize;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
+
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultSAXHandler \
+(*(__xmlDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
+#endif
+
+XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultSAXLocator \
+(*(__xmlDefaultSAXLocator()))
+#else
+XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDoValidityCheckingDefaultValue \
+(*(__xmlDoValidityCheckingDefaultValue()))
+#else
+XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
+
+XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGenericError \
+(*(__xmlGenericError()))
+#else
+XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
+#endif
+
+XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlStructuredError \
+(*(__xmlStructuredError()))
+#else
+XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
+#endif
+
+XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGenericErrorContext \
+(*(__xmlGenericErrorContext()))
+#else
+XMLPUBVAR void * xmlGenericErrorContext;
+#endif
+
+XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlStructuredErrorContext \
+(*(__xmlStructuredErrorContext()))
+#else
+XMLPUBVAR void * xmlStructuredErrorContext;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGetWarningsDefaultValue \
+(*(__xmlGetWarningsDefaultValue()))
+#else
+XMLPUBVAR int xmlGetWarningsDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlIndentTreeOutput \
+(*(__xmlIndentTreeOutput()))
+#else
+XMLPUBVAR int xmlIndentTreeOutput;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
+
+XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlTreeIndentString \
+(*(__xmlTreeIndentString()))
+#else
+XMLPUBVAR const char * xmlTreeIndentString;
+#endif
+XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
+
+XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlKeepBlanksDefaultValue \
+(*(__xmlKeepBlanksDefaultValue()))
+#else
+XMLPUBVAR int xmlKeepBlanksDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLineNumbersDefaultValue \
+(*(__xmlLineNumbersDefaultValue()))
+#else
+XMLPUBVAR int xmlLineNumbersDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLoadExtDtdDefaultValue \
+(*(__xmlLoadExtDtdDefaultValue()))
+#else
+XMLPUBVAR int xmlLoadExtDtdDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserDebugEntities \
+(*(__xmlParserDebugEntities()))
+#else
+XMLPUBVAR int xmlParserDebugEntities;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
+
+XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserVersion \
+(*(__xmlParserVersion()))
+#else
+XMLPUBVAR const char * xmlParserVersion;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlPedanticParserDefaultValue \
+(*(__xmlPedanticParserDefaultValue()))
+#else
+XMLPUBVAR int xmlPedanticParserDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlSaveNoEmptyTags \
+(*(__xmlSaveNoEmptyTags()))
+#else
+XMLPUBVAR int xmlSaveNoEmptyTags;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
+
+XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlSubstituteEntitiesDefaultValue \
+(*(__xmlSubstituteEntitiesDefaultValue()))
+#else
+XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
+
+XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlRegisterNodeDefaultValue \
+(*(__xmlRegisterNodeDefaultValue()))
+#else
+XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+#endif
+
+XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDeregisterNodeDefaultValue \
+(*(__xmlDeregisterNodeDefaultValue()))
+#else
+XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+#endif
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserInputBufferCreateFilenameValue \
+(*(__xmlParserInputBufferCreateFilenameValue()))
+#else
+XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
+#endif
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlOutputBufferCreateFilenameValue \
+(*(__xmlOutputBufferCreateFilenameValue()))
+#else
+XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_GLOBALS_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/hash.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/hash.h
new file mode 100644
index 0000000..02c11e4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/hash.h
@@ -0,0 +1,233 @@
+/*
+ * Summary: Chained hash tables
+ * Description: This module implements the hash table support used in
+ * various places in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Bjorn Reese <bjorn.reese@systematic.dk>
+ */
+
+#ifndef __XML_HASH_H__
+#define __XML_HASH_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The hash table.
+ */
+typedef struct _xmlHashTable xmlHashTable;
+typedef xmlHashTable *xmlHashTablePtr;
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/dict.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Recent version of gcc produce a warning when a function pointer is assigned
+ * to an object pointer, or vice versa. The following macro is a dirty hack
+ * to allow suppression of the warning. If your architecture has function
+ * pointers which are a different size than a void pointer, there may be some
+ * serious trouble within the library.
+ */
+/**
+ * XML_CAST_FPTR:
+ * @fptr: pointer to a function
+ *
+ * Macro to do a casting from an object pointer to a
+ * function pointer without encountering a warning from
+ * gcc
+ *
+ * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+ * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
+ * so it is disabled now
+ */
+
+#define XML_CAST_FPTR(fptr) fptr
+
+
+/*
+ * function types:
+ */
+/**
+ * xmlHashDeallocator:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to free data from a hash.
+ */
+typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
+/**
+ * xmlHashCopier:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to copy data from a hash.
+ *
+ * Returns a copy of the data or NULL in case of error.
+ */
+typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
+/**
+ * xmlHashScanner:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ *
+ * Callback when scanning data in a hash with the simple scanner.
+ */
+typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
+/**
+ * xmlHashScannerFull:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ * @name2: the second name associated
+ * @name3: the third name associated
+ *
+ * Callback when scanning data in a hash with the full scanner.
+ */
+typedef void (*xmlHashScannerFull)(void *payload, void *data,
+ const xmlChar *name, const xmlChar *name2,
+ const xmlChar *name3);
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCreate (int size);
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCreateDict(int size,
+ xmlDictPtr dict);
+XMLPUBFUN void XMLCALL
+ xmlHashFree (xmlHashTablePtr table,
+ xmlHashDeallocator f);
+
+/*
+ * Add a new entry to the hash table.
+ */
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry (xmlHashTablePtr table,
+ const xmlChar *name,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry(xmlHashTablePtr table,
+ const xmlChar *name,
+ void *userdata,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry2(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry2(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata,
+ xmlHashDeallocator f);
+
+/*
+ * Remove an entry from the hash table.
+ */
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ xmlHashDeallocator f);
+
+/*
+ * Retrieve the userdata.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup (xmlHashTablePtr table,
+ const xmlChar *name);
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup2 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2);
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup2 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix,
+ const xmlChar *name2,
+ const xmlChar *prefix2);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix,
+ const xmlChar *name2,
+ const xmlChar *prefix2,
+ const xmlChar *name3,
+ const xmlChar *prefix3);
+
+/*
+ * Helpers.
+ */
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCopy (xmlHashTablePtr table,
+ xmlHashCopier f);
+XMLPUBFUN int XMLCALL
+ xmlHashSize (xmlHashTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlHashScan (xmlHashTablePtr table,
+ xmlHashScanner f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScan3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScanner f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScanFull (xmlHashTablePtr table,
+ xmlHashScannerFull f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScanFull3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScannerFull f,
+ void *data);
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_HASH_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/list.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/list.h
new file mode 100644
index 0000000..0504e0c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/list.h
@@ -0,0 +1,137 @@
+/*
+ * Summary: lists interfaces
+ * Description: this module implement the list support used in
+ * various place in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington <Gary.Pennington@uk.sun.com>
+ */
+
+#ifndef __XML_LINK_INCLUDE__
+#define __XML_LINK_INCLUDE__
+
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlLink xmlLink;
+typedef xmlLink *xmlLinkPtr;
+
+typedef struct _xmlList xmlList;
+typedef xmlList *xmlListPtr;
+
+/**
+ * xmlListDeallocator:
+ * @lk: the data to deallocate
+ *
+ * Callback function used to free data from a list.
+ */
+typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
+/**
+ * xmlListDataCompare:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Callback function used to compare 2 data.
+ *
+ * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
+ */
+typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
+/**
+ * xmlListWalker:
+ * @data: the data found in the list
+ * @user: extra user provided data to the walker
+ *
+ * Callback function used when walking a list with xmlListWalk().
+ *
+ * Returns 0 to stop walking the list, 1 otherwise.
+ */
+typedef int (*xmlListWalker) (const void *data, const void *user);
+
+/* Creation/Deletion */
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlListCreate (xmlListDeallocator deallocator,
+ xmlListDataCompare compare);
+XMLPUBFUN void XMLCALL
+ xmlListDelete (xmlListPtr l);
+
+/* Basic Operators */
+XMLPUBFUN void * XMLCALL
+ xmlListSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN void * XMLCALL
+ xmlListReverseSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListInsert (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int XMLCALL
+ xmlListAppend (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int XMLCALL
+ xmlListRemoveFirst (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListRemoveLast (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListRemoveAll (xmlListPtr l,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlListClear (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListEmpty (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr XMLCALL
+ xmlListFront (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr XMLCALL
+ xmlListEnd (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListSize (xmlListPtr l);
+
+XMLPUBFUN void XMLCALL
+ xmlListPopFront (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListPopBack (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListPushFront (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListPushBack (xmlListPtr l,
+ void *data);
+
+/* Advanced Operators */
+XMLPUBFUN void XMLCALL
+ xmlListReverse (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListSort (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListWalk (xmlListPtr l,
+ xmlListWalker walker,
+ const void *user);
+XMLPUBFUN void XMLCALL
+ xmlListReverseWalk (xmlListPtr l,
+ xmlListWalker walker,
+ const void *user);
+XMLPUBFUN void XMLCALL
+ xmlListMerge (xmlListPtr l1,
+ xmlListPtr l2);
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlListDup (const xmlListPtr old);
+XMLPUBFUN int XMLCALL
+ xmlListCopy (xmlListPtr cur,
+ const xmlListPtr old);
+/* Link operators */
+XMLPUBFUN void * XMLCALL
+ xmlLinkGetData (xmlLinkPtr lk);
+
+/* xmlListUnique() */
+/* xmlListSwap */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_LINK_INCLUDE__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/nanoftp.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/nanoftp.h
new file mode 100644
index 0000000..397bbba
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/nanoftp.h
@@ -0,0 +1,162 @@
+/*
+ * Summary: minimal FTP implementation
+ * Description: minimal FTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_FTP_H__
+#define __NANO_FTP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_FTP_ENABLED
+
+/* Needed for portability to Windows 64 bits */
+#if defined(__MINGW32__) || defined(_WIN32_WCE)
+#include <winsock2.h>
+#else
+/**
+ * SOCKET:
+ *
+ * macro used to provide portability of code to windows sockets
+ */
+#define SOCKET int
+/**
+ * INVALID_SOCKET:
+ *
+ * macro used to provide portability of code to windows sockets
+ * the value to be used when the socket is not valid
+ */
+#define INVALID_SOCKET (-1)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * ftpListCallback:
+ * @userData: user provided data for the callback
+ * @filename: the file name (including "->" when links are shown)
+ * @attrib: the attribute string
+ * @owner: the owner string
+ * @group: the group string
+ * @size: the file size
+ * @links: the link count
+ * @year: the year
+ * @month: the month
+ * @day: the day
+ * @hour: the hour
+ * @minute: the minute
+ *
+ * A callback for the xmlNanoFTPList command.
+ * Note that only one of year and day:minute are specified.
+ */
+typedef void (*ftpListCallback) (void *userData,
+ const char *filename, const char *attrib,
+ const char *owner, const char *group,
+ unsigned long size, int links, int year,
+ const char *month, int day, int hour,
+ int minute);
+/**
+ * ftpDataCallback:
+ * @userData: the user provided context
+ * @data: the data received
+ * @len: its size in bytes
+ *
+ * A callback for the xmlNanoFTPGet command.
+ */
+typedef void (*ftpDataCallback) (void *userData,
+ const char *data,
+ int len);
+
+/*
+ * Init
+ */
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPInit (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPCleanup (void);
+
+/*
+ * Creating/freeing contexts.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPNewCtxt (const char *URL);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPFreeCtxt (void * ctx);
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPConnectTo (const char *server,
+ int port);
+/*
+ * Opening/closing session connections.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPOpen (const char *URL);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPConnect (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPClose (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPQuit (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPScanProxy (const char *URL);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPProxy (const char *host,
+ int port,
+ const char *user,
+ const char *passwd,
+ int type);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPUpdateURL (void *ctx,
+ const char *URL);
+
+/*
+ * Rather internal commands.
+ */
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPGetResponse (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCheckResponse (void *ctx);
+
+/*
+ * CD/DIR/GET handlers.
+ */
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCwd (void *ctx,
+ const char *directory);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPDele (void *ctx,
+ const char *file);
+
+XMLPUBFUN SOCKET XMLCALL
+ xmlNanoFTPGetConnection (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCloseConnection(void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPList (void *ctx,
+ ftpListCallback callback,
+ void *userData,
+ const char *filename);
+XMLPUBFUN SOCKET XMLCALL
+ xmlNanoFTPGetSocket (void *ctx,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPGet (void *ctx,
+ ftpDataCallback callback,
+ void *userData,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPRead (void *ctx,
+ void *dest,
+ int len);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_FTP_ENABLED */
+#endif /* __NANO_FTP_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/nanohttp.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/nanohttp.h
new file mode 100644
index 0000000..22b8fb4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/nanohttp.h
@@ -0,0 +1,81 @@
+/*
+ * Summary: minimal HTTP implementation
+ * Description: minimal HTTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_HTTP_H__
+#define __NANO_HTTP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_HTTP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPInit (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPCleanup (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPScanProxy (const char *URL);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPFetch (const char *URL,
+ const char *filename,
+ char **contentType);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPMethod (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ const char *headers,
+ int ilen);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPMethodRedir (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ char **redir,
+ const char *headers,
+ int ilen);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPOpen (const char *URL,
+ char **contentType);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPOpenRedir (const char *URL,
+ char **contentType,
+ char **redir);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPReturnCode (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPAuthHeader (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPRedir (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPContentLength( void * ctx );
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPEncoding (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPMimeType (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPRead (void *ctx,
+ void *dest,
+ int len);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPSave (void *ctxt,
+ const char *filename);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPClose (void *ctx);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTTP_ENABLED */
+#endif /* __NANO_HTTP_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/parser.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/parser.h
new file mode 100644
index 0000000..a2f9f27
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/parser.h
@@ -0,0 +1,1235 @@
+/*
+ * Summary: the core parser module
+ * Description: Interfaces, constants and types related to the XML parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_H__
+#define __XML_PARSER_H__
+
+#include <stdarg.h>
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#include <libxml/hash.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_DEFAULT_VERSION:
+ *
+ * The default version of XML used: 1.0
+ */
+#define XML_DEFAULT_VERSION "1.0"
+
+/**
+ * xmlParserInput:
+ *
+ * An xmlParserInput is an input flow for the XML processor.
+ * Each entity parsed is associated an xmlParserInput (except the
+ * few predefined ones). This is the case both for internal entities
+ * - in which case the flow is already completely in memory - or
+ * external entities - in which case we use the buf structure for
+ * progressive reading and I18N conversions to the internal UTF-8 format.
+ */
+
+/**
+ * xmlParserInputDeallocate:
+ * @str: the string to deallocate
+ *
+ * Callback for freeing some parser input allocations.
+ */
+typedef void (* xmlParserInputDeallocate)(xmlChar *str);
+
+struct _xmlParserInput {
+ /* Input buffer */
+ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
+
+ const char *filename; /* The file analyzed, if any */
+ const char *directory; /* the directory/base of the file */
+ const xmlChar *base; /* Base of the array to parse */
+ const xmlChar *cur; /* Current char being parsed */
+ const xmlChar *end; /* end of the array to parse */
+ int length; /* length if known */
+ int line; /* Current line */
+ int col; /* Current column */
+ /*
+ * NOTE: consumed is only tested for equality in the parser code,
+ * so even if there is an overflow this should not give troubles
+ * for parsing very large instances.
+ */
+ unsigned long consumed; /* How many xmlChars already consumed */
+ xmlParserInputDeallocate free; /* function to deallocate the base */
+ const xmlChar *encoding; /* the encoding string for entity */
+ const xmlChar *version; /* the version string for entity */
+ int standalone; /* Was that entity marked standalone */
+ int id; /* an unique identifier for the entity */
+};
+
+/**
+ * xmlParserNodeInfo:
+ *
+ * The parser can be asked to collect Node informations, i.e. at what
+ * place in the file they were detected.
+ * NOTE: This is off by default and not very well tested.
+ */
+typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
+typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
+
+struct _xmlParserNodeInfo {
+ const struct _xmlNode* node;
+ /* Position & line # that text that created the node begins & ends on */
+ unsigned long begin_pos;
+ unsigned long begin_line;
+ unsigned long end_pos;
+ unsigned long end_line;
+};
+
+typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
+typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
+struct _xmlParserNodeInfoSeq {
+ unsigned long maximum;
+ unsigned long length;
+ xmlParserNodeInfo* buffer;
+};
+
+/**
+ * xmlParserInputState:
+ *
+ * The parser is now working also as a state based parser.
+ * The recursive one use the state info for entities processing.
+ */
+typedef enum {
+ XML_PARSER_EOF = -1, /* nothing is to be parsed */
+ XML_PARSER_START = 0, /* nothing has been parsed */
+ XML_PARSER_MISC, /* Misc* before int subset */
+ XML_PARSER_PI, /* Within a processing instruction */
+ XML_PARSER_DTD, /* within some DTD content */
+ XML_PARSER_PROLOG, /* Misc* after internal subset */
+ XML_PARSER_COMMENT, /* within a comment */
+ XML_PARSER_START_TAG, /* within a start tag */
+ XML_PARSER_CONTENT, /* within the content */
+ XML_PARSER_CDATA_SECTION, /* within a CDATA section */
+ XML_PARSER_END_TAG, /* within a closing tag */
+ XML_PARSER_ENTITY_DECL, /* within an entity declaration */
+ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
+ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
+ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
+ XML_PARSER_EPILOG, /* the Misc* after the last end tag */
+ XML_PARSER_IGNORE, /* within an IGNORED section */
+ XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
+} xmlParserInputState;
+
+/**
+ * XML_DETECT_IDS:
+ *
+ * Bit in the loadsubset context field to tell to do ID/REFs lookups.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+ */
+#define XML_DETECT_IDS 2
+
+/**
+ * XML_COMPLETE_ATTRS:
+ *
+ * Bit in the loadsubset context field to tell to do complete the
+ * elements attributes lists with the ones defaulted from the DTDs.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+ */
+#define XML_COMPLETE_ATTRS 4
+
+/**
+ * XML_SKIP_IDS:
+ *
+ * Bit in the loadsubset context field to tell to not do ID/REFs registration.
+ * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
+ */
+#define XML_SKIP_IDS 8
+
+/**
+ * xmlParserMode:
+ *
+ * A parser can operate in various modes
+ */
+typedef enum {
+ XML_PARSE_UNKNOWN = 0,
+ XML_PARSE_DOM = 1,
+ XML_PARSE_SAX = 2,
+ XML_PARSE_PUSH_DOM = 3,
+ XML_PARSE_PUSH_SAX = 4,
+ XML_PARSE_READER = 5
+} xmlParserMode;
+
+/**
+ * xmlParserCtxt:
+ *
+ * The parser context.
+ * NOTE This doesn't completely define the parser state, the (current ?)
+ * design of the parser uses recursive function calls since this allow
+ * and easy mapping from the production rules of the specification
+ * to the actual code. The drawback is that the actual function call
+ * also reflect the parser state. However most of the parsing routines
+ * takes as the only argument the parser context pointer, so migrating
+ * to a state based parser for progressive parsing shouldn't be too hard.
+ */
+struct _xmlParserCtxt {
+ struct _xmlSAXHandler *sax; /* The SAX handler */
+ void *userData; /* For SAX interface only, used by DOM build */
+ xmlDocPtr myDoc; /* the document being built */
+ int wellFormed; /* is the document well formed */
+ int replaceEntities; /* shall we replace entities ? */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* the declared encoding, if any */
+ int standalone; /* standalone document */
+ int html; /* an HTML(1)/Docbook(2) document
+ * 3 is HTML after <head>
+ * 10 is HTML after <body>
+ */
+
+ /* Input stream stack */
+ xmlParserInputPtr input; /* Current input stream */
+ int inputNr; /* Number of current input streams */
+ int inputMax; /* Max number of input streams */
+ xmlParserInputPtr *inputTab; /* stack of inputs */
+
+ /* Node analysis stack only used for DOM building */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ int record_info; /* Whether node info should be kept */
+ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
+
+ int errNo; /* error code */
+
+ int hasExternalSubset; /* reference and external subset */
+ int hasPErefs; /* the internal subset has PE refs */
+ int external; /* are we parsing an external entity */
+
+ int valid; /* is the document valid */
+ int validate; /* shall we try to validate ? */
+ xmlValidCtxt vctxt; /* The validity context */
+
+ xmlParserInputState instate; /* current type of input */
+ int token; /* next char look-ahead */
+
+ char *directory; /* the data directory */
+
+ /* Node name stack */
+ const xmlChar *name; /* Current parsed Node */
+ int nameNr; /* Depth of the parsing stack */
+ int nameMax; /* Max depth of the parsing stack */
+ const xmlChar * *nameTab; /* array of nodes */
+
+ long nbChars; /* number of xmlChar processed */
+ long checkIndex; /* used by progressive parsing lookup */
+ int keepBlanks; /* ugly but ... */
+ int disableSAX; /* SAX callbacks are disabled */
+ int inSubset; /* Parsing is in int 1/ext 2 subset */
+ const xmlChar * intSubName; /* name of subset */
+ xmlChar * extSubURI; /* URI of external subset */
+ xmlChar * extSubSystem; /* SYSTEM ID of external subset */
+
+ /* xml:space values */
+ int * space; /* Should the parser preserve spaces */
+ int spaceNr; /* Depth of the parsing stack */
+ int spaceMax; /* Max depth of the parsing stack */
+ int * spaceTab; /* array of space infos */
+
+ int depth; /* to prevent entity substitution loops */
+ xmlParserInputPtr entity; /* used to check entities boundaries */
+ int charset; /* encoding of the in-memory content
+ actually an xmlCharEncoding */
+ int nodelen; /* Those two fields are there to */
+ int nodemem; /* Speed up large node parsing */
+ int pedantic; /* signal pedantic warnings */
+ void *_private; /* For user data, libxml won't touch it */
+
+ int loadsubset; /* should the external subset be loaded */
+ int linenumbers; /* set line number in element content */
+ void *catalogs; /* document's own catalog */
+ int recovery; /* run in recovery mode */
+ int progressive; /* is this a progressive parsing */
+ xmlDictPtr dict; /* dictionnary for the parser */
+ const xmlChar * *atts; /* array for the attributes callbacks */
+ int maxatts; /* the size of the array */
+ int docdict; /* use strings from dict to build tree */
+
+ /*
+ * pre-interned strings
+ */
+ const xmlChar *str_xml;
+ const xmlChar *str_xmlns;
+ const xmlChar *str_xml_ns;
+
+ /*
+ * Everything below is used only by the new SAX mode
+ */
+ int sax2; /* operating in the new SAX mode */
+ int nsNr; /* the number of inherited namespaces */
+ int nsMax; /* the size of the arrays */
+ const xmlChar * *nsTab; /* the array of prefix/namespace name */
+ int *attallocs; /* which attribute were allocated */
+ void * *pushTab; /* array of data for push */
+ xmlHashTablePtr attsDefault; /* defaulted attributes if any */
+ xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
+ int nsWellFormed; /* is the document XML Nanespace okay */
+ int options; /* Extra options */
+
+ /*
+ * Those fields are needed only for treaming parsing so far
+ */
+ int dictNames; /* Use dictionary names for the tree */
+ int freeElemsNr; /* number of freed element nodes */
+ xmlNodePtr freeElems; /* List of freed element nodes */
+ int freeAttrsNr; /* number of freed attributes nodes */
+ xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
+
+ /*
+ * the complete error informations for the last error.
+ */
+ xmlError lastError;
+ xmlParserMode parseMode; /* the parser mode */
+ unsigned long nbentities; /* number of entities references */
+ unsigned long sizeentities; /* size of parsed entities */
+
+ /* for use by HTML non-recursive parser */
+ xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
+ int nodeInfoNr; /* Depth of the parsing stack */
+ int nodeInfoMax; /* Max depth of the parsing stack */
+ xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
+};
+
+/**
+ * xmlSAXLocator:
+ *
+ * A SAX Locator.
+ */
+struct _xmlSAXLocator {
+ const xmlChar *(*getPublicId)(void *ctx);
+ const xmlChar *(*getSystemId)(void *ctx);
+ int (*getLineNumber)(void *ctx);
+ int (*getColumnNumber)(void *ctx);
+};
+
+/**
+ * xmlSAXHandler:
+ *
+ * A SAX handler is bunch of callbacks called by the parser when processing
+ * of the input generate data or structure informations.
+ */
+
+/**
+ * resolveEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Callback:
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this resolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * internalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+ */
+typedef void (*internalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * externalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+ */
+typedef void (*externalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * getEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * getParameterEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * entityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed.
+ */
+typedef void (*entityDeclSAXFunc) (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+/**
+ * notationDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+typedef void (*notationDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * attributeDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed.
+ */
+typedef void (*attributeDeclSAXFunc)(void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+/**
+ * elementDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed.
+ */
+typedef void (*elementDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+/**
+ * unparsedEntityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed.
+ */
+typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+/**
+ * setDocumentLocatorSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator.
+ * Everything is available on the context, so this is useless in our case.
+ */
+typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
+ xmlSAXLocatorPtr loc);
+/**
+ * startDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document start being processed.
+ */
+typedef void (*startDocumentSAXFunc) (void *ctx);
+/**
+ * endDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document end has been detected.
+ */
+typedef void (*endDocumentSAXFunc) (void *ctx);
+/**
+ * startElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * Called when an opening tag has been processed.
+ */
+typedef void (*startElementSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar **atts);
+/**
+ * endElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * Called when the end of an element has been detected.
+ */
+typedef void (*endElementSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * attributeSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The attribute name, including namespace prefix
+ * @value: The attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ */
+typedef void (*attributeSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *value);
+/**
+ * referenceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Called when an entity reference is detected.
+ */
+typedef void (*referenceSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * charactersSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some chars from the parser.
+ */
+typedef void (*charactersSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * ignorableWhitespaceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use characters.
+ */
+typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * processingInstructionSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+ */
+typedef void (*processingInstructionSAXFunc) (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+/**
+ * commentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+typedef void (*commentSAXFunc) (void *ctx,
+ const xmlChar *value);
+/**
+ * cdataBlockSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * Called when a pcdata block has been parsed.
+ */
+typedef void (*cdataBlockSAXFunc) (
+ void *ctx,
+ const xmlChar *value,
+ int len);
+/**
+ * warningSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, callback.
+ */
+typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * errorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, callback.
+ */
+typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * fatalErrorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format fatal error messages, callback.
+ * Note: so far fatalError() SAX callbacks are not used, error()
+ * get all the callbacks for errors.
+ */
+typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * isStandaloneSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone?
+ *
+ * Returns 1 if true
+ */
+typedef int (*isStandaloneSAXFunc) (void *ctx);
+/**
+ * hasInternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset.
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
+
+/**
+ * hasExternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset?
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
+
+/************************************************************************
+ * *
+ * The SAX version 2 API extensions *
+ * *
+ ************************************************************************/
+/**
+ * XML_SAX2_MAGIC:
+ *
+ * Special constant found in SAX2 blocks initialized fields
+ */
+#define XML_SAX2_MAGIC 0xDEEDBEAF
+
+/**
+ * startElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
+ * @nb_attributes: the number of attributes on that node
+ * @nb_defaulted: the number of defaulted attributes. The defaulted
+ * ones are at the end of the array
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
+ * attribute values.
+ *
+ * SAX2 callback when an element start has been detected by the parser.
+ * It provides the namespace informations for the element, as well as
+ * the new namespace declarations on the element.
+ */
+
+typedef void (*startElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+
+/**
+ * endElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * SAX2 callback when an element end has been detected by the parser.
+ * It provides the namespace informations for the element.
+ */
+
+typedef void (*endElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+
+
+struct _xmlSAXHandler {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+ /* The following fields are extensions available only on version 2 */
+ void *_private;
+ startElementNsSAX2Func startElementNs;
+ endElementNsSAX2Func endElementNs;
+ xmlStructuredErrorFunc serror;
+};
+
+/*
+ * SAX Version 1
+ */
+typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
+typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
+struct _xmlSAXHandlerV1 {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+};
+
+
+/**
+ * xmlExternalEntityLoader:
+ * @URL: The System ID of the resource requested
+ * @ID: The Public ID of the resource requested
+ * @context: the XML parser context
+ *
+ * External entity loaders types.
+ *
+ * Returns the entity input parser.
+ */
+typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+#include <libxml/globals.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Init/Cleanup
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitParser (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupParser (void);
+
+/*
+ * Input functions
+ */
+XMLPUBFUN int XMLCALL
+ xmlParserInputRead (xmlParserInputPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputGrow (xmlParserInputPtr in,
+ int len);
+
+/*
+ * Basic parsing Interfaces
+ */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseFile (const char *filename);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseMemory (const char *buffer,
+ int size);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlSubstituteEntitiesDefault(int val);
+XMLPUBFUN int XMLCALL
+ xmlKeepBlanksDefault (int val);
+XMLPUBFUN void XMLCALL
+ xmlStopParser (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlPedanticParserDefault(int val);
+XMLPUBFUN int XMLCALL
+ xmlLineNumbersDefault (int val);
+
+#ifdef LIBXML_SAX1_ENABLED
+/*
+ * Recovery mode
+ */
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverMemory (const char *buffer,
+ int size);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverFile (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+/*
+ * Less common routines and SAX interfaces
+ */
+XMLPUBFUN int XMLCALL
+ xmlParseDocument (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *buffer,
+ int size);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseDoc (xmlSAXHandlerPtr sax,
+ const xmlChar *cur,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseMemory (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery,
+ void *data);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseFile (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery,
+ void *data);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseEntity (xmlSAXHandlerPtr sax,
+ const char *filename);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseEntity (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlSAXParseDTD (xmlSAXHandlerPtr sax,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlParseDTD (const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlIOParseDTD (xmlSAXHandlerPtr sax,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+#endif /* LIBXML_VALID_ENABLE */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlParseBalancedChunkMemory(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserErrors XMLCALL
+ xmlParseInNodeContext (xmlNodePtr node,
+ const char *data,
+ int datalen,
+ int options,
+ xmlNodePtr *lst);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst,
+ int recover);
+XMLPUBFUN int XMLCALL
+ xmlParseExternalEntity (xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+
+/*
+ * Parser contexts handling.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlNewParserCtxt (void);
+XMLPUBFUN int XMLCALL
+ xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
+ const xmlChar* buffer,
+ const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateDocParserCtxt (const xmlChar *cur);
+
+#ifdef LIBXML_LEGACY_ENABLED
+/*
+ * Reading/setting optional parsing features.
+ */
+XMLPUBFUN int XMLCALL
+ xmlGetFeaturesList (int *len,
+ const char **result);
+XMLPUBFUN int XMLCALL
+ xmlGetFeature (xmlParserCtxtPtr ctxt,
+ const char *name,
+ void *result);
+XMLPUBFUN int XMLCALL
+ xmlSetFeature (xmlParserCtxtPtr ctxt,
+ const char *name,
+ void *value);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#ifdef LIBXML_PUSH_ENABLED
+/*
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlParseChunk (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+/*
+ * Special I/O mode.
+ */
+
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
+ void *user_data,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+
+/*
+ * Node infos.
+ */
+XMLPUBFUN const xmlParserNodeInfo* XMLCALL
+ xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
+ const xmlNodePtr node);
+XMLPUBFUN void XMLCALL
+ xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XMLPUBFUN void XMLCALL
+ xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XMLPUBFUN unsigned long XMLCALL
+ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
+ const xmlNodePtr node);
+XMLPUBFUN void XMLCALL
+ xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
+ const xmlParserNodeInfoPtr info);
+
+/*
+ * External entities handling actually implemented in xmlIO.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
+XMLPUBFUN xmlExternalEntityLoader XMLCALL
+ xmlGetExternalEntityLoader(void);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlLoadExternalEntity (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/*
+ * Index lookup, actually implemented in the encoding module
+ */
+XMLPUBFUN long XMLCALL
+ xmlByteConsumed (xmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ XML_PARSE_RECOVER = 1<<0, /* recover on errors */
+ XML_PARSE_NOENT = 1<<1, /* substitute entities */
+ XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
+ XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
+ XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
+ XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
+ XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
+ XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */
+ XML_PARSE_NONET = 1<<11,/* Forbid network access */
+ XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
+ XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
+ XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
+ XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
+ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
+ the tree allowed afterwards (will possibly
+ crash if you try to modify the tree) */
+ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
+ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
+ XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */
+ XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
+} xmlParserOption;
+
+XMLPUBFUN void XMLCALL
+ xmlCtxtReset (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/*
+ * Library wide options
+ */
+/**
+ * xmlFeature:
+ *
+ * Used to examine the existance of features that can be enabled
+ * or disabled at compile-time.
+ * They used to be called XML_FEATURE_xxx but this clashed with Expat
+ */
+typedef enum {
+ XML_WITH_THREAD = 1,
+ XML_WITH_TREE = 2,
+ XML_WITH_OUTPUT = 3,
+ XML_WITH_PUSH = 4,
+ XML_WITH_READER = 5,
+ XML_WITH_PATTERN = 6,
+ XML_WITH_WRITER = 7,
+ XML_WITH_SAX1 = 8,
+ XML_WITH_FTP = 9,
+ XML_WITH_HTTP = 10,
+ XML_WITH_VALID = 11,
+ XML_WITH_HTML = 12,
+ XML_WITH_LEGACY = 13,
+ XML_WITH_C14N = 14,
+ XML_WITH_CATALOG = 15,
+ XML_WITH_XPATH = 16,
+ XML_WITH_XPTR = 17,
+ XML_WITH_XINCLUDE = 18,
+ XML_WITH_ICONV = 19,
+ XML_WITH_ISO8859X = 20,
+ XML_WITH_UNICODE = 21,
+ XML_WITH_REGEXP = 22,
+ XML_WITH_AUTOMATA = 23,
+ XML_WITH_EXPR = 24,
+ XML_WITH_SCHEMAS = 25,
+ XML_WITH_SCHEMATRON = 26,
+ XML_WITH_MODULES = 27,
+ XML_WITH_DEBUG = 28,
+ XML_WITH_DEBUG_MEM = 29,
+ XML_WITH_DEBUG_RUN = 30,
+ XML_WITH_ZLIB = 31,
+ XML_WITH_ICU = 32,
+ XML_WITH_NONE = 99999 /* just to be sure of allocation size */
+} xmlFeature;
+
+XMLPUBFUN int XMLCALL
+ xmlHasFeature (xmlFeature feature);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/parserInternals.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/parserInternals.h
new file mode 100644
index 0000000..10f1e16
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/parserInternals.h
@@ -0,0 +1,611 @@
+/*
+ * Summary: internals routines exported by the parser.
+ * Description: this module exports a number of internal parsing routines
+ * they are not really all intended for applications but
+ * can prove useful doing low level processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_INTERNALS_H__
+#define __XML_PARSER_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/chvalid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserMaxDepth:
+ *
+ * arbitrary depth limit for the XML documents that we allow to
+ * process. This is not a limitation of the parser but a safety
+ * boundary feature, use XML_PARSE_HUGE option to override it.
+ */
+XMLPUBVAR unsigned int xmlParserMaxDepth;
+
+/**
+ * XML_MAX_TEXT_LENGTH:
+ *
+ * Maximum size allowed for a single text node when building a tree.
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ */
+#define XML_MAX_TEXT_LENGTH 10000000
+
+/**
+ * XML_MAX_NAMELEN:
+ *
+ * Identifiers can be longer, but this will be more costly
+ * at runtime.
+ */
+#define XML_MAX_NAMELEN 100
+
+/**
+ * INPUT_CHUNK:
+ *
+ * The parser tries to always have that amount of input ready.
+ * One of the point is providing context when reporting errors.
+ */
+#define INPUT_CHUNK 250
+
+/************************************************************************
+ * *
+ * UNICODE version of the macros. *
+ * *
+ ************************************************************************/
+/**
+ * IS_BYTE_CHAR:
+ * @c: an byte value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20...]
+ * any byte character in the accepted range
+ */
+#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
+
+/**
+ * IS_CHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
+ * | [#x10000-#x10FFFF]
+ * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ */
+#define IS_CHAR(c) xmlIsCharQ(c)
+
+/**
+ * IS_CHAR_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Behaves like IS_CHAR on single-byte value
+ */
+#define IS_CHAR_CH(c) xmlIsChar_ch(c)
+
+/**
+ * IS_BLANK:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
+ */
+#define IS_BLANK(c) xmlIsBlankQ(c)
+
+/**
+ * IS_BLANK_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Behaviour same as IS_BLANK
+ */
+#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
+
+/**
+ * IS_BASECHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [85] BaseChar ::= ... long list see REC ...
+ */
+#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
+
+/**
+ * IS_DIGIT:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [88] Digit ::= ... long list see REC ...
+ */
+#define IS_DIGIT(c) xmlIsDigitQ(c)
+
+/**
+ * IS_DIGIT_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_DIGIT but with a single byte argument
+ */
+#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
+
+/**
+ * IS_COMBINING:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [87] CombiningChar ::= ... long list see REC ...
+ */
+#define IS_COMBINING(c) xmlIsCombiningQ(c)
+
+/**
+ * IS_COMBINING_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Always false (all combining chars > 0xff)
+ */
+#define IS_COMBINING_CH(c) 0
+
+/**
+ * IS_EXTENDER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
+ * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
+ * [#x309D-#x309E] | [#x30FC-#x30FE]
+ */
+#define IS_EXTENDER(c) xmlIsExtenderQ(c)
+
+/**
+ * IS_EXTENDER_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_EXTENDER but with a single-byte argument
+ */
+#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
+
+/**
+ * IS_IDEOGRAPHIC:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
+ */
+#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
+
+/**
+ * IS_LETTER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [84] Letter ::= BaseChar | Ideographic
+ */
+#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
+
+/**
+ * IS_LETTER_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Macro behaves like IS_LETTER, but only check base chars
+ *
+ */
+#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
+
+/**
+ * IS_ASCII_LETTER:
+ * @c: an xmlChar value
+ *
+ * Macro to check [a-zA-Z]
+ *
+ */
+#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)))
+
+/**
+ * IS_ASCII_DIGIT:
+ * @c: an xmlChar value
+ *
+ * Macro to check [0-9]
+ *
+ */
+#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
+
+/**
+ * IS_PUBIDCHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
+ */
+#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
+
+/**
+ * IS_PUBIDCHAR_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Same as IS_PUBIDCHAR but for single-byte value
+ */
+#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
+
+/**
+ * SKIP_EOL:
+ * @p: and UTF8 string pointer
+ *
+ * Skips the end of line chars.
+ */
+#define SKIP_EOL(p) \
+ if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
+ if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
+
+/**
+ * MOVETO_ENDTAG:
+ * @p: and UTF8 string pointer
+ *
+ * Skips to the next '>' char.
+ */
+#define MOVETO_ENDTAG(p) \
+ while ((*p) && (*(p) != '>')) (p)++
+
+/**
+ * MOVETO_STARTTAG:
+ * @p: and UTF8 string pointer
+ *
+ * Skips to the next '<' char.
+ */
+#define MOVETO_STARTTAG(p) \
+ while ((*p) && (*(p) != '<')) (p)++
+
+/**
+ * Global variables used for predefined strings.
+ */
+XMLPUBVAR const xmlChar xmlStringText[];
+XMLPUBVAR const xmlChar xmlStringTextNoenc[];
+XMLPUBVAR const xmlChar xmlStringComment[];
+
+/*
+ * Function to finish the work of the macros where needed.
+ */
+XMLPUBFUN int XMLCALL xmlIsLetter (int c);
+
+/**
+ * Parser context.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateFileParserCtxt (const char *filename);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateURLParserCtxt (const char *filename,
+ int options);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateEntityParserCtxt(const xmlChar *URL,
+ const xmlChar *ID,
+ const xmlChar *base);
+XMLPUBFUN int XMLCALL
+ xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN int XMLCALL
+ xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler);
+
+#ifdef IN_LIBXML
+/* internal error reporting */
+XMLPUBFUN void XMLCALL
+ __xmlErrEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserErrors xmlerr,
+ const char *msg,
+ const xmlChar * str1,
+ const xmlChar * str2);
+#endif
+
+/**
+ * Input Streams.
+ */
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
+ const xmlChar *buffer);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+XMLPUBFUN int XMLCALL
+ xmlPushInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XMLPUBFUN xmlChar XMLCALL
+ xmlPopInput (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlFreeInputStream (xmlParserInputPtr input);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
+ const char *filename);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewInputStream (xmlParserCtxtPtr ctxt);
+
+/**
+ * Namespaces.
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSplitQName (xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlChar **prefix);
+
+/**
+ * Generic production rules.
+ */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseNmtoken (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseEntityValue (xmlParserCtxtPtr ctxt,
+ xmlChar **orig);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseAttValue (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseCharData (xmlParserCtxtPtr ctxt,
+ int cdata);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseExternalID (xmlParserCtxtPtr ctxt,
+ xmlChar **publicID,
+ int strict);
+XMLPUBFUN void XMLCALL
+ xmlParseComment (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParsePITarget (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParsePI (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlParseNotationType (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XMLPUBFUN int XMLCALL
+ xmlParseAttributeType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XMLPUBFUN void XMLCALL
+ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlParseElementMixedContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlParseElementChildrenContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XMLPUBFUN int XMLCALL
+ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlElementContentPtr *result);
+XMLPUBFUN int XMLCALL
+ xmlParseElementDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseCharRef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlParseEntityRef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseReference (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParsePEReference (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseAttribute (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseStartTag (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseEndTag (xmlParserCtxtPtr ctxt);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlParseCDSect (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseContent (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseElement (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseVersionNum (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseEncName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseSDDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseTextDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseMisc (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * XML_SUBSTITUTE_NONE:
+ *
+ * If no entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_NONE 0
+/**
+ * XML_SUBSTITUTE_REF:
+ *
+ * Whether general entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_REF 1
+/**
+ * XML_SUBSTITUTE_PEREF:
+ *
+ * Whether parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_PEREF 2
+/**
+ * XML_SUBSTITUTE_BOTH:
+ *
+ * Both general and parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_BOTH 3
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+
+/*
+ * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
+ */
+XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
+ xmlNodePtr value);
+XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr value);
+XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
+ const xmlChar *value);
+
+/*
+ * other commodities shared between parser.c and parserInternals.
+ */
+XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ int *len);
+XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
+
+/*
+ * Really core function shared with HTML parser.
+ */
+XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
+ int *len);
+XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
+ int val);
+XMLPUBFUN int XMLCALL xmlCopyChar (int len,
+ xmlChar *out,
+ int val);
+XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
+
+#ifdef LIBXML_HTML_ENABLED
+/*
+ * Actually comes from the HTML parser but launched from the init stuff.
+ */
+XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
+XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+#endif
+
+/*
+ * Specific function to keep track of entities references
+ * and used by the XSLT debugger.
+ */
+#ifdef LIBXML_LEGACY_ENABLED
+/**
+ * xmlEntityReferenceFunc:
+ * @ent: the entity
+ * @firstNode: the fist node in the chunk
+ * @lastNode: the last nod in the chunk
+ *
+ * Callback function used when one needs to be able to track back the
+ * provenance of a chunk of nodes inherited from an entity replacement.
+ */
+typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
+ xmlNodePtr firstNode,
+ xmlNodePtr lastNode);
+
+XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseQuotedString (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseNamespace (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlScanName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
+ xmlChar **prefix);
+/**
+ * Entities
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlDecodeEntities (xmlParserCtxtPtr ctxt,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XMLPUBFUN void XMLCALL
+ xmlHandleEntity (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#ifdef IN_LIBXML
+/*
+ * internal only
+ */
+XMLPUBFUN void XMLCALL
+ xmlErrMemory (xmlParserCtxtPtr ctxt,
+ const char *extra);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_INTERNALS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/pattern.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/pattern.h
new file mode 100644
index 0000000..97d2cd2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/pattern.h
@@ -0,0 +1,100 @@
+/*
+ * Summary: pattern expression handling
+ * Description: allows to compile and test pattern expressions for nodes
+ * either in a tree or based on a parser state.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PATTERN_H__
+#define __XML_PATTERN_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+
+#ifdef LIBXML_PATTERN_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlPattern:
+ *
+ * A compiled (XPath based) pattern to select nodes
+ */
+typedef struct _xmlPattern xmlPattern;
+typedef xmlPattern *xmlPatternPtr;
+
+/**
+ * xmlPatternFlags:
+ *
+ * This is the set of options affecting the behaviour of pattern
+ * matching with this module
+ *
+ */
+typedef enum {
+ XML_PATTERN_DEFAULT = 0, /* simple pattern match */
+ XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
+ XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
+ XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
+} xmlPatternFlags;
+
+XMLPUBFUN void XMLCALL
+ xmlFreePattern (xmlPatternPtr comp);
+
+XMLPUBFUN void XMLCALL
+ xmlFreePatternList (xmlPatternPtr comp);
+
+XMLPUBFUN xmlPatternPtr XMLCALL
+ xmlPatterncompile (const xmlChar *pattern,
+ xmlDict *dict,
+ int flags,
+ const xmlChar **namespaces);
+XMLPUBFUN int XMLCALL
+ xmlPatternMatch (xmlPatternPtr comp,
+ xmlNodePtr node);
+
+/* streaming interfaces */
+typedef struct _xmlStreamCtxt xmlStreamCtxt;
+typedef xmlStreamCtxt *xmlStreamCtxtPtr;
+
+XMLPUBFUN int XMLCALL
+ xmlPatternStreamable (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternMaxDepth (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternMinDepth (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternFromRoot (xmlPatternPtr comp);
+XMLPUBFUN xmlStreamCtxtPtr XMLCALL
+ xmlPatternGetStreamCtxt (xmlPatternPtr comp);
+XMLPUBFUN void XMLCALL
+ xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+ xmlStreamPushNode (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns,
+ int nodeType);
+XMLPUBFUN int XMLCALL
+ xmlStreamPush (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlStreamPushAttr (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlStreamPop (xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+ xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_PATTERN_ENABLED */
+
+#endif /* __XML_PATTERN_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/relaxng.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/relaxng.h
new file mode 100644
index 0000000..bdb0a7d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/relaxng.h
@@ -0,0 +1,213 @@
+/*
+ * Summary: implementation of the Relax-NG validation
+ * Description: implementation of the Relax-NG validation
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_RELAX_NG__
+#define __XML_RELAX_NG__
+
+#include <libxml/xmlversion.h>
+#include <libxml/hash.h>
+#include <libxml/xmlstring.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlRelaxNG xmlRelaxNG;
+typedef xmlRelaxNG *xmlRelaxNGPtr;
+
+
+/**
+ * xmlRelaxNGValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Relax-NG validation
+ */
+typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlRelaxNGValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Relax-NG validation
+ */
+typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
+typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
+
+typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
+typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
+
+/*
+ * xmlRelaxNGValidErr:
+ *
+ * List of possible Relax NG validation errors
+ */
+typedef enum {
+ XML_RELAXNG_OK = 0,
+ XML_RELAXNG_ERR_MEMORY,
+ XML_RELAXNG_ERR_TYPE,
+ XML_RELAXNG_ERR_TYPEVAL,
+ XML_RELAXNG_ERR_DUPID,
+ XML_RELAXNG_ERR_TYPECMP,
+ XML_RELAXNG_ERR_NOSTATE,
+ XML_RELAXNG_ERR_NODEFINE,
+ XML_RELAXNG_ERR_LISTEXTRA,
+ XML_RELAXNG_ERR_LISTEMPTY,
+ XML_RELAXNG_ERR_INTERNODATA,
+ XML_RELAXNG_ERR_INTERSEQ,
+ XML_RELAXNG_ERR_INTEREXTRA,
+ XML_RELAXNG_ERR_ELEMNAME,
+ XML_RELAXNG_ERR_ATTRNAME,
+ XML_RELAXNG_ERR_ELEMNONS,
+ XML_RELAXNG_ERR_ATTRNONS,
+ XML_RELAXNG_ERR_ELEMWRONGNS,
+ XML_RELAXNG_ERR_ATTRWRONGNS,
+ XML_RELAXNG_ERR_ELEMEXTRANS,
+ XML_RELAXNG_ERR_ATTREXTRANS,
+ XML_RELAXNG_ERR_ELEMNOTEMPTY,
+ XML_RELAXNG_ERR_NOELEM,
+ XML_RELAXNG_ERR_NOTELEM,
+ XML_RELAXNG_ERR_ATTRVALID,
+ XML_RELAXNG_ERR_CONTENTVALID,
+ XML_RELAXNG_ERR_EXTRACONTENT,
+ XML_RELAXNG_ERR_INVALIDATTR,
+ XML_RELAXNG_ERR_DATAELEM,
+ XML_RELAXNG_ERR_VALELEM,
+ XML_RELAXNG_ERR_LISTELEM,
+ XML_RELAXNG_ERR_DATATYPE,
+ XML_RELAXNG_ERR_VALUE,
+ XML_RELAXNG_ERR_LIST,
+ XML_RELAXNG_ERR_NOGRAMMAR,
+ XML_RELAXNG_ERR_EXTRADATA,
+ XML_RELAXNG_ERR_LACKDATA,
+ XML_RELAXNG_ERR_INTERNAL,
+ XML_RELAXNG_ERR_ELEMWRONG,
+ XML_RELAXNG_ERR_TEXTWRONG
+} xmlRelaxNGValidErr;
+
+/*
+ * xmlRelaxNGParserFlags:
+ *
+ * List of possible Relax NG Parser flags
+ */
+typedef enum {
+ XML_RELAXNGP_NONE = 0,
+ XML_RELAXNGP_FREE_DOC = 1,
+ XML_RELAXNGP_CRNG = 2
+} xmlRelaxNGParserFlag;
+
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGInitTypes (void);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGCleanupTypes (void);
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewParserCtxt (const char *URL);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
+
+XMLPUBFUN int XMLCALL
+ xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
+ int flag);
+
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetParserStructuredErrors(
+ xmlRelaxNGParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN xmlRelaxNGPtr XMLCALL
+ xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFree (xmlRelaxNGPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGDump (FILE *output,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGDumpTree (FILE * output,
+ xmlRelaxNGPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx);
+XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
+ xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+/*
+ * Interfaces for progressive validation when possible
+ */
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+#endif /* __XML_RELAX_NG__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/schemasInternals.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/schemasInternals.h
new file mode 100644
index 0000000..4f0ca9a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/schemasInternals.h
@@ -0,0 +1,958 @@
+/*
+ * Summary: internal interfaces for XML Schemas
+ * Description: internal interfaces for the XML Schemas handling
+ * and schema validity checking
+ * The Schemas development is a Work In Progress.
+ * Some of those interfaces are not garanteed to be API or ABI stable !
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_INTERNALS_H__
+#define __XML_SCHEMA_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/xmlregexp.h>
+#include <libxml/hash.h>
+#include <libxml/dict.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMAS_UNKNOWN = 0,
+ XML_SCHEMAS_STRING,
+ XML_SCHEMAS_NORMSTRING,
+ XML_SCHEMAS_DECIMAL,
+ XML_SCHEMAS_TIME,
+ XML_SCHEMAS_GDAY,
+ XML_SCHEMAS_GMONTH,
+ XML_SCHEMAS_GMONTHDAY,
+ XML_SCHEMAS_GYEAR,
+ XML_SCHEMAS_GYEARMONTH,
+ XML_SCHEMAS_DATE,
+ XML_SCHEMAS_DATETIME,
+ XML_SCHEMAS_DURATION,
+ XML_SCHEMAS_FLOAT,
+ XML_SCHEMAS_DOUBLE,
+ XML_SCHEMAS_BOOLEAN,
+ XML_SCHEMAS_TOKEN,
+ XML_SCHEMAS_LANGUAGE,
+ XML_SCHEMAS_NMTOKEN,
+ XML_SCHEMAS_NMTOKENS,
+ XML_SCHEMAS_NAME,
+ XML_SCHEMAS_QNAME,
+ XML_SCHEMAS_NCNAME,
+ XML_SCHEMAS_ID,
+ XML_SCHEMAS_IDREF,
+ XML_SCHEMAS_IDREFS,
+ XML_SCHEMAS_ENTITY,
+ XML_SCHEMAS_ENTITIES,
+ XML_SCHEMAS_NOTATION,
+ XML_SCHEMAS_ANYURI,
+ XML_SCHEMAS_INTEGER,
+ XML_SCHEMAS_NPINTEGER,
+ XML_SCHEMAS_NINTEGER,
+ XML_SCHEMAS_NNINTEGER,
+ XML_SCHEMAS_PINTEGER,
+ XML_SCHEMAS_INT,
+ XML_SCHEMAS_UINT,
+ XML_SCHEMAS_LONG,
+ XML_SCHEMAS_ULONG,
+ XML_SCHEMAS_SHORT,
+ XML_SCHEMAS_USHORT,
+ XML_SCHEMAS_BYTE,
+ XML_SCHEMAS_UBYTE,
+ XML_SCHEMAS_HEXBINARY,
+ XML_SCHEMAS_BASE64BINARY,
+ XML_SCHEMAS_ANYTYPE,
+ XML_SCHEMAS_ANYSIMPLETYPE
+} xmlSchemaValType;
+
+/*
+ * XML Schemas defines multiple type of types.
+ */
+typedef enum {
+ XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
+ XML_SCHEMA_TYPE_ANY,
+ XML_SCHEMA_TYPE_FACET,
+ XML_SCHEMA_TYPE_SIMPLE,
+ XML_SCHEMA_TYPE_COMPLEX,
+ XML_SCHEMA_TYPE_SEQUENCE = 6,
+ XML_SCHEMA_TYPE_CHOICE,
+ XML_SCHEMA_TYPE_ALL,
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT,
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT,
+ XML_SCHEMA_TYPE_UR,
+ XML_SCHEMA_TYPE_RESTRICTION,
+ XML_SCHEMA_TYPE_EXTENSION,
+ XML_SCHEMA_TYPE_ELEMENT,
+ XML_SCHEMA_TYPE_ATTRIBUTE,
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
+ XML_SCHEMA_TYPE_GROUP,
+ XML_SCHEMA_TYPE_NOTATION,
+ XML_SCHEMA_TYPE_LIST,
+ XML_SCHEMA_TYPE_UNION,
+ XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+ XML_SCHEMA_TYPE_IDC_UNIQUE,
+ XML_SCHEMA_TYPE_IDC_KEY,
+ XML_SCHEMA_TYPE_IDC_KEYREF,
+ XML_SCHEMA_TYPE_PARTICLE = 25,
+ XML_SCHEMA_TYPE_ATTRIBUTE_USE,
+ XML_SCHEMA_FACET_MININCLUSIVE = 1000,
+ XML_SCHEMA_FACET_MINEXCLUSIVE,
+ XML_SCHEMA_FACET_MAXINCLUSIVE,
+ XML_SCHEMA_FACET_MAXEXCLUSIVE,
+ XML_SCHEMA_FACET_TOTALDIGITS,
+ XML_SCHEMA_FACET_FRACTIONDIGITS,
+ XML_SCHEMA_FACET_PATTERN,
+ XML_SCHEMA_FACET_ENUMERATION,
+ XML_SCHEMA_FACET_WHITESPACE,
+ XML_SCHEMA_FACET_LENGTH,
+ XML_SCHEMA_FACET_MAXLENGTH,
+ XML_SCHEMA_FACET_MINLENGTH,
+ XML_SCHEMA_EXTRA_QNAMEREF = 2000,
+ XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
+} xmlSchemaTypeType;
+
+typedef enum {
+ XML_SCHEMA_CONTENT_UNKNOWN = 0,
+ XML_SCHEMA_CONTENT_EMPTY = 1,
+ XML_SCHEMA_CONTENT_ELEMENTS,
+ XML_SCHEMA_CONTENT_MIXED,
+ XML_SCHEMA_CONTENT_SIMPLE,
+ XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
+ XML_SCHEMA_CONTENT_BASIC,
+ XML_SCHEMA_CONTENT_ANY
+} xmlSchemaContentType;
+
+typedef struct _xmlSchemaVal xmlSchemaVal;
+typedef xmlSchemaVal *xmlSchemaValPtr;
+
+typedef struct _xmlSchemaType xmlSchemaType;
+typedef xmlSchemaType *xmlSchemaTypePtr;
+
+typedef struct _xmlSchemaFacet xmlSchemaFacet;
+typedef xmlSchemaFacet *xmlSchemaFacetPtr;
+
+/**
+ * Annotation
+ */
+typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
+typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
+struct _xmlSchemaAnnot {
+ struct _xmlSchemaAnnot *next;
+ xmlNodePtr content; /* the annotation */
+};
+
+/**
+ * XML_SCHEMAS_ANYATTR_SKIP:
+ *
+ * Skip unknown attribute from validation
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_SKIP 1
+/**
+ * XML_SCHEMAS_ANYATTR_LAX:
+ *
+ * Ignore validation non definition on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_LAX 2
+/**
+ * XML_SCHEMAS_ANYATTR_STRICT:
+ *
+ * Apply strict validation rules on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_STRICT 3
+/**
+ * XML_SCHEMAS_ANY_SKIP:
+ *
+ * Skip unknown attribute from validation
+ */
+#define XML_SCHEMAS_ANY_SKIP 1
+/**
+ * XML_SCHEMAS_ANY_LAX:
+ *
+ * Used by wildcards.
+ * Validate if type found, don't worry if not found
+ */
+#define XML_SCHEMAS_ANY_LAX 2
+/**
+ * XML_SCHEMAS_ANY_STRICT:
+ *
+ * Used by wildcards.
+ * Apply strict validation rules
+ */
+#define XML_SCHEMAS_ANY_STRICT 3
+/**
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
+ *
+ * Used by wildcards.
+ * The attribute is prohibited.
+ */
+#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
+/**
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
+ *
+ * The attribute is required.
+ */
+#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
+/**
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
+ *
+ * The attribute is optional.
+ */
+#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
+/**
+ * XML_SCHEMAS_ATTR_GLOBAL:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
+/**
+ * XML_SCHEMAS_ATTR_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
+ *
+ * this is set when the "type" and "ref" references
+ * have been resolved.
+ */
+#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
+/**
+ * XML_SCHEMAS_ATTR_FIXED:
+ *
+ * the attribute has a fixed value
+ */
+#define XML_SCHEMAS_ATTR_FIXED 1 << 9
+
+/**
+ * xmlSchemaAttribute:
+ * An attribute definition.
+ */
+
+typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
+typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
+struct _xmlSchemaAttribute {
+ xmlSchemaTypeType type;
+ struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
+ const xmlChar *name; /* the name of the declaration */
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ const xmlChar *typeName; /* the local name of the type definition */
+ const xmlChar *typeNs; /* the ns URI of the type definition */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaTypePtr base; /* Deprecated; not used */
+ int occurs; /* Deprecated; not used */
+ const xmlChar *defValue; /* The initial value of the value constraint */
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlNodePtr node;
+ const xmlChar *targetNamespace;
+ int flags;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value constraint */
+ xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
+};
+
+/**
+ * xmlSchemaAttributeLink:
+ * Used to build a list of attribute uses on complexType definitions.
+ * WARNING: Deprecated; not used.
+ */
+typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
+typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
+struct _xmlSchemaAttributeLink {
+ struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
+ struct _xmlSchemaAttribute *attr;/* the linked attribute */
+};
+
+/**
+ * XML_SCHEMAS_WILDCARD_COMPLETE:
+ *
+ * If the wildcard is complete.
+ */
+#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
+
+/**
+ * xmlSchemaCharValueLink:
+ * Used to build a list of namespaces on wildcards.
+ */
+typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
+typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
+struct _xmlSchemaWildcardNs {
+ struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
+ const xmlChar *value;/* the value */
+};
+
+/**
+ * xmlSchemaWildcard.
+ * A wildcard.
+ */
+typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
+typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
+struct _xmlSchemaWildcard {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *id; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+ int processContents;
+ int any; /* Indicates if the ns constraint is of ##any */
+ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
+ xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
+ int flags;
+};
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
+ *
+ * The attribute wildcard has been already builded.
+ */
+#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
+/**
+ * XML_SCHEMAS_ATTRGROUP_GLOBAL:
+ *
+ * The attribute wildcard has been already builded.
+ */
+#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ATTRGROUP_MARKED:
+ *
+ * Marks the attr group as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
+ *
+ * The attr group was redefined.
+ */
+#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
+/**
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
+ *
+ * Whether this attr. group contains attr. group references.
+ */
+#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
+
+/**
+ * An attribute group definition.
+ *
+ * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
+ * must be kept similar
+ */
+typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
+typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
+struct _xmlSchemaAttributeGroup {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
+ const xmlChar *name;
+ const xmlChar *id;
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int flags;
+ xmlSchemaWildcardPtr attributeWildcard;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/**
+ * xmlSchemaTypeLink:
+ * Used to build a list of types (e.g. member types of
+ * simpleType with variety "union").
+ */
+typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
+typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
+struct _xmlSchemaTypeLink {
+ struct _xmlSchemaTypeLink *next;/* the next type link ... */
+ xmlSchemaTypePtr type;/* the linked type */
+};
+
+/**
+ * xmlSchemaFacetLink:
+ * Used to build a list of facets.
+ */
+typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
+typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
+struct _xmlSchemaFacetLink {
+ struct _xmlSchemaFacetLink *next;/* the next facet link ... */
+ xmlSchemaFacetPtr facet;/* the linked facet */
+};
+
+/**
+ * XML_SCHEMAS_TYPE_MIXED:
+ *
+ * the element content type is mixed
+ */
+#define XML_SCHEMAS_TYPE_MIXED 1 << 0
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
+ *
+ * the simple or complex type has a derivation method of "extension".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
+ *
+ * the simple or complex type has a derivation method of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
+/**
+ * XML_SCHEMAS_TYPE_GLOBAL:
+ *
+ * the type is global
+ */
+#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
+/**
+ * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
+ *
+ * the complexType owns an attribute wildcard, i.e.
+ * it can be freed by the complexType
+ */
+#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
+ *
+ * the simpleType has a variety of "absent".
+ * TODO: Actually not necessary :-/, since if
+ * none of the variety flags occur then it's
+ * automatically absent.
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_LIST:
+ *
+ * the simpleType has a variety of "list".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_UNION:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
+/**
+ * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
+ *
+ * the complexType has a final of "extension".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
+/**
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
+ *
+ * the simpleType/complexType has a final of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
+/**
+ * XML_SCHEMAS_TYPE_FINAL_LIST:
+ *
+ * the simpleType has a final of "list".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
+/**
+ * XML_SCHEMAS_TYPE_FINAL_UNION:
+ *
+ * the simpleType has a final of "union".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
+/**
+ * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
+ *
+ * the simpleType has a final of "default".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
+/**
+ * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
+ *
+ * Marks the item as a builtin primitive.
+ */
+#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
+/**
+ * XML_SCHEMAS_TYPE_MARKED:
+ *
+ * Marks the item as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_TYPE_MARKED 1 << 16
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
+ *
+ * the complexType did not specify 'block' so use the default of the
+ * <schema> item.
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
+ *
+ * the complexType has a 'block' of "extension".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
+ *
+ * the complexType has a 'block' of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
+/**
+ * XML_SCHEMAS_TYPE_ABSTRACT:
+ *
+ * the simple/complexType is abstract.
+ */
+#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
+/**
+ * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
+ *
+ * indicates if the facets need a computed value
+ */
+#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
+ *
+ * indicates that the type was typefixed
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
+ *
+ * indicates that the type is invalid
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
+ *
+ * a whitespace-facet value of "preserve"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
+ *
+ * a whitespace-facet value of "replace"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
+ *
+ * a whitespace-facet value of "collapse"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
+/**
+ * XML_SCHEMAS_TYPE_HAS_FACETS:
+ *
+ * has facets
+ */
+#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
+/**
+ * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
+ *
+ * indicates if the facets (pattern) need a normalized value
+ */
+#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
+
+/**
+ * XML_SCHEMAS_TYPE_FIXUP_1:
+ *
+ * First stage of fixup was done.
+ */
+#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
+
+/**
+ * XML_SCHEMAS_TYPE_REDEFINED:
+ *
+ * The type was redefined.
+ */
+#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
+/**
+ * XML_SCHEMAS_TYPE_REDEFINING:
+ *
+ * The type redefines an other type.
+ */
+/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
+
+/**
+ * _xmlSchemaType:
+ *
+ * Schemas type definition.
+ */
+struct _xmlSchemaType {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* the next type if in a sequence ... */
+ const xmlChar *name;
+ const xmlChar *id ; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes;
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ xmlSchemaContentType contentType;
+ const xmlChar *base; /* Base type's local name */
+ const xmlChar *baseNs; /* Base type's target namespace */
+ xmlSchemaTypePtr baseType; /* The base type component */
+ xmlSchemaFacetPtr facets; /* Local facets */
+ struct _xmlSchemaType *redef; /* Deprecated; not used */
+ int recurse; /* Obsolete */
+ xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
+ xmlSchemaWildcardPtr attributeWildcard;
+ int builtInType; /* Type of built-in types. */
+ xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
+ xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
+ Could we use @subtypes for this? */
+ xmlRegexpPtr contModel; /* Holds the automaton of the content model */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/*
+ * xmlSchemaElement:
+ * An element definition.
+ *
+ * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
+ * structures must be kept similar
+ */
+/**
+ * XML_SCHEMAS_ELEM_NILLABLE:
+ *
+ * the element is nillable
+ */
+#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
+/**
+ * XML_SCHEMAS_ELEM_GLOBAL:
+ *
+ * the element is global
+ */
+#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ELEM_DEFAULT:
+ *
+ * the element has a default value
+ */
+#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
+/**
+ * XML_SCHEMAS_ELEM_FIXED:
+ *
+ * the element has a fixed value
+ */
+#define XML_SCHEMAS_ELEM_FIXED 1 << 3
+/**
+ * XML_SCHEMAS_ELEM_ABSTRACT:
+ *
+ * the element is abstract
+ */
+#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
+/**
+ * XML_SCHEMAS_ELEM_TOPLEVEL:
+ *
+ * the element is top level
+ * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
+ */
+#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
+/**
+ * XML_SCHEMAS_ELEM_REF:
+ *
+ * the element is a reference to a type
+ */
+#define XML_SCHEMAS_ELEM_REF 1 << 6
+/**
+ * XML_SCHEMAS_ELEM_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
+ *
+ * this is set when "type", "ref", "substitutionGroup"
+ * references have been resolved.
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
+ /**
+ * XML_SCHEMAS_ELEM_CIRCULAR:
+ *
+ * a helper flag for the search of circular references.
+ */
+#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
+ *
+ * the "block" attribute is absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
+ *
+ * disallowed substitutions are absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
+ *
+ * disallowed substitutions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
+ *
+ * disallowed substitutions: "substituion"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
+/**
+ * XML_SCHEMAS_ELEM_FINAL_ABSENT:
+ *
+ * substitution group exclusions are absent
+ */
+#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
+/**
+ * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
+ *
+ * substitution group exclusions: "extension"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
+/**
+ * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
+ *
+ * substitution group exclusions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
+/**
+ * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
+ *
+ * the declaration is a substitution group head
+ */
+#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
+ *
+ * this is set when the elem decl has been checked against
+ * all constraints
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
+
+typedef struct _xmlSchemaElement xmlSchemaElement;
+typedef xmlSchemaElement *xmlSchemaElementPtr;
+struct _xmlSchemaElement {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* Not used? */
+ const xmlChar *name;
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlSchemaAttributePtr attributes;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ const xmlChar *targetNamespace;
+ const xmlChar *namedType;
+ const xmlChar *namedTypeNs;
+ const xmlChar *substGroup;
+ const xmlChar *substGroupNs;
+ const xmlChar *scope;
+ const xmlChar *value; /* The original value of the value constraint. */
+ struct _xmlSchemaElement *refDecl; /* This will now be used for the
+ substitution group affiliation */
+ xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
+ xmlSchemaContentType contentType;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value contraint. */
+ void *idcs; /* The identity-constraint defs */
+};
+
+/*
+ * XML_SCHEMAS_FACET_UNKNOWN:
+ *
+ * unknown facet handling
+ */
+#define XML_SCHEMAS_FACET_UNKNOWN 0
+/*
+ * XML_SCHEMAS_FACET_PRESERVE:
+ *
+ * preserve the type of the facet
+ */
+#define XML_SCHEMAS_FACET_PRESERVE 1
+/*
+ * XML_SCHEMAS_FACET_REPLACE:
+ *
+ * replace the type of the facet
+ */
+#define XML_SCHEMAS_FACET_REPLACE 2
+/*
+ * XML_SCHEMAS_FACET_COLLAPSE:
+ *
+ * collapse the types of the facet
+ */
+#define XML_SCHEMAS_FACET_COLLAPSE 3
+/**
+ * A facet definition.
+ */
+struct _xmlSchemaFacet {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
+ const xmlChar *value; /* The original value */
+ const xmlChar *id; /* Obsolete */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
+ int whitespace;
+ xmlSchemaValPtr val; /* The compiled value */
+ xmlRegexpPtr regexp; /* The regex for patterns */
+};
+
+/**
+ * A notation definition.
+ */
+typedef struct _xmlSchemaNotation xmlSchemaNotation;
+typedef xmlSchemaNotation *xmlSchemaNotationPtr;
+struct _xmlSchemaNotation {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *name;
+ xmlSchemaAnnotPtr annot;
+ const xmlChar *identifier;
+ const xmlChar *targetNamespace;
+};
+
+/*
+* TODO: Actually all those flags used for the schema should sit
+* on the schema parser context, since they are used only
+* during parsing an XML schema document, and not available
+* on the component level as per spec.
+*/
+/**
+ * XML_SCHEMAS_QUALIF_ELEM:
+ *
+ * Reflects elementFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
+/**
+ * XML_SCHEMAS_QUALIF_ATTR:
+ *
+ * Reflects attributeFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_LIST:
+ *
+ * the cshema has "list" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_UNION:
+ *
+ * the schema has "union" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
+ *
+ * the schema has "substitution" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
+/**
+ * XML_SCHEMAS_INCLUDING_CONVERT_NS:
+ *
+ * the schema is currently including an other schema with
+ * no target namespace.
+ */
+#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
+/**
+ * _xmlSchema:
+ *
+ * A Schemas definition
+ */
+struct _xmlSchema {
+ const xmlChar *name; /* schema name */
+ const xmlChar *targetNamespace; /* the target namespace */
+ const xmlChar *version;
+ const xmlChar *id; /* Obsolete */
+ xmlDocPtr doc;
+ xmlSchemaAnnotPtr annot;
+ int flags;
+
+ xmlHashTablePtr typeDecl;
+ xmlHashTablePtr attrDecl;
+ xmlHashTablePtr attrgrpDecl;
+ xmlHashTablePtr elemDecl;
+ xmlHashTablePtr notaDecl;
+
+ xmlHashTablePtr schemasImports;
+
+ void *_private; /* unused by the library for users or bindings */
+ xmlHashTablePtr groupDecl;
+ xmlDictPtr dict;
+ void *includes; /* the includes, this is opaque for now */
+ int preserve; /* whether to free the document */
+ int counter; /* used to give ononymous components unique names */
+ xmlHashTablePtr idcDef; /* All identity-constraint defs. */
+ void *volatiles; /* Obsolete */
+};
+
+XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
+XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_INTERNALS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/schematron.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/schematron.h
new file mode 100644
index 0000000..af7bea6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/schematron.h
@@ -0,0 +1,142 @@
+/*
+ * Summary: XML Schemastron implementation
+ * Description: interface to the XML Schematron validity checking.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMATRON_H__
+#define __XML_SCHEMATRON_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
+ XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
+ XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
+ XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
+ XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
+ XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
+ XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
+} xmlSchematronValidOptions;
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchematron xmlSchematron;
+typedef xmlSchematron *xmlSchematronPtr;
+
+/**
+ * xmlSchematronValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlSchematronValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
+typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
+
+typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
+typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewMemParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
+/*****
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc * err,
+ xmlSchematronValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
+ *****/
+XMLPUBFUN xmlSchematronPtr XMLCALL
+ xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFree (xmlSchematronPtr schema);
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetValidStructuredErrors(
+ xmlSchematronValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+/******
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc *err,
+ xmlSchematronValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+ *******/
+
+XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
+ xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
+ int options);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMATRON_ENABLED */
+#endif /* __XML_SCHEMATRON_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/threads.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/threads.h
new file mode 100644
index 0000000..d31f16a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/threads.h
@@ -0,0 +1,84 @@
+/**
+ * Summary: interfaces for thread handling
+ * Description: set of generic threading related routines
+ * should work with pthreads, Windows native or TLS threads
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_THREADS_H__
+#define __XML_THREADS_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlMutex are a simple mutual exception locks.
+ */
+typedef struct _xmlMutex xmlMutex;
+typedef xmlMutex *xmlMutexPtr;
+
+/*
+ * xmlRMutex are reentrant mutual exception locks.
+ */
+typedef struct _xmlRMutex xmlRMutex;
+typedef xmlRMutex *xmlRMutexPtr;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/globals.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN xmlMutexPtr XMLCALL
+ xmlNewMutex (void);
+XMLPUBFUN void XMLCALL
+ xmlMutexLock (xmlMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlMutexUnlock (xmlMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlFreeMutex (xmlMutexPtr tok);
+
+XMLPUBFUN xmlRMutexPtr XMLCALL
+ xmlNewRMutex (void);
+XMLPUBFUN void XMLCALL
+ xmlRMutexLock (xmlRMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlRMutexUnlock (xmlRMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlFreeRMutex (xmlRMutexPtr tok);
+
+/*
+ * Library wide APIs.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitThreads (void);
+XMLPUBFUN void XMLCALL
+ xmlLockLibrary (void);
+XMLPUBFUN void XMLCALL
+ xmlUnlockLibrary(void);
+XMLPUBFUN int XMLCALL
+ xmlGetThreadId (void);
+XMLPUBFUN int XMLCALL
+ xmlIsMainThread (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupThreads(void);
+XMLPUBFUN xmlGlobalStatePtr XMLCALL
+ xmlGetGlobalState(void);
+
+#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
+int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XML_THREADS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/tree.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/tree.h
new file mode 100644
index 0000000..17fd1e4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/tree.h
@@ -0,0 +1,1252 @@
+/*
+ * Summary: interfaces for tree manipulation
+ * Description: this module describes the structures found in an tree resulting
+ * from an XML or HTML parsing, as well as the API provided for
+ * various processing on that tree
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_TREE_H__
+#define __XML_TREE_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Some of the basic types pointer to structures:
+ */
+/* xmlIO.h */
+typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
+typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
+
+typedef struct _xmlOutputBuffer xmlOutputBuffer;
+typedef xmlOutputBuffer *xmlOutputBufferPtr;
+
+/* parser.h */
+typedef struct _xmlParserInput xmlParserInput;
+typedef xmlParserInput *xmlParserInputPtr;
+
+typedef struct _xmlParserCtxt xmlParserCtxt;
+typedef xmlParserCtxt *xmlParserCtxtPtr;
+
+typedef struct _xmlSAXLocator xmlSAXLocator;
+typedef xmlSAXLocator *xmlSAXLocatorPtr;
+
+typedef struct _xmlSAXHandler xmlSAXHandler;
+typedef xmlSAXHandler *xmlSAXHandlerPtr;
+
+/* entities.h */
+typedef struct _xmlEntity xmlEntity;
+typedef xmlEntity *xmlEntityPtr;
+
+/**
+ * BASE_BUFFER_SIZE:
+ *
+ * default buffer size 4000.
+ */
+#define BASE_BUFFER_SIZE 4096
+
+/**
+ * LIBXML_NAMESPACE_DICT:
+ *
+ * Defines experimental behaviour:
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
+ */
+/* #define LIBXML_NAMESPACE_DICT */
+
+/**
+ * xmlBufferAllocationScheme:
+ *
+ * A buffer allocation scheme can be defined to either match exactly the
+ * need or double it's allocated size each time it is found too small.
+ */
+
+typedef enum {
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
+ XML_BUFFER_ALLOC_IO /* special allocation scheme used for I/O */
+} xmlBufferAllocationScheme;
+
+/**
+ * xmlBuffer:
+ *
+ * A buffer structure.
+ */
+typedef struct _xmlBuffer xmlBuffer;
+typedef xmlBuffer *xmlBufferPtr;
+struct _xmlBuffer {
+ xmlChar *content; /* The buffer content UTF8 */
+ unsigned int use; /* The buffer size used */
+ unsigned int size; /* The buffer size */
+ xmlBufferAllocationScheme alloc; /* The realloc method */
+ xmlChar *contentIO; /* in IO mode we may have a different base */
+};
+
+/**
+ * XML_XML_NAMESPACE:
+ *
+ * This is the namespace for the special xml: prefix predefined in the
+ * XML Namespace specification.
+ */
+#define XML_XML_NAMESPACE \
+ (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
+
+/**
+ * XML_XML_ID:
+ *
+ * This is the name for the special xml:id attribute
+ */
+#define XML_XML_ID (const xmlChar *) "xml:id"
+
+/*
+ * The different element types carried by an XML tree.
+ *
+ * NOTE: This is synchronized with DOM Level1 values
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
+ */
+typedef enum {
+ XML_ELEMENT_NODE= 1,
+ XML_ATTRIBUTE_NODE= 2,
+ XML_TEXT_NODE= 3,
+ XML_CDATA_SECTION_NODE= 4,
+ XML_ENTITY_REF_NODE= 5,
+ XML_ENTITY_NODE= 6,
+ XML_PI_NODE= 7,
+ XML_COMMENT_NODE= 8,
+ XML_DOCUMENT_NODE= 9,
+ XML_DOCUMENT_TYPE_NODE= 10,
+ XML_DOCUMENT_FRAG_NODE= 11,
+ XML_NOTATION_NODE= 12,
+ XML_HTML_DOCUMENT_NODE= 13,
+ XML_DTD_NODE= 14,
+ XML_ELEMENT_DECL= 15,
+ XML_ATTRIBUTE_DECL= 16,
+ XML_ENTITY_DECL= 17,
+ XML_NAMESPACE_DECL= 18,
+ XML_XINCLUDE_START= 19,
+ XML_XINCLUDE_END= 20
+#ifdef LIBXML_DOCB_ENABLED
+ ,XML_DOCB_DOCUMENT_NODE= 21
+#endif
+} xmlElementType;
+
+
+/**
+ * xmlNotation:
+ *
+ * A DTD Notation definition.
+ */
+
+typedef struct _xmlNotation xmlNotation;
+typedef xmlNotation *xmlNotationPtr;
+struct _xmlNotation {
+ const xmlChar *name; /* Notation name */
+ const xmlChar *PublicID; /* Public identifier, if any */
+ const xmlChar *SystemID; /* System identifier, if any */
+};
+
+/**
+ * xmlAttributeType:
+ *
+ * A DTD Attribute type definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_CDATA = 1,
+ XML_ATTRIBUTE_ID,
+ XML_ATTRIBUTE_IDREF ,
+ XML_ATTRIBUTE_IDREFS,
+ XML_ATTRIBUTE_ENTITY,
+ XML_ATTRIBUTE_ENTITIES,
+ XML_ATTRIBUTE_NMTOKEN,
+ XML_ATTRIBUTE_NMTOKENS,
+ XML_ATTRIBUTE_ENUMERATION,
+ XML_ATTRIBUTE_NOTATION
+} xmlAttributeType;
+
+/**
+ * xmlAttributeDefault:
+ *
+ * A DTD Attribute default definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_NONE = 1,
+ XML_ATTRIBUTE_REQUIRED,
+ XML_ATTRIBUTE_IMPLIED,
+ XML_ATTRIBUTE_FIXED
+} xmlAttributeDefault;
+
+/**
+ * xmlEnumeration:
+ *
+ * List structure used when there is an enumeration in DTDs.
+ */
+
+typedef struct _xmlEnumeration xmlEnumeration;
+typedef xmlEnumeration *xmlEnumerationPtr;
+struct _xmlEnumeration {
+ struct _xmlEnumeration *next; /* next one */
+ const xmlChar *name; /* Enumeration name */
+};
+
+/**
+ * xmlAttribute:
+ *
+ * An Attribute declaration in a DTD.
+ */
+
+typedef struct _xmlAttribute xmlAttribute;
+typedef xmlAttribute *xmlAttributePtr;
+struct _xmlAttribute {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
+ const xmlChar *name; /* Attribute name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ struct _xmlAttribute *nexth; /* next in hash table */
+ xmlAttributeType atype; /* The attribute type */
+ xmlAttributeDefault def; /* the default */
+ const xmlChar *defaultValue; /* or the default value */
+ xmlEnumerationPtr tree; /* or the enumeration tree if any */
+ const xmlChar *prefix; /* the namespace prefix if any */
+ const xmlChar *elem; /* Element holding the attribute */
+};
+
+/**
+ * xmlElementContentType:
+ *
+ * Possible definitions of element content types.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_PCDATA = 1,
+ XML_ELEMENT_CONTENT_ELEMENT,
+ XML_ELEMENT_CONTENT_SEQ,
+ XML_ELEMENT_CONTENT_OR
+} xmlElementContentType;
+
+/**
+ * xmlElementContentOccur:
+ *
+ * Possible definitions of element content occurrences.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_ONCE = 1,
+ XML_ELEMENT_CONTENT_OPT,
+ XML_ELEMENT_CONTENT_MULT,
+ XML_ELEMENT_CONTENT_PLUS
+} xmlElementContentOccur;
+
+/**
+ * xmlElementContent:
+ *
+ * An XML Element content as stored after parsing an element definition
+ * in a DTD.
+ */
+
+typedef struct _xmlElementContent xmlElementContent;
+typedef xmlElementContent *xmlElementContentPtr;
+struct _xmlElementContent {
+ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
+ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
+ const xmlChar *name; /* Element name */
+ struct _xmlElementContent *c1; /* first child */
+ struct _xmlElementContent *c2; /* second child */
+ struct _xmlElementContent *parent; /* parent */
+ const xmlChar *prefix; /* Namespace prefix */
+};
+
+/**
+ * xmlElementTypeVal:
+ *
+ * The different possibilities for an element content type.
+ */
+
+typedef enum {
+ XML_ELEMENT_TYPE_UNDEFINED = 0,
+ XML_ELEMENT_TYPE_EMPTY = 1,
+ XML_ELEMENT_TYPE_ANY,
+ XML_ELEMENT_TYPE_MIXED,
+ XML_ELEMENT_TYPE_ELEMENT
+} xmlElementTypeVal;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/xmlregexp.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlElement:
+ *
+ * An XML Element declaration from a DTD.
+ */
+
+typedef struct _xmlElement xmlElement;
+typedef xmlElement *xmlElementPtr;
+struct _xmlElement {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
+ const xmlChar *name; /* Element name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlElementTypeVal etype; /* The type */
+ xmlElementContentPtr content; /* the allowed element content */
+ xmlAttributePtr attributes; /* List of the declared attributes */
+ const xmlChar *prefix; /* the namespace prefix if any */
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlRegexpPtr contModel; /* the validating regexp */
+#else
+ void *contModel;
+#endif
+};
+
+
+/**
+ * XML_LOCAL_NAMESPACE:
+ *
+ * A namespace declaration node.
+ */
+#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
+typedef xmlElementType xmlNsType;
+
+/**
+ * xmlNs:
+ *
+ * An XML namespace.
+ * Note that prefix == NULL is valid, it defines the default namespace
+ * within the subtree (until overridden).
+ *
+ * xmlNsType is unified with xmlElementType.
+ */
+
+typedef struct _xmlNs xmlNs;
+typedef xmlNs *xmlNsPtr;
+struct _xmlNs {
+ struct _xmlNs *next; /* next Ns link for this node */
+ xmlNsType type; /* global or local */
+ const xmlChar *href; /* URL for the namespace */
+ const xmlChar *prefix; /* prefix for the namespace */
+ void *_private; /* application data */
+ struct _xmlDoc *context; /* normally an xmlDoc */
+};
+
+/**
+ * xmlDtd:
+ *
+ * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
+ * the internal subset and for the external subset.
+ */
+typedef struct _xmlDtd xmlDtd;
+typedef xmlDtd *xmlDtdPtr;
+struct _xmlDtd {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DTD_NODE, must be second ! */
+ const xmlChar *name; /* Name of the DTD */
+ struct _xmlNode *children; /* the value of the property link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlDoc *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ void *notations; /* Hash table for notations if any */
+ void *elements; /* Hash table for elements if any */
+ void *attributes; /* Hash table for attributes if any */
+ void *entities; /* Hash table for entities if any */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
+ void *pentities; /* Hash table for param entities if any */
+};
+
+/**
+ * xmlAttr:
+ *
+ * An attribute on an XML node.
+ */
+typedef struct _xmlAttr xmlAttr;
+typedef xmlAttr *xmlAttrPtr;
+struct _xmlAttr {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
+ const xmlChar *name; /* the name of the property */
+ struct _xmlNode *children; /* the value of the property */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlAttr *next; /* next sibling link */
+ struct _xmlAttr *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlAttributeType atype; /* the attribute type if validating */
+ void *psvi; /* for type/PSVI informations */
+};
+
+/**
+ * xmlID:
+ *
+ * An XML ID instance.
+ */
+
+typedef struct _xmlID xmlID;
+typedef xmlID *xmlIDPtr;
+struct _xmlID {
+ struct _xmlID *next; /* next ID */
+ const xmlChar *value; /* The ID name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+ struct _xmlDoc *doc; /* The document holding the ID */
+};
+
+/**
+ * xmlRef:
+ *
+ * An XML IDREF instance.
+ */
+
+typedef struct _xmlRef xmlRef;
+typedef xmlRef *xmlRefPtr;
+struct _xmlRef {
+ struct _xmlRef *next; /* next Ref */
+ const xmlChar *value; /* The Ref name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+};
+
+/**
+ * xmlNode:
+ *
+ * A node in an XML tree.
+ */
+typedef struct _xmlNode xmlNode;
+typedef xmlNode *xmlNodePtr;
+struct _xmlNode {
+ void *_private; /* application data */
+ xmlElementType type; /* type number, must be second ! */
+ const xmlChar *name; /* the name of the node, or the entity */
+ struct _xmlNode *children; /* parent->childs link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlChar *content; /* the content */
+ struct _xmlAttr *properties;/* properties list */
+ xmlNs *nsDef; /* namespace definitions on this node */
+ void *psvi; /* for type/PSVI informations */
+ unsigned short line; /* line number */
+ unsigned short extra; /* extra data for XPath/XSLT */
+};
+
+/**
+ * XML_GET_CONTENT:
+ *
+ * Macro to extract the content pointer of a node.
+ */
+#define XML_GET_CONTENT(n) \
+ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
+
+/**
+ * XML_GET_LINE:
+ *
+ * Macro to extract the line number of an element node.
+ */
+#define XML_GET_LINE(n) \
+ (xmlGetLineNo(n))
+
+/**
+ * xmlDocProperty
+ *
+ * Set of properties of the document as found by the parser
+ * Some of them are linked to similary named xmlParserOption
+ */
+typedef enum {
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
+ and not by parsing an instance */
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
+} xmlDocProperties;
+
+/**
+ * xmlDoc:
+ *
+ * An XML document.
+ */
+typedef struct _xmlDoc xmlDoc;
+typedef xmlDoc *xmlDocPtr;
+struct _xmlDoc {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
+ char *name; /* name/filename/URI of the document */
+ struct _xmlNode *children; /* the document tree */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* autoreference to itself */
+
+ /* End of common part */
+ int compression;/* level of zlib compression */
+ int standalone; /* standalone document (no external refs)
+ 1 if standalone="yes"
+ 0 if standalone="no"
+ -1 if there is no XML declaration
+ -2 if there is an XML declaration, but no
+ standalone attribute was specified */
+ struct _xmlDtd *intSubset; /* the document internal subset */
+ struct _xmlDtd *extSubset; /* the document external subset */
+ struct _xmlNs *oldNs; /* Global namespace, the old way */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* external initial encoding, if any */
+ void *ids; /* Hash table for ID attributes if any */
+ void *refs; /* Hash table for IDREFs attributes if any */
+ const xmlChar *URL; /* The URI for that document */
+ int charset; /* encoding of the in-memory content
+ actually an xmlCharEncoding */
+ struct _xmlDict *dict; /* dict used to allocate names or NULL */
+ void *psvi; /* for type/PSVI informations */
+ int parseFlags; /* set of xmlParserOption used to parse the
+ document */
+ int properties; /* set of xmlDocProperties for this document
+ set at the end of parsing */
+};
+
+
+typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
+typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
+
+/**
+ * xmlDOMWrapAcquireNsFunction:
+ * @ctxt: a DOM wrapper context
+ * @node: the context node (element or attribute)
+ * @nsName: the requested namespace name
+ * @nsPrefix: the requested namespace prefix
+ *
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
+ *
+ * Returns an xmlNsPtr or NULL in case of an error.
+ */
+typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr node,
+ const xmlChar *nsName,
+ const xmlChar *nsPrefix);
+
+/**
+ * xmlDOMWrapCtxt:
+ *
+ * Context for DOM wrapper-operations.
+ */
+struct _xmlDOMWrapCtxt {
+ void * _private;
+ /*
+ * The type of this context, just in case we need specialized
+ * contexts in the future.
+ */
+ int type;
+ /*
+ * Internal namespace map used for various operations.
+ */
+ void * namespaceMap;
+ /*
+ * Use this one to acquire an xmlNsPtr intended for node->ns.
+ * (Note that this is not intended for elem->nsDef).
+ */
+ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
+};
+
+/**
+ * xmlChildrenNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children."
+ */
+#ifndef xmlChildrenNode
+#define xmlChildrenNode children
+#endif
+
+/**
+ * xmlRootNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children".
+ */
+#ifndef xmlRootNode
+#define xmlRootNode children
+#endif
+
+/*
+ * Variables.
+ */
+
+/*
+ * Some helper functions
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateNCName (const xmlChar *value,
+ int space);
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateQName (const xmlChar *value,
+ int space);
+XMLPUBFUN int XMLCALL
+ xmlValidateName (const xmlChar *value,
+ int space);
+XMLPUBFUN int XMLCALL
+ xmlValidateNMToken (const xmlChar *value,
+ int space);
+#endif
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildQName (const xmlChar *ncname,
+ const xmlChar *prefix,
+ xmlChar *memory,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSplitQName2 (const xmlChar *name,
+ xmlChar **prefix);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSplitQName3 (const xmlChar *name,
+ int *len);
+
+/*
+ * Handling Buffers.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL
+ xmlGetBufferAllocationScheme(void);
+
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreate (void);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateSize (size_t size);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateStatic (void *mem,
+ size_t size);
+XMLPUBFUN int XMLCALL
+ xmlBufferResize (xmlBufferPtr buf,
+ unsigned int size);
+XMLPUBFUN void XMLCALL
+ xmlBufferFree (xmlBufferPtr buf);
+XMLPUBFUN int XMLCALL
+ xmlBufferDump (FILE *file,
+ xmlBufferPtr buf);
+XMLPUBFUN int XMLCALL
+ xmlBufferAdd (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferAddHead (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferCat (xmlBufferPtr buf,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlBufferCCat (xmlBufferPtr buf,
+ const char *str);
+XMLPUBFUN int XMLCALL
+ xmlBufferShrink (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferGrow (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN void XMLCALL
+ xmlBufferEmpty (xmlBufferPtr buf);
+XMLPUBFUN const xmlChar* XMLCALL
+ xmlBufferContent (const xmlBufferPtr buf);
+XMLPUBFUN void XMLCALL
+ xmlBufferSetAllocationScheme(xmlBufferPtr buf,
+ xmlBufferAllocationScheme scheme);
+XMLPUBFUN int XMLCALL
+ xmlBufferLength (const xmlBufferPtr buf);
+
+/*
+ * Creating/freeing new structures.
+ */
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlCreateIntSubset (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlNewDtd (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlGetIntSubset (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlFreeDtd (xmlDtdPtr cur);
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlNewGlobalNs (xmlDocPtr doc,
+ const xmlChar *href,
+ const xmlChar *prefix);
+#endif /* LIBXML_LEGACY_ENABLED */
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlNewNs (xmlNodePtr node,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ xmlFreeNs (xmlNsPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeNsList (xmlNsPtr cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlNewDoc (const xmlChar *version);
+XMLPUBFUN void XMLCALL
+ xmlFreeDoc (xmlDocPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewDocProp (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *value);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+#endif
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewNsPropEatName (xmlNodePtr node,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlFreePropList (xmlAttrPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeProp (xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlCopyProp (xmlNodePtr target,
+ xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlCopyPropList (xmlNodePtr target,
+ xmlAttrPtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlCopyDtd (xmlDtdPtr dtd);
+#endif /* LIBXML_TREE_ENABLED */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCopyDoc (xmlDocPtr doc,
+ int recursive);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+/*
+ * Creating new nodes.
+ */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocNodeEatName (xmlDocPtr doc,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewNode (xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewNodeEatName (xmlNsPtr ns,
+ xmlChar *name);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+#endif
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocText (xmlDocPtr doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewText (const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocPI (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewPI (const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocTextLen (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewTextLen (const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocComment (xmlDocPtr doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewComment (const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewCDataBlock (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewCharRef (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewReference (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlCopyNode (const xmlNodePtr node,
+ int recursive);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocCopyNode (const xmlNodePtr node,
+ xmlDocPtr doc,
+ int recursive);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocCopyNodeList (xmlDocPtr doc,
+ const xmlNodePtr node);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlCopyNodeList (const xmlNodePtr node);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewTextChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocRawNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocFragment (xmlDocPtr doc);
+#endif /* LIBXML_TREE_ENABLED */
+
+/*
+ * Navigating.
+ */
+XMLPUBFUN long XMLCALL
+ xmlGetLineNo (xmlNodePtr node);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNodePath (xmlNodePtr node);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocGetRootElement (xmlDocPtr doc);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlGetLastChild (xmlNodePtr parent);
+XMLPUBFUN int XMLCALL
+ xmlNodeIsText (xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlIsBlankNode (xmlNodePtr node);
+
+/*
+ * Changing the structure.
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocSetRootElement (xmlDocPtr doc,
+ xmlNodePtr root);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetName (xmlNodePtr cur,
+ const xmlChar *name);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddChild (xmlNodePtr parent,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddChildList (xmlNodePtr parent,
+ xmlNodePtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlReplaceNode (xmlNodePtr old,
+ xmlNodePtr cur);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddPrevSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddNextSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN void XMLCALL
+ xmlUnlinkNode (xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextMerge (xmlNodePtr first,
+ xmlNodePtr second);
+XMLPUBFUN int XMLCALL
+ xmlTextConcat (xmlNodePtr node,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlFreeNodeList (xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeNode (xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ xmlSetTreeDoc (xmlNodePtr tree,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSetListDoc (xmlNodePtr list,
+ xmlDocPtr doc);
+/*
+ * Namespaces.
+ */
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlSearchNs (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlSearchNsByHref (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *href);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNsPtr * XMLCALL
+ xmlGetNsList (xmlDocPtr doc,
+ xmlNodePtr node);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
+
+XMLPUBFUN void XMLCALL
+ xmlSetNs (xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlCopyNamespace (xmlNsPtr cur);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlCopyNamespaceList (xmlNsPtr cur);
+
+/*
+ * Changing the content.
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlSetProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlSetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNoNsProp (xmlNodePtr node,
+ const xmlChar *name);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetProp (xmlNodePtr node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlHasProp (xmlNodePtr node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlHasNsProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNsProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlStringGetNodeList (xmlDocPtr doc,
+ const xmlChar *value);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlStringLenGetNodeList (xmlDocPtr doc,
+ const xmlChar *value,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeListGetString (xmlDocPtr doc,
+ xmlNodePtr list,
+ int inLine);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeListGetRawString (xmlDocPtr doc,
+ xmlNodePtr list,
+ int inLine);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNodeSetContent (xmlNodePtr cur,
+ const xmlChar *content);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNodeAddContent (xmlNodePtr cur,
+ const xmlChar *content);
+XMLPUBFUN void XMLCALL
+ xmlNodeAddContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetContent (xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlNodeBufGetContent (xmlBufferPtr buffer,
+ xmlNodePtr cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetLang (xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlNodeGetSpacePreserve (xmlNodePtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetLang (xmlNodePtr cur,
+ const xmlChar *lang);
+XMLPUBFUN void XMLCALL
+ xmlNodeSetSpacePreserve (xmlNodePtr cur,
+ int val);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetBase (xmlDocPtr doc,
+ xmlNodePtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlNodeSetBase (xmlNodePtr cur,
+ const xmlChar *uri);
+#endif
+
+/*
+ * Removing content.
+ */
+XMLPUBFUN int XMLCALL
+ xmlRemoveProp (xmlAttrPtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlUnsetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlUnsetProp (xmlNodePtr node,
+ const xmlChar *name);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+
+/*
+ * Internal, don't use.
+ */
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteCHAR (xmlBufferPtr buf,
+ const xmlChar *string);
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteChar (xmlBufferPtr buf,
+ const char *string);
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteQuotedString(xmlBufferPtr buf,
+ const xmlChar *string);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlAttrPtr attr,
+ const xmlChar *string);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * Namespace handling.
+ */
+XMLPUBFUN int XMLCALL
+ xmlReconciliateNs (xmlDocPtr doc,
+ xmlNodePtr tree);
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Saving.
+ */
+XMLPUBFUN void XMLCALL
+ xmlDocDumpFormatMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlDocFormatDump (FILE *f,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlElemDump (FILE *f,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFile (const char *filename,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ xmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format,
+ const char *encoding);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * XHTML
+ */
+XMLPUBFUN int XMLCALL
+ xmlIsXHTML (const xmlChar *systemID,
+ const xmlChar *publicID);
+
+/*
+ * Compression.
+ */
+XMLPUBFUN int XMLCALL
+ xmlGetDocCompressMode (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSetDocCompressMode (xmlDocPtr doc,
+ int mode);
+XMLPUBFUN int XMLCALL
+ xmlGetCompressMode (void);
+XMLPUBFUN void XMLCALL
+ xmlSetCompressMode (int mode);
+
+/*
+* DOM-wrapper helper functions.
+*/
+XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
+ xmlDOMWrapNewCtxt (void);
+XMLPUBFUN void XMLCALL
+ xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr elem,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr node,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlNodePtr *clonedNode,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int deep,
+ int options);
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * 5 interfaces from DOM ElementTraversal, but different in entities
+ * traversal.
+ */
+XMLPUBFUN unsigned long XMLCALL
+ xmlChildElementCount (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNextElementSibling (xmlNodePtr node);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlFirstElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlLastElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlPreviousElementSibling (xmlNodePtr node);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#ifndef __XML_PARSER_H__
+#include <libxml/xmlmemory.h>
+#endif
+
+#endif /* __XML_TREE_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/uri.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/uri.h
new file mode 100644
index 0000000..db48262
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/uri.h
@@ -0,0 +1,94 @@
+/**
+ * Summary: library of generic URI related routines
+ * Description: library of generic URI related routines
+ * Implements RFC 2396
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_URI_H__
+#define __XML_URI_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlURI:
+ *
+ * A parsed URI reference. This is a struct containing the various fields
+ * as described in RFC 2396 but separated for further processing.
+ *
+ * Note: query is a deprecated field which is incorrectly unescaped.
+ * query_raw takes precedence over query if the former is set.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
+ */
+typedef struct _xmlURI xmlURI;
+typedef xmlURI *xmlURIPtr;
+struct _xmlURI {
+ char *scheme; /* the URI scheme */
+ char *opaque; /* opaque part */
+ char *authority; /* the authority part */
+ char *server; /* the server part */
+ char *user; /* the user part */
+ int port; /* the port number */
+ char *path; /* the path string */
+ char *query; /* the query string (deprecated - use with caution) */
+ char *fragment; /* the fragment identifier */
+ int cleanup; /* parsing potentially unclean URI */
+ char *query_raw; /* the query string (as it appears in the URI) */
+};
+
+/*
+ * This function is in tree.h:
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
+ * xmlNodePtr cur);
+ */
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlCreateURI (void);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildRelativeURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlParseURI (const char *str);
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlParseURIRaw (const char *str,
+ int raw);
+XMLPUBFUN int XMLCALL
+ xmlParseURIReference (xmlURIPtr uri,
+ const char *str);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSaveUri (xmlURIPtr uri);
+XMLPUBFUN void XMLCALL
+ xmlPrintURI (FILE *stream,
+ xmlURIPtr uri);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlURIEscapeStr (const xmlChar *str,
+ const xmlChar *list);
+XMLPUBFUN char * XMLCALL
+ xmlURIUnescapeString (const char *str,
+ int len,
+ char *target);
+XMLPUBFUN int XMLCALL
+ xmlNormalizeURIPath (char *path);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlURIEscape (const xmlChar *str);
+XMLPUBFUN void XMLCALL
+ xmlFreeURI (xmlURIPtr uri);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlCanonicPath (const xmlChar *path);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlPathToURI (const xmlChar *path);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_URI_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/valid.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/valid.h
new file mode 100644
index 0000000..2bc7b38
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/valid.h
@@ -0,0 +1,458 @@
+/*
+ * Summary: The DTD validation
+ * Description: API for the DTD handling and the validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_VALID_H__
+#define __XML_VALID_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlerror.h>
+#include <libxml/tree.h>
+#include <libxml/list.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlregexp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Validation state added for non-determinist content model.
+ */
+typedef struct _xmlValidState xmlValidState;
+typedef xmlValidState *xmlValidStatePtr;
+
+/**
+ * xmlValidityErrorFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity error is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlValidityWarningFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity warning is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+#ifdef IN_LIBXML
+/**
+ * XML_CTXT_FINISH_DTD_0:
+ *
+ * Special value for finishDtd field when embedded in an xmlParserCtxt
+ */
+#define XML_CTXT_FINISH_DTD_0 0xabcd1234
+/**
+ * XML_CTXT_FINISH_DTD_1:
+ *
+ * Special value for finishDtd field when embedded in an xmlParserCtxt
+ */
+#define XML_CTXT_FINISH_DTD_1 0xabcd1235
+#endif
+
+/*
+ * xmlValidCtxt:
+ * An xmlValidCtxt is used for error reporting when validating.
+ */
+typedef struct _xmlValidCtxt xmlValidCtxt;
+typedef xmlValidCtxt *xmlValidCtxtPtr;
+struct _xmlValidCtxt {
+ void *userData; /* user specific data block */
+ xmlValidityErrorFunc error; /* the callback in case of errors */
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
+
+ /* Node analysis stack used when validating within entities */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ unsigned int finishDtd; /* finished validating the Dtd ? */
+ xmlDocPtr doc; /* the document */
+ int valid; /* temporary validity check result */
+
+ /* state state used for non-determinist content validation */
+ xmlValidState *vstate; /* current state */
+ int vstateNr; /* Depth of the validation stack */
+ int vstateMax; /* Max depth of the validation stack */
+ xmlValidState *vstateTab; /* array of validation states */
+
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlAutomataPtr am; /* the automata */
+ xmlAutomataStatePtr state; /* used to build the automata */
+#else
+ void *am;
+ void *state;
+#endif
+};
+
+/*
+ * ALL notation declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlNotationTable;
+typedef xmlNotationTable *xmlNotationTablePtr;
+
+/*
+ * ALL element declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlElementTable;
+typedef xmlElementTable *xmlElementTablePtr;
+
+/*
+ * ALL attribute declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlAttributeTable;
+typedef xmlAttributeTable *xmlAttributeTablePtr;
+
+/*
+ * ALL IDs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlIDTable;
+typedef xmlIDTable *xmlIDTablePtr;
+
+/*
+ * ALL Refs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlRefTable;
+typedef xmlRefTable *xmlRefTablePtr;
+
+/* Notation */
+XMLPUBFUN xmlNotationPtr XMLCALL
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *PublicID,
+ const xmlChar *SystemID);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlNotationTablePtr XMLCALL
+ xmlCopyNotationTable (xmlNotationTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeNotationTable (xmlNotationTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpNotationDecl (xmlBufferPtr buf,
+ xmlNotationPtr nota);
+XMLPUBFUN void XMLCALL
+ xmlDumpNotationTable (xmlBufferPtr buf,
+ xmlNotationTablePtr table);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Element Content */
+/* the non Doc version are being deprecated */
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlNewElementContent (const xmlChar *name,
+ xmlElementContentType type);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlCopyElementContent (xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlFreeElementContent (xmlElementContentPtr cur);
+/* the new versions with doc argument */
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlNewDocElementContent (xmlDocPtr doc,
+ const xmlChar *name,
+ xmlElementContentType type);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlCopyDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlFreeDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlSnprintfElementContent(char *buf,
+ int size,
+ xmlElementContentPtr content,
+ int englob);
+#ifdef LIBXML_OUTPUT_ENABLED
+/* DEPRECATED */
+XMLPUBFUN void XMLCALL
+ xmlSprintfElementContent(char *buf,
+ xmlElementContentPtr content,
+ int englob);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/* DEPRECATED */
+
+/* Element */
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ xmlElementTypeVal type,
+ xmlElementContentPtr content);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlElementTablePtr XMLCALL
+ xmlCopyElementTable (xmlElementTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeElementTable (xmlElementTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpElementTable (xmlBufferPtr buf,
+ xmlElementTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpElementDecl (xmlBufferPtr buf,
+ xmlElementPtr elem);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Enumeration */
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlCreateEnumeration (const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
+#endif /* LIBXML_TREE_ENABLED */
+
+/* Attribute */
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *ns,
+ xmlAttributeType type,
+ xmlAttributeDefault def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlAttributeTablePtr XMLCALL
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpAttributeTable (xmlBufferPtr buf,
+ xmlAttributeTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
+ xmlAttributePtr attr);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* IDs */
+XMLPUBFUN xmlIDPtr XMLCALL
+ xmlAddID (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void XMLCALL
+ xmlFreeIDTable (xmlIDTablePtr table);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlGetID (xmlDocPtr doc,
+ const xmlChar *ID);
+XMLPUBFUN int XMLCALL
+ xmlIsID (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int XMLCALL
+ xmlRemoveID (xmlDocPtr doc,
+ xmlAttrPtr attr);
+
+/* IDREFs */
+XMLPUBFUN xmlRefPtr XMLCALL
+ xmlAddRef (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void XMLCALL
+ xmlFreeRefTable (xmlRefTablePtr table);
+XMLPUBFUN int XMLCALL
+ xmlIsRef (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int XMLCALL
+ xmlRemoveRef (xmlDocPtr doc,
+ xmlAttrPtr attr);
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlGetRefs (xmlDocPtr doc,
+ const xmlChar *ID);
+
+/**
+ * The public function calls related to validity checking.
+ */
+#ifdef LIBXML_VALID_ENABLED
+/* Allocate/Release Validation Contexts */
+XMLPUBFUN xmlValidCtxtPtr XMLCALL
+ xmlNewValidCtxt(void);
+XMLPUBFUN void XMLCALL
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
+
+XMLPUBFUN int XMLCALL
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlElementPtr elem);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlAttributePtr attr);
+XMLPUBFUN int XMLCALL
+ xmlValidateAttributeValue(xmlAttributeType type,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNotationPtr nota);
+XMLPUBFUN int XMLCALL
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlDtdPtr dtd);
+XMLPUBFUN int XMLCALL
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *prefix,
+ xmlNsPtr ns,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+#endif /* LIBXML_VALID_ENABLED */
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *notationName);
+#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ xmlIsMixedElement (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlNotationPtr XMLCALL
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+
+#ifdef LIBXML_VALID_ENABLED
+
+XMLPUBFUN int XMLCALL
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
+ const xmlChar **names,
+ int *len,
+ int max);
+
+XMLPUBFUN int XMLCALL
+ xmlValidGetValidElements(xmlNode *prev,
+ xmlNode *next,
+ const xmlChar **names,
+ int max);
+XMLPUBFUN int XMLCALL
+ xmlValidateNameValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNamesValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNmtokenValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNmtokensValue(const xmlChar *value);
+
+#ifdef LIBXML_REGEXP_ENABLED
+/*
+ * Validation based on the regexp support
+ */
+XMLPUBFUN int XMLCALL
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
+ xmlElementPtr elem);
+
+XMLPUBFUN int XMLCALL
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+XMLPUBFUN int XMLCALL
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+#endif /* LIBXML_REGEXP_ENABLED */
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_VALID_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xinclude.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xinclude.h
new file mode 100644
index 0000000..863ab25
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xinclude.h
@@ -0,0 +1,129 @@
+/*
+ * Summary: implementation of XInclude
+ * Description: API to handle XInclude processing,
+ * implements the
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XINCLUDE_H__
+#define __XML_XINCLUDE_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XINCLUDE_NS:
+ *
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
+ */
+#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
+/**
+ * XINCLUDE_OLD_NS:
+ *
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
+ */
+#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
+/**
+ * XINCLUDE_NODE:
+ *
+ * Macro defining "include"
+ */
+#define XINCLUDE_NODE (const xmlChar *) "include"
+/**
+ * XINCLUDE_FALLBACK:
+ *
+ * Macro defining "fallback"
+ */
+#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
+/**
+ * XINCLUDE_HREF:
+ *
+ * Macro defining "href"
+ */
+#define XINCLUDE_HREF (const xmlChar *) "href"
+/**
+ * XINCLUDE_PARSE:
+ *
+ * Macro defining "parse"
+ */
+#define XINCLUDE_PARSE (const xmlChar *) "parse"
+/**
+ * XINCLUDE_PARSE_XML:
+ *
+ * Macro defining "xml"
+ */
+#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
+/**
+ * XINCLUDE_PARSE_TEXT:
+ *
+ * Macro defining "text"
+ */
+#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
+/**
+ * XINCLUDE_PARSE_ENCODING:
+ *
+ * Macro defining "encoding"
+ */
+#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
+/**
+ * XINCLUDE_PARSE_XPOINTER:
+ *
+ * Macro defining "xpointer"
+ */
+#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
+
+typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
+typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
+
+/*
+ * standalone processing
+ */
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcess (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
+ int flags);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
+ int flags,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
+ int flags,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTree (xmlNodePtr tree);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
+ int flags);
+/*
+ * contextual processing
+ */
+XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
+ xmlXIncludeNewContext (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
+ int flags);
+XMLPUBFUN void XMLCALL
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
+ xmlNodePtr tree);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XINCLUDE_ENABLED */
+
+#endif /* __XML_XINCLUDE_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xlink.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xlink.h
new file mode 100644
index 0000000..a209a99
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xlink.h
@@ -0,0 +1,189 @@
+/*
+ * Summary: unfinished XLink detection module
+ * Description: unfinished XLink detection module
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XLINK_H__
+#define __XML_XLINK_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Various defines for the various Link properties.
+ *
+ * NOTE: the link detection layer will try to resolve QName expansion
+ * of namespaces. If "foo" is the prefix for "http://foo.com/"
+ * then the link detection layer will expand role="foo:myrole"
+ * to "http://foo.com/:myrole".
+ * NOTE: the link detection layer will expand URI-Refences found on
+ * href attributes by using the base mechanism if found.
+ */
+typedef xmlChar *xlinkHRef;
+typedef xmlChar *xlinkRole;
+typedef xmlChar *xlinkTitle;
+
+typedef enum {
+ XLINK_TYPE_NONE = 0,
+ XLINK_TYPE_SIMPLE,
+ XLINK_TYPE_EXTENDED,
+ XLINK_TYPE_EXTENDED_SET
+} xlinkType;
+
+typedef enum {
+ XLINK_SHOW_NONE = 0,
+ XLINK_SHOW_NEW,
+ XLINK_SHOW_EMBED,
+ XLINK_SHOW_REPLACE
+} xlinkShow;
+
+typedef enum {
+ XLINK_ACTUATE_NONE = 0,
+ XLINK_ACTUATE_AUTO,
+ XLINK_ACTUATE_ONREQUEST
+} xlinkActuate;
+
+/**
+ * xlinkNodeDetectFunc:
+ * @ctx: user data pointer
+ * @node: the node to check
+ *
+ * This is the prototype for the link detection routine.
+ * It calls the default link detection callbacks upon link detection.
+ */
+typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
+
+/*
+ * The link detection module interact with the upper layers using
+ * a set of callback registered at parsing time.
+ */
+
+/**
+ * xlinkSimpleLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @href: the target of the link
+ * @role: the role string
+ * @title: the link title
+ *
+ * This is the prototype for a simple link detection callback.
+ */
+typedef void
+(*xlinkSimpleLinkFunk) (void *ctx,
+ xmlNodePtr node,
+ const xlinkHRef href,
+ const xlinkRole role,
+ const xlinkTitle title);
+
+/**
+ * xlinkExtendedLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbArcs: the number of arcs detected on the link
+ * @from: pointer to the array of source roles found on the arcs
+ * @to: pointer to the array of target roles found on the arcs
+ * @show: array of values for the show attributes found on the arcs
+ * @actuate: array of values for the actuate attributes found on the arcs
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkFunk)(void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbArcs,
+ const xlinkRole *from,
+ const xlinkRole *to,
+ xlinkShow *show,
+ xlinkActuate *actuate,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * xlinkExtendedLinkSetFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link set detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkSetFunk) (void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * This is the structure containing a set of Links detection callbacks.
+ *
+ * There is no default xlink callbacks, if one want to get link
+ * recognition activated, those call backs must be provided before parsing.
+ */
+typedef struct _xlinkHandler xlinkHandler;
+typedef xlinkHandler *xlinkHandlerPtr;
+struct _xlinkHandler {
+ xlinkSimpleLinkFunk simple;
+ xlinkExtendedLinkFunk extended;
+ xlinkExtendedLinkSetFunk set;
+};
+
+/*
+ * The default detection routine, can be overridden, they call the default
+ * detection callbacks.
+ */
+
+XMLPUBFUN xlinkNodeDetectFunc XMLCALL
+ xlinkGetDefaultDetect (void);
+XMLPUBFUN void XMLCALL
+ xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
+
+/*
+ * Routines to set/get the default handlers.
+ */
+XMLPUBFUN xlinkHandlerPtr XMLCALL
+ xlinkGetDefaultHandler (void);
+XMLPUBFUN void XMLCALL
+ xlinkSetDefaultHandler (xlinkHandlerPtr handler);
+
+/*
+ * Link detection module itself.
+ */
+XMLPUBFUN xlinkType XMLCALL
+ xlinkIsLink (xmlDocPtr doc,
+ xmlNodePtr node);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+
+#endif /* __XML_XLINK_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlIO.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlIO.h
new file mode 100644
index 0000000..bd543b7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlIO.h
@@ -0,0 +1,360 @@
+/*
+ * Summary: interface for the I/O interfaces used by the parser
+ * Description: interface for the I/O interfaces used by the parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_IO_H__
+#define __XML_IO_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Those are the functions and datatypes for the parser input
+ * I/O structures.
+ */
+
+/**
+ * xmlInputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to detect if the current handler
+ * can provide input fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
+/**
+ * xmlInputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to open the resource
+ *
+ * Returns an Input context or NULL in case or error
+ */
+typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
+/**
+ * xmlInputReadCallback:
+ * @context: an Input context
+ * @buffer: the buffer to store data read
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Input API to read the resource
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
+/**
+ * xmlInputCloseCallback:
+ * @context: an Input context
+ *
+ * Callback used in the I/O Input API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Those are the functions and datatypes for the library output
+ * I/O structures.
+ */
+
+/**
+ * xmlOutputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to detect if the current handler
+ * can provide output fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Output module should be used
+ */
+typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
+/**
+ * xmlOutputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to open the resource
+ *
+ * Returns an Output context or NULL in case or error
+ */
+typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
+/**
+ * xmlOutputWriteCallback:
+ * @context: an Output context
+ * @buffer: the buffer of data to write
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Output API to write to the resource
+ *
+ * Returns the number of bytes written or -1 in case of error
+ */
+typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
+ int len);
+/**
+ * xmlOutputCloseCallback:
+ * @context: an Output context
+ *
+ * Callback used in the I/O Output API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/globals.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/encoding.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+struct _xmlParserInputBuffer {
+ void* context;
+ xmlInputReadCallback readcallback;
+ xmlInputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
+ xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
+ int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
+ int error;
+ unsigned long rawconsumed;/* amount consumed from raw */
+};
+
+
+#ifdef LIBXML_OUTPUT_ENABLED
+struct _xmlOutputBuffer {
+ void* context;
+ xmlOutputWriteCallback writecallback;
+ xmlOutputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
+ xmlBufferPtr conv; /* if encoder != NULL buffer for output */
+ int written; /* total number of byte written */
+ int error;
+};
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/*
+ * Interfaces for input
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupInputCallbacks (void);
+
+XMLPUBFUN int XMLCALL
+ xmlPopInputCallbacks (void);
+
+XMLPUBFUN void XMLCALL
+ xmlRegisterDefaultInputCallbacks (void);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlAllocParserInputBuffer (xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFilename (const char *URI,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFile (FILE *file,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFd (int fd,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateMem (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateStatic (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferRead (xmlParserInputBufferPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferPush (xmlParserInputBufferPtr in,
+ int len,
+ const char *buf);
+XMLPUBFUN void XMLCALL
+ xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
+XMLPUBFUN char * XMLCALL
+ xmlParserGetDirectory (const char *filename);
+
+XMLPUBFUN int XMLCALL
+ xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
+ xmlInputOpenCallback openFunc,
+ xmlInputReadCallback readFunc,
+ xmlInputCloseCallback closeFunc);
+
+xmlParserInputBufferPtr
+ __xmlParserInputBufferCreateFilename(const char *URI,
+ xmlCharEncoding enc);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Interfaces for output
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupOutputCallbacks (void);
+XMLPUBFUN void XMLCALL
+ xmlRegisterDefaultOutputCallbacks(void);
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFilename (const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFile (FILE *file,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFd (int fd,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWrite (xmlOutputBufferPtr out,
+ int len,
+ const char *buf);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWriteString (xmlOutputBufferPtr out,
+ const char *str);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
+ const xmlChar *str,
+ xmlCharEncodingOutputFunc escaping);
+
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferFlush (xmlOutputBufferPtr out);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferClose (xmlOutputBufferPtr out);
+
+XMLPUBFUN int XMLCALL
+ xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
+ xmlOutputOpenCallback openFunc,
+ xmlOutputWriteCallback writeFunc,
+ xmlOutputCloseCallback closeFunc);
+
+xmlOutputBufferPtr
+ __xmlOutputBufferCreateFilename(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+#ifdef LIBXML_HTTP_ENABLED
+/* This function only exists if HTTP support built into the library */
+XMLPUBFUN void XMLCALL
+ xmlRegisterHTTPPostCallbacks (void );
+#endif /* LIBXML_HTTP_ENABLED */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr ret);
+
+/*
+ * A predefined entity loader disabling network accesses
+ */
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNoNetExternalEntityLoader (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/*
+ * xmlNormalizeWindowsPath is obsolete, don't use it.
+ * Check xmlCanonicPath in uri.h for a better alternative.
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNormalizeWindowsPath (const xmlChar *path);
+
+XMLPUBFUN int XMLCALL
+ xmlCheckFilename (const char *path);
+/**
+ * Default 'file://' protocol callbacks
+ */
+XMLPUBFUN int XMLCALL
+ xmlFileMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlFileOpen (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlFileRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlFileClose (void * context);
+
+/**
+ * Default 'http://' protocol callbacks
+ */
+#ifdef LIBXML_HTTP_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlIOHTTPOpen (const char *filename);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void * XMLCALL
+ xmlIOHTTPOpenW (const char * post_uri,
+ int compression );
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPClose (void * context);
+#endif /* LIBXML_HTTP_ENABLED */
+
+/**
+ * Default 'ftp://' protocol callbacks
+ */
+#ifdef LIBXML_FTP_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlIOFTPMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlIOFTPOpen (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlIOFTPRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlIOFTPClose (void * context);
+#endif /* LIBXML_FTP_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_IO_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlautomata.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlautomata.h
new file mode 100644
index 0000000..bf1b131
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlautomata.h
@@ -0,0 +1,146 @@
+/*
+ * Summary: API to build regexp automata
+ * Description: the API to build regexp automata
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_AUTOMATA_H__
+#define __XML_AUTOMATA_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_REGEXP_ENABLED
+#ifdef LIBXML_AUTOMATA_ENABLED
+#include <libxml/xmlregexp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlAutomataPtr:
+ *
+ * A libxml automata description, It can be compiled into a regexp
+ */
+typedef struct _xmlAutomata xmlAutomata;
+typedef xmlAutomata *xmlAutomataPtr;
+
+/**
+ * xmlAutomataStatePtr:
+ *
+ * A state int the automata description,
+ */
+typedef struct _xmlAutomataState xmlAutomataState;
+typedef xmlAutomataState *xmlAutomataStatePtr;
+
+/*
+ * Building API
+ */
+XMLPUBFUN xmlAutomataPtr XMLCALL
+ xmlNewAutomata (void);
+XMLPUBFUN void XMLCALL
+ xmlFreeAutomata (xmlAutomataPtr am);
+
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataGetInitState (xmlAutomataPtr am);
+XMLPUBFUN int XMLCALL
+ xmlAutomataSetFinalState (xmlAutomataPtr am,
+ xmlAutomataStatePtr state);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewState (xmlAutomataPtr am);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewTransition (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewTransition2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewNegTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewOnceTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewAllTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int lax);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewEpsilon (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountedTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCounterTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XMLPUBFUN int XMLCALL
+ xmlAutomataNewCounter (xmlAutomataPtr am,
+ int min,
+ int max);
+
+XMLPUBFUN xmlRegexpPtr XMLCALL
+ xmlAutomataCompile (xmlAutomataPtr am);
+XMLPUBFUN int XMLCALL
+ xmlAutomataIsDeterminist (xmlAutomataPtr am);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_AUTOMATA_ENABLED */
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /* __XML_AUTOMATA_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlerror.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlerror.h
new file mode 100644
index 0000000..e924211
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlerror.h
@@ -0,0 +1,944 @@
+/*
+ * Summary: error handling
+ * Description: the API used to report errors
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#include <libxml/parser.h>
+
+#ifndef __XML_ERROR_H__
+#define __XML_ERROR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlErrorLevel:
+ *
+ * Indicates the level of an error
+ */
+typedef enum {
+ XML_ERR_NONE = 0,
+ XML_ERR_WARNING = 1, /* A simple warning */
+ XML_ERR_ERROR = 2, /* A recoverable error */
+ XML_ERR_FATAL = 3 /* A fatal error */
+} xmlErrorLevel;
+
+/**
+ * xmlErrorDomain:
+ *
+ * Indicates where an error may have come from
+ */
+typedef enum {
+ XML_FROM_NONE = 0,
+ XML_FROM_PARSER, /* The XML parser */
+ XML_FROM_TREE, /* The tree module */
+ XML_FROM_NAMESPACE, /* The XML Namespace module */
+ XML_FROM_DTD, /* The XML DTD validation with parser context*/
+ XML_FROM_HTML, /* The HTML parser */
+ XML_FROM_MEMORY, /* The memory allocator */
+ XML_FROM_OUTPUT, /* The serialization code */
+ XML_FROM_IO, /* The Input/Output stack */
+ XML_FROM_FTP, /* The FTP module */
+ XML_FROM_HTTP, /* The HTTP module */
+ XML_FROM_XINCLUDE, /* The XInclude processing */
+ XML_FROM_XPATH, /* The XPath module */
+ XML_FROM_XPOINTER, /* The XPointer module */
+ XML_FROM_REGEXP, /* The regular expressions module */
+ XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
+ XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
+ XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
+ XML_FROM_RELAXNGP, /* The Relax-NG parser module */
+ XML_FROM_RELAXNGV, /* The Relax-NG validator module */
+ XML_FROM_CATALOG, /* The Catalog module */
+ XML_FROM_C14N, /* The Canonicalization module */
+ XML_FROM_XSLT, /* The XSLT engine from libxslt */
+ XML_FROM_VALID, /* The XML DTD validation with valid context */
+ XML_FROM_CHECK, /* The error checking module */
+ XML_FROM_WRITER, /* The xmlwriter module */
+ XML_FROM_MODULE, /* The dynamically loaded module module*/
+ XML_FROM_I18N, /* The module handling character conversion */
+ XML_FROM_SCHEMATRONV /* The Schematron validator module */
+} xmlErrorDomain;
+
+/**
+ * xmlError:
+ *
+ * An XML Error instance.
+ */
+
+typedef struct _xmlError xmlError;
+typedef xmlError *xmlErrorPtr;
+struct _xmlError {
+ int domain; /* What part of the library raised this error */
+ int code; /* The error code, e.g. an xmlParserError */
+ char *message;/* human-readable informative error message */
+ xmlErrorLevel level;/* how consequent is the error */
+ char *file; /* the filename */
+ int line; /* the line number if available */
+ char *str1; /* extra string information */
+ char *str2; /* extra string information */
+ char *str3; /* extra string information */
+ int int1; /* extra number information */
+ int int2; /* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
+ void *ctxt; /* the parser context if available */
+ void *node; /* the node in the tree */
+};
+
+/**
+ * xmlParserError:
+ *
+ * This is an error that the XML (or HTML) parser can generate
+ */
+typedef enum {
+ XML_ERR_OK = 0,
+ XML_ERR_INTERNAL_ERROR, /* 1 */
+ XML_ERR_NO_MEMORY, /* 2 */
+ XML_ERR_DOCUMENT_START, /* 3 */
+ XML_ERR_DOCUMENT_EMPTY, /* 4 */
+ XML_ERR_DOCUMENT_END, /* 5 */
+ XML_ERR_INVALID_HEX_CHARREF, /* 6 */
+ XML_ERR_INVALID_DEC_CHARREF, /* 7 */
+ XML_ERR_INVALID_CHARREF, /* 8 */
+ XML_ERR_INVALID_CHAR, /* 9 */
+ XML_ERR_CHARREF_AT_EOF, /* 10 */
+ XML_ERR_CHARREF_IN_PROLOG, /* 11 */
+ XML_ERR_CHARREF_IN_EPILOG, /* 12 */
+ XML_ERR_CHARREF_IN_DTD, /* 13 */
+ XML_ERR_ENTITYREF_AT_EOF, /* 14 */
+ XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
+ XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
+ XML_ERR_ENTITYREF_IN_DTD, /* 17 */
+ XML_ERR_PEREF_AT_EOF, /* 18 */
+ XML_ERR_PEREF_IN_PROLOG, /* 19 */
+ XML_ERR_PEREF_IN_EPILOG, /* 20 */
+ XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
+ XML_ERR_ENTITYREF_NO_NAME, /* 22 */
+ XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
+ XML_ERR_PEREF_NO_NAME, /* 24 */
+ XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
+ XML_ERR_UNDECLARED_ENTITY, /* 26 */
+ XML_WAR_UNDECLARED_ENTITY, /* 27 */
+ XML_ERR_UNPARSED_ENTITY, /* 28 */
+ XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
+ XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
+ XML_ERR_UNKNOWN_ENCODING, /* 31 */
+ XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
+ XML_ERR_STRING_NOT_STARTED, /* 33 */
+ XML_ERR_STRING_NOT_CLOSED, /* 34 */
+ XML_ERR_NS_DECL_ERROR, /* 35 */
+ XML_ERR_ENTITY_NOT_STARTED, /* 36 */
+ XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
+ XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
+ XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
+ XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
+ XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
+ XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
+ XML_ERR_LITERAL_NOT_STARTED, /* 43 */
+ XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
+ XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
+ XML_ERR_PI_NOT_STARTED, /* 46 */
+ XML_ERR_PI_NOT_FINISHED, /* 47 */
+ XML_ERR_NOTATION_NOT_STARTED, /* 48 */
+ XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
+ XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
+ XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
+ XML_ERR_MIXED_NOT_STARTED, /* 52 */
+ XML_ERR_MIXED_NOT_FINISHED, /* 53 */
+ XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
+ XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
+ XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
+ XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
+ XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
+ XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
+ XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
+ XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
+ XML_ERR_MISPLACED_CDATA_END, /* 62 */
+ XML_ERR_CDATA_NOT_FINISHED, /* 63 */
+ XML_ERR_RESERVED_XML_NAME, /* 64 */
+ XML_ERR_SPACE_REQUIRED, /* 65 */
+ XML_ERR_SEPARATOR_REQUIRED, /* 66 */
+ XML_ERR_NMTOKEN_REQUIRED, /* 67 */
+ XML_ERR_NAME_REQUIRED, /* 68 */
+ XML_ERR_PCDATA_REQUIRED, /* 69 */
+ XML_ERR_URI_REQUIRED, /* 70 */
+ XML_ERR_PUBID_REQUIRED, /* 71 */
+ XML_ERR_LT_REQUIRED, /* 72 */
+ XML_ERR_GT_REQUIRED, /* 73 */
+ XML_ERR_LTSLASH_REQUIRED, /* 74 */
+ XML_ERR_EQUAL_REQUIRED, /* 75 */
+ XML_ERR_TAG_NAME_MISMATCH, /* 76 */
+ XML_ERR_TAG_NOT_FINISHED, /* 77 */
+ XML_ERR_STANDALONE_VALUE, /* 78 */
+ XML_ERR_ENCODING_NAME, /* 79 */
+ XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
+ XML_ERR_INVALID_ENCODING, /* 81 */
+ XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
+ XML_ERR_CONDSEC_INVALID, /* 83 */
+ XML_ERR_VALUE_REQUIRED, /* 84 */
+ XML_ERR_NOT_WELL_BALANCED, /* 85 */
+ XML_ERR_EXTRA_CONTENT, /* 86 */
+ XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
+ XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
+ XML_ERR_ENTITY_LOOP, /* 89 */
+ XML_ERR_ENTITY_BOUNDARY, /* 90 */
+ XML_ERR_INVALID_URI, /* 91 */
+ XML_ERR_URI_FRAGMENT, /* 92 */
+ XML_WAR_CATALOG_PI, /* 93 */
+ XML_ERR_NO_DTD, /* 94 */
+ XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
+ XML_ERR_VERSION_MISSING, /* 96 */
+ XML_WAR_UNKNOWN_VERSION, /* 97 */
+ XML_WAR_LANG_VALUE, /* 98 */
+ XML_WAR_NS_URI, /* 99 */
+ XML_WAR_NS_URI_RELATIVE, /* 100 */
+ XML_ERR_MISSING_ENCODING, /* 101 */
+ XML_WAR_SPACE_VALUE, /* 102 */
+ XML_ERR_NOT_STANDALONE, /* 103 */
+ XML_ERR_ENTITY_PROCESSING, /* 104 */
+ XML_ERR_NOTATION_PROCESSING, /* 105 */
+ XML_WAR_NS_COLUMN, /* 106 */
+ XML_WAR_ENTITY_REDEFINED, /* 107 */
+ XML_ERR_UNKNOWN_VERSION, /* 108 */
+ XML_ERR_VERSION_MISMATCH, /* 109 */
+ XML_NS_ERR_XML_NAMESPACE = 200,
+ XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
+ XML_NS_ERR_QNAME, /* 202 */
+ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
+ XML_NS_ERR_EMPTY, /* 204 */
+ XML_NS_ERR_COLON, /* 205 */
+ XML_DTD_ATTRIBUTE_DEFAULT = 500,
+ XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
+ XML_DTD_ATTRIBUTE_VALUE, /* 502 */
+ XML_DTD_CONTENT_ERROR, /* 503 */
+ XML_DTD_CONTENT_MODEL, /* 504 */
+ XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
+ XML_DTD_DIFFERENT_PREFIX, /* 506 */
+ XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
+ XML_DTD_ELEM_NAMESPACE, /* 508 */
+ XML_DTD_ELEM_REDEFINED, /* 509 */
+ XML_DTD_EMPTY_NOTATION, /* 510 */
+ XML_DTD_ENTITY_TYPE, /* 511 */
+ XML_DTD_ID_FIXED, /* 512 */
+ XML_DTD_ID_REDEFINED, /* 513 */
+ XML_DTD_ID_SUBSET, /* 514 */
+ XML_DTD_INVALID_CHILD, /* 515 */
+ XML_DTD_INVALID_DEFAULT, /* 516 */
+ XML_DTD_LOAD_ERROR, /* 517 */
+ XML_DTD_MISSING_ATTRIBUTE, /* 518 */
+ XML_DTD_MIXED_CORRUPT, /* 519 */
+ XML_DTD_MULTIPLE_ID, /* 520 */
+ XML_DTD_NO_DOC, /* 521 */
+ XML_DTD_NO_DTD, /* 522 */
+ XML_DTD_NO_ELEM_NAME, /* 523 */
+ XML_DTD_NO_PREFIX, /* 524 */
+ XML_DTD_NO_ROOT, /* 525 */
+ XML_DTD_NOTATION_REDEFINED, /* 526 */
+ XML_DTD_NOTATION_VALUE, /* 527 */
+ XML_DTD_NOT_EMPTY, /* 528 */
+ XML_DTD_NOT_PCDATA, /* 529 */
+ XML_DTD_NOT_STANDALONE, /* 530 */
+ XML_DTD_ROOT_NAME, /* 531 */
+ XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
+ XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
+ XML_DTD_UNKNOWN_ELEM, /* 534 */
+ XML_DTD_UNKNOWN_ENTITY, /* 535 */
+ XML_DTD_UNKNOWN_ID, /* 536 */
+ XML_DTD_UNKNOWN_NOTATION, /* 537 */
+ XML_DTD_STANDALONE_DEFAULTED, /* 538 */
+ XML_DTD_XMLID_VALUE, /* 539 */
+ XML_DTD_XMLID_TYPE, /* 540 */
+ XML_DTD_DUP_TOKEN, /* 541 */
+ XML_HTML_STRUCURE_ERROR = 800,
+ XML_HTML_UNKNOWN_TAG, /* 801 */
+ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
+ XML_RNGP_ATTR_CONFLICT, /* 1001 */
+ XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
+ XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
+ XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
+ XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
+ XML_RNGP_CHOICE_CONTENT, /* 1006 */
+ XML_RNGP_CHOICE_EMPTY, /* 1007 */
+ XML_RNGP_CREATE_FAILURE, /* 1008 */
+ XML_RNGP_DATA_CONTENT, /* 1009 */
+ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
+ XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
+ XML_RNGP_DEFINE_EMPTY, /* 1012 */
+ XML_RNGP_DEFINE_MISSING, /* 1013 */
+ XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
+ XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
+ XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
+ XML_RNGP_ELEMENT_EMPTY, /* 1017 */
+ XML_RNGP_ELEMENT_CONTENT, /* 1018 */
+ XML_RNGP_ELEMENT_NAME, /* 1019 */
+ XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
+ XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
+ XML_RNGP_EMPTY, /* 1022 */
+ XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
+ XML_RNGP_EMPTY_CONTENT, /* 1024 */
+ XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
+ XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
+ XML_RNGP_EXCEPT_EMPTY, /* 1027 */
+ XML_RNGP_EXCEPT_MISSING, /* 1028 */
+ XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
+ XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
+ XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
+ XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
+ XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
+ XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
+ XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
+ XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
+ XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
+ XML_RNGP_GRAMMAR_MISSING, /* 1038 */
+ XML_RNGP_GRAMMAR_NO_START, /* 1039 */
+ XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
+ XML_RNGP_HREF_ERROR, /* 1041 */
+ XML_RNGP_INCLUDE_EMPTY, /* 1042 */
+ XML_RNGP_INCLUDE_FAILURE, /* 1043 */
+ XML_RNGP_INCLUDE_RECURSE, /* 1044 */
+ XML_RNGP_INTERLEAVE_ADD, /* 1045 */
+ XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
+ XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
+ XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
+ XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
+ XML_RNGP_INVALID_URI, /* 1050 */
+ XML_RNGP_INVALID_VALUE, /* 1051 */
+ XML_RNGP_MISSING_HREF, /* 1052 */
+ XML_RNGP_NAME_MISSING, /* 1053 */
+ XML_RNGP_NEED_COMBINE, /* 1054 */
+ XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
+ XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
+ XML_RNGP_NSNAME_NO_NS, /* 1057 */
+ XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
+ XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
+ XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
+ XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
+ XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
+ XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
+ XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
+ XML_RNGP_PARSE_ERROR, /* 1065 */
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
+ XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
+ XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
+ XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
+ XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
+ XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
+ XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
+ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
+ XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
+ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
+ XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
+ XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
+ XML_RNGP_PAT_LIST_ATTR, /* 1078 */
+ XML_RNGP_PAT_LIST_ELEM, /* 1079 */
+ XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
+ XML_RNGP_PAT_LIST_LIST, /* 1081 */
+ XML_RNGP_PAT_LIST_REF, /* 1082 */
+ XML_RNGP_PAT_LIST_TEXT, /* 1083 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
+ XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
+ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
+ XML_RNGP_PAT_START_ATTR, /* 1088 */
+ XML_RNGP_PAT_START_DATA, /* 1089 */
+ XML_RNGP_PAT_START_EMPTY, /* 1090 */
+ XML_RNGP_PAT_START_GROUP, /* 1091 */
+ XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
+ XML_RNGP_PAT_START_LIST, /* 1093 */
+ XML_RNGP_PAT_START_ONEMORE, /* 1094 */
+ XML_RNGP_PAT_START_TEXT, /* 1095 */
+ XML_RNGP_PAT_START_VALUE, /* 1096 */
+ XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
+ XML_RNGP_REF_CREATE_FAILED, /* 1098 */
+ XML_RNGP_REF_CYCLE, /* 1099 */
+ XML_RNGP_REF_NAME_INVALID, /* 1100 */
+ XML_RNGP_REF_NO_DEF, /* 1101 */
+ XML_RNGP_REF_NO_NAME, /* 1102 */
+ XML_RNGP_REF_NOT_EMPTY, /* 1103 */
+ XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
+ XML_RNGP_START_CONTENT, /* 1105 */
+ XML_RNGP_START_EMPTY, /* 1106 */
+ XML_RNGP_START_MISSING, /* 1107 */
+ XML_RNGP_TEXT_EXPECTED, /* 1108 */
+ XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
+ XML_RNGP_TYPE_MISSING, /* 1110 */
+ XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
+ XML_RNGP_TYPE_VALUE, /* 1112 */
+ XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
+ XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
+ XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
+ XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
+ XML_RNGP_URI_FRAGMENT, /* 1117 */
+ XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
+ XML_RNGP_VALUE_EMPTY, /* 1119 */
+ XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
+ XML_RNGP_XMLNS_NAME, /* 1121 */
+ XML_RNGP_XML_NS, /* 1122 */
+ XML_XPATH_EXPRESSION_OK = 1200,
+ XML_XPATH_NUMBER_ERROR, /* 1201 */
+ XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
+ XML_XPATH_START_LITERAL_ERROR, /* 1203 */
+ XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
+ XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
+ XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
+ XML_XPATH_EXPR_ERROR, /* 1207 */
+ XML_XPATH_UNCLOSED_ERROR, /* 1208 */
+ XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
+ XML_XPATH_INVALID_OPERAND, /* 1210 */
+ XML_XPATH_INVALID_TYPE, /* 1211 */
+ XML_XPATH_INVALID_ARITY, /* 1212 */
+ XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
+ XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
+ XML_XPATH_MEMORY_ERROR, /* 1215 */
+ XML_XPTR_SYNTAX_ERROR, /* 1216 */
+ XML_XPTR_RESOURCE_ERROR, /* 1217 */
+ XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
+ XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
+ XML_XPATH_ENCODING_ERROR, /* 1220 */
+ XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
+ XML_TREE_INVALID_HEX = 1300,
+ XML_TREE_INVALID_DEC, /* 1301 */
+ XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
+ XML_TREE_NOT_UTF8, /* 1303 */
+ XML_SAVE_NOT_UTF8 = 1400,
+ XML_SAVE_CHAR_INVALID, /* 1401 */
+ XML_SAVE_NO_DOCTYPE, /* 1402 */
+ XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
+ XML_REGEXP_COMPILE_ERROR = 1450,
+ XML_IO_UNKNOWN = 1500,
+ XML_IO_EACCES, /* 1501 */
+ XML_IO_EAGAIN, /* 1502 */
+ XML_IO_EBADF, /* 1503 */
+ XML_IO_EBADMSG, /* 1504 */
+ XML_IO_EBUSY, /* 1505 */
+ XML_IO_ECANCELED, /* 1506 */
+ XML_IO_ECHILD, /* 1507 */
+ XML_IO_EDEADLK, /* 1508 */
+ XML_IO_EDOM, /* 1509 */
+ XML_IO_EEXIST, /* 1510 */
+ XML_IO_EFAULT, /* 1511 */
+ XML_IO_EFBIG, /* 1512 */
+ XML_IO_EINPROGRESS, /* 1513 */
+ XML_IO_EINTR, /* 1514 */
+ XML_IO_EINVAL, /* 1515 */
+ XML_IO_EIO, /* 1516 */
+ XML_IO_EISDIR, /* 1517 */
+ XML_IO_EMFILE, /* 1518 */
+ XML_IO_EMLINK, /* 1519 */
+ XML_IO_EMSGSIZE, /* 1520 */
+ XML_IO_ENAMETOOLONG, /* 1521 */
+ XML_IO_ENFILE, /* 1522 */
+ XML_IO_ENODEV, /* 1523 */
+ XML_IO_ENOENT, /* 1524 */
+ XML_IO_ENOEXEC, /* 1525 */
+ XML_IO_ENOLCK, /* 1526 */
+ XML_IO_ENOMEM, /* 1527 */
+ XML_IO_ENOSPC, /* 1528 */
+ XML_IO_ENOSYS, /* 1529 */
+ XML_IO_ENOTDIR, /* 1530 */
+ XML_IO_ENOTEMPTY, /* 1531 */
+ XML_IO_ENOTSUP, /* 1532 */
+ XML_IO_ENOTTY, /* 1533 */
+ XML_IO_ENXIO, /* 1534 */
+ XML_IO_EPERM, /* 1535 */
+ XML_IO_EPIPE, /* 1536 */
+ XML_IO_ERANGE, /* 1537 */
+ XML_IO_EROFS, /* 1538 */
+ XML_IO_ESPIPE, /* 1539 */
+ XML_IO_ESRCH, /* 1540 */
+ XML_IO_ETIMEDOUT, /* 1541 */
+ XML_IO_EXDEV, /* 1542 */
+ XML_IO_NETWORK_ATTEMPT, /* 1543 */
+ XML_IO_ENCODER, /* 1544 */
+ XML_IO_FLUSH, /* 1545 */
+ XML_IO_WRITE, /* 1546 */
+ XML_IO_NO_INPUT, /* 1547 */
+ XML_IO_BUFFER_FULL, /* 1548 */
+ XML_IO_LOAD_ERROR, /* 1549 */
+ XML_IO_ENOTSOCK, /* 1550 */
+ XML_IO_EISCONN, /* 1551 */
+ XML_IO_ECONNREFUSED, /* 1552 */
+ XML_IO_ENETUNREACH, /* 1553 */
+ XML_IO_EADDRINUSE, /* 1554 */
+ XML_IO_EALREADY, /* 1555 */
+ XML_IO_EAFNOSUPPORT, /* 1556 */
+ XML_XINCLUDE_RECURSION=1600,
+ XML_XINCLUDE_PARSE_VALUE, /* 1601 */
+ XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
+ XML_XINCLUDE_NO_HREF, /* 1603 */
+ XML_XINCLUDE_NO_FALLBACK, /* 1604 */
+ XML_XINCLUDE_HREF_URI, /* 1605 */
+ XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
+ XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
+ XML_XINCLUDE_INVALID_CHAR, /* 1608 */
+ XML_XINCLUDE_BUILD_FAILED, /* 1609 */
+ XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
+ XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
+ XML_XINCLUDE_XPTR_FAILED, /* 1612 */
+ XML_XINCLUDE_XPTR_RESULT, /* 1613 */
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
+ XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
+ XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
+ XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
+ XML_CATALOG_MISSING_ATTR = 1650,
+ XML_CATALOG_ENTRY_BROKEN, /* 1651 */
+ XML_CATALOG_PREFER_VALUE, /* 1652 */
+ XML_CATALOG_NOT_CATALOG, /* 1653 */
+ XML_CATALOG_RECURSION, /* 1654 */
+ XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
+ XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
+ XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
+ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
+ XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
+ XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
+ XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
+ XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
+ XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
+ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
+ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
+ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
+ XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
+ XML_SCHEMAP_INVALID_ENUM, /* 1715 */
+ XML_SCHEMAP_INVALID_FACET, /* 1716 */
+ XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
+ XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
+ XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
+ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
+ XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
+ XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
+ XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
+ XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
+ XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
+ XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
+ XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
+ XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
+ XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
+ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
+ XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
+ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
+ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
+ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
+ XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
+ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
+ XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
+ XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
+ XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
+ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
+ XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
+ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
+ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
+ XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
+ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
+ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
+ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
+ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
+ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
+ XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
+ XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
+ XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
+ XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
+ XML_SCHEMAP_FAILED_LOAD, /* 1757 */
+ XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
+ XML_SCHEMAP_NOROOT, /* 1759 */
+ XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
+ XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
+ XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
+ XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
+ XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
+ XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
+ XML_SCHEMAP_FAILED_PARSE, /* 1766 */
+ XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
+ XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
+ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
+ XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
+ XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
+ XML_SCHEMAP_RECURSIVE, /* 1775 */
+ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
+ XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
+ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
+ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
+ XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
+ XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
+ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
+ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
+ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
+ XML_SCHEMAV_NOROOT = 1801,
+ XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
+ XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
+ XML_SCHEMAV_MISSING, /* 1804 */
+ XML_SCHEMAV_WRONGELEM, /* 1805 */
+ XML_SCHEMAV_NOTYPE, /* 1806 */
+ XML_SCHEMAV_NOROLLBACK, /* 1807 */
+ XML_SCHEMAV_ISABSTRACT, /* 1808 */
+ XML_SCHEMAV_NOTEMPTY, /* 1809 */
+ XML_SCHEMAV_ELEMCONT, /* 1810 */
+ XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
+ XML_SCHEMAV_NOTNILLABLE, /* 1812 */
+ XML_SCHEMAV_EXTRACONTENT, /* 1813 */
+ XML_SCHEMAV_INVALIDATTR, /* 1814 */
+ XML_SCHEMAV_INVALIDELEM, /* 1815 */
+ XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
+ XML_SCHEMAV_CONSTRUCT, /* 1817 */
+ XML_SCHEMAV_INTERNAL, /* 1818 */
+ XML_SCHEMAV_NOTSIMPLE, /* 1819 */
+ XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
+ XML_SCHEMAV_ATTRINVALID, /* 1821 */
+ XML_SCHEMAV_VALUE, /* 1822 */
+ XML_SCHEMAV_FACET, /* 1823 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
+ XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
+ XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
+ XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
+ XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
+ XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
+ XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
+ XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
+ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
+ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
+ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
+ XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
+ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
+ XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
+ XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
+ XML_SCHEMAV_CVC_ELT_1, /* 1845 */
+ XML_SCHEMAV_CVC_ELT_2, /* 1846 */
+ XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
+ XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
+ XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
+ XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
+ XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
+ XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
+ XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
+ XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
+ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
+ XML_SCHEMAV_CVC_ELT_6, /* 1859 */
+ XML_SCHEMAV_CVC_ELT_7, /* 1860 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
+ XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
+ XML_SCHEMAV_CVC_AU, /* 1874 */
+ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
+ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
+ XML_SCHEMAV_CVC_IDC, /* 1877 */
+ XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
+ XML_SCHEMAV_MISC, /* 1879 */
+ XML_XPTR_UNKNOWN_SCHEME = 1900,
+ XML_XPTR_CHILDSEQ_START, /* 1901 */
+ XML_XPTR_EVAL_FAILED, /* 1902 */
+ XML_XPTR_EXTRA_OBJECTS, /* 1903 */
+ XML_C14N_CREATE_CTXT = 1950,
+ XML_C14N_REQUIRES_UTF8, /* 1951 */
+ XML_C14N_CREATE_STACK, /* 1952 */
+ XML_C14N_INVALID_NODE, /* 1953 */
+ XML_C14N_UNKNOW_NODE, /* 1954 */
+ XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
+ XML_FTP_PASV_ANSWER = 2000,
+ XML_FTP_EPSV_ANSWER, /* 2001 */
+ XML_FTP_ACCNT, /* 2002 */
+ XML_FTP_URL_SYNTAX, /* 2003 */
+ XML_HTTP_URL_SYNTAX = 2020,
+ XML_HTTP_USE_IP, /* 2021 */
+ XML_HTTP_UNKNOWN_HOST, /* 2022 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
+ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
+ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
+ XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
+ XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
+ XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
+ XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
+ XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
+ XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
+ XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
+ XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
+ XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
+ XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
+ XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
+ XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
+ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
+ XML_SCHEMAP_NO_XMLNS, /* 3056 */
+ XML_SCHEMAP_NO_XSI, /* 3057 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
+ XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
+ XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
+ XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
+ XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
+ XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
+ XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
+ XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
+ XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
+ XML_SCHEMAP_SRC_CT_1, /* 3076 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
+ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
+ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
+ XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
+ XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
+ XML_SCHEMAP_SRC_IMPORT, /* 3082 */
+ XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
+ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
+ XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
+ XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
+ XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
+ XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
+ XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
+ XML_SCHEMATRONV_REPORT,
+ XML_MODULE_OPEN = 4900, /* 4900 */
+ XML_MODULE_CLOSE, /* 4901 */
+ XML_CHECK_FOUND_ELEMENT = 5000,
+ XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
+ XML_CHECK_FOUND_TEXT, /* 5002 */
+ XML_CHECK_FOUND_CDATA, /* 5003 */
+ XML_CHECK_FOUND_ENTITYREF, /* 5004 */
+ XML_CHECK_FOUND_ENTITY, /* 5005 */
+ XML_CHECK_FOUND_PI, /* 5006 */
+ XML_CHECK_FOUND_COMMENT, /* 5007 */
+ XML_CHECK_FOUND_DOCTYPE, /* 5008 */
+ XML_CHECK_FOUND_FRAGMENT, /* 5009 */
+ XML_CHECK_FOUND_NOTATION, /* 5010 */
+ XML_CHECK_UNKNOWN_NODE, /* 5011 */
+ XML_CHECK_ENTITY_TYPE, /* 5012 */
+ XML_CHECK_NO_PARENT, /* 5013 */
+ XML_CHECK_NO_DOC, /* 5014 */
+ XML_CHECK_NO_NAME, /* 5015 */
+ XML_CHECK_NO_ELEM, /* 5016 */
+ XML_CHECK_WRONG_DOC, /* 5017 */
+ XML_CHECK_NO_PREV, /* 5018 */
+ XML_CHECK_WRONG_PREV, /* 5019 */
+ XML_CHECK_NO_NEXT, /* 5020 */
+ XML_CHECK_WRONG_NEXT, /* 5021 */
+ XML_CHECK_NOT_DTD, /* 5022 */
+ XML_CHECK_NOT_ATTR, /* 5023 */
+ XML_CHECK_NOT_ATTR_DECL, /* 5024 */
+ XML_CHECK_NOT_ELEM_DECL, /* 5025 */
+ XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
+ XML_CHECK_NOT_NS_DECL, /* 5027 */
+ XML_CHECK_NO_HREF, /* 5028 */
+ XML_CHECK_WRONG_PARENT,/* 5029 */
+ XML_CHECK_NS_SCOPE, /* 5030 */
+ XML_CHECK_NS_ANCESTOR, /* 5031 */
+ XML_CHECK_NOT_UTF8, /* 5032 */
+ XML_CHECK_NO_DICT, /* 5033 */
+ XML_CHECK_NOT_NCNAME, /* 5034 */
+ XML_CHECK_OUTSIDE_DICT, /* 5035 */
+ XML_CHECK_WRONG_NAME, /* 5036 */
+ XML_CHECK_NAME_NOT_NULL, /* 5037 */
+ XML_I18N_NO_NAME = 6000,
+ XML_I18N_NO_HANDLER, /* 6001 */
+ XML_I18N_EXCESS_HANDLER, /* 6002 */
+ XML_I18N_CONV_FAILED, /* 6003 */
+ XML_I18N_NO_OUTPUT /* 6004 */
+#if 0
+ XML_CHECK_, /* 5033 */
+ XML_CHECK_X /* 503 */
+#endif
+} xmlParserErrors;
+
+/**
+ * xmlGenericErrorFunc:
+ * @ctx: a parsing context
+ * @msg: the message
+ * @...: the extra arguments of the varags to format the message
+ *
+ * Signature of the function to use when there is an error and
+ * no parsing or validity context available .
+ */
+typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * xmlStructuredErrorFunc:
+ * @userData: user provided data for the error callback
+ * @error: the error being raised.
+ *
+ * Signature of the function to use when there is an error and
+ * the module handles the new error reporting mechanism.
+ */
+typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
+
+/*
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
+ */
+XMLPUBFUN void XMLCALL
+ xmlSetGenericErrorFunc (void *ctx,
+ xmlGenericErrorFunc handler);
+XMLPUBFUN void XMLCALL
+ initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
+
+XMLPUBFUN void XMLCALL
+ xmlSetStructuredErrorFunc (void *ctx,
+ xmlStructuredErrorFunc handler);
+/*
+ * Default message routines used by SAX and Valid context for error
+ * and warning reporting.
+ */
+XMLPUBFUN void XMLCDECL
+ xmlParserError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserValidityError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserValidityWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCALL
+ xmlParserPrintFileInfo (xmlParserInputPtr input);
+XMLPUBFUN void XMLCALL
+ xmlParserPrintFileContext (xmlParserInputPtr input);
+
+/*
+ * Extended error information routines
+ */
+XMLPUBFUN xmlErrorPtr XMLCALL
+ xmlGetLastError (void);
+XMLPUBFUN void XMLCALL
+ xmlResetLastError (void);
+XMLPUBFUN xmlErrorPtr XMLCALL
+ xmlCtxtGetLastError (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlCtxtResetLastError (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlResetError (xmlErrorPtr err);
+XMLPUBFUN int XMLCALL
+ xmlCopyError (xmlErrorPtr from,
+ xmlErrorPtr to);
+
+#ifdef IN_LIBXML
+/*
+ * Internal callback reporting routine
+ */
+XMLPUBFUN void XMLCALL
+ __xmlRaiseError (xmlStructuredErrorFunc schannel,
+ xmlGenericErrorFunc channel,
+ void *data,
+ void *ctx,
+ void *node,
+ int domain,
+ int code,
+ xmlErrorLevel level,
+ const char *file,
+ int line,
+ const char *str1,
+ const char *str2,
+ const char *str3,
+ int int1,
+ int col,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(16,17);
+XMLPUBFUN void XMLCALL
+ __xmlSimpleError (int domain,
+ int code,
+ xmlNodePtr node,
+ const char *msg,
+ const char *extra);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_ERROR_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlexports.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlexports.h
new file mode 100644
index 0000000..7a72ec7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlexports.h
@@ -0,0 +1,162 @@
+/*
+ * Summary: macros for marking symbols as exportable/importable.
+ * Description: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Igor Zlatovic <igor@zlatkovic.com>
+ */
+
+#ifndef __XML_EXPORTS_H__
+#define __XML_EXPORTS_H__
+
+/**
+ * XMLPUBFUN, XMLPUBVAR, XMLCALL
+ *
+ * Macros which declare an exportable function, an exportable variable and
+ * the calling convention used for functions.
+ *
+ * Please use an extra block for every platform/compiler combination when
+ * modifying this, rather than overlong #ifdef lines. This helps
+ * readability as well as the fact that different compilers on the same
+ * platform might need different definitions.
+ */
+
+/**
+ * XMLPUBFUN:
+ *
+ * Macros which declare an exportable function
+ */
+#define XMLPUBFUN
+/**
+ * XMLPUBVAR:
+ *
+ * Macros which declare an exportable variable
+ */
+#define XMLPUBVAR extern
+/**
+ * XMLCALL:
+ *
+ * Macros which declare the called convention for exported functions
+ */
+#define XMLCALL
+/**
+ * XMLCDECL:
+ *
+ * Macro which declares the calling convention for exported functions that
+ * use '...'.
+ */
+#define XMLCDECL
+
+/** DOC_DISABLE */
+
+/* Windows platform with MS compiler */
+#if defined(_WIN32) && defined(_MSC_VER)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #if defined(LIBXML_FASTCALL)
+ #define XMLCALL __fastcall
+ #else
+ #define XMLCALL __cdecl
+ #endif
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Windows platform with Borland compiler */
+#if defined(_WIN32) && defined(__BORLANDC__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Windows platform with GNU compiler (Mingw) */
+#if defined(_WIN32) && defined(__MINGW32__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ /*
+ * if defined(IN_LIBXML) this raises problems on mingw with msys
+ * _imp__xmlFree listed as missing. Try to workaround the problem
+ * by also making that declaration when compiling client code.
+ */
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Cygwin platform, GNU compiler */
+#if defined(_WIN32) && defined(__CYGWIN__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+#endif
+
+/* Compatibility */
+#if !defined(LIBXML_DLL_IMPORT)
+#define LIBXML_DLL_IMPORT XMLPUBVAR
+#endif
+
+#endif /* __XML_EXPORTS_H__ */
+
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlmemory.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlmemory.h
new file mode 100644
index 0000000..17e375a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlmemory.h
@@ -0,0 +1,224 @@
+/*
+ * Summary: interface for the memory allocator
+ * Description: provides interfaces for the memory allocator,
+ * including debugging capabilities.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __DEBUG_MEMORY_ALLOC__
+#define __DEBUG_MEMORY_ALLOC__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+
+/**
+ * DEBUG_MEMORY:
+ *
+ * DEBUG_MEMORY replaces the allocator with a collect and debug
+ * shell to the libc allocator.
+ * DEBUG_MEMORY should only be activated when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+ */
+/* #define DEBUG_MEMORY_FREED */
+/* #define DEBUG_MEMORY_LOCATION */
+
+#ifdef DEBUG
+#ifndef DEBUG_MEMORY
+#define DEBUG_MEMORY
+#endif
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * DEBUG_MEMORY_LOCATION should be activated only when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+ */
+#ifdef DEBUG_MEMORY_LOCATION
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The XML memory wrapper support 4 basic overloadable functions.
+ */
+/**
+ * xmlFreeFunc:
+ * @mem: an already allocated block of memory
+ *
+ * Signature for a free() implementation.
+ */
+typedef void (XMLCALL *xmlFreeFunc)(void *mem);
+/**
+ * xmlMallocFunc:
+ * @size: the size requested in bytes
+ *
+ * Signature for a malloc() implementation.
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error.
+ */
+typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
+
+/**
+ * xmlReallocFunc:
+ * @mem: an already allocated block of memory
+ * @size: the new size requested in bytes
+ *
+ * Signature for a realloc() implementation.
+ *
+ * Returns a pointer to the newly reallocated block or NULL in case of error.
+ */
+typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
+
+/**
+ * xmlStrdupFunc:
+ * @str: a zero terminated string
+ *
+ * Signature for an strdup() implementation.
+ *
+ * Returns the copy of the string or NULL in case of error.
+ */
+typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
+
+/*
+ * The 4 interfaces used for all memory handling within libxml.
+LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
+LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
+LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
+LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
+LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
+ */
+
+/*
+ * The way to overload the existing functions.
+ * The xmlGc function have an extra entry for atomic block
+ * allocations useful for garbage collected memory allocators
+ */
+XMLPUBFUN int XMLCALL
+ xmlMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlGcMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlMallocFunc mallocAtomicFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlGcMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlMallocFunc *mallocAtomicFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+
+/*
+ * Initialization of the memory layer.
+ */
+XMLPUBFUN int XMLCALL
+ xmlInitMemory (void);
+
+/*
+ * Cleanup of the memory layer.
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupMemory (void);
+/*
+ * These are specific to the XML debug memory wrapper.
+ */
+XMLPUBFUN int XMLCALL
+ xmlMemUsed (void);
+XMLPUBFUN int XMLCALL
+ xmlMemBlocks (void);
+XMLPUBFUN void XMLCALL
+ xmlMemDisplay (FILE *fp);
+XMLPUBFUN void XMLCALL
+ xmlMemDisplayLast(FILE *fp, long nbBytes);
+XMLPUBFUN void XMLCALL
+ xmlMemShow (FILE *fp, int nr);
+XMLPUBFUN void XMLCALL
+ xmlMemoryDump (void);
+XMLPUBFUN void * XMLCALL
+ xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void * XMLCALL
+ xmlMemRealloc (void *ptr,size_t size);
+XMLPUBFUN void XMLCALL
+ xmlMemFree (void *ptr);
+XMLPUBFUN char * XMLCALL
+ xmlMemoryStrdup (const char *str);
+XMLPUBFUN void * XMLCALL
+ xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void * XMLCALL
+ xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
+XMLPUBFUN void * XMLCALL
+ xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN char * XMLCALL
+ xmlMemStrdupLoc (const char *str, const char *file, int line);
+
+
+#ifdef DEBUG_MEMORY_LOCATION
+/**
+ * xmlMalloc:
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the malloc() function used in the XML library.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
+/**
+ * xmlMallocAtomic:
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the malloc() function used in the XML library for allocation
+ * of block not containing pointers to other areas.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
+/**
+ * xmlRealloc:
+ * @ptr: pointer to the existing allocated area
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the realloc() function used in the XML library.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
+/**
+ * xmlMemStrdup:
+ * @str: pointer to the existing string
+ *
+ * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
+
+#endif /* DEBUG_MEMORY_LOCATION */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#ifndef __XML_GLOBALS_H
+#ifndef __XML_THREADS_H__
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+#endif
+#endif
+
+#endif /* __DEBUG_MEMORY_ALLOC__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlmodule.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlmodule.h
new file mode 100644
index 0000000..9667820
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlmodule.h
@@ -0,0 +1,57 @@
+/*
+ * Summary: dynamic module loading
+ * Description: basic API for dynamic module loading, used by
+ * libexslt added in 2.6.17
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Joel W. Reed
+ */
+
+#ifndef __XML_MODULE_H__
+#define __XML_MODULE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_MODULES_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlModulePtr:
+ *
+ * A handle to a dynamically loaded module
+ */
+typedef struct _xmlModule xmlModule;
+typedef xmlModule *xmlModulePtr;
+
+/**
+ * xmlModuleOption:
+ *
+ * enumeration of options that can be passed down to xmlModuleOpen()
+ */
+typedef enum {
+ XML_MODULE_LAZY = 1, /* lazy binding */
+ XML_MODULE_LOCAL= 2 /* local binding */
+} xmlModuleOption;
+
+XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
+ int options);
+
+XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
+ const char* name,
+ void **result);
+
+XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
+
+XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_MODULES_ENABLED */
+
+#endif /*__XML_MODULE_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlreader.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlreader.h
new file mode 100644
index 0000000..6964482
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlreader.h
@@ -0,0 +1,424 @@
+/*
+ * Summary: the XMLReader implementation
+ * Description: API of the XML streaming API based on C# interfaces.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLREADER_H__
+#define __XML_XMLREADER_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserSeverities:
+ *
+ * How severe an error callback is when the per-reader error callback API
+ * is used.
+ */
+typedef enum {
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
+ XML_PARSER_SEVERITY_WARNING = 3,
+ XML_PARSER_SEVERITY_ERROR = 4
+} xmlParserSeverities;
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
+ * xmlTextReaderMode:
+ *
+ * Internal state values for the reader.
+ */
+typedef enum {
+ XML_TEXTREADER_MODE_INITIAL = 0,
+ XML_TEXTREADER_MODE_INTERACTIVE = 1,
+ XML_TEXTREADER_MODE_ERROR = 2,
+ XML_TEXTREADER_MODE_EOF =3,
+ XML_TEXTREADER_MODE_CLOSED = 4,
+ XML_TEXTREADER_MODE_READING = 5
+} xmlTextReaderMode;
+
+/**
+ * xmlParserProperties:
+ *
+ * Some common options to use with xmlTextReaderSetParserProp, but it
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
+ * xmlReaderForxxx APIs now.
+ */
+typedef enum {
+ XML_PARSER_LOADDTD = 1,
+ XML_PARSER_DEFAULTATTRS = 2,
+ XML_PARSER_VALIDATE = 3,
+ XML_PARSER_SUBST_ENTITIES = 4
+} xmlParserProperties;
+
+/**
+ * xmlReaderTypes:
+ *
+ * Predefined constants for the different types of nodes.
+ */
+typedef enum {
+ XML_READER_TYPE_NONE = 0,
+ XML_READER_TYPE_ELEMENT = 1,
+ XML_READER_TYPE_ATTRIBUTE = 2,
+ XML_READER_TYPE_TEXT = 3,
+ XML_READER_TYPE_CDATA = 4,
+ XML_READER_TYPE_ENTITY_REFERENCE = 5,
+ XML_READER_TYPE_ENTITY = 6,
+ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
+ XML_READER_TYPE_COMMENT = 8,
+ XML_READER_TYPE_DOCUMENT = 9,
+ XML_READER_TYPE_DOCUMENT_TYPE = 10,
+ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
+ XML_READER_TYPE_NOTATION = 12,
+ XML_READER_TYPE_WHITESPACE = 13,
+ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
+ XML_READER_TYPE_END_ELEMENT = 15,
+ XML_READER_TYPE_END_ENTITY = 16,
+ XML_READER_TYPE_XML_DECLARATION = 17
+} xmlReaderTypes;
+
+/**
+ * xmlTextReader:
+ *
+ * Structure for an xmlReader context.
+ */
+typedef struct _xmlTextReader xmlTextReader;
+
+/**
+ * xmlTextReaderPtr:
+ *
+ * Pointer to an xmlReader context.
+ */
+typedef xmlTextReader *xmlTextReaderPtr;
+
+/*
+ * Constructors & Destructor
+ */
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlNewTextReader (xmlParserInputBufferPtr input,
+ const char *URI);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlNewTextReaderFilename(const char *URI);
+
+XMLPUBFUN void XMLCALL
+ xmlFreeTextReader (xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetup(xmlTextReaderPtr reader,
+ xmlParserInputBufferPtr input, const char *URL,
+ const char *encoding, int options);
+
+/*
+ * Iterators
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRead (xmlTextReaderPtr reader);
+
+#ifdef LIBXML_WRITER_ENABLED
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
+#endif
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadString (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
+
+/*
+ * Attributes of the node
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderDepth (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderHasValue(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsDefault (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNodeType (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderReadState (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
+
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstString (xmlTextReaderPtr reader,
+ const xmlChar *str);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstValue (xmlTextReaderPtr reader);
+
+/*
+ * use the Const version of the routine for
+ * better performance and simpler code
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderValue (xmlTextReaderPtr reader);
+
+/*
+ * Methods of the XmlTextReader
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderClose (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
+ const xmlChar *prefix);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNormalization (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
+
+/*
+ * Extensions
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
+ int prop,
+ int value);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
+ int prop);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderPreserve (xmlTextReaderPtr reader);
+#ifdef LIBXML_PATTERN_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
+ const xmlChar *pattern,
+ const xmlChar **namespaces);
+#endif /* LIBXML_PATTERN_ENABLED */
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderExpand (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNext (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNextSibling (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsValid (xmlTextReaderPtr reader);
+#ifdef LIBXML_SCHEMAS_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
+ const char *rng);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
+ const char *xsd);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+ xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetSchema (xmlTextReaderPtr reader,
+ xmlSchemaPtr schema);
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderStandalone (xmlTextReaderPtr reader);
+
+
+/*
+ * Index lookup
+ */
+XMLPUBFUN long XMLCALL
+ xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
+
+/*
+ * New more complete APIs for simpler creation and reuse of readers
+ */
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderWalker (xmlDocPtr doc);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForDoc (const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForFile (const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN int XMLCALL
+ xmlReaderNewWalker (xmlTextReaderPtr reader,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewDoc (xmlTextReaderPtr reader,
+ const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewFile (xmlTextReaderPtr reader,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewMemory (xmlTextReaderPtr reader,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewFd (xmlTextReaderPtr reader,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewIO (xmlTextReaderPtr reader,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+/*
+ * Error handling extensions
+ */
+typedef void * xmlTextReaderLocatorPtr;
+
+/**
+ * xmlTextReaderErrorFunc:
+ * @arg: the user argument
+ * @msg: the message
+ * @severity: the severity of the error
+ * @locator: a locator indicating where the error occured
+ *
+ * Signature of an error callback from a reader parser
+ */
+typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
+ const char *msg,
+ xmlParserSeverities severity,
+ xmlTextReaderLocatorPtr locator);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
+/*int xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc f,
+ void *arg);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
+ xmlStructuredErrorFunc f,
+ void *arg);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc *f,
+ void **arg);
+
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XMLREADER_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlregexp.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlregexp.h
new file mode 100644
index 0000000..7009645
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlregexp.h
@@ -0,0 +1,222 @@
+/*
+ * Summary: regular expressions handling
+ * Description: basic API for libxml regular expressions handling used
+ * for XML Schemas and validation.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_REGEXP_H__
+#define __XML_REGEXP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlRegexpPtr:
+ *
+ * A libxml regular expression, they can actually be far more complex
+ * thank the POSIX regex expressions.
+ */
+typedef struct _xmlRegexp xmlRegexp;
+typedef xmlRegexp *xmlRegexpPtr;
+
+/**
+ * xmlRegExecCtxtPtr:
+ *
+ * A libxml progressive regular expression evaluation context
+ */
+typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
+typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The POSIX like API
+ */
+XMLPUBFUN xmlRegexpPtr XMLCALL
+ xmlRegexpCompile (const xmlChar *regexp);
+XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
+XMLPUBFUN int XMLCALL
+ xmlRegexpExec (xmlRegexpPtr comp,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlRegexpPrint (FILE *output,
+ xmlRegexpPtr regexp);
+XMLPUBFUN int XMLCALL
+ xmlRegexpIsDeterminist(xmlRegexpPtr comp);
+
+/**
+ * xmlRegExecCallbacks:
+ * @exec: the regular expression context
+ * @token: the current token string
+ * @transdata: transition data
+ * @inputdata: input data
+ *
+ * Callback function when doing a transition in the automata
+ */
+typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
+ const xmlChar *token,
+ void *transdata,
+ void *inputdata);
+
+/*
+ * The progressive API
+ */
+XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
+ xmlRegExecCallbacks callback,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ const xmlChar *value2,
+ void *data);
+
+XMLPUBFUN int XMLCALL
+ xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+XMLPUBFUN int XMLCALL
+ xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
+ const xmlChar **string,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+#ifdef LIBXML_EXPR_ENABLED
+/*
+ * Formal regular expression handling
+ * Its goal is to do some formal work on content models
+ */
+
+/* expressions are used within a context */
+typedef struct _xmlExpCtxt xmlExpCtxt;
+typedef xmlExpCtxt *xmlExpCtxtPtr;
+
+XMLPUBFUN void XMLCALL
+ xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
+XMLPUBFUN xmlExpCtxtPtr XMLCALL
+ xmlExpNewCtxt (int maxNodes,
+ xmlDictPtr dict);
+
+XMLPUBFUN int XMLCALL
+ xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
+
+/* Expressions are trees but the tree is opaque */
+typedef struct _xmlExpNode xmlExpNode;
+typedef xmlExpNode *xmlExpNodePtr;
+
+typedef enum {
+ XML_EXP_EMPTY = 0,
+ XML_EXP_FORBID = 1,
+ XML_EXP_ATOM = 2,
+ XML_EXP_SEQ = 3,
+ XML_EXP_OR = 4,
+ XML_EXP_COUNT = 5
+} xmlExpNodeType;
+
+/*
+ * 2 core expressions shared by all for the empty language set
+ * and for the set with just the empty token
+ */
+XMLPUBVAR xmlExpNodePtr forbiddenExp;
+XMLPUBVAR xmlExpNodePtr emptyExp;
+
+/*
+ * Expressions are reference counted internally
+ */
+XMLPUBFUN void XMLCALL
+ xmlExpFree (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr);
+XMLPUBFUN void XMLCALL
+ xmlExpRef (xmlExpNodePtr expr);
+
+/*
+ * constructors can be either manual or from a string
+ */
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpParse (xmlExpCtxtPtr ctxt,
+ const char *expr);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewAtom (xmlExpCtxtPtr ctxt,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewOr (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr left,
+ xmlExpNodePtr right);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewSeq (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr left,
+ xmlExpNodePtr right);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewRange (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr subset,
+ int min,
+ int max);
+/*
+ * The really interesting APIs
+ */
+XMLPUBFUN int XMLCALL
+ xmlExpIsNillable(xmlExpNodePtr expr);
+XMLPUBFUN int XMLCALL
+ xmlExpMaxToken (xmlExpNodePtr expr);
+XMLPUBFUN int XMLCALL
+ xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar**langList,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlExpGetStart (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar**tokList,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpStringDerive(xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpExpDerive (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ xmlExpNodePtr sub);
+XMLPUBFUN int XMLCALL
+ xmlExpSubsume (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ xmlExpNodePtr sub);
+XMLPUBFUN void XMLCALL
+ xmlExpDump (xmlBufferPtr buf,
+ xmlExpNodePtr expr);
+#endif /* LIBXML_EXPR_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /*__XML_REGEXP_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlsave.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlsave.h
new file mode 100644
index 0000000..fb329b2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlsave.h
@@ -0,0 +1,88 @@
+/*
+ * Summary: the XML document serializer
+ * Description: API to save document or subtree of document
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLSAVE_H__
+#define __XML_XMLSAVE_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlSaveOption:
+ *
+ * This is the set of XML save options that can be passed down
+ * to the xmlSaveToFd() and similar calls.
+ */
+typedef enum {
+ XML_SAVE_FORMAT = 1<<0, /* format save output */
+ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
+ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
+ XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
+ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
+ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
+ XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
+ XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
+} xmlSaveOption;
+
+
+typedef struct _xmlSaveCtxt xmlSaveCtxt;
+typedef xmlSaveCtxt *xmlSaveCtxtPtr;
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToFd (int fd,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToFilename (const char *filename,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToBuffer (xmlBufferPtr buffer,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN long XMLCALL
+ xmlSaveDoc (xmlSaveCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN long XMLCALL
+ xmlSaveTree (xmlSaveCtxtPtr ctxt,
+ xmlNodePtr node);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFlush (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSaveClose (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+XMLPUBFUN int XMLCALL
+ xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* __XML_XMLSAVE_H__ */
+
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlschemas.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlschemas.h
new file mode 100644
index 0000000..752bc3a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlschemas.h
@@ -0,0 +1,218 @@
+/*
+ * Summary: incomplete XML Schemas structure implementation
+ * Description: interface to the XML Schemas handling and schema validity
+ * checking, it is incomplete right now.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_H__
+#define __XML_SCHEMA_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This error codes are obsolete; not used any more.
+ */
+typedef enum {
+ XML_SCHEMAS_ERR_OK = 0,
+ XML_SCHEMAS_ERR_NOROOT = 1,
+ XML_SCHEMAS_ERR_UNDECLAREDELEM,
+ XML_SCHEMAS_ERR_NOTTOPLEVEL,
+ XML_SCHEMAS_ERR_MISSING,
+ XML_SCHEMAS_ERR_WRONGELEM,
+ XML_SCHEMAS_ERR_NOTYPE,
+ XML_SCHEMAS_ERR_NOROLLBACK,
+ XML_SCHEMAS_ERR_ISABSTRACT,
+ XML_SCHEMAS_ERR_NOTEMPTY,
+ XML_SCHEMAS_ERR_ELEMCONT,
+ XML_SCHEMAS_ERR_HAVEDEFAULT,
+ XML_SCHEMAS_ERR_NOTNILLABLE,
+ XML_SCHEMAS_ERR_EXTRACONTENT,
+ XML_SCHEMAS_ERR_INVALIDATTR,
+ XML_SCHEMAS_ERR_INVALIDELEM,
+ XML_SCHEMAS_ERR_NOTDETERMINIST,
+ XML_SCHEMAS_ERR_CONSTRUCT,
+ XML_SCHEMAS_ERR_INTERNAL,
+ XML_SCHEMAS_ERR_NOTSIMPLE,
+ XML_SCHEMAS_ERR_ATTRUNKNOWN,
+ XML_SCHEMAS_ERR_ATTRINVALID,
+ XML_SCHEMAS_ERR_VALUE,
+ XML_SCHEMAS_ERR_FACET,
+ XML_SCHEMAS_ERR_,
+ XML_SCHEMAS_ERR_XXX
+} xmlSchemaValidError;
+
+/*
+* ATTENTION: Change xmlSchemaSetValidOptions's check
+* for invalid values, if adding to the validation
+* options below.
+*/
+/**
+ * xmlSchemaValidOption:
+ *
+ * This is the set of XML Schema validation options.
+ */
+typedef enum {
+ XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
+ /* Default/fixed: create an attribute node
+ * or an element's text node on the instance.
+ */
+} xmlSchemaValidOption;
+
+/*
+ XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
+ * assemble schemata using
+ * xsi:schemaLocation and
+ * xsi:noNamespaceSchemaLocation
+*/
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchema xmlSchema;
+typedef xmlSchema *xmlSchemaPtr;
+
+/**
+ * xmlSchemaValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from an XSD validation
+ */
+typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlSchemaValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from an XSD validation
+ */
+typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
+typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
+
+typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
+typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc * err,
+ xmlSchemaValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaPtr XMLCALL
+ xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFree (xmlSchemaPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSchemaDump (FILE *output,
+ xmlSchemaPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc *err,
+ xmlSchemaValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
+ xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc,
+ xmlSAXHandlerPtr sax,
+ void *user_data);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
+ const char * filename,
+ int options);
+
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
+
+/*
+ * Interface to insert Schemas SAX validation in a SAX stream
+ */
+typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
+typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
+
+XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
+ xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
+ xmlSAXHandlerPtr *sax,
+ void **user_data);
+XMLPUBFUN int XMLCALL
+ xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlschemastypes.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlschemastypes.h
new file mode 100644
index 0000000..96017b5
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlschemastypes.h
@@ -0,0 +1,151 @@
+/*
+ * Summary: implementation of XML Schema Datatypes
+ * Description: module providing the XML Schema Datatypes implementation
+ * both definition and validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_TYPES_H__
+#define __XML_SCHEMA_TYPES_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/schemasInternals.h>
+#include <libxml/xmlschemas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
+ XML_SCHEMA_WHITESPACE_PRESERVE = 1,
+ XML_SCHEMA_WHITESPACE_REPLACE = 2,
+ XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+} xmlSchemaWhitespaceValueType;
+
+XMLPUBFUN void XMLCALL
+ xmlSchemaInitTypes (void);
+XMLPUBFUN void XMLCALL
+ xmlSchemaCleanupTypes (void);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetPredefinedType (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFacet (xmlSchemaTypePtr base,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
+ xmlSchemaWhitespaceValueType fws,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaFacetPtr XMLCALL
+ xmlSchemaNewFacet (void);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
+ xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCompareValues (xmlSchemaValPtr x,
+ xmlSchemaValPtr y);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ unsigned long actualLen,
+ unsigned long *expectedLen);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetBuiltInType (xmlSchemaValType type);
+XMLPUBFUN int XMLCALL
+ xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
+ int facetType);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSchemaCollapseString (const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSchemaWhiteSpaceReplace (const xmlChar *value);
+XMLPUBFUN unsigned long XMLCALL
+ xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetCanonValue (xmlSchemaValPtr val,
+ const xmlChar **retValue);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
+ const xmlChar **retValue,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValueAppend (xmlSchemaValPtr prev,
+ xmlSchemaValPtr cur);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaValueGetNext (xmlSchemaValPtr cur);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSchemaValueGetAsString (xmlSchemaValPtr val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewStringValue (xmlSchemaValType type,
+ const xmlChar *value);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewNOTATIONValue (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewQNameValue (const xmlChar *namespaceName,
+ const xmlChar *localName);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValPtr y,
+ xmlSchemaWhitespaceValueType yws);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaCopyValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValType XMLCALL
+ xmlSchemaGetValType (xmlSchemaValPtr val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_TYPES_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlstring.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlstring.h
new file mode 100644
index 0000000..2036236
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlstring.h
@@ -0,0 +1,140 @@
+/*
+ * Summary: set of routines to process strings
+ * Description: type and interfaces needed for the internal string handling
+ * of the library, especially UTF8 processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_STRING_H__
+#define __XML_STRING_H__
+
+#include <stdarg.h>
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlChar:
+ *
+ * This is a basic byte in an UTF-8 encoded string.
+ * It's unsigned allowing to pinpoint case where char * are assigned
+ * to xmlChar * (possibly making serialization back impossible).
+ */
+typedef unsigned char xmlChar;
+
+/**
+ * BAD_CAST:
+ *
+ * Macro to cast a string to an xmlChar * when one know its safe.
+ */
+#define BAD_CAST (xmlChar *)
+
+/*
+ * xmlChar handling
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrdup (const xmlChar *cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrndup (const xmlChar *cur,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCharStrndup (const char *cur,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCharStrdup (const char *cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrsub (const xmlChar *str,
+ int start,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrchr (const xmlChar *str,
+ xmlChar val);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrstr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrcasestr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN int XMLCALL
+ xmlStrcmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrncmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrcasecmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrncasecmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrEqual (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrQEqual (const xmlChar *pref,
+ const xmlChar *name,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlStrlen (const xmlChar *str);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrcat (xmlChar *cur,
+ const xmlChar *add);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrncat (xmlChar *cur,
+ const xmlChar *add,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrncatNew (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrPrintf (xmlChar *buf,
+ int len,
+ const xmlChar *msg,
+ ...);
+XMLPUBFUN int XMLCALL
+ xmlStrVPrintf (xmlChar *buf,
+ int len,
+ const xmlChar *msg,
+ va_list ap);
+
+XMLPUBFUN int XMLCALL
+ xmlGetUTF8Char (const unsigned char *utf,
+ int *len);
+XMLPUBFUN int XMLCALL
+ xmlCheckUTF8 (const unsigned char *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strsize (const xmlChar *utf,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlUTF8Strndup (const xmlChar *utf,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlUTF8Strpos (const xmlChar *utf,
+ int pos);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strloc (const xmlChar *utf,
+ const xmlChar *utfchar);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlUTF8Strsub (const xmlChar *utf,
+ int start,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strlen (const xmlChar *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Size (const xmlChar *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Charcmp (const xmlChar *utf1,
+ const xmlChar *utf2);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_STRING_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlunicode.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlunicode.h
new file mode 100644
index 0000000..01ac8b6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlunicode.h
@@ -0,0 +1,202 @@
+/*
+ * Summary: Unicode character APIs
+ * Description: API for the Unicode character APIs
+ *
+ * This file is automatically generated from the
+ * UCS description files of the Unicode Character Database
+ * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
+ * using the genUnicode.py Python script.
+ *
+ * Generation date: Mon Mar 27 11:09:52 2006
+ * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_UNICODE_H__
+#define __XML_UNICODE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_UNICODE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
+
+XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
+
+XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
+
+XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_UNICODE_ENABLED */
+
+#endif /* __XML_UNICODE_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlversion.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlversion.h
new file mode 100644
index 0000000..a66eaea
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlversion.h
@@ -0,0 +1,467 @@
+/*
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+#include <libxml/xmlexports.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+ */
+#ifndef LIBXML2_COMPILING_MSCCDEF
+XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+#endif /* LIBXML2_COMPILING_MSCCDEF */
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "2.7.8"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION 20708
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "20708"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXML_VERSION_EXTRA ""
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(20708);
+
+#ifndef VMS
+#if 0
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO
+#else
+/**
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+ */
+#define WITHOUT_TRIO
+#endif
+#else /* VMS */
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO 1
+#endif /* VMS */
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if 1
+#if defined(_REENTRANT) || defined(__MT__) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
+#define LIBXML_THREAD_ENABLED
+#endif
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+ */
+#if 1
+#define LIBXML_TREE_ENABLED
+#endif
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if 1
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if 1
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if 1
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if 1
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if 1
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if 1
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+ */
+#if 1
+#define LIBXML_FTP_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if 1
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if 1
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if 1
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+ */
+#if 1
+#define LIBXML_LEGACY_ENABLED
+#endif
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if 1
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if 1
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+ */
+#if 1
+#define LIBXML_DOCB_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if 1
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if 1
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if 1
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if 1
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if 0
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if 0
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if 1
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+ */
+#if 0
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+ */
+#if 0
+#define LIBXML_DEBUG_RUNTIME
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+ */
+#if 1
+#define LIBXML_UNICODE_ENABLED
+#endif
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if 1
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_EXPR_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if 1
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION ".dll"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if 1
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+
+#ifndef LIBXML_ATTR_ALLOC_SIZE
+# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
+# else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+# endif
+#else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+#endif
+
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+#ifndef LIBXML_ATTR_FORMAT
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+# else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+# endif
+#else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+#endif
+
+#else /* ! __GNUC__ */
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#define ATTRIBUTE_UNUSED
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+#define LIBXML_ATTR_ALLOC_SIZE(x)
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+#define LIBXML_ATTR_FORMAT(fmt,args)
+#endif /* __GNUC__ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
+
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlwriter.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlwriter.h
new file mode 100644
index 0000000..91e683c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xmlwriter.h
@@ -0,0 +1,485 @@
+
+/*
+ * Summary: text writing API for XML
+ * Description: text writing API for XML
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Alfred Mickautsch <alfred@mickautsch.de>
+ */
+
+#ifndef __XML_XMLWRITER_H__
+#define __XML_XMLWRITER_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_WRITER_ENABLED
+
+#include <stdarg.h>
+#include <libxml/xmlIO.h>
+#include <libxml/list.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef struct _xmlTextWriter xmlTextWriter;
+ typedef xmlTextWriter *xmlTextWriterPtr;
+
+/*
+ * Constructors & Destructor
+ */
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriter(xmlOutputBufferPtr out);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterFilename(const char *uri, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
+ int compression);
+ XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
+
+/*
+ * Functions
+ */
+
+
+/*
+ * Document
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDocument(xmlTextWriterPtr writer,
+ const char *version,
+ const char *encoding,
+ const char *standalone);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
+ writer);
+
+/*
+ * Comments
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
+ writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ content);
+
+/*
+ * Elements
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * Elements conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * Text
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
+ const xmlChar * content, int len);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
+ const xmlChar * content);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+
+/*
+ * Attributes
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
+ writer);
+
+/*
+ * Attributes conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * PI's
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartPI(xmlTextWriterPtr writer,
+ const xmlChar * target);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
+
+/*
+ * PI conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWritePI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const xmlChar * content);
+
+/**
+ * xmlTextWriterWriteProcessingInstruction:
+ *
+ * This macro maps to xmlTextWriterWritePI
+ */
+#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
+
+/*
+ * CDATA
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
+
+/*
+ * CDATA conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
+ const xmlChar * content);
+
+/*
+ * DTD
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
+
+/*
+ * DTD conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * subset);
+
+/**
+ * xmlTextWriterWriteDocType:
+ *
+ * this macro maps to xmlTextWriterWriteDTD
+ */
+#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
+
+/*
+ * DTD element definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD element definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD attribute list definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD attribute list definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD entity definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
+ int pe, const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD entity definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(4,5);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(4,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
+ writer,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar *
+ ndataid);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
+ writer, int pe,
+ const xmlChar * name,
+ const xmlChar *
+ pubid,
+ const xmlChar *
+ sysid,
+ const xmlChar *
+ ndataid,
+ const xmlChar *
+ content);
+
+/*
+ * DTD notation definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+
+/*
+ * Indentation
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
+ const xmlChar * str);
+
+/*
+ * misc
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_WRITER_ENABLED */
+
+#endif /* __XML_XMLWRITER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpath.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpath.h
new file mode 100644
index 0000000..be27346
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpath.h
@@ -0,0 +1,546 @@
+/*
+ * Summary: XML Path Language implementation
+ * Description: API for the XML Path Language implementation
+ *
+ * XML Path Language implementation
+ * XPath is a language for addressing parts of an XML document,
+ * designed to be used by both XSLT and XPointer
+ * http://www.w3.org/TR/xpath
+ *
+ * Implements
+ * W3C Recommendation 16 November 1999
+ * http://www.w3.org/TR/1999/REC-xpath-19991116
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_H__
+#define __XML_XPATH_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#include <libxml/xmlerror.h>
+#include <libxml/tree.h>
+#include <libxml/hash.h>
+#endif /* LIBXML_XPATH_ENABLED */
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+#ifdef LIBXML_XPATH_ENABLED
+
+typedef struct _xmlXPathContext xmlXPathContext;
+typedef xmlXPathContext *xmlXPathContextPtr;
+typedef struct _xmlXPathParserContext xmlXPathParserContext;
+typedef xmlXPathParserContext *xmlXPathParserContextPtr;
+
+/**
+ * The set of XPath error codes.
+ */
+
+typedef enum {
+ XPATH_EXPRESSION_OK = 0,
+ XPATH_NUMBER_ERROR,
+ XPATH_UNFINISHED_LITERAL_ERROR,
+ XPATH_START_LITERAL_ERROR,
+ XPATH_VARIABLE_REF_ERROR,
+ XPATH_UNDEF_VARIABLE_ERROR,
+ XPATH_INVALID_PREDICATE_ERROR,
+ XPATH_EXPR_ERROR,
+ XPATH_UNCLOSED_ERROR,
+ XPATH_UNKNOWN_FUNC_ERROR,
+ XPATH_INVALID_OPERAND,
+ XPATH_INVALID_TYPE,
+ XPATH_INVALID_ARITY,
+ XPATH_INVALID_CTXT_SIZE,
+ XPATH_INVALID_CTXT_POSITION,
+ XPATH_MEMORY_ERROR,
+ XPTR_SYNTAX_ERROR,
+ XPTR_RESOURCE_ERROR,
+ XPTR_SUB_RESOURCE_ERROR,
+ XPATH_UNDEF_PREFIX_ERROR,
+ XPATH_ENCODING_ERROR,
+ XPATH_INVALID_CHAR_ERROR,
+ XPATH_INVALID_CTXT
+} xmlXPathError;
+
+/*
+ * A node-set (an unordered collection of nodes without duplicates).
+ */
+typedef struct _xmlNodeSet xmlNodeSet;
+typedef xmlNodeSet *xmlNodeSetPtr;
+struct _xmlNodeSet {
+ int nodeNr; /* number of nodes in the set */
+ int nodeMax; /* size of the array as allocated */
+ xmlNodePtr *nodeTab; /* array of nodes in no particular order */
+ /* @@ with_ns to check wether namespace nodes should be looked at @@ */
+};
+
+/*
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ * - node-set
+ * - boolean
+ * - number
+ * - string
+ *
+ * @@ XPointer will add more types !
+ */
+
+typedef enum {
+ XPATH_UNDEFINED = 0,
+ XPATH_NODESET = 1,
+ XPATH_BOOLEAN = 2,
+ XPATH_NUMBER = 3,
+ XPATH_STRING = 4,
+ XPATH_POINT = 5,
+ XPATH_RANGE = 6,
+ XPATH_LOCATIONSET = 7,
+ XPATH_USERS = 8,
+ XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
+} xmlXPathObjectType;
+
+typedef struct _xmlXPathObject xmlXPathObject;
+typedef xmlXPathObject *xmlXPathObjectPtr;
+struct _xmlXPathObject {
+ xmlXPathObjectType type;
+ xmlNodeSetPtr nodesetval;
+ int boolval;
+ double floatval;
+ xmlChar *stringval;
+ void *user;
+ int index;
+ void *user2;
+ int index2;
+};
+
+/**
+ * xmlXPathConvertFunc:
+ * @obj: an XPath object
+ * @type: the number of the target type
+ *
+ * A conversion function is associated to a type and used to cast
+ * the new type to primitive values.
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
+
+/*
+ * Extra type: a name and a conversion function.
+ */
+
+typedef struct _xmlXPathType xmlXPathType;
+typedef xmlXPathType *xmlXPathTypePtr;
+struct _xmlXPathType {
+ const xmlChar *name; /* the type name */
+ xmlXPathConvertFunc func; /* the conversion function */
+};
+
+/*
+ * Extra variable: a name and a value.
+ */
+
+typedef struct _xmlXPathVariable xmlXPathVariable;
+typedef xmlXPathVariable *xmlXPathVariablePtr;
+struct _xmlXPathVariable {
+ const xmlChar *name; /* the variable name */
+ xmlXPathObjectPtr value; /* the value */
+};
+
+/**
+ * xmlXPathEvalFunc:
+ * @ctxt: an XPath parser context
+ * @nargs: the number of arguments passed to the function
+ *
+ * An XPath evaluation function, the parameters are on the XPath context stack.
+ */
+
+typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
+ int nargs);
+
+/*
+ * Extra function: a name and a evaluation function.
+ */
+
+typedef struct _xmlXPathFunct xmlXPathFunct;
+typedef xmlXPathFunct *xmlXPathFuncPtr;
+struct _xmlXPathFunct {
+ const xmlChar *name; /* the function name */
+ xmlXPathEvalFunc func; /* the evaluation function */
+};
+
+/**
+ * xmlXPathAxisFunc:
+ * @ctxt: the XPath interpreter context
+ * @cur: the previous node being explored on that axis
+ *
+ * An axis traversal function. To traverse an axis, the engine calls
+ * the first time with cur == NULL and repeat until the function returns
+ * NULL indicating the end of the axis traversal.
+ *
+ * Returns the next node in that axis or NULL if at the end of the axis.
+ */
+
+typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr cur);
+
+/*
+ * Extra axis: a name and an axis function.
+ */
+
+typedef struct _xmlXPathAxis xmlXPathAxis;
+typedef xmlXPathAxis *xmlXPathAxisPtr;
+struct _xmlXPathAxis {
+ const xmlChar *name; /* the axis name */
+ xmlXPathAxisFunc func; /* the search function */
+};
+
+/**
+ * xmlXPathFunction:
+ * @ctxt: the XPath interprestation context
+ * @nargs: the number of arguments
+ *
+ * An XPath function.
+ * The arguments (if any) are popped out from the context stack
+ * and the result is pushed on the stack.
+ */
+
+typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
+
+/*
+ * Function and Variable Lookup.
+ */
+
+/**
+ * xmlXPathVariableLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the variable
+ * @ns_uri: the namespace name hosting this variable
+ *
+ * Prototype for callbacks used to plug variable lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath object value or NULL if not found.
+ */
+typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFuncLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the function
+ * @ns_uri: the namespace name hosting this function
+ *
+ * Prototype for callbacks used to plug function lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath function or NULL if not found.
+ */
+typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFlags:
+ * Flags for XPath engine compilation and runtime
+ */
+/**
+ * XML_XPATH_CHECKNS:
+ *
+ * check namespaces at compilation
+ */
+#define XML_XPATH_CHECKNS (1<<0)
+/**
+ * XML_XPATH_NOVAR:
+ *
+ * forbid variables in expression
+ */
+#define XML_XPATH_NOVAR (1<<1)
+
+/**
+ * xmlXPathContext:
+ *
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ * - a node (the context node)
+ * - a node list (the context node list)
+ * - a set of variable bindings
+ * - a function library
+ * - the set of namespace declarations in scope for the expression
+ * Following the switch to hash tables, this need to be trimmed up at
+ * the next binary incompatible release.
+ * The node may be modified when the context is passed to libxml2
+ * for an XPath evaluation so you may need to initialize it again
+ * before the next call.
+ */
+
+struct _xmlXPathContext {
+ xmlDocPtr doc; /* The current document */
+ xmlNodePtr node; /* The current node */
+
+ int nb_variables_unused; /* unused (hash table) */
+ int max_variables_unused; /* unused (hash table) */
+ xmlHashTablePtr varHash; /* Hash table of defined variables */
+
+ int nb_types; /* number of defined types */
+ int max_types; /* max number of types */
+ xmlXPathTypePtr types; /* Array of defined types */
+
+ int nb_funcs_unused; /* unused (hash table) */
+ int max_funcs_unused; /* unused (hash table) */
+ xmlHashTablePtr funcHash; /* Hash table of defined funcs */
+
+ int nb_axis; /* number of defined axis */
+ int max_axis; /* max number of axis */
+ xmlXPathAxisPtr axis; /* Array of defined axis */
+
+ /* the namespace nodes of the context node */
+ xmlNsPtr *namespaces; /* Array of namespaces */
+ int nsNr; /* number of namespace in scope */
+ void *user; /* function to free */
+
+ /* extra variables */
+ int contextSize; /* the context size */
+ int proximityPosition; /* the proximity position */
+
+ /* extra stuff for XPointer */
+ int xptr; /* is this an XPointer context? */
+ xmlNodePtr here; /* for here() */
+ xmlNodePtr origin; /* for origin() */
+
+ /* the set of namespace declarations in scope for the expression */
+ xmlHashTablePtr nsHash; /* The namespaces hash table */
+ xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
+ void *varLookupData; /* variable lookup data */
+
+ /* Possibility to link in an extra item */
+ void *extra; /* needed for XSLT */
+
+ /* The function name and URI when calling a function */
+ const xmlChar *function;
+ const xmlChar *functionURI;
+
+ /* function lookup function and data */
+ xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
+ void *funcLookupData; /* function lookup data */
+
+ /* temporary namespace lists kept for walking the namespace axis */
+ xmlNsPtr *tmpNsList; /* Array of namespaces */
+ int tmpNsNr; /* number of namespaces in scope */
+
+ /* error reporting mechanism */
+ void *userData; /* user specific data block */
+ xmlStructuredErrorFunc error; /* the callback in case of errors */
+ xmlError lastError; /* the last error */
+ xmlNodePtr debugNode; /* the source node XSLT */
+
+ /* dictionary */
+ xmlDictPtr dict; /* dictionary if any */
+
+ int flags; /* flags to control compilation */
+
+ /* Cache for reusal of XPath objects */
+ void *cache;
+};
+
+/*
+ * The structure of a compiled expression form is not public.
+ */
+
+typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
+typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
+
+/**
+ * xmlXPathParserContext:
+ *
+ * An XPath parser context. It contains pure parsing informations,
+ * an xmlXPathContext, and the stack of objects.
+ */
+struct _xmlXPathParserContext {
+ const xmlChar *cur; /* the current char being parsed */
+ const xmlChar *base; /* the full expression */
+
+ int error; /* error code */
+
+ xmlXPathContextPtr context; /* the evaluation context */
+ xmlXPathObjectPtr value; /* the current value */
+ int valueNr; /* number of values stacked */
+ int valueMax; /* max number of values stacked */
+ xmlXPathObjectPtr *valueTab; /* stack of values */
+
+ xmlXPathCompExprPtr comp; /* the precompiled expression */
+ int xptr; /* it this an XPointer expression */
+ xmlNodePtr ancestor; /* used for walking preceding axis */
+};
+
+/************************************************************************
+ * *
+ * Public API *
+ * *
+ ************************************************************************/
+
+/**
+ * Objects and Nodesets handling
+ */
+
+XMLPUBVAR double xmlXPathNAN;
+XMLPUBVAR double xmlXPathPINF;
+XMLPUBVAR double xmlXPathNINF;
+
+/* These macros may later turn into functions */
+/**
+ * xmlXPathNodeSetGetLength:
+ * @ns: a node-set
+ *
+ * Implement a functionality similar to the DOM NodeList.length.
+ *
+ * Returns the number of nodes in the node-set.
+ */
+#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
+/**
+ * xmlXPathNodeSetItem:
+ * @ns: a node-set
+ * @index: index of a node in the set
+ *
+ * Implements a functionality similar to the DOM NodeList.item().
+ *
+ * Returns the xmlNodePtr at the given @index in @ns or NULL if
+ * @index is out of range (0 to length-1)
+ */
+#define xmlXPathNodeSetItem(ns, index) \
+ ((((ns) != NULL) && \
+ ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
+ (ns)->nodeTab[(index)] \
+ : NULL)
+/**
+ * xmlXPathNodeSetIsEmpty:
+ * @ns: a node-set
+ *
+ * Checks whether @ns is empty or not.
+ *
+ * Returns %TRUE if @ns is an empty node-set.
+ */
+#define xmlXPathNodeSetIsEmpty(ns) \
+ (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
+
+
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeObject (xmlXPathObjectPtr obj);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeSetCreate (xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathObjectCopy (xmlXPathObjectPtr val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCmpNodes (xmlNodePtr node1,
+ xmlNodePtr node2);
+/**
+ * Conversion functions to basic types.
+ */
+XMLPUBFUN int XMLCALL
+ xmlXPathCastNumberToBoolean (double val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastStringToBoolean (const xmlChar * val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastToBoolean (xmlXPathObjectPtr val);
+
+XMLPUBFUN double XMLCALL
+ xmlXPathCastBooleanToNumber (int val);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastStringToNumber (const xmlChar * val);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastNodeToNumber (xmlNodePtr node);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastToNumber (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastBooleanToString (int val);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNumberToString (double val);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNodeToString (xmlNodePtr node);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastToString (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertBoolean (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertNumber (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertString (xmlXPathObjectPtr val);
+
+/**
+ * Context handling.
+ */
+XMLPUBFUN xmlXPathContextPtr XMLCALL
+ xmlXPathNewContext (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeContext (xmlXPathContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
+ int active,
+ int value,
+ int options);
+/**
+ * Evaluation functions.
+ */
+XMLPUBFUN long XMLCALL
+ xmlXPathOrderDocElems (xmlDocPtr doc);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathEvalExpression (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
+ xmlXPathObjectPtr res);
+/**
+ * Separate compilation/evaluation entry points.
+ */
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+ xmlXPathCompile (const xmlChar *str);
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+ xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
+ const xmlChar *str);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN int XMLCALL
+ xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
+#endif /* LIBXML_XPATH_ENABLED */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlXPathInit (void);
+XMLPUBFUN int XMLCALL
+ xmlXPathIsNaN (double val);
+XMLPUBFUN int XMLCALL
+ xmlXPathIsInf (double val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
+#endif /* ! __XML_XPATH_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpathInternals.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpathInternals.h
new file mode 100644
index 0000000..8532757
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpathInternals.h
@@ -0,0 +1,630 @@
+/*
+ * Summary: internal interfaces for XML Path Language implementation
+ * Description: internal interfaces for XML Path Language implementation
+ * used to build new modules on top of XPath like XPointer and
+ * XSLT
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_INTERNALS_H__
+#define __XML_XPATH_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xpath.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************************************
+ * *
+ * Helpers *
+ * *
+ ************************************************************************/
+
+/*
+ * Many of these macros may later turn into functions. They
+ * shouldn't be used in #ifdef's preprocessor instructions.
+ */
+/**
+ * xmlXPathSetError:
+ * @ctxt: an XPath parser context
+ * @err: an xmlXPathError code
+ *
+ * Raises an error.
+ */
+#define xmlXPathSetError(ctxt, err) \
+ { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
+ if ((ctxt) != NULL) (ctxt)->error = (err); }
+
+/**
+ * xmlXPathSetArityError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_ARITY error.
+ */
+#define xmlXPathSetArityError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
+
+/**
+ * xmlXPathSetTypeError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_TYPE error.
+ */
+#define xmlXPathSetTypeError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
+
+/**
+ * xmlXPathGetError:
+ * @ctxt: an XPath parser context
+ *
+ * Get the error code of an XPath context.
+ *
+ * Returns the context error.
+ */
+#define xmlXPathGetError(ctxt) ((ctxt)->error)
+
+/**
+ * xmlXPathCheckError:
+ * @ctxt: an XPath parser context
+ *
+ * Check if an XPath error was raised.
+ *
+ * Returns true if an error has been raised, false otherwise.
+ */
+#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
+
+/**
+ * xmlXPathGetDocument:
+ * @ctxt: an XPath parser context
+ *
+ * Get the document of an XPath context.
+ *
+ * Returns the context document.
+ */
+#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
+
+/**
+ * xmlXPathGetContextNode:
+ * @ctxt: an XPath parser context
+ *
+ * Get the context node of an XPath context.
+ *
+ * Returns the context node.
+ */
+#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
+
+XMLPUBFUN int XMLCALL
+ xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN double XMLCALL
+ xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathPopString (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void * XMLCALL
+ xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
+
+/**
+ * xmlXPathReturnBoolean:
+ * @ctxt: an XPath parser context
+ * @val: a boolean
+ *
+ * Pushes the boolean @val on the context stack.
+ */
+#define xmlXPathReturnBoolean(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewBoolean(val))
+
+/**
+ * xmlXPathReturnTrue:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes true on the context stack.
+ */
+#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
+
+/**
+ * xmlXPathReturnFalse:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes false on the context stack.
+ */
+#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
+
+/**
+ * xmlXPathReturnNumber:
+ * @ctxt: an XPath parser context
+ * @val: a double
+ *
+ * Pushes the double @val on the context stack.
+ */
+#define xmlXPathReturnNumber(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewFloat(val))
+
+/**
+ * xmlXPathReturnString:
+ * @ctxt: an XPath parser context
+ * @str: a string
+ *
+ * Pushes the string @str on the context stack.
+ */
+#define xmlXPathReturnString(ctxt, str) \
+ valuePush((ctxt), xmlXPathWrapString(str))
+
+/**
+ * xmlXPathReturnEmptyString:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty string on the stack.
+ */
+#define xmlXPathReturnEmptyString(ctxt) \
+ valuePush((ctxt), xmlXPathNewCString(""))
+
+/**
+ * xmlXPathReturnNodeSet:
+ * @ctxt: an XPath parser context
+ * @ns: a node-set
+ *
+ * Pushes the node-set @ns on the context stack.
+ */
+#define xmlXPathReturnNodeSet(ctxt, ns) \
+ valuePush((ctxt), xmlXPathWrapNodeSet(ns))
+
+/**
+ * xmlXPathReturnEmptyNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty node-set on the context stack.
+ */
+#define xmlXPathReturnEmptyNodeSet(ctxt) \
+ valuePush((ctxt), xmlXPathNewNodeSet(NULL))
+
+/**
+ * xmlXPathReturnExternal:
+ * @ctxt: an XPath parser context
+ * @val: user data
+ *
+ * Pushes user data on the context stack.
+ */
+#define xmlXPathReturnExternal(ctxt, val) \
+ valuePush((ctxt), xmlXPathWrapExternal(val))
+
+/**
+ * xmlXPathStackIsNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Check if the current value on the XPath stack is a node set or
+ * an XSLT value tree.
+ *
+ * Returns true if the current object on the stack is a node-set.
+ */
+#define xmlXPathStackIsNodeSet(ctxt) \
+ (((ctxt)->value != NULL) \
+ && (((ctxt)->value->type == XPATH_NODESET) \
+ || ((ctxt)->value->type == XPATH_XSLT_TREE)))
+
+/**
+ * xmlXPathStackIsExternal:
+ * @ctxt: an XPath parser context
+ *
+ * Checks if the current value on the XPath stack is an external
+ * object.
+ *
+ * Returns true if the current object on the stack is an external
+ * object.
+ */
+#define xmlXPathStackIsExternal(ctxt) \
+ ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
+
+/**
+ * xmlXPathEmptyNodeSet:
+ * @ns: a node-set
+ *
+ * Empties a node-set.
+ */
+#define xmlXPathEmptyNodeSet(ns) \
+ { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
+
+/**
+ * CHECK_ERROR:
+ *
+ * Macro to return from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return
+
+/**
+ * CHECK_ERROR0:
+ *
+ * Macro to return 0 from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR0 \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
+
+/**
+ * XP_ERROR:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return.
+ */
+#define XP_ERROR(X) \
+ { xmlXPathErr(ctxt, X); return; }
+
+/**
+ * XP_ERROR0:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return 0.
+ */
+#define XP_ERROR0(X) \
+ { xmlXPathErr(ctxt, X); return(0); }
+
+/**
+ * CHECK_TYPE:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type.
+ */
+#define CHECK_TYPE(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_TYPE0:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type. Return(0) in case of failure
+ */
+#define CHECK_TYPE0(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR0(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_ARITY:
+ * @x: the number of expected args
+ *
+ * Macro to check that the number of args passed to an XPath function matches.
+ */
+#define CHECK_ARITY(x) \
+ if (ctxt == NULL) return; \
+ if (nargs != (x)) \
+ XP_ERROR(XPATH_INVALID_ARITY);
+
+/**
+ * CAST_TO_STRING:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a string.
+ */
+#define CAST_TO_STRING \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
+ xmlXPathStringFunction(ctxt, 1);
+
+/**
+ * CAST_TO_NUMBER:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a number.
+ */
+#define CAST_TO_NUMBER \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
+ xmlXPathNumberFunction(ctxt, 1);
+
+/**
+ * CAST_TO_BOOLEAN:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a boolean.
+ */
+#define CAST_TO_BOOLEAN \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
+ xmlXPathBooleanFunction(ctxt, 1);
+
+/*
+ * Variable Lookup forwarding.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
+ xmlXPathVariableLookupFunc f,
+ void *data);
+
+/*
+ * Function Lookup forwarding.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt);
+
+/*
+ * Error reporting.
+ */
+XMLPUBFUN void XMLCALL
+ xmlXPatherror (xmlXPathParserContextPtr ctxt,
+ const char *file,
+ int line,
+ int no);
+
+XMLPUBFUN void XMLCALL
+ xmlXPathErr (xmlXPathParserContextPtr ctxt,
+ int error);
+
+#ifdef LIBXML_DEBUG_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlXPathDebugDumpObject (FILE *output,
+ xmlXPathObjectPtr cur,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlXPathDebugDumpCompExpr(FILE *output,
+ xmlXPathCompExprPtr comp,
+ int depth);
+#endif
+/**
+ * NodeSet handling.
+ */
+XMLPUBFUN int XMLCALL
+ xmlXPathNodeSetContains (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDifference (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathIntersection (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDistinct (xmlNodeSetPtr nodes);
+
+XMLPUBFUN int XMLCALL
+ xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeLeading (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathLeading (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathTrailing (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+
+/**
+ * Extending a context.
+ */
+
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix,
+ const xmlChar *ns_uri);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlXPathNsLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
+
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathFunction f);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathFunction f);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathObjectPtr value);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathObjectPtr value);
+XMLPUBFUN xmlXPathFunction XMLCALL
+ xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathFunction XMLCALL
+ xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
+
+/**
+ * Utilities to extend XPath.
+ */
+XMLPUBFUN xmlXPathParserContextPtr XMLCALL
+ xmlXPathNewParserContext (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
+
+/* TODO: remap to xmlXPathValuePop and Push. */
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ valuePop (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ valuePush (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr value);
+
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewString (const xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewCString (const char *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapString (xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapCString (char * val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewFloat (double val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewBoolean (int val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewNodeSet (xmlNodePtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewValueTree (xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
+ xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetSort (xmlNodeSetPtr set);
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRoot (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathParseName (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
+
+/*
+ * Existing functions.
+ */
+XMLPUBFUN double XMLCALL
+ xmlXPathStringEvalNumber (const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr res);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
+ xmlNodeSetPtr val2);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetDel (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
+ int val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewNodeSetList (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapNodeSet (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapExternal (void *val);
+
+XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
+XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
+
+XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
+
+/*
+ * Some of the axis navigation routines.
+ */
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+/*
+ * The official core of XPath functions.
+ */
+XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
+
+/**
+ * Really internal functions
+ */
+XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED */
+#endif /* ! __XML_XPATH_INTERNALS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpointer.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpointer.h
new file mode 100644
index 0000000..32b11b0
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/libxml/xpointer.h
@@ -0,0 +1,114 @@
+/*
+ * Summary: API to handle XML Pointers
+ * Description: API to handle XML Pointers
+ * Base implementation was made accordingly to
+ * W3C Candidate Recommendation 7 June 2000
+ * http://www.w3.org/TR/2000/CR-xptr-20000607
+ *
+ * Added support for the element() scheme described in:
+ * W3C Proposed Recommendation 13 November 2002
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPTR_H__
+#define __XML_XPTR_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * A Location Set
+ */
+typedef struct _xmlLocationSet xmlLocationSet;
+typedef xmlLocationSet *xmlLocationSetPtr;
+struct _xmlLocationSet {
+ int locNr; /* number of locations in the set */
+ int locMax; /* size of the array as allocated */
+ xmlXPathObjectPtr *locTab;/* array of locations */
+};
+
+/*
+ * Handling of location sets.
+ */
+
+XMLPUBFUN xmlLocationSetPtr XMLCALL
+ xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
+XMLPUBFUN xmlLocationSetPtr XMLCALL
+ xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
+ xmlLocationSetPtr val2);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRange (xmlNodePtr start,
+ int startindex,
+ xmlNodePtr end,
+ int endindex);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodePoint (xmlNodePtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodes (xmlNodePtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewLocationSetNodes (xmlNodePtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodeObject (xmlNodePtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewCollapsedRange (xmlNodePtr start);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
+ xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
+ xmlXPathObjectPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
+ int val);
+
+/*
+ * Functions.
+ */
+XMLPUBFUN xmlXPathContextPtr XMLCALL
+ xmlXPtrNewContext (xmlDocPtr doc,
+ xmlNodePtr here,
+ xmlNodePtr origin);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN void XMLCALL
+ xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
+XMLPUBFUN void XMLCALL
+ xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+#endif /* __XML_XPTR_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utarray.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utarray.h
new file mode 100644
index 0000000..75e9dc5
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utarray.h
@@ -0,0 +1,232 @@
+/*
+Copyright (c) 2008-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* a dynamic array implementation using macros
+ */
+#ifndef UTARRAY_H
+#define UTARRAY_H
+
+#define UTARRAY_VERSION 1.9.9
+
+#ifdef __GNUC__
+#define _UNUSED_ __attribute__ ((__unused__))
+#else
+#define _UNUSED_
+#endif
+
+#include <stddef.h> /* size_t */
+#include <string.h> /* memset, etc */
+#include <stdlib.h> /* exit */
+
+#define oom() exit(-1)
+
+typedef void (ctor_f)(void *dst, const void *src);
+typedef void (dtor_f)(void *elt);
+typedef void (init_f)(void *elt);
+typedef struct {
+ size_t sz;
+ init_f *init;
+ ctor_f *copy;
+ dtor_f *dtor;
+} UT_icd;
+
+typedef struct {
+ unsigned i,n;/* i: index of next available slot, n: num slots */
+ UT_icd icd; /* initializer, copy and destructor functions */
+ char *d; /* n slots of size icd->sz*/
+} UT_array;
+
+#define utarray_init(a,_icd) do { \
+ memset(a,0,sizeof(UT_array)); \
+ (a)->icd=*_icd; \
+} while(0)
+
+#define utarray_done(a) do { \
+ if ((a)->n) { \
+ if ((a)->icd.dtor) { \
+ size_t _ut_i; \
+ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
+ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \
+ } \
+ } \
+ free((a)->d); \
+ } \
+ (a)->n=0; \
+} while(0)
+
+#define utarray_new(a,_icd) do { \
+ a=(UT_array*)malloc(sizeof(UT_array)); \
+ utarray_init(a,_icd); \
+} while(0)
+
+#define utarray_free(a) do { \
+ utarray_done(a); \
+ free(a); \
+} while(0)
+
+#define utarray_reserve(a,by) do { \
+ if (((a)->i+by) > ((a)->n)) { \
+ while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \
+ if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom(); \
+ } \
+} while(0)
+
+#define utarray_push_back(a,p) do { \
+ utarray_reserve(a,1); \
+ if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,(a)->i++), p); } \
+ else { memcpy(_utarray_eltptr(a,(a)->i++), p, (a)->icd.sz); }; \
+} while(0)
+
+#define utarray_pop_back(a) do { \
+ if ((a)->icd.dtor) { (a)->icd.dtor( _utarray_eltptr(a,--((a)->i))); } \
+ else { (a)->i--; } \
+} while(0)
+
+#define utarray_extend_back(a) do { \
+ utarray_reserve(a,1); \
+ if ((a)->icd.init) { (a)->icd.init(_utarray_eltptr(a,(a)->i)); } \
+ else { memset(_utarray_eltptr(a,(a)->i),0,(a)->icd.sz); } \
+ (a)->i++; \
+} while(0)
+
+#define utarray_len(a) ((a)->i)
+
+#define utarray_eltptr(a,j) (((j) < (a)->i) ? _utarray_eltptr(a,j) : NULL)
+#define _utarray_eltptr(a,j) ((char*)((a)->d + ((a)->icd.sz*(j) )))
+
+#define utarray_insert(a,p,j) do { \
+ if (j > (a)->i) utarray_resize(a,j); \
+ utarray_reserve(a,1); \
+ if ((j) < (a)->i) { \
+ memmove( _utarray_eltptr(a,(j)+1), _utarray_eltptr(a,j), \
+ ((a)->i - (j))*((a)->icd.sz)); \
+ } \
+ if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,j), p); } \
+ else { memcpy(_utarray_eltptr(a,j), p, (a)->icd.sz); }; \
+ (a)->i++; \
+} while(0)
+
+#define utarray_inserta(a,w,j) do { \
+ if (utarray_len(w) == 0) break; \
+ if (j > (a)->i) utarray_resize(a,j); \
+ utarray_reserve(a,utarray_len(w)); \
+ if ((j) < (a)->i) { \
+ memmove(_utarray_eltptr(a,(j)+utarray_len(w)), \
+ _utarray_eltptr(a,j), \
+ ((a)->i - (j))*((a)->icd.sz)); \
+ } \
+ if ((a)->icd.copy) { \
+ size_t _ut_i; \
+ for(_ut_i=0;_ut_i<(w)->i;_ut_i++) { \
+ (a)->icd.copy(_utarray_eltptr(a,j+_ut_i), _utarray_eltptr(w,_ut_i)); \
+ } \
+ } else { \
+ memcpy(_utarray_eltptr(a,j), _utarray_eltptr(w,0), \
+ utarray_len(w)*((a)->icd.sz)); \
+ } \
+ (a)->i += utarray_len(w); \
+} while(0)
+
+#define utarray_resize(dst,num) do { \
+ size_t _ut_i; \
+ if (dst->i > (size_t)(num)) { \
+ if ((dst)->icd.dtor) { \
+ for(_ut_i=num; _ut_i < dst->i; _ut_i++) { \
+ (dst)->icd.dtor(utarray_eltptr(dst,_ut_i)); \
+ } \
+ } \
+ } else if (dst->i < (size_t)(num)) { \
+ utarray_reserve(dst,num-dst->i); \
+ if ((dst)->icd.init) { \
+ for(_ut_i=dst->i; _ut_i < num; _ut_i++) { \
+ (dst)->icd.init(utarray_eltptr(dst,_ut_i)); \
+ } \
+ } else { \
+ memset(_utarray_eltptr(dst,dst->i),0,(dst)->icd.sz*(num-dst->i)); \
+ } \
+ } \
+ dst->i = num; \
+} while(0)
+
+#define utarray_concat(dst,src) do { \
+ utarray_inserta((dst),(src),utarray_len(dst)); \
+} while(0)
+
+#define utarray_erase(a,pos,len) do { \
+ if ((a)->icd.dtor) { \
+ size_t _ut_i; \
+ for(_ut_i=0; _ut_i < len; _ut_i++) { \
+ (a)->icd.dtor(utarray_eltptr((a),pos+_ut_i)); \
+ } \
+ } \
+ if ((a)->i > (pos+len)) { \
+ memmove( _utarray_eltptr((a),pos), _utarray_eltptr((a),pos+len), \
+ (((a)->i)-(pos+len))*((a)->icd.sz)); \
+ } \
+ (a)->i -= (len); \
+} while(0)
+
+#define utarray_renew(a,u) do { \
+ if (a) utarray_clear(a); \
+ else utarray_new((a),(u)); \
+} while(0)
+
+#define utarray_clear(a) do { \
+ if ((a)->i > 0) { \
+ if ((a)->icd.dtor) { \
+ size_t _ut_i; \
+ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
+ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \
+ } \
+ } \
+ (a)->i = 0; \
+ } \
+} while(0)
+
+#define utarray_sort(a,cmp) do { \
+ qsort((a)->d, (a)->i, (a)->icd.sz, cmp); \
+} while(0)
+
+#define utarray_find(a,v,cmp) bsearch((v),(a)->d,(a)->i,(a)->icd.sz,cmp)
+
+#define utarray_front(a) (((a)->i) ? (_utarray_eltptr(a,0)) : NULL)
+#define utarray_next(a,e) (((e)==NULL) ? utarray_front(a) : ((((a)->i) > (utarray_eltidx(a,e)+1)) ? _utarray_eltptr(a,utarray_eltidx(a,e)+1) : NULL))
+#define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
+#define utarray_back(a) (((a)->i) ? (_utarray_eltptr(a,(a)->i-1)) : NULL)
+#define utarray_eltidx(a,e) (((char*)(e) >= (char*)((a)->d)) ? (((char*)(e) - (char*)((a)->d))/(size_t)(a)->icd.sz) : -1)
+
+/* last we pre-define a few icd for common utarrays of ints and strings */
+static void utarray_str_cpy(void *dst, const void *src) {
+ char **_src = (char**)src, **_dst = (char**)dst;
+ *_dst = (*_src == NULL) ? NULL : strdup(*_src);
+}
+static void utarray_str_dtor(void *elt) {
+ char **eltc = (char**)elt;
+ if (*eltc) free(*eltc);
+}
+static const UT_icd ut_str_icd _UNUSED_ = {sizeof(char*),NULL,utarray_str_cpy,utarray_str_dtor};
+static const UT_icd ut_int_icd _UNUSED_ = {sizeof(int),NULL,NULL,NULL};
+static const UT_icd ut_ptr_icd _UNUSED_ = {sizeof(void*),NULL,NULL,NULL};
+
+
+#endif /* UTARRAY_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/uthash.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/uthash.h
new file mode 100644
index 0000000..39fd891
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/uthash.h
@@ -0,0 +1,960 @@
+/*
+Copyright (c) 2003-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef UTHASH_H
+#define UTHASH_H
+
+#include <string.h> /* memcmp,strlen */
+#include <stddef.h> /* ptrdiff_t */
+#include <stdlib.h> /* exit() */
+
+/* These macros use decltype or the earlier __typeof GNU extension.
+ As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+ when compiling c++ source) this code uses whatever method is needed
+ or, for VS2008 where neither is available, uses casting workarounds. */
+#if defined(_MSC_VER) /* MS compiler */
+#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */
+#define DECLTYPE(x) (decltype(x))
+#else /* VS2008 or older (or VS2010 in C mode) */
+#define NO_DECLTYPE
+#define DECLTYPE(x)
+#endif
+#elif defined(__BORLANDC__) || defined(__LCC__) || defined(__WATCOMC__)
+#define NO_DECLTYPE
+#define DECLTYPE(x)
+#else /* GNU, Sun and other compilers */
+#define DECLTYPE(x) (__typeof(x))
+#endif
+
+#ifdef NO_DECLTYPE
+#define DECLTYPE_ASSIGN(dst,src) \
+do { \
+ char **_da_dst = (char**)(&(dst)); \
+ *_da_dst = (char*)(src); \
+} while(0)
+#else
+#define DECLTYPE_ASSIGN(dst,src) \
+do { \
+ (dst) = DECLTYPE(dst)(src); \
+} while(0)
+#endif
+
+/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */
+#if defined (_WIN32)
+#if defined(_MSC_VER) && _MSC_VER >= 1600
+#include <stdint.h>
+#elif defined(__WATCOMC__)
+#include <stdint.h>
+#else
+typedef unsigned int uint32_t;
+typedef unsigned char uint8_t;
+#endif
+#else
+#include <stdint.h>
+#endif
+
+#define UTHASH_VERSION 1.9.9
+
+#ifndef uthash_fatal
+#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */
+#endif
+#ifndef uthash_malloc
+#define uthash_malloc(sz) malloc(sz) /* malloc fcn */
+#endif
+#ifndef uthash_free
+#define uthash_free(ptr,sz) free(ptr) /* free fcn */
+#endif
+
+#ifndef uthash_noexpand_fyi
+#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */
+#endif
+#ifndef uthash_expand_fyi
+#define uthash_expand_fyi(tbl) /* can be defined to log expands */
+#endif
+
+/* initial number of buckets */
+#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */
+#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */
+#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */
+
+/* calculate the element whose hash handle address is hhe */
+#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
+
+#define HASH_FIND(hh,head,keyptr,keylen,out) \
+do { \
+ out=NULL; \
+ if (head) { \
+ unsigned _hf_bkt,_hf_hashv; \
+ HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \
+ if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \
+ HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \
+ keyptr,keylen,out); \
+ } \
+ } \
+} while (0)
+
+#ifdef HASH_BLOOM
+#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM)
+#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0)
+#define HASH_BLOOM_MAKE(tbl) \
+do { \
+ (tbl)->bloom_nbits = HASH_BLOOM; \
+ (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \
+ if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \
+ memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \
+ (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \
+} while (0)
+
+#define HASH_BLOOM_FREE(tbl) \
+do { \
+ uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \
+} while (0)
+
+#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8)))
+#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8)))
+
+#define HASH_BLOOM_ADD(tbl,hashv) \
+ HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+
+#define HASH_BLOOM_TEST(tbl,hashv) \
+ HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+
+#else
+#define HASH_BLOOM_MAKE(tbl)
+#define HASH_BLOOM_FREE(tbl)
+#define HASH_BLOOM_ADD(tbl,hashv)
+#define HASH_BLOOM_TEST(tbl,hashv) (1)
+#define HASH_BLOOM_BYTELEN 0
+#endif
+
+#define HASH_MAKE_TABLE(hh,head) \
+do { \
+ (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \
+ sizeof(UT_hash_table)); \
+ if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \
+ memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \
+ (head)->hh.tbl->tail = &((head)->hh); \
+ (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \
+ (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \
+ (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \
+ (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
+ HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \
+ if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \
+ memset((head)->hh.tbl->buckets, 0, \
+ HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \
+ HASH_BLOOM_MAKE((head)->hh.tbl); \
+ (head)->hh.tbl->signature = HASH_SIGNATURE; \
+} while(0)
+
+#define HASH_ADD(hh,head,fieldname,keylen_in,add) \
+ HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add)
+
+#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \
+do { \
+ replaced=NULL; \
+ HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \
+ if (replaced!=NULL) { \
+ HASH_DELETE(hh,head,replaced); \
+ } \
+ HASH_ADD(hh,head,fieldname,keylen_in,add); \
+} while(0)
+
+#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \
+do { \
+ unsigned _ha_bkt; \
+ (add)->hh.next = NULL; \
+ (add)->hh.key = (char*)(keyptr); \
+ (add)->hh.keylen = (unsigned)(keylen_in); \
+ if (!(head)) { \
+ head = (add); \
+ (head)->hh.prev = NULL; \
+ HASH_MAKE_TABLE(hh,head); \
+ } else { \
+ (head)->hh.tbl->tail->next = (add); \
+ (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \
+ (head)->hh.tbl->tail = &((add)->hh); \
+ } \
+ (head)->hh.tbl->num_items++; \
+ (add)->hh.tbl = (head)->hh.tbl; \
+ HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \
+ (add)->hh.hashv, _ha_bkt); \
+ HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \
+ HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \
+ HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \
+ HASH_FSCK(hh,head); \
+} while(0)
+
+#define HASH_TO_BKT( hashv, num_bkts, bkt ) \
+do { \
+ bkt = ((hashv) & ((num_bkts) - 1)); \
+} while(0)
+
+/* delete "delptr" from the hash table.
+ * "the usual" patch-up process for the app-order doubly-linked-list.
+ * The use of _hd_hh_del below deserves special explanation.
+ * These used to be expressed using (delptr) but that led to a bug
+ * if someone used the same symbol for the head and deletee, like
+ * HASH_DELETE(hh,users,users);
+ * We want that to work, but by changing the head (users) below
+ * we were forfeiting our ability to further refer to the deletee (users)
+ * in the patch-up process. Solution: use scratch space to
+ * copy the deletee pointer, then the latter references are via that
+ * scratch pointer rather than through the repointed (users) symbol.
+ */
+#define HASH_DELETE(hh,head,delptr) \
+do { \
+ struct UT_hash_handle *_hd_hh_del; \
+ if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \
+ uthash_free((head)->hh.tbl->buckets, \
+ (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+ HASH_BLOOM_FREE((head)->hh.tbl); \
+ uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \
+ head = NULL; \
+ } else { \
+ unsigned _hd_bkt; \
+ _hd_hh_del = &((delptr)->hh); \
+ if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \
+ (head)->hh.tbl->tail = \
+ (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \
+ (head)->hh.tbl->hho); \
+ } \
+ if ((delptr)->hh.prev) { \
+ ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \
+ (head)->hh.tbl->hho))->next = (delptr)->hh.next; \
+ } else { \
+ DECLTYPE_ASSIGN(head,(delptr)->hh.next); \
+ } \
+ if (_hd_hh_del->next) { \
+ ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \
+ (head)->hh.tbl->hho))->prev = \
+ _hd_hh_del->prev; \
+ } \
+ HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \
+ HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
+ (head)->hh.tbl->num_items--; \
+ } \
+ HASH_FSCK(hh,head); \
+} while (0)
+
+
+/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
+#define HASH_FIND_STR(head,findstr,out) \
+ HASH_FIND(hh,head,findstr,(unsigned)strlen(findstr),out)
+#define HASH_ADD_STR(head,strfield,add) \
+ HASH_ADD(hh,head,strfield[0],strlen(add->strfield),add)
+#define HASH_REPLACE_STR(head,strfield,add,replaced) \
+ HASH_REPLACE(hh,head,strfield[0],(unsigned)strlen(add->strfield),add,replaced)
+#define HASH_FIND_INT(head,findint,out) \
+ HASH_FIND(hh,head,findint,sizeof(int),out)
+#define HASH_ADD_INT(head,intfield,add) \
+ HASH_ADD(hh,head,intfield,sizeof(int),add)
+#define HASH_REPLACE_INT(head,intfield,add,replaced) \
+ HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced)
+#define HASH_FIND_PTR(head,findptr,out) \
+ HASH_FIND(hh,head,findptr,sizeof(void *),out)
+#define HASH_ADD_PTR(head,ptrfield,add) \
+ HASH_ADD(hh,head,ptrfield,sizeof(void *),add)
+#define HASH_REPLACE_PTR(head,ptrfield,add,replaced) \
+ HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced)
+#define HASH_DEL(head,delptr) \
+ HASH_DELETE(hh,head,delptr)
+
+/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined.
+ * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined.
+ */
+#ifdef HASH_DEBUG
+#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
+#define HASH_FSCK(hh,head) \
+do { \
+ struct UT_hash_handle *_thh; \
+ if (head) { \
+ unsigned _bkt_i; \
+ unsigned _count; \
+ char *_prev; \
+ _count = 0; \
+ for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \
+ unsigned _bkt_count = 0; \
+ _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
+ _prev = NULL; \
+ while (_thh) { \
+ if (_prev != (char*)(_thh->hh_prev)) { \
+ HASH_OOPS("invalid hh_prev %p, actual %p\n", \
+ _thh->hh_prev, _prev ); \
+ } \
+ _bkt_count++; \
+ _prev = (char*)(_thh); \
+ _thh = _thh->hh_next; \
+ } \
+ _count += _bkt_count; \
+ if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
+ HASH_OOPS("invalid bucket count %u, actual %u\n", \
+ (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
+ } \
+ } \
+ if (_count != (head)->hh.tbl->num_items) { \
+ HASH_OOPS("invalid hh item count %u, actual %u\n", \
+ (head)->hh.tbl->num_items, _count ); \
+ } \
+ /* traverse hh in app order; check next/prev integrity, count */ \
+ _count = 0; \
+ _prev = NULL; \
+ _thh = &(head)->hh; \
+ while (_thh) { \
+ _count++; \
+ if (_prev !=(char*)(_thh->prev)) { \
+ HASH_OOPS("invalid prev %p, actual %p\n", \
+ _thh->prev, _prev ); \
+ } \
+ _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \
+ _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \
+ (head)->hh.tbl->hho) : NULL ); \
+ } \
+ if (_count != (head)->hh.tbl->num_items) { \
+ HASH_OOPS("invalid app item count %u, actual %u\n", \
+ (head)->hh.tbl->num_items, _count ); \
+ } \
+ } \
+} while (0)
+#else
+#define HASH_FSCK(hh,head)
+#endif
+
+/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to
+ * the descriptor to which this macro is defined for tuning the hash function.
+ * The app can #include <unistd.h> to get the prototype for write(2). */
+#ifdef HASH_EMIT_KEYS
+#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \
+do { \
+ unsigned _klen = fieldlen; \
+ write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \
+ write(HASH_EMIT_KEYS, keyptr, fieldlen); \
+} while (0)
+#else
+#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)
+#endif
+
+/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */
+#ifdef HASH_FUNCTION
+#define HASH_FCN HASH_FUNCTION
+#else
+#define HASH_FCN HASH_JEN
+#endif
+
+/* The Bernstein hash function, used in Perl prior to v5.6. Note (x<<5+x)=x*33. */
+#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _hb_keylen=keylen; \
+ const char *_hb_key=(const char*)(key); \
+ (hashv) = 0; \
+ while (_hb_keylen--) { (hashv) = (((hashv) << 5) + (hashv)) + *_hb_key++; } \
+ bkt = (hashv) & (num_bkts-1); \
+} while (0)
+
+
+/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
+ * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
+#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _sx_i; \
+ const char *_hs_key=(const char*)(key); \
+ hashv = 0; \
+ for(_sx_i=0; _sx_i < keylen; _sx_i++) \
+ hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \
+ bkt = hashv & (num_bkts-1); \
+} while (0)
+/* FNV-1a variation */
+#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _fn_i; \
+ const char *_hf_key=(const char*)(key); \
+ hashv = 2166136261UL; \
+ for(_fn_i=0; _fn_i < keylen; _fn_i++) { \
+ hashv = hashv ^ _hf_key[_fn_i]; \
+ hashv = hashv * 16777619; \
+ } \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _ho_i; \
+ const char *_ho_key=(const char*)(key); \
+ hashv = 0; \
+ for(_ho_i=0; _ho_i < keylen; _ho_i++) { \
+ hashv += _ho_key[_ho_i]; \
+ hashv += (hashv << 10); \
+ hashv ^= (hashv >> 6); \
+ } \
+ hashv += (hashv << 3); \
+ hashv ^= (hashv >> 11); \
+ hashv += (hashv << 15); \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+#define HASH_JEN_MIX(a,b,c) \
+do { \
+ a -= b; a -= c; a ^= ( c >> 13 ); \
+ b -= c; b -= a; b ^= ( a << 8 ); \
+ c -= a; c -= b; c ^= ( b >> 13 ); \
+ a -= b; a -= c; a ^= ( c >> 12 ); \
+ b -= c; b -= a; b ^= ( a << 16 ); \
+ c -= a; c -= b; c ^= ( b >> 5 ); \
+ a -= b; a -= c; a ^= ( c >> 3 ); \
+ b -= c; b -= a; b ^= ( a << 10 ); \
+ c -= a; c -= b; c ^= ( b >> 15 ); \
+} while (0)
+
+#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _hj_i,_hj_j,_hj_k; \
+ unsigned const char *_hj_key=(unsigned const char*)(key); \
+ hashv = 0xfeedbeef; \
+ _hj_i = _hj_j = 0x9e3779b9; \
+ _hj_k = (unsigned)(keylen); \
+ while (_hj_k >= 12) { \
+ _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \
+ + ( (unsigned)_hj_key[2] << 16 ) \
+ + ( (unsigned)_hj_key[3] << 24 ) ); \
+ _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \
+ + ( (unsigned)_hj_key[6] << 16 ) \
+ + ( (unsigned)_hj_key[7] << 24 ) ); \
+ hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \
+ + ( (unsigned)_hj_key[10] << 16 ) \
+ + ( (unsigned)_hj_key[11] << 24 ) ); \
+ \
+ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \
+ \
+ _hj_key += 12; \
+ _hj_k -= 12; \
+ } \
+ hashv += keylen; \
+ switch ( _hj_k ) { \
+ case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \
+ case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \
+ case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \
+ case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \
+ case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \
+ case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \
+ case 5: _hj_j += _hj_key[4]; \
+ case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \
+ case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \
+ case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \
+ case 1: _hj_i += _hj_key[0]; \
+ } \
+ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+/* The Paul Hsieh hash function */
+#undef get16bits
+#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
+ || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
+#define get16bits(d) (*((const uint16_t *) (d)))
+#endif
+
+#if !defined (get16bits)
+#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \
+ +(uint32_t)(((const uint8_t *)(d))[0]) )
+#endif
+#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned const char *_sfh_key=(unsigned const char*)(key); \
+ uint32_t _sfh_tmp, _sfh_len = keylen; \
+ \
+ int _sfh_rem = _sfh_len & 3; \
+ _sfh_len >>= 2; \
+ hashv = 0xcafebabe; \
+ \
+ /* Main loop */ \
+ for (;_sfh_len > 0; _sfh_len--) { \
+ hashv += get16bits (_sfh_key); \
+ _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \
+ hashv = (hashv << 16) ^ _sfh_tmp; \
+ _sfh_key += 2*sizeof (uint16_t); \
+ hashv += hashv >> 11; \
+ } \
+ \
+ /* Handle end cases */ \
+ switch (_sfh_rem) { \
+ case 3: hashv += get16bits (_sfh_key); \
+ hashv ^= hashv << 16; \
+ hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \
+ hashv += hashv >> 11; \
+ break; \
+ case 2: hashv += get16bits (_sfh_key); \
+ hashv ^= hashv << 11; \
+ hashv += hashv >> 17; \
+ break; \
+ case 1: hashv += *_sfh_key; \
+ hashv ^= hashv << 10; \
+ hashv += hashv >> 1; \
+ } \
+ \
+ /* Force "avalanching" of final 127 bits */ \
+ hashv ^= hashv << 3; \
+ hashv += hashv >> 5; \
+ hashv ^= hashv << 4; \
+ hashv += hashv >> 17; \
+ hashv ^= hashv << 25; \
+ hashv += hashv >> 6; \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+#ifdef HASH_USING_NO_STRICT_ALIASING
+/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads.
+ * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error.
+ * MurmurHash uses the faster approach only on CPU's where we know it's safe.
+ *
+ * Note the preprocessor built-in defines can be emitted using:
+ *
+ * gcc -m64 -dM -E - < /dev/null (on gcc)
+ * cc -## a.c (where a.c is a simple test file) (Sun Studio)
+ */
+#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86))
+#define MUR_GETBLOCK(p,i) p[i]
+#else /* non intel */
+#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0)
+#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1)
+#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2)
+#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3)
+#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL))
+#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__))
+#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24))
+#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16))
+#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8))
+#else /* assume little endian non-intel */
+#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24))
+#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16))
+#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8))
+#endif
+#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \
+ (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \
+ (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \
+ MUR_ONE_THREE(p))))
+#endif
+#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
+#define MUR_FMIX(_h) \
+do { \
+ _h ^= _h >> 16; \
+ _h *= 0x85ebca6b; \
+ _h ^= _h >> 13; \
+ _h *= 0xc2b2ae35l; \
+ _h ^= _h >> 16; \
+} while(0)
+
+#define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ const uint8_t *_mur_data = (const uint8_t*)(key); \
+ const int _mur_nblocks = (keylen) / 4; \
+ uint32_t _mur_h1 = 0xf88D5353; \
+ uint32_t _mur_c1 = 0xcc9e2d51; \
+ uint32_t _mur_c2 = 0x1b873593; \
+ uint32_t _mur_k1 = 0; \
+ const uint8_t *_mur_tail; \
+ const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \
+ int _mur_i; \
+ for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \
+ _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \
+ _mur_k1 *= _mur_c1; \
+ _mur_k1 = MUR_ROTL32(_mur_k1,15); \
+ _mur_k1 *= _mur_c2; \
+ \
+ _mur_h1 ^= _mur_k1; \
+ _mur_h1 = MUR_ROTL32(_mur_h1,13); \
+ _mur_h1 = _mur_h1*5+0xe6546b64; \
+ } \
+ _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \
+ _mur_k1=0; \
+ switch((keylen) & 3) { \
+ case 3: _mur_k1 ^= _mur_tail[2] << 16; \
+ case 2: _mur_k1 ^= _mur_tail[1] << 8; \
+ case 1: _mur_k1 ^= _mur_tail[0]; \
+ _mur_k1 *= _mur_c1; \
+ _mur_k1 = MUR_ROTL32(_mur_k1,15); \
+ _mur_k1 *= _mur_c2; \
+ _mur_h1 ^= _mur_k1; \
+ } \
+ _mur_h1 ^= (keylen); \
+ MUR_FMIX(_mur_h1); \
+ hashv = _mur_h1; \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+#endif /* HASH_USING_NO_STRICT_ALIASING */
+
+/* key comparison function; return 0 if keys equal */
+#define HASH_KEYCMP(a,b,len) memcmp(a,b,len)
+
+/* iterate over items in a known bucket to find desired item */
+#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \
+do { \
+ if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \
+ else out=NULL; \
+ while (out) { \
+ if ((out)->hh.keylen == keylen_in) { \
+ if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \
+ } \
+ if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \
+ else out = NULL; \
+ } \
+} while(0)
+
+/* add an item to a bucket */
+#define HASH_ADD_TO_BKT(head,addhh) \
+do { \
+ head.count++; \
+ (addhh)->hh_next = head.hh_head; \
+ (addhh)->hh_prev = NULL; \
+ if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \
+ (head).hh_head=addhh; \
+ if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \
+ && (addhh)->tbl->noexpand != 1) { \
+ HASH_EXPAND_BUCKETS((addhh)->tbl); \
+ } \
+} while(0)
+
+/* remove an item from a given bucket */
+#define HASH_DEL_IN_BKT(hh,head,hh_del) \
+ (head).count--; \
+ if ((head).hh_head == hh_del) { \
+ (head).hh_head = hh_del->hh_next; \
+ } \
+ if (hh_del->hh_prev) { \
+ hh_del->hh_prev->hh_next = hh_del->hh_next; \
+ } \
+ if (hh_del->hh_next) { \
+ hh_del->hh_next->hh_prev = hh_del->hh_prev; \
+ }
+
+/* Bucket expansion has the effect of doubling the number of buckets
+ * and redistributing the items into the new buckets. Ideally the
+ * items will distribute more or less evenly into the new buckets
+ * (the extent to which this is true is a measure of the quality of
+ * the hash function as it applies to the key domain).
+ *
+ * With the items distributed into more buckets, the chain length
+ * (item count) in each bucket is reduced. Thus by expanding buckets
+ * the hash keeps a bound on the chain length. This bounded chain
+ * length is the essence of how a hash provides constant time lookup.
+ *
+ * The calculation of tbl->ideal_chain_maxlen below deserves some
+ * explanation. First, keep in mind that we're calculating the ideal
+ * maximum chain length based on the *new* (doubled) bucket count.
+ * In fractions this is just n/b (n=number of items,b=new num buckets).
+ * Since the ideal chain length is an integer, we want to calculate
+ * ceil(n/b). We don't depend on floating point arithmetic in this
+ * hash, so to calculate ceil(n/b) with integers we could write
+ *
+ * ceil(n/b) = (n/b) + ((n%b)?1:0)
+ *
+ * and in fact a previous version of this hash did just that.
+ * But now we have improved things a bit by recognizing that b is
+ * always a power of two. We keep its base 2 log handy (call it lb),
+ * so now we can write this with a bit shift and logical AND:
+ *
+ * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0)
+ *
+ */
+#define HASH_EXPAND_BUCKETS(tbl) \
+do { \
+ unsigned _he_bkt; \
+ unsigned _he_bkt_i; \
+ struct UT_hash_handle *_he_thh, *_he_hh_nxt; \
+ UT_hash_bucket *_he_new_buckets, *_he_newbkt; \
+ _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \
+ 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \
+ if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \
+ memset(_he_new_buckets, 0, \
+ 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \
+ tbl->ideal_chain_maxlen = \
+ (tbl->num_items >> (tbl->log2_num_buckets+1)) + \
+ ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \
+ tbl->nonideal_items = 0; \
+ for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \
+ { \
+ _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \
+ while (_he_thh) { \
+ _he_hh_nxt = _he_thh->hh_next; \
+ HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \
+ _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \
+ if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \
+ tbl->nonideal_items++; \
+ _he_newbkt->expand_mult = _he_newbkt->count / \
+ tbl->ideal_chain_maxlen; \
+ } \
+ _he_thh->hh_prev = NULL; \
+ _he_thh->hh_next = _he_newbkt->hh_head; \
+ if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \
+ _he_thh; \
+ _he_newbkt->hh_head = _he_thh; \
+ _he_thh = _he_hh_nxt; \
+ } \
+ } \
+ uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+ tbl->num_buckets *= 2; \
+ tbl->log2_num_buckets++; \
+ tbl->buckets = _he_new_buckets; \
+ tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \
+ (tbl->ineff_expands+1) : 0; \
+ if (tbl->ineff_expands > 1) { \
+ tbl->noexpand=1; \
+ uthash_noexpand_fyi(tbl); \
+ } \
+ uthash_expand_fyi(tbl); \
+} while(0)
+
+
+/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
+/* Note that HASH_SORT assumes the hash handle name to be hh.
+ * HASH_SRT was added to allow the hash handle name to be passed in. */
+#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn)
+#define HASH_SRT(hh,head,cmpfcn) \
+do { \
+ unsigned _hs_i; \
+ unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \
+ struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \
+ if (head) { \
+ _hs_insize = 1; \
+ _hs_looping = 1; \
+ _hs_list = &((head)->hh); \
+ while (_hs_looping) { \
+ _hs_p = _hs_list; \
+ _hs_list = NULL; \
+ _hs_tail = NULL; \
+ _hs_nmerges = 0; \
+ while (_hs_p) { \
+ _hs_nmerges++; \
+ _hs_q = _hs_p; \
+ _hs_psize = 0; \
+ for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \
+ _hs_psize++; \
+ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \
+ ((void*)((char*)(_hs_q->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ if (! (_hs_q) ) break; \
+ } \
+ _hs_qsize = _hs_insize; \
+ while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \
+ if (_hs_psize == 0) { \
+ _hs_e = _hs_q; \
+ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \
+ ((void*)((char*)(_hs_q->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ _hs_qsize--; \
+ } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \
+ _hs_e = _hs_p; \
+ if (_hs_p){ \
+ _hs_p = (UT_hash_handle*)((_hs_p->next) ? \
+ ((void*)((char*)(_hs_p->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ } \
+ _hs_psize--; \
+ } else if (( \
+ cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \
+ DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \
+ ) <= 0) { \
+ _hs_e = _hs_p; \
+ if (_hs_p){ \
+ _hs_p = (UT_hash_handle*)((_hs_p->next) ? \
+ ((void*)((char*)(_hs_p->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ } \
+ _hs_psize--; \
+ } else { \
+ _hs_e = _hs_q; \
+ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \
+ ((void*)((char*)(_hs_q->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ _hs_qsize--; \
+ } \
+ if ( _hs_tail ) { \
+ _hs_tail->next = ((_hs_e) ? \
+ ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \
+ } else { \
+ _hs_list = _hs_e; \
+ } \
+ if (_hs_e) { \
+ _hs_e->prev = ((_hs_tail) ? \
+ ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \
+ } \
+ _hs_tail = _hs_e; \
+ } \
+ _hs_p = _hs_q; \
+ } \
+ if (_hs_tail){ \
+ _hs_tail->next = NULL; \
+ } \
+ if ( _hs_nmerges <= 1 ) { \
+ _hs_looping=0; \
+ (head)->hh.tbl->tail = _hs_tail; \
+ DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \
+ } \
+ _hs_insize *= 2; \
+ } \
+ HASH_FSCK(hh,head); \
+ } \
+} while (0)
+
+/* This function selects items from one hash into another hash.
+ * The end result is that the selected items have dual presence
+ * in both hashes. There is no copy of the items made; rather
+ * they are added into the new hash through a secondary hash
+ * hash handle that must be present in the structure. */
+#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \
+do { \
+ unsigned _src_bkt, _dst_bkt; \
+ void *_last_elt=NULL, *_elt; \
+ UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \
+ ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \
+ if (src) { \
+ for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \
+ for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
+ _src_hh; \
+ _src_hh = _src_hh->hh_next) { \
+ _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \
+ if (cond(_elt)) { \
+ _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \
+ _dst_hh->key = _src_hh->key; \
+ _dst_hh->keylen = _src_hh->keylen; \
+ _dst_hh->hashv = _src_hh->hashv; \
+ _dst_hh->prev = _last_elt; \
+ _dst_hh->next = NULL; \
+ if (_last_elt_hh) { _last_elt_hh->next = _elt; } \
+ if (!dst) { \
+ DECLTYPE_ASSIGN(dst,_elt); \
+ HASH_MAKE_TABLE(hh_dst,dst); \
+ } else { \
+ _dst_hh->tbl = (dst)->hh_dst.tbl; \
+ } \
+ HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \
+ HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \
+ (dst)->hh_dst.tbl->num_items++; \
+ _last_elt = _elt; \
+ _last_elt_hh = _dst_hh; \
+ } \
+ } \
+ } \
+ } \
+ HASH_FSCK(hh_dst,dst); \
+} while (0)
+
+#define HASH_CLEAR(hh,head) \
+do { \
+ if (head) { \
+ uthash_free((head)->hh.tbl->buckets, \
+ (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \
+ HASH_BLOOM_FREE((head)->hh.tbl); \
+ uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \
+ (head)=NULL; \
+ } \
+} while(0)
+
+#define HASH_OVERHEAD(hh,head) \
+ ((head) ? ( \
+ (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \
+ ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \
+ (sizeof(UT_hash_table)) + \
+ (HASH_BLOOM_BYTELEN)))) : 0)
+
+#ifdef NO_DECLTYPE
+#define HASH_ITER(hh,head,el,tmp) \
+for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \
+ el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL))
+#else
+#define HASH_ITER(hh,head,el,tmp) \
+for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \
+ el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL))
+#endif
+
+/* obtain a count of items in the hash */
+#define HASH_COUNT(head) HASH_CNT(hh,head)
+#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0)
+
+typedef struct UT_hash_bucket {
+ struct UT_hash_handle *hh_head;
+ unsigned count;
+
+ /* expand_mult is normally set to 0. In this situation, the max chain length
+ * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If
+ * the bucket's chain exceeds this length, bucket expansion is triggered).
+ * However, setting expand_mult to a non-zero value delays bucket expansion
+ * (that would be triggered by additions to this particular bucket)
+ * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH.
+ * (The multiplier is simply expand_mult+1). The whole idea of this
+ * multiplier is to reduce bucket expansions, since they are expensive, in
+ * situations where we know that a particular bucket tends to be overused.
+ * It is better to let its chain length grow to a longer yet-still-bounded
+ * value, than to do an O(n) bucket expansion too often.
+ */
+ unsigned expand_mult;
+
+} UT_hash_bucket;
+
+/* random signature used only to find hash tables in external analysis */
+#define HASH_SIGNATURE 0xa0111fe1
+#define HASH_BLOOM_SIGNATURE 0xb12220f2
+
+typedef struct UT_hash_table {
+ UT_hash_bucket *buckets;
+ unsigned num_buckets, log2_num_buckets;
+ unsigned num_items;
+ struct UT_hash_handle *tail; /* tail hh in app order, for fast append */
+ ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */
+
+ /* in an ideal situation (all buckets used equally), no bucket would have
+ * more than ceil(#items/#buckets) items. that's the ideal chain length. */
+ unsigned ideal_chain_maxlen;
+
+ /* nonideal_items is the number of items in the hash whose chain position
+ * exceeds the ideal chain maxlen. these items pay the penalty for an uneven
+ * hash distribution; reaching them in a chain traversal takes >ideal steps */
+ unsigned nonideal_items;
+
+ /* ineffective expands occur when a bucket doubling was performed, but
+ * afterward, more than half the items in the hash had nonideal chain
+ * positions. If this happens on two consecutive expansions we inhibit any
+ * further expansion, as it's not helping; this happens when the hash
+ * function isn't a good fit for the key domain. When expansion is inhibited
+ * the hash will still work, albeit no longer in constant time. */
+ unsigned ineff_expands, noexpand;
+
+ uint32_t signature; /* used only to find hash tables in external analysis */
+#ifdef HASH_BLOOM
+ uint32_t bloom_sig; /* used only to test bloom exists in external analysis */
+ uint8_t *bloom_bv;
+ char bloom_nbits;
+#endif
+
+} UT_hash_table;
+
+typedef struct UT_hash_handle {
+ struct UT_hash_table *tbl;
+ void *prev; /* prev element in app order */
+ void *next; /* next element in app order */
+ struct UT_hash_handle *hh_prev; /* previous hh in bucket order */
+ struct UT_hash_handle *hh_next; /* next hh in bucket order */
+ void *key; /* ptr to enclosing struct's key */
+ unsigned keylen; /* enclosing struct's key len */
+ unsigned hashv; /* result of hash-fcn(key) */
+} UT_hash_handle;
+
+#endif /* UTHASH_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utlist.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utlist.h
new file mode 100644
index 0000000..b5f3f04
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utlist.h
@@ -0,0 +1,757 @@
+/*
+Copyright (c) 2007-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef UTLIST_H
+#define UTLIST_H
+
+#define UTLIST_VERSION 1.9.9
+
+#include <assert.h>
+
+/*
+ * This file contains macros to manipulate singly and doubly-linked lists.
+ *
+ * 1. LL_ macros: singly-linked lists.
+ * 2. DL_ macros: doubly-linked lists.
+ * 3. CDL_ macros: circular doubly-linked lists.
+ *
+ * To use singly-linked lists, your structure must have a "next" pointer.
+ * To use doubly-linked lists, your structure must "prev" and "next" pointers.
+ * Either way, the pointer to the head of the list must be initialized to NULL.
+ *
+ * ----------------.EXAMPLE -------------------------
+ * struct item {
+ * int id;
+ * struct item *prev, *next;
+ * }
+ *
+ * struct item *list = NULL:
+ *
+ * int main() {
+ * struct item *item;
+ * ... allocate and populate item ...
+ * DL_APPEND(list, item);
+ * }
+ * --------------------------------------------------
+ *
+ * For doubly-linked lists, the append and delete macros are O(1)
+ * For singly-linked lists, append and delete are O(n) but prepend is O(1)
+ * The sort macro is O(n log(n)) for all types of single/double/circular lists.
+ */
+
+/* These macros use decltype or the earlier __typeof GNU extension.
+ As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+ when compiling c++ code), this code uses whatever method is needed
+ or, for VS2008 where neither is available, uses casting workarounds. */
+#ifdef _MSC_VER /* MS compiler */
+#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */
+#define LDECLTYPE(x) decltype(x)
+#else /* VS2008 or older (or VS2010 in C mode) */
+#define NO_DECLTYPE
+#define LDECLTYPE(x) char*
+#endif
+#elif defined(__ICCARM__)
+#define NO_DECLTYPE
+#define LDECLTYPE(x) char*
+#else /* GNU, Sun and other compilers */
+#define LDECLTYPE(x) __typeof(x)
+#endif
+
+/* for VS2008 we use some workarounds to get around the lack of decltype,
+ * namely, we always reassign our tmp variable to the list head if we need
+ * to dereference its prev/next pointers, and save/restore the real head.*/
+#ifdef NO_DECLTYPE
+#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); }
+#define _NEXT(elt,list,next) ((char*)((list)->next))
+#define _NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); }
+/* #define _PREV(elt,list,prev) ((char*)((list)->prev)) */
+#define _PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); }
+#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; }
+#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); }
+#else
+#define _SV(elt,list)
+#define _NEXT(elt,list,next) ((elt)->next)
+#define _NEXTASGN(elt,list,to,next) ((elt)->next)=(to)
+/* #define _PREV(elt,list,prev) ((elt)->prev) */
+#define _PREVASGN(elt,list,to,prev) ((elt)->prev)=(to)
+#define _RS(list)
+#define _CASTASGN(a,b) (a)=(b)
+#endif
+
+/******************************************************************************
+ * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort *
+ * Unwieldy variable names used here to avoid shadowing passed-in variables. *
+ *****************************************************************************/
+#define LL_SORT(list, cmp) \
+ LL_SORT2(list, cmp, next)
+
+#define LL_SORT2(list, cmp, next) \
+do { \
+ LDECLTYPE(list) _ls_p; \
+ LDECLTYPE(list) _ls_q; \
+ LDECLTYPE(list) _ls_e; \
+ LDECLTYPE(list) _ls_tail; \
+ int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
+ if (list) { \
+ _ls_insize = 1; \
+ _ls_looping = 1; \
+ while (_ls_looping) { \
+ _CASTASGN(_ls_p,list); \
+ list = NULL; \
+ _ls_tail = NULL; \
+ _ls_nmerges = 0; \
+ while (_ls_p) { \
+ _ls_nmerges++; \
+ _ls_q = _ls_p; \
+ _ls_psize = 0; \
+ for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
+ _ls_psize++; \
+ _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \
+ if (!_ls_q) break; \
+ } \
+ _ls_qsize = _ls_insize; \
+ while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
+ if (_ls_psize == 0) { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } else if (_ls_qsize == 0 || !_ls_q) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else if (cmp(_ls_p,_ls_q) <= 0) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \
+ } else { \
+ _CASTASGN(list,_ls_e); \
+ } \
+ _ls_tail = _ls_e; \
+ } \
+ _ls_p = _ls_q; \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \
+ } \
+ if (_ls_nmerges <= 1) { \
+ _ls_looping=0; \
+ } \
+ _ls_insize *= 2; \
+ } \
+ } \
+} while (0)
+
+
+#define DL_SORT(list, cmp) \
+ DL_SORT2(list, cmp, prev, next)
+
+#define DL_SORT2(list, cmp, prev, next) \
+do { \
+ LDECLTYPE(list) _ls_p; \
+ LDECLTYPE(list) _ls_q; \
+ LDECLTYPE(list) _ls_e; \
+ LDECLTYPE(list) _ls_tail; \
+ int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
+ if (list) { \
+ _ls_insize = 1; \
+ _ls_looping = 1; \
+ while (_ls_looping) { \
+ _CASTASGN(_ls_p,list); \
+ list = NULL; \
+ _ls_tail = NULL; \
+ _ls_nmerges = 0; \
+ while (_ls_p) { \
+ _ls_nmerges++; \
+ _ls_q = _ls_p; \
+ _ls_psize = 0; \
+ for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
+ _ls_psize++; \
+ _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \
+ if (!_ls_q) break; \
+ } \
+ _ls_qsize = _ls_insize; \
+ while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
+ if (_ls_psize == 0) { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } else if (_ls_qsize == 0 || !_ls_q) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else if (cmp(_ls_p,_ls_q) <= 0) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \
+ } else { \
+ _CASTASGN(list,_ls_e); \
+ } \
+ _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \
+ _ls_tail = _ls_e; \
+ } \
+ _ls_p = _ls_q; \
+ } \
+ _CASTASGN(list->prev, _ls_tail); \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \
+ if (_ls_nmerges <= 1) { \
+ _ls_looping=0; \
+ } \
+ _ls_insize *= 2; \
+ } \
+ } \
+} while (0)
+
+#define CDL_SORT(list, cmp) \
+ CDL_SORT2(list, cmp, prev, next)
+
+#define CDL_SORT2(list, cmp, prev, next) \
+do { \
+ LDECLTYPE(list) _ls_p; \
+ LDECLTYPE(list) _ls_q; \
+ LDECLTYPE(list) _ls_e; \
+ LDECLTYPE(list) _ls_tail; \
+ LDECLTYPE(list) _ls_oldhead; \
+ LDECLTYPE(list) _tmp; \
+ int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
+ if (list) { \
+ _ls_insize = 1; \
+ _ls_looping = 1; \
+ while (_ls_looping) { \
+ _CASTASGN(_ls_p,list); \
+ _CASTASGN(_ls_oldhead,list); \
+ list = NULL; \
+ _ls_tail = NULL; \
+ _ls_nmerges = 0; \
+ while (_ls_p) { \
+ _ls_nmerges++; \
+ _ls_q = _ls_p; \
+ _ls_psize = 0; \
+ for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
+ _ls_psize++; \
+ _SV(_ls_q,list); \
+ if (_NEXT(_ls_q,list,next) == _ls_oldhead) { \
+ _ls_q = NULL; \
+ } else { \
+ _ls_q = _NEXT(_ls_q,list,next); \
+ } \
+ _RS(list); \
+ if (!_ls_q) break; \
+ } \
+ _ls_qsize = _ls_insize; \
+ while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
+ if (_ls_psize == 0) { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \
+ } else if (_ls_qsize == 0 || !_ls_q) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \
+ } else if (cmp(_ls_p,_ls_q) <= 0) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \
+ } else { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \
+ } else { \
+ _CASTASGN(list,_ls_e); \
+ } \
+ _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \
+ _ls_tail = _ls_e; \
+ } \
+ _ls_p = _ls_q; \
+ } \
+ _CASTASGN(list->prev,_ls_tail); \
+ _CASTASGN(_tmp,list); \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp,next); _RS(list); \
+ if (_ls_nmerges <= 1) { \
+ _ls_looping=0; \
+ } \
+ _ls_insize *= 2; \
+ } \
+ } \
+} while (0)
+
+/******************************************************************************
+ * singly linked list macros (non-circular) *
+ *****************************************************************************/
+#define LL_PREPEND(head,add) \
+ LL_PREPEND2(head,add,next)
+
+#define LL_PREPEND2(head,add,next) \
+do { \
+ (add)->next = head; \
+ head = add; \
+} while (0)
+
+#define LL_CONCAT(head1,head2) \
+ LL_CONCAT2(head1,head2,next)
+
+#define LL_CONCAT2(head1,head2,next) \
+do { \
+ LDECLTYPE(head1) _tmp; \
+ if (head1) { \
+ _tmp = head1; \
+ while (_tmp->next) { _tmp = _tmp->next; } \
+ _tmp->next=(head2); \
+ } else { \
+ (head1)=(head2); \
+ } \
+} while (0)
+
+#define LL_APPEND(head,add) \
+ LL_APPEND2(head,add,next)
+
+#define LL_APPEND2(head,add,next) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ (add)->next=NULL; \
+ if (head) { \
+ _tmp = head; \
+ while (_tmp->next) { _tmp = _tmp->next; } \
+ _tmp->next=(add); \
+ } else { \
+ (head)=(add); \
+ } \
+} while (0)
+
+#define LL_DELETE(head,del) \
+ LL_DELETE2(head,del,next)
+
+#define LL_DELETE2(head,del,next) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ if ((head) == (del)) { \
+ (head)=(head)->next; \
+ } else { \
+ _tmp = head; \
+ while (_tmp->next && (_tmp->next != (del))) { \
+ _tmp = _tmp->next; \
+ } \
+ if (_tmp->next) { \
+ _tmp->next = ((del)->next); \
+ } \
+ } \
+} while (0)
+
+/* Here are VS2008 replacements for LL_APPEND and LL_DELETE */
+#define LL_APPEND_VS2008(head,add) \
+ LL_APPEND2_VS2008(head,add,next)
+
+#define LL_APPEND2_VS2008(head,add,next) \
+do { \
+ if (head) { \
+ (add)->next = head; /* use add->next as a temp variable */ \
+ while ((add)->next->next) { (add)->next = (add)->next->next; } \
+ (add)->next->next=(add); \
+ } else { \
+ (head)=(add); \
+ } \
+ (add)->next=NULL; \
+} while (0)
+
+#define LL_DELETE_VS2008(head,del) \
+ LL_DELETE2_VS2008(head,del,next)
+
+#define LL_DELETE2_VS2008(head,del,next) \
+do { \
+ if ((head) == (del)) { \
+ (head)=(head)->next; \
+ } else { \
+ char *_tmp = (char*)(head); \
+ while ((head)->next && ((head)->next != (del))) { \
+ head = (head)->next; \
+ } \
+ if ((head)->next) { \
+ (head)->next = ((del)->next); \
+ } \
+ { \
+ char **_head_alias = (char**)&(head); \
+ *_head_alias = _tmp; \
+ } \
+ } \
+} while (0)
+#ifdef NO_DECLTYPE
+#undef LL_APPEND
+#define LL_APPEND LL_APPEND_VS2008
+#undef LL_DELETE
+#define LL_DELETE LL_DELETE_VS2008
+#undef LL_DELETE2
+#define LL_DELETE2 LL_DELETE2_VS2008
+#undef LL_APPEND2
+#define LL_APPEND2 LL_APPEND2_VS2008
+#undef LL_CONCAT /* no LL_CONCAT_VS2008 */
+#undef DL_CONCAT /* no DL_CONCAT_VS2008 */
+#endif
+/* end VS2008 replacements */
+
+#define LL_COUNT(head,el,counter) \
+ LL_COUNT2(head,el,counter,next) \
+
+#define LL_COUNT2(head,el,counter,next) \
+{ \
+ counter = 0; \
+ LL_FOREACH2(head,el,next){ ++counter; } \
+}
+
+#define LL_FOREACH(head,el) \
+ LL_FOREACH2(head,el,next)
+
+#define LL_FOREACH2(head,el,next) \
+ for(el=head;el;el=(el)->next)
+
+#define LL_FOREACH_SAFE(head,el,tmp) \
+ LL_FOREACH_SAFE2(head,el,tmp,next)
+
+#define LL_FOREACH_SAFE2(head,el,tmp,next) \
+ for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
+
+#define LL_SEARCH_SCALAR(head,out,field,val) \
+ LL_SEARCH_SCALAR2(head,out,field,val,next)
+
+#define LL_SEARCH_SCALAR2(head,out,field,val,next) \
+do { \
+ LL_FOREACH2(head,out,next) { \
+ if ((out)->field == (val)) break; \
+ } \
+} while(0)
+
+#define LL_SEARCH(head,out,elt,cmp) \
+ LL_SEARCH2(head,out,elt,cmp,next)
+
+#define LL_SEARCH2(head,out,elt,cmp,next) \
+do { \
+ LL_FOREACH2(head,out,next) { \
+ if ((cmp(out,elt))==0) break; \
+ } \
+} while(0)
+
+#define LL_REPLACE_ELEM(head, el, add) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el)->next; \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } else { \
+ _tmp = head; \
+ while (_tmp->next && (_tmp->next != (el))) { \
+ _tmp = _tmp->next; \
+ } \
+ if (_tmp->next) { \
+ _tmp->next = (add); \
+ } \
+ } \
+} while (0)
+
+#define LL_PREPEND_ELEM(head, el, add) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } else { \
+ _tmp = head; \
+ while (_tmp->next && (_tmp->next != (el))) { \
+ _tmp = _tmp->next; \
+ } \
+ if (_tmp->next) { \
+ _tmp->next = (add); \
+ } \
+ } \
+} while (0) \
+
+
+/******************************************************************************
+ * doubly linked list macros (non-circular) *
+ *****************************************************************************/
+#define DL_PREPEND(head,add) \
+ DL_PREPEND2(head,add,prev,next)
+
+#define DL_PREPEND2(head,add,prev,next) \
+do { \
+ (add)->next = head; \
+ if (head) { \
+ (add)->prev = (head)->prev; \
+ (head)->prev = (add); \
+ } else { \
+ (add)->prev = (add); \
+ } \
+ (head) = (add); \
+} while (0)
+
+#define DL_APPEND(head,add) \
+ DL_APPEND2(head,add,prev,next)
+
+#define DL_APPEND2(head,add,prev,next) \
+do { \
+ if (head) { \
+ (add)->prev = (head)->prev; \
+ (head)->prev->next = (add); \
+ (head)->prev = (add); \
+ (add)->next = NULL; \
+ } else { \
+ (head)=(add); \
+ (head)->prev = (head); \
+ (head)->next = NULL; \
+ } \
+} while (0)
+
+#define DL_CONCAT(head1,head2) \
+ DL_CONCAT2(head1,head2,prev,next)
+
+#define DL_CONCAT2(head1,head2,prev,next) \
+do { \
+ LDECLTYPE(head1) _tmp; \
+ if (head2) { \
+ if (head1) { \
+ _tmp = (head2)->prev; \
+ (head2)->prev = (head1)->prev; \
+ (head1)->prev->next = (head2); \
+ (head1)->prev = _tmp; \
+ } else { \
+ (head1)=(head2); \
+ } \
+ } \
+} while (0)
+
+#define DL_DELETE(head,del) \
+ DL_DELETE2(head,del,prev,next)
+
+#define DL_DELETE2(head,del,prev,next) \
+do { \
+ assert((del)->prev != NULL); \
+ if ((del)->prev == (del)) { \
+ (head)=NULL; \
+ } else if ((del)==(head)) { \
+ (del)->next->prev = (del)->prev; \
+ (head) = (del)->next; \
+ } else { \
+ (del)->prev->next = (del)->next; \
+ if ((del)->next) { \
+ (del)->next->prev = (del)->prev; \
+ } else { \
+ (head)->prev = (del)->prev; \
+ } \
+ } \
+} while (0)
+
+#define DL_COUNT(head,el,counter) \
+ DL_COUNT2(head,el,counter,next) \
+
+#define DL_COUNT2(head,el,counter,next) \
+{ \
+ counter = 0; \
+ DL_FOREACH2(head,el,next){ ++counter; } \
+}
+
+#define DL_FOREACH(head,el) \
+ DL_FOREACH2(head,el,next)
+
+#define DL_FOREACH2(head,el,next) \
+ for(el=head;el;el=(el)->next)
+
+/* this version is safe for deleting the elements during iteration */
+#define DL_FOREACH_SAFE(head,el,tmp) \
+ DL_FOREACH_SAFE2(head,el,tmp,next)
+
+#define DL_FOREACH_SAFE2(head,el,tmp,next) \
+ for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
+
+/* these are identical to their singly-linked list counterparts */
+#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR
+#define DL_SEARCH LL_SEARCH
+#define DL_SEARCH_SCALAR2 LL_SEARCH_SCALAR2
+#define DL_SEARCH2 LL_SEARCH2
+
+#define DL_REPLACE_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ (add)->next = (el)->next; \
+ if ((el)->next == NULL) { \
+ (add)->prev = (add); \
+ } else { \
+ (add)->prev = (el)->prev; \
+ (add)->next->prev = (add); \
+ } \
+ } else { \
+ (add)->next = (el)->next; \
+ (add)->prev = (el)->prev; \
+ (add)->prev->next = (add); \
+ if ((el)->next == NULL) { \
+ (head)->prev = (add); \
+ } else { \
+ (add)->next->prev = (add); \
+ } \
+ } \
+} while (0)
+
+#define DL_PREPEND_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el); \
+ (add)->prev = (el)->prev; \
+ (el)->prev = (add); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } else { \
+ (add)->prev->next = (add); \
+ } \
+} while (0) \
+
+
+/******************************************************************************
+ * circular doubly linked list macros *
+ *****************************************************************************/
+#define CDL_PREPEND(head,add) \
+ CDL_PREPEND2(head,add,prev,next)
+
+#define CDL_PREPEND2(head,add,prev,next) \
+do { \
+ if (head) { \
+ (add)->prev = (head)->prev; \
+ (add)->next = (head); \
+ (head)->prev = (add); \
+ (add)->prev->next = (add); \
+ } else { \
+ (add)->prev = (add); \
+ (add)->next = (add); \
+ } \
+(head)=(add); \
+} while (0)
+
+#define CDL_DELETE(head,del) \
+ CDL_DELETE2(head,del,prev,next)
+
+#define CDL_DELETE2(head,del,prev,next) \
+do { \
+ if ( ((head)==(del)) && ((head)->next == (head))) { \
+ (head) = 0L; \
+ } else { \
+ (del)->next->prev = (del)->prev; \
+ (del)->prev->next = (del)->next; \
+ if ((del) == (head)) (head)=(del)->next; \
+ } \
+} while (0)
+
+#define CDL_COUNT(head,el,counter) \
+ CDL_COUNT2(head,el,counter,next) \
+
+#define CDL_COUNT2(head, el, counter,next) \
+{ \
+ counter = 0; \
+ CDL_FOREACH2(head,el,next){ ++counter; } \
+}
+
+#define CDL_FOREACH(head,el) \
+ CDL_FOREACH2(head,el,next)
+
+#define CDL_FOREACH2(head,el,next) \
+ for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
+
+#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \
+ CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
+
+#define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \
+ for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
+ (el) && ((tmp2)=(el)->next, 1); \
+ ((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
+
+#define CDL_SEARCH_SCALAR(head,out,field,val) \
+ CDL_SEARCH_SCALAR2(head,out,field,val,next)
+
+#define CDL_SEARCH_SCALAR2(head,out,field,val,next) \
+do { \
+ CDL_FOREACH2(head,out,next) { \
+ if ((out)->field == (val)) break; \
+ } \
+} while(0)
+
+#define CDL_SEARCH(head,out,elt,cmp) \
+ CDL_SEARCH2(head,out,elt,cmp,next)
+
+#define CDL_SEARCH2(head,out,elt,cmp,next) \
+do { \
+ CDL_FOREACH2(head,out,next) { \
+ if ((cmp(out,elt))==0) break; \
+ } \
+} while(0)
+
+#define CDL_REPLACE_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ if ((el)->next == (el)) { \
+ (add)->next = (add); \
+ (add)->prev = (add); \
+ (head) = (add); \
+ } else { \
+ (add)->next = (el)->next; \
+ (add)->prev = (el)->prev; \
+ (add)->next->prev = (add); \
+ (add)->prev->next = (add); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } \
+ } \
+} while (0)
+
+#define CDL_PREPEND_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el); \
+ (add)->prev = (el)->prev; \
+ (el)->prev = (add); \
+ (add)->prev->next = (add); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } \
+} while (0) \
+
+#endif /* UTLIST_H */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utstring.h b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utstring.h
new file mode 100644
index 0000000..867442c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/include/utstring.h
@@ -0,0 +1,393 @@
+/*
+Copyright (c) 2008-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* a dynamic string implementation using macros
+ */
+#ifndef UTSTRING_H
+#define UTSTRING_H
+
+#define UTSTRING_VERSION 1.9.9
+
+#ifdef __GNUC__
+#define _UNUSED_ __attribute__ ((__unused__))
+#else
+#define _UNUSED_
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#define oom() exit(-1)
+
+typedef struct {
+ char *d;
+ size_t n; /* allocd size */
+ size_t i; /* index of first unused byte */
+} UT_string;
+
+#define utstring_reserve(s,amt) \
+do { \
+ if (((s)->n - (s)->i) < (size_t)(amt)) { \
+ (s)->d = (char*)realloc((s)->d, (s)->n + amt); \
+ if ((s)->d == NULL) oom(); \
+ (s)->n += amt; \
+ } \
+} while(0)
+
+#define utstring_init(s) \
+do { \
+ (s)->n = 0; (s)->i = 0; (s)->d = NULL; \
+ utstring_reserve(s,100); \
+ (s)->d[0] = '\0'; \
+} while(0)
+
+#define utstring_done(s) \
+do { \
+ if ((s)->d != NULL) free((s)->d); \
+ (s)->n = 0; \
+} while(0)
+
+#define utstring_free(s) \
+do { \
+ utstring_done(s); \
+ free(s); \
+} while(0)
+
+#define utstring_new(s) \
+do { \
+ s = (UT_string*)calloc(sizeof(UT_string),1); \
+ if (!s) oom(); \
+ utstring_init(s); \
+} while(0)
+
+#define utstring_renew(s) \
+do { \
+ if (s) { \
+ utstring_clear(s); \
+ } else { \
+ utstring_new(s); \
+ } \
+} while(0)
+
+#define utstring_clear(s) \
+do { \
+ (s)->i = 0; \
+ (s)->d[0] = '\0'; \
+} while(0)
+
+#define utstring_bincpy(s,b,l) \
+do { \
+ utstring_reserve((s),(l)+1); \
+ if (l) memcpy(&(s)->d[(s)->i], b, l); \
+ (s)->i += l; \
+ (s)->d[(s)->i]='\0'; \
+} while(0)
+
+#define utstring_concat(dst,src) \
+do { \
+ utstring_reserve((dst),((src)->i)+1); \
+ if ((src)->i) memcpy(&(dst)->d[(dst)->i], (src)->d, (src)->i); \
+ (dst)->i += (src)->i; \
+ (dst)->d[(dst)->i]='\0'; \
+} while(0)
+
+#define utstring_len(s) ((unsigned)((s)->i))
+
+#define utstring_body(s) ((s)->d)
+
+_UNUSED_ static void utstring_printf_va(UT_string *s, const char *fmt, va_list ap) {
+ int n;
+ va_list cp;
+ while (1) {
+#ifdef _WIN32
+ cp = ap;
+#else
+ va_copy(cp, ap);
+#endif
+ n = vsnprintf (&s->d[s->i], s->n-s->i, fmt, cp);
+ va_end(cp);
+
+ if ((n > -1) && ((size_t) n < (s->n-s->i))) {
+ s->i += n;
+ return;
+ }
+
+ /* Else try again with more space. */
+ if (n > -1) utstring_reserve(s,n+1); /* exact */
+ else utstring_reserve(s,(s->n)*2); /* 2x */
+ }
+}
+#ifdef __GNUC__
+/* support printf format checking (2=the format string, 3=start of varargs) */
+static void utstring_printf(UT_string *s, const char *fmt, ...)
+ __attribute__ (( format( printf, 2, 3) ));
+#endif
+_UNUSED_ static void utstring_printf(UT_string *s, const char *fmt, ...) {
+ va_list ap;
+ va_start(ap,fmt);
+ utstring_printf_va(s,fmt,ap);
+ va_end(ap);
+}
+
+/*******************************************************************************
+ * begin substring search functions *
+ ******************************************************************************/
+/* Build KMP table from left to right. */
+_UNUSED_ static void _utstring_BuildTable(
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+
+ i = 0;
+ j = i - 1;
+ P_KMP_Table[i] = j;
+ while (i < (long) P_NeedleLen)
+ {
+ while ( (j > -1) && (P_Needle[i] != P_Needle[j]) )
+ {
+ j = P_KMP_Table[j];
+ }
+ i++;
+ j++;
+ if (i < (long) P_NeedleLen)
+ {
+ if (P_Needle[i] == P_Needle[j])
+ {
+ P_KMP_Table[i] = P_KMP_Table[j];
+ }
+ else
+ {
+ P_KMP_Table[i] = j;
+ }
+ }
+ else
+ {
+ P_KMP_Table[i] = j;
+ }
+ }
+
+ return;
+}
+
+
+/* Build KMP table from right to left. */
+_UNUSED_ static void _utstring_BuildTableR(
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+
+ i = P_NeedleLen - 1;
+ j = i + 1;
+ P_KMP_Table[i + 1] = j;
+ while (i >= 0)
+ {
+ while ( (j < (long) P_NeedleLen) && (P_Needle[i] != P_Needle[j]) )
+ {
+ j = P_KMP_Table[j + 1];
+ }
+ i--;
+ j--;
+ if (i >= 0)
+ {
+ if (P_Needle[i] == P_Needle[j])
+ {
+ P_KMP_Table[i + 1] = P_KMP_Table[j + 1];
+ }
+ else
+ {
+ P_KMP_Table[i + 1] = j;
+ }
+ }
+ else
+ {
+ P_KMP_Table[i + 1] = j;
+ }
+ }
+
+ return;
+}
+
+
+/* Search data from left to right. ( Multiple search mode. ) */
+_UNUSED_ static long _utstring_find(
+ const char *P_Haystack,
+ size_t P_HaystackLen,
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+ long V_FindPosition = -1;
+
+ /* Search from left to right. */
+ i = j = 0;
+ while ( (j < (int)P_HaystackLen) && (((P_HaystackLen - j) + i) >= P_NeedleLen) )
+ {
+ while ( (i > -1) && (P_Needle[i] != P_Haystack[j]) )
+ {
+ i = P_KMP_Table[i];
+ }
+ i++;
+ j++;
+ if (i >= (int)P_NeedleLen)
+ {
+ /* Found. */
+ V_FindPosition = j - i;
+ break;
+ }
+ }
+
+ return V_FindPosition;
+}
+
+
+/* Search data from right to left. ( Multiple search mode. ) */
+_UNUSED_ static long _utstring_findR(
+ const char *P_Haystack,
+ size_t P_HaystackLen,
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+ long V_FindPosition = -1;
+
+ /* Search from right to left. */
+ j = (P_HaystackLen - 1);
+ i = (P_NeedleLen - 1);
+ while ( (j >= 0) && (j >= i) )
+ {
+ while ( (i < (int)P_NeedleLen) && (P_Needle[i] != P_Haystack[j]) )
+ {
+ i = P_KMP_Table[i + 1];
+ }
+ i--;
+ j--;
+ if (i < 0)
+ {
+ /* Found. */
+ V_FindPosition = j + 1;
+ break;
+ }
+ }
+
+ return V_FindPosition;
+}
+
+
+/* Search data from left to right. ( One time search mode. ) */
+_UNUSED_ static long utstring_find(
+ UT_string *s,
+ long P_StartPosition, /* Start from 0. -1 means last position. */
+ const char *P_Needle,
+ size_t P_NeedleLen)
+{
+ long V_StartPosition;
+ long V_HaystackLen;
+ long *V_KMP_Table;
+ long V_FindPosition = -1;
+
+ if (P_StartPosition < 0)
+ {
+ V_StartPosition = s->i + P_StartPosition;
+ }
+ else
+ {
+ V_StartPosition = P_StartPosition;
+ }
+ V_HaystackLen = s->i - V_StartPosition;
+ if ( (V_HaystackLen >= (long) P_NeedleLen) && (P_NeedleLen > 0) )
+ {
+ V_KMP_Table = (long *)malloc(sizeof(long) * (P_NeedleLen + 1));
+ if (V_KMP_Table != NULL)
+ {
+ _utstring_BuildTable(P_Needle, P_NeedleLen, V_KMP_Table);
+
+ V_FindPosition = _utstring_find(s->d + V_StartPosition,
+ V_HaystackLen,
+ P_Needle,
+ P_NeedleLen,
+ V_KMP_Table);
+ if (V_FindPosition >= 0)
+ {
+ V_FindPosition += V_StartPosition;
+ }
+
+ free(V_KMP_Table);
+ }
+ }
+
+ return V_FindPosition;
+}
+
+
+/* Search data from right to left. ( One time search mode. ) */
+_UNUSED_ static long utstring_findR(
+ UT_string *s,
+ long P_StartPosition, /* Start from 0. -1 means last position. */
+ const char *P_Needle,
+ size_t P_NeedleLen)
+{
+ long V_StartPosition;
+ long V_HaystackLen;
+ long *V_KMP_Table;
+ long V_FindPosition = -1;
+
+ if (P_StartPosition < 0)
+ {
+ V_StartPosition = s->i + P_StartPosition;
+ }
+ else
+ {
+ V_StartPosition = P_StartPosition;
+ }
+ V_HaystackLen = V_StartPosition + 1;
+ if ( (V_HaystackLen >= (long) P_NeedleLen) && (P_NeedleLen > 0) )
+ {
+ V_KMP_Table = (long *)malloc(sizeof(long) * (P_NeedleLen + 1));
+ if (V_KMP_Table != NULL)
+ {
+ _utstring_BuildTableR(P_Needle, P_NeedleLen, V_KMP_Table);
+
+ V_FindPosition = _utstring_findR(s->d,
+ V_HaystackLen,
+ P_Needle,
+ P_NeedleLen,
+ V_KMP_Table);
+
+ free(V_KMP_Table);
+ }
+ }
+
+ return V_FindPosition;
+}
+/*******************************************************************************
+ * end substring search functions *
+ ******************************************************************************/
+
+#endif /* UTSTRING_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/AudioParamOptions.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/AudioParamOptions.xml
new file mode 100644
index 0000000..28f6f90
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/AudioParamOptions.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParamOptions>
+ <Param name="MTK_WB_SPEECH_SUPPORT" value="yes" />
+ <Param name="MTK_AUDIO_HD_REC_SUPPORT" value="yes" />
+ <Param name="MTK_DUAL_MIC_SUPPORT" value="yes" />
+ <Param name="MTK_HANDSFREE_DMNR_SUPPORT" value="yes" />
+ <Param name="DMNR_TUNNING_AT_MODEMSIDE" value="" />
+ <Param name="MTK_VOIP_ENHANCEMENT_SUPPORT" value="yes" />
+ <Param name="MTK_TB_WIFI_3G_MODE" value="" />
+ <Param name="MTK_DISABLE_EARPIECE" value="" />
+ <Param name="MTK_ASR_SUPPORT" value="no" />
+ <Param name="MTK_VOIP_NORMAL_DMNR" value="no" />
+ <Param name="MTK_VOIP_HANDSFREE_DMNR" value="no" />
+ <Param name="MTK_INCALL_NORMAL_DMNR" value="yes" />
+ <Param name="MTK_VOICE_UNLOCK_SUPPORT" value="" />
+ <Param name="MTK_VOICE_UI_SUPPORT" value="" />
+ <Param name="MTK_ACF_AUTO_GEN_SUPPORT" value="" />
+ <Param name="MTK_SPEAKER_MONITOR_SUPPORT" value="" />
+ <Param name="MTK_AUDIO_BLOUD_CUSTOMPARAMETER_REV" value="MTK_AUDIO_BLOUD_CUSTOMPARAMETER_V5" />
+ <Param name="MTK_MAGICONFERENCE_SUPPORT" value="no" />
+ <Param name="MTK_HAC_SUPPORT" value="no" />
+ <Param name="MTK_AUDIO_SPH_LPBK_PARAM" value="" />
+ <Param name="MTK_AUDIO_GAIN_TABLE_BT" value="" />
+ <Param name="MTK_AUDIO_BT_NREC_WO_ENH_MODE" value="" />
+ <Param name="MTK_AUDIO_TUNING_TOOL_V2_PHASE" value="2" />
+ <Param name="MATV_AUDIO_SUPPORT" value="" />
+ <Param name="MTK_FM_SUPPORT" value="yes" />
+ <Param name="MTK_HEADSET_ACTIVE_NOISE_CANCELLATION" value="" />
+ <Param name="MTK_SUPPORT_TC1_TUNNING" value="" />
+ <Param name="MTK_AUDIO_SPEAKER_PATH" value="smartpa_richtek_rt5509" />
+ <Param name="MTK_AUDIO_NUMBER_OF_MIC" value="2" />
+ <Param name="MTK_PLATFORM" value="MT6765" />
+ <Param name="MTK_AURISYS_FRAMEWORK_SUPPORT" value="yes" />
+ <Param name="MTK_BESLOUDNESS_RUN_WITH_HAL" value="no" />
+ <Param name="VIR_WIFI_ONLY_SUPPORT" value="no" />
+ <Param name="VIR_3G_DATA_ONLY_SUPPORT" value="no" />
+ <Param name="VIR_ASR_SUPPORT" value="no" />
+ <Param name="VIR_VOIP_NORMAL_DMNR_SUPPORT" value="no" />
+ <Param name="VIR_VOIP_HANDSFREE_DMNR_SUPPORT" value="no" />
+ <Param name="VIR_NO_SPEECH" value="no" />
+ <Param name="VIR_INCALL_NORMAL_DMNR_SUPPORT" value="yes" />
+ <Param name="VIR_INCALL_HANDSFREE_DMNR_SUPPORT" value="no" />
+ <Param name="VIR_VOICE_UNLOCK_SUPPORT" value="" />
+ <Param name="VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V5" value="yes" />
+ <Param name="VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V4" value="no" />
+ <Param name="VIR_MAGI_CONFERENCE_SUPPORT" value="no" />
+ <Param name="MTK_AUDIO_HIERARCHICAL_PARAM_SUPPORT" value="yes" />
+ <Param name="MTK_AUDIO_TUNING_TOOL_V2_PHASE" value="2" />
+ <Param name="VIR_MTK_RECORD_IIR_ENH_SUPPORT" value="yes" />
+ <Param name="VIR_MTK_VOIP_IIR_ENH_SUPPORT" value="yes" />
+ <Param name="VIR_MTK_VOIP_IIR_MIC_SUPPORT" value="yes" />
+ <Param name="VIR_VOIP_RECORD_AUDIODSP_SUPPORT" value="no" />
+ <Param name="SPH_PARAM_VERSION" value="2.0" />
+ <Param name="CUST_XML_DIR" value="/data/vendor/audiohal/audio_param/" />
+ <Param name="5_POLE_HS_SUPPORT" value="" />
+ <Param name="MTK_USB_PHONECALL" value="yes" />
+ <Param name="SPK_PATH_LO" value="yes" />
+ <Param name="RCV_PATH_INT" value="yes" />
+ <Param name="SPH_PARAM_TTY" value="yes" />
+ <Param name="FIX_WB_ENH" value="yes" />
+ <Param name="MTK_IIR_ENH_SUPPORT" value="yes" />
+ <Param name="MTK_IIR_MIC_SUPPORT" value="no" />
+ <Param name="MTK_FIR_IIR_ENH_SUPPORT" value="no" />
+ <Param name="SPH_PARAM_SV" value="no" />
+ <Param name="VIR_SCENE_CUSTOMIZATION_SUPPORT" value="no" />
+</AudioParamOptions>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDMNR_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDMNR_AudioParam.xml
new file mode 100644
index 0000000..44bee52
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDMNR_AudioParam.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="1"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dmnr_para" value="0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44,0x0,0x0,0x0"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dmnr_para" value="0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44,0x0,0x0,0x0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDMNR_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDMNR_ParamUnitDesc.xml
new file mode 100644
index 0000000..c445e95
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDMNR_ParamUnitDesc.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="Handset" alias="Normal,HAC"/>
+ <Category name="MagiConference" wording="2-mic NR"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dmnr_para" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDeReverb_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDeReverb_AudioParam.xml
new file mode 100644
index 0000000..53deed2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDeReverb_AudioParam.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam version="1.2">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="WB,Handsfree" param_id="0"/>
+ <Param path="SWB,Handsfree" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="derev_para" value="32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDeReverb_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDeReverb_ParamUnitDesc.xml
new file mode 100644
index 0000000..f074725
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechDeReverb_ParamUnitDesc.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.2">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="WB" wording="Wide Band" alias="NB"/>
+ <Category name="SWB" wording="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="Handsfree" wording="Hands-free" alias="TBOX_Handsfree"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="derev_para" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechEchoRef_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechEchoRef_AudioParam.xml
new file mode 100644
index 0000000..a561bf6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechEchoRef_AudioParam.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="USBAudio" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="EchoRef_para" value="0x1,0x100,0x8"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechEchoRef_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechEchoRef_ParamUnitDesc.xml
new file mode 100644
index 0000000..4952c0e
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechEchoRef_ParamUnitDesc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Device" wording="Device">
+ <Category name="USBAudio" wording="USBAudio"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="EchoRef_para" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechGeneral_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechGeneral_AudioParam.xml
new file mode 100644
index 0000000..4f545e7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechGeneral_AudioParam.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_common_para" value="0x6,0xDABD,0x7918,0x2A00,0x8001,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="debug_info" value="0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechGeneral_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechGeneral_ParamUnitDesc.xml
new file mode 100644
index 0000000..9e1d7a9
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechGeneral_ParamUnitDesc.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="CategoryLayer" wording="CategoryLayer">
+ <Category name="" wording="Common" alias="Common"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_common_para" type="ushort_array">
+ <Field name="Loud speaker mode Pre-Clipping threshold" array_index="3" bit="0,2" check_list="0,8960,1,10752,2,12902,3,15483,4,18579,5,22295,6,26754,7,32767"/>
+ </Param>
+ <Param name="debug_info" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechMagiClarity_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechMagiClarity_AudioParam.xml
new file mode 100644
index 0000000..5b64763
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechMagiClarity_AudioParam.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="Common" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="shape_rx_fir_para" value="0xFF73,0x01C3,0x01DC,0x0240,0x026E,0x022B,0x0156,0xFFE5,0xFDEB,0xFB89,0xF8E6,0xF60E,0xF2C3,0xEDFB,0xE38B,0xAE09,0x51F7,0x1C75,0x1205,0x0D3D,0x09F2,0x071A,0x0477,0x0215,0x001B,0xFEAA,0xFDD5,0xFD92,0xFDC0,0xFE24,0xFE3D,0x008D"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechMagiClarity_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechMagiClarity_ParamUnitDesc.xml
new file mode 100644
index 0000000..9b2530a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechMagiClarity_ParamUnitDesc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="CategoryLayer" wording="CategoryLayer">
+ <Category name="Common" wording="Common"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="shape_rx_fir_para" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechNetwork_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechNetwork_AudioParam.xml
new file mode 100644
index 0000000..3f99bcf
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechNetwork_AudioParam.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="GSM" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_network_support" value="0xfff"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechNetwork_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechNetwork_ParamUnitDesc.xml
new file mode 100644
index 0000000..22da7c4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechNetwork_ParamUnitDesc.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Network">
+ <Category name="GSM" />
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_network_support" type="ushort_array"/>
+ </ParamUnit>
+
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechUI_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechUI_AudioParam.xml
new file mode 100644
index 0000000..8c7bbe3
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechUI_AudioParam.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam version="1.2">
+ <ParamTree>
+ <Param path="Handsfree,GSM" param_id="2"/>
+ <Param path="TBOX_Handsfree,GSM" param_id="2"/>
+ <Param path="BT_Earphone,GSM" param_id="3"/>
+ <Param path="BT_NREC_Off,GSM" param_id="3"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <!-- DL TASTE on, UL cal. on, UL derev. on -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="1"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="1"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="1"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+
+ <ParamUnit param_id="1">
+ <!-- DL TASTE on, UL cal. off, UL derev. on -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="1"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="1"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+
+ <ParamUnit param_id="2">
+ <!-- DL TASTE off, UL cal. off, UL derev. on -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="0"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="1"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+
+ <ParamUnit param_id="3">
+ <!-- DL TASTE off, UL cal. off, UL derev. off -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="0"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="0"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechUI_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechUI_ParamUnitDesc.xml
new file mode 100644
index 0000000..810a395
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechUI_ParamUnitDesc.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc tab_name="Voice" version="1.2">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ <Category name="SWB" wording="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <CategoryGroup name="Hands-free">
+ <Category name="Handsfree" wording="Hands-free"/>
+ <Category name="TBOX_Handsfree" wording="T-BOX Hands-free"/>
+ </CategoryGroup>
+ <CategoryGroup name="BT Device" wording="Bluetooth">
+ <Category name="BT_Earphone" wording="BT_NREC_On"/>
+ <Category name="BT_NREC_Off"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="VolIndex" wording="Volume">
+ <CategoryGroup name="Index">
+ <Category name="0" wording="Level0"/>
+ <Category name="1" wording="Level1"/>
+ <Category name="2" wording="Level2"/>
+ <Category name="3" wording="Level3"/>
+ <Category name="4" wording="Level4"/>
+ <Category name="5" wording="Level5"/>
+ <Category name="6" wording="Level6"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="Network">
+ <Category name="GSM"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="DL FIR visibility" type="int"/>
+ <Param name="DL DRC+DG visibility" type="int"/>
+ <Param name="DL NR visibility" type="int"/>
+ <Param name="DL Digital Gain visibility" type="int"/>
+ <Param name="DL Limiter TH visibility" type="int"/>
+ <Param name="DL TASTE visibility" type="int"/>
+ <Param name="UL FIR visibility" type="int"/>
+ <Param name="UL DRC+DG visibility" type="int"/>
+ <Param name="UL NREC visibility" type="int"/>
+ <Param name="UL cal. visibility" type="int"/>
+ <Param name="UL Digital Gain visibility" type="int"/>
+ <Param name="UL Limiter TH visibility" type="int"/>
+ <Param name="UL AEC visibility" type="int"/>
+ <Param name="UL NLP visibility" type="int"/>
+ <Param name="UL ES LB visibility" type="int"/>
+ <Param name="UL AES LB visibility" type="int"/>
+ <Param name="UL derev. visibility" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVolUI_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVolUI_AudioParam.xml
new file mode 100644
index 0000000..a5ec559
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVolUI_AudioParam.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="BT" param_id="0"/>
+
+ <Param path="RCV" param_id="3"/>
+ <Param path="HS" param_id="3"/>
+ <Param path="HP" param_id="3"/>
+ <Param path="SPK" param_id="3"/>
+ <Param path="HS5POLE" param_id="3"/>
+ <Param path="HS5POLE_ANC" param_id="3"/>
+
+ <Param path="HAC" param_id="6"/>
+ <Param path="TTY" param_id="4"/>
+ <Param path="USB" param_id="5"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_gain_visibility" value="0"/>
+ <Param name="ul_gain_visibility" value="-1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="-1"/>
+ <Param name="stf_gain_visibility" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="dl_gain_visibility" value="0"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="6">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="-1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVolUI_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVolUI_ParamUnitDesc.xml
new file mode 100644
index 0000000..7edfc5a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVolUI_ParamUnitDesc.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" alias="Narrow Band"/>
+ <Category name="WB" alias="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="RCV" alias="Normal,Handset,Lpbk_Handset,Handset_SV"/>
+ <Category name="HAC"/>
+ <Category name="HS" alias="Headset,4_pole_Headset,Lpbk_Headset"/>
+ <Category name="HP" alias="3_pole_Headset"/>
+ <Category name="SPK" alias="Hands-free,1-mic NR,2-mic NR,Handsfree,MagiConference,Lpbk_Handsfree,Handsfree_SV,TBOX_Handsfree"/>
+ <Category name="HS5POLE" alias="5_pole_Headset,5-pole headset"/>
+ <Category name="HS5POLE_ANC" alias="5_pole_Headset+ANC"/>
+ <Category name="BT" alias="BT_Earphone,BT_NREC_Off"/>
+ <Category name="TTY" alias="Tty_HCO_Handset,Tty_VCO_Handset,Tty_HCO_Handsfree,Tty_VCO_Handsfree"/>
+ <Category name="USB" alias="Usb_Headset"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_gain_visibility" type="int"/>
+ <Param name="ul_gain_visibility" type="int"/>
+ <Param name="stf_gain_visibility" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVol_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVol_AudioParam.xml
new file mode 100644
index 0000000..94163ff
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVol_AudioParam.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="NB,LPBK_RCV,GSM" param_id="0"/>
+ <Param path="NB,LPBK_HP,GSM" param_id="2"/>
+ <Param path="NB,LPBK_SPK,GSM" param_id="3"/>
+
+ <Param path="WB,LPBK_RCV,GSM" param_id="0"/>
+ <Param path="WB,LPBK_HP,GSM" param_id="2"/>
+ <Param path="WB,LPBK_SPK,GSM" param_id="3"/>
+
+ <Param path="SWB,LPBK_RCV,GSM" param_id="0"/>
+ <Param path="SWB,LPBK_HP,GSM" param_id="2"/>
+ <Param path="SWB,LPBK_SPK,GSM" param_id="3"/>
+
+ <Param path="NB,RCV,GSM" param_id="0"/>
+ <Param path="NB,HAC,GSM" param_id="1"/>
+ <Param path="NB,HS,GSM" param_id="2"/>
+ <Param path="NB,HP,GSM" param_id="2"/>
+ <Param path="NB,SPK,GSM" param_id="3"/>
+ <Param path="NB,SPK_TBOX,GSM" param_id="3"/>
+
+ <Param path="WB,RCV,GSM" param_id="0"/>
+ <Param path="WB,HAC,GSM" param_id="1"/>
+ <Param path="WB,HS,GSM" param_id="2"/>
+ <Param path="WB,HP,GSM" param_id="2"/>
+ <Param path="WB,SPK,GSM" param_id="3"/>
+ <Param path="WB,SPK_TBOX,GSM" param_id="3"/>
+
+ <Param path="SWB,RCV,GSM" param_id="0"/>
+ <Param path="SWB,HAC,GSM" param_id="1"/>
+ <Param path="SWB,HS,GSM" param_id="2"/>
+ <Param path="SWB,HP,GSM" param_id="2"/>
+ <Param path="SWB,SPK,GSM" param_id="3"/>
+ <Param path="SWB,SPK_TBOX,GSM" param_id="3"/>
+
+ <Param path="NB,HS5POLE,GSM" param_id="4"/>
+ <Param path="WB,HS5POLE,GSM" param_id="4"/>
+ <Param path="SWB,HS5POLE,GSM" param_id="4"/>
+ <Param path="NB,HS5POLE_ANC,GSM" param_id="4"/>
+ <Param path="WB,HS5POLE_ANC,GSM" param_id="4"/>
+ <Param path="SWB,HS5POLE_ANC,GSM" param_id="4"/>
+
+ <Param path="NB,TTY,GSM" param_id="5"/>
+ <Param path="WB,TTY,GSM" param_id="5"/>
+ <Param path="SWB,TTY,GSM" param_id="5"/>
+
+ <Param path="NB,USB,GSM" param_id="2"/>
+ <Param path="WB,USB,GSM" param_id="2"/>
+ <Param path="SWB,USB,GSM" param_id="2"/>
+
+ <Param path="NB,RCV_SV,GSM" param_id="0"/>
+ <Param path="WB,RCV_SV,GSM" param_id="0"/>
+ <Param path="SWB,RCV_SV,GSM" param_id="0"/>
+
+ <Param path="NB,SPK_SV,GSM" param_id="3"/>
+ <Param path="WB,SPK_SV,GSM" param_id="3"/>
+ <Param path="SWB,SPK_SV,GSM" param_id="3"/>
+
+ <Param path="NB,LPBK_RCV,WCDMA" param_id="0"/>
+ <Param path="NB,LPBK_HP,WCDMA" param_id="2"/>
+ <Param path="NB,LPBK_SPK,WCDMA" param_id="3"/>
+
+ <Param path="WB,LPBK_RCV,WCDMA" param_id="0"/>
+ <Param path="WB,LPBK_HP,WCDMA" param_id="2"/>
+ <Param path="WB,LPBK_SPK,WCDMA" param_id="3"/>
+
+ <Param path="SWB,LPBK_RCV,WCDMA" param_id="0"/>
+ <Param path="SWB,LPBK_HP,WCDMA" param_id="2"/>
+ <Param path="SWB,LPBK_SPK,WCDMA" param_id="3"/>
+
+ <Param path="NB,RCV,WCDMA" param_id="0"/>
+ <Param path="NB,HAC,WCDMA" param_id="1"/>
+ <Param path="NB,HS,WCDMA" param_id="2"/>
+ <Param path="NB,HP,WCDMA" param_id="2"/>
+ <Param path="NB,SPK,WCDMA" param_id="3"/>
+ <Param path="NB,SPK_TBOX,WCDMA" param_id="3"/>
+
+ <Param path="WB,RCV,WCDMA" param_id="0"/>
+ <Param path="WB,HAC,WCDMA" param_id="1"/>
+ <Param path="WB,HS,WCDMA" param_id="2"/>
+ <Param path="WB,HP,WCDMA" param_id="2"/>
+ <Param path="WB,SPK,WCDMA" param_id="3"/>
+ <Param path="WB,SPK_TBOX,WCDMA" param_id="3"/>
+
+ <Param path="SWB,RCV,WCDMA" param_id="0"/>
+ <Param path="SWB,HAC,WCDMA" param_id="1"/>
+ <Param path="SWB,HS,WCDMA" param_id="2"/>
+ <Param path="SWB,HP,WCDMA" param_id="2"/>
+ <Param path="SWB,SPK,WCDMA" param_id="3"/>
+ <Param path="SWB,SPK_TBOX,WCDMA" param_id="3"/>
+
+ <Param path="NB,HS5POLE,WCDMA" param_id="4"/>
+ <Param path="WB,HS5POLE,WCDMA" param_id="4"/>
+ <Param path="SWB,HS5POLE,WCDMA" param_id="4"/>
+ <Param path="NB,HS5POLE_ANC,WCDMA" param_id="4"/>
+ <Param path="WB,HS5POLE_ANC,WCDMA" param_id="4"/>
+ <Param path="SWB,HS5POLE_ANC,WCDMA" param_id="4"/>
+
+ <Param path="NB,TTY,WCDMA" param_id="5"/>
+ <Param path="WB,TTY,WCDMA" param_id="5"/>
+ <Param path="SWB,TTY,WCDMA" param_id="5"/>
+
+ <Param path="NB,USB,WCDMA" param_id="2"/>
+ <Param path="WB,USB,WCDMA" param_id="2"/>
+ <Param path="SWB,USB,WCDMA" param_id="2"/>
+
+ <Param path="NB,RCV_SV,WCDMA" param_id="0"/>
+ <Param path="WB,RCV_SV,WCDMA" param_id="0"/>
+ <Param path="SWB,RCV_SV,WCDMA" param_id="0"/>
+
+ <Param path="NB,SPK_SV,WCDMA" param_id="3"/>
+ <Param path="WB,SPK_SV,WCDMA" param_id="3"/>
+ <Param path="SWB,SPK_SV,WCDMA" param_id="3"/>
+
+ <Param path="NB,LPBK_RCV,VoLTE" param_id="0"/>
+ <Param path="NB,LPBK_HP,VoLTE" param_id="2"/>
+ <Param path="NB,LPBK_SPK,VoLTE" param_id="3"/>
+
+ <Param path="WB,LPBK_RCV,VoLTE" param_id="0"/>
+ <Param path="WB,LPBK_HP,VoLTE" param_id="2"/>
+ <Param path="WB,LPBK_SPK,VoLTE" param_id="3"/>
+
+ <Param path="SWB,LPBK_RCV,VoLTE" param_id="0"/>
+ <Param path="SWB,LPBK_HP,VoLTE" param_id="2"/>
+ <Param path="SWB,LPBK_SPK,VoLTE" param_id="3"/>
+
+ <Param path="NB,RCV,VoLTE" param_id="0"/>
+ <Param path="NB,HAC,VoLTE" param_id="1"/>
+ <Param path="NB,HS,VoLTE" param_id="2"/>
+ <Param path="NB,HP,VoLTE" param_id="2"/>
+ <Param path="NB,SPK,VoLTE" param_id="3"/>
+ <Param path="NB,SPK_TBOX,VoLTE" param_id="3"/>
+
+ <Param path="WB,RCV,VoLTE" param_id="0"/>
+ <Param path="WB,HAC,VoLTE" param_id="1"/>
+ <Param path="WB,HS,VoLTE" param_id="2"/>
+ <Param path="WB,HP,VoLTE" param_id="2"/>
+ <Param path="WB,SPK,VoLTE" param_id="3"/>
+ <Param path="WB,SPK_TBOX,VoLTE" param_id="3"/>
+
+ <Param path="SWB,RCV,VoLTE" param_id="0"/>
+ <Param path="SWB,HAC,VoLTE" param_id="1"/>
+ <Param path="SWB,HS,VoLTE" param_id="2"/>
+ <Param path="SWB,HP,VoLTE" param_id="2"/>
+ <Param path="SWB,SPK,VoLTE" param_id="3"/>
+ <Param path="SWB,SPK_TBOX,VoLTE" param_id="3"/>
+
+ <Param path="NB,HS5POLE,VoLTE" param_id="4"/>
+ <Param path="WB,HS5POLE,VoLTE" param_id="4"/>
+ <Param path="SWB,HS5POLE,VoLTE" param_id="4"/>
+ <Param path="NB,HS5POLE_ANC,VoLTE" param_id="4"/>
+ <Param path="WB,HS5POLE_ANC,VoLTE" param_id="4"/>
+ <Param path="SWB,HS5POLE_ANC,VoLTE" param_id="4"/>
+
+ <Param path="NB,TTY,VoLTE" param_id="5"/>
+ <Param path="WB,TTY,VoLTE" param_id="5"/>
+ <Param path="SWB,TTY,VoLTE" param_id="5"/>
+
+ <Param path="NB,USB,VoLTE" param_id="2"/>
+ <Param path="WB,USB,VoLTE" param_id="2"/>
+ <Param path="SWB,USB,VoLTE" param_id="2"/>
+
+ <Param path="NB,RCV_SV,VoLTE" param_id="0"/>
+ <Param path="WB,RCV_SV,VoLTE" param_id="0"/>
+ <Param path="SWB,RCV_SV,VoLTE" param_id="0"/>
+
+ <Param path="NB,SPK_SV,VoLTE" param_id="3"/>
+ <Param path="WB,SPK_SV,VoLTE" param_id="3"/>
+ <Param path="SWB,SPK_SV,VoLTE" param_id="3"/>
+
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_gain" value="22,19,16,13,10,7,4"/>
+ <Param name="ul_gain" value="23"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_gain" value="22,19,16,13,10,7,4"/>
+ <Param name="ul_gain" value="0"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="dl_gain" value="27,24,21,18,15,12,9"/>
+ <Param name="ul_gain" value="27"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="dl_gain" value="22,19,16,13,10,7,4"/>
+ <Param name="ul_gain" value="27"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="dl_gain" value="27,24,21,18,15,12,9"/>
+ <Param name="ul_gain" value="24"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="dl_gain" value="27,24,21,18,15,12,9"/>
+ <Param name="ul_gain" value="0"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVol_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVol_ParamUnitDesc.xml
new file mode 100644
index 0000000..57e566d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/SpeechVol_ParamUnitDesc.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" alias="Narrow Band"/>
+ <Category name="WB" alias="Wide Band"/>
+ <Category name="SWB" alias="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="RCV" wording="Receiver" alias="Normal,Handset"/>
+ <Category name="RCV_SV" wording="Receiver_SV" alias="Handset_SV"/>
+ <Category name="HAC"/>
+ <Category name="HS" wording="Headset" alias="Headset,4_pole_Headset"/>
+ <Category name="HP" wording="Headphone" alias="3_pole_Headset"/>
+ <Category name="SPK" wording="Speaker" alias="Hands-free,1-mic NR,2-mic NR,Handsfree,MagiConference"/>
+ <Category name="SPK_TBOX" wording="Speaker_SV" alias="TBOX_Handsfree"/>
+ <Category name="SPK_SV" wording="Speaker_SV" alias="Handsfree_SV"/>
+ <Category name="HS5POLE" wording="Headset(5-pole)" alias="5_pole_Headset,5-pole headset"/>
+ <Category name="HS5POLE_ANC" wording="Headset(5-pole+ANC)" alias="5_pole_Headset+ANC"/>
+ <Category name="TTY" alias="Tty_HCO_Handset,Tty_VCO_Handset,Tty_HCO_Handsfree,Tty_VCO_Handsfree"/>
+ <Category name="LPBK_RCV" wording="Lpbk_Handset" alias="Lpbk_Handset"/>
+ <Category name="LPBK_HP" wording="Lpbk_Headset" alias="Lpbk_Headset"/>
+ <Category name="LPBK_SPK" wording="Lpbk_Handsfree" alias="Lpbk_Handsfree"/>
+ <Category name="USB" alias="Usb_Headset"/>
+ </CategoryType>
+ <CategoryType name="Network">
+ <Category name="GSM" alias="WCDMA,VoLTE"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_gain" type="short_array"/><!-- index, corresponding dB in another xml -->
+ <Param name="ul_gain" type="int"/><!-- unit is dB, range in other xml -->
+ <Param name="stf_gain" type="short_array">
+ <Field name="stf_gain_field" array_index="0" bit="0,15" check_list="30,20dB,28,18dB,26,16dB,24,14dB,22,12dB,20,10dB,18,8dB,16,6dB,14,4dB,12,2dB,10,0dB,8,-2dB,6,-4dB,4,-6dB,2,-8dB,0,-10dB"/>
+ </Param>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_AudioParam.xml
new file mode 100644
index 0000000..ec77c2d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_AudioParam.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.2">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="Handsfree" param_id="0"/>
+ <Param path="TBOX_Handsfree" param_id="0"/>
+ <Param path="BT_Earphone" param_id="1"/>
+ <Param path="BT_NREC_Off" param_id="2"/>
+ </ParamTree>
+
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_mode_para" value="0x8060,0xE0,0x8000,0x101F,0xE107,0x201F,0x19A,0x84,0x114,0xC5,0x25E,0x0,0x1048,0x10E9,0x3C0,0x0,0xD3DB,0x3FF,0x114D,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC72F,0x0,0x0,0x0,0xA00,0xEFE1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_out_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_in_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_out_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_in_iir_mic1_dsp" value="0xE342, 0x3CA1, 0x1DDC, 0xC448, 0x1DDC, 0xE0E8, 0x3F04, 0x2000, 0xC001, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic1_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic1_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_mic2_dsp" value="0xE0B7, 0x3F42, 0x1ECC, 0xC268, 0x1ECC, 0xE1B2, 0x3E47, 0x2000, 0xC000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic2_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic2_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_out_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_in_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_out_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_out_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_parameter" value="0.0,0.0,0.0,0.0"/>
+ <Param name="sph_out_parameter" value="0.0,0.0"/>
+ <Param name="sph_in_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_out_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_out_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_out_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic2_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="speech_mode_para" value="0x0,0xFD,0x2A04,0x1F,0xD10F,0x231F,0x195,0x0,0x110,0xC5,0x425E,0x0,0xC008,0x0,0x0,0x56,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_out_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_in_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_out_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_in_iir_mic1_dsp" value="0xE342, 0x3CA1, 0x1DDC, 0xC448, 0x1DDC, 0xE0E8, 0x3F04, 0x2000, 0xC001, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic1_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic1_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_mic2_dsp" value="0xE0B7, 0x3F42, 0x1ECC, 0xC268, 0x1ECC, 0xE1B2, 0x3E47, 0x2000, 0xC000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic2_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic2_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_out_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_in_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_out_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_out_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_parameter" value="0.0,0.0,0.0,0.0"/>
+ <Param name="sph_out_parameter" value="0.0,0.0"/>
+ <Param name="sph_in_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_out_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_out_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_out_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic2_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="speech_mode_para" value="0x0,0x1DF,0x2A04,0x1F,0xD108,0x231F,0x195,0x0,0x110,0xC5,0x425E,0x0,0xC008,0x0,0x0,0x56,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_out_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_in_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_out_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_in_iir_mic1_dsp" value="0xE342, 0x3CA1, 0x1DDC, 0xC448, 0x1DDC, 0xE0E8, 0x3F04, 0x2000, 0xC001, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic1_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic1_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_mic2_dsp" value="0xE0B7, 0x3F42, 0x1ECC, 0xC268, 0x1ECC, 0xE1B2, 0x3E47, 0x2000, 0xC000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic2_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic2_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_out_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_in_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_out_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_out_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_parameter" value="0.0,0.0,0.0,0.0"/>
+ <Param name="sph_out_parameter" value="0.0,0.0"/>
+ <Param name="sph_in_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_out_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_out_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_out_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic2_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_ParamTreeView.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_ParamTreeView.xml
new file mode 100644
index 0000000..13ce368
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_ParamTreeView.xml
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamTreeView version="1.0">
+ <TreeRoot name="TX_DRC+DG">
+ <Sheet/>
+
+ <Feature name="TX DRC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL Limiter TH"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL IIR cut off frequency"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="75Hz high-pass IIR"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="comfort noise"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="comfort noise level"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="TX IIR switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="TX FIR switch"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="TX Digital Gain">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL Digital Gain"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <TreeRoot name="NREC">
+ <Sheet/>
+
+ <Feature name="MagiAEC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="device Mode"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BGNT FE improvement control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="echo path change handler"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="manual clipping"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Pre-clipping/manual clipping threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ES switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ES"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="First Echo Suppression control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES improvement"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Comfort noise generator"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Minimum comfort noise value"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NLP Suppression behavior control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NLP"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="remove tone in echo ref"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BT Delay Control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="New echo suppression"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k ES smooth rate"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k ES gain lower bound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k ES estimated echo control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k ES smooth rate"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k ES gain lower bound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k ES estimated echo control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k ES smooth rate"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k ES gain lower bound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k ES estimated echo control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="EPC control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Normal mode DT improvement"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ref vowel detection"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="speaker nolinear model"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BT mode echo ref"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL delay for EC tuning (ms)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Echo estimate rate control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ACQUA DT score tuning"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="LSPK DT improvement"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Hard clipping"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AGC gain bypass"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AGC fast release"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="High band EC improve(6.5k~8k)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="CNG Power"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AEC use HB vad and small bias term"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Boost ref 6dB"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BGNT FE improve switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BGNT FE stepsize weighting"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="LSPK subjective DT"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES rate fast"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Band0 NE VAD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Boost ref NB bands"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Boost ref 4k~6k"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="EC taps above 5.5K"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES ESR1 THD"/>
+
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="MagiTDNC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="TDNC switch"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path="NB"/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="MagiNR(TX)">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="Single Mic Mode Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Switch or Gain lowerbound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Switch or Gain (>6K) lowerbound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS 1-mic VAD THD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Strength when VAD on"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Strength when VAD off"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Highband(4k-8k) speech protection"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Minimum Statistics Window Length"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Likelihood Ratio Test Threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Lowband VAD THD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Highband VAD THD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Stationary Noise Tracking Speed"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Enable Fixed Stationary Noise when NE VAD on"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Enable Fixed Stationary Noise when FE VAD on"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Enable Dynamic MCRA Window"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Strong DC suppression"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Dynamic LB"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Less Gain Protection"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Initial Convergence"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="VAD Stricter"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Frequency Range"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Pitch Boost Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Comb Suppression Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Harmonic Clarity Level"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Peak Protection Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Time-smoothing Factor"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Strength (Normal)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Pitch Boost Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Comb Suppression Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Excitation Generation Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Appliance Condition Threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Aggressive Mode"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <TreeRoot name="RX_DRC+DG">
+ <Sheet/>
+
+ <Feature name="RX DRC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX expander mode"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL Limiter TH"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL expander suppression gain"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="CC mode"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RMS power limiter thd"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2.5ms delay"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="CC/VCE switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Hard clipping"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="LPF"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX HP filter cutoff freq (IIR)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX IIR switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX FIR switch"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="RX Digital Gain">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL Digital Gain"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="MagiLoudness/MagiClarity">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="MagiClarity DM/SM"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="MagiClarity switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="SNR trigger threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="high frequnecy strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="maximum gain"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="noise startup threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL bounder threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="attack time"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="release time"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <TreeRoot name="NR">
+ <Sheet/>
+
+ <Feature name="MagiNR(RX)">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX NR Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX NR Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX expander switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX expander suppression gain"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX Comfort Noise"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <!-- TreeRoot2 -->
+ <!-- TreeRoot3... -->
+</ParamTreeView>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_ParamUnitDesc.xml
new file mode 100644
index 0000000..87013c6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Speech_ParamUnitDesc.xml
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc tab_name="Voice" version="1.2">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ <Category name="SWB" wording="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <CategoryGroup name="Hands-free">
+ <Category name="Handsfree" wording="Hands-free"/>
+ <Category name="TBOX_Handsfree" wording="T-BOX Hands-free"/>
+ </CategoryGroup>
+ <CategoryGroup name="BT Device" wording="Bluetooth">
+ <Category name="BT_Earphone" wording="BT_NREC_On"/>
+ <Category name="BT_NREC_Off"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="VolIndex" wording="Volume">
+ <CategoryGroup name="Index">
+ <Category name="0" wording="Level0"/>
+ <Category name="1" wording="Level1"/>
+ <Category name="2" wording="Level2"/>
+ <Category name="3" wording="Level3"/>
+ <Category name="4" wording="Level4"/>
+ <Category name="5" wording="Level5"/>
+ <Category name="6" wording="Level6"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="Network">
+ <Category name="GSM"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_mode_para" type="ushort_array">
+ <!-- Gain -->
+ <Field name="DL Digital Gain" array_index="7" bit="4,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB,4,4dB,5,5dB,6,6dB,7,7dB,8,8dB,9,9dB,10,10dB,11,11dB,12,12dB,13,13dB,14,14dB,15,15dB"/>
+ <Field name="UL Digital Gain" array_index="7" bit="0,3" check_list="0,0dB,1,1dB,2,2dB,3,3dB,4,4dB,5,5dB,6,6dB,7,7dB,8,8dB,9,9dB,10,10dB,11,11dB,12,12dB,13,13dB,14,14dB,15,15dB"/>
+
+ <!-- New TX DRC -->
+ <Field name="TX Graphical_UI_DRC Switch" array_index="32" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="TX RMS_TAV_Count" array_index="32" bit="1,3" check_list="1,20,2,40,3,60,4,80,5,100"/>
+ <Field name="TX DRC-Delay" array_index="32" bit="4,5" check_list="0,0ms,1,5ms,2,10ms,3,15ms"/>
+ <Field name="TX DRC Min-Gain" array_index="32" bit="6,7" check_list="0,-6dB,1,-9dB,2,-12dB,3,-18dB"/>
+ <Field name="TX-1 Gain Attack_Rate" array_index="33" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-1 Gain Release_Rate" array_index="33" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-1 Gain Hysterisis" array_index="33" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-2 Gain Attack_Rate" array_index="34" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-2 Gain Release_Rate" array_index="34" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-2 Gain Hysterisis" array_index="34" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-3 Gain Attack_Rate" array_index="35" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-3 Gain Release_Rate" array_index="35" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-3 Gain Hysterisis" array_index="35" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-4 Gain Attack_Rate" array_index="36" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-4 Gain Release_Rate" array_index="36" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-4 Gain Hysterisis" array_index="36" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-5 Gain Attack_Rate" array_index="37" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-5 Gain Release_Rate" array_index="37" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-5 Gain Hysterisis" array_index="37" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX DSP_Compression_ratio_0" array_index="38" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_1" array_index="39" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_2" array_index="40" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_3" array_index="41" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_4" array_index="42" bit="0,7"/>
+ <Field name="TX DSP_Threshold_Y0" array_index="43" bit="0,3"/>
+ <Field name="TX DSP_Threshold_X1" array_index="44" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X2" array_index="45" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X3" array_index="46" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X4" array_index="47" bit="0,7"/>
+
+ <!-- New RX DRC -->
+ <Field name="RX Graphical_UI_DRC Switch" array_index="32" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="RX RMS_TAV_Count" array_index="32" bit="9,11" check_list="1,20,2,40,3,60,4,80,5,100"/>
+ <Field name="RX DRC-Delay" array_index="32" bit="12,13" check_list="0,0ms,1,5ms,2,10ms,3,15ms"/>
+ <Field name="RX DRC Min-Gain" array_index="32" bit="14,15" check_list="0,-6dB,1,-9dB,2,-12dB,3,-18dB"/>
+ <Field name="RX-1 Gain Attack_Rate" array_index="33" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-1 Gain Release_Rate" array_index="33" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-1 Gain Hysterisis" array_index="33" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-2 Gain Attack_Rate" array_index="34" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-2 Gain Release_Rate" array_index="34" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-2 Gain Hysterisis" array_index="34" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-3 Gain Attack_Rate" array_index="35" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-3 Gain Release_Rate" array_index="35" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-3 Gain Hysterisis" array_index="35" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-4 Gain Attack_Rate" array_index="36" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-4 Gain Release_Rate" array_index="36" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-4 Gain Hysterisis" array_index="36" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-5 Gain Attack_Rate" array_index="37" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-5 Gain Release_Rate" array_index="37" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-5 Gain Hysterisis" array_index="37" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX DSP_Compression_ratio_0" array_index="38" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_1" array_index="39" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_2" array_index="40" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_3" array_index="41" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_4" array_index="42" bit="8,15"/>
+ <Field name="RX DSP_Threshold_Y0" array_index="43" bit="4,11 "/>
+ <Field name="RX DSP_Threshold_X1" array_index="44" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X2" array_index="45" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X3" array_index="46" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X4" array_index="47" bit="8,15"/>
+
+ <!-- MagiNR(TX) -->
+ <Field name="TX NR Switch" array_index="4" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="TX NR Quick learning" array_index="4" bit="1,1" check_list="0,quick,1,slow"/>
+ <Field name="TX NR for high frequency" array_index="4" bit="8,8" check_list="0,on,1,off"/>
+ <Field name="TX NR suppression strength" array_index="8" bit="6,8" check_list="0,23dB,1,20.5dB,2,18dB,3,15.5dB,4,13dB,5,10.5dB,6,8dB,7,off"/>
+ <Field name="TX Adaptive gain control" array_index="4" bit="12,13" check_list="0,fixed 10 dB,1, fixed 0 dB,2,vary between 10 to 6dB, 3,vary between 10 to 0dB"/>
+ <Field name="TX mute 1s" array_index="10" bit="1,1" check_list="0,on,1,off"/>
+ <Field name="TX Ambient noise calibration" array_index="8" bit="12,13" check_list="0,0dB,1,3dB,2,6dB,3,9dB"/>
+ <Field name="TX Handfree Tone Detection" array_index="4" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="TX expander switch" array_index="3" bit="0,1" check_list="0,off,1,suppress echo,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="TX expander suppression gain" array_index="3" bit="4,5" check_list="0,3dB,1,9dB,2,12dB,3,15dB"/>
+ <Field name="TX NR Noise Adaption Rate" array_index="4" bit="10,11" check_list="0,722ms,1,209ms,2,62ms,3,32ms"/>
+
+ <!-- MagiNR(RX) -->
+ <Field name="RX NR Switch" array_index="4" bit="2,2" check_list="0,off,1,on"/>
+ <Field name="RX NR Strength" array_index="8" bit="9,11" check_list="0,23dB,1,20.5dB,2,18dB,3,15.5dB,4,13dB,5,10.5dB,6,8dB,7,off"/>
+ <Field name="RX expander switch" array_index="5" bit="0,1" check_list="0,off,1, off,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="RX expander suppression gain" array_index="5" bit="4,5" check_list="0,3dB,1,9dB,2,12dB,3,15dB"/>
+ <Field name="RX Comfort Noise" array_index="10" bit="13,15" check_list="0,+0dB(-83dBFS),1,+3dB,2,+6dB,3,+9dB,4,+12dB,5,+15dB,6,+18dB,7,+21dB"/>
+
+ <!-- MagiAEC -->
+ <Field name="AEC" array_index="1" bit="0,15" check_list="189,189,221,221,224,224,253,253,479,479"/>
+ <Field name="Switch" array_index="1" bit="8,8" check_list="0,on,1,off"/>
+ <Field name="device Mode" array_index="1" bit="0,0" check_list="0,Handfree Mode,1,Normal Mode"/>
+ <Field name="BGNT FE improvement control" array_index="1" bit="7,7" check_list="0,less aggressive,1,default"/>
+ <Field name="echo path change handler" array_index="1" bit="13, 13" check_list="0,on,1,off"/>
+ <Field name="manual clipping" array_index="0" bit="15, 15" check_list="0,off,1,on"/>
+ <Field name="Pre-clipping/manual clipping threshold" array_index="6" bit="0, 3" check_list="0,-15dB,1,-14dB,2,-13dB,3,-12dB,4,-11dB,5,-10dB,6,-9dB,7,-8dB,8,-7dB,9,-6dB,10,-5dB,11,-4dB,12,-3dB,13,-2dB,14,-1dB,15,0dB"/>
+ <Field name="ES switch" array_index="1" bit="1,1" check_list="0,on,1,off"/>
+ <Field name="residual echo weighting for linear part" array_index="2" bit="0,3"/>
+ <Field name="residual echo weighting for non-linear part" array_index="2" bit="4,7"/>
+ <Field name="ES" array_index="2" bit="11,14" check_list="0,no bound,1,-24.1dB,2,-18.1dB,3,-14.5dB,4,-12.0dB,5,-10.1dB,6,-8.52dB,7,-7.18dB,8,-6.02dB,9,-5.00dB,10,-4.08dB,11,-3.25dB,12,-2.50dB,13,-1.80dB,14,-1.16dB,15,-0.56dB"/>
+ <Field name="First Echo Suppression control" array_index="1" bit="10,10" check_list="0,on,1,off"/>
+ <Field name="AES switch" array_index="1" bit="14,14" check_list="0,on,1,off"/>
+ <Field name="AES improvement" array_index="12" bit="7,7" check_list="0,off,1,on"/>
+ <Field name="AES" array_index="12" bit="11,14" check_list="0,no bound,1,-24.1dB,2,-18.1dB,3,-14.5dB,4,-12.0dB,5,-10.1dB,6,-8.52dB,7,-7.18dB,8,-6.02dB,9,-5.00dB,10,-4.08dB,11,-3.25dB,12,-2.50dB,13,-1.80dB,14,-1.16dB,15,-0.56dB"/>
+ <Field name="Comfort noise generator" array_index="1" bit="5,5" check_list="0,off,1,on"/>
+ <Field name="Minimum comfort noise value" array_index="12" bit="0,4"/>
+ <Field name="NLP Suppression behavior control" array_index="1" bit="11,11" check_list="0,on,1,off"/>
+ <Field name="NLP" array_index="0" bit="0,7" check_list="0,0,64,64,96,96,128,128,192,192,255,255"/>
+ <Field name="remove tone in echo ref" array_index="12" bit="6,6" check_list="0,off,1,on"/>
+ <Field name="BT Delay Control" array_index="15" bit="0,7"/>
+ <Field name="New echo suppression" array_index="2" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="0-2k residual echo weighting for linear part" array_index="16" bit="0,2" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="0-2k residual echo weighting for non-linear part" array_index="16" bit="3,5" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="0-2k ES smooth rate" array_index="16" bit="6,7" check_list="0,0.9,1,0.6,2,0.3,3,0"/>
+ <Field name="0-2k ES gain lower bound" array_index="18" bit="0,4" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="0-2k ES estimated echo control" array_index="17" bit="10,11" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="2-4k residual echo weighting for linear part" array_index="16" bit="8,10" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="2-4k residual echo weighting for non-linear part" array_index="16" bit="11,13" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="2-4k ES smooth rate" array_index="16" bit="14,15" check_list="0,0.9,1,0.6,2,0.3,3,0"/>
+ <Field name="2-4k ES gain lower bound" array_index="18" bit="5,9" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="2-4k ES estimated echo control" array_index="17" bit="12,13" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="4-8k residual echo weighting for linear part" array_index="17" bit="0,2" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="4-8k residual echo weighting for non-linear part" array_index="17" bit="3,5" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="4-8k ES smooth rate" array_index="17" bit="6,7" check_list="0,0.9,1,0.6,2,0.3,3,0"/>
+ <Field name="4-8k ES gain lower bound" array_index="18" bit="10,14" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="4-8k ES estimated echo control" array_index="17" bit="14,15" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="EPC control" array_index="17" bit="8,9" check_list="0,EPC handler off,1,EPC ES handling,2,EPC ES handling+strict EPC EC handling,3,EPC ES handling+EPC EC handling"/>
+ <Field name="Normal mode DT improvement" array_index="18" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="ref vowel detection" array_index="1" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="speaker nolinear model" array_index="1" bit="2,3" check_list="0,default,1,high band nonlinear,2,low band nonlinear,3,default"/>
+ <Field name="BT mode echo ref" array_index="12" bit="15,15" check_list="0,off(default),1,BT mode"/>
+ <Field name="UL delay for EC tuning (ms)" array_index="15" bit="8,11"/>
+ <Field name="Echo estimate rate control" array_index="0" bit="10,11" check_list="0,favor reverb handling,1,default,2,default,3,favor subjective DT"/>
+ <Field name="ACQUA DT score tuning" array_index="0" bit="12,13" check_list="0,worst DT,1,tuning level2,2,tuning level3,3,best DT"/>
+ <Field name="LSPK DT improvement" array_index="0" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="Hard clipping" array_index="5" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="AGC gain bypass" array_index="3" bit="14,14" check_list="0,on,1,off"/>
+ <Field name="AGC fast release" array_index="3" bit="13,13" check_list="0,off,1,on"/>
+ <Field name="High band EC improve(6.5k~8k)" array_index="1" bit="4,4" check_list="0,off,1,on"/>
+ <Field name="CNG Power" array_index="12" bit="5,5" check_list="0,old,1,new"/>
+ <Field name="AEC use HB vad and small bias term" array_index="12" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="Boost ref 6dB" array_index="1" bit="6,6" check_list="0,on,1,off"/>
+ <Field name="BGNT FE improve switch" array_index="7" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="BGNT FE stepsize weighting" array_index="7" bit="13,14" check_list="0,level0,1,level1,2,level2,3,level3"/>
+ <Field name="LSPK subjective DT" array_index="0" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="AES rate fast" array_index="1" bit="12,12" check_list="0,off,1,on"/>
+ <Field name="Band0 NE VAD" array_index="1" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="Boost ref NB bands" array_index="26" bit="0,1" check_list="0,off,1,+6dB,2,+12dB,3,+12dB"/>
+ <Field name="Boost ref 4k~6k" array_index="26" bit="2,2" check_list="0,off,1,+6dB"/>
+ <Field name="EC taps above 5.5K" array_index="26" bit="3,4" check_list="0,16,1,24,2,32,3,48"/>
+ <Field name="AES ESR1 THD" array_index="26" bit="5,6" check_list="0,1500,1,3000,2,4500,3,6000"/>
+
+ <!-- MagiNR(dual) -->
+ <!-- Mode Parameter 9 -->
+ <Field name="WA expander" array_index="9" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="DMNR ASLR Gain release rate" array_index="9" bit="6,7" check_list="0,fast,1,normal,2,slow,3,very slow"/>
+ <!-- Mode Parameter 13 -->
+ <Field name="MagiNRDual switch" array_index="13" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="NS Switch or Gain lowerbound" array_index="13" bit="1,4" check_list="0,off,1,2dB,2,4dB,3,6dB,4,8dB,5,10dB,6,12dB,7,14dB,8,16dB,9,18dB,10,20dB,11,22dB,12,24dB,13,26dB,14,28dB,15,30dB"/>
+ <Field name="NS Initial Convergence" array_index="13" bit="5,5" check_list="0,off,1,on"/>
+ <Field name="NS 1-mic VAD THD (Normal)" array_index="13" bit="6,7" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="NS Noise Overestimation" array_index="13" bit="8,9" check_list="0,1.5dB,1,3dB,2,4.5dB,3,off"/>
+ <Field name="NS Strength when VAD on (Normal)" array_index="13" bit="10,11" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="NS Strength when VAD off (Normal)" array_index="13" bit="12,13" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="NS Highband(4k-8k) speech protection" array_index="13" bit="14,15" check_list="0,weak,1,medium,2,medium-strong,3,strong"/>
+ <!-- Mode Parameter 14 -->
+ <Field name="Initial Suppression when Reset" array_index="14" bit="0,0" check_list="0,off,1,100ms"/>
+ <Field name="NS Less Gain Protection" array_index="14" bit="1,3" check_list="0,off,1,weakest,2,weaker,3,weak,4,medium,5,strong,6,stronger,7,strongest"/>
+ <Field name="NS Dynamic LB" array_index="14" bit="4,5" check_list="0,off,1,800 ms,2,400 ms,3,200 ms"/>
+ <Field name="HR Strength" array_index="14" bit="6,7" check_list="0,off,1,weak,2,medium,3,strong"/>
+ <Field name="HR Pitch Boost Switch" array_index="14" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="HR Comb Suppression Switch" array_index="14" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="HR Excitation Generation Strength" array_index="14" bit="10,11" check_list="0,0(most harmonics),1,1,2,2,3,3(fewest harmonics)"/>
+ <Field name="HR Appliance Condition Threshold)" array_index="14" bit="12,14" check_list="0,300(loose),1,400,2,500,3,600,4,700,5,800,6,900,7,1000(strict)"/>
+ <Field name="HR Aggressive Mode" array_index="14" bit="15,15" check_list="0,off,1,on"/>
+ <!-- Mode Parameter 15 -->
+ <!-- Mode Parameter 26 -->
+ <Field name="NS Switch or Gain (>6K) lowerbound" array_index="26" bit="8,11" check_list="0,off,1,2dB,2,4dB,3,6dB,4,8dB,5,10dB,6,12dB,7,14dB,8,16dB,9,18dB,10,20dB,11,22dB,12,24dB,13,26dB,14,28dB,15,30dB"/>
+ <Field name="NS Strong DC suppression" array_index="26" bit="12,13" check_list="0,off,1,93.75 Hz,2,156.25 Hz,3,250 Hz"/>
+ <Field name="NS Highband(4k-8k) speech protection" array_index="26" bit="14,15" check_list="0,weak,1,medium,2,medium-strong,3,strong"/>
+ <!-- Mode Parameter 27 -->
+ <Field name="Speech Content VAD : Noise Rejection THD" array_index="27" bit="0,2" check_list="0,3250,1,3500,2,3750,3,4000,4,4250,5,4500,6,4750,7,5000"/>
+ <Field name="Speech Content VAD : Speech Acceptance THD" array_index="27" bit="3,5" check_list="0,6500,1,7000,2,7500,3,8000,4,8500,5,9000,6,9500,7,10000"/>
+ <!-- Mode Parameter 30 -->
+ <Field name="HR Frequency Range" array_index="30" bit="0,1" check_list="0,0-6K,1,0-8K,2,0-4K,3,0-2K"/>
+ <Field name="HR Pitch Boost Strength" array_index="30" bit="2,3" check_list="0,1.5dB,1,3dB,2,4.5dB,3,6dB"/>
+ <Field name="HR Comb Suppression Strength" array_index="30" bit="4,5" check_list="0,-6dB,1,-12dB,2,-18dB,3,-24dB"/>
+ <Field name="HR Harmonic Clarity Level" array_index="30" bit="6,7" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="HR Peak Protection Strength" array_index="30" bit="8,9" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="HR Time-smoothing Factor" array_index="30" bit="10,11" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <!-- Mode Parameter 31 -->
+ <Field name="Single Mic Mode Switch" array_index="31" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="Minimum Statistics Window Length" array_index="31" bit="1,2" check_list="0,640ms,1,1280ms,2,320ms,3,160ms"/>
+ <Field name="Likelihood Ratio Test Threshold" array_index="31" bit="3,4" check_list="0,18dB,1,12dB,2,9dB,3,6dB"/>
+ <Field name="Lowband VAD THD" array_index="31" bit="5,7" check_list="0,off,1,30000,2,26000,3,22000,4,18000,5,14000,6,10000,7,6000"/>
+ <Field name="Highband VAD THD" array_index="31" bit="8,10" check_list="0,off,1,30000,2,26000,3,22000,4,18000,5,14000,6,10000,7,6000"/>
+ <Field name="Stationary Noise Tracking Speed" array_index="31" bit="11,12" check_list="0,32000(slow),1,24000,2,16000,3,8000(fast)"/>
+ <Field name="Enable Fixed Stationary Noise when NE VAD on" array_index="31" bit="13,13" check_list="0,off,1,on"/>
+ <Field name="Enable Fixed Stationary Noise when FE VAD on" array_index="31" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="Enable Dynamic MCRA Window" array_index="31" bit="15,15" check_list="0,off,1,on"/>
+
+ <!-- TX DRC -->
+ <Field name="UL Limiter TH" array_index="3" bit="2,3" check_list="0,off,1,off,2,-4.3 dBFS,3,-1.4 dBFS"/>
+ <Field name="UL IIR cut off frequency" array_index="3" bit="6,7" check_list="0,off,1,175Hz,2,228Hz,3,279Hz"/>
+ <Field name="75Hz high-pass IIR" array_index="3" bit="12,12" check_list="0,122Hz,1,75Hz"/>
+ <Field name="comfort noise" array_index="4" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="comfort noise level" array_index="10" bit="12,12" check_list="0,+0dB,1,-18dB"/>
+ <Field name="TX IIR switch" array_index="10" bit="2,2" check_list="0,off,1,on"/>
+ <Field name="TX FIR switch" array_index="10" bit="3,3" check_list="0,on,1,off"/>
+
+ <!-- Dereverb -->
+ <Field name="Dereverb" array_index="15" bit="12,12" check_list="0,on,1,off"/>
+ <!-- MagiTDNC -->
+ <Field name="TDNC switch" array_index="11" bit="0,0" check_list="0,off,1,on"/>
+
+ <!-- MagiLoudness/MagiClarity -->
+ <Field name="RX expander mode" array_index="5" bit="0,1" check_list="0,off,1,off,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="DL Limiter TH" array_index="5" bit="2,3" check_list="0,off,1,-6 dBFS,2,-4.3 dBFS,3,-1.4 dBFS"/>
+ <Field name="RMS power limiter thd" array_index="5" bit="10,11" check_list="0,off,1,-7dBFs,2,-10dBFs,3,-14dBFs"/>
+ <Field name="2.5ms delay" array_index="5" bit="12,12" check_list="0,off,1,on"/>
+ <Field name="RX HP filter cutoff freq (IIR)" array_index="8" bit="0,2" check_list="0,all-pass,1,100Hz,2,150Hz,3,200Hz,4,250Hz,5,300Hz,6,350Hz,7,400Hz"/>
+ <Field name="DL IIR cut off frequency" array_index="8" bit="0,2" check_list="0,all-pass,1,100Hz,2,150Hz,3,200Hz,4,250Hz,5,300Hz,6,350Hz,7,400Hz"/>
+ <Field name="RX IIR switch" array_index="10" bit="4,4" check_list="0,off,1,on"/>
+ <Field name="RX FIR switch" array_index="10" bit="5,5" check_list="0,off,1,on"/>
+
+ <Field name="MagiClarity switch" array_index="5" bit="13,13" check_list="0,on,1,off"/>
+ <Field name="SNR trigger threshold" array_index="6" bit="4,6" check_list="0,9dB,1,6dB,2,3dB,3,0dB,4,-3dB,5,-6dB,6,-9dB,7,-12dB"/>
+ <Field name="high frequnecy strength" array_index="6" bit="7,8" check_list="0,off,1,3dB,2,6dB,3,9dB"/>
+ <Field name="maximum gain" array_index="6" bit="9,10" check_list="0,off,1,6dB,2,12dB,3,18dB"/>
+ <Field name="noise startup threshold" array_index="6" bit="11,12" check_list="0,50dB,1,55dB,2,60dB,3,65dB"/>
+ <Field name="DL bounder threshold" array_index="6" bit="13,14" check_list="0,off,1,-6dBFS,2,-4.3dBFS,3,-1.4dBFS"/>
+ <Field name="attack time" array_index="9" bit="2,3" check_list="0,0.5s,1,1s,2,1.5s,3,2.0s"/>
+ <Field name="release time" array_index="9" bit="8,9" check_list="0,1s,1,2s,2,3s,3,4s"/>
+ </Param>
+ <Param name="sph_in_fir" type="ushort_array"/>
+ <Param name="sph_out_fir" type="ushort_array"/>
+ <Param name="sph_in_fir_eq_freq" type="double_array"/>
+ <Param name="sph_out_fir_eq_freq" type="double_array"/>
+ <Param name="sph_in_fir_eq_mag" type="double_array"/>
+ <Param name="sph_out_fir_eq_mag" type="double_array"/>
+ <Param name="sph_in_iir_mic1_dsp" type="ushort_array"/>
+ <Param name="sph_in_iir_mic1_eq_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic1_eq_mag" type="double_array"/>
+
+ <Param name="sph_in_iir_mic2_dsp" type="ushort_array"/>
+ <Param name="sph_in_iir_mic2_eq_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic2_eq_mag" type="double_array"/>
+
+ <Param name="sph_in_iir_enh_dsp" type="ushort_array"/>
+ <Param name="sph_out_iir_enh_dsp" type="ushort_array"/>
+ <Param name="sph_in_iir_enh_eq_freq" type="double_array"/>
+ <Param name="sph_out_iir_enh_eq_freq" type="double_array"/>
+ <Param name="sph_in_iir_enh_eq_mag" type="double_array"/>
+ <Param name="sph_out_iir_enh_eq_mag" type="double_array"/>
+ <Param name="sph_in_parameter" type="double_array"/>
+ <Param name="sph_out_parameter" type="double_array"/>
+ <Param name="sph_in_iir_enh_pmv_gain" type="double_array"/>
+ <Param name="sph_out_iir_enh_pmv_gain" type="double_array"/>
+ <Param name="sph_in_iir_enh_pmv_freq" type="double_array"/>
+ <Param name="sph_out_iir_enh_pmv_freq" type="double_array"/>
+ <Param name="sph_in_iir_enh_pmv_type" type="ushort_array"/>
+ <Param name="sph_out_iir_enh_pmv_type" type="ushort_array"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" type="double_array"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" type="double_array"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" type="double_array"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" type="double_array"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic1_pmv_type" type="ushort_array"/>
+ <Param name="sph_in_iir_mic2_pmv_type" type="ushort_array"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" type="double_array"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" type="double_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMapUL_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMapUL_AudioParam.xml
new file mode 100644
index 0000000..2867fb8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMapUL_AudioParam.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="RCV" param_id="0"/>
+ <Param path="HS" param_id="0"/>
+ <Param path="HP" param_id="0"/>
+ <Param path="SPK_INT" param_id="0"/>
+ <Param path="SPK_LO" param_id="0"/>
+ <Param path="SPK_HP" param_id="0"/>
+ <Param path="SPK_NO_ANA" param_id="0"/>
+ <Param path="HSSPK" param_id="0"/>
+ <Param path="HS5POLE" param_id="0"/>
+ <Param path="HS5POLE_ANC" param_id="0"/>
+ <Param path="HAC" param_id="0"/>
+ <Param path="BT" param_id="0"/>
+ <Param path="TTY" param_id="0"/>
+ <Param path="USB" param_id="1"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,-7,-7,-8,-8,-9"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <Param name="swagc_gain_map" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMapUL_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMapUL_ParamUnitDesc.xml
new file mode 100644
index 0000000..372e009
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMapUL_ParamUnitDesc.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Profile">
+ <Category name="RCV" alias="Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_VCO_Handset"/>
+ <Category name="HS" alias="Headset,3_pole_Headset,4_pole_Headset,3-pole headset,4-pole headset,Lpbk_Headset,4-pole HS,LPBK_HP"/>
+ <Category name="HP" wording="Headphone" alias="3_pole_Headset,3-pole headset"/>
+ <Category name="SPK_INT" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_INT"/>
+ <Category name="SPK_LO" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_LO"/>
+ <Category name="SPK_HP" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_HP"/>
+ <Category name="SPK_NO_ANA" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_NO_ANA"/>
+ <Category name="HSSPK" alias="Headset+Speaker"/>
+ <Category name="HS5POLE" alias="5-pole headset,5_pole_headset,5-pole HS"/>
+ <Category name="HS5POLE_ANC" alias="5_pole_headset+ANC,5-pole headset+ANC,5-pole HS+ANC"/>
+ <Category name="HAC"/>
+ <Category name="BT" alias="BT earphone,BT_Earphone,BT_NREC_Off"/>
+ <Category name="TTY" alias="Tty_HCO_Handset,Tty_HCO_Handsfree"/>
+ <Category name="USB" alias="Usb_Headset"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="mic_idx_range_max" type="int"/>
+ <Param name="mic_idx_range_min" type="int"/>
+ <Param name="swagc_gain_map" type="short_array"/>
+ <Param name="swagc_gain_map_dmic" type="short_array"/>
+ <Param name="ul_pga_gain_map" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMap_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMap_AudioParam.xml
new file mode 100644
index 0000000..3405ceb
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMap_AudioParam.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="RCV_NORMAL" param_id="0"/>
+ <Param path="RCV_2_IN_1" param_id="7"/>
+ <Param path="RCV_3_IN_1" param_id="7"/>
+ <Param path="RCV_NO_ANA" param_id="5"/>
+
+ <Param path="HS" param_id="1"/>
+
+ <Param path="SPK_INT" param_id="2"/>
+ <Param path="SPK_LO" param_id="3"/>
+ <Param path="SPK_HP" param_id="4"/>
+ <Param path="SPK_NO_ANA" param_id="5"/>
+
+ <Param path="HS5POLE" param_id="1"/>
+ <Param path="HS5POLE_ANC" param_id="1"/>
+ <Param path="HAC" param_id="0"/>
+ <Param path="BT" param_id="6"/>
+ <Param path="TTY" param_id="1"/>
+ <Param path="USB" param_id="5"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_total_gain" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32"/>
+ <Param name="dl_analog_gain" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10"/>
+ <Param name="dl_digital_gain" value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_total_gain" value="2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_analog_gain" value="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="dl_total_gain" value="17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23"/>
+ <Param name="dl_analog_gain" value="17,16,15,14,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"/>
+ <Param name="dl_digital_gain" value="0,0,0,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="2"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="dl_total_gain" value="-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41"/>
+ <Param name="dl_analog_gain" value="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="3"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="dl_total_gain" value="2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_analog_gain" value="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="dl_total_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_analog_gain" value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="6">
+ <Param name="dl_total_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64"/>
+ <Param name="dl_analog_gain" value="-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64"/>
+ <Param name="dl_total_gain_decimal" value="255,252,248,244,240,236,232,228,224,220,216,212,208,204,200,196,192,188,184,180,176,172,168,164,160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="7">
+ <Param name="dl_total_gain" value="2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_analog_gain" value="8,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6"/>
+ <Param name="dl_digital_gain" value="0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="2"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMap_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMap_ParamUnitDesc.xml
new file mode 100644
index 0000000..034fd9c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/VolumeGainMap_ParamUnitDesc.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Profile">
+ <Category name="RCV_NORMAL" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_INT"/>
+ <Category name="RCV_2_IN_1" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_2_IN_1_SPK"/>
+ <Category name="RCV_3_IN_1" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_3_IN_1_SPK"/>
+ <Category name="RCV_NO_ANA" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_NO_ANA"/>
+
+ <Category name="HS" alias="Headset,3_pole_Headset,4_pole_Headset,3-pole headset,4-pole headset,Lpbk_Headset,HP,LPBK_HP"/>
+ <Category name="SPK_INT" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_INT"/>
+ <Category name="SPK_LO" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_LO"/>
+ <Category name="SPK_HP" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_HP"/>
+ <Category name="SPK_NO_ANA" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_NO_ANA"/>
+
+ <Category name="HSSPK" alias="Headset+Speaker"/>
+ <Category name="HS5POLE" alias="5-pole headset,5_pole_headset"/>
+ <Category name="HS5POLE_ANC" alias="5_pole_headset+ANC,5-pole headset+ANC"/>
+ <Category name="HAC"/>
+ <Category name="BT" alias="BT earphone"/>
+ <Category name="TTY" alias="Tty_VCO_Handset,Tty_VCO_Handsfree"/>
+ <Category name="USB" alias="USB Headset,Usb_Headset"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_total_gain" type="short_array"/>
+ <Param name="dl_digital_gain" type="short_array"/>
+ <Param name="dl_analog_gain" type="short_array"/>
+ <Param name="dl_total_gain_decimal" type="short_array"/>
+ <Param name="dl_analog_type" type="int"/><!-- the corresponding analog type for dl_analog_gain -->
+ <!--<Param name="dl_analog_gain_2" type="short_array"/>-->
+ <!--<Param name="dl_analog_type_2" type="short"/>-->
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Volume_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Volume_AudioParam.xml
new file mode 100644
index 0000000..7be4bfc
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Volume_AudioParam.xml
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="Common_SPK_INT" param_id="0"/>
+ <Param path="Common_SPK_LO" param_id="1"/>
+ <Param path="Common_SPK_HP" param_id="2"/>
+ <Param path="Common_SPK_NO_ANA" param_id="3"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="180"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Audio_Speaker_PGA_gain"/>
+ <Param name="spk_r_mixer_name" value="Audio_Speaker_PGA_gain"/>
+ <Param name="spk_analog_type" value="2"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="160"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Lineout_PGAL_GAIN"/>
+ <Param name="spk_r_mixer_name" value="Lineout_PGAR_GAIN"/>
+ <Param name="spk_analog_type" value="3"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="160"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="spk_r_mixer_name" value="Headset_PGAR_GAIN"/>
+ <Param name="spk_analog_type" value="1"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="160"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="spk_r_mixer_name" value="Headset_PGAR_GAIN"/>
+ <Param name="spk_analog_type" value="-1"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Volume_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Volume_ParamUnitDesc.xml
new file mode 100644
index 0000000..326cf24
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2731/audio_param/Volume_ParamUnitDesc.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="VolumeParam">
+ <Category name="Common_SPK_INT" alias="Common" feature_option="SPK_PATH_INT"/>
+ <Category name="Common_SPK_LO" alias="Common" feature_option="SPK_PATH_LO"/>
+ <Category name="Common_SPK_HP" alias="Common" feature_option="SPK_PATH_HP"/>
+ <Category name="Common_SPK_NO_ANA" alias="Common" feature_option="SPK_PATH_NO_ANA"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="step_per_db" type="int"/>
+ <Param name="db_per_step" type="float"/>
+ <Param name="volume_step" type="float"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" type="int"/>
+ <Param name="mic_idx_range_min" type="int"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" type="int"/>
+ <Param name="play_digi_range_min" type="int"/>
+
+ <Param name="stf_idx_range_max" type="int"/>
+ <Param name="stf_idx_range_min" type="int"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" type="int"/>
+ <Param name="dec_play_hs_step_per_db" type="int"/>
+ <Param name="dec_play_spk_max" type="int"/>
+ <Param name="dec_play_spk_step_per_db" type="int"/>
+ <Param name="dec_play_digi_max" type="int"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" type="int"/>
+
+ <Param name="dec_rec_max" type="int"/>
+ <Param name="dec_rec_step_per_db" type="int"/>
+
+ <Param name="dec_stf_max" type="int"/>
+ <Param name="dec_stf_step_per_db" type="int"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" type="int"/>
+ <Param name="audio_buffer_gain_db" type="short_array"/>
+ <Param name="audio_buffer_gain_idx" type="short_array"/>
+ <Param name="audio_buffer_gain_string" type="string"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" type="int"/>
+ <Param name="audio_buffer_l_mixer_name" type="string"/>
+ <Param name="audio_buffer_r_mixer_name" type="string"/>
+
+ <Param name="voice_buffer_gain_level" type="int"/>
+ <Param name="voice_buffer_gain_db" type="short_array"/>
+ <Param name="voice_buffer_gain_idx" type="short_array"/>
+ <Param name="voice_buffer_gain_string" type="string"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" type="int"/>
+ <Param name="voice_buffer_mixer_name" type="string"/>
+
+ <Param name="lineout_buffer_gain_level" type="int"/>
+ <Param name="lineout_buffer_gain_db" type="short_array"/>
+ <Param name="lineout_buffer_gain_idx" type="short_array"/>
+ <Param name="lineout_buffer_gain_string" type="string"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" type="int"/>
+
+ <Param name="spk_gain_level" type="int"/>
+ <Param name="spk_gain_db" type="short_array"/>
+ <Param name="spk_gain_idx" type="short_array"/>
+ <Param name="spk_gain_string" type="string"/>
+
+ <Param name="spk_l_mixer_name" type="string"/>
+ <Param name="spk_r_mixer_name" type="string"/>
+ <Param name="spk_analog_type" type="int"/>
+
+ <Param name="swagc_gain_map" type="short_array"/>
+ <Param name="swagc_gain_map_dmic" type="short_array"/>
+ <Param name="ul_pga_gain_map" type="short_array"/>
+ <Param name="ul_pga_gain_string" type="string"/>
+ <Param name="ul_gain_offset" type="int"/>
+ <Param name="ul_pga_gain_map_max" type="int"/>
+ <Param name="ul_hw_pga_max_idx" type="int"/>
+ <Param name="ul_pga_l_mixer_name" type="string"/>
+ <Param name="ul_pga_r_mixer_name" type="string"/>
+
+ <Param name="stf_gain_map" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/AudioParamOptions.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/AudioParamOptions.xml
new file mode 100644
index 0000000..28f6f90
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/AudioParamOptions.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParamOptions>
+ <Param name="MTK_WB_SPEECH_SUPPORT" value="yes" />
+ <Param name="MTK_AUDIO_HD_REC_SUPPORT" value="yes" />
+ <Param name="MTK_DUAL_MIC_SUPPORT" value="yes" />
+ <Param name="MTK_HANDSFREE_DMNR_SUPPORT" value="yes" />
+ <Param name="DMNR_TUNNING_AT_MODEMSIDE" value="" />
+ <Param name="MTK_VOIP_ENHANCEMENT_SUPPORT" value="yes" />
+ <Param name="MTK_TB_WIFI_3G_MODE" value="" />
+ <Param name="MTK_DISABLE_EARPIECE" value="" />
+ <Param name="MTK_ASR_SUPPORT" value="no" />
+ <Param name="MTK_VOIP_NORMAL_DMNR" value="no" />
+ <Param name="MTK_VOIP_HANDSFREE_DMNR" value="no" />
+ <Param name="MTK_INCALL_NORMAL_DMNR" value="yes" />
+ <Param name="MTK_VOICE_UNLOCK_SUPPORT" value="" />
+ <Param name="MTK_VOICE_UI_SUPPORT" value="" />
+ <Param name="MTK_ACF_AUTO_GEN_SUPPORT" value="" />
+ <Param name="MTK_SPEAKER_MONITOR_SUPPORT" value="" />
+ <Param name="MTK_AUDIO_BLOUD_CUSTOMPARAMETER_REV" value="MTK_AUDIO_BLOUD_CUSTOMPARAMETER_V5" />
+ <Param name="MTK_MAGICONFERENCE_SUPPORT" value="no" />
+ <Param name="MTK_HAC_SUPPORT" value="no" />
+ <Param name="MTK_AUDIO_SPH_LPBK_PARAM" value="" />
+ <Param name="MTK_AUDIO_GAIN_TABLE_BT" value="" />
+ <Param name="MTK_AUDIO_BT_NREC_WO_ENH_MODE" value="" />
+ <Param name="MTK_AUDIO_TUNING_TOOL_V2_PHASE" value="2" />
+ <Param name="MATV_AUDIO_SUPPORT" value="" />
+ <Param name="MTK_FM_SUPPORT" value="yes" />
+ <Param name="MTK_HEADSET_ACTIVE_NOISE_CANCELLATION" value="" />
+ <Param name="MTK_SUPPORT_TC1_TUNNING" value="" />
+ <Param name="MTK_AUDIO_SPEAKER_PATH" value="smartpa_richtek_rt5509" />
+ <Param name="MTK_AUDIO_NUMBER_OF_MIC" value="2" />
+ <Param name="MTK_PLATFORM" value="MT6765" />
+ <Param name="MTK_AURISYS_FRAMEWORK_SUPPORT" value="yes" />
+ <Param name="MTK_BESLOUDNESS_RUN_WITH_HAL" value="no" />
+ <Param name="VIR_WIFI_ONLY_SUPPORT" value="no" />
+ <Param name="VIR_3G_DATA_ONLY_SUPPORT" value="no" />
+ <Param name="VIR_ASR_SUPPORT" value="no" />
+ <Param name="VIR_VOIP_NORMAL_DMNR_SUPPORT" value="no" />
+ <Param name="VIR_VOIP_HANDSFREE_DMNR_SUPPORT" value="no" />
+ <Param name="VIR_NO_SPEECH" value="no" />
+ <Param name="VIR_INCALL_NORMAL_DMNR_SUPPORT" value="yes" />
+ <Param name="VIR_INCALL_HANDSFREE_DMNR_SUPPORT" value="no" />
+ <Param name="VIR_VOICE_UNLOCK_SUPPORT" value="" />
+ <Param name="VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V5" value="yes" />
+ <Param name="VIR_AUDIO_BLOUD_CUSTOMPARAMETER_V4" value="no" />
+ <Param name="VIR_MAGI_CONFERENCE_SUPPORT" value="no" />
+ <Param name="MTK_AUDIO_HIERARCHICAL_PARAM_SUPPORT" value="yes" />
+ <Param name="MTK_AUDIO_TUNING_TOOL_V2_PHASE" value="2" />
+ <Param name="VIR_MTK_RECORD_IIR_ENH_SUPPORT" value="yes" />
+ <Param name="VIR_MTK_VOIP_IIR_ENH_SUPPORT" value="yes" />
+ <Param name="VIR_MTK_VOIP_IIR_MIC_SUPPORT" value="yes" />
+ <Param name="VIR_VOIP_RECORD_AUDIODSP_SUPPORT" value="no" />
+ <Param name="SPH_PARAM_VERSION" value="2.0" />
+ <Param name="CUST_XML_DIR" value="/data/vendor/audiohal/audio_param/" />
+ <Param name="5_POLE_HS_SUPPORT" value="" />
+ <Param name="MTK_USB_PHONECALL" value="yes" />
+ <Param name="SPK_PATH_LO" value="yes" />
+ <Param name="RCV_PATH_INT" value="yes" />
+ <Param name="SPH_PARAM_TTY" value="yes" />
+ <Param name="FIX_WB_ENH" value="yes" />
+ <Param name="MTK_IIR_ENH_SUPPORT" value="yes" />
+ <Param name="MTK_IIR_MIC_SUPPORT" value="no" />
+ <Param name="MTK_FIR_IIR_ENH_SUPPORT" value="no" />
+ <Param name="SPH_PARAM_SV" value="no" />
+ <Param name="VIR_SCENE_CUSTOMIZATION_SUPPORT" value="no" />
+</AudioParamOptions>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDMNR_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDMNR_AudioParam.xml
new file mode 100644
index 0000000..44bee52
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDMNR_AudioParam.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="1"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dmnr_para" value="0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44,0x0,0x0,0x0"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dmnr_para" value="0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x44,0x0,0x0,0x0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDMNR_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDMNR_ParamUnitDesc.xml
new file mode 100644
index 0000000..c445e95
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDMNR_ParamUnitDesc.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="Handset" alias="Normal,HAC"/>
+ <Category name="MagiConference" wording="2-mic NR"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dmnr_para" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDeReverb_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDeReverb_AudioParam.xml
new file mode 100644
index 0000000..53deed2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDeReverb_AudioParam.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam version="1.2">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="WB,Handsfree" param_id="0"/>
+ <Param path="SWB,Handsfree" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="derev_para" value="32767, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDeReverb_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDeReverb_ParamUnitDesc.xml
new file mode 100644
index 0000000..f074725
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechDeReverb_ParamUnitDesc.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.2">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="WB" wording="Wide Band" alias="NB"/>
+ <Category name="SWB" wording="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="Handsfree" wording="Hands-free" alias="TBOX_Handsfree"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="derev_para" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechEchoRef_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechEchoRef_AudioParam.xml
new file mode 100644
index 0000000..a561bf6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechEchoRef_AudioParam.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="USBAudio" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="EchoRef_para" value="0x1,0x100,0x8"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechEchoRef_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechEchoRef_ParamUnitDesc.xml
new file mode 100644
index 0000000..4952c0e
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechEchoRef_ParamUnitDesc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Device" wording="Device">
+ <Category name="USBAudio" wording="USBAudio"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="EchoRef_para" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechGeneral_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechGeneral_AudioParam.xml
new file mode 100644
index 0000000..4f545e7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechGeneral_AudioParam.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_common_para" value="0x6,0xDABD,0x7918,0x2A00,0x8001,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="debug_info" value="0x3,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechGeneral_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechGeneral_ParamUnitDesc.xml
new file mode 100644
index 0000000..9e1d7a9
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechGeneral_ParamUnitDesc.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="CategoryLayer" wording="CategoryLayer">
+ <Category name="" wording="Common" alias="Common"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_common_para" type="ushort_array">
+ <Field name="Loud speaker mode Pre-Clipping threshold" array_index="3" bit="0,2" check_list="0,8960,1,10752,2,12902,3,15483,4,18579,5,22295,6,26754,7,32767"/>
+ </Param>
+ <Param name="debug_info" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechMagiClarity_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechMagiClarity_AudioParam.xml
new file mode 100644
index 0000000..5b64763
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechMagiClarity_AudioParam.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="Common" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="shape_rx_fir_para" value="0xFF73,0x01C3,0x01DC,0x0240,0x026E,0x022B,0x0156,0xFFE5,0xFDEB,0xFB89,0xF8E6,0xF60E,0xF2C3,0xEDFB,0xE38B,0xAE09,0x51F7,0x1C75,0x1205,0x0D3D,0x09F2,0x071A,0x0477,0x0215,0x001B,0xFEAA,0xFDD5,0xFD92,0xFDC0,0xFE24,0xFE3D,0x008D"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechMagiClarity_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechMagiClarity_ParamUnitDesc.xml
new file mode 100644
index 0000000..9b2530a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechMagiClarity_ParamUnitDesc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="CategoryLayer" wording="CategoryLayer">
+ <Category name="Common" wording="Common"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="shape_rx_fir_para" type="ushort_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechNetwork_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechNetwork_AudioParam.xml
new file mode 100644
index 0000000..3f99bcf
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechNetwork_AudioParam.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="GSM" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_network_support" value="0xfff"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechNetwork_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechNetwork_ParamUnitDesc.xml
new file mode 100644
index 0000000..22da7c4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechNetwork_ParamUnitDesc.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Network">
+ <Category name="GSM" />
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_network_support" type="ushort_array"/>
+ </ParamUnit>
+
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechUI_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechUI_AudioParam.xml
new file mode 100644
index 0000000..8c7bbe3
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechUI_AudioParam.xml
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam version="1.2">
+ <ParamTree>
+ <Param path="Handsfree,GSM" param_id="2"/>
+ <Param path="TBOX_Handsfree,GSM" param_id="2"/>
+ <Param path="BT_Earphone,GSM" param_id="3"/>
+ <Param path="BT_NREC_Off,GSM" param_id="3"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <!-- DL TASTE on, UL cal. on, UL derev. on -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="1"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="1"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="1"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+
+ <ParamUnit param_id="1">
+ <!-- DL TASTE on, UL cal. off, UL derev. on -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="1"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="1"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+
+ <ParamUnit param_id="2">
+ <!-- DL TASTE off, UL cal. off, UL derev. on -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="0"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="1"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+
+ <ParamUnit param_id="3">
+ <!-- DL TASTE off, UL cal. off, UL derev. off -->
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="1"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="0"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="1"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ <Param name="UL derev. visibility" value="0"/>
+ <Param name="UL DMNR mode_param visibility" value="0"/>
+ <Param name="UL DMNR common_param visibility" value="0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechUI_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechUI_ParamUnitDesc.xml
new file mode 100644
index 0000000..810a395
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechUI_ParamUnitDesc.xml
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc tab_name="Voice" version="1.2">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ <Category name="SWB" wording="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <CategoryGroup name="Hands-free">
+ <Category name="Handsfree" wording="Hands-free"/>
+ <Category name="TBOX_Handsfree" wording="T-BOX Hands-free"/>
+ </CategoryGroup>
+ <CategoryGroup name="BT Device" wording="Bluetooth">
+ <Category name="BT_Earphone" wording="BT_NREC_On"/>
+ <Category name="BT_NREC_Off"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="VolIndex" wording="Volume">
+ <CategoryGroup name="Index">
+ <Category name="0" wording="Level0"/>
+ <Category name="1" wording="Level1"/>
+ <Category name="2" wording="Level2"/>
+ <Category name="3" wording="Level3"/>
+ <Category name="4" wording="Level4"/>
+ <Category name="5" wording="Level5"/>
+ <Category name="6" wording="Level6"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="Network">
+ <Category name="GSM"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="DL FIR visibility" type="int"/>
+ <Param name="DL DRC+DG visibility" type="int"/>
+ <Param name="DL NR visibility" type="int"/>
+ <Param name="DL Digital Gain visibility" type="int"/>
+ <Param name="DL Limiter TH visibility" type="int"/>
+ <Param name="DL TASTE visibility" type="int"/>
+ <Param name="UL FIR visibility" type="int"/>
+ <Param name="UL DRC+DG visibility" type="int"/>
+ <Param name="UL NREC visibility" type="int"/>
+ <Param name="UL cal. visibility" type="int"/>
+ <Param name="UL Digital Gain visibility" type="int"/>
+ <Param name="UL Limiter TH visibility" type="int"/>
+ <Param name="UL AEC visibility" type="int"/>
+ <Param name="UL NLP visibility" type="int"/>
+ <Param name="UL ES LB visibility" type="int"/>
+ <Param name="UL AES LB visibility" type="int"/>
+ <Param name="UL derev. visibility" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVolUI_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVolUI_AudioParam.xml
new file mode 100644
index 0000000..a5ec559
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVolUI_AudioParam.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="BT" param_id="0"/>
+
+ <Param path="RCV" param_id="3"/>
+ <Param path="HS" param_id="3"/>
+ <Param path="HP" param_id="3"/>
+ <Param path="SPK" param_id="3"/>
+ <Param path="HS5POLE" param_id="3"/>
+ <Param path="HS5POLE_ANC" param_id="3"/>
+
+ <Param path="HAC" param_id="6"/>
+ <Param path="TTY" param_id="4"/>
+ <Param path="USB" param_id="5"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_gain_visibility" value="0"/>
+ <Param name="ul_gain_visibility" value="-1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="-1"/>
+ <Param name="stf_gain_visibility" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="dl_gain_visibility" value="0"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="6">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="-1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVolUI_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVolUI_ParamUnitDesc.xml
new file mode 100644
index 0000000..7edfc5a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVolUI_ParamUnitDesc.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" alias="Narrow Band"/>
+ <Category name="WB" alias="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="RCV" alias="Normal,Handset,Lpbk_Handset,Handset_SV"/>
+ <Category name="HAC"/>
+ <Category name="HS" alias="Headset,4_pole_Headset,Lpbk_Headset"/>
+ <Category name="HP" alias="3_pole_Headset"/>
+ <Category name="SPK" alias="Hands-free,1-mic NR,2-mic NR,Handsfree,MagiConference,Lpbk_Handsfree,Handsfree_SV,TBOX_Handsfree"/>
+ <Category name="HS5POLE" alias="5_pole_Headset,5-pole headset"/>
+ <Category name="HS5POLE_ANC" alias="5_pole_Headset+ANC"/>
+ <Category name="BT" alias="BT_Earphone,BT_NREC_Off"/>
+ <Category name="TTY" alias="Tty_HCO_Handset,Tty_VCO_Handset,Tty_HCO_Handsfree,Tty_VCO_Handsfree"/>
+ <Category name="USB" alias="Usb_Headset"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_gain_visibility" type="int"/>
+ <Param name="ul_gain_visibility" type="int"/>
+ <Param name="stf_gain_visibility" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVol_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVol_AudioParam.xml
new file mode 100644
index 0000000..94163ff
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVol_AudioParam.xml
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="NB,LPBK_RCV,GSM" param_id="0"/>
+ <Param path="NB,LPBK_HP,GSM" param_id="2"/>
+ <Param path="NB,LPBK_SPK,GSM" param_id="3"/>
+
+ <Param path="WB,LPBK_RCV,GSM" param_id="0"/>
+ <Param path="WB,LPBK_HP,GSM" param_id="2"/>
+ <Param path="WB,LPBK_SPK,GSM" param_id="3"/>
+
+ <Param path="SWB,LPBK_RCV,GSM" param_id="0"/>
+ <Param path="SWB,LPBK_HP,GSM" param_id="2"/>
+ <Param path="SWB,LPBK_SPK,GSM" param_id="3"/>
+
+ <Param path="NB,RCV,GSM" param_id="0"/>
+ <Param path="NB,HAC,GSM" param_id="1"/>
+ <Param path="NB,HS,GSM" param_id="2"/>
+ <Param path="NB,HP,GSM" param_id="2"/>
+ <Param path="NB,SPK,GSM" param_id="3"/>
+ <Param path="NB,SPK_TBOX,GSM" param_id="3"/>
+
+ <Param path="WB,RCV,GSM" param_id="0"/>
+ <Param path="WB,HAC,GSM" param_id="1"/>
+ <Param path="WB,HS,GSM" param_id="2"/>
+ <Param path="WB,HP,GSM" param_id="2"/>
+ <Param path="WB,SPK,GSM" param_id="3"/>
+ <Param path="WB,SPK_TBOX,GSM" param_id="3"/>
+
+ <Param path="SWB,RCV,GSM" param_id="0"/>
+ <Param path="SWB,HAC,GSM" param_id="1"/>
+ <Param path="SWB,HS,GSM" param_id="2"/>
+ <Param path="SWB,HP,GSM" param_id="2"/>
+ <Param path="SWB,SPK,GSM" param_id="3"/>
+ <Param path="SWB,SPK_TBOX,GSM" param_id="3"/>
+
+ <Param path="NB,HS5POLE,GSM" param_id="4"/>
+ <Param path="WB,HS5POLE,GSM" param_id="4"/>
+ <Param path="SWB,HS5POLE,GSM" param_id="4"/>
+ <Param path="NB,HS5POLE_ANC,GSM" param_id="4"/>
+ <Param path="WB,HS5POLE_ANC,GSM" param_id="4"/>
+ <Param path="SWB,HS5POLE_ANC,GSM" param_id="4"/>
+
+ <Param path="NB,TTY,GSM" param_id="5"/>
+ <Param path="WB,TTY,GSM" param_id="5"/>
+ <Param path="SWB,TTY,GSM" param_id="5"/>
+
+ <Param path="NB,USB,GSM" param_id="2"/>
+ <Param path="WB,USB,GSM" param_id="2"/>
+ <Param path="SWB,USB,GSM" param_id="2"/>
+
+ <Param path="NB,RCV_SV,GSM" param_id="0"/>
+ <Param path="WB,RCV_SV,GSM" param_id="0"/>
+ <Param path="SWB,RCV_SV,GSM" param_id="0"/>
+
+ <Param path="NB,SPK_SV,GSM" param_id="3"/>
+ <Param path="WB,SPK_SV,GSM" param_id="3"/>
+ <Param path="SWB,SPK_SV,GSM" param_id="3"/>
+
+ <Param path="NB,LPBK_RCV,WCDMA" param_id="0"/>
+ <Param path="NB,LPBK_HP,WCDMA" param_id="2"/>
+ <Param path="NB,LPBK_SPK,WCDMA" param_id="3"/>
+
+ <Param path="WB,LPBK_RCV,WCDMA" param_id="0"/>
+ <Param path="WB,LPBK_HP,WCDMA" param_id="2"/>
+ <Param path="WB,LPBK_SPK,WCDMA" param_id="3"/>
+
+ <Param path="SWB,LPBK_RCV,WCDMA" param_id="0"/>
+ <Param path="SWB,LPBK_HP,WCDMA" param_id="2"/>
+ <Param path="SWB,LPBK_SPK,WCDMA" param_id="3"/>
+
+ <Param path="NB,RCV,WCDMA" param_id="0"/>
+ <Param path="NB,HAC,WCDMA" param_id="1"/>
+ <Param path="NB,HS,WCDMA" param_id="2"/>
+ <Param path="NB,HP,WCDMA" param_id="2"/>
+ <Param path="NB,SPK,WCDMA" param_id="3"/>
+ <Param path="NB,SPK_TBOX,WCDMA" param_id="3"/>
+
+ <Param path="WB,RCV,WCDMA" param_id="0"/>
+ <Param path="WB,HAC,WCDMA" param_id="1"/>
+ <Param path="WB,HS,WCDMA" param_id="2"/>
+ <Param path="WB,HP,WCDMA" param_id="2"/>
+ <Param path="WB,SPK,WCDMA" param_id="3"/>
+ <Param path="WB,SPK_TBOX,WCDMA" param_id="3"/>
+
+ <Param path="SWB,RCV,WCDMA" param_id="0"/>
+ <Param path="SWB,HAC,WCDMA" param_id="1"/>
+ <Param path="SWB,HS,WCDMA" param_id="2"/>
+ <Param path="SWB,HP,WCDMA" param_id="2"/>
+ <Param path="SWB,SPK,WCDMA" param_id="3"/>
+ <Param path="SWB,SPK_TBOX,WCDMA" param_id="3"/>
+
+ <Param path="NB,HS5POLE,WCDMA" param_id="4"/>
+ <Param path="WB,HS5POLE,WCDMA" param_id="4"/>
+ <Param path="SWB,HS5POLE,WCDMA" param_id="4"/>
+ <Param path="NB,HS5POLE_ANC,WCDMA" param_id="4"/>
+ <Param path="WB,HS5POLE_ANC,WCDMA" param_id="4"/>
+ <Param path="SWB,HS5POLE_ANC,WCDMA" param_id="4"/>
+
+ <Param path="NB,TTY,WCDMA" param_id="5"/>
+ <Param path="WB,TTY,WCDMA" param_id="5"/>
+ <Param path="SWB,TTY,WCDMA" param_id="5"/>
+
+ <Param path="NB,USB,WCDMA" param_id="2"/>
+ <Param path="WB,USB,WCDMA" param_id="2"/>
+ <Param path="SWB,USB,WCDMA" param_id="2"/>
+
+ <Param path="NB,RCV_SV,WCDMA" param_id="0"/>
+ <Param path="WB,RCV_SV,WCDMA" param_id="0"/>
+ <Param path="SWB,RCV_SV,WCDMA" param_id="0"/>
+
+ <Param path="NB,SPK_SV,WCDMA" param_id="3"/>
+ <Param path="WB,SPK_SV,WCDMA" param_id="3"/>
+ <Param path="SWB,SPK_SV,WCDMA" param_id="3"/>
+
+ <Param path="NB,LPBK_RCV,VoLTE" param_id="0"/>
+ <Param path="NB,LPBK_HP,VoLTE" param_id="2"/>
+ <Param path="NB,LPBK_SPK,VoLTE" param_id="3"/>
+
+ <Param path="WB,LPBK_RCV,VoLTE" param_id="0"/>
+ <Param path="WB,LPBK_HP,VoLTE" param_id="2"/>
+ <Param path="WB,LPBK_SPK,VoLTE" param_id="3"/>
+
+ <Param path="SWB,LPBK_RCV,VoLTE" param_id="0"/>
+ <Param path="SWB,LPBK_HP,VoLTE" param_id="2"/>
+ <Param path="SWB,LPBK_SPK,VoLTE" param_id="3"/>
+
+ <Param path="NB,RCV,VoLTE" param_id="0"/>
+ <Param path="NB,HAC,VoLTE" param_id="1"/>
+ <Param path="NB,HS,VoLTE" param_id="2"/>
+ <Param path="NB,HP,VoLTE" param_id="2"/>
+ <Param path="NB,SPK,VoLTE" param_id="3"/>
+ <Param path="NB,SPK_TBOX,VoLTE" param_id="3"/>
+
+ <Param path="WB,RCV,VoLTE" param_id="0"/>
+ <Param path="WB,HAC,VoLTE" param_id="1"/>
+ <Param path="WB,HS,VoLTE" param_id="2"/>
+ <Param path="WB,HP,VoLTE" param_id="2"/>
+ <Param path="WB,SPK,VoLTE" param_id="3"/>
+ <Param path="WB,SPK_TBOX,VoLTE" param_id="3"/>
+
+ <Param path="SWB,RCV,VoLTE" param_id="0"/>
+ <Param path="SWB,HAC,VoLTE" param_id="1"/>
+ <Param path="SWB,HS,VoLTE" param_id="2"/>
+ <Param path="SWB,HP,VoLTE" param_id="2"/>
+ <Param path="SWB,SPK,VoLTE" param_id="3"/>
+ <Param path="SWB,SPK_TBOX,VoLTE" param_id="3"/>
+
+ <Param path="NB,HS5POLE,VoLTE" param_id="4"/>
+ <Param path="WB,HS5POLE,VoLTE" param_id="4"/>
+ <Param path="SWB,HS5POLE,VoLTE" param_id="4"/>
+ <Param path="NB,HS5POLE_ANC,VoLTE" param_id="4"/>
+ <Param path="WB,HS5POLE_ANC,VoLTE" param_id="4"/>
+ <Param path="SWB,HS5POLE_ANC,VoLTE" param_id="4"/>
+
+ <Param path="NB,TTY,VoLTE" param_id="5"/>
+ <Param path="WB,TTY,VoLTE" param_id="5"/>
+ <Param path="SWB,TTY,VoLTE" param_id="5"/>
+
+ <Param path="NB,USB,VoLTE" param_id="2"/>
+ <Param path="WB,USB,VoLTE" param_id="2"/>
+ <Param path="SWB,USB,VoLTE" param_id="2"/>
+
+ <Param path="NB,RCV_SV,VoLTE" param_id="0"/>
+ <Param path="WB,RCV_SV,VoLTE" param_id="0"/>
+ <Param path="SWB,RCV_SV,VoLTE" param_id="0"/>
+
+ <Param path="NB,SPK_SV,VoLTE" param_id="3"/>
+ <Param path="WB,SPK_SV,VoLTE" param_id="3"/>
+ <Param path="SWB,SPK_SV,VoLTE" param_id="3"/>
+
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_gain" value="22,19,16,13,10,7,4"/>
+ <Param name="ul_gain" value="23"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_gain" value="22,19,16,13,10,7,4"/>
+ <Param name="ul_gain" value="0"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="dl_gain" value="27,24,21,18,15,12,9"/>
+ <Param name="ul_gain" value="27"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="dl_gain" value="22,19,16,13,10,7,4"/>
+ <Param name="ul_gain" value="27"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="dl_gain" value="27,24,21,18,15,12,9"/>
+ <Param name="ul_gain" value="24"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="dl_gain" value="27,24,21,18,15,12,9"/>
+ <Param name="ul_gain" value="0"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVol_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVol_ParamUnitDesc.xml
new file mode 100644
index 0000000..57e566d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/SpeechVol_ParamUnitDesc.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" alias="Narrow Band"/>
+ <Category name="WB" alias="Wide Band"/>
+ <Category name="SWB" alias="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile">
+ <Category name="RCV" wording="Receiver" alias="Normal,Handset"/>
+ <Category name="RCV_SV" wording="Receiver_SV" alias="Handset_SV"/>
+ <Category name="HAC"/>
+ <Category name="HS" wording="Headset" alias="Headset,4_pole_Headset"/>
+ <Category name="HP" wording="Headphone" alias="3_pole_Headset"/>
+ <Category name="SPK" wording="Speaker" alias="Hands-free,1-mic NR,2-mic NR,Handsfree,MagiConference"/>
+ <Category name="SPK_TBOX" wording="Speaker_SV" alias="TBOX_Handsfree"/>
+ <Category name="SPK_SV" wording="Speaker_SV" alias="Handsfree_SV"/>
+ <Category name="HS5POLE" wording="Headset(5-pole)" alias="5_pole_Headset,5-pole headset"/>
+ <Category name="HS5POLE_ANC" wording="Headset(5-pole+ANC)" alias="5_pole_Headset+ANC"/>
+ <Category name="TTY" alias="Tty_HCO_Handset,Tty_VCO_Handset,Tty_HCO_Handsfree,Tty_VCO_Handsfree"/>
+ <Category name="LPBK_RCV" wording="Lpbk_Handset" alias="Lpbk_Handset"/>
+ <Category name="LPBK_HP" wording="Lpbk_Headset" alias="Lpbk_Headset"/>
+ <Category name="LPBK_SPK" wording="Lpbk_Handsfree" alias="Lpbk_Handsfree"/>
+ <Category name="USB" alias="Usb_Headset"/>
+ </CategoryType>
+ <CategoryType name="Network">
+ <Category name="GSM" alias="WCDMA,VoLTE"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_gain" type="short_array"/><!-- index, corresponding dB in another xml -->
+ <Param name="ul_gain" type="int"/><!-- unit is dB, range in other xml -->
+ <Param name="stf_gain" type="short_array">
+ <Field name="stf_gain_field" array_index="0" bit="0,15" check_list="30,20dB,28,18dB,26,16dB,24,14dB,22,12dB,20,10dB,18,8dB,16,6dB,14,4dB,12,2dB,10,0dB,8,-2dB,6,-4dB,4,-6dB,2,-8dB,0,-10dB"/>
+ </Param>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_AudioParam.xml
new file mode 100644
index 0000000..ec77c2d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_AudioParam.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.2">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="Handsfree" param_id="0"/>
+ <Param path="TBOX_Handsfree" param_id="0"/>
+ <Param path="BT_Earphone" param_id="1"/>
+ <Param path="BT_NREC_Off" param_id="2"/>
+ </ParamTree>
+
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_mode_para" value="0x8060,0xE0,0x8000,0x101F,0xE107,0x201F,0x19A,0x84,0x114,0xC5,0x25E,0x0,0x1048,0x10E9,0x3C0,0x0,0xD3DB,0x3FF,0x114D,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0xC72F,0x0,0x0,0x0,0xA00,0xEFE1,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_out_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_in_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_out_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_in_iir_mic1_dsp" value="0xE342, 0x3CA1, 0x1DDC, 0xC448, 0x1DDC, 0xE0E8, 0x3F04, 0x2000, 0xC001, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic1_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic1_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_mic2_dsp" value="0xE0B7, 0x3F42, 0x1ECC, 0xC268, 0x1ECC, 0xE1B2, 0x3E47, 0x2000, 0xC000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic2_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic2_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_out_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_in_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_out_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_out_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_parameter" value="0.0,0.0,0.0,0.0"/>
+ <Param name="sph_out_parameter" value="0.0,0.0"/>
+ <Param name="sph_in_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_out_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_out_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_out_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic2_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="speech_mode_para" value="0x0,0xFD,0x2A04,0x1F,0xD10F,0x231F,0x195,0x0,0x110,0xC5,0x425E,0x0,0xC008,0x0,0x0,0x56,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_out_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_in_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_out_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_in_iir_mic1_dsp" value="0xE342, 0x3CA1, 0x1DDC, 0xC448, 0x1DDC, 0xE0E8, 0x3F04, 0x2000, 0xC001, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic1_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic1_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_mic2_dsp" value="0xE0B7, 0x3F42, 0x1ECC, 0xC268, 0x1ECC, 0xE1B2, 0x3E47, 0x2000, 0xC000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic2_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic2_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_out_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_in_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_out_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_out_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_parameter" value="0.0,0.0,0.0,0.0"/>
+ <Param name="sph_out_parameter" value="0.0,0.0"/>
+ <Param name="sph_in_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_out_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_out_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_out_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic2_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="speech_mode_para" value="0x0,0x1DF,0x2A04,0x1F,0xD108,0x231F,0x195,0x0,0x110,0xC5,0x425E,0x0,0xC008,0x0,0x0,0x56,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_out_fir_eq_freq" value="100,500,1000,2000,3000,4000,5000,5300,6000,7500"/>
+ <Param name="sph_in_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_out_fir_eq_mag" value="1,1,4,4,5,3,2,4,8,12"/>
+ <Param name="sph_in_iir_mic1_dsp" value="0xE342, 0x3CA1, 0x1DDC, 0xC448, 0x1DDC, 0xE0E8, 0x3F04, 0x2000, 0xC001, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic1_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic1_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_mic2_dsp" value="0xE0B7, 0x3F42, 0x1ECC, 0xC268, 0x1ECC, 0xE1B2, 0x3E47, 0x2000, 0xC000, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000, 0x0, 0x0, 0x0, 0x0, 0x2000"/>
+ <Param name="sph_in_iir_mic2_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_mic2_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_out_iir_enh_dsp" value="0xC524,0x7A90,0x4000,0x8001,0xC090,0x7F54,0x4000,0x800A,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x3BB,0x2"/>
+ <Param name="sph_in_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_out_iir_enh_eq_freq" value="100,800,1600,2400,3200,4000"/>
+ <Param name="sph_in_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_out_iir_enh_eq_mag" value="1,2,3,4,5,6"/>
+ <Param name="sph_in_parameter" value="0.0,0.0,0.0,0.0"/>
+ <Param name="sph_out_parameter" value="0.0,0.0"/>
+ <Param name="sph_in_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_out_iir_enh_pmv_gain" value="0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_out_iir_enh_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_out_iir_enh_pmv_type" value="0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" value="0.000000,0.000000,0.000000,0.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" value="1000.000000,1000.000000,1000.000000,1000.000000"/>
+ <Param name="sph_in_iir_mic1_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic2_pmv_type" value="0x6,0x6,0x6,0x6"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" value="1.000000,1.000000,1.000000,1.000000"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_ParamTreeView.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_ParamTreeView.xml
new file mode 100644
index 0000000..13ce368
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_ParamTreeView.xml
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamTreeView version="1.0">
+ <TreeRoot name="TX_DRC+DG">
+ <Sheet/>
+
+ <Feature name="TX DRC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL Limiter TH"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL IIR cut off frequency"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="75Hz high-pass IIR"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="comfort noise"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="comfort noise level"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="TX IIR switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="TX FIR switch"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="TX Digital Gain">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL Digital Gain"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <TreeRoot name="NREC">
+ <Sheet/>
+
+ <Feature name="MagiAEC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="device Mode"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BGNT FE improvement control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="echo path change handler"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="manual clipping"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Pre-clipping/manual clipping threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ES switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ES"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="First Echo Suppression control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES improvement"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Comfort noise generator"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Minimum comfort noise value"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NLP Suppression behavior control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NLP"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="remove tone in echo ref"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BT Delay Control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="New echo suppression"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k ES smooth rate"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k ES gain lower bound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="0-2k ES estimated echo control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k ES smooth rate"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k ES gain lower bound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2-4k ES estimated echo control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k residual echo weighting for linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k residual echo weighting for non-linear part"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k ES smooth rate"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k ES gain lower bound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="4-8k ES estimated echo control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="EPC control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Normal mode DT improvement"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ref vowel detection"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="speaker nolinear model"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BT mode echo ref"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="UL delay for EC tuning (ms)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Echo estimate rate control"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="ACQUA DT score tuning"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="LSPK DT improvement"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Hard clipping"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AGC gain bypass"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AGC fast release"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="High band EC improve(6.5k~8k)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="CNG Power"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AEC use HB vad and small bias term"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Boost ref 6dB"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BGNT FE improve switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="BGNT FE stepsize weighting"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="LSPK subjective DT"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES rate fast"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Band0 NE VAD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Boost ref NB bands"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Boost ref 4k~6k"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="EC taps above 5.5K"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="AES ESR1 THD"/>
+
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="MagiTDNC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="TDNC switch"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path="NB"/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="MagiNR(TX)">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="Single Mic Mode Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Switch or Gain lowerbound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Switch or Gain (>6K) lowerbound"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS 1-mic VAD THD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Strength when VAD on"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Strength when VAD off"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Highband(4k-8k) speech protection"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Minimum Statistics Window Length"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Likelihood Ratio Test Threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Lowband VAD THD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Highband VAD THD"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Stationary Noise Tracking Speed"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Enable Fixed Stationary Noise when NE VAD on"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Enable Fixed Stationary Noise when FE VAD on"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Enable Dynamic MCRA Window"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Strong DC suppression"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Dynamic LB"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Less Gain Protection"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="NS Initial Convergence"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="VAD Stricter"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Frequency Range"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Pitch Boost Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Comb Suppression Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Harmonic Clarity Level"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Peak Protection Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Time-smoothing Factor"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Strength (Normal)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Pitch Boost Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Comb Suppression Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Excitation Generation Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Appliance Condition Threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="HR Aggressive Mode"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <TreeRoot name="RX_DRC+DG">
+ <Sheet/>
+
+ <Feature name="RX DRC">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX expander mode"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL Limiter TH"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL expander suppression gain"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="CC mode"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RMS power limiter thd"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="2.5ms delay"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="CC/VCE switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="Hard clipping"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="LPF"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX HP filter cutoff freq (IIR)"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX IIR switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX FIR switch"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="RX Digital Gain">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL Digital Gain"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ <Feature name="MagiLoudness/MagiClarity">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="MagiClarity DM/SM"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="MagiClarity switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="SNR trigger threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="high frequnecy strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="maximum gain"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="noise startup threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="DL bounder threshold"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="attack time"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="release time"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <TreeRoot name="NR">
+ <Sheet/>
+
+ <Feature name="MagiNR(RX)">
+ <FieldList>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX NR Switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX NR Strength"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX expander switch"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX expander suppression gain"/>
+ <Field audio_type="Speech" param="speech_mode_para" name="RX Comfort Noise"/>
+ </FieldList>
+ <CategoryPathList>
+ <Category path=""/>
+ </CategoryPathList>
+ </Feature>
+
+ </TreeRoot>
+ <!-- TreeRoot2 -->
+ <!-- TreeRoot3... -->
+</ParamTreeView>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_ParamUnitDesc.xml
new file mode 100644
index 0000000..87013c6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Speech_ParamUnitDesc.xml
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc tab_name="Voice" version="1.2">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ <Category name="SWB" wording="Super Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <CategoryGroup name="Hands-free">
+ <Category name="Handsfree" wording="Hands-free"/>
+ <Category name="TBOX_Handsfree" wording="T-BOX Hands-free"/>
+ </CategoryGroup>
+ <CategoryGroup name="BT Device" wording="Bluetooth">
+ <Category name="BT_Earphone" wording="BT_NREC_On"/>
+ <Category name="BT_NREC_Off"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="VolIndex" wording="Volume">
+ <CategoryGroup name="Index">
+ <Category name="0" wording="Level0"/>
+ <Category name="1" wording="Level1"/>
+ <Category name="2" wording="Level2"/>
+ <Category name="3" wording="Level3"/>
+ <Category name="4" wording="Level4"/>
+ <Category name="5" wording="Level5"/>
+ <Category name="6" wording="Level6"/>
+ </CategoryGroup>
+ </CategoryType>
+ <CategoryType name="Network">
+ <Category name="GSM"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_mode_para" type="ushort_array">
+ <!-- Gain -->
+ <Field name="DL Digital Gain" array_index="7" bit="4,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB,4,4dB,5,5dB,6,6dB,7,7dB,8,8dB,9,9dB,10,10dB,11,11dB,12,12dB,13,13dB,14,14dB,15,15dB"/>
+ <Field name="UL Digital Gain" array_index="7" bit="0,3" check_list="0,0dB,1,1dB,2,2dB,3,3dB,4,4dB,5,5dB,6,6dB,7,7dB,8,8dB,9,9dB,10,10dB,11,11dB,12,12dB,13,13dB,14,14dB,15,15dB"/>
+
+ <!-- New TX DRC -->
+ <Field name="TX Graphical_UI_DRC Switch" array_index="32" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="TX RMS_TAV_Count" array_index="32" bit="1,3" check_list="1,20,2,40,3,60,4,80,5,100"/>
+ <Field name="TX DRC-Delay" array_index="32" bit="4,5" check_list="0,0ms,1,5ms,2,10ms,3,15ms"/>
+ <Field name="TX DRC Min-Gain" array_index="32" bit="6,7" check_list="0,-6dB,1,-9dB,2,-12dB,3,-18dB"/>
+ <Field name="TX-1 Gain Attack_Rate" array_index="33" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-1 Gain Release_Rate" array_index="33" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-1 Gain Hysterisis" array_index="33" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-2 Gain Attack_Rate" array_index="34" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-2 Gain Release_Rate" array_index="34" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-2 Gain Hysterisis" array_index="34" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-3 Gain Attack_Rate" array_index="35" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-3 Gain Release_Rate" array_index="35" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-3 Gain Hysterisis" array_index="35" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-4 Gain Attack_Rate" array_index="36" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-4 Gain Release_Rate" array_index="36" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-4 Gain Hysterisis" array_index="36" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-5 Gain Attack_Rate" array_index="37" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-5 Gain Release_Rate" array_index="37" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-5 Gain Hysterisis" array_index="37" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX DSP_Compression_ratio_0" array_index="38" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_1" array_index="39" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_2" array_index="40" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_3" array_index="41" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_4" array_index="42" bit="0,7"/>
+ <Field name="TX DSP_Threshold_Y0" array_index="43" bit="0,3"/>
+ <Field name="TX DSP_Threshold_X1" array_index="44" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X2" array_index="45" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X3" array_index="46" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X4" array_index="47" bit="0,7"/>
+
+ <!-- New RX DRC -->
+ <Field name="RX Graphical_UI_DRC Switch" array_index="32" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="RX RMS_TAV_Count" array_index="32" bit="9,11" check_list="1,20,2,40,3,60,4,80,5,100"/>
+ <Field name="RX DRC-Delay" array_index="32" bit="12,13" check_list="0,0ms,1,5ms,2,10ms,3,15ms"/>
+ <Field name="RX DRC Min-Gain" array_index="32" bit="14,15" check_list="0,-6dB,1,-9dB,2,-12dB,3,-18dB"/>
+ <Field name="RX-1 Gain Attack_Rate" array_index="33" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-1 Gain Release_Rate" array_index="33" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-1 Gain Hysterisis" array_index="33" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-2 Gain Attack_Rate" array_index="34" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-2 Gain Release_Rate" array_index="34" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-2 Gain Hysterisis" array_index="34" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-3 Gain Attack_Rate" array_index="35" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-3 Gain Release_Rate" array_index="35" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-3 Gain Hysterisis" array_index="35" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-4 Gain Attack_Rate" array_index="36" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-4 Gain Release_Rate" array_index="36" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-4 Gain Hysterisis" array_index="36" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-5 Gain Attack_Rate" array_index="37" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-5 Gain Release_Rate" array_index="37" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-5 Gain Hysterisis" array_index="37" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX DSP_Compression_ratio_0" array_index="38" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_1" array_index="39" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_2" array_index="40" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_3" array_index="41" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_4" array_index="42" bit="8,15"/>
+ <Field name="RX DSP_Threshold_Y0" array_index="43" bit="4,11 "/>
+ <Field name="RX DSP_Threshold_X1" array_index="44" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X2" array_index="45" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X3" array_index="46" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X4" array_index="47" bit="8,15"/>
+
+ <!-- MagiNR(TX) -->
+ <Field name="TX NR Switch" array_index="4" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="TX NR Quick learning" array_index="4" bit="1,1" check_list="0,quick,1,slow"/>
+ <Field name="TX NR for high frequency" array_index="4" bit="8,8" check_list="0,on,1,off"/>
+ <Field name="TX NR suppression strength" array_index="8" bit="6,8" check_list="0,23dB,1,20.5dB,2,18dB,3,15.5dB,4,13dB,5,10.5dB,6,8dB,7,off"/>
+ <Field name="TX Adaptive gain control" array_index="4" bit="12,13" check_list="0,fixed 10 dB,1, fixed 0 dB,2,vary between 10 to 6dB, 3,vary between 10 to 0dB"/>
+ <Field name="TX mute 1s" array_index="10" bit="1,1" check_list="0,on,1,off"/>
+ <Field name="TX Ambient noise calibration" array_index="8" bit="12,13" check_list="0,0dB,1,3dB,2,6dB,3,9dB"/>
+ <Field name="TX Handfree Tone Detection" array_index="4" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="TX expander switch" array_index="3" bit="0,1" check_list="0,off,1,suppress echo,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="TX expander suppression gain" array_index="3" bit="4,5" check_list="0,3dB,1,9dB,2,12dB,3,15dB"/>
+ <Field name="TX NR Noise Adaption Rate" array_index="4" bit="10,11" check_list="0,722ms,1,209ms,2,62ms,3,32ms"/>
+
+ <!-- MagiNR(RX) -->
+ <Field name="RX NR Switch" array_index="4" bit="2,2" check_list="0,off,1,on"/>
+ <Field name="RX NR Strength" array_index="8" bit="9,11" check_list="0,23dB,1,20.5dB,2,18dB,3,15.5dB,4,13dB,5,10.5dB,6,8dB,7,off"/>
+ <Field name="RX expander switch" array_index="5" bit="0,1" check_list="0,off,1, off,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="RX expander suppression gain" array_index="5" bit="4,5" check_list="0,3dB,1,9dB,2,12dB,3,15dB"/>
+ <Field name="RX Comfort Noise" array_index="10" bit="13,15" check_list="0,+0dB(-83dBFS),1,+3dB,2,+6dB,3,+9dB,4,+12dB,5,+15dB,6,+18dB,7,+21dB"/>
+
+ <!-- MagiAEC -->
+ <Field name="AEC" array_index="1" bit="0,15" check_list="189,189,221,221,224,224,253,253,479,479"/>
+ <Field name="Switch" array_index="1" bit="8,8" check_list="0,on,1,off"/>
+ <Field name="device Mode" array_index="1" bit="0,0" check_list="0,Handfree Mode,1,Normal Mode"/>
+ <Field name="BGNT FE improvement control" array_index="1" bit="7,7" check_list="0,less aggressive,1,default"/>
+ <Field name="echo path change handler" array_index="1" bit="13, 13" check_list="0,on,1,off"/>
+ <Field name="manual clipping" array_index="0" bit="15, 15" check_list="0,off,1,on"/>
+ <Field name="Pre-clipping/manual clipping threshold" array_index="6" bit="0, 3" check_list="0,-15dB,1,-14dB,2,-13dB,3,-12dB,4,-11dB,5,-10dB,6,-9dB,7,-8dB,8,-7dB,9,-6dB,10,-5dB,11,-4dB,12,-3dB,13,-2dB,14,-1dB,15,0dB"/>
+ <Field name="ES switch" array_index="1" bit="1,1" check_list="0,on,1,off"/>
+ <Field name="residual echo weighting for linear part" array_index="2" bit="0,3"/>
+ <Field name="residual echo weighting for non-linear part" array_index="2" bit="4,7"/>
+ <Field name="ES" array_index="2" bit="11,14" check_list="0,no bound,1,-24.1dB,2,-18.1dB,3,-14.5dB,4,-12.0dB,5,-10.1dB,6,-8.52dB,7,-7.18dB,8,-6.02dB,9,-5.00dB,10,-4.08dB,11,-3.25dB,12,-2.50dB,13,-1.80dB,14,-1.16dB,15,-0.56dB"/>
+ <Field name="First Echo Suppression control" array_index="1" bit="10,10" check_list="0,on,1,off"/>
+ <Field name="AES switch" array_index="1" bit="14,14" check_list="0,on,1,off"/>
+ <Field name="AES improvement" array_index="12" bit="7,7" check_list="0,off,1,on"/>
+ <Field name="AES" array_index="12" bit="11,14" check_list="0,no bound,1,-24.1dB,2,-18.1dB,3,-14.5dB,4,-12.0dB,5,-10.1dB,6,-8.52dB,7,-7.18dB,8,-6.02dB,9,-5.00dB,10,-4.08dB,11,-3.25dB,12,-2.50dB,13,-1.80dB,14,-1.16dB,15,-0.56dB"/>
+ <Field name="Comfort noise generator" array_index="1" bit="5,5" check_list="0,off,1,on"/>
+ <Field name="Minimum comfort noise value" array_index="12" bit="0,4"/>
+ <Field name="NLP Suppression behavior control" array_index="1" bit="11,11" check_list="0,on,1,off"/>
+ <Field name="NLP" array_index="0" bit="0,7" check_list="0,0,64,64,96,96,128,128,192,192,255,255"/>
+ <Field name="remove tone in echo ref" array_index="12" bit="6,6" check_list="0,off,1,on"/>
+ <Field name="BT Delay Control" array_index="15" bit="0,7"/>
+ <Field name="New echo suppression" array_index="2" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="0-2k residual echo weighting for linear part" array_index="16" bit="0,2" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="0-2k residual echo weighting for non-linear part" array_index="16" bit="3,5" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="0-2k ES smooth rate" array_index="16" bit="6,7" check_list="0,0.9,1,0.6,2,0.3,3,0"/>
+ <Field name="0-2k ES gain lower bound" array_index="18" bit="0,4" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="0-2k ES estimated echo control" array_index="17" bit="10,11" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="2-4k residual echo weighting for linear part" array_index="16" bit="8,10" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="2-4k residual echo weighting for non-linear part" array_index="16" bit="11,13" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="2-4k ES smooth rate" array_index="16" bit="14,15" check_list="0,0.9,1,0.6,2,0.3,3,0"/>
+ <Field name="2-4k ES gain lower bound" array_index="18" bit="5,9" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="2-4k ES estimated echo control" array_index="17" bit="12,13" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="4-8k residual echo weighting for linear part" array_index="17" bit="0,2" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="4-8k residual echo weighting for non-linear part" array_index="17" bit="3,5" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="4-8k ES smooth rate" array_index="17" bit="6,7" check_list="0,0.9,1,0.6,2,0.3,3,0"/>
+ <Field name="4-8k ES gain lower bound" array_index="18" bit="10,14" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="4-8k ES estimated echo control" array_index="17" bit="14,15" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="EPC control" array_index="17" bit="8,9" check_list="0,EPC handler off,1,EPC ES handling,2,EPC ES handling+strict EPC EC handling,3,EPC ES handling+EPC EC handling"/>
+ <Field name="Normal mode DT improvement" array_index="18" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="ref vowel detection" array_index="1" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="speaker nolinear model" array_index="1" bit="2,3" check_list="0,default,1,high band nonlinear,2,low band nonlinear,3,default"/>
+ <Field name="BT mode echo ref" array_index="12" bit="15,15" check_list="0,off(default),1,BT mode"/>
+ <Field name="UL delay for EC tuning (ms)" array_index="15" bit="8,11"/>
+ <Field name="Echo estimate rate control" array_index="0" bit="10,11" check_list="0,favor reverb handling,1,default,2,default,3,favor subjective DT"/>
+ <Field name="ACQUA DT score tuning" array_index="0" bit="12,13" check_list="0,worst DT,1,tuning level2,2,tuning level3,3,best DT"/>
+ <Field name="LSPK DT improvement" array_index="0" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="Hard clipping" array_index="5" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="AGC gain bypass" array_index="3" bit="14,14" check_list="0,on,1,off"/>
+ <Field name="AGC fast release" array_index="3" bit="13,13" check_list="0,off,1,on"/>
+ <Field name="High band EC improve(6.5k~8k)" array_index="1" bit="4,4" check_list="0,off,1,on"/>
+ <Field name="CNG Power" array_index="12" bit="5,5" check_list="0,old,1,new"/>
+ <Field name="AEC use HB vad and small bias term" array_index="12" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="Boost ref 6dB" array_index="1" bit="6,6" check_list="0,on,1,off"/>
+ <Field name="BGNT FE improve switch" array_index="7" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="BGNT FE stepsize weighting" array_index="7" bit="13,14" check_list="0,level0,1,level1,2,level2,3,level3"/>
+ <Field name="LSPK subjective DT" array_index="0" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="AES rate fast" array_index="1" bit="12,12" check_list="0,off,1,on"/>
+ <Field name="Band0 NE VAD" array_index="1" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="Boost ref NB bands" array_index="26" bit="0,1" check_list="0,off,1,+6dB,2,+12dB,3,+12dB"/>
+ <Field name="Boost ref 4k~6k" array_index="26" bit="2,2" check_list="0,off,1,+6dB"/>
+ <Field name="EC taps above 5.5K" array_index="26" bit="3,4" check_list="0,16,1,24,2,32,3,48"/>
+ <Field name="AES ESR1 THD" array_index="26" bit="5,6" check_list="0,1500,1,3000,2,4500,3,6000"/>
+
+ <!-- MagiNR(dual) -->
+ <!-- Mode Parameter 9 -->
+ <Field name="WA expander" array_index="9" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="DMNR ASLR Gain release rate" array_index="9" bit="6,7" check_list="0,fast,1,normal,2,slow,3,very slow"/>
+ <!-- Mode Parameter 13 -->
+ <Field name="MagiNRDual switch" array_index="13" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="NS Switch or Gain lowerbound" array_index="13" bit="1,4" check_list="0,off,1,2dB,2,4dB,3,6dB,4,8dB,5,10dB,6,12dB,7,14dB,8,16dB,9,18dB,10,20dB,11,22dB,12,24dB,13,26dB,14,28dB,15,30dB"/>
+ <Field name="NS Initial Convergence" array_index="13" bit="5,5" check_list="0,off,1,on"/>
+ <Field name="NS 1-mic VAD THD (Normal)" array_index="13" bit="6,7" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="NS Noise Overestimation" array_index="13" bit="8,9" check_list="0,1.5dB,1,3dB,2,4.5dB,3,off"/>
+ <Field name="NS Strength when VAD on (Normal)" array_index="13" bit="10,11" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="NS Strength when VAD off (Normal)" array_index="13" bit="12,13" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="NS Highband(4k-8k) speech protection" array_index="13" bit="14,15" check_list="0,weak,1,medium,2,medium-strong,3,strong"/>
+ <!-- Mode Parameter 14 -->
+ <Field name="Initial Suppression when Reset" array_index="14" bit="0,0" check_list="0,off,1,100ms"/>
+ <Field name="NS Less Gain Protection" array_index="14" bit="1,3" check_list="0,off,1,weakest,2,weaker,3,weak,4,medium,5,strong,6,stronger,7,strongest"/>
+ <Field name="NS Dynamic LB" array_index="14" bit="4,5" check_list="0,off,1,800 ms,2,400 ms,3,200 ms"/>
+ <Field name="HR Strength" array_index="14" bit="6,7" check_list="0,off,1,weak,2,medium,3,strong"/>
+ <Field name="HR Pitch Boost Switch" array_index="14" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="HR Comb Suppression Switch" array_index="14" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="HR Excitation Generation Strength" array_index="14" bit="10,11" check_list="0,0(most harmonics),1,1,2,2,3,3(fewest harmonics)"/>
+ <Field name="HR Appliance Condition Threshold)" array_index="14" bit="12,14" check_list="0,300(loose),1,400,2,500,3,600,4,700,5,800,6,900,7,1000(strict)"/>
+ <Field name="HR Aggressive Mode" array_index="14" bit="15,15" check_list="0,off,1,on"/>
+ <!-- Mode Parameter 15 -->
+ <!-- Mode Parameter 26 -->
+ <Field name="NS Switch or Gain (>6K) lowerbound" array_index="26" bit="8,11" check_list="0,off,1,2dB,2,4dB,3,6dB,4,8dB,5,10dB,6,12dB,7,14dB,8,16dB,9,18dB,10,20dB,11,22dB,12,24dB,13,26dB,14,28dB,15,30dB"/>
+ <Field name="NS Strong DC suppression" array_index="26" bit="12,13" check_list="0,off,1,93.75 Hz,2,156.25 Hz,3,250 Hz"/>
+ <Field name="NS Highband(4k-8k) speech protection" array_index="26" bit="14,15" check_list="0,weak,1,medium,2,medium-strong,3,strong"/>
+ <!-- Mode Parameter 27 -->
+ <Field name="Speech Content VAD : Noise Rejection THD" array_index="27" bit="0,2" check_list="0,3250,1,3500,2,3750,3,4000,4,4250,5,4500,6,4750,7,5000"/>
+ <Field name="Speech Content VAD : Speech Acceptance THD" array_index="27" bit="3,5" check_list="0,6500,1,7000,2,7500,3,8000,4,8500,5,9000,6,9500,7,10000"/>
+ <!-- Mode Parameter 30 -->
+ <Field name="HR Frequency Range" array_index="30" bit="0,1" check_list="0,0-6K,1,0-8K,2,0-4K,3,0-2K"/>
+ <Field name="HR Pitch Boost Strength" array_index="30" bit="2,3" check_list="0,1.5dB,1,3dB,2,4.5dB,3,6dB"/>
+ <Field name="HR Comb Suppression Strength" array_index="30" bit="4,5" check_list="0,-6dB,1,-12dB,2,-18dB,3,-24dB"/>
+ <Field name="HR Harmonic Clarity Level" array_index="30" bit="6,7" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="HR Peak Protection Strength" array_index="30" bit="8,9" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <Field name="HR Time-smoothing Factor" array_index="30" bit="10,11" check_list="0,weakest,1,medium,2,strong,3,strongest"/>
+ <!-- Mode Parameter 31 -->
+ <Field name="Single Mic Mode Switch" array_index="31" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="Minimum Statistics Window Length" array_index="31" bit="1,2" check_list="0,640ms,1,1280ms,2,320ms,3,160ms"/>
+ <Field name="Likelihood Ratio Test Threshold" array_index="31" bit="3,4" check_list="0,18dB,1,12dB,2,9dB,3,6dB"/>
+ <Field name="Lowband VAD THD" array_index="31" bit="5,7" check_list="0,off,1,30000,2,26000,3,22000,4,18000,5,14000,6,10000,7,6000"/>
+ <Field name="Highband VAD THD" array_index="31" bit="8,10" check_list="0,off,1,30000,2,26000,3,22000,4,18000,5,14000,6,10000,7,6000"/>
+ <Field name="Stationary Noise Tracking Speed" array_index="31" bit="11,12" check_list="0,32000(slow),1,24000,2,16000,3,8000(fast)"/>
+ <Field name="Enable Fixed Stationary Noise when NE VAD on" array_index="31" bit="13,13" check_list="0,off,1,on"/>
+ <Field name="Enable Fixed Stationary Noise when FE VAD on" array_index="31" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="Enable Dynamic MCRA Window" array_index="31" bit="15,15" check_list="0,off,1,on"/>
+
+ <!-- TX DRC -->
+ <Field name="UL Limiter TH" array_index="3" bit="2,3" check_list="0,off,1,off,2,-4.3 dBFS,3,-1.4 dBFS"/>
+ <Field name="UL IIR cut off frequency" array_index="3" bit="6,7" check_list="0,off,1,175Hz,2,228Hz,3,279Hz"/>
+ <Field name="75Hz high-pass IIR" array_index="3" bit="12,12" check_list="0,122Hz,1,75Hz"/>
+ <Field name="comfort noise" array_index="4" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="comfort noise level" array_index="10" bit="12,12" check_list="0,+0dB,1,-18dB"/>
+ <Field name="TX IIR switch" array_index="10" bit="2,2" check_list="0,off,1,on"/>
+ <Field name="TX FIR switch" array_index="10" bit="3,3" check_list="0,on,1,off"/>
+
+ <!-- Dereverb -->
+ <Field name="Dereverb" array_index="15" bit="12,12" check_list="0,on,1,off"/>
+ <!-- MagiTDNC -->
+ <Field name="TDNC switch" array_index="11" bit="0,0" check_list="0,off,1,on"/>
+
+ <!-- MagiLoudness/MagiClarity -->
+ <Field name="RX expander mode" array_index="5" bit="0,1" check_list="0,off,1,off,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="DL Limiter TH" array_index="5" bit="2,3" check_list="0,off,1,-6 dBFS,2,-4.3 dBFS,3,-1.4 dBFS"/>
+ <Field name="RMS power limiter thd" array_index="5" bit="10,11" check_list="0,off,1,-7dBFs,2,-10dBFs,3,-14dBFs"/>
+ <Field name="2.5ms delay" array_index="5" bit="12,12" check_list="0,off,1,on"/>
+ <Field name="RX HP filter cutoff freq (IIR)" array_index="8" bit="0,2" check_list="0,all-pass,1,100Hz,2,150Hz,3,200Hz,4,250Hz,5,300Hz,6,350Hz,7,400Hz"/>
+ <Field name="DL IIR cut off frequency" array_index="8" bit="0,2" check_list="0,all-pass,1,100Hz,2,150Hz,3,200Hz,4,250Hz,5,300Hz,6,350Hz,7,400Hz"/>
+ <Field name="RX IIR switch" array_index="10" bit="4,4" check_list="0,off,1,on"/>
+ <Field name="RX FIR switch" array_index="10" bit="5,5" check_list="0,off,1,on"/>
+
+ <Field name="MagiClarity switch" array_index="5" bit="13,13" check_list="0,on,1,off"/>
+ <Field name="SNR trigger threshold" array_index="6" bit="4,6" check_list="0,9dB,1,6dB,2,3dB,3,0dB,4,-3dB,5,-6dB,6,-9dB,7,-12dB"/>
+ <Field name="high frequnecy strength" array_index="6" bit="7,8" check_list="0,off,1,3dB,2,6dB,3,9dB"/>
+ <Field name="maximum gain" array_index="6" bit="9,10" check_list="0,off,1,6dB,2,12dB,3,18dB"/>
+ <Field name="noise startup threshold" array_index="6" bit="11,12" check_list="0,50dB,1,55dB,2,60dB,3,65dB"/>
+ <Field name="DL bounder threshold" array_index="6" bit="13,14" check_list="0,off,1,-6dBFS,2,-4.3dBFS,3,-1.4dBFS"/>
+ <Field name="attack time" array_index="9" bit="2,3" check_list="0,0.5s,1,1s,2,1.5s,3,2.0s"/>
+ <Field name="release time" array_index="9" bit="8,9" check_list="0,1s,1,2s,2,3s,3,4s"/>
+ </Param>
+ <Param name="sph_in_fir" type="ushort_array"/>
+ <Param name="sph_out_fir" type="ushort_array"/>
+ <Param name="sph_in_fir_eq_freq" type="double_array"/>
+ <Param name="sph_out_fir_eq_freq" type="double_array"/>
+ <Param name="sph_in_fir_eq_mag" type="double_array"/>
+ <Param name="sph_out_fir_eq_mag" type="double_array"/>
+ <Param name="sph_in_iir_mic1_dsp" type="ushort_array"/>
+ <Param name="sph_in_iir_mic1_eq_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic1_eq_mag" type="double_array"/>
+
+ <Param name="sph_in_iir_mic2_dsp" type="ushort_array"/>
+ <Param name="sph_in_iir_mic2_eq_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic2_eq_mag" type="double_array"/>
+
+ <Param name="sph_in_iir_enh_dsp" type="ushort_array"/>
+ <Param name="sph_out_iir_enh_dsp" type="ushort_array"/>
+ <Param name="sph_in_iir_enh_eq_freq" type="double_array"/>
+ <Param name="sph_out_iir_enh_eq_freq" type="double_array"/>
+ <Param name="sph_in_iir_enh_eq_mag" type="double_array"/>
+ <Param name="sph_out_iir_enh_eq_mag" type="double_array"/>
+ <Param name="sph_in_parameter" type="double_array"/>
+ <Param name="sph_out_parameter" type="double_array"/>
+ <Param name="sph_in_iir_enh_pmv_gain" type="double_array"/>
+ <Param name="sph_out_iir_enh_pmv_gain" type="double_array"/>
+ <Param name="sph_in_iir_enh_pmv_freq" type="double_array"/>
+ <Param name="sph_out_iir_enh_pmv_freq" type="double_array"/>
+ <Param name="sph_in_iir_enh_pmv_type" type="ushort_array"/>
+ <Param name="sph_out_iir_enh_pmv_type" type="ushort_array"/>
+ <Param name="sph_in_iir_enh_pmv_qfactor" type="double_array"/>
+ <Param name="sph_out_iir_enh_pmv_qfactor" type="double_array"/>
+ <Param name="sph_in_iir_mic1_pmv_gain" type="double_array"/>
+ <Param name="sph_in_iir_mic2_pmv_gain" type="double_array"/>
+ <Param name="sph_in_iir_mic1_pmv_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic2_pmv_freq" type="double_array"/>
+ <Param name="sph_in_iir_mic1_pmv_type" type="ushort_array"/>
+ <Param name="sph_in_iir_mic2_pmv_type" type="ushort_array"/>
+ <Param name="sph_in_iir_mic1_pmv_qfactor" type="double_array"/>
+ <Param name="sph_in_iir_mic2_pmv_qfactor" type="double_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMapUL_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMapUL_AudioParam.xml
new file mode 100644
index 0000000..2867fb8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMapUL_AudioParam.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="RCV" param_id="0"/>
+ <Param path="HS" param_id="0"/>
+ <Param path="HP" param_id="0"/>
+ <Param path="SPK_INT" param_id="0"/>
+ <Param path="SPK_LO" param_id="0"/>
+ <Param path="SPK_HP" param_id="0"/>
+ <Param path="SPK_NO_ANA" param_id="0"/>
+ <Param path="HSSPK" param_id="0"/>
+ <Param path="HS5POLE" param_id="0"/>
+ <Param path="HS5POLE_ANC" param_id="0"/>
+ <Param path="HAC" param_id="0"/>
+ <Param path="BT" param_id="0"/>
+ <Param path="TTY" param_id="0"/>
+ <Param path="USB" param_id="1"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,-1,-2,-2,-3,-3,-4,-4,-5,-5,-6,-6,-7,-7,-8,-8,-9"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <Param name="swagc_gain_map" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMapUL_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMapUL_ParamUnitDesc.xml
new file mode 100644
index 0000000..372e009
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMapUL_ParamUnitDesc.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Profile">
+ <Category name="RCV" alias="Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_VCO_Handset"/>
+ <Category name="HS" alias="Headset,3_pole_Headset,4_pole_Headset,3-pole headset,4-pole headset,Lpbk_Headset,4-pole HS,LPBK_HP"/>
+ <Category name="HP" wording="Headphone" alias="3_pole_Headset,3-pole headset"/>
+ <Category name="SPK_INT" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_INT"/>
+ <Category name="SPK_LO" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_LO"/>
+ <Category name="SPK_HP" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_HP"/>
+ <Category name="SPK_NO_ANA" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_VCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_NO_ANA"/>
+ <Category name="HSSPK" alias="Headset+Speaker"/>
+ <Category name="HS5POLE" alias="5-pole headset,5_pole_headset,5-pole HS"/>
+ <Category name="HS5POLE_ANC" alias="5_pole_headset+ANC,5-pole headset+ANC,5-pole HS+ANC"/>
+ <Category name="HAC"/>
+ <Category name="BT" alias="BT earphone,BT_Earphone,BT_NREC_Off"/>
+ <Category name="TTY" alias="Tty_HCO_Handset,Tty_HCO_Handsfree"/>
+ <Category name="USB" alias="Usb_Headset"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="mic_idx_range_max" type="int"/>
+ <Param name="mic_idx_range_min" type="int"/>
+ <Param name="swagc_gain_map" type="short_array"/>
+ <Param name="swagc_gain_map_dmic" type="short_array"/>
+ <Param name="ul_pga_gain_map" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMap_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMap_AudioParam.xml
new file mode 100644
index 0000000..3405ceb
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMap_AudioParam.xml
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="RCV_NORMAL" param_id="0"/>
+ <Param path="RCV_2_IN_1" param_id="7"/>
+ <Param path="RCV_3_IN_1" param_id="7"/>
+ <Param path="RCV_NO_ANA" param_id="5"/>
+
+ <Param path="HS" param_id="1"/>
+
+ <Param path="SPK_INT" param_id="2"/>
+ <Param path="SPK_LO" param_id="3"/>
+ <Param path="SPK_HP" param_id="4"/>
+ <Param path="SPK_NO_ANA" param_id="5"/>
+
+ <Param path="HS5POLE" param_id="1"/>
+ <Param path="HS5POLE_ANC" param_id="1"/>
+ <Param path="HAC" param_id="0"/>
+ <Param path="BT" param_id="6"/>
+ <Param path="TTY" param_id="1"/>
+ <Param path="USB" param_id="5"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_total_gain" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32"/>
+ <Param name="dl_analog_gain" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10,-10"/>
+ <Param name="dl_digital_gain" value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="0"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_total_gain" value="2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_analog_gain" value="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="dl_total_gain" value="17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23"/>
+ <Param name="dl_analog_gain" value="17,16,15,14,13,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12"/>
+ <Param name="dl_digital_gain" value="0,0,0,0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="2"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="dl_total_gain" value="-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41"/>
+ <Param name="dl_analog_gain" value="-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="3"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="dl_total_gain" value="2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_analog_gain" value="2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="1"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="dl_total_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_analog_gain" value="0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="6">
+ <Param name="dl_total_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64"/>
+ <Param name="dl_analog_gain" value="-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40,-40"/>
+ <Param name="dl_digital_gain" value="0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64"/>
+ <Param name="dl_total_gain_decimal" value="255,252,248,244,240,236,232,228,224,220,216,212,208,204,200,196,192,188,184,180,176,172,168,164,160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="7">
+ <Param name="dl_total_gain" value="2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_analog_gain" value="8,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6"/>
+ <Param name="dl_digital_gain" value="0,0,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-18,-19,-20,-21,-22,-23,-24,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38"/>
+ <Param name="dl_total_gain_decimal" value="160,156,152,148,144,140,136,132,128,124,120,116,112,108,104,100,96,92,88,84,80,76,72,68,64,60,56,52,48,44,40,36,32,28,24,20,16,12,8,4,0"/>
+ <Param name="dl_analog_type" value="2"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMap_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMap_ParamUnitDesc.xml
new file mode 100644
index 0000000..034fd9c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/VolumeGainMap_ParamUnitDesc.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Profile">
+ <Category name="RCV_NORMAL" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_INT"/>
+ <Category name="RCV_2_IN_1" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_2_IN_1_SPK"/>
+ <Category name="RCV_3_IN_1" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_3_IN_1_SPK"/>
+ <Category name="RCV_NO_ANA" alias="RCV,Normal,Handset,Handset 2mic NR,Handset no 2mic NR,Lpbk_Handset,LPBK_RCV,Handset_SV,RCV_SV,Tty_HCO_Handset" feature_option="RCV_PATH_NO_ANA"/>
+
+ <Category name="HS" alias="Headset,3_pole_Headset,4_pole_Headset,3-pole headset,4-pole headset,Lpbk_Headset,HP,LPBK_HP"/>
+ <Category name="SPK_INT" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_INT"/>
+ <Category name="SPK_LO" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_LO"/>
+ <Category name="SPK_HP" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_HP"/>
+ <Category name="SPK_NO_ANA" alias="SPK,Hands-free,Hands-free 1mic NR,Hands-free no 1mic NR,Handsfree,MagiConference,Speaker,Lpbk_Handsfree,LPBK_SPK,Handsfree_SV,SPK_SV,Tty_HCO_Handsfree,SPK_TBOX,TBOX_Handsfree" feature_option="SPK_PATH_NO_ANA"/>
+
+ <Category name="HSSPK" alias="Headset+Speaker"/>
+ <Category name="HS5POLE" alias="5-pole headset,5_pole_headset"/>
+ <Category name="HS5POLE_ANC" alias="5_pole_headset+ANC,5-pole headset+ANC"/>
+ <Category name="HAC"/>
+ <Category name="BT" alias="BT earphone"/>
+ <Category name="TTY" alias="Tty_VCO_Handset,Tty_VCO_Handsfree"/>
+ <Category name="USB" alias="USB Headset,Usb_Headset"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_total_gain" type="short_array"/>
+ <Param name="dl_digital_gain" type="short_array"/>
+ <Param name="dl_analog_gain" type="short_array"/>
+ <Param name="dl_total_gain_decimal" type="short_array"/>
+ <Param name="dl_analog_type" type="int"/><!-- the corresponding analog type for dl_analog_gain -->
+ <!--<Param name="dl_analog_gain_2" type="short_array"/>-->
+ <!--<Param name="dl_analog_type_2" type="short"/>-->
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Volume_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Volume_AudioParam.xml
new file mode 100644
index 0000000..7be4bfc
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Volume_AudioParam.xml
@@ -0,0 +1,287 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AudioParam>
+ <ParamTree>
+ <Param path="Common_SPK_INT" param_id="0"/>
+ <Param path="Common_SPK_LO" param_id="1"/>
+ <Param path="Common_SPK_HP" param_id="2"/>
+ <Param path="Common_SPK_NO_ANA" param_id="3"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="180"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Audio_Speaker_PGA_gain"/>
+ <Param name="spk_r_mixer_name" value="Audio_Speaker_PGA_gain"/>
+ <Param name="spk_analog_type" value="2"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="160"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Lineout_PGAL_GAIN"/>
+ <Param name="spk_r_mixer_name" value="Lineout_PGAR_GAIN"/>
+ <Param name="spk_analog_type" value="3"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="160"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="spk_r_mixer_name" value="Headset_PGAR_GAIN"/>
+ <Param name="spk_analog_type" value="1"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.25"/>
+ <Param name="volume_step" value="255"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="160"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" value="20"/>
+ <Param name="audio_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="audio_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="audio_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="audio_buffer_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="audio_buffer_r_mixer_name" value="Headset_PGAR_GAIN"/>
+
+ <Param name="voice_buffer_gain_level" value="20"/>
+ <Param name="voice_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="voice_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="voice_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="voice_buffer_mixer_name" value="Handset_PGA_GAIN"/>
+
+ <Param name="lineout_buffer_gain_level" value="20"/>
+ <Param name="lineout_buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="lineout_buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="lineout_buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" value="18"/>
+
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+
+ <Param name="spk_l_mixer_name" value="Headset_PGAL_GAIN"/>
+ <Param name="spk_r_mixer_name" value="Headset_PGAR_GAIN"/>
+ <Param name="spk_analog_type" value="-1"/>
+
+ <Param name="swagc_gain_map" value="25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,16,15,14,13,12,11,10,9,8,7,6,5,4"/>
+ <Param name="swagc_gain_map_dmic" value="28,27,26,25,24,23,22,21,20,19,18,17,16,15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0"/>
+ <Param name="ul_pga_gain_map" value="6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,30,30,30,30,30,30,30,30,30,30,30,30,30"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="ul_pga_l_mixer_name" value="Audio_PGA1_Setting"/>
+ <Param name="ul_pga_r_mixer_name" value="Audio_PGA2_Setting"/>
+
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Volume_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Volume_ParamUnitDesc.xml
new file mode 100644
index 0000000..326cf24
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/mt2735/audio_param/Volume_ParamUnitDesc.xml
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="VolumeParam">
+ <Category name="Common_SPK_INT" alias="Common" feature_option="SPK_PATH_INT"/>
+ <Category name="Common_SPK_LO" alias="Common" feature_option="SPK_PATH_LO"/>
+ <Category name="Common_SPK_HP" alias="Common" feature_option="SPK_PATH_HP"/>
+ <Category name="Common_SPK_NO_ANA" alias="Common" feature_option="SPK_PATH_NO_ANA"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="step_per_db" type="int"/>
+ <Param name="db_per_step" type="float"/>
+ <Param name="volume_step" type="float"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" type="int"/>
+ <Param name="mic_idx_range_min" type="int"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" type="int"/>
+ <Param name="play_digi_range_min" type="int"/>
+
+ <Param name="stf_idx_range_max" type="int"/>
+ <Param name="stf_idx_range_min" type="int"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" type="int"/>
+ <Param name="dec_play_hs_step_per_db" type="int"/>
+ <Param name="dec_play_spk_max" type="int"/>
+ <Param name="dec_play_spk_step_per_db" type="int"/>
+ <Param name="dec_play_digi_max" type="int"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" type="int"/>
+
+ <Param name="dec_rec_max" type="int"/>
+ <Param name="dec_rec_step_per_db" type="int"/>
+
+ <Param name="dec_stf_max" type="int"/>
+ <Param name="dec_stf_step_per_db" type="int"/>
+ <!-- spec -->
+ <Param name="audio_buffer_gain_level" type="int"/>
+ <Param name="audio_buffer_gain_db" type="short_array"/>
+ <Param name="audio_buffer_gain_idx" type="short_array"/>
+ <Param name="audio_buffer_gain_string" type="string"/>
+ <Param name="audio_buffer_gain_prefer_max_idx" type="int"/>
+ <Param name="audio_buffer_l_mixer_name" type="string"/>
+ <Param name="audio_buffer_r_mixer_name" type="string"/>
+
+ <Param name="voice_buffer_gain_level" type="int"/>
+ <Param name="voice_buffer_gain_db" type="short_array"/>
+ <Param name="voice_buffer_gain_idx" type="short_array"/>
+ <Param name="voice_buffer_gain_string" type="string"/>
+ <Param name="voice_buffer_gain_prefer_max_idx" type="int"/>
+ <Param name="voice_buffer_mixer_name" type="string"/>
+
+ <Param name="lineout_buffer_gain_level" type="int"/>
+ <Param name="lineout_buffer_gain_db" type="short_array"/>
+ <Param name="lineout_buffer_gain_idx" type="short_array"/>
+ <Param name="lineout_buffer_gain_string" type="string"/>
+ <Param name="lineout_buffer_gain_prefer_max_idx" type="int"/>
+
+ <Param name="spk_gain_level" type="int"/>
+ <Param name="spk_gain_db" type="short_array"/>
+ <Param name="spk_gain_idx" type="short_array"/>
+ <Param name="spk_gain_string" type="string"/>
+
+ <Param name="spk_l_mixer_name" type="string"/>
+ <Param name="spk_r_mixer_name" type="string"/>
+ <Param name="spk_analog_type" type="int"/>
+
+ <Param name="swagc_gain_map" type="short_array"/>
+ <Param name="swagc_gain_map_dmic" type="short_array"/>
+ <Param name="ul_pga_gain_map" type="short_array"/>
+ <Param name="ul_pga_gain_string" type="string"/>
+ <Param name="ul_gain_offset" type="int"/>
+ <Param name="ul_pga_gain_map_max" type="int"/>
+ <Param name="ul_hw_pga_max_idx" type="int"/>
+ <Param name="ul_pga_l_mixer_name" type="string"/>
+ <Param name="ul_pga_r_mixer_name" type="string"/>
+
+ <Param name="stf_gain_map" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/hex2dec_convertor.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/hex2dec_convertor.c
new file mode 100644
index 0000000..ca2b816
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/hex2dec_convertor.c
@@ -0,0 +1,75 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement convert hex XML to dec format tool
+ */
+
+#include "AudioParamParser.h"
+#include "AudioParamParserPriv.h"
+
+#include <stdio.h>
+#include <string.h>
+
+static const char *INPUT_HEX_DIR[] = {
+ ".\\hex_xml\\",
+ NULL
+};
+#define OUTPUT_DEC_DIR ".\\dec_xml"
+
+int main() {
+ size_t num, i;
+ AppHandle *appHandle = NULL;
+ AppHandle Handle;
+
+ /* Set the debug level, default is INFO_LEVEL */
+ appSetDebugLevel(INFO_LEVEL);
+
+ /* For Tuning Tool debug usage, used to show the APP lib message to the console */
+ appHandleRedirectIOToConsole();
+
+ /* Init app handle */
+ appHandleInit(&Handle);
+ appHandle = &Handle;
+
+ /* Save XML with Dec mode */
+ appHandle->saveXmlWithHexMode = 0;
+
+ /* Parse the xml in default and cus folder,
+ if cus folder has the same name of XML file,
+ parser will load the cus folder xml instead of default xml folder */
+ appHandleParseXml(appHandle, INPUT_HEX_DIR, NULL);
+
+ /* Save all Xml */
+ num = appHandleGetNumOfAudioType(appHandle);
+ i = 0;
+
+ for (i = 0; i < num; i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Save changed AudioType to XML */
+ audioTypeSaveAudioParamXml(audioType, OUTPUT_DEC_DIR, 1);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ }
+
+ /* Release appHandle resources */
+ appHandleUninit(appHandle);
+
+ return 0;
+}
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/main.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/main.c
new file mode 100644
index 0000000..0d48c82
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/main.c
@@ -0,0 +1,1348 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * AudioParamParser standalone test program
+ */
+
+#include "AudioParamParser.h"
+#include "AudioParamParserPriv.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#define BUF_SIZE 1024
+
+void showFieldValueOfParam(Param *param) {
+ // Enum all field value
+ size_t i;
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(param->paramUnit->audioType, param->name);
+ unsigned int val;
+ size_t numOfFieldInfo;
+
+ printf("\t---------------------\n");
+ numOfFieldInfo = paramInfoGetNumOfFieldInfo(paramInfo);
+ for (i = 0; i < numOfFieldInfo; i++) {
+
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByIndex(paramInfo, i);
+ if (paramGetFieldVal(param, fieldInfo, &val) == APP_ERROR) {
+ printf("Cannot get field value. (param name=%s, field name=%s)\n", param->name, fieldInfo->name);
+ continue;
+ }
+
+ printf("\tfield["APP_SIZE_T_FT"] name = %s, value = 0x%u.\n", i, fieldInfo->name, val);
+ }
+}
+
+void showFieldInfo(FieldInfo *fieldInfo) {
+ if (!fieldInfo) {
+ return;
+ }
+
+ printf("FieldInfo name = %s, array_index = "APP_SIZE_T_FT", bit[%d,%d], check_list = %s\n", fieldInfo->name, fieldInfo->arrayIndex, fieldInfo->startBit, fieldInfo->endBit, fieldInfo->checkListStr);
+}
+
+void showParamInfo(ParamInfo *paramInfo) {
+ size_t i;
+ size_t numOfFieldInfo = paramInfoGetNumOfFieldInfo(paramInfo);
+
+ printf("ParamInfo name = %s, type = %s\n", paramInfo->name, paramDataTypeToStr(paramInfo->dataType));
+ for (i = 0; i < numOfFieldInfo; i++) {
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByIndex(paramInfo, i);
+ if (fieldInfo) {
+ printf("\t["APP_SIZE_T_FT"] ", i);
+ showFieldInfo(fieldInfo);
+ }
+ }
+}
+
+#if 0
+void showCategoryTypeList(AudioType *audioType) {
+ xmlNode *categoryTypeListNode, *categoryTypeNode, *categoryNode, *subCategoryNode;
+
+ printf("\n====Dump \"%s\" AudioType CategoryList Info====\n", audioType->name);
+ categoryTypeListNode = audioTypeGetCategoryTypeListNode(audioType);
+ if (!categoryTypeListNode) {
+ printf("No category type list node!\n");
+ return;
+ }
+
+ categoryTypeNode = categoryTypeListNode->children;
+
+ while ((categoryTypeNode = findXmlNodeByElemName(categoryTypeNode->next, ELEM_CATEGORY_TYPE))) {
+ printf("CategoryType, wording = %s, name = %s\n", xmlNodeGetWording(categoryTypeNode), xmlNodeGetProp(categoryTypeNode, ATTRI_NAME));
+
+ categoryNode = categoryTypeNode->children;
+ for (categoryNode = categoryTypeNode->children; categoryNode; categoryNode = categoryNode->next) {
+ if (!strncmp((char *)categoryNode->name, ELEM_CATEGORY, strlen(ELEM_CATEGORY) + 1)) {
+ // Show Category
+ printf("\t%s wording = %s (name = %s)\n", categoryNode->name, xmlNodeGetWording(categoryNode), xmlNodeGetProp(categoryNode, ATTRI_NAME));
+ } else if (!strncmp((char *)categoryNode->name, ELEM_CATEGORY_GROUP, strlen(ELEM_CATEGORY_GROUP) + 1)) {
+ // Show CategoryGroup
+ printf("\t%s wording = %s (name = %s)\n", categoryNode->name, xmlNodeGetWording(categoryNode), xmlNodeGetProp(categoryNode, ATTRI_NAME));
+
+ // Show Category's sub category
+ for (subCategoryNode = categoryNode->children; subCategoryNode; subCategoryNode = subCategoryNode->next) {
+ if (!strncmp((char *)subCategoryNode->name, ELEM_CATEGORY, strlen(ELEM_CATEGORY) + 1)) {
+ printf("\t\t%s wording = %s (name = %s)\n", subCategoryNode->name, xmlNodeGetWording(subCategoryNode), xmlNodeGetProp(subCategoryNode, ATTRI_NAME));
+ }
+ }
+ }
+ }
+ }
+}
+#else
+void showCategoryTypeList(AudioType *audioType) {
+ size_t i, j, k;
+ size_t numOfCategory;
+ size_t numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+
+ printf("\n====%s AudioType's Category====\n\n", audioType->name);
+ for (i = 0; i < numOfCategoryType; i++) {
+ CategoryType *categoryType = audioTypeGetCategoryTypeByIndex(audioType, i);
+
+ /* Show CategoryGroup part */
+ size_t numOfCategoryGroup = categoryTypeGetNumOfCategoryGroup(categoryType);
+ printf("CategoryType["APP_SIZE_T_FT"] name = %s wording = %s %s\n", i, categoryType->name, categoryType->wording, categoryType->visible ? "" : "visible = 0");
+ for (j = 0; j < numOfCategoryGroup; j++) {
+ /* Show CategoryGroup's category */
+ CategoryGroup *categoryGroup = categoryTypeGetCategoryGroupByIndex(categoryType, j);
+ size_t numOfCategory = categoryGroupGetNumOfCategory(categoryGroup);
+ printf("\tCategoryGroup["APP_SIZE_T_FT"] name = %s wording = %s %s\n", j, categoryGroup->name, categoryGroup->wording, categoryGroup->visible ? "" : "visible = 0");
+ for (k = 0; k < numOfCategory; k++) {
+ Category *category = categoryGroupGetCategoryByIndex(categoryGroup, k);
+ printf("\t\tCategory["APP_SIZE_T_FT"] name = %s wording = %s %s\n", k , category->name, category->wording, category->visible ? "" : "visible = 0");
+ }
+ }
+
+ /* Show CategoryType's category */
+ numOfCategory = categoryTypeGetNumOfCategory(categoryType);
+ for (k = 0; k < numOfCategory; k++) {
+ Category *category = categoryTypeGetCategoryByIndex(categoryType, k);
+ printf("\tCategory["APP_SIZE_T_FT"] name = %s wording = %s %s\n", k , category->name, category->wording, category->visible ? "" : "visible = 0");
+ }
+ }
+}
+#endif
+
+void showParamFieldInfo(AudioType *audioType) {
+ int i;
+ int numOfParamInfo;
+ ParamInfo *paramInfo;
+
+ /* Enum all param & it's field information */
+ numOfParamInfo = audioTypeGetNumOfParamInfo(audioType);
+ printf("\n====%s AudioType's param field info====\n\n", audioType->name);
+ for (i = 0; i < numOfParamInfo; i++) {
+ paramInfo = audioTypeGetParamInfoByIndex(audioType, i);
+ printf("[%d] ", i);
+ showParamInfo(paramInfo);
+ }
+}
+
+void showParamTreeViewInfo(AudioType *audioType) {
+ printf("\n====%s AudioType's param tree view info====\n\n", audioType->name);
+ if (!audioType->paramTreeView) {
+ printf("No definition!\n");
+ return;
+ }
+
+ printf("ParamTreeView version(%d.%d)\n", audioType->paramTreeView->verMaj, audioType->paramTreeView->verMin);
+ if (audioType->paramTreeView->treeRootHash) {
+ TreeRoot *treeRoot;
+ Feature *feature;
+ FeatureField *featureField;
+ CategoryPath *categoryPath;
+ size_t i = 0;
+ /* Enum all TreeRoot */
+ for (treeRoot = audioType->paramTreeView->treeRootHash; treeRoot ; treeRoot = treeRoot->hh.next) {
+
+ printf("+TreeRoot["APP_SIZE_T_FT"] name = %s\n", i++, treeRoot->name);
+ if (treeRoot->switchFieldInfo) {
+ printf(" +switch (audio_type = %s, param = %s, field = %s)\n",
+ treeRoot->switchFieldInfo ? treeRoot->switchFieldInfo->paramInfo->audioType->name : "",
+ treeRoot->switchFieldInfo ? treeRoot->switchFieldInfo->paramInfo->name : "",
+ treeRoot->switchFieldInfo ? treeRoot->switchFieldInfo->name : "");
+ } else {
+ printf(" +no switch\n");
+ }
+
+ /* Enum all Feature */
+ for (feature = treeRoot->featureHash; feature ; feature = feature->hh.next) {
+ printf(" +Feature name = %s, feature_option = %s(val = %s), switch (audio_type = %s, param = %s, field = %s)\n", feature->name,
+ feature->featureOption,
+ appHandleGetFeatureOptionValue(audioType->appHandle, feature->featureOption),
+ feature->switchFieldInfo ? feature->switchFieldInfo->paramInfo->audioType->name : "null",
+ feature->switchFieldInfo ? feature->switchFieldInfo->paramInfo->name : "null",
+ feature->switchFieldInfo ? feature->switchFieldInfo->name : "null");
+
+ /* Enum all field */
+ for (featureField = feature->featureFieldHash; featureField ; featureField = featureField->hh.next) {
+ printf(" +Field audio_type = %s, param = %s, name = %s\n",
+ featureField->fieldInfo->paramInfo->audioType->name,
+ featureField->fieldInfo->paramInfo->name,
+ featureField->fieldInfo->name);
+ }
+
+ /* Enum all category path */
+ for (categoryPath = feature->categoryPathHash; categoryPath ; categoryPath = categoryPath->hh.next) {
+ printf(" +CategoryPath path = %s\n", categoryPath->path);
+ }
+ }
+ }
+ }
+}
+
+void showParamUnit(AudioType *audioType, const char *categoryPath) {
+ int i;
+ int numOfParam;
+ Param *param;
+ ParamUnit *paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (paramUnit == NULL) {
+ printf("Cannot find ParamUnit.\n");
+ return;
+ }
+
+
+ /* Example: provide retrieve all param ways */
+ numOfParam = paramUnitGetNumOfParam(paramUnit);
+ printf("\n\n====Query all param unit's param (param unit id = %d)====\n", paramUnit->paramId);
+ for (i = 0; i < numOfParam; i++) {
+ /* Show param info */
+ param = paramUnitGetParamByIndex(paramUnit, i);
+ printf("[%d] ", i);
+ utilShowParamValue(param);
+
+ /* Show field info */
+ showFieldValueOfParam(param);
+ }
+
+ /* Example: retrieve param by name */
+ printf("\n\n====Query specific param (name = %s)====\n", "speech_mode_para");
+ param = paramUnitGetParamByName(paramUnit, "speech_mode_para");
+ if (param) {
+ utilShowParamValue(param);
+ }
+}
+
+void showAllAudioType(AppHandle *appHandle) {
+ size_t i;
+ printf("\n==== List All Audio Type ===\n\n");
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* XML Version check for AudioTuningTool */
+ if (!audioTypeIsTuningToolSupportedXmlVer(audioType)) {
+ printf("Error: %s AudioType's XML version is newer than tuning tool supported ver. (ParamUnitDesc ver (%d,%d), AudioParam ver (%d,%d))\n", audioType->name, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, audioType->audioParamVerMaj, audioType->audioParamVerMin);
+ continue;
+ }
+
+ // Tuning tool support backward compatible, need to know the XML version
+ printf("AudioType["APP_SIZE_T_FT"] : %s (tab name = %s, ParamUnitDesc ver = %d.%d, AudioParam ver = %d.%d)\n", i, audioType->name, audioType->tabName, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, audioType->audioParamVerMaj, audioType->audioParamVerMin);
+ }
+}
+
+void showAllCategoryInformation(AppHandle *appHandle) {
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Example to retrieve category info */
+ showCategoryTypeList(audioType);
+ }
+}
+
+void showAllParamFieldInformation(AppHandle *appHandle) {
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Example to retrieve ParamInfo */
+ showParamFieldInfo(audioType);
+ }
+}
+
+void showAllParamTreeInformation(AppHandle *appHandle) {
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Example to retrieve ParamInfo */
+ showParamTreeViewInfo(audioType);
+ }
+}
+
+void showFeatureOptions(AppHandle *appHandle) {
+ size_t i;
+ printf("\n===== Feature Option =====\n");
+ for (i = 0; i < appHandleGetNumOfFeatureOption(appHandle); i++) {
+ FeatureOption *featureOption = appHandleGetFeatureOptionByIndex(appHandle, i);
+ printf("["APP_SIZE_T_FT"] %s = \"%s\" (enabled = %d)\n", i, featureOption->name, featureOption->value, appHandleIsFeatureOptionEnabled(appHandle, featureOption->name));
+ }
+ printf("============================\n");
+}
+
+void processTreeRootNode(xmlNode *node, int level, TreeRoot *treeRoot, const char *categoryPath) {
+ int isFeatureNode = 0;
+
+ if (!node) {
+ return;
+ }
+
+ if (node->type == XML_ELEMENT_NODE) {
+ /* Show indent first */
+ int i = 0;
+ for (i = 0; i < level; i++) {
+ printf(" ");
+ }
+
+ /* Process each element */
+ if (!strncmp((const char *)node->name, ELEM_TREE_ROOT, strlen(ELEM_TREE_ROOT) + 1)) {
+ printf("+<TreeRoot name = %s>\n", xmlNodeGetProp(node, ATTRI_NAME));
+ } else if (!strncmp((const char *)node->name, ELEM_SHEET, strlen(ELEM_SHEET) + 1)) {
+ /* Show sheet node */
+ if (treeRoot->switchFieldInfo) {
+ unsigned int fieldVal = 0;
+ unsigned int onVal = 0;
+
+ ParamUnit *paramUnit = audioTypeGetParamUnit(treeRoot->paramTreeView->audioType, categoryPath);
+ paramUnitGetFieldVal(paramUnit, treeRoot->switchFieldInfo->paramInfo->name, treeRoot->switchFieldInfo->name, &fieldVal);
+
+ if ((fieldInfoGetCheckListValue(treeRoot->switchFieldInfo, "on", &onVal) == APP_NO_ERROR)
+ && onVal == fieldVal) {
+ printf("+<\"check\" Sheet %s>\n", categoryPath); // checkbox checked
+ } else {
+ printf("+<\"uncheck\" Sheet %s>\n", categoryPath); // checkbox unchecked
+ }
+ } else {
+ printf("+<Sheet %s>\n", categoryPath); // no checkbox
+ }
+ } else if (!strncmp((const char *)node->name, ELEM_FEATURE, strlen(ELEM_FEATURE) + 1)) {
+ /* Get Feature obj by name */
+ FeatureField *featureField;
+ int ignore = 0;
+ Feature *feature = treeRootGetFeatureByName(treeRoot, (const char *)xmlNodeGetProp(node, ATTRI_NAME));
+ isFeatureNode = 1;
+
+ /* Check feature option */
+ if (feature->featureOption && !appHandleIsFeatureOptionEnabled(treeRoot->paramTreeView->audioType->appHandle, feature->featureOption)) {
+ //printf ("Feature %s unsupport (%s is disabled)\n", feature->name, feature->featureOption);
+ ignore = 1;
+ }
+
+ /* Check category path */
+ if (!ignore && !featureIsCategoryPathSupport(feature, categoryPath)) {
+ //printf ("Feature %s unsupport (%s is not valid category path)\n", feature->name, categoryPath);
+ ignore = 1;
+ }
+
+ if (ignore == 0) {
+ ParamUnit *paramUnit = audioTypeGetParamUnit(treeRoot->paramTreeView->audioType, categoryPath);
+
+ if (feature->switchFieldInfo) {
+ unsigned int fieldVal = 0;
+ unsigned int onVal = 0;
+
+ ParamUnit *switchParamUnit = audioTypeGetParamUnit(feature->switchFieldInfo->paramInfo->audioType, categoryPath);
+ paramUnitGetFieldVal(switchParamUnit, feature->switchFieldInfo->paramInfo->name, feature->switchFieldInfo->name, &fieldVal);
+
+ if ((fieldInfoGetCheckListValue(feature->switchFieldInfo, "on", &onVal) == APP_NO_ERROR)
+ && onVal == fieldVal) {
+ printf("+<\"check\" Feature name = %s>\n", feature->name); // checkbox checked
+ } else {
+ printf("+<\"uncheck\" Feature name = %s>\n", feature->name); // checkbox unchecked
+ }
+ } else {
+ printf("+<Feature name = %s>\n", feature->name); // no checkbox
+ }
+
+ for (featureField = feature->featureFieldHash; featureField; featureField = featureField->hh.next) {
+ unsigned int fieldVal = 0;
+ paramUnitGetFieldVal(paramUnit,
+ featureField->fieldInfo->paramInfo->name,
+ featureField->fieldInfo->name,
+ &fieldVal);
+
+ printf(" <Field name = %s, val = %d, check_list=%s>\n",
+ featureField->fieldInfo->name,
+ fieldVal,
+ featureField->fieldInfo->checkListStr);
+ }
+ }
+ } else {
+ printf("+<%s>\n", node->name);
+ }
+ }
+
+ if (level && node->next) {
+ processTreeRootNode(node->next, level, treeRoot, categoryPath);
+ }
+
+ if (!isFeatureNode && node->children) {
+ processTreeRootNode(node->children, level + 1, treeRoot, categoryPath);
+ }
+}
+
+/* Notice: it's just example, the num of categoryType may be 4, 5... you have to get the category path more flexible */
+char *queryCategoryPathByWording(AppHandle *appHandle, const char *audioTypeName, const char *categoryType1Wording, const char *category1Wording, const char *categoryType2Wording, const char *categoryGroup2Wording, const char *category2Wording, const char *categoryType3Wording, const char *categoryGroup3Wording, const char *category3Wording) {
+ char *result = NULL;
+ UT_string *searchPath = NULL;
+ CategoryType *categoryType = NULL;
+ CategoryGroup *categoryGroup = NULL;
+ Category *category = NULL;
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+
+ /* If user select a category path, just like "NarrowBand / Normal of Handset / Level0" */
+ utstring_new(searchPath);
+
+ /* Query first category type name & category name */
+ if (audioType) {
+ categoryType = audioTypeGetCategoryTypeByName(audioType, categoryType1Wording);
+ }
+ if (categoryType) {
+ category = categoryTypeGetCategoryByWording(categoryType, category1Wording);
+ utstring_printf(searchPath, "%s,%s,", categoryType->name, category->name);
+ }
+
+ /* Query 2nd category type name & category name (include category group)*/
+ categoryGroup = NULL;
+ categoryGroup = NULL;
+
+ if (audioType) {
+ categoryType = audioTypeGetCategoryTypeByName(audioType, categoryType2Wording);
+ }
+ if (audioType) {
+ categoryGroup = categoryTypeGetCategoryGroupByWording(categoryType, categoryGroup2Wording);
+ }
+ if (categoryGroup) {
+ category = categoryGroupGetCategoryByWording(categoryGroup, category2Wording);
+ if (category) {
+ utstring_printf(searchPath, "%s,%s,", categoryType->name, category->name);
+ } else {
+ printf("Error: Cannot find \"%s\" category from \"%s\" category group.\n", category2Wording, categoryGroup->name);
+ utstring_free(searchPath);
+ return NULL;
+ }
+ }
+
+ /* Query 3nd category type name & category name */
+ categoryGroup = NULL;
+ categoryGroup = NULL;
+
+ if (audioType) {
+ categoryType = audioTypeGetCategoryTypeByWording(audioType, categoryType3Wording);
+ }
+ if (categoryType) {
+ categoryGroup = categoryTypeGetCategoryGroupByWording(categoryType, categoryGroup3Wording);
+ }
+ if (categoryGroup) {
+ category = categoryGroupGetCategoryByWording(categoryGroup, category3Wording);
+ utstring_printf(searchPath, "%s,%s", categoryType->name, category->name);
+ }
+
+ if (searchPath) {
+ result = strdup(utstring_body(searchPath));
+ //printf("==> The param unit search path = %s\n", result);
+ } else {
+ printf("Error: cannot get the category path\n");
+ }
+
+ utstring_free(searchPath);
+
+ return result;
+}
+
+void queryFieldValue(AppHandle *appHandle, const char *targetAudioTypeName, const char *categoryPath, const char *paramName, const char *fieldName) {
+ unsigned int fieldValue;
+ ParamUnit *paramUnit;
+
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, targetAudioTypeName);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+
+ /* Query the field value */
+ if (paramUnitGetFieldVal(paramUnit, paramName, fieldName, &fieldValue) == APP_ERROR) {
+ printf("Error: Cannot query field value successfully!!\n");
+ } else {
+ printf("Field value = 0x%x (%s/%s)\n", fieldValue, paramName, fieldName);
+ }
+}
+
+void simpleFieldQuery(AppHandle *appHandle) {
+ unsigned int fieldValue;
+ ParamUnit *paramUnit;
+ Param *param;
+ FieldInfo *fieldInfo;
+
+ const char *targetAudioTypeName = "Speech";
+ const char *targetParamName = "speech_mode_para";
+ const char *targetFieldName = "DL Digital Gain";
+
+ /* Example of category combination */
+ const char *categoryType1Wording = "Bandwidth";
+ const char *category1Wording = "Narrow Band";
+
+ const char *categoryType2Wording = "Profile";
+ const char *categoryGroup2Wording = "Handset";
+ const char *category2Wording = "Handset";
+
+ const char *categoryType3Wording = "Volume";
+ const char *categoryGroup3Wording = "Index";
+ const char *category3Wording = "Level0";
+
+ /* Query category path */
+ char *categoryPath = queryCategoryPathByWording(appHandle, targetAudioTypeName, categoryType1Wording, category1Wording, categoryType2Wording, categoryGroup2Wording, category2Wording, categoryType3Wording, categoryGroup3Wording, category3Wording);
+
+ /* Query AudioType */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, targetAudioTypeName);
+ if (!audioType) {
+ free(categoryPath);
+ return;
+ }
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit) {
+ free(categoryPath);
+ audioTypeUnlock(audioType);
+ return;
+ }
+
+ printf("\n\n==== Simple Test Query ====\n");
+ printf("AudioType/Param/Field = %s / %s / %s\n", targetAudioTypeName, targetParamName, targetFieldName);
+ printf("Category path = %s\n", categoryPath);
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, "speech_mode_para");
+ if (!param) {
+ printf("Error: Cannot query param value!\n");
+ free(categoryPath);
+ audioTypeUnlock(audioType);
+ return;
+ }
+ utilShowParamValue(param);
+
+ /* Query the field value */
+ if (paramUnitGetFieldVal(paramUnit, targetParamName, targetFieldName, &fieldValue) == APP_ERROR) {
+ printf("Error: Cannot query field value!!\n");
+ free(categoryPath);
+ audioTypeUnlock(audioType);
+ return;
+ }
+
+ /* Query the field's check list */
+ fieldInfo = paramInfoGetFieldInfoByName(param->paramInfo, targetFieldName);
+ if (fieldInfo) {
+ printf("==> Field val = %x (check_list = %s)\n", fieldValue, fieldInfo->checkListStr);
+ } else {
+ printf("Error: Cannot find the fieldInfo!\n");
+ }
+
+ free(categoryPath);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+}
+
+void simpleParamQuery(AppHandle *appHandle) {
+ /* Query category path */
+ char *audioTypeName = "Speech";
+ char *categoryPath = "Band,NB,Profile,4_pole_Headset,VolIndex,3";
+ char *paramName = "speech_mode_para";
+ ParamUnit *paramUnit;
+ Param *param;
+
+ /* Query AudioType */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType) {
+ return;
+ }
+
+ /* Read Lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit) {
+ audioTypeUnlock(audioType);
+ return;
+ }
+
+ printf("\n\n==== Simple Test Query ====\n");
+ printf("AudioType/Param/Field = %s / %s\n", audioTypeName, paramName);
+ printf("Category path = %s\n", categoryPath);
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ if (!param) {
+ printf("Error: Cannot query param value!\n");
+ audioTypeUnlock(audioType);
+ return;
+ }
+ utilShowParamValue(param);
+
+ /* Read unlock */
+ audioTypeUnlock(audioType);
+}
+
+void simpleParamUpdate(AppHandle *appHandle) {
+ unsigned short shortArray[] = {0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888, 0x9999, 0x0000};
+ int arraySize = 10;
+
+ /* You should cache follow object in somewhere without query again */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(audioType, "sph_in_fir");
+
+ /* The sph_in_fir param is short array type */
+ if (audioTypeSetParamData(audioType, "Band,NB,Profile,HAC,VolIndex,3,Network,GSM", paramInfo, (void *)shortArray, arraySize) == APP_ERROR) {
+ printf("Cannot update the param data!!\n");
+ }
+}
+
+void simpleFieldUpdate(AppHandle *appHandle) {
+ unsigned int fieldVal = 0xff;
+
+ /* You should cache follow object in somewhere without query again */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(audioType, "speech_mode_para");
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByName(paramInfo, "DL Digital Gain");
+
+ /* Update the fieldInfo for specific categoryPath */
+ if (audioTypeSetFieldData(audioType, "Band,NB,Profile,HAC,VolIndex,3,Network,GSM", fieldInfo, fieldVal) == APP_ERROR) {
+ printf("Cannot update the field data!!\n");
+ }
+}
+
+void applyParamUnitToCategory(AppHandle *appHandle) {
+ const char *srcCategoryPath = "Band,NB,Profile,HAC,VolIndex,3,Network,GSM";
+ const char *dstCategoryPath = "Band,NB,Profile,HAC,VolIndex,4,Network,GSM";
+
+ /* Query AudioType */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+
+ /* Apply the ParamUnit */
+ audioTypeParamUnitCopy(audioType, srcCategoryPath, dstCategoryPath);
+}
+
+void saveModifiedAudioParamXml(AppHandle *appHandle, const char *folder) {
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Read lock */
+ // audioTypeReadLock(audioType, __FUNCTION__);
+
+ if (audioType->dirty && audioTypeSaveAudioParamXml(audioType, folder, 1) == APP_ERROR) {
+ printf("Error: cannot save audio param XML to %s dir\n", folder);
+ }
+
+ /* Unlock */
+ // audioTypeUnlock(audioType);
+ }
+}
+
+void xmlChangedCallback(AppHandle *appHandle, const char *audioTypeName) {
+ printf("XML file changed. (cus folder = %s, audioType = %s)\n", appHandle->xmlCusDir, audioTypeName);
+
+ // reload XML file
+ if (appHandleReloadAudioType(appHandle, audioTypeName) == APP_ERROR) {
+ printf("Reload xml fail! (audioType = %s)\n", audioTypeName);
+ } else {
+ printf("Reload XML done. (audioType = %s)\n", audioTypeName);
+ }
+}
+
+int showDynamicTest(AppHandle *appHandle) {
+ AudioType *audioType = NULL;
+ char *categoryPath = NULL;
+ ParamUnit *paramUnit = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+ Param *param = NULL;
+ void *paramData = NULL;
+ size_t arraySize = 0;
+ char tmp[BUF_SIZE];
+ char *input;
+ unsigned int fieldValue = 0;
+
+ printf("\n\n====== Dynamic Test =====\n");
+ printf("[0] Back to main menu\n");
+ printf("[1] Get param value\n");
+ printf("[2] Set param value\n");
+ printf("[3] Get field value\n");
+ printf("[4] Set field value\n");
+ printf("[5] ParamUnit copy\n");
+ printf("[6] Save xml\n");
+ printf("[7] Show param tree view\n");
+ printf("[8] Set switchField on/off \n");
+ printf("[9] Compress files\n");
+ printf("[10] UnCompress file\n");
+ printf("[11] AudioManager.getParameters\n");
+ printf("[12] AudioManager.setParameters\n");
+ printf("[13] Get isCustXmlEnable\n");
+ printf("[14] Test appHandleCustXmlEnableChanged\n");
+ printf("[15] Query FO\n");
+ printf("==========================\n");
+ printf("Please enter the selection: ");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strncmp(input, "0", strlen("0") + 1)) {
+ return 0;
+ } else if (!strncmp(input, "1", strlen("1") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ paramUnit = audioTypeGetParamUnit(audioType, input);
+ if (paramUnit) {
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ param = paramUnitGetParamByName(paramUnit, input);
+ if (param) {
+ utilShowParamValue(param);
+ } else {
+ printf("Error: Cannot find the param!\n");
+ }
+ } else {
+ printf("Error: Cannot find the param unit!\n");
+ }
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "2", strlen("2") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo) {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ categoryPath = strdup(input);
+
+ printf("Enter param value (type:%s):", paramDataTypeToStr(paramInfo->dataType));
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (utilConvDataStringToNative(paramInfo->dataType, input, ¶mData, &arraySize) == APP_NO_ERROR) {
+ /* The sph_in_fir param is short array type */
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)paramData, arraySize) == APP_ERROR) {
+ printf("Cannot update the param data!!\n");
+ }
+ }
+
+ free(categoryPath);
+ } else {
+ printf("Error: cannot find the param!\n");
+ }
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "3", strlen("3") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ paramUnit = audioTypeGetParamUnit(audioType, input);
+ if (paramUnit) {
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo) {
+ printf("Enter field name (eg. DL Digital Gain):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (paramUnitGetFieldVal(paramUnit, paramInfo->name, input, &fieldValue) == APP_ERROR) {
+ printf("Error: Cannot query field value!\n");
+ } else {
+ printf("Field value = 0x%x\n", fieldValue);
+ }
+ } else {
+ printf("Error: Cannot find the param!\n");
+ }
+ } else {
+ printf("Error: Cannot find the param unit!\n");
+ }
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "4", strlen("4") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ categoryPath = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo) {
+ printf("Enter field name (eg. DL Digital Gain):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, input);
+ if (fieldInfo) {
+ printf("Enter field value:");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (audioTypeSetFieldData(audioType, categoryPath, fieldInfo, strtoul(input, NULL, 0)) == APP_NO_ERROR) {
+ printf("Set field value = 0x%lu\n", strtoul(input, NULL, 0));
+ } else {
+ printf("Error: Cannot set field value!\n");
+ }
+ } else {
+ printf("Error: Cannot find the field!\n");
+ }
+ } else {
+ printf("Error: Cannot find the param!\n");
+ }
+
+ free(categoryPath);
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "5", strlen("5") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ char *src = NULL;
+ printf("Enter src category path (eg. Band,NB,Profile,HAC,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ src = strdup(input);
+
+ printf("Enter dst category path (eg. Band,NB,Profile,HAC,VolIndex,4,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (audioTypeParamUnitCopy(audioType, src, input)) {
+ printf("ParamUnit copied\n");
+ } else {
+ printf("Error: Cannot copy paramUnit!\n");
+ }
+
+ free(src);
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "6", strlen("6") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+
+#ifdef WIN32
+ printf("Enter folder to save XML (eg. .\\cus):");
+#else
+ printf("Enter folder to save XML (eg. /sdcard/.audio_param/):");
+#endif
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Read lock */
+ // audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Save changed AudioType to XML */
+ audioTypeSaveAudioParamXml(audioType, input, 1);
+
+ /* Unlock */
+ // audioTypeUnlock(audioType);
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "7", strlen("7") + 1)) {
+ char *treeRootName;
+ AudioType *audioType;
+
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ TreeRoot *treeRoot;
+ printf("Enter tree root name (eg. NREC):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ treeRootName = strdup(input);
+ treeRoot = audioTypeGetTreeRoot(audioType, treeRootName);
+ if (treeRoot) {
+ printf("Enter category path (eg. Band,NB,Profile,HAC,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Show tree root */
+ processTreeRootNode(treeRoot->treeRootNode, 0, treeRoot, input);
+ } else {
+ printf("Error: Cannot find the %s tree root!\n", treeRootName);
+ }
+ free(treeRootName);
+ } else {
+ printf("Error: Cannot find %s audio type!\n", input);
+ }
+ } else if (!strncmp(input, "8", strlen("8") + 1)) {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType) {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ categoryPath = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo) {
+ FieldInfo *switchFieldInfo;
+ printf("Enter field name (eg. switch):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ switchFieldInfo = paramInfoGetFieldInfoByName(paramInfo, input);
+
+ /* For parameter tree, you can get the fieldInfo by treeRoot->switchFieldInfo & feature-> switchFieldInfo*/
+ if (switchFieldInfo) {
+ printf("Enter switch on/off (1/0):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strncmp(input, "1", strlen("1") + 1)) {
+ /* Get the check list on's value */
+ unsigned int onValue;
+ if (fieldInfoGetCheckListValue(switchFieldInfo, "on", &onValue) == APP_ERROR) {
+ printf("Error: Cannot get the check list's on value! (XML should define the on's value)\n");
+ } else {
+ /* Set the field with on's value */
+ if (audioTypeSetFieldData(switchFieldInfo->paramInfo->audioType, categoryPath, switchFieldInfo, onValue) == APP_ERROR) {
+ printf("Cannot set the filed data successfully!\n");
+ } else {
+ printf("Set the field data successfully!\n");
+ }
+ }
+ } else {
+ /* Get the check list off's value */
+ unsigned int offValue;
+ if (fieldInfoGetCheckListValue(switchFieldInfo, "off", &offValue) == APP_ERROR) {
+ printf("Error: Cannot get the check list's off value! (XML should define the off's value)\n");
+ } else {
+ /* Set the field with off's value */
+ if (audioTypeSetFieldData(switchFieldInfo->paramInfo->audioType, categoryPath, switchFieldInfo, offValue) == APP_ERROR) {
+ printf("Cannot set the filed data successfully!\n");
+ } else {
+ printf("Set the field data successfully!\n");
+ }
+ }
+ }
+ } else {
+ printf("Error: Cannot find the field!\n");
+ }
+ } else {
+ printf("Error: No fieldInfo found!\n");
+ }
+
+ free(categoryPath);
+ } else {
+ printf("Error: no such audio type\n");
+ }
+ } else if (!strncmp(input, "9", strlen("9") + 1)) {
+ char *srcDir;
+ char *dstFile;
+ printf("Enter compress folder full path: ");
+ srcDir = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter target file full path: ");
+ dstFile = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ if (appHandleCompressFiles(srcDir, dstFile) == APP_ERROR) {
+ printf("File compress fail\n");
+ } else {
+ printf("File compress done\n");
+ }
+ free(srcDir);
+ free(dstFile);
+ } else if (!strncmp(input, "10", strlen("10") + 1)) {
+ char *srcFile;
+ char *dstDir;
+ printf("Enter src file full path: ");
+ srcFile = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter target dir full path: ");
+ dstDir = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ if (appHandleUncompressFile(srcFile, dstDir) == APP_ERROR) {
+ printf("File uncompress fail\n");
+ } else {
+ printf("File uncompress done\n");
+ }
+ free(srcFile);
+ free(dstDir);
+ } else if (!strncmp(input, "11", strlen("11") + 1)) {
+#ifndef WIN32
+ char tmp[BUF_SIZE];
+ char *input, *res;
+ printf("Please enter the parameter name: (ex: GET_CUST_XML_ENABLE)\n");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ res = audioSystemGetParameters(input);
+ printf("return: %s\n", res);
+ free(res);
+#else
+ printf("Not support this test on win32\n");
+#endif
+ } else if (!strncmp(input, "12", strlen("12") + 1)) {
+#ifndef WIN32
+ char tmp[BUF_SIZE];
+ char *input;
+ printf("Please enter the parameter name: (ex: SET_CUST_XML_ENABLE=1)\n");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ audioSystemSetParameters(input);
+#else
+ printf("Not support this test on win32\n");
+#endif
+ } else if (!strncmp(input, "13", strlen("13") + 1)) {
+#ifndef WIN32
+ printf("isCustXmlEnable() = %d\n", isCustXmlEnable());
+#else
+ printf("Not support this test on win32\n");
+#endif
+ } else if (!strncmp(input, "14", strlen("14") + 1)) {
+ char tmp[BUF_SIZE];
+ char *input;
+ int enabled = 0;
+ printf("Please enter the appHandleCustXmlEnableChanged enable or disable: (0: disable, 1: enable)\n");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ enabled = atoi(input);
+
+ appHandleCustXmlEnableChanged(appHandleGetInstance(), enabled);
+ } else if (!strcmp(input, "15")) {
+ char *foName;
+ const char *foValue;
+ printf("Enter FO name: ");
+ foName = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ foValue = appHandleGetFeatureOptionValue(appHandle, foName);
+ printf("FO value = %s\n", foValue ? foValue : "NULL");
+
+ free(foName);
+ }
+
+ return 1;
+}
+
+void testAppLibAPIs() {
+ AppHandle *appHandle = appHandleGetInstance();
+ int oldDebugLevel = appGetDebugLevel();
+#if defined(SYS_IMPL)
+ /* Change level to debug */
+ appSetDebugLevel(DEBUG_LEVEL);
+
+ printf("Testing FO query...\n");
+
+ /* Normal FO query test */
+ const char *foVal = appHandleGetFeatureOptionValue(appHandle, "MTK_DUAL_MIC_SUPPORT");
+ int foEnabled = appHandleIsFeatureOptionEnabled(appHandle, "MTK_DUAL_MIC_SUPPORT");
+
+ /* FO cache test, try to query same FO twice */
+ const char *foVal2 = appHandleGetFeatureOptionValue(appHandle, "MTK_DUAL_MIC_SUPPORT");
+ int foEnabled2 = appHandleIsFeatureOptionEnabled(appHandle, "MTK_DUAL_MIC_SUPPORT");
+
+ /* Fake FO query test */
+ const char *foVal3 = appHandleGetFeatureOptionValue(appHandle, "MTK_FAKE_FO");
+ int foEnabled3 = appHandleIsFeatureOptionEnabled(appHandle, "MTK_FAKE_FO");
+
+ printf("MTK_DUAL_MIC_SUPPORT= %s (%d)\n", foVal, foEnabled);
+ printf("Cached MTK_DUAL_MIC_SUPPORT= %s (%d)\n", foVal2, foEnabled2);
+ printf("MTK_FAKE_FO= %s (%d)\n", foVal3, foEnabled3);
+#else
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(audioType, "speech_mode_para");
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByName(paramInfo, "AEC");
+
+ /* Change level to debug */
+ appSetDebugLevel(DEBUG_LEVEL);
+
+ /* Set AEC field */
+ audioTypeSetFieldData(audioType, "Band,NB,Profile,Normal,VolIndex,3,Network,GSM", fieldInfo, 0xbd);
+
+ /* Copy ParamUnit src = dst */
+ audioTypeParamUnitCopy(audioType, "Band,NB,Profile,Normal,VolIndex,3,Network,GSM", "Band,NB,Profile,Normal,VolIndex,3,Network,GSM");
+
+ /* Copy ParamUnit src != dst */
+ audioTypeParamUnitCopy(audioType, "Band,NB,Profile,Normal,VolIndex,3,Network,GSM", "Band,NB,Profile,HAC,VolIndex,3,Network,GSM");
+
+ /* Show ParamUnit */
+ showParamUnit(audioType, "Band,NB,Profile,HAC,VolIndex,3,Network,GSM");
+
+ /* Query param */
+ simpleParamQuery(appHandle);
+
+ /* Retrieve specific audio type's param & field information */
+ simpleFieldQuery(appHandle);
+
+ /* Query non-exist ParamUnit, it shouldn't crash */
+ audioTypeGetParamUnit(audioType, "aaa,bbb");
+
+ /* Update param value */
+ simpleParamUpdate(appHandle);
+
+ /* Update field value */
+ simpleFieldUpdate(appHandle);
+
+ /* Apply param to other category */
+ applyParamUnitToCategory(appHandle);
+
+#ifndef WIN32
+ /* Save changed AudioType to XML */
+ saveModifiedAudioParamXml(appHandle, XML_CUS_FOLDER_ON_DEVICE);
+#else
+ /* Save changed AudioType to XML */
+ saveModifiedAudioParamXml(appHandle, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#endif // WIN32
+#endif // SYS_IMPL
+ appSetDebugLevel(oldDebugLevel);
+}
+
+void testUtilNativeAPIs() {
+ APP_STATUS status;
+ unsigned int fieldResult = 0;
+ const char* checkList;
+ char *strResult;
+
+ printf("Testing utilNative APIs...\n");
+
+ /* Get category string */
+ strResult = utilNativeGetCategory("Speech", "Band");
+ printf("Category result = %s\n", strResult);
+#ifndef WIN32
+ free(strResult);
+#else
+ printf("Cannot free the memory allocated by APP on WIN32, just for testing\n");
+#endif
+
+ /* Set param */
+ status = utilNativeSetParam("SpeechGeneral", "CategoryLayer,Common", "speech_common_para", "0x1,0xDABD,0x7918,0x2A00,0x8001,0x0,0x0,0x0,0x0,0x0,0x0,0x0");
+ if (status == APP_ERROR) {
+ printf("utilNativeSetParam fail!\n");
+ exit(1);
+ }
+
+ /* Get param */
+ strResult = utilNativeGetParam("SpeechGeneral", "CategoryLayer,Common", "speech_common_para");
+ printf("Param = %s\n", strResult);
+#ifndef WIN32
+ free(strResult);
+#else
+ printf("Cannot free the memory allocated by APP on WIN32, just for testing\n");
+#endif
+
+ /* Set field */
+ status = utilNativeSetField("Speech", "Band,NB,Profile,Normal", "speech_mode_para", "AEC", "252");
+ if (status == APP_ERROR) {
+ printf("utilNativeSetField fail!\n");
+ exit(1);
+ }
+
+ /* Get field */
+ fieldResult = utilNativeGetField("Speech", "Band,NB,Profile,Normal", "speech_mode_para", "AEC");
+ printf("Field = 0x%x\n", fieldResult);
+
+ /* Get check list */
+ checkList = utilNativeGetChecklist("Speech", "speech_mode_para", "AEC");
+ printf("Check list = %s\n", checkList);
+
+ /* Save parameter */
+ status = utilNativeSaveXml("Speech");
+ if (status == APP_ERROR) {
+ printf("utilNativeSaveXml fail!\n");
+ exit(1);
+ }
+}
+
+int showXmlInfo(AppHandle *appHandle) {
+ char tmp[BUF_SIZE];
+ char *input;
+
+ printf("\n\n====== Show XML Information =====\n");
+ printf("[0] Back to main menu\n");
+ printf("[1] Show all audio type info\n");
+ printf("[2] Show all category info\n");
+ printf("[3] Show all param/field info\n");
+ printf("[4] Show all param tree view info\n");
+ printf("[5] Show feature options\n");
+ printf("==========================\n");
+ printf("Please enter the selection: ");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strncmp(input, "0", strlen("0") + 1)) {
+ return 0;
+ } else if (!strncmp(input, "1", strlen("1") + 1)) {
+ showAllAudioType(appHandle);
+ } else if (!strncmp(input, "2", strlen("2") + 1)) {
+ showAllCategoryInformation(appHandle);
+ } else if (!strncmp(input, "3", strlen("3") + 1)) {
+ showAllParamFieldInformation(appHandle);
+ } else if (!strncmp(input, "4", strlen("4") + 1)) {
+ showAllParamTreeInformation(appHandle);
+ } else if (!strncmp(input, "5", strlen("5") + 1)) {
+ showFeatureOptions(appHandle);
+ }
+ return 1;
+}
+
+int showMainMenu(AppHandle *appHandle) {
+ char tmp[BUF_SIZE];
+ char *input;
+ printf("\n\n======= Main Menu =======\n");
+ printf("[0] Exit\n");
+ printf("[1] Unit test\n");
+ printf("[2] Show XML information (AudioType/Category/ParamInfo/FieldInfo)\n");
+ printf("[3] Test formal Speech audio type xml. (Fixed test pattern)\n");
+ printf("[4] File changed callback test (only support on android version)\n");
+ printf("[5] Dynamic operation test\n");
+ printf("[6] Set debug level\n");
+ printf("[7] Show log to console\n");
+ printf("[8] Show app lib build timestamp\n");
+ printf("==========================\n");
+ printf("Please enter the selection: ");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strncmp(input, "0", strlen("0") + 1)) {
+ return 0;
+ } else if (!strncmp(input, "1", strlen("1") + 1)) {
+ /* APP Parser internal unit test */
+ if (unitTest(appHandle) == APP_ERROR) {
+ printf("Unit test failure!\n");
+ } else {
+ printf("Unit test pass!\n");
+ }
+ } else if (!strncmp(input, "2", strlen("2") + 1)) {
+ while (1) {
+ if (showXmlInfo(appHandle) == 0) {
+ break;
+ }
+ }
+ } else if (!strncmp(input, "3", strlen("3") + 1)) {
+ /* Test 1 */
+ testAppLibAPIs();
+
+ printf("Press enter to continuous next test:");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Test 2 */
+ testUtilNativeAPIs();
+ } else if (!strncmp(input, "4", strlen("4") + 1)) {
+#ifndef WIN32
+ /* XML changed callback process example for audio driver */
+ appHandleRegXmlChangedCb(appHandle, xmlChangedCallback);
+ printf("Please push AudioParam xml to %s folder to test the xml changed callback\n", XML_CUS_FOLDER_ON_DEVICE);
+ printf("You can press any key to continue!\n");;
+ getchar(); // waiting inotify thead loop
+#else
+ printf("Not support windows version\n");
+#endif
+ } else if (!strncmp(input, "5", strlen("5") + 1)) {
+ while (1) {
+ if (showDynamicTest(appHandle) == 0) {
+ break;
+ }
+ }
+ } else if (!strncmp(input, "6", strlen("6") + 1)) {
+ int level;
+ printf("Enter debug level (eg. 0:DEBUG, 1:INFO, 2:WARN, 3:ERR):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ level = (int)strtoul(input, NULL, 0);
+ if (level < 0 || level > ERR_LEVEL) {
+ printf("Invalid level value. (%d)\n", level);
+ } else {
+ appSetDebugLevel(level);
+ printf("Set debug level = %d\n", level);
+ }
+ } else if (!strncmp(input, "7", strlen("7") + 1)) {
+ appHandleRedirectIOToConsole();
+ } else if (!strncmp(input, "8", strlen("8") + 1)) {
+ printf("APP lib building time stamp: %s\n", appHandleGetBuildTimeStamp());
+ }
+ return 1;
+}
+
+int main() {
+
+ AppHandle *appHandle = NULL;
+
+#ifdef WIN32
+ AppHandle Handle;
+ /* For Tuning Tool debug usage, used to show the APP lib message to the console */
+ appHandleRedirectIOToConsole();
+
+ /* Test loading list */
+ //appSetAudioTypeLoadingList(AUDIO_HAL_AUDIO_TYPE_LOADING_LIST);
+ //appSetAudioTypeLoadingList(EM_AUDIO_TYPE_LOADING_LIST);
+ //appSetAudioTypeLoadingList(AUDIO_FW_AUDIO_TYPE_LOADING_LIST);
+ //appSetAudioTypeLoadingList(ATCMDHANDLER_AUDIO_TYPE_LOADING_LIST);
+
+ /* Init app handle */
+ appHandleInit(&Handle);
+ appHandle = &Handle;
+
+ /* Parse the xml in default and cus folder,
+ if cus folder has the same name of XML file,
+ parser will load the cus folder xml instead of default xml folder */
+ appHandleParseXml(appHandle, XML_FOLDER_LIST_ON_TUNING_TOOL, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#else
+ /* Get AppHandle global instance, this API will parse xml automatically */
+ appHandle = appHandleGetInstance();
+#endif
+
+ /* Set the debug level, default is INFO_LEVEL */
+ appSetDebugLevel(INFO_LEVEL);
+
+ while (1) {
+ if (showMainMenu(appHandle) == 0) {
+ break;
+ }
+ }
+
+ /* Release appHandle resources */
+ appHandleUninit(appHandle);
+
+ return 0;
+}
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/normalize_convertor.c b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/normalize_convertor.c
new file mode 100644
index 0000000..12f1eaa
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/audio_big_sw/test/normalize_convertor.c
@@ -0,0 +1,78 @@
+/* MediaTek Inc. (C) 2016. All rights reserved.
+ *
+ * Copyright Statement:
+ * This software/firmware and related documentation ("MediaTek Software") are
+ * protected under relevant copyright laws. The information contained herein is
+ * confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+ * the prior written permission of MediaTek inc. and/or its licensors, any
+ * reproduction, modification, use or disclosure of MediaTek Software, and
+ * information contained herein, in whole or in part, shall be strictly
+ * prohibited.
+ */
+
+/*
+ * Description:
+ * Implement convert hex XML to dec format tool
+ */
+
+#include "AudioParamParser.h"
+#include "AudioParamParserPriv.h"
+
+#include <stdio.h>
+#include <string.h>
+
+static const char *INPUT_UNNORMALIZED_DIR[] = {
+ ".\\unnormalized_xml\\",
+ NULL
+};
+#define OUTPUT_NORMALIZED_DIR ".\\normalized_xml"
+
+int main() {
+ size_t num, i;
+ AppHandle *appHandle = NULL;
+ AppHandle Handle;
+
+ /* Set the debug level, default is INFO_LEVEL */
+ appSetDebugLevel(ERR_LEVEL);
+
+ /* For Tuning Tool debug usage, used to show the APP lib message to the console */
+ appHandleRedirectIOToConsole();
+
+ /* Init app handle */
+ appHandleInit(&Handle);
+ appHandle = &Handle;
+
+ /* Save XML with Dec mode */
+ appHandle->saveXmlWithHexMode = 1;
+
+ /* Save XML with Dec mode */
+ appHandle->normalizeXmlContent = 1;
+
+ /* Parse the xml in default and cus folder,
+ if cus folder has the same name of XML file,
+ parser will load the cus folder xml instead of default xml folder */
+ appHandleParseXml(appHandle, INPUT_UNNORMALIZED_DIR, NULL);
+
+ /* Save all Xml */
+ num = appHandleGetNumOfAudioType(appHandle);
+ i = 0;
+
+ for (i = 0; i < num; i++) {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Save changed AudioType to XML */
+ audioTypeSaveAudioParamXml(audioType, OUTPUT_NORMALIZED_DIR, 1);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ }
+
+ /* Release appHandle resources */
+ appHandleUninit(appHandle);
+
+ return 0;
+}
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioCategory.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioCategory.c
new file mode 100644
index 0000000..7633ee8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioCategory.c
@@ -0,0 +1,296 @@
+#include "AudioParamParserPriv.h"
+
+EXPORT CategoryType *categoryTypeCreate(const char *name, const char *wording, AudioType *audioType, int visible)
+{
+ CategoryType *categoryType = NULL;
+ categoryType = (CategoryType *)malloc(sizeof(CategoryType));
+ categoryType->name = strdup(name);
+ categoryType->wording = strdup(wording);
+ categoryType->audioType = audioType;
+ categoryType->visible = visible;
+ categoryType->categoryHash = NULL;
+ categoryType->categoryAliasHash = NULL;
+ categoryType->categoryGroupHash = NULL;
+ return categoryType;
+}
+
+EXPORT void categoryTypeRelease(CategoryType *categoryType)
+{
+ free(categoryType->name);
+ free(categoryType->wording);
+ if (categoryType->categoryHash)
+ {
+ Category *tmp, *item;
+ HASH_ITER(hh, categoryType->categoryHash, item, tmp)
+ {
+ HASH_DEL(categoryType->categoryHash, item);
+ categoryRelease(item);
+ }
+ }
+
+ if (categoryType->categoryAliasHash)
+ {
+ CategoryAlias *tmp, *item;
+ HASH_ITER(hh, categoryType->categoryAliasHash, item, tmp)
+ {
+ HASH_DEL(categoryType->categoryAliasHash, item);
+ categoryAliasRelease(item);
+ }
+ }
+ free(categoryType);
+}
+
+EXPORT size_t categoryTypeGetNumOfCategory(CategoryType *categoryType)
+{
+ if (!categoryType)
+ {
+ ERR_LOG("categoryType is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(categoryType->categoryHash);
+}
+
+EXPORT size_t categoryTypeGetNumOfCategoryGroup(CategoryType *categoryType)
+{
+ if (!categoryType)
+ {
+ ERR_LOG("CategoryType is NULL\n");
+ return 0;
+ }
+
+ return HASH_COUNT(categoryType->categoryGroupHash);
+}
+
+EXPORT Category *categoryTypeGetCategoryByIndex(CategoryType *categoryType, size_t index)
+{
+ Category *category = NULL;
+ size_t i = 0;
+
+ for (category = categoryType->categoryHash; category ; category = category->hh.next)
+ {
+ if (index == i++)
+ {
+ return category;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByIndex(CategoryType *categoryType, size_t index)
+{
+ CategoryGroup *categoryGroup = NULL;
+ size_t i = 0;
+
+ if (!categoryType)
+ {
+ ERR_LOG("CategoryType is NULL\n");
+ return NULL;
+ }
+
+ for (categoryGroup = categoryType->categoryGroupHash; categoryGroup ; categoryGroup = categoryGroup->hh.next)
+ {
+ if (index == i++)
+ {
+ return categoryGroup;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryAlias *categoryTypeGetCategoryByAlias(CategoryType *categoryType, const char *alais)
+{
+ CategoryAlias *categoryAlias;
+
+ if (!categoryType)
+ {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(categoryType->categoryAliasHash, alais, categoryAlias);
+
+ return categoryAlias;
+}
+
+EXPORT Category *categoryTypeGetCategoryByName(CategoryType *categoryType, const char *name)
+{
+ CategoryGroup *categoryGroup;
+ Category *category;
+
+ if (!categoryType)
+ {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ if (!name)
+ {
+ ERR_LOG("name is NULL\n");
+ return NULL;
+ }
+
+ for (categoryGroup = categoryType->categoryGroupHash; categoryGroup; categoryGroup = categoryGroup->hh.next)
+ {
+ for (category = categoryGroup->categoryHash; category; category = category->hh.next)
+ {
+ if (!strcmp(category->name, name))
+ {
+ return category;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Category *categoryTypeGetCategoryByWording(CategoryType *categoryType, const char *wording)
+{
+ Category *category;
+
+ if (!categoryType)
+ {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(categoryType->categoryHash, wording, category);
+
+ return category;
+}
+
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByWording(CategoryType *categoryType, const char *wording)
+{
+ CategoryGroup *categoryGroup;
+
+ if (!categoryType)
+ {
+ ERR_LOG("categoryType is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(categoryType->categoryGroupHash, wording, categoryGroup);
+
+ return categoryGroup;
+}
+
+EXPORT CategoryGroup *categoryGroupCreate(const char *name, const char *wording, CategoryType *categoryType, int visible)
+{
+ CategoryGroup *categoryGroup = NULL;
+ categoryGroup = (CategoryGroup *)malloc(sizeof(CategoryGroup));
+ categoryGroup->name = strdup(name);
+ categoryGroup->wording = strdup(wording);
+ categoryGroup->categoryType = categoryType;
+ categoryGroup->visible = visible;
+ categoryGroup->categoryHash = NULL;
+ return categoryGroup;
+}
+
+EXPORT void categoryGroupRelease(CategoryGroup *categoryGroup)
+{
+ free(categoryGroup->name);
+ free(categoryGroup->wording);
+ if (categoryGroup->categoryHash)
+ {
+ Category *tmp, *item;
+ HASH_ITER(hh, categoryGroup->categoryHash, item, tmp)
+ {
+ HASH_DEL(categoryGroup->categoryHash, item);
+ categoryRelease(item);
+ }
+ }
+ free(categoryGroup);
+}
+
+EXPORT size_t categoryGroupGetNumOfCategory(CategoryGroup *categoryGroup)
+{
+ if (!categoryGroup)
+ {
+ ERR_LOG("categoryGroup is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(categoryGroup->categoryHash);
+}
+
+EXPORT Category *categoryCreate(const char *name, const char *wording, CATEGORY_PARENT_TYPE isCategoryGroup, void *parent, int visible)
+{
+ Category *category = NULL;
+ category = (Category *)malloc(sizeof(Category));
+ category->name = strdup(name);
+ category->wording = strdup(wording);
+ category->parentType = isCategoryGroup;
+ if (isCategoryGroup)
+ {
+ category->parent.categoryType = (CategoryType *)parent;
+ }
+ else
+ {
+ category->parent.category = (Category *)parent;
+ }
+ category->visible = visible;
+
+ return category;
+}
+
+EXPORT void categoryRelease(Category *category)
+{
+ free(category->name);
+ free(category->wording);
+ free(category);
+}
+
+EXPORT CategoryAlias *categoryAliasCreate(const char *alias, Category *category)
+{
+ CategoryAlias *categoryAlias = NULL;
+ categoryAlias = (CategoryAlias *)malloc(sizeof(CategoryAlias));
+ categoryAlias->alias = strdup(alias);
+ categoryAlias->category = category;
+
+ return categoryAlias;
+}
+
+EXPORT void categoryAliasRelease(CategoryAlias *categoryAlias)
+{
+ free(categoryAlias->alias);
+ free(categoryAlias);
+}
+
+EXPORT Category *categoryGroupGetCategoryByIndex(CategoryGroup *categoryGroup, size_t index)
+{
+ Category *category = NULL;
+ size_t i = 0;
+
+ if (!categoryGroup)
+ {
+ ERR_LOG("categoryGroup is NULL!\n");
+ return NULL;
+ }
+
+ for (category = categoryGroup->categoryHash; category ; category = category->hh.next)
+ {
+ if (index == i++)
+ {
+ return category;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Category *categoryGroupGetCategoryByWording(CategoryGroup *categoryGroup, const char *wording)
+{
+ Category *category;
+
+ if (!categoryGroup)
+ {
+ ERR_LOG("categoryGroup is NULL!\n");
+ return 0;
+ }
+
+ HASH_FIND_STR(categoryGroup->categoryHash, wording, category);
+
+ return category;
+}
\ No newline at end of file
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParam.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParam.c
new file mode 100644
index 0000000..36def3e
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParam.c
@@ -0,0 +1,504 @@
+#include "AudioParamParserPriv.h"
+#include <errno.h>
+
+Param *paramCreate(const char *name, ParamInfo *paramInfo, const char *paramValue)
+{
+ Param *param = NULL;
+ if (!paramInfo)
+ {
+ ERR_LOG("The paramInfo is NULL, cannot create %s param!\n", name);
+ return NULL;
+ }
+
+ param = (Param *)malloc(sizeof(Param));
+ param->data = NULL;
+ param->name = strdup(name);
+ param->paramInfo = paramInfo;
+ paramSetupDataInfoByStr(param, paramValue);
+
+ return param;
+}
+
+EXPORT void paramRelease(Param *param)
+{
+ if (param)
+ {
+ if (param->name)
+ {
+ free(param->name);
+ }
+ if (param->data)
+ {
+ free(param->data);
+ }
+ free(param);
+ }
+}
+
+EXPORT Param *paramHashClone(Param *paramHash)
+{
+ Param *param = NULL, *item, *newItem;
+ size_t i;
+ if (!paramHash)
+ {
+ ERR_LOG("paramHash is NULL\n");
+ return NULL;
+ }
+
+ for (item = paramHash; item != NULL; item = item->hh.next)
+ {
+ newItem = malloc(sizeof(Param));
+ newItem->arraySize = item->arraySize;
+ newItem->paramInfo = item->paramInfo;
+ newItem->paramUnit = item->paramUnit;
+ newItem->name = strdup(item->name);
+
+ switch (item->paramInfo->dataType)
+ {
+ case TYPE_STR:
+ newItem->data = strdup(item->data);
+ break;
+ case TYPE_INT:
+ newItem->data = malloc(sizeof(int));
+ *(int *)newItem->data = *(int *)item->data;
+ break;
+ case TYPE_UINT:
+ newItem->data = malloc(sizeof(unsigned int));
+ *(unsigned int *)newItem->data = *(unsigned int *)item->data;
+ break;
+ case TYPE_FLOAT:
+ newItem->data = malloc(sizeof(float));
+ *(float *)newItem->data = *(float *)item->data;
+ break;
+ case TYPE_BYTE_ARRAY:
+ newItem->data = malloc(sizeof(char) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((char *)newItem->data)[i] = ((char *)item->data)[i];
+ }
+ break;
+ case TYPE_UBYTE_ARRAY:
+ newItem->data = malloc(sizeof(unsigned char) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((unsigned char *)newItem->data)[i] = ((unsigned char *)item->data)[i];
+ }
+ break;
+ case TYPE_SHORT_ARRAY:
+ newItem->data = malloc(sizeof(short) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((short *)newItem->data)[i] = ((short *)item->data)[i];
+ }
+ break;
+ case TYPE_USHORT_ARRAY:
+ newItem->data = malloc(sizeof(unsigned short) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((unsigned short *)newItem->data)[i] = ((unsigned short *)item->data)[i];
+ }
+ break;
+ case TYPE_INT_ARRAY:
+ newItem->data = malloc(sizeof(int) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((int *)newItem->data)[i] = ((int *)item->data)[i];
+ }
+ break;
+ case TYPE_UINT_ARRAY:
+ newItem->data = malloc(sizeof(unsigned int) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((unsigned int *)newItem->data)[i] = ((unsigned int *)item->data)[i];
+ }
+ break;
+ case TYPE_DOUBLE_ARRAY:
+ newItem->data = malloc(sizeof(double) * item->arraySize);
+ for (i = 0; i < item->arraySize; i++)
+ {
+ ((double *)newItem->data)[i] = ((double *)item->data)[i];
+ }
+ break;
+ case TYPE_FIELD:
+ case TYPE_UNKNOWN:
+ break;
+ }
+ HASH_ADD_KEYPTR(hh, param, newItem->name, strlen(newItem->name), newItem);
+ }
+
+ return param;
+}
+
+EXPORT DATA_TYPE paramDataTypeToEnum(const char *dataType)
+{
+ if (!dataType)
+ {
+ ERR_LOG("dataType is NULL\n");
+ return TYPE_UNKNOWN;
+ }
+
+ if (!strcmp(DATA_TYPE_STR_STRING, dataType))
+ {
+ return TYPE_STR;
+ }
+ else if (!strcmp(DATA_TYPE_INT_STRING, dataType))
+ {
+ return TYPE_INT;
+ }
+ else if (!strcmp(DATA_TYPE_UINT_STRING, dataType))
+ {
+ return TYPE_UINT;
+ }
+ else if (!strcmp(DATA_TYPE_FLOAT_STRING, dataType))
+ {
+ return TYPE_FLOAT;
+ }
+ else if (!strcmp(DATA_TYPE_BYTE_ARRAY_STRING, dataType))
+ {
+ return TYPE_BYTE_ARRAY;
+ }
+ else if (!strcmp(DATA_TYPE_UBYTE_ARRAY_STRING, dataType))
+ {
+ return TYPE_UBYTE_ARRAY;
+ }
+ else if (!strcmp(DATA_TYPE_SHORT_ARRAY_STRING, dataType))
+ {
+ return TYPE_SHORT_ARRAY;
+ }
+ else if (!strcmp(DATA_TYPE_USHORT_ARRAY_STRING, dataType))
+ {
+ return TYPE_USHORT_ARRAY;
+ }
+ else if (!strcmp(DATA_TYPE_INT_ARRAY_STRING, dataType))
+ {
+ return TYPE_INT_ARRAY;
+ }
+ else if (!strcmp(DATA_TYPE_UINT_ARRAY_STRING, dataType))
+ {
+ return TYPE_UINT_ARRAY;
+ }
+ else if (!strcmp(DATA_TYPE_DOUBLE_ARRAY_STRING, dataType))
+ {
+ return TYPE_DOUBLE_ARRAY;
+ }
+ else
+ {
+ return TYPE_UNKNOWN;
+ }
+}
+
+EXPORT const char *paramDataTypeToStr(DATA_TYPE dataType)
+{
+ switch (dataType)
+ {
+ case TYPE_STR:
+ return DATA_TYPE_STR_STRING;
+ case TYPE_INT:
+ return DATA_TYPE_INT_STRING;
+ case TYPE_UINT:
+ return DATA_TYPE_UINT_STRING;
+ case TYPE_FLOAT:
+ return DATA_TYPE_FLOAT_STRING;
+ case TYPE_BYTE_ARRAY:
+ return DATA_TYPE_BYTE_ARRAY_STRING;
+ case TYPE_UBYTE_ARRAY:
+ return DATA_TYPE_UBYTE_ARRAY_STRING;
+ case TYPE_SHORT_ARRAY:
+ return DATA_TYPE_SHORT_ARRAY_STRING;
+ case TYPE_USHORT_ARRAY:
+ return DATA_TYPE_USHORT_ARRAY_STRING;
+ case TYPE_INT_ARRAY:
+ return DATA_TYPE_INT_ARRAY_STRING;
+ case TYPE_UINT_ARRAY:
+ return DATA_TYPE_UINT_ARRAY_STRING;
+ case TYPE_DOUBLE_ARRAY:
+ return DATA_TYPE_DOUBLE_ARRAY_STRING;
+ case TYPE_UNKNOWN:
+ return DATA_TYPE_UNKNOWN_STRING;
+ case TYPE_FIELD:
+ return DATA_TYPE_FIELD_STRING;
+ }
+ return DATA_TYPE_UNKNOWN_STRING;
+}
+
+EXPORT APP_STATUS paramSetupDataInfoByStr(Param *param, const char *str)
+{
+ return utilConvDataStringToNative(param->paramInfo->dataType, str, ¶m->data, ¶m->arraySize);
+}
+
+EXPORT size_t paramGetArraySizeFromString(const char *str)
+{
+ size_t numOfSeperator = 0;
+
+ if (!str)
+ {
+ ERR_LOG("str is NULL!\n");
+ return 0;
+ }
+
+ while ((str = strstr(str, ARRAY_SEPERATOR)) != NULL)
+ {
+ numOfSeperator++;
+ str++;
+ }
+
+ return numOfSeperator + 1;
+}
+
+EXPORT APP_STATUS paramGetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int *val)
+{
+ unsigned char uchar;
+ unsigned short ushort;
+ unsigned int uint;
+
+ if (!param)
+ {
+ WARN_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fieldInfo)
+ {
+ WARN_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->arrayIndex >= param->arraySize)
+ {
+ WARN_LOG("Param's array size is less than field index. (param=%s, field index=%lu >= array size=%lu)\n", param->name, fieldInfo->arrayIndex, param->arraySize);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->startBit < 0)
+ {
+ WARN_LOG("The startBit < 0 (param=%s, startBit=%d)\n", param->name, fieldInfo->startBit);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->endBit >= 32)
+ {
+ WARN_LOG("The startBit >= 32 (param=%s, endBit=%d)\n", param->name, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ switch (param->paramInfo->dataType)
+ {
+ case TYPE_BYTE_ARRAY:
+ case TYPE_UBYTE_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 8)
+ {
+ WARN_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+ uchar = ((unsigned char *)param->data)[fieldInfo->arrayIndex];
+ *val = ((uchar >> (fieldInfo->startBit)) & ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1));
+ return APP_NO_ERROR;
+ case TYPE_SHORT_ARRAY:
+ case TYPE_USHORT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 16)
+ {
+ WARN_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+ ushort = ((unsigned short *)param->data)[fieldInfo->arrayIndex];
+ *val = ((ushort >> (fieldInfo->startBit)) & ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1));
+ return APP_NO_ERROR;
+ case TYPE_INT_ARRAY:
+ case TYPE_UINT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 32)
+ {
+ WARN_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+ uint = ((unsigned int *)param->data)[fieldInfo->arrayIndex];
+ *val = ((uint >> (fieldInfo->startBit)) & ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1));
+ return APP_NO_ERROR;
+ default:
+ WARN_LOG("Param didn't support field info (param=%s, type=%s)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType));
+ return APP_ERROR;
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT char *paramNewDataStr(Param *param)
+{
+ return utilConvDataToString(param->paramInfo->dataType, param->data, param->arraySize);
+}
+
+EXPORT APP_STATUS paramSetupDataInfoByVal(Param *param, void *data, int arraySize)
+{
+ int i;
+
+ if (!param)
+ {
+ ERR_LOG("Param is NULL\n");
+ return APP_ERROR;
+ }
+
+ switch (param->paramInfo->dataType)
+ {
+ case TYPE_BYTE_ARRAY:
+ param->data = malloc(sizeof(char) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((char *)param->data)[i] = ((char *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_UBYTE_ARRAY:
+ param->data = malloc(sizeof(unsigned char) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((unsigned char *)param->data)[i] = ((unsigned char *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_SHORT_ARRAY:
+ param->data = malloc(sizeof(short) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((short *)param->data)[i] = ((short *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_USHORT_ARRAY:
+ param->data = malloc(sizeof(unsigned short) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((unsigned short *)param->data)[i] = ((unsigned short *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_INT_ARRAY:
+ param->data = malloc(sizeof(int) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((int *)param->data)[i] = ((int *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_UINT_ARRAY:
+ param->data = malloc(sizeof(unsigned int) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((unsigned int *)param->data)[i] = ((unsigned int *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_DOUBLE_ARRAY:
+ param->data = malloc(sizeof(double) * arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ ((double *)param->data)[i] = ((double *)data)[i];
+ }
+ param->arraySize = arraySize;
+ break;
+ case TYPE_STR:
+ param->data = strdup((const char *)data);
+ break;
+ case TYPE_INT:
+ param->data = malloc(sizeof(int));
+ *(int *)param->data = *(int *)data;
+ break;
+ case TYPE_UINT:
+ param->data = malloc(sizeof(unsigned int));
+ *(unsigned int *)param->data = *(unsigned int *)data;
+ break;
+ case TYPE_FLOAT:
+ param->data = malloc(sizeof(float));
+ *(float *)param->data = *(float *)data;
+ break;
+ default:
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS paramSetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int val)
+{
+ unsigned long mask;
+
+ if (!param)
+ {
+ ERR_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fieldInfo)
+ {
+ ERR_LOG("param is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->arrayIndex >= param->arraySize)
+ {
+ ERR_LOG("Param's array size is less than field index. (param=%s, field index=%lu >= array size=%lu)\n", param->name, fieldInfo->arrayIndex, param->arraySize);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->startBit < 0)
+ {
+ ERR_LOG("The startBit < 0 (param=%s, startBit=%d)\n", param->name, fieldInfo->startBit);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->endBit >= 32)
+ {
+ ERR_LOG("The startBit >= 32 (param=%s, endBit=%d)\n", param->name, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ if (fieldInfo->endBit == 31 && fieldInfo->startBit == 0)
+ {
+ mask = 0xFFFFFFFF;
+ }
+ else
+ {
+ mask = ((1 << (fieldInfo->endBit - fieldInfo->startBit + 1)) - 1);
+ }
+
+ switch (param->paramInfo->dataType)
+ {
+ case TYPE_BYTE_ARRAY:
+ case TYPE_UBYTE_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 8)
+ {
+ ERR_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ ((unsigned char *)param->data)[fieldInfo->arrayIndex] =
+ ((((unsigned char *)param->data)[fieldInfo->arrayIndex] & ~(mask << fieldInfo->startBit)) | (unsigned char)(val & mask) << fieldInfo->startBit);
+ return APP_NO_ERROR;
+ case TYPE_SHORT_ARRAY:
+ case TYPE_USHORT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 16)
+ {
+ ERR_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ ((unsigned short *)param->data)[fieldInfo->arrayIndex] =
+ ((((unsigned short *)param->data)[fieldInfo->arrayIndex] & ~(mask << fieldInfo->startBit)) | (unsigned short)(val & mask) << fieldInfo->startBit);
+ return APP_NO_ERROR;
+ case TYPE_INT_ARRAY:
+ case TYPE_UINT_ARRAY:
+ if (fieldInfo->startBit > fieldInfo->endBit || fieldInfo->endBit >= 32)
+ {
+ ERR_LOG("Field's bit information is not match param type. (param=%s, start bit=%d, end bit=%d)\n", param->name, fieldInfo->startBit, fieldInfo->endBit);
+ return APP_ERROR;
+ }
+
+ ((unsigned int *)param->data)[fieldInfo->arrayIndex] =
+ ((((unsigned int *)param->data)[fieldInfo->arrayIndex] & ~(mask << fieldInfo->startBit)) | (val & mask) << fieldInfo->startBit);
+ return APP_NO_ERROR;
+ default:
+ ERR_LOG("Param is not array type, cannot query field value (param=%s, type=%s)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType));
+ return APP_ERROR;
+ }
+
+ return APP_ERROR;
+}
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamFieldInfo.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamFieldInfo.c
new file mode 100644
index 0000000..d7d3625
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamFieldInfo.c
@@ -0,0 +1,174 @@
+#include "AudioParamParserPriv.h"
+
+EXPORT size_t paramInfoGetNumOfFieldInfo(ParamInfo *paramInfo)
+{
+ if (!paramInfo)
+ {
+ ERR_LOG("paramInfo is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(paramInfo->fieldInfoHash);
+}
+
+EXPORT FieldInfo *paramInfoGetFieldInfoByIndex(ParamInfo *paramInfo, size_t index)
+{
+ FieldInfo *fieldInfo = NULL;
+ size_t i = 0;
+
+ if (!paramInfo)
+ {
+ ERR_LOG("paramInfo is NULL!\n");
+ return NULL;
+ }
+
+ for (fieldInfo = paramInfo->fieldInfoHash; fieldInfo ; fieldInfo = fieldInfo->hh.next)
+ {
+ if (index == i++)
+ {
+ return fieldInfo;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT FieldInfo *paramInfoGetFieldInfoByName(ParamInfo *paramInfo, const char *fieldName)
+{
+ FieldInfo *fieldInfo;
+
+ if (!paramInfo)
+ {
+ ERR_LOG("paramInfo is NULL!\n");
+ return NULL;
+ }
+
+ /* Query Param name */
+ HASH_FIND_STR(paramInfo->fieldInfoHash, fieldName, fieldInfo);
+
+ return fieldInfo;
+}
+
+EXPORT ParamInfo *paramInfoCreate(const char *name, DATA_TYPE dataType, AudioType *audioType)
+{
+ ParamInfo *paramInfo = (ParamInfo *)malloc(sizeof(ParamInfo));
+ paramInfo->audioType = audioType;
+ paramInfo->name = strdup(name);
+ paramInfo->dataType = dataType;
+ paramInfo->fieldInfoHash = NULL;
+ return paramInfo;
+}
+
+EXPORT FieldInfo *fieldInfoCreate(const char *fieldName, unsigned int arrayIndex, int startBit, int endBit, const char *checkList, ParamInfo *paramInfo)
+{
+ FieldInfo *fieldInfo = (FieldInfo *)malloc(sizeof(FieldInfo));
+
+ /* Setup members */
+ fieldInfo->name = strdup(fieldName);
+ fieldInfo->arrayIndex = arrayIndex;
+ fieldInfo->startBit = startBit;
+ fieldInfo->endBit = endBit;
+ fieldInfo->paramInfo = paramInfo;
+
+ if (checkList)
+ {
+ fieldInfo->checkListStr = strdup(checkList);
+ }
+ else
+ {
+ fieldInfo->checkListStr = utilGenCheckList(endBit - startBit + 1);
+ }
+
+ return fieldInfo;
+}
+
+EXPORT void paramInfoRelease(ParamInfo *paramInfo)
+{
+ if (paramInfo == NULL)
+ {
+ return;
+ }
+
+ if (paramInfo->fieldInfoHash)
+ {
+ FieldInfo *tmp, *item;
+ HASH_ITER(hh, paramInfo->fieldInfoHash, item, tmp)
+ {
+ HASH_DEL(paramInfo->fieldInfoHash, item);
+ fieldInfoRelease(item);
+ }
+ }
+
+ free(paramInfo->name);
+ free(paramInfo);
+}
+
+EXPORT void fieldInfoRelease(FieldInfo *fieldInfo)
+{
+ if (fieldInfo == NULL)
+ {
+ return;
+ }
+
+ if (fieldInfo->checkListStr)
+ {
+ free(fieldInfo->checkListStr);
+ }
+
+ free(fieldInfo->name);
+ free(fieldInfo);
+}
+
+EXPORT APP_STATUS fieldInfoGetCheckListValue(FieldInfo *fieldInfo, const char *checkName, unsigned int *checkVal)
+{
+ char *checkList;
+ char *valStr;
+ char *nameStr;
+ if (!fieldInfo)
+ {
+ ERR_LOG("fieldInfo is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!checkName)
+ {
+ ERR_LOG("checkName is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!checkVal)
+ {
+ ERR_LOG("checkVal is NULL\n");
+ return APP_ERROR;
+ }
+
+ checkList = strdup(fieldInfo->checkListStr);
+ valStr = strtok(checkList, ARRAY_SEPERATOR);
+ if (!valStr)
+ {
+ ERR_LOG("Cannot parse valStr\n");
+ free(checkList);
+ return APP_ERROR;
+ }
+
+ while ((nameStr = strtok(NULL, ARRAY_SEPERATOR)) != NULL)
+ {
+ if (!strcmp(nameStr, checkName))
+ {
+ *checkVal = strtoul(valStr, NULL, 0);
+ free(checkList);
+ return APP_NO_ERROR;
+ }
+
+ valStr = strtok(NULL, ARRAY_SEPERATOR);
+ if (!valStr)
+ {
+ ERR_LOG("Cannot parse valStr\n");
+ free(checkList);
+ return APP_ERROR;
+ }
+ }
+
+ free(checkList);
+ return APP_ERROR;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParser.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParser.c
new file mode 100644
index 0000000..796c307
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParser.c
@@ -0,0 +1,1464 @@
+#include "AudioParamParserPriv.h"
+
+#include <assert.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#ifdef __linux__
+#include <dirent.h>
+#include <unistd.h>
+#else
+#include <windows.h>
+#pragma warning( disable : 4996 )
+#endif
+
+static AppHandle appHandleInst;
+static int appHandleInited = 0;
+
+#ifdef FORCE_DEBUG_LEVEL
+int appDebugLevel = DEBUG_LEVEL; /* Global debug level setting */
+#else
+int appDebugLevel = INFO_LEVEL; /* Global debug level setting */
+#endif
+
+FILE *appLogFp = NULL;
+int outputLogToStdout = 0;
+
+#ifndef WIN32
+static pthread_rwlock_t appHandleInstLock = PTHREAD_RWLOCK_INITIALIZER;
+static const char *appHandleInstLockCallerFun = NULL; /* Used to cache the lock holder */
+#else
+int __stdcall DllMain(HINSTANCE hInstance, DWORD dwReason, PVOID pvReserved)
+{
+ return TRUE;
+}
+#endif
+
+EXPORT APP_STATUS appHandleInit(AppHandle *appHandle)
+{
+#ifdef _DEBUG
+ /* Alwasy show the output console for debug build */
+ appHandleRedirectIOToConsole();
+#endif
+
+ INFO_LOG("appHandle = 0x%p\n", appHandle);
+
+ if (appHandle)
+ {
+ appHandle->xmlDir = NULL;
+ appHandle->xmlCusDir = NULL;
+ appHandle->audioTypeHash = NULL;
+ appHandle->featureOptionsHash = NULL;
+ appHandle->featureOptionsDoc = NULL;
+ appHandle->noficyCbList = NULL;
+#ifndef WIN32
+ appHandle->lockCallerFun = NULL;
+ appHandle->appThreadExit = 0;
+ appHandle->inotifyFd = 0;
+
+ pthread_rwlock_init(&appHandle->lock, NULL);
+#endif
+ appHandleShowAudioTypeSupportedVerInfo(appHandle);
+ return APP_NO_ERROR;
+ }
+ else
+ {
+ WARN_LOG("AppHandle is NULL!\n");
+ return APP_ERROR;
+ }
+}
+
+EXPORT APP_STATUS appHandleUninit(AppHandle *appHandle)
+{
+ INFO_LOG("appHandle = 0x%p\n", appHandle);
+
+ if (!appHandle)
+ {
+ WARN_LOG("AppHandle is NULL!\n");
+ return APP_ERROR;
+ }
+ else
+ {
+ NotifyCb *notifyCb, *tmp;
+
+ /* Lock */
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ if (appHandle->xmlDir)
+ {
+ free(appHandle->xmlDir);
+ }
+ appHandle->xmlDir = NULL;
+
+ if (appHandle->xmlCusDir)
+ {
+ free(appHandle->xmlCusDir);
+ }
+ appHandle->xmlCusDir = NULL;
+
+ if (appHandle->featureOptionsDoc)
+ {
+ xmlFreeDoc(appHandle->featureOptionsDoc);
+ }
+ appHandle->featureOptionsDoc = NULL;
+
+#ifndef WIN32
+ if (appHandle->appThreadExit == 0)
+ {
+ void *status;
+ appHandle->appThreadExit = 1;
+ INFO_LOG("Send signal to appThread\n");
+ pthread_kill(appHandle->appThread, SIGUSR1);
+
+ /* TODO: Don't join the inotify thread, since the read function is block waiting */
+ INFO_LOG("Waiting inotify thread join...\n");
+ pthread_join(appHandle->appThread, &status);
+ INFO_LOG("inotify thread joined\n");
+ appHandle->inotifyFd = 0;
+ }
+#endif
+
+ // release notify callback list
+ LL_FOREACH_SAFE(appHandle->noficyCbList, notifyCb, tmp)
+ {
+ LL_DELETE(appHandle->noficyCbList, notifyCb);
+ free(notifyCb);
+ }
+ appHandle->noficyCbList = NULL;
+
+ /* If appHandle is singleton instance, reset the init info */
+ if (appHandle == &appHandleInst)
+ {
+ appHandleInited = 0;
+ }
+
+ appHandleReleaseAudioTypeHash(appHandle);
+
+ appHandleReleaseFeatureOptionsHash(appHandle);
+
+ xmlCleanupParser();
+
+ /* Flush app log */
+ if (appLogFp)
+ {
+ fflush(appLogFp);
+ }
+
+ /* Unlock */
+ appHandleUnlock(appHandle);
+
+ return APP_NO_ERROR;
+ }
+}
+
+EXPORT const char *appHandleGetBuildTimeStamp()
+{
+ return __DATE__" "__TIME__;
+}
+
+EXPORT int appHandleWriteLock(AppHandle *appHandle, const char *callerFun)
+{
+ int res = 0;
+
+ if (!appHandle)
+ {
+ WARN_LOG("appHandle is NULL\n");
+ return res;
+ }
+
+#ifndef WIN32
+ while (1)
+ {
+ if (pthread_rwlock_trywrlock(&appHandle->lock) == 0)
+ {
+ appHandle->lockCallerFun = callerFun;
+ DEBUG_LOG("AppHandle lock is locked by %s()\n", appHandle->lockCallerFun);
+ break;
+ }
+ else
+ {
+ DEBUG_LOG("Cannot lock the AppHandle lock, delay some time. (the locker is %s())\n", appHandle->lockCallerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return res;
+}
+
+EXPORT int appHandleReadLock(AppHandle *appHandle, const char *callerFun)
+{
+ int res = 0;
+
+ if (!appHandle)
+ {
+ WARN_LOG("appHandle is NULL\n");
+ return res;
+ }
+
+#ifndef WIN32
+ while (1)
+ {
+ if (pthread_rwlock_tryrdlock(&appHandle->lock) == 0)
+ {
+ appHandle->lockCallerFun = callerFun;
+ DEBUG_LOG("AppHandle lock is locked by %s()\n", appHandle->lockCallerFun);
+ break;
+ }
+ else
+ {
+ DEBUG_LOG("Cannot lock the AppHandle lock, delay some time. (the locker is %s())\n", appHandle->lockCallerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return res;
+}
+
+EXPORT int appHandleUnlock(AppHandle *appHandle)
+{
+ int res = 0;
+
+ if (!appHandle)
+ {
+ WARN_LOG("appHandle is NULL\n");
+ return res;
+ }
+
+#ifndef WIN32
+ DEBUG_LOG("Unlock appHandle lock\n");
+ res = pthread_rwlock_unlock(&appHandle->lock);
+#endif
+ return res;
+}
+
+EXPORT int appHandleInstWriteLock(const char *callerFun)
+{
+ int res = 0;
+
+#ifndef WIN32
+ while (1)
+ {
+ if (pthread_rwlock_trywrlock(&appHandleInstLock) == 0)
+ {
+ appHandleInstLockCallerFun = callerFun;
+ DEBUG_LOG("%s acquired the appHandleInstLock\n", callerFun);
+ break;
+ }
+ else
+ {
+ DEBUG_LOG("Cannot lock the appHandleInstLock, delay some time. (the locker is %s)\n", callerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return res;
+}
+
+EXPORT int appHandleInstUnlock()
+{
+ int res = 0;
+#ifndef WIN32
+ DEBUG_LOG("Unlock appHandleInst lock\n");
+ res = pthread_rwlock_unlock(&appHandleInstLock);
+#endif
+ return res;
+}
+
+EXPORT FeatureOption *featureOptionCreate(const char *name, const char *value)
+{
+ FeatureOption *featureOption = malloc(sizeof(FeatureOption));
+ featureOption->name = strdup(name);
+ featureOption->value = strdup(value);
+ return featureOption;
+}
+
+EXPORT void featureOptionRelease(FeatureOption *featureOption)
+{
+ free(featureOption->name);
+ free(featureOption->value);
+ free(featureOption);
+}
+
+EXPORT void appHandleReleaseFeatureOptionsHash(AppHandle *appHandle)
+{
+ if (appHandle->featureOptionsHash)
+ {
+ FeatureOption *tmp, *item;
+ HASH_ITER(hh, appHandle->featureOptionsHash, item, tmp)
+ {
+ HASH_DEL(appHandle->featureOptionsHash, item);
+ featureOptionRelease(item);
+ }
+ }
+ appHandle->featureOptionsHash = NULL;
+}
+
+EXPORT AppHandle *appHandleGetInstance()
+{
+ appHandleInstWriteLock(__FUNCTION__);
+
+ INFO_LOG("");
+
+ if (!appHandleInited)
+ {
+ appHandleInit(&appHandleInst);
+#ifdef WIN32
+ appHandleParseXml(&appHandleInst, XML_FOLDER_ON_TUNING_TOOL, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#else
+ appHandleParseXml(&appHandleInst, XML_FOLDER_ON_DEVICE, XML_CUS_FOLDER_ON_DEVICE);
+#endif
+ appHandleInited = 1;
+ }
+
+ appHandleInstUnlock();
+
+ return &appHandleInst;
+}
+
+EXPORT APP_STATUS appHandleParseXml(AppHandle *appHandle, const char *dir, const char *cusDir)
+{
+ INFO_LOG("appHandle = 0x%p, dir = %s, cusDir = %s\n", appHandle, dir, cusDir);
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ if (!dir)
+ {
+ ERR_LOG("dir is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (appHandle->xmlDir || appHandle->xmlCusDir)
+ {
+ ERR_LOG("XML already parsed, don't call the appHandleParseXml twice!\n");
+ return APP_ERROR;
+ }
+
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ appHandle->xmlDir = strdup(dir);
+#if defined(APP_FORCE_ENABLE_CUS_XML) || defined(WIN32) || defined(CONFIG_MT_ENG_BUILD)
+ appHandle->xmlCusDir = strdup(cusDir);
+#else
+#if !defined(WIN32)
+ if (isCustXmlEnable())
+ {
+ appHandle->xmlCusDir = strdup(cusDir);
+ }
+ else
+ {
+ INFO_LOG("Cust XML folder not enabled");
+ }
+#endif
+#endif
+ INFO_LOG("XmlDir = %s, XmlCusDir = %s\n", appHandle->xmlDir, appHandle->xmlCusDir);
+
+ /* Load feature options information */
+ appHandleLoadDirFeatureOptionsInfo(appHandle);
+
+ /* Load audio type information */
+ appHandleLoadDirAudioTypeInfo(appHandle);
+
+ appHandleUnlock(appHandle);
+
+#ifndef WIN32
+ /* Setup file system monitor thread */
+ if (appHandle->xmlCusDir)
+ {
+ if (pthread_create(&appHandle->appThread, NULL, appHandleThreadLoop, (void *)appHandle))
+ {
+ ERR_LOG("Create app thread fail!\n");
+ return APP_ERROR;
+ }
+ else
+ {
+ INFO_LOG("Create app thread successfully\n");
+ }
+ }
+ else
+ {
+ WARN_LOG("Cus folder is NULL, don't create FS monitor thread\n");
+ }
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleLoadDirFeatureOptionsInfo(AppHandle *appHandle)
+{
+ struct stat fileStat;
+ int strLen;
+ char *featureOptionsFile = NULL;
+ xmlNode *node = NULL;
+ xmlNode *root = NULL;
+ xmlChar *name = NULL;
+ xmlChar *value = NULL;
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ if (!appHandle->xmlDir)
+ {
+ ERR_LOG("xmlDir is NULL!\n");
+ return APP_ERROR;
+ }
+
+ if (appHandle->featureOptionsHash)
+ {
+ WARN_LOG("Feature options already loaded, don't reload it!\n");
+ return APP_NO_ERROR;
+ }
+
+ /* Check cus folder xml first */
+ strLen = strlen(appHandle->xmlDir) + strlen(FEATURE_OPTIONS_XML) + 2;
+ featureOptionsFile = (char *)malloc(strLen);
+ sprintf(featureOptionsFile, "%s%s%s", appHandle->xmlDir, FOLDER, FEATURE_OPTIONS_XML);
+
+ if (stat(featureOptionsFile, &fileStat) == -1)
+ {
+ ERR_LOG("No %s file\n", featureOptionsFile);
+ free(featureOptionsFile);
+ return APP_ERROR;
+ }
+
+ appHandle->featureOptionsDoc = xmlParseFile(featureOptionsFile);
+ if (appHandle->featureOptionsDoc == NULL)
+ {
+ ERR_LOG("Failed to parse %s\n", featureOptionsFile);
+ free(featureOptionsFile);
+ return APP_ERROR;
+ }
+ else
+ {
+ INFO_LOG("Load xml file successfully. (%s)\n", featureOptionsFile);
+ }
+ free(featureOptionsFile);
+
+ /* Parse informatino to feature options hash */
+ root = xmlDocGetRootElement(appHandle->featureOptionsDoc);
+ if (!root)
+ {
+ ERR_LOG("Root element is NULL\n");
+ return APP_ERROR;
+ }
+
+ node = findXmlNodeByElemName(root, ELEM_AUDIO_FEATURE_OPTIONS);
+ if (node && node->children)
+ {
+ node = node->children;
+ }
+ else
+ {
+ ERR_LOG("No feature options found!\n");
+ return APP_ERROR;
+ }
+
+ while ((node = findXmlNodeByElemName(node->next, ELEM_PARAM)))
+ {
+ FeatureOption *featureOption;
+ name = xmlGetProp(node, (const xmlChar *)ATTRI_NAME);
+ value = xmlGetProp(node, (const xmlChar *)ATTRI_VALUE);
+
+ featureOption = featureOptionCreate((const char *)name, (const char *)value);
+ HASH_ADD_KEYPTR(hh, appHandle->featureOptionsHash, featureOption->name, strlen(featureOption->name), featureOption);
+
+ if (name)
+ {
+ xmlFree(name);
+ }
+
+ if (value)
+ {
+ xmlFree(value);
+ }
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleLoadDirAudioTypeInfo(AppHandle *appHandle)
+{
+ size_t numOfAudioParamXml = 0;
+ char audioType[MAX_AUDIO_TYPE_LEN];
+
+#ifdef __linux__
+ struct dirent **namelist;
+ int i;
+ int total;
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ total = scandir(appHandle->xmlDir, &namelist, 0, alphasort);
+
+ /* Release old audio type first */
+ appHandleReleaseAudioTypeHash(appHandle);
+
+ if (total < 0)
+ {
+ ERR_LOG("Scandir error\n");
+ }
+ else
+ {
+ for (i = 0; i < total; i++)
+ {
+ if (strstr(namelist[i]->d_name, AUDIO_PARAM_XML_POSFIX) == NULL)
+ {
+ DEBUG_LOG("File name's posfix is not AudioParam.xml (%s)\n", namelist[i]->d_name);
+ continue;
+ }
+
+ sscanf(namelist[i]->d_name, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioType);
+ if (appHandleIsValidAudioType(appHandle, audioType))
+ {
+ appHandleAddAudioType(appHandle, audioType);
+ }
+ else
+ {
+ WARN_LOG("Invalid audio param xml = %s\n", namelist[i]->d_name);
+ }
+ }
+ }
+#else
+ WIN32_FIND_DATA FindFileData;
+ HANDLE hFind;
+ UT_string *path = NULL;
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ /* Release old audio type first */
+ appHandleReleaseAudioTypeHash(appHandle);
+
+ /* Check preload xml folder */
+ utstring_new(path);
+ utstring_printf(path, "%s"FOLDER"*"AUDIO_PARAM_XML_POSFIX, appHandle->xmlDir);
+ hFind = FindFirstFile(utstring_body(path), &FindFileData);
+ utstring_free(path);
+
+ if (hFind == INVALID_HANDLE_VALUE)
+ {
+ WARN_LOG("No xml found!\n");
+ return APP_ERROR;
+ }
+
+ do
+ {
+ sscanf(FindFileData.cFileName, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioType);
+
+ if (appHandleIsValidAudioType(appHandle, audioType))
+ {
+ appHandleAddAudioType(appHandle, audioType);
+ }
+ else
+ {
+ INFO_LOG("Invalid audio param xml = %s\n", FindFileData.cFileName);
+ }
+ }
+ while (FindNextFile(hFind, &FindFileData));
+#endif
+
+ /* Load all XMLs */
+ appHandleLoadAllAudioTypeXml(appHandle);
+ INFO_LOG("Load all audio type XML - ok\n");
+
+ /* Modify data depends on feature options */
+ appHandleReviseXmlDocByFeatureOptions(appHandle);
+
+ /* Load hash info from XML */
+ appHandleLoadAllAudioTypeHash(appHandle);
+ INFO_LOG("Load all audio Hash - ok\n");
+
+ if (appDebugLevel == DEBUG_LEVEL)
+ {
+ appHandleDumpAudioTypeList(appHandle);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT size_t appHandleGetNumOfAudioType(AppHandle *appHandle)
+{
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ return HASH_COUNT(appHandle->audioTypeHash);
+}
+
+EXPORT APP_STATUS appHandleLoadAllAudioTypeXml(AppHandle *appHandle)
+{
+ size_t i;
+ size_t count = appHandleGetNumOfAudioType(appHandle);
+
+ for (i = 0; i < count; i++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Load xml struct */
+ if (appHandleLoadAudioTypeXml(appHandle, audioType) == APP_ERROR)
+ {
+ WARN_LOG("Load audio type XML failed. (%s)\n", audioType->name);
+ }
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleLoadAudioTypeXml(AppHandle *appHandle, AudioType *audioType)
+{
+ char *audioTypeFile;
+
+ INFO_LOG("audioType = %s\n", audioType->name);
+
+ // Load AudioParamXml
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, AUDIO_PARAM_XML_POSFIX);
+ if (audioTypeFile == NULL)
+ {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, AUDIO_PARAM_XML_POSFIX);
+ return APP_ERROR;
+ }
+
+ audioType->audioParamDoc = xmlParseFile(audioTypeFile);
+
+ if (audioType->audioParamDoc == NULL)
+ {
+ ERR_LOG("Failed to parse %s\n", audioTypeFile);
+ free(audioTypeFile);
+
+ // Audio param file broken, load preload xml file instead
+ audioTypeFile = appHandleGetPreloadAudioTypeFilePath(appHandle, audioType->name, AUDIO_PARAM_XML_POSFIX);
+ if (audioTypeFile == NULL)
+ {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, AUDIO_PARAM_XML_POSFIX);
+ return APP_ERROR;
+ }
+
+ WARN_LOG("Trying to load preload %s file instead of broken XML file!\n", audioTypeFile);
+ audioType->audioParamDoc = xmlParseFile(audioTypeFile);
+ if (audioType->audioParamDoc == NULL)
+ {
+ ERR_LOG("Failed to parse %s\n", audioTypeFile);
+ free(audioTypeFile);
+ return APP_ERROR;
+ }
+ else
+ {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+ }
+ else
+ {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+
+ free(audioTypeFile);
+
+ // Load ParamUnitDescXml
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, PARAM_UNIT_DESC_XML_POSFIX);
+ if (audioTypeFile == NULL)
+ {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, PARAM_UNIT_DESC_XML_POSFIX);
+ return APP_ERROR;
+ }
+
+ audioType->paramUnitDescDoc = xmlParseFile(audioTypeFile);
+ if (audioType->paramUnitDescDoc == NULL)
+ {
+ ERR_LOG("Failed to parse %s%s\n", audioTypeFile, PARAM_UNIT_DESC_XML_POSFIX);
+ free(audioTypeFile);
+ return APP_ERROR;
+ }
+ else
+ {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+ free(audioTypeFile);
+
+#ifdef WIN32
+ // Load ParamTreeViewXml only for tuning tool
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, PARAM_TREE_VIEW_XML_POSFIX);
+ if (audioTypeFile == NULL)
+ {
+ INFO_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, PARAM_TREE_VIEW_XML_POSFIX);
+ free(audioTypeFile);
+ }
+ else
+ {
+ audioType->paramTreeViewDoc = xmlParseFile(audioTypeFile);
+ if (audioType->audioParamDoc == NULL)
+ {
+ DEBUG_LOG("Failed to parse %s%s\n", audioTypeFile, PARAM_TREE_VIEW_XML_POSFIX);
+ }
+ else
+ {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+ free(audioTypeFile);
+ }
+#endif
+
+ /* Get tab name info */
+ audioTypeParseTabName(audioType);
+
+ /* Get version info */
+ if (audioTypeParseXmlVer(audioType) == APP_ERROR)
+ {
+ ERR_LOG("Cannot parse xml version info. (%s)\n", audioType->name);
+ return APP_ERROR;
+ }
+
+#ifndef WIN32
+ /* XML Version check for device driver or HAL */
+ if (!audioTypeIsDeviceSupportedXmlVer(audioType))
+ {
+ abort();
+ }
+#endif
+
+ return APP_NO_ERROR;
+}
+
+EXPORT char *appHandleGetAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix)
+{
+ /* Check cus folder xml first */
+ struct stat fileStat;
+ int strLen;
+ char *path;
+
+ if (appHandle->xmlCusDir && !strcmp(posfix, AUDIO_PARAM_XML_POSFIX))
+ {
+ strLen = strlen(appHandle->xmlCusDir) + strlen(audioType) + strlen(posfix) + 2;
+ path = (char *)malloc(strLen);
+ sprintf(path, "%s%s%s%s", appHandle->xmlCusDir, FOLDER, audioType, posfix);
+
+ if (stat(path, &fileStat) != -1)
+ {
+ return path;
+ }
+ else
+ {
+ free(path);
+ }
+ }
+
+ /* Check default folder */
+ strLen = strlen(appHandle->xmlDir) + strlen(audioType) + strlen(posfix) + 2;
+ path = (char *)malloc(strLen);
+ sprintf(path, "%s%s%s%s", appHandle->xmlDir, FOLDER, audioType, posfix);
+
+ if (stat(path, &fileStat) != -1)
+ {
+ return path;
+ }
+
+ free(path);
+ return NULL;
+}
+
+EXPORT char *appHandleGetPreloadAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix)
+{
+ /* Check cus folder xml first */
+ struct stat fileStat;
+ int strLen;
+ char *path;
+
+ /* Check default folder */
+ strLen = strlen(appHandle->xmlDir) + strlen(audioType) + strlen(posfix) + 2;
+ path = (char *)malloc(strLen);
+ sprintf(path, "%s%s%s%s", appHandle->xmlDir, FOLDER, audioType, posfix);
+
+ if (stat(path, &fileStat) != -1)
+ {
+ return path;
+ }
+
+ free(path);
+ return NULL;
+}
+
+EXPORT int appHandleIsValidAudioType(AppHandle *appHandle, const char *audioType)
+{
+ char *filePath;
+
+ assert(appHandle != NULL);
+ filePath = appHandleGetAudioTypeFilePath(appHandle, audioType, PARAM_UNIT_DESC_XML_POSFIX);
+ if (filePath == NULL)
+ {
+ ERR_LOG("%s audio type is not valid! (%s is not exist)\n", audioType, filePath);
+ free(filePath);
+ return 0;
+ }
+
+ free(filePath);
+ return 1;
+}
+
+EXPORT AudioType *appHandleAddAudioType(AppHandle *appHandle, const char *audioTypeName)
+{
+ AudioType *audioType;
+
+ if (!appHandle)
+ {
+ ERR_LOG("The appHandle is NULL\n");
+ return NULL;
+ }
+
+ if (!audioTypeName)
+ {
+ ERR_LOG("The audioTypeName is NULL\n");
+ return NULL;
+ }
+
+ audioType = audioTypeCreate(appHandle, audioTypeName);
+
+ /* Add audio type to hash */
+ HASH_ADD_KEYPTR(hh, appHandle->audioTypeHash, audioType->name, strlen(audioType->name), audioType);
+
+ return audioType;
+}
+
+EXPORT AudioType *appHandleGetAudioTypeByIndex(AppHandle *appHandle, size_t index)
+{
+ AudioType *audioType = NULL;
+ size_t i = 0;
+
+ DEBUG_LOG("appHandle = 0x%p, index = %lu\n", appHandle, index);
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return NULL;
+ }
+
+ for (audioType = appHandle->audioTypeHash; audioType ; audioType = audioType->hh.next)
+ {
+ if (index == i++)
+ {
+ return audioType;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT AudioType *appHandleGetAudioTypeByName(AppHandle *appHandle, const char *name)
+{
+ AudioType *audioType = NULL;
+
+ INFO_LOG("appHandle = 0x%p, name = %s\n", appHandle, name);
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(appHandle->audioTypeHash, name, audioType);
+
+ return audioType;
+}
+
+EXPORT void appHandleReleaseAudioTypeHash(AppHandle *appHandle)
+{
+ if (appHandle->audioTypeHash)
+ {
+ AudioType *tmp, *item;
+ HASH_ITER(hh, appHandle->audioTypeHash, item, tmp)
+ {
+ HASH_DEL(appHandle->audioTypeHash, item);
+ audioTypeRelease(item);
+ }
+ }
+ appHandle->audioTypeHash = NULL;
+}
+
+EXPORT void appHandleDumpAudioTypeList(AppHandle *appHandle)
+{
+ size_t index = 0;
+ size_t numOfAudioType = appHandleGetNumOfAudioType(appHandle);
+ INFO_LOG("=================================\n");
+ INFO_LOG("Totoal num of Audio Type List = %lu\n", numOfAudioType);
+ for (index = 0; index < numOfAudioType; index++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ INFO_LOG("AudioType[%lu] = %s\n", index, audioType->name);
+ audioTypeDump(audioType);
+ }
+}
+
+EXPORT APP_STATUS appHandleLoadAllAudioTypeHash(AppHandle *appHandle)
+{
+ size_t index = 0;
+ size_t numOfAudioType = appHandleGetNumOfAudioType(appHandle);
+ /* Load stage1 information */
+ for (index = 0; index < numOfAudioType; index++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ audioTypeLoadStage1Hash(audioType);
+ }
+
+ /* Load stage2 information (ex: ParamTreeView's switch object)*/
+ for (index = 0; index < numOfAudioType; index++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, index);
+ audioTypeLoadStage2Hash(audioType);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT void appHandleRegXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN callbackFun)
+{
+ INFO_LOG("appHandle = 0x%p, callbackFun = 0x%p\n", appHandle, callbackFun);
+
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ if (appHandle && callbackFun)
+ {
+ /* Checking the duplicated callback function registration */
+ NotifyCb *notifyCb;
+ LL_FOREACH(appHandle->noficyCbList, notifyCb)
+ {
+ if (notifyCb->cb == callbackFun)
+ {
+ INFO_LOG("Same callback function found. ignore it\n");
+ appHandleUnlock(appHandle);
+ return;
+ }
+ }
+
+ notifyCb = malloc(sizeof(NotifyCb));
+ notifyCb->cb = callbackFun;
+ LL_APPEND(appHandle->noficyCbList, notifyCb);
+ }
+ else
+ {
+ WARN_LOG("Cannot register xml callback! (AppHandle = 0x%p, callbackFun = 0x%p)\n", appHandle, callbackFun);
+ }
+
+ appHandleUnlock(appHandle);
+}
+
+EXPORT void appHandleUnregXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN callbackFun)
+{
+ INFO_LOG("appHandle = 0x%p, callbackFun = 0x%p\n", appHandle, callbackFun);
+
+ appHandleWriteLock(appHandle, __FUNCTION__);
+
+ if (appHandle && callbackFun)
+ {
+ NotifyCb *notifyCb, *tmp;
+ LL_FOREACH_SAFE(appHandle->noficyCbList, notifyCb, tmp)
+ {
+ if (notifyCb->cb == callbackFun)
+ {
+ LL_DELETE(appHandle->noficyCbList, notifyCb);
+ free(notifyCb);
+ INFO_LOG("Callback function unregistered. (0x%p, 0x%p)\n", callbackFun, callbackFun);
+ break;
+ }
+ }
+ }
+ else
+ {
+ WARN_LOG("Cannot unregister xml callback! (AppHandle = 0x%p, callbackFun = %p)\n", appHandle, callbackFun);
+ }
+
+ appHandleUnlock(appHandle);
+}
+
+EXPORT void *appHandleThreadLoop(void *arg)
+{
+#if defined(WIN32)
+ /* Always disable on WIN32 */
+ return NULL;
+#else
+ /* This thread only work on linux platform */
+ /* Only eng load could monitor custom folder */
+ AppHandle *appHandle = (AppHandle *)arg;
+ ssize_t len;
+ char buf[INOTIFY_BUF_SIZE];
+ char *ptr;
+ const struct inotify_event *event;
+
+#if !defined(APP_FORCE_ENABLE_CUS_XML) && !defined(CONFIG_MT_ENG_BUILD)
+ /* User load, check NVRam status */
+ if (isCustXmlEnable())
+ {
+ INFO_LOG("User load, cust xml enabled\n");
+ }
+ else
+ {
+ INFO_LOG("User load but cust xml disabled\n");
+ return NULL;
+ }
+#endif
+
+ if (!appHandle->xmlCusDir)
+ {
+ WARN_LOG("xmlCusDir is NULL, don't run the appHandleThreadLoop !!!");
+ exit(1);
+ }
+
+ /* Create folder first to make inotify work */
+ utilMkdir(appHandle->xmlCusDir);
+
+ /* Register signal handler */
+ struct sigaction sa;
+ sa.sa_handler = NULL;
+ sa.sa_sigaction = &signalHandler;
+ sa.sa_flags = SA_SIGINFO;
+ sigemptyset(&sa.sa_mask);
+
+ if (sigaction(SIGUSR1, &sa, NULL) < 0)
+ {
+ ERR_LOG("sigaction fail");
+ exit(1);
+ }
+
+ /* inotify registration */
+ appHandle->inotifyFd = inotify_init();
+ if (appHandle->inotifyFd < 0)
+ {
+ ERR_LOG("inotify_init failed !!!");
+ exit(1);
+ }
+
+ INFO_LOG("Add inotify monitor path = %s, fd = %d\n", appHandle->xmlCusDir, appHandle->inotifyFd);
+
+ while (1)
+ {
+ if (inotify_add_watch(appHandle->inotifyFd, appHandle->xmlCusDir, IN_CLOSE_WRITE) < 0)
+ {
+ ERR_LOG("inotify_add_watch failed !!! try again...");
+ utilMkdir(appHandle->xmlCusDir);
+ utilUsleep(1000000);
+ } else {
+ break;
+ }
+ }
+
+ while (!appHandle->appThreadExit)
+ {
+ INFO_LOG("inotify read waiting... (fd = %d)\n", appHandle->inotifyFd);
+ len = read(appHandle->inotifyFd, buf, sizeof(buf));
+
+ if (len < 0)
+ {
+ if (appHandle->appThreadExit)
+ {
+ break;
+ }
+
+ ERR_LOG("inotify read error!\n");
+ pthread_exit(NULL);
+ }
+
+ /* Loop over all events in the buffer */
+ for (ptr = buf; ptr < buf + len; ptr += sizeof(struct inotify_event) + event->len)
+ {
+ event = (const struct inotify_event *) ptr;
+ if (event->len)
+ {
+ NotifyCb *notifyCb;
+ char audioTypeName[MAX_AUDIO_TYPE_LEN];
+ AudioType *audioType;
+
+ if (strstr(event->name, AUDIO_PARAM_XML_POSFIX) == NULL)
+ {
+ INFO_LOG("File name's posfix is not AudioParam.xml (%s)\n", event->name);
+ continue;
+ }
+
+ sscanf(event->name, AUDIO_TYPE_FMT_STR(MAX_AUDIO_TYPE_LEN), audioTypeName);
+ INFO_LOG("XML File chanegd (%s)\n", event->name);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (audioType)
+ {
+ audioType->allowReload = 1;
+ }
+
+ /* notify users */
+ INFO_LOG("Notify all callback function.\n");
+ LL_FOREACH(appHandle->noficyCbList, notifyCb)
+ {
+ INFO_LOG("Notify callback function. (0x%p, %pf)\n", notifyCb->cb, notifyCb->cb);
+ (*notifyCb->cb)(appHandle, audioTypeName);
+ }
+ }
+ }
+ }
+
+ inotify_rm_watch(appHandle->inotifyFd, IN_CLOSE_NOWRITE);
+
+ if (appHandle->inotifyFd)
+ {
+ INFO_LOG("close inotify handle %d\n", appHandle->inotifyFd);
+ close(appHandle->inotifyFd);
+ }
+
+ INFO_LOG("appHandleThreadLoop exit\n");
+ return NULL;
+#endif
+}
+
+EXPORT APP_STATUS appHandleReloadAudioType(AppHandle *appHandle, const char *audioTypeName)
+{
+ /* Release old audioType */
+ char *audioTypeFile;
+ AudioType *audioType;
+
+ INFO_LOG("appHandle = 0x%p, audioTypeName = %s\n", appHandle, audioTypeName);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType)
+ {
+ ERR_LOG("Invalid AudioType name = %s\n", audioTypeName);
+ return APP_ERROR;
+ }
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ /* Checking if the audioType reloaded */
+ if (!audioType->allowReload)
+ {
+ INFO_LOG("AudioType is already reloaded!\n");
+ audioTypeUnlock(audioType);
+ return APP_NO_ERROR;
+ }
+
+ /* Release audio param data */
+ audioTypeReleaseAudioParam(audioType);
+ /* Release audio param xml */
+ if (audioType->audioParamDoc)
+ {
+ xmlFreeDoc(audioType->audioParamDoc);
+ }
+
+ /* Load AudioParam XML */
+ audioTypeFile = appHandleGetAudioTypeFilePath(appHandle, audioType->name, AUDIO_PARAM_XML_POSFIX);
+ if (audioTypeFile == NULL)
+ {
+ WARN_LOG("The AudioTypeFile(%s%s) doesn't exist.\n", audioType->name, AUDIO_PARAM_XML_POSFIX);
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ audioType->audioParamDoc = xmlParseFile(audioTypeFile);
+ if (audioType->audioParamDoc == NULL)
+ {
+ ERR_LOG("Failed to parse %s\n", audioTypeFile);
+ free(audioTypeFile);
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+ else
+ {
+ INFO_LOG("Load xml file successfully. (%s)\n", audioTypeFile);
+ }
+
+ free(audioTypeFile);
+
+ /* Load AudioParam hash */
+ if (audioTypeLoadParamUnitHash(audioType) == APP_ERROR)
+ {
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamTreeHash(audioType) == APP_ERROR)
+ {
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ /* AudioType reloaded */
+ audioType->allowReload = 0;
+
+ audioTypeUnlock(audioType);
+ return APP_NO_ERROR;
+}
+
+EXPORT const char *appHandleGetFeatureOptionValue(AppHandle *appHandle, const char *featureOptionName)
+{
+ FeatureOption *featureOption = NULL;
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL\n");
+ return NULL;
+ }
+
+ if (!featureOptionName)
+ {
+ DEBUG_LOG("featureOptionName is NULL\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(appHandle->featureOptionsHash, featureOptionName, featureOption);
+ if (featureOption)
+ {
+ return featureOption->value;
+ }
+
+ return NULL;
+}
+
+EXPORT int appHandleIsFeatureOptionEnabled(AppHandle *appHandle, const char *featureOptionName)
+{
+ const char *featureOptionValueStr;
+ if (!appHandle)
+ {
+ WARN_LOG("appHandle is NULL\n");
+ return 0;
+ }
+
+ if (!featureOptionName)
+ {
+ WARN_LOG("featureOptionName is NULL\n");
+ return 0;
+ }
+
+ featureOptionValueStr = appHandleGetFeatureOptionValue(appHandle, featureOptionName);
+ if (featureOptionValueStr)
+ {
+ return !strcmp(featureOptionValueStr, "yes");
+ }
+ else
+ {
+ DEBUG_LOG("No %s such feature option\n", featureOptionName);
+ return 0;
+ }
+}
+
+EXPORT size_t appHandleGetNumOfFeatureOption(AppHandle *appHandle)
+{
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL!\n");
+ return APP_ERROR;
+ }
+
+ return HASH_COUNT(appHandle->featureOptionsHash);
+}
+
+EXPORT FeatureOption *appHandleGetFeatureOptionByIndex(AppHandle *appHandle, size_t index)
+{
+ FeatureOption *featureOption = NULL;
+ size_t i = 0;
+
+ if (!appHandle)
+ {
+ ERR_LOG("appHandle is NULL\n");
+ return NULL;
+ }
+
+ for (featureOption = appHandle->featureOptionsHash; featureOption ; featureOption = featureOption->hh.next)
+ {
+ if (index == i++)
+ {
+ return featureOption;
+ }
+ }
+
+ return NULL;
+}
+
+/* This function is only work for windows */
+EXPORT void appHandleRedirectIOToConsole()
+{
+ INFO_LOG("");
+#ifdef WIN32
+ outputLogToStdout = 1;
+ redirectIOToConsole();
+#endif
+}
+
+int removeNodeByFeatureOption(AppHandle *appHandle, xmlNode *categoryNode)
+{
+ /* Process Category of CategoryTpe Node */
+ xmlChar *featureOption = xmlNodeGetProp(categoryNode, ATTRI_FEATURE_OPTION);
+ if (featureOption)
+ {
+ int Not = 0;
+ if (featureOption[0] == '!')
+ {
+ Not = 1;
+ featureOption++;
+ }
+
+ if (!(Not ^ appHandleIsFeatureOptionEnabled(appHandle, (char *)featureOption)))
+ {
+ xmlNode *deleteNode = categoryNode;
+ categoryNode = categoryNode->next;
+
+ INFO_LOG("Remove %s category (%s feature option is disabled)\n", xmlNodeGetProp(deleteNode, ATTRI_NAME), featureOption);
+ xmlUnlinkNode(deleteNode);
+ xmlFreeNode(deleteNode);
+ return 1;
+ }
+ }
+
+ return 0;
+}
+
+EXPORT void appHandleReviseXmlDocByFeatureOptions(AppHandle *appHandle)
+{
+ // Travel all audioType's category & category group node
+ size_t i;
+ size_t numOfAppHandle = appHandleGetNumOfAudioType(appHandle);
+ for (i = 0; i < numOfAppHandle; i++)
+ {
+ xmlNode *categoryTypeListNode, *categoryTypeNode, *categoryGroupNode, *categoryNode, *prevCategoryGroupNode, *prevCategoryNode, *prevCategoryTypeNode;
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+ categoryTypeListNode = audioTypeGetCategoryTypeListNode(audioType);
+ if (!categoryTypeListNode)
+ {
+ continue;
+ }
+
+ categoryTypeNode = categoryTypeListNode->children;
+ while ((categoryTypeNode = findXmlNodeByElemName(categoryTypeNode->next, ELEM_CATEGORY_TYPE)))
+ {
+ prevCategoryTypeNode = categoryTypeNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryTypeNode))
+ {
+ categoryTypeNode = prevCategoryTypeNode;
+ continue;
+ }
+
+ /* Process CategoryType node */
+ categoryGroupNode = categoryTypeNode->children;
+ while ((categoryGroupNode = findXmlNodeByElemName(categoryGroupNode->next, ELEM_CATEGORY_GROUP)))
+ {
+ /* Process CategoryGroup of CategoryType Node */
+ prevCategoryGroupNode = categoryGroupNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryGroupNode))
+ {
+ categoryGroupNode = prevCategoryGroupNode;
+ continue;
+ }
+
+ categoryNode = categoryGroupNode->children;
+ while ((categoryNode = findXmlNodeByElemName(categoryNode->next, ELEM_CATEGORY)))
+ {
+ /* Process Category of CategoryGroup Node */
+ prevCategoryNode = categoryNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryNode))
+ {
+ categoryNode = prevCategoryNode;
+ }
+ }
+ }
+
+ categoryNode = categoryTypeNode->children;
+ while ((categoryNode = findXmlNodeByElemName(categoryNode->next, ELEM_CATEGORY)))
+ {
+ prevCategoryNode = categoryNode->prev;
+ if (removeNodeByFeatureOption(appHandle, categoryNode))
+ {
+ categoryNode = prevCategoryNode;
+ }
+ }
+ }
+ }
+}
+
+EXPORT APP_STATUS appHandleCompressFiles(const char* srcDir, const char* destFile)
+{
+#ifdef WIN32
+ INFO_LOG("%s(), src = %s, dest = %s\n", __FUNCTION__, srcDir, destFile);
+ if (!srcDir || !destFile)
+ {
+ ERR_LOG("%s(), srcDir or destFile is NULL\n", __FUNCTION__);
+ return APP_ERROR;
+ } else {
+ UT_string *path = NULL;
+ utstring_new(path);
+ utstring_printf(path, "a -tzip %s %s\\*", destFile, srcDir);
+ utilShellExecute("7za.exe", utstring_body(path));
+ utstring_free(path);
+ }
+#else
+ ERR_LOG("Not support on linux\n");
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleUncompressFile(const char* srcFile, const char* destDir)
+{
+#ifdef WIN32
+ INFO_LOG("%s(), src = %s, dest = %s\n", __FUNCTION__, srcFile, destDir);
+ if (!srcFile || !destDir)
+ {
+ ERR_LOG("%s(), srcFile or destDir is NULL\n", __FUNCTION__);
+ return APP_ERROR;
+ } else {
+ UT_string *path = NULL;
+ utstring_new(path);
+ utstring_printf(path, "x %s -y -o%s\\", srcFile, destDir);
+ utilShellExecute("7za.exe", utstring_body(path));
+ utstring_free(path);
+ }
+#else
+ ERR_LOG("Not support on linux\n");
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS appHandleGetAudioTypeSupportedVerInfo(const char* audioTypeName, int* paramUnitDescVerMaj, int* paramUnitDescVerMin, int* audioParamVerMaj, int* audioParamVerMin)
+{
+ int i = 0;
+ while(audioTypeSupportVerInfo[i].audioTypeName != NULL)
+ {
+ if (!strcmp(audioTypeName, audioTypeSupportVerInfo[i].audioTypeName))
+ {
+ *paramUnitDescVerMaj = audioTypeSupportVerInfo[i].paramUnitDescVerMaj;
+ *paramUnitDescVerMin = audioTypeSupportVerInfo[i].paramUnitDescVerMin;
+ *audioParamVerMaj = audioTypeSupportVerInfo[i].audioParamVerMaj;
+ *audioParamVerMin = audioTypeSupportVerInfo[i].audioParamVerMin;
+ return APP_NO_ERROR;
+ }
+ i++;
+ }
+
+ ERR_LOG("%s AudioType version support info not found!\n", audioTypeName);
+ return APP_ERROR;
+}
+
+EXPORT void appHandleShowAudioTypeSupportedVerInfo(AppHandle* appHandle)
+{
+ int i = 0;
+ INFO_LOG("=======================\n");
+ while(audioTypeSupportVerInfo[i].audioTypeName != NULL)
+ {
+ INFO_LOG("[%d] %s, ParamUnitDesc ver(%d.%d), AudioParam ver(%d.%d)\n",
+ i,
+ audioTypeSupportVerInfo[i].audioTypeName, audioTypeSupportVerInfo[i].paramUnitDescVerMaj,
+ audioTypeSupportVerInfo[i].paramUnitDescVerMin, audioTypeSupportVerInfo[i].audioParamVerMaj, audioTypeSupportVerInfo[i].audioParamVerMin);
+ i++;
+ }
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParser.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParser.h
new file mode 100644
index 0000000..9449a1d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParser.h
@@ -0,0 +1,562 @@
+#ifndef AUDIO_PARAM_PARSER_H
+#define AUDIO_PARAM_PARSER_H
+
+#include <libxml/parser.h>
+#include <libxml/xmlreader.h>
+#include <libxml/tree.h>
+
+#ifdef WIN32
+#pragma warning( disable : 4996 )
+#ifdef __cplusplus
+#define EXPORT extern "C" __declspec(dllexport)
+#else
+#define EXPORT __declspec(dllexport)
+#endif
+#else /* WIN32*/
+#define EXPORT
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif
+
+#include "utstring.h"
+#include "uthash.h"
+#include "utlist.h"
+
+#ifndef WIN32
+#include <pthread.h>
+#endif
+
+/* Enable cus xml support */
+//#define APP_FORCE_ENABLE_CUS_XML
+
+/* Debugging Macro Definition */
+//#define FORCE_DEBUG_LEVEL
+
+#define XML_FOLDER_ON_TUNING_TOOL ".\\preload_xml\\"
+#define XML_CUS_FOLDER_ON_TUNING_TOOL ".\\cus_xml\\"
+#define XML_FOLDER_ON_DEVICE "/system/etc/audio_param/"
+#define XML_CUS_FOLDER_ON_DEVICE "/home/root/.audio_param/"
+
+#define MAX_AUDIO_TYPE_LEN 50
+#define INOTIFY_BUF_SIZE 512
+
+#define AUDIO_PARAM_XML_POSFIX "_AudioParam.xml"
+#define PARAM_UNIT_DESC_XML_POSFIX "_ParamUnitDesc.xml"
+#define PARAM_TREE_VIEW_XML_POSFIX "_ParamTreeView.xml"
+#define FEATURE_OPTIONS_XML "AudioParamOptions.xml"
+
+/* XML element definition */
+#define ELEM_AUDIO_FEATURE_OPTIONS "AudioParamOptions"
+#define ELEM_PARAM "Param"
+#define ELEM_PARAM_UNIT_DESC "ParamUnitDesc"
+#define ELEM_CATEGORY_TYPE_LIST "CategoryTypeList"
+#define ELEM_CATEGORY_TYPE "CategoryType"
+#define ELEM_CATEGORY_GROUP "CategoryGroup"
+#define ELEM_CATEGORY "Category"
+
+#define ELEM_AUDIO_PARAM "AudioParam"
+#define ELEM_PARAM_TREE "ParamTree"
+#define ELEM_PARAM_UNIT_POOL "ParamUnitPool"
+#define ELEM_PARAM_UNIT "ParamUnit"
+#define ELEM_PARAM "Param"
+#define ELEM_FIELD "Field"
+
+#define ELEM_PARAM_TREE_VIEW "ParamTreeView"
+#define ELEM_TREE_ROOT "TreeRoot"
+#define ELEM_SHEET "Sheet"
+#define ELEM_FEATURE "Feature"
+#define ELEM_FIELD_LIST "FieldList"
+#define ELEM_CATEGORY_PATH_LIST "CategoryPathList"
+
+/* XML attribute definition */
+#define ATTRI_NAME "name"
+#define ATTRI_TAB_NAME "tab_name"
+#define ATTRI_VERSION "version"
+#define ATTRI_WORDING "wording"
+#define ATTRI_PARAM_ID "param_id"
+#define ATTRI_PATH "path"
+#define ATTRI_VALUE "value"
+#define ATTRI_TYPE "type"
+#define ATTRI_ARRAY_INDEX "array_index"
+#define ATTRI_BIT "bit"
+#define ATTRI_CHECK_LIST "check_list"
+#define ATTRI_ALIAS "alias"
+#define ATTRI_FEATURE_OPTION "feature_option"
+#define ATTRI_SWITCH_AUDIO_TYPE "switch_audio_type"
+#define ATTRI_SWITCH_PARAM "switch_param"
+#define ATTRI_SWITCH_FIELD "switch_field"
+#define ATTRI_AUDIO_TYPE "audio_type"
+#define ATTRI_PARAM "param"
+#define ATTRI_VISIBLE "visible"
+
+/* DATA_TYPE string */
+#define DATA_TYPE_UNKNOWN_STRING "unknown"
+#define DATA_TYPE_STR_STRING "string"
+#define DATA_TYPE_INT_STRING "int"
+#define DATA_TYPE_UINT_STRING "uint"
+#define DATA_TYPE_FLOAT_STRING "float"
+#define DATA_TYPE_BYTE_ARRAY_STRING "byte_array"
+#define DATA_TYPE_UBYTE_ARRAY_STRING "ubyte_array"
+#define DATA_TYPE_SHORT_ARRAY_STRING "short_array"
+#define DATA_TYPE_USHORT_ARRAY_STRING "ushort_array"
+#define DATA_TYPE_INT_ARRAY_STRING "int_array"
+#define DATA_TYPE_UINT_ARRAY_STRING "uint_array"
+#define DATA_TYPE_DOUBLE_ARRAY_STRING "double_array"
+#define DATA_TYPE_FIELD_STRING "Field"
+
+#define ARRAY_SEPERATOR ","
+#define ARRAY_SEPERATOR_CH ','
+#define PARAM_FIELD_NAME_SEPERATOR "/"
+
+#define AUDIO_TYPE_FMT_STR(STR_LEN) AUDIO_TYPE_FMT(STR_LEN)
+#define AUDIO_TYPE_FMT(STR_LEN) "%"#STR_LEN"[^_]"
+
+typedef struct _AppHandle AppHandle;
+typedef struct _AudioType AudioType;
+typedef struct _FieldInfo FieldInfo;
+typedef struct _Category Category;
+typedef struct _CategoryAlias CategoryAlias;
+typedef struct _CategoryGroup CategoryGroup;
+typedef struct _CategoryNameAlias CategoryNameAlias;
+typedef struct _CategoryPath CategoryPath;
+typedef struct _CategoryType CategoryType;
+typedef struct _Feature Feature;
+typedef struct _FeatureField FeatureField;
+typedef struct _FeatureOption FeatureOption;
+typedef struct _Param Param;
+typedef struct _ParamInfo ParamInfo;
+typedef struct _ParamTreeView ParamTreeView;
+typedef struct _ParamUnit ParamUnit;
+typedef struct _TreeRoot TreeRoot;
+typedef struct _NotifyCb NotifyCb;
+
+typedef void(*NOTIFY_CB_FUN)(AppHandle *appHandle, const char *audioType);
+
+extern int appDebugLevel;
+
+typedef enum
+{
+DEBUG_LEVEL = 0,
+INFO_LEVEL,
+WARN_LEVEL,
+ERR_LEVEL,
+} MSG_LEVEL;
+
+typedef enum
+{
+ APP_ERROR = 0,
+ APP_NO_ERROR = 1,
+} APP_STATUS;
+
+typedef enum
+{
+ PARENT_IS_CATEGORY_GROUP = 0,
+ PARENT_IS_CATEGORY_TYPE = 1,
+} CATEGORY_PARENT_TYPE;
+
+/*
+ Due to the system/media/camera/include/system/camera_metadata.h declare the same TYPE_FLOAT enum name,
+ If module include the camera_metadata.h and AudioParamParser.h, AudioParamParser change the DATA_TYPE
+ enum decleration to avoid conflict.
+ User could using the APP_TYPE_FLOAT enum instead the TYPE_FLOAT.
+*/
+#ifndef SYSTEM_MEDIA_INCLUDE_ANDROID_CAMERA_METADATA_H
+typedef enum
+{
+ TYPE_UNKNOWN = -1,
+ TYPE_STR,
+ TYPE_INT,
+ TYPE_UINT,
+ TYPE_FLOAT,
+ TYPE_BYTE_ARRAY,
+ TYPE_UBYTE_ARRAY,
+ TYPE_SHORT_ARRAY,
+ TYPE_USHORT_ARRAY,
+ TYPE_INT_ARRAY,
+ TYPE_UINT_ARRAY,
+ TYPE_DOUBLE_ARRAY,
+ TYPE_FIELD,
+} DATA_TYPE;
+#else
+typedef enum
+{
+ APP_TYPE_UNKNOWN = -1,
+ APP_TYPE_STR,
+ APP_TYPE_INT,
+ APP_TYPE_UINT,
+ APP_TYPE_FLOAT,
+ APP_TYPE_BYTE_ARRAY,
+ APP_TYPE_UBYTE_ARRAY,
+ APP_TYPE_SHORT_ARRAY,
+ APP_TYPE_USHORT_ARRAY,
+ APP_TYPE_INT_ARRAY,
+ APP_TYPE_UINT_ARRAY,
+ APP_TYPE_DOUBLE_ARRAY,
+ APP_TYPE_FIELD,
+} DATA_TYPE;
+#endif
+
+typedef union CategoryParent
+{
+ Category *category; /* Link to parent Category if it's not CategoryGroup */
+ CategoryType *categoryType; /* Link to parent CategoryType if it's CategoryGroup */
+} CategoryParent;
+
+/* UHash the parameter tree info from ParamTreeView.xml */
+struct _CategoryPath
+{
+ char *path;
+ Feature *feature;
+ UT_hash_handle hh;
+};
+
+struct _FeatureField
+{
+ FieldInfo *fieldInfo;
+ UT_hash_handle hh;
+};
+
+struct _Feature
+{
+ char *name;
+ char *featureOption;
+ FieldInfo *switchFieldInfo;
+ CategoryPath *categoryPathHash;
+ FeatureField *featureFieldHash;
+ AudioType *audioType;
+ UT_hash_handle hh;
+};
+
+struct _TreeRoot
+{
+ char *name; /* Key */
+ FieldInfo *switchFieldInfo;
+ xmlNode *treeRootNode; /* Used to traversal tree */
+ Feature *featureHash; /* Used to opt feature information */
+ ParamTreeView *paramTreeView; /* Belong to which paramTreeView */
+ UT_hash_handle hh;
+};
+
+struct _ParamTreeView
+{
+ int verMaj;
+ int verMin;
+ AudioType *audioType;
+ TreeRoot *treeRootHash;
+};
+
+/* Hash the Param & Field info from ParamUnitDesc.xml */
+struct _FieldInfo
+{
+ char *name; /* key */
+ size_t arrayIndex;
+ int startBit;
+ int endBit;
+ char *checkListStr; /* check list string array */
+ struct _ParamInfo *paramInfo; /* Link to parent ParamInfo */
+ UT_hash_handle hh; /* hash handle */
+};
+
+struct _ParamInfo
+{
+ char *name; /* key */
+ DATA_TYPE dataType;
+ struct _FieldInfo *fieldInfoHash;
+ AudioType *audioType; /* Link to parent AudioType */
+ UT_hash_handle hh; /* hash handle */
+};
+
+/* Hash the param name with value from AudioParam.xml */
+struct _Param
+{
+ char *name; /* key */
+ void *data; /* raw data */
+ size_t arraySize; /* Array size if the data is the array pointer */
+ ParamInfo *paramInfo;
+ struct _ParamUnit *paramUnit; /* Link to it's ParamUnit */
+ UT_hash_handle hh; /* hash handle */
+};
+
+/* Hash the id with ParamUnit from AudioParam.xml */
+struct _ParamUnit
+{
+ int paramId; /* key */
+ int refCount;
+ AudioType *audioType; /* Link to it's AudioType */
+ struct _Param *paramHash; /* ParamUnit's params */
+ UT_hash_handle hh;
+};
+
+/* Hash ParamTree info from AudioParam.xml */
+typedef struct
+{
+ char *categoryPath; /* key */
+ int paramId; /* Param id */
+ UT_hash_handle hh;
+} ParamTree;
+
+struct _Category
+{
+ char *wording; /* key */
+ char *name;
+ int visible;
+ CategoryParent parent;
+ CATEGORY_PARENT_TYPE parentType;
+ UT_hash_handle hh;
+};
+
+struct _CategoryAlias
+{
+ char *alias; /* key */
+ Category *category;
+ UT_hash_handle hh;
+};
+
+struct _CategoryGroup
+{
+ char *wording; /* key */
+ char *name;
+ int visible;
+ Category *categoryHash; /* Link to children */
+ CategoryType *categoryType; /* Link to parent */
+ UT_hash_handle hh;
+};
+
+struct _CategoryType
+{
+ char *wording; /* key */
+ char *name;
+ int visible;
+ CategoryGroup *categoryGroupHash; /* Link to children */
+ Category *categoryHash; /* Link to children */
+ CategoryAlias *categoryAliasHash; /* Save category alias information */
+ AudioType *audioType; /* Link to parent */
+ UT_hash_handle hh;
+};
+
+struct _AudioType
+{
+ char *name;
+ char *tabName;
+ int paramUnitDescVerMaj; /* ParamUniDesc version */
+ int paramUnitDescVerMin;
+ int audioParamVerMaj; /* AudioParam version */
+ int audioParamVerMin;
+ xmlDocPtr audioParamDoc;
+ xmlDocPtr paramUnitDescDoc;
+ xmlDocPtr paramTreeViewDoc;
+ ParamTree *paramTreeHash;
+ ParamUnit *paramUnitHash;
+ ParamInfo *paramInfoHash;
+ ParamTreeView *paramTreeView;
+ int unusedParamId;
+ int dirty; /* Indicate if the audio type modified without saveing*/
+ int allowReload; /* Indicate the audio type can be reload since xml updated */
+ CategoryType *categoryTypeHash;
+#ifndef WIN32
+ pthread_rwlock_t lock;
+ const char *lockCallerFun; /* Used to cache the lock holder */
+#endif
+ AppHandle *appHandle; /* Link to it's appHandle parent */
+ UT_hash_handle hh;
+};
+
+struct _FeatureOption
+{
+ char *name;
+ char *value;
+ UT_hash_handle hh;
+};
+
+struct _NotifyCb
+{
+ NOTIFY_CB_FUN cb;
+ char test[512];
+ struct _NotifyCb *next, *pre;
+};
+
+struct _AppHandle
+{
+ char *xmlDir;
+ char *xmlCusDir;
+ AudioType *audioTypeHash;
+ FeatureOption *featureOptionsHash;
+ xmlDocPtr featureOptionsDoc;
+#ifndef WIN32
+ pthread_t appThread;
+ int appThreadExit;
+ int inotifyFd;
+ pthread_rwlock_t lock;
+ const char *lockCallerFun; /* Used to cache the lock holder */
+#endif
+ NotifyCb *noficyCbList;
+};
+
+typedef struct AudioTypeVerInfo{
+ const char* audioTypeName;
+ int paramUnitDescVerMaj;
+ int paramUnitDescVerMin;
+ int audioParamVerMaj;
+ int audioParamVerMin;
+} AudioTypeVerInfo;
+
+static const AudioTypeVerInfo audioTypeSupportVerInfo [] =
+{
+ /* AudioType name, ParamUnitDescVer (maj, min), AudioParamVer (maj, min) */
+ {"AudioCommonSetting", 1, 0, 1, 0},
+ {"PlaybackACF", 1, 0, 1, 0},
+ {"Playback", 1, 0, 1, 0},
+ {"PlaybackDRC", 1, 0, 1, 0},
+ {"PlaybackHCF", 1, 0, 1, 0},
+ {"PlaybackVolAna", 1, 0, 1, 0},
+ {"PlaybackVolDigi", 1, 0, 1, 0},
+ {"PlaybackVolUI", 1, 0, 1, 0},
+ {"Record", 1, 0, 1, 0},
+ {"RecordDMNR", 1, 0, 1, 0},
+ {"RecordFIR", 1, 0, 1, 0},
+ {"RecordUI", 1, 0, 1, 0},
+ {"RecordVol", 1, 0, 1, 0},
+ {"RecordVolUI", 1, 0, 1, 0},
+ {"Speech", 1, 0, 1, 0},
+ {"SpeechDMNR", 1, 0, 1, 0},
+ {"SpeechGeneral", 1, 0, 1, 0},
+ {"SpeechMagiClarity", 1, 0, 1, 0},
+ {"SpeechUI", 1, 0, 1, 0},
+ {"SpeechVol", 1, 0, 1, 0},
+ {"SpeechVolUI", 1, 0, 1, 0},
+ {"VoIP", 1, 0, 1, 0},
+ {"VoIPDMNR", 1, 0, 1, 0},
+ {"VoIPGeneral", 1, 0, 1, 0},
+ {"VoIPUI", 1, 0, 1, 0},
+ {"VoIPVol", 1, 0, 1, 0},
+ {"VoIPVolUI", 1, 0, 1, 0},
+ {"Volume", 1, 0, 1, 0},
+ {"VolumeGainMap", 1, 0, 1, 0},
+ {NULL, 0, 0, 0, 0}
+};
+
+/***********************
+ * Public API
+ **********************/
+EXPORT void appSetDebugLevel(MSG_LEVEL level);
+EXPORT MSG_LEVEL appGetDebugLevel(void);
+
+/* appHandle API */
+EXPORT APP_STATUS appHandleInit(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleUninit(AppHandle *appHandle);
+EXPORT void appHandleRedirectIOToConsole(void);
+EXPORT AppHandle *appHandleGetInstance(void); /* Never uninit global instance */
+EXPORT size_t appHandleGetNumOfAudioType(AppHandle *appHandle);
+EXPORT AudioType *appHandleGetAudioTypeByIndex(AppHandle *appHandle, size_t index);
+EXPORT AudioType *appHandleGetAudioTypeByName(AppHandle *appHandle, const char *name);
+EXPORT const char *appHandleGetFeatureOptionValue(AppHandle *appHandle, const char *featureOptionName);
+EXPORT int appHandleIsFeatureOptionEnabled(AppHandle *appHandle, const char *featureOptionName);
+EXPORT size_t appHandleGetNumOfFeatureOption(AppHandle *appHandle);
+EXPORT FeatureOption *appHandleGetFeatureOptionByIndex(AppHandle *appHandle, size_t index);
+EXPORT const char *appHandleGetBuildTimeStamp();
+EXPORT APP_STATUS appHandleCompressFiles(const char* srcDir, const char* destFile);
+EXPORT APP_STATUS appHandleUncompressFile(const char* srcFile, const char* destDir);
+
+/* Following 4 APIs will acquire app handle write lock automatically */
+EXPORT APP_STATUS appHandleParseXml(AppHandle *appHandle, const char *dir, const char *cusDir);
+EXPORT APP_STATUS appHandleReloadAudioType(AppHandle *appHandle, const char *audioTypeName);
+EXPORT void appHandleRegXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN nofiyCallback);
+EXPORT void appHandleUnregXmlChangedCb(AppHandle *appHandle, NOTIFY_CB_FUN nofiyCallback);
+
+/* AudioType API */
+EXPORT APP_STATUS audioTypeIsTuningToolSupportedXmlVer(AudioType *audioType);
+EXPORT APP_STATUS audioTypeIsDeviceSupportedXmlVer(AudioType *audioType);
+EXPORT size_t audioTypeGetNumOfCategoryType(AudioType *audioType);
+EXPORT CategoryType *audioTypeGetCategoryTypeByIndex(AudioType *audioType, size_t idnex);
+EXPORT CategoryType *audioTypeGetCategoryTypeByName(AudioType *audioType, const char *categoryTypeName);
+EXPORT CategoryType *audioTypeGetCategoryTypeByWording(AudioType *audioType, const char *categoryTypeWording);
+EXPORT xmlNode *audioTypeGetCategoryTypeListNode(AudioType *audioType);
+EXPORT ParamUnit *audioTypeGetParamUnit(AudioType *audioType, const char *categoryPath);
+EXPORT size_t audioTypeGetNumOfParamInfo(AudioType *audioType);
+EXPORT ParamInfo *audioTypeGetParamInfoByIndex(AudioType *audioType, size_t index);
+EXPORT ParamInfo *audioTypeGetParamInfoByName(AudioType *audioType, const char *paramName);
+EXPORT APP_STATUS audioTypeSaveAudioParamXml(AudioType *audioType, const char *saveDir, int clearDirtyBit);
+EXPORT int audioTypeReadLock(AudioType *audioType, const char *callerFun);
+EXPORT int audioTypeWriteLock(AudioType *audioType, const char *callerFun);
+EXPORT int audioTypeUnlock(AudioType *audioType);
+EXPORT TreeRoot *audioTypeGetTreeRoot(AudioType *audioType, const char *treeRootName);
+
+/* Following 3 write APIs will acquire write lock automatically */
+EXPORT APP_STATUS audioTypeSetParamData(AudioType *audioType, const char *categoryPath, ParamInfo *paramName, void *dataPtr, int arraySize);
+EXPORT APP_STATUS audioTypeSetFieldData(AudioType *audioType, const char *categoryPath, FieldInfo *fieldInfo, unsigned int val);
+EXPORT APP_STATUS audioTypeParamUnitCopy(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath);
+
+/* CategoryType API */
+EXPORT size_t categoryTypeGetNumOfCategoryGroup(CategoryType *categoryType);
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByIndex(CategoryType *categoryType, size_t index);
+EXPORT CategoryGroup *categoryTypeGetCategoryGroupByWording(CategoryType *categoryType, const char *wording);
+EXPORT size_t categoryTypeGetNumOfCategory(CategoryType *categoryType);
+EXPORT Category *categoryTypeGetCategoryByIndex(CategoryType *categoryType, size_t index);
+EXPORT Category *categoryTypeGetCategoryByWording(CategoryType *categoryType, const char *wording);
+
+/* CategoryGroup API */
+EXPORT size_t categoryGroupGetNumOfCategory(CategoryGroup *categoryGroup);
+EXPORT Category *categoryGroupGetCategoryByIndex(CategoryGroup *categoryGroup, size_t index);
+EXPORT Category *categoryGroupGetCategoryByWording(CategoryGroup *categoryGroup, const char *index);
+
+/* CategoryAlias API */
+EXPORT CategoryAlias *categoryAliasCreate(const char *alias, Category *category);
+EXPORT void categoryAliasRelease(CategoryAlias *categoryAlias);
+
+/* ParamInfo API */
+EXPORT size_t paramInfoGetNumOfFieldInfo(ParamInfo *paramInfo);
+EXPORT FieldInfo *paramInfoGetFieldInfoByIndex(ParamInfo *paramInfo, size_t index);
+EXPORT FieldInfo *paramInfoGetFieldInfoByName(ParamInfo *paramInfo, const char *fieldName);
+EXPORT char *paramNewDataStr(Param *param);
+
+/* ParamUnit API */
+EXPORT size_t paramUnitGetNumOfParam(ParamUnit *paramUnit);
+EXPORT Param *paramUnitGetParamByIndex(ParamUnit *paramUnit, size_t index);
+EXPORT Param *paramUnitGetParamByName(ParamUnit *paramUnit, const char *paramName);
+EXPORT ParamInfo *paramUnitGetParamInfo(ParamUnit *paramUnit, const char *paramInfoName);
+EXPORT FieldInfo *paramUnitGetFieldInfo(ParamUnit *paramUnit, const char *paramName, const char *fieldName);
+EXPORT APP_STATUS paramUnitGetFieldVal(ParamUnit *paramUnit, const char *paramName, const char *fieldName, unsigned int *val);
+
+/* Param API */
+EXPORT size_t paramGetArraySizeFromString(const char *str);
+EXPORT APP_STATUS paramGetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int *val);
+EXPORT APP_STATUS paramSetFieldVal(Param *param, FieldInfo *fieldInfo, unsigned int val);
+EXPORT DATA_TYPE paramDataTypeToEnum(const char *dataType);
+EXPORT const char *paramDataTypeToStr(DATA_TYPE dataType);
+
+/* Field API */
+EXPORT APP_STATUS fieldInfoGetCheckListValue(FieldInfo *fieldInfo, const char *checkName, unsigned int *checkVal);
+
+/* TreeRoot API */
+EXPORT Feature *treeRootGetFeatureByName(TreeRoot *treeRoot, const char *featureName);
+EXPORT int featureIsCategoryPathSupport(Feature *feature, const char *categoryPath);
+
+/* Xml Node related APIs */
+EXPORT xmlNode *findXmlNodeByElemName(xmlNode *node, const char *elemName);
+EXPORT xmlChar *xmlNodeGetProp(xmlNode *node, const char *prop);
+EXPORT xmlChar *xmlNodeGetWording(xmlNode *node);
+
+/* Utils APIs */
+EXPORT APP_STATUS utilConvDataStringToNative(DATA_TYPE dataType, const char *paramDataStr, void **paramData, size_t *arraySize);
+
+/* Unit test */
+EXPORT APP_STATUS unitTest(AppHandle *appHandle);
+EXPORT char *utilGetStdin(char *buf, int bufSize);
+
+/* Following APIs is designed for EM tool integration */
+EXPORT APP_STATUS utilNativeSetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName, const char *fieldValueStr);
+EXPORT APP_STATUS utilNativeSetParam(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *paramDataStr);
+EXPORT char *utilNativeGetCategory(const char *audioTypeName, const char *categoryTypeName);
+EXPORT char *utilNativeGetParam(const char *audioTypeName, const char *categoryPath, const char *paramName);
+EXPORT unsigned int utilNativeGetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName);
+EXPORT APP_STATUS utilNativeSaveXml(const char *audioTypeName);
+EXPORT char *utilNativeGetChecklist(const char *audioTypeName, const char *paramName, const char *fieldName);
+
+#ifndef WIN32
+#ifdef __cplusplus
+}
+#endif
+#endif
+
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParserPriv.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParserPriv.h
new file mode 100644
index 0000000..bef01c1
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamParserPriv.h
@@ -0,0 +1,221 @@
+#include "AudioParamParser.h"
+#include <math.h>
+
+#ifdef WIN32
+#ifdef __cplusplus
+#define EXPORT extern "C" __declspec(dllexport)
+#else
+#define EXPORT __declspec(dllexport)
+#endif
+#include <process.h>
+#include <Windows.h>
+#include <direct.h>
+#else /* WIN32*/
+#define EXPORT
+#ifdef __cplusplus
+extern "C" {
+#endif
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/inotify.h>
+#include <unistd.h>
+#include <signal.h>
+#include <utils/Timers.h>
+#endif
+
+#ifdef __linux__
+#define FOLDER "/"
+#else
+#define FOLDER "\\"
+#endif
+
+extern FILE *appLogFp;
+extern int outputLogToStdout;
+
+#ifdef WIN32
+#define ERR_LOG(format, ...) \
+ if(appDebugLevel <= ERR_LEVEL) \
+ utilLog("ERROR[%d,%d](): %s(), "format"\n^^^^\n", _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define WARN_LOG(format, ...) \
+ if(appDebugLevel <= WARN_LEVEL) \
+ utilLog("WARNING[%d,%d]: %s(), "format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define INFO_LOG(format, ...) \
+ if(appDebugLevel <= INFO_LEVEL) \
+ utilLog("INFO[%d,%d]: %s(), "format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#define DEBUG_LOG(format, ...) \
+ if(appDebugLevel <= DEBUG_LEVEL) \
+ utilLog("DEBUG[%d,%d]: %s(), "format, _getpid(), GetCurrentThreadId(), __FUNCTION__, __VA_ARGS__)
+
+#else /* WIN32 */
+#define LOG_TAG "AudioParamParser"
+
+#define ERR_LOG(format, args...) \
+ if(appDebugLevel <= ERR_LEVEL) \
+ printf("%s(), "format, __FUNCTION__, ##args)
+
+#define WARN_LOG(format, args...) \
+ if(appDebugLevel <= WARN_LEVEL) \
+ printf("%s(), "format, __FUNCTION__, ##args)
+
+#define INFO_LOG(format, args...) \
+ if(appDebugLevel <= INFO_LEVEL) \
+ printf("%s(), "format, __FUNCTION__, ##args)
+
+#define DEBUG_LOG(format, args...) \
+ if(appDebugLevel <= DEBUG_LEVEL) \
+ printf("%s(), "format, __FUNCTION__, ##args)
+
+#endif
+
+/* Force adding following category group info and bypass categoryGroup path checking */
+static const char *HARD_CATEGORY_GROUP[][3] =
+{
+/* {AudioTypeName, CategoryTypeName, CategoryGroupName} */
+{"Speech", "Band", "NB"},
+{"Speech", "Band", "WB"},
+{NULL, NULL, NULL}
+};
+
+/***********************
+ * Private APIs
+ **********************/
+/* appHandle API */
+EXPORT APP_STATUS appHandleLoadDirAudioTypeInfo(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleLoadAllAudioTypeXml(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleLoadAudioTypeXml(AppHandle *appHandle, AudioType *audioType);
+EXPORT int appHandleIsValidAudioType(AppHandle *appHandle, const char *audioType);
+EXPORT AudioType *appHandleAddAudioType(AppHandle *appHandle, const char *audioType);
+EXPORT AudioType *appHandleGetAudioType(AppHandle *appHandle, size_t index);
+EXPORT void appHandleReleaseAudioTypeHash(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleLoadDirFeatureOptionsInfo(AppHandle *appHandle);
+EXPORT void appHandleReleaseFeatureOptionsHash(AppHandle *appHandle);
+EXPORT void appHandleDumpAudioTypeList(AppHandle *appHandle);
+EXPORT char *appHandleGetAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix);
+EXPORT char *appHandleGetPreloadAudioTypeFilePath(AppHandle *appHandle, const char *audioType, const char *posfix);
+EXPORT APP_STATUS appHandleLoadAllAudioTypeHash(AppHandle *appHandle);
+EXPORT void *appHandleThreadLoop(void *arg);
+EXPORT int appHandleWriteLock(AppHandle *appHandle, const char *callerFun);
+EXPORT int appHandleReadLock(AppHandle *appHandle, const char *callerFun);
+EXPORT int appHandleUnlock(AppHandle *appHandle);
+EXPORT int appHandleInstWriteLock(const char *callerFun);
+EXPORT int appHandleInstUnlock(void);
+EXPORT void appHandleReviseXmlDocByFeatureOptions(AppHandle *appHandle);
+EXPORT APP_STATUS appHandleGetAudioTypeSupportedVerInfo(const char* audioTypeName, int* paramUnitDescVerMaj, int* paramUnitDescVerMin, int* audioParamVerMaj, int* audioParamVerMin);
+EXPORT void appHandleShowAudioTypeSupportedVerInfo(AppHandle *appHandle);
+
+/* AudioType API */
+EXPORT AudioType *audioTypeCreate(AppHandle *appHandle, const char *audioTypeName);
+EXPORT void audioTypeRelease(AudioType *audioType);
+EXPORT void audioTypeReleaseAudioParam(AudioType *audioType);
+EXPORT void audioTypeDump(AudioType *audioType);
+EXPORT APP_STATUS audioTypeParseTabName(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadStage1Hash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadStage2Hash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamTreeHash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamTreeView(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamUnitHash(AudioType *audioType);
+EXPORT Param *audioTypeGetParamHash(AudioType *audioType, xmlNode *paramUnitNode);
+EXPORT APP_STATUS audioTypeParseXmlVer(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadParamFieldInfoHash(AudioType *audioType);
+EXPORT APP_STATUS audioTypeLoadCategoryTypeHash(AudioType *audioType);
+EXPORT size_t audioTypeGetNumOfParamTree(AudioType *audioType);
+EXPORT APP_STATUS audioTypeValidCategoryGroupName(AudioType *audioType, const char *name);
+EXPORT int audioTypeIsHardCategoryGroup(AudioType *audioType, const char *categoryName);
+
+/* CategoryType API */
+EXPORT CategoryType *categoryTypeCreate(const char *name, const char *wording, AudioType *audioType, int visible);
+EXPORT void categoryTypeRelease(CategoryType *categoryType);
+EXPORT CategoryAlias *categoryTypeGetCategoryByAlias(CategoryType *categoryType, const char *alias);
+EXPORT Category *categoryTypeGetCategoryByName(CategoryType *categoryType, const char *name);
+
+/* CategoryGroup API */
+EXPORT CategoryGroup *categoryGroupCreate(const char *categoryGroupName, const char *categoryGroupWording, CategoryType *categoryType, int visible);
+EXPORT void categoryGroupRelease(CategoryGroup *categoryGroup);
+
+/* Category API */
+EXPORT Category *categoryCreate(const char *name, const char *wording, CATEGORY_PARENT_TYPE parentTypeIsCategoryType, void *parent, int visible);
+EXPORT void categoryRelease(Category *category);
+
+/* ParamTree API */
+EXPORT ParamTree *paramTreeCreate(int paramId, const char *categoryPath);
+EXPORT void paramTreeRelease(ParamTree *paramTree);
+EXPORT size_t paramTreeGetNumOfParam(ParamTree *paramTree);
+
+/* ParamUnit API */
+EXPORT ParamUnit *paramUnitCreate(AudioType *audioType, int id, Param *param);
+EXPORT ParamUnit *paramUnitClone(ParamUnit *paramUnit);
+EXPORT void paramUnitRelease(ParamUnit *paramUnit);
+
+/* ParamInfo API */
+EXPORT ParamInfo *paramInfoCreate(const char *name, DATA_TYPE dataType, AudioType *audioType);
+EXPORT void paramInfoRelease(ParamInfo *paramInfo);
+
+/* FieldInfo API */
+EXPORT FieldInfo *fieldInfoCreate(const char *fieldName, unsigned int arrayIndex, int startBit, int endBit, const char *checkList, ParamInfo *paramInfo);
+EXPORT void fieldInfoRelease(FieldInfo *paramInfo);
+
+/* Param API */
+EXPORT Param *paramCreate(const char *paramName, ParamInfo *paramInfo, const char *paramValue);
+EXPORT void paramRelease(Param *param);
+EXPORT APP_STATUS paramSetupDataInfoByStr(Param *param, const char *str);
+EXPORT APP_STATUS paramSetupDataInfoByVal(Param *param, void *data, int arraySize);
+EXPORT Param *paramHashClone(Param *paramHash);
+
+/* ParamTreeView API */
+EXPORT ParamTreeView *paramTreeViewCreate(AudioType *audioType, int verMaj, int verMin);
+EXPORT void paramTreeViewRelease(ParamTreeView *paramTreeView);
+EXPORT TreeRoot *treeRootCreate(const char *name, xmlNode *treeRootNode, ParamTreeView *paramTreeView);
+EXPORT void treeRootRelease(TreeRoot *treeRoot);
+EXPORT Feature *featureCreate(const char *name, AudioType *audioType, FieldInfo *switchFieldInfo, const char *featureOption);
+EXPORT void featureRelease(Feature *feature);
+EXPORT CategoryPath *categoryPathCreate(Feature *feature, const char *path);
+EXPORT void categoryPathRelease(CategoryPath *categoryPath);
+EXPORT APP_STATUS categoryPathValidation(CategoryPath *categoryPath);
+EXPORT FeatureField *featureFieldCreate(FieldInfo *fieldInfo);
+EXPORT void featureFieldRelease(FeatureField *featureField);
+
+/* Feature Options API */
+EXPORT FeatureOption *featureOptionCreate(const char *name, const char *value);
+EXPORT void featureOptionRelease(FeatureOption *featureOption);
+
+/* Utils API */
+EXPORT char *utilConvDataToString(DATA_TYPE dataType, void *data, int arraySize);
+EXPORT UT_string *utilNormalizeCategoryPathForAudioType(const char *categoryPath, AudioType *audioType);
+EXPORT UT_string *utilNormalizeCategoryGroupPathForAudioType(const char *categoryPath, AudioType *audioType);
+EXPORT int utilFindUnusedParamId(AudioType *audioType);
+EXPORT void utilUsleep(unsigned int usec);
+EXPORT void utilLog(char *str, ...);
+EXPORT void utilLogClose(void);
+EXPORT FieldInfo *utilXmlNodeGetFieldInfo(AppHandle *appHandle, xmlNode *node, const char *audioTypeAttrName, const char *paramAttrName, const char *fieldAttrName);
+EXPORT void appDumpXmlDoc(xmlDoc *doc);
+EXPORT void redirectIOToConsole(void);
+EXPORT void utilMkdir(const char *dir);
+EXPORT void utilShowParamValue(Param *param);
+EXPORT char *utilGenCheckList(int bits);
+EXPORT int utilCompNormalizeCategoryPath(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath);
+EXPORT int isCustXmlEnable(void);
+EXPORT void utilShellExecute(const char* prog, const char* params);
+#ifndef WIN32
+EXPORT void signalHandler(int sig, siginfo_t *info, void *ucontext);
+#endif
+
+/* Unit Test */
+EXPORT void testDebugLevel(void);
+EXPORT void testHashParamTree(void);
+EXPORT void testHashParamUnit(void);
+EXPORT void testHashParam(void);
+EXPORT APP_STATUS testReadWriteParam(AppHandle *appHandle);
+EXPORT APP_STATUS testMemoryLeak(AppHandle *appHandle);
+EXPORT APP_STATUS testAudioTypeLock(AppHandle *appHandle);
+EXPORT APP_STATUS testAppHandleInitUninit(void);
+EXPORT void inotifyTest(const char *path);
+EXPORT void notifyCbTest(AppHandle *appHandle);
+
+#ifndef WIN32
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamTreeView.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamTreeView.c
new file mode 100644
index 0000000..b5254b1
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamTreeView.c
@@ -0,0 +1,398 @@
+#include "AudioParamParserPriv.h"
+
+EXPORT ParamTreeView *paramTreeViewCreate(AudioType *audioType, int verMaj, int verMin)
+{
+ ParamTreeView *paramTreeView = malloc(sizeof(ParamTreeView));
+ paramTreeView->audioType = audioType;
+ paramTreeView->verMaj = verMaj;
+ paramTreeView->verMin = verMin;
+ paramTreeView->treeRootHash = NULL;
+ return paramTreeView;
+}
+
+EXPORT void paramTreeViewRelease(ParamTreeView *paramTreeView)
+{
+ if (paramTreeView)
+ {
+ if (paramTreeView->treeRootHash)
+ {
+ TreeRoot *tmp, *item;
+ HASH_ITER(hh, paramTreeView->treeRootHash, item, tmp)
+ {
+ HASH_DEL(paramTreeView->treeRootHash, item);
+ treeRootRelease(item);
+ }
+ }
+ free(paramTreeView);
+ }
+}
+
+EXPORT TreeRoot *treeRootCreate(const char *name, xmlNode *treeRootNode, ParamTreeView *paramTreeView)
+{
+ TreeRoot *treeRoot = malloc(sizeof(TreeRoot));
+ treeRoot->name = strdup(name);
+ treeRoot->treeRootNode = treeRootNode;
+ treeRoot->paramTreeView = paramTreeView;
+ treeRoot->featureHash = NULL;
+ treeRoot->switchFieldInfo = NULL;
+ return treeRoot;
+}
+
+EXPORT void treeRootRelease(TreeRoot *treeRoot)
+{
+ if (treeRoot)
+ {
+ if (treeRoot->featureHash)
+ {
+ Feature *tmp, *item;
+ HASH_ITER(hh, treeRoot->featureHash, item, tmp)
+ {
+ HASH_DEL(treeRoot->featureHash, item);
+ featureRelease(item);
+ }
+ }
+
+ free(treeRoot->name);
+ free(treeRoot);
+ }
+}
+
+EXPORT Feature *featureCreate(const char *name, AudioType *audioType, FieldInfo *switchFieldInfo, const char *featureOption)
+{
+ Feature *feature = malloc(sizeof(Feature));
+ feature->name = strdup(name);
+ feature->audioType = audioType;
+
+ if (featureOption)
+ {
+ feature->featureOption = strdup(featureOption);
+ }
+ else
+ {
+ feature->featureOption = NULL;
+ }
+
+ feature->categoryPathHash = NULL;
+ feature->featureFieldHash = NULL;
+ feature->switchFieldInfo = switchFieldInfo;
+ return feature;
+}
+
+EXPORT void featureRelease(Feature *feature)
+{
+ if (feature)
+ {
+ if (feature->categoryPathHash)
+ {
+ CategoryPath *tmp, *item;
+ HASH_ITER(hh, feature->categoryPathHash, item, tmp)
+ {
+ HASH_DEL(feature->categoryPathHash, item);
+ categoryPathRelease(item);
+ }
+ }
+
+ if (feature->featureFieldHash)
+ {
+ FeatureField *tmp, *item;
+ HASH_ITER(hh, feature->featureFieldHash, item, tmp)
+ {
+ HASH_DEL(feature->featureFieldHash, item);
+ featureFieldRelease(item);
+ }
+ }
+
+ if (feature->name)
+ {
+ free(feature->name);
+ }
+
+ if (feature->featureOption)
+ {
+ free(feature->featureOption);
+ }
+
+ free(feature);
+ }
+}
+
+EXPORT APP_STATUS categoryPathValidation(CategoryPath *categoryPath)
+{
+ char *path;
+ char *categoryGroup;
+
+ if (!strcmp(categoryPath->path, ""))
+ {
+ return APP_NO_ERROR;
+ }
+
+ path = strdup(categoryPath->path);
+ categoryGroup = strtok(path, ARRAY_SEPERATOR);
+ if (audioTypeValidCategoryGroupName(categoryPath->feature->audioType, categoryGroup) == APP_ERROR)
+ {
+ free(path);
+ return APP_ERROR;
+ }
+
+ while ((categoryGroup = strtok(NULL, ARRAY_SEPERATOR)) != NULL)
+ {
+ if (audioTypeValidCategoryGroupName(categoryPath->feature->audioType, categoryGroup) == APP_ERROR)
+ {
+ free(path);
+ return APP_ERROR;
+ }
+ }
+
+ free(path);
+ return APP_NO_ERROR;
+}
+
+EXPORT CategoryPath *categoryPathCreate(Feature *feature, const char *path)
+{
+ CategoryPath *categoryPath = malloc(sizeof(CategoryPath));
+ categoryPath->path = strdup(path);
+ categoryPath->feature = feature;
+
+#ifdef WIN32
+ /* The category path validation only run on win32 */
+ if (categoryPathValidation(categoryPath) == APP_ERROR)
+ {
+ ERR_LOG("The %s feature's category path is not belong to categoryGroup! (%s)\n", feature->name, categoryPath->path);
+ categoryPathRelease(categoryPath);
+ return NULL;
+ }
+#endif
+
+ return categoryPath;
+}
+
+EXPORT void categoryPathRelease(CategoryPath *categoryPath)
+{
+ if (categoryPath)
+ {
+ free(categoryPath->path);
+ free(categoryPath);
+ }
+}
+
+EXPORT FeatureField *featureFieldCreate(FieldInfo *fieldInfo)
+{
+ FeatureField *featureField = malloc(sizeof(FeatureField));
+ featureField->fieldInfo = fieldInfo;
+
+ return featureField;
+}
+
+EXPORT void featureFieldRelease(FeatureField *featureField)
+{
+ if (featureField)
+ {
+ free(featureField);
+ }
+}
+
+EXPORT Feature *treeRootGetFeatureByName(TreeRoot *treeRoot, const char *featureName)
+{
+ Feature *feature;
+ HASH_FIND_STR(treeRoot->featureHash, featureName, feature);
+ return feature;
+}
+
+CategoryPath *findFeatureCategoryPath(char **arr, int *Switch, int n, Feature *feature)
+{
+ CategoryPath *categoryPath = NULL;
+ UT_string *path = NULL;
+ int i;
+
+ /* Generate the search string */
+ utstring_new(path);
+ for (i = 0; i < n; ++i)
+ {
+ if (i == n - 1)
+ {
+ utstring_printf(path, "%s", arr[Switch[i]]);
+ }
+ else
+ {
+ utstring_printf(path, "%s,", arr[Switch[i]]);
+ }
+ }
+
+ /* Find the categoryPath */
+ HASH_FIND_STR(feature->categoryPathHash, utstring_body(path), categoryPath);
+ DEBUG_LOG("Search path = %s, paramTree = 0x%p\n", utstring_body(path), categoryPath);
+
+ utstring_free(path);
+ return categoryPath;
+}
+
+CategoryPath *fuzzySearchFeatureCategoryPath(char **arr, int totalSize, int pickSize, Feature *feature)
+{
+ CategoryPath *categoryPath = NULL;
+ int i, j, pos = pickSize - 1;
+ int *swpArray;
+
+ if (pickSize > totalSize)
+ {
+ return categoryPath;
+ }
+
+ swpArray = (int *)malloc(sizeof(int) * totalSize);
+
+ for (i = 0; i < totalSize; ++i)
+ {
+ swpArray[i] = i;
+ }
+
+ categoryPath = findFeatureCategoryPath(arr, swpArray, pickSize, feature);
+ if (categoryPath)
+ {
+ free(swpArray);
+ return categoryPath;
+ }
+
+ do
+ {
+ if (swpArray[pickSize - 1] == totalSize - 1)
+ {
+ --pos;
+ }
+ else
+ {
+ pos = pickSize - 1;
+ }
+
+ ++swpArray[pos];
+
+ for (j = pos + 1; j < pickSize; ++j)
+ {
+ swpArray[j] = swpArray[j - 1] + 1;
+ }
+
+ categoryPath = findFeatureCategoryPath(arr, swpArray, pickSize, feature);
+ if (categoryPath)
+ {
+ free(swpArray);
+ return categoryPath;
+ }
+
+ }
+ while (swpArray[0] < totalSize - pickSize);
+
+ free(swpArray);
+ return categoryPath;
+}
+
+CategoryPath *searchFeatureCategoryPath(Feature *feature, const char *categoryPath)
+{
+ CategoryPath *featureCategoryPath;
+ char **categoryArray;
+ char *category;
+ char *tmpStr;
+ size_t numOfCategoryType;
+ size_t numOfCategory;
+ size_t i = 0;
+
+ DEBUG_LOG("+Feature = %s, categoryPath = %s\n", feature->name, categoryPath);
+
+ /* Full path search first */
+ HASH_FIND_STR(feature->categoryPathHash, categoryPath, featureCategoryPath);
+ if (featureCategoryPath)
+ {
+ DEBUG_LOG("fuzzySearch paramTree found. (path = %s)\n", featureCategoryPath->path);
+ return featureCategoryPath;
+ }
+ else if (!strcmp(categoryPath, ""))
+ {
+ return NULL;
+ }
+
+ /* Setup array for fuzzy search path enum */
+ numOfCategoryType = audioTypeGetNumOfCategoryType(feature->audioType);
+ categoryArray = malloc(sizeof(char *) * numOfCategoryType);
+
+ tmpStr = strdup(categoryPath ? categoryPath : "");
+ category = strtok(tmpStr, ARRAY_SEPERATOR);
+ if (!category)
+ {
+ ERR_LOG("Cannot parse category\n");
+ free(categoryArray);
+ free(tmpStr);
+ return NULL;
+ }
+ categoryArray[i++] = category;
+
+ while ((category = strtok(NULL, ARRAY_SEPERATOR)) != NULL)
+ {
+ categoryArray[i++] = category;
+ }
+ numOfCategory = i;
+
+ /* Fuzzy search */
+ for (i = 1; i < numOfCategory; i++)
+ {
+ featureCategoryPath = fuzzySearchFeatureCategoryPath(categoryArray, numOfCategory, numOfCategory - i, feature);
+ if (featureCategoryPath)
+ {
+ break;
+ }
+ }
+
+ if (!featureCategoryPath)
+ {
+ /* If no paramTree found, try to get the root paramTree */
+ HASH_FIND_STR(feature->categoryPathHash, "", featureCategoryPath);
+ }
+
+ free(categoryArray);
+ free(tmpStr);
+
+ DEBUG_LOG("-fuzzySearch featureCategoryPath %s found. \n", featureCategoryPath ? "" : "not ");
+ return featureCategoryPath;
+}
+
+EXPORT int featureIsCategoryPathSupport(Feature *feature, const char *categoryPath)
+{
+ /* Get the category path */
+ CategoryPath *featureCategoryPath = NULL;
+ UT_string *searchPath;
+
+ if (!feature)
+ {
+ ERR_LOG("feature is NULL\n");
+ return 0;
+ }
+
+ if (!categoryPath)
+ {
+ ERR_LOG("categoryPath is NULL\n");
+ return 0;
+ }
+
+ /* Check if feature support all categoryPath first */
+ featureCategoryPath = searchFeatureCategoryPath(feature, "");
+ if (featureCategoryPath)
+ {
+ return 1;
+ }
+
+ searchPath = utilNormalizeCategoryGroupPathForAudioType(categoryPath, feature->audioType);
+ if (!searchPath)
+ {
+ ERR_LOG("Cannot normalize categoryPath for %s AudioType. (path = %s)\n", feature->audioType->name, categoryPath);
+ return 0;
+ }
+
+ /* Search the feature's category path */
+ featureCategoryPath = searchFeatureCategoryPath(feature, utstring_body(searchPath));
+ utstring_free(searchPath);
+
+ if (featureCategoryPath)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamUnit.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamUnit.c
new file mode 100644
index 0000000..54649b7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioParamUnit.c
@@ -0,0 +1,195 @@
+#include "AudioParamParserPriv.h"
+
+EXPORT ParamUnit *paramUnitCreate(AudioType *audioType, int id, Param *param)
+{
+ size_t numOfParam, i;
+ ParamUnit *paramUnit = (ParamUnit *)malloc(sizeof(ParamUnit));
+ paramUnit->paramId = id;
+ paramUnit->refCount = 0;
+ paramUnit->audioType = audioType;
+ paramUnit->paramHash = param;
+
+ /* Update param's param unit info */
+ numOfParam = paramUnitGetNumOfParam(paramUnit);
+ for (i = 0; i < numOfParam; i++)
+ {
+ Param *param = paramUnitGetParamByIndex(paramUnit, i);
+ param->paramUnit = paramUnit;
+ }
+
+ return paramUnit;
+}
+
+EXPORT ParamUnit *paramUnitClone(ParamUnit *oldParamUnit)
+{
+ Param *item;
+ ParamUnit *paramUnit;
+
+ if (!oldParamUnit)
+ {
+ ERR_LOG("Original ParamUnit is NULL\n");
+ return NULL;
+ }
+
+ paramUnit = (ParamUnit *)malloc(sizeof(ParamUnit));
+ paramUnit->paramId = oldParamUnit->paramId;
+ paramUnit->refCount = oldParamUnit->refCount;
+ paramUnit->audioType = oldParamUnit->audioType;
+ paramUnit->paramHash = paramHashClone(oldParamUnit->paramHash);
+
+ /* Update param's param unit info */
+ if (paramUnit->paramHash)
+ {
+ for (item = paramUnit->paramHash; item != NULL; item = item->hh.next)
+ {
+ item->paramUnit = paramUnit;
+ }
+ }
+
+ return paramUnit;
+}
+
+EXPORT void paramUnitRelease(ParamUnit *paramUnit)
+{
+ if (paramUnit)
+ {
+ /* Free ParamUnit's param hash */
+ if (paramUnit->paramHash)
+ {
+ Param *tmp, *item;
+ HASH_ITER(hh, paramUnit->paramHash, item, tmp)
+ {
+ HASH_DEL(paramUnit->paramHash, item);
+ paramRelease(item);
+ }
+ free(paramUnit->paramHash);
+ }
+ free(paramUnit);
+ }
+}
+
+EXPORT size_t paramUnitGetNumOfParam(ParamUnit *paramUnit)
+{
+ if (!paramUnit)
+ {
+ ERR_LOG("paramUnit is NULL!\n");
+ return 0;
+ }
+
+ return HASH_COUNT(paramUnit->paramHash);
+}
+
+EXPORT Param *paramUnitGetParamByIndex(ParamUnit *paramUnit, size_t index)
+{
+ Param *param = NULL;
+ size_t i = 0;
+
+ if (!paramUnit)
+ {
+ ERR_LOG("paramUnit is NULL!\n");
+ return NULL;
+ }
+
+ for (param = paramUnit->paramHash; param ; param = param->hh.next)
+ {
+ if (index == i++)
+ {
+ return param;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT Param *paramUnitGetParamByName(ParamUnit *paramUnit, const char *name)
+{
+ Param *param = NULL;
+
+ INFO_LOG("name = %s\n", name);
+ if (!paramUnit)
+ {
+ ERR_LOG("paramUnit is NULL!\n");
+ return NULL;
+ }
+
+ HASH_FIND_STR(paramUnit->paramHash, name, param);
+
+ if (param && appDebugLevel <= DEBUG_LEVEL)
+ {
+ utilShowParamValue(param);
+ }
+
+ DEBUG_LOG("name = %s, param data = 0x%p, size = %d\n", name, param ? param->data : NULL, param ? param->arraySize : NULL);
+ return param;
+}
+
+
+EXPORT APP_STATUS paramUnitGetFieldVal(ParamUnit *paramUnit, const char *paramName, const char *fieldName, unsigned int *val)
+{
+ ParamInfo *paramInfo;
+ FieldInfo *fieldInfo;
+ Param *param;
+
+ if (!paramUnit)
+ {
+ ERR_LOG("paramUnit is NULL!\n");
+ return APP_ERROR;
+ }
+
+ /* Query field Info */
+ paramInfo = audioTypeGetParamInfoByName(paramUnit->audioType, paramName);
+ if (!paramInfo)
+ {
+ WARN_LOG("Cannot find paramInfo. (param = %s\n)", paramName);
+ return APP_ERROR;
+ }
+
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ if (!fieldInfo)
+ {
+ WARN_LOG("Cannot find fieldInfo. (fieldName = %s\n)", fieldName);
+ return APP_ERROR;
+ }
+
+ /* Query param */
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ if (!param)
+ {
+ WARN_LOG("Cannot get param. (name = %s)\n", paramName);
+ return APP_ERROR;
+ }
+
+ /* Query field val */
+ return paramGetFieldVal(param, fieldInfo, val);
+}
+
+EXPORT ParamInfo *paramUnitGetParamInfo(ParamUnit *paramUnit, const char *paramInfoName)
+{
+ if (!paramUnit)
+ {
+ ERR_LOG("paramUnit is NULL!\n");
+ return NULL;
+ }
+
+ return audioTypeGetParamInfoByName(paramUnit->audioType, paramInfoName);
+}
+
+EXPORT FieldInfo *paramUnitGetFieldInfo(ParamUnit *paramUnit, const char *paramName, const char *fieldName)
+{
+ ParamInfo *paramInfo;
+ if (!paramUnit || !paramName || !fieldName)
+ {
+ WARN_LOG("Cannot get field info. (paramUnit id=%d, paramInfoName=%s, fieldInfoName=%s\n)", paramUnit ? paramUnit->paramId : -1, paramName, fieldName);
+ return NULL;
+ }
+
+ paramInfo = audioTypeGetParamInfoByName(paramUnit->audioType, paramName);
+ if (paramInfo)
+ {
+ return paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ }
+ else
+ {
+ return NULL;
+ }
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioType.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioType.c
new file mode 100644
index 0000000..1ebe9b2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioType.c
@@ -0,0 +1,1908 @@
+#include "AudioParamParserPriv.h"
+
+EXPORT AudioType *audioTypeCreate(AppHandle *appHandle, const char *audioTypeName)
+{
+ AudioType *audioType = malloc(sizeof(AudioType));
+ audioType->name = strdup(audioTypeName);
+ audioType->tabName = NULL;
+ audioType->audioParamDoc = NULL;
+ audioType->paramUnitDescDoc = NULL;
+ audioType->paramTreeViewDoc = NULL;
+ audioType->paramTreeHash = NULL;
+ audioType->paramTreeView = NULL;
+ audioType->paramUnitHash = NULL;
+ audioType->paramInfoHash = NULL;
+ audioType->categoryTypeHash = NULL;
+ audioType->unusedParamId = 0;
+ audioType->dirty = 0;
+ audioType->allowReload = 0;
+ audioType->appHandle = appHandle;
+ audioType->paramUnitDescVerMaj = 1;
+ audioType->paramUnitDescVerMin = 0;
+ audioType->audioParamVerMaj = 1;
+ audioType->audioParamVerMin = 0;
+#ifndef WIN32
+ pthread_rwlock_init(&audioType->lock, NULL);
+#endif
+
+ return audioType;
+}
+
+EXPORT void audioTypeReleaseAudioParam(AudioType *audioType)
+{
+ if (audioType->paramTreeHash)
+ {
+ ParamTree *tmp, *item;
+ HASH_ITER(hh, audioType->paramTreeHash, item, tmp)
+ {
+ HASH_DEL(audioType->paramTreeHash, item);
+ paramTreeRelease(item);
+ }
+ free(audioType->paramTreeHash);
+ }
+ audioType->paramTreeHash = NULL;
+
+ if (audioType->paramUnitHash)
+ {
+ ParamUnit *tmp, *item;
+ HASH_ITER(hh, audioType->paramUnitHash, item, tmp)
+ {
+ HASH_DEL(audioType->paramUnitHash, item);
+ paramUnitRelease(item);
+ }
+ free(audioType->paramUnitHash);
+ }
+ audioType->paramUnitHash = NULL;
+}
+
+EXPORT void audioTypeRelease(AudioType *audioType)
+{
+ // Release AudioType resources
+ INFO_LOG("Free %s AudioType\n", audioType->name);
+
+ /* release XML */
+ if (audioType->audioParamDoc)
+ {
+ xmlFreeDoc(audioType->audioParamDoc);
+ }
+
+ if (audioType->paramUnitDescDoc)
+ {
+ xmlFreeDoc(audioType->paramUnitDescDoc);
+ }
+
+ if (audioType->paramTreeViewDoc)
+ {
+ xmlFreeDoc(audioType->paramTreeViewDoc);
+ }
+
+ /* Release hash & it's content */
+ if (audioType->categoryTypeHash)
+ {
+ CategoryType *tmp, *item;
+ HASH_ITER(hh, audioType->categoryTypeHash, item, tmp)
+ {
+ HASH_DEL(audioType->categoryTypeHash, item);
+ categoryTypeRelease(item);
+ }
+ }
+
+ if (audioType->paramInfoHash)
+ {
+ ParamInfo *tmp, *item;
+ HASH_ITER(hh, audioType->paramInfoHash, item, tmp)
+ {
+ HASH_DEL(audioType->paramInfoHash, item);
+ paramInfoRelease(item);
+ }
+ }
+
+ /* Release audio param info */
+ audioTypeReleaseAudioParam(audioType);
+
+ /* Release param treee view info */
+ paramTreeViewRelease(audioType->paramTreeView);
+
+#ifndef WIN32
+ pthread_rwlock_destroy(&audioType->lock);
+#endif
+
+ audioType->appHandle = NULL;
+ free(audioType->tabName);
+ free(audioType->name);
+ free(audioType);
+}
+
+EXPORT int audioTypeReadLock(AudioType *audioType, const char *callerFun)
+{
+ int ret = 0;
+
+ if (!audioType)
+ {
+ WARN_LOG("audioType is NULL\n");
+ return ret;
+ }
+
+ /* Lock appHandle */
+ appHandleReadLock(audioType->appHandle, callerFun);
+
+#ifndef WIN32
+ while (1)
+ {
+ if (pthread_rwlock_tryrdlock(&audioType->lock) == 0)
+ {
+ audioType->lockCallerFun = callerFun;
+ DEBUG_LOG("%s audioType lock is locked by %s()\n", audioType->name, audioType->lockCallerFun);
+ break;
+ }
+ else
+ {
+ DEBUG_LOG("Cannot lock the %s audioType lock, delay some time. (the locker is %s())\n", audioType->name, audioType->lockCallerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+
+ return ret;
+}
+
+EXPORT int audioTypeWriteLock(AudioType *audioType, const char *callerFun)
+{
+ int ret = 0;
+
+ if (!audioType)
+ {
+ WARN_LOG("audioType is NULL\n");
+ return ret;
+ }
+
+ /* Lock appHandle */
+ appHandleWriteLock(audioType->appHandle, callerFun);
+
+#ifndef WIN32
+ while (1)
+ {
+ if (pthread_rwlock_trywrlock(&audioType->lock) == 0)
+ {
+ audioType->lockCallerFun = callerFun;
+ DEBUG_LOG("%s audioType lock is locked by %s()\n", audioType->name, audioType->lockCallerFun);
+ break;
+ }
+ else
+ {
+ DEBUG_LOG("Cannot lock the %s audioType lock, delay some time. (the locker is %s())\n", audioType->name, audioType->lockCallerFun);
+ utilUsleep(1);
+ }
+ }
+#else
+ //DEBUG_LOG("Not support this function yet!\n");
+#endif
+ return ret;
+}
+
+EXPORT int audioTypeUnlock(AudioType *audioType)
+{
+ int ret = 0;
+
+ if (!audioType)
+ {
+ WARN_LOG("audioType is NULL\n");
+ return ret;
+ }
+
+#ifndef WIN32
+ DEBUG_LOG("Unlock %s audioType lock\n", audioType->name);
+ ret = pthread_rwlock_unlock(&audioType->lock);
+#endif
+
+ /* Unlock appHandle */
+ appHandleUnlock(audioType->appHandle);
+ return ret;
+}
+
+EXPORT void audioTypeDump(AudioType *audioType)
+{
+ CategoryType *categoryType;
+ ParamUnit *paramUnit;
+ ParamTree *paramTree;
+ ParamInfo *paramInfo;
+
+ INFO_LOG("====================================");
+ INFO_LOG("name = %s\n", audioType->name);
+ INFO_LOG("tabName = %s\n", audioType->tabName);
+ INFO_LOG("paramUnitDescVerMaj = %d\n", audioType->paramUnitDescVerMaj);
+ INFO_LOG("paramUnitDescVerMin = %d\n", audioType->paramUnitDescVerMin);
+ INFO_LOG("audioParamVerMaj = %d\n", audioType->audioParamVerMaj);
+ INFO_LOG("audioParamVerMin = %d\n", audioType->audioParamVerMin);
+ INFO_LOG("unusedParamId = %d\n", audioType->unusedParamId);
+ INFO_LOG("dirty = %d\n", audioType->dirty);
+ INFO_LOG("allowReload = %d\n", audioType->allowReload);
+
+ /* Dump CategoryType */
+ for (categoryType = audioType->categoryTypeHash; categoryType; categoryType = categoryType->hh.next)
+ {
+ // TODO: categoryTypeDump(categoryType);
+ }
+
+ /* Dump ParamInfo */
+ for (paramInfo = audioType->paramInfoHash; paramInfo; paramInfo = paramInfo->hh.next)
+ {
+ // TODO: paramInfoDump(paramInfo);
+ }
+
+ /* Dump ParamUnit */
+ for (paramTree = audioType->paramTreeHash; paramTree; paramTree = paramTree->hh.next)
+ {
+ // TODO: paramTreeDump(paramTree);
+ }
+
+ /* Dump ParamUnit */
+ for (paramUnit = audioType->paramUnitHash; paramUnit; paramUnit = paramUnit->hh.next)
+ {
+ // TODO: paramUnitDump(paramUnit);
+ }
+}
+
+EXPORT APP_STATUS audioTypeIsTuningToolSupportedXmlVer(AudioType *audioType)
+{
+ int paramUnitDescVerMaj;
+ int paramUnitDescVerMin;
+ int audioParamVerMaj;
+ int audioParamVerMin;
+
+ INFO_LOG("AudioType = %s ParamUnitDesc ver = (%d.%d), AudioParam ver = (%d.%d)\n", audioType ? audioType->name : "NULL", audioType ? audioType->paramUnitDescVerMaj : -1, audioType ? audioType->paramUnitDescVerMin : -1, audioType ? audioType->audioParamVerMaj : -1, audioType ? audioType->audioParamVerMin : -1);
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (appHandleGetAudioTypeSupportedVerInfo(audioType->name, ¶mUnitDescVerMaj, ¶mUnitDescVerMin, &audioParamVerMaj, &audioParamVerMin) == APP_ERROR)
+ {
+ WARN_LOG("Cannot find the %s AudioType support info, don't check it's version\n", audioType->name);
+ return APP_NO_ERROR;
+ }
+
+ if (audioType->paramUnitDescVerMaj >= paramUnitDescVerMaj && audioType->paramUnitDescVerMin > paramUnitDescVerMin)
+ {
+ ERR_LOG("%s AudioType XML ParamUnitDesc version is not support! XML ver (%d.%d) > AppLib support ver (%d.%d)\n", audioType->name, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, paramUnitDescVerMaj, paramUnitDescVerMin);
+ return APP_ERROR;
+ }
+
+ if (audioType->audioParamVerMaj >= audioParamVerMaj && audioType->audioParamVerMin > audioParamVerMin)
+ {
+ ERR_LOG("%s AudioType XML AudioParam version is not support! XML ver (%d.%d) > AppLib support ver (%d.%d)\n", audioType->name, audioType->audioParamVerMaj, audioType->audioParamVerMin, audioParamVerMaj, audioParamVerMin);
+ return APP_ERROR;
+ }
+
+ /* If XML ver is lower then tuning tool support, we can upgrade the XML content here automatically */
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeIsDeviceSupportedXmlVer(AudioType *audioType)
+{
+ int paramUnitDescVerMaj;
+ int paramUnitDescVerMin;
+ int audioParamVerMaj;
+ int audioParamVerMin;
+
+ INFO_LOG("AudioType = %s paramUnitDesc ver = (%d.%d), audioParam ver = (%d.%d)\n", audioType ? audioType->name : "NULL", audioType ? audioType->paramUnitDescVerMaj : -1, audioType ? audioType->paramUnitDescVerMin : -1, audioType ? audioType->audioParamVerMaj : -1, audioType ? audioType->audioParamVerMin : -1);
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (appHandleGetAudioTypeSupportedVerInfo(audioType->name, ¶mUnitDescVerMaj, ¶mUnitDescVerMin, &audioParamVerMaj, &audioParamVerMin) == APP_ERROR)
+ {
+ ERR_LOG("Cannot find the %s AudioType support info\n", audioType->name);
+ return APP_ERROR;
+ }
+
+ if (audioType->paramUnitDescVerMaj != paramUnitDescVerMaj || audioType->paramUnitDescVerMin != paramUnitDescVerMin)
+ {
+ ERR_LOG("%s AudioType XML ParamUnitDesc version is not support! XML ver (%d.%d) != AppLib support ver (%d.%d)\n", audioType->name, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, paramUnitDescVerMaj, paramUnitDescVerMin);
+ return APP_ERROR;
+ }
+
+ if (audioType->audioParamVerMaj != audioParamVerMaj || audioType->audioParamVerMin != audioParamVerMin)
+ {
+ ERR_LOG("%s AudioType XML AudioParam version is not support! XML ver (%d.%d) != AppLib support ver (%d.%d)\n", audioType->name, audioType->audioParamVerMaj, audioType->audioParamVerMin, audioParamVerMaj, audioParamVerMin);
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeParseTabName(AudioType *audioType)
+{
+ xmlChar *tabName = NULL;
+ xmlNode *node = NULL;
+ xmlNode *root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+
+ if (!node)
+ {
+ ERR_LOG("Cannnot find the %s element\n", ELEM_PARAM_UNIT_DESC);
+ return APP_ERROR;
+ }
+
+ tabName = xmlGetProp(node, (const xmlChar *)ATTRI_TAB_NAME);
+ if (tabName)
+ {
+ audioType->tabName = strdup((char *)tabName);
+ xmlFree(tabName);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeParseXmlVer(AudioType *audioType)
+{
+ xmlChar *ver = NULL;
+ xmlNode *node = NULL;
+
+ /* Parse paramUnitDescVer */
+ xmlNode *root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+
+ if (root_element)
+ {
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ }
+
+ if (node)
+ {
+ ver = xmlGetProp(node, (const xmlChar *)ATTRI_VERSION);
+ }
+
+ if (ver)
+ {
+ sscanf((const char *)ver, "%d.%d", &audioType->paramUnitDescVerMaj, &audioType->paramUnitDescVerMin);
+ }
+ else
+ {
+ audioType->paramUnitDescVerMaj = 1;
+ audioType->paramUnitDescVerMin = 0;
+ ERR_LOG("Cannot parse paramUnitDesc xml version (set as default ver = 1.0)\n");
+ }
+
+ /* Parse audioParamVer */
+ root_element = xmlDocGetRootElement(audioType->audioParamDoc);
+
+ if (root_element)
+ {
+ node = findXmlNodeByElemName(root_element, ELEM_AUDIO_PARAM);
+ }
+
+ if (node)
+ {
+ ver = xmlGetProp(node, (const xmlChar *)ATTRI_VERSION);
+ }
+
+ if (ver)
+ {
+ sscanf((const char *)ver, "%d.%d", &audioType->audioParamVerMaj, &audioType->audioParamVerMin);
+ }
+ else
+ {
+ ERR_LOG("Cannot parse audioParam xml version (set as default ver = 1.0)\n");
+ audioType->audioParamVerMaj = 1;
+ audioType->audioParamVerMin = 0;
+ }
+
+ return APP_NO_ERROR;
+}
+
+ParamTree *findParamTree(char **arr, int *Switch, int n, AudioType *audioType)
+{
+ ParamTree *paramTree = NULL;
+ UT_string *path = NULL;
+ int i;
+
+ /* Generate the search string */
+ utstring_new(path);
+ for (i = 0; i < n; ++i)
+ {
+ if (i == n - 1)
+ {
+ utstring_printf(path, "%s", arr[Switch[i]]);
+ }
+ else
+ {
+ utstring_printf(path, "%s,", arr[Switch[i]]);
+ }
+ }
+
+ /* Find the paramTree */
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(path), paramTree);
+ DEBUG_LOG("Search path = %s, paramTree = 0x%p\n", utstring_body(path), paramTree);
+
+ utstring_free(path);
+ return paramTree;
+}
+
+ParamTree *fuzzySearchParamTree(char **arr, int totalSize, int pickSize, AudioType *audioType)
+{
+ ParamTree *paramTree = NULL;
+ int i, j, pos = pickSize - 1;
+ int *swpArray;
+
+ if (pickSize > totalSize)
+ {
+ return paramTree;
+ }
+
+ swpArray = (int *)malloc(sizeof(int) * totalSize);
+
+ for (i = 0; i < totalSize; ++i)
+ {
+ swpArray[i] = i;
+ }
+
+ paramTree = findParamTree(arr, swpArray, pickSize, audioType);
+ if (paramTree)
+ {
+ free(swpArray);
+ return paramTree;
+ }
+
+ do
+ {
+ if (swpArray[pickSize - 1] == totalSize - 1)
+ {
+ --pos;
+ }
+ else
+ {
+ pos = pickSize - 1;
+ }
+
+ ++swpArray[pos];
+
+ for (j = pos + 1; j < pickSize; ++j)
+ {
+ swpArray[j] = swpArray[j - 1] + 1;
+ }
+
+ paramTree = findParamTree(arr, swpArray, pickSize, audioType);
+ if (paramTree)
+ {
+ free(swpArray);
+ return paramTree;
+ }
+
+ }
+ while (swpArray[0] < totalSize - pickSize);
+
+ free(swpArray);
+ return paramTree;
+}
+
+ParamTree *searchParamTree(AudioType *audioType, const char *categoryPath)
+{
+ ParamTree *paramTree;
+ char **categoryArray;
+ char *category;
+ char *tmpStr;
+ size_t numOfCategoryType;
+ size_t numOfCategory;
+ size_t i = 0;
+
+ if (audioType)
+ {
+ DEBUG_LOG("+AudioType = %s, categoryPath = %s\n", audioType->name, categoryPath);
+ }
+ else
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ /* Full path search first */
+ HASH_FIND_STR(audioType->paramTreeHash, categoryPath, paramTree);
+ if (paramTree)
+ {
+ DEBUG_LOG("fuzzySearch paramTree found. (path = %s, id = %d)\n", categoryPath, paramTree->paramId);
+ return paramTree;
+ }
+
+ /* Setup array for fuzzy search path enum */
+ numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ categoryArray = malloc(sizeof(char *) * numOfCategoryType);
+
+ tmpStr = strdup(categoryPath ? categoryPath : "");
+ category = strtok(tmpStr, ARRAY_SEPERATOR);
+ if (!category)
+ {
+ ERR_LOG("Cannot parse category\n");
+ free(categoryArray);
+ free(tmpStr);
+ return NULL;
+ }
+ categoryArray[i++] = category;
+
+ while ((category = strtok(NULL, ARRAY_SEPERATOR)) != NULL)
+ {
+ categoryArray[i++] = category;
+ }
+ numOfCategory = i;
+
+ /* Fuzzy search */
+ for (i = 1; i < numOfCategory; i++)
+ {
+ paramTree = fuzzySearchParamTree(categoryArray, numOfCategory, numOfCategory - i, audioType);
+ if (paramTree)
+ {
+ break;
+ }
+ }
+
+ if (!paramTree)
+ {
+ /* If no paramTree found, try to get the root paramTree */
+ HASH_FIND_STR(audioType->paramTreeHash, "", paramTree);
+ }
+
+ free(categoryArray);
+ free(tmpStr);
+
+ if (paramTree)
+ {
+ DEBUG_LOG("-fuzzySearch paramTree %s found. (path = %s, id = %d)\n", paramTree ? "" : "not ", paramTree->categoryPath, paramTree->paramId);
+ }
+
+ return paramTree;
+}
+
+EXPORT ParamUnit *audioTypeGetParamUnit(AudioType *audioType, const char *categoryPath)
+{
+ /* Get the category path */
+ ParamTree *paramTree = NULL;
+ ParamUnit *paramUnit = NULL;
+ UT_string *searchPath;
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ if (!categoryPath)
+ {
+ ERR_LOG("categoryPath is NULL (%s)\n", audioType->name);
+ return NULL;
+ }
+
+ searchPath = utilNormalizeCategoryPathForAudioType(categoryPath, audioType);
+ if (!searchPath)
+ {
+ ERR_LOG("Cannot normalize categoryPath for %s AudioType. (path = %s)\n", audioType->name, categoryPath);
+ return NULL;
+ }
+
+ /* CategoryPath -> Param Id */
+ paramTree = searchParamTree(audioType, utstring_body(searchPath));
+
+ /* Param Id -> Param Unit */
+ if (paramTree)
+ {
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, paramUnit);
+ INFO_LOG("Search category path = \"%s\" -> \"%s\" -> ref_id = %d -> ParamUnit = 0x%p\n", categoryPath, utstring_body(searchPath), paramTree ? paramTree->paramId : -1, paramUnit);
+ }
+ else
+ {
+ WARN_LOG("No match ref id!! (AudioType = %s, Search category path = \"%s\" -> \"%s\" -> ref id not found)\n", audioType->name, categoryPath, utstring_body(searchPath));
+ }
+
+ utstring_free(searchPath);
+
+ return paramUnit;
+}
+
+EXPORT APP_STATUS audioTypeLoadStage1Hash(AudioType *audioType)
+{
+ if (audioTypeLoadCategoryTypeHash(audioType) == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamFieldInfoHash(audioType) == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamUnitHash(audioType) == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+
+ if (audioTypeLoadParamTreeHash(audioType) == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadStage2Hash(AudioType *audioType)
+{
+ if (audioTypeLoadParamTreeView(audioType) == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamTreeView(AudioType *audioType)
+{
+ xmlNode *root = NULL, *paramTreeViewNode, *treeRootNode, *featureListNode = NULL;
+ if (audioType && !audioType->paramTreeViewDoc)
+ {
+ DEBUG_LOG("No %s%s file exist\n", audioType->name, PARAM_TREE_VIEW_XML_POSFIX);
+ return APP_NO_ERROR;
+ }
+
+ if (audioType->paramTreeView)
+ {
+ ERR_LOG("The audio type's paramTreeView already exist!\n");
+ return APP_ERROR;
+ }
+
+ root = xmlDocGetRootElement(audioType->paramTreeViewDoc);
+
+ if (root)
+ {
+ paramTreeViewNode = findXmlNodeByElemName(root, ELEM_PARAM_TREE_VIEW);
+ }
+
+ if (paramTreeViewNode && paramTreeViewNode->children)
+ {
+ /* Parse version info */
+ int maj, min;
+ xmlChar *ver = xmlGetProp(paramTreeViewNode, (const xmlChar *)ATTRI_VERSION);
+
+ if (ver)
+ {
+ sscanf((const char *)ver, "%d.%d", &maj, &min);
+ }
+ else
+ {
+ ERR_LOG("Cannot parse xml version (ver = %s)\n", ver);
+ return APP_ERROR;
+ }
+
+ audioType->paramTreeView = paramTreeViewCreate(audioType, maj, min);
+ treeRootNode = paramTreeViewNode->children;
+ while ((treeRootNode = findXmlNodeByElemName(treeRootNode->next, ELEM_TREE_ROOT)))
+ {
+ /* Process <TreeRoot> */
+ xmlChar *treeRootName = xmlNodeGetProp(treeRootNode, ATTRI_NAME);
+ TreeRoot *treeRoot = treeRootCreate(treeRootName, treeRootNode, audioType->paramTreeView);
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeView->treeRootHash, treeRoot->name, strlen(treeRoot->name), treeRoot);
+ INFO_LOG("Add treeRoot name = %s, audioType = %s\n", treeRoot->name, treeRoot->paramTreeView->audioType->name);
+
+ if (treeRootNode->children)
+ {
+ /* Process <Sheet> */
+ xmlNode *featureNode = NULL;
+ xmlNode *sheetNode = findXmlNodeByElemName(treeRootNode->children, ELEM_SHEET);
+ if (sheetNode)
+ {
+ treeRoot->switchFieldInfo = utilXmlNodeGetFieldInfo(audioType->appHandle, sheetNode, ATTRI_SWITCH_AUDIO_TYPE, ATTRI_SWITCH_PARAM, ATTRI_SWITCH_FIELD);
+ if (treeRoot->switchFieldInfo)
+ {
+ INFO_LOG("Add Sheet %s=%s, %s=%s, %s=%s\n", ATTRI_SWITCH_AUDIO_TYPE, treeRoot->switchFieldInfo->paramInfo->audioType->name, ATTRI_SWITCH_PARAM, treeRoot->switchFieldInfo->paramInfo->name, ATTRI_SWITCH_FIELD, treeRoot->switchFieldInfo->name);
+ }
+ }
+
+ /* Process <Feature> */
+ featureNode = treeRootNode->children;
+ while ((featureNode = findXmlNodeByElemName(featureNode->next, ELEM_FEATURE)))
+ {
+ xmlNode *fieldListNode, *fieldNode, *categoryPathListNode, *categoryNode = NULL;
+ FieldInfo *switchFieldInfo = NULL;
+ Feature *feature = NULL;
+
+ /* Check feature option first */
+ /* TODO: check feature options */
+ xmlChar *featureName = xmlGetProp(featureNode, ATTRI_NAME);
+ xmlChar *featureOptionName = xmlGetProp(featureNode, ATTRI_FEATURE_OPTION);
+ /*if (!appHandleIsFeatureOptionEnabled(audioType->appHandle, featureOptionName)) {
+ INFO_LOG("Feature %s not enabled! (depends on feature_option %s\n", featureName, featureOptionName);
+ continue;
+ }*/
+
+ /* Check switch info */
+ switchFieldInfo = utilXmlNodeGetFieldInfo(audioType->appHandle, featureNode, ATTRI_SWITCH_AUDIO_TYPE, ATTRI_SWITCH_PARAM, ATTRI_SWITCH_FIELD);
+
+ /* Create Feature */
+ feature = featureCreate(featureName, audioType, switchFieldInfo, featureOptionName);
+ HASH_ADD_KEYPTR(hh, treeRoot->featureHash, feature->name, strlen(feature->name), feature);
+
+ if (feature->switchFieldInfo)
+ {
+ INFO_LOG("Add Feature name = %s, feature_option = %s, %s=%s, %s=%s, %s=%s\n", featureName, featureOptionName, ATTRI_AUDIO_TYPE, feature->switchFieldInfo->paramInfo->audioType->name, ATTRI_PARAM, feature->switchFieldInfo->paramInfo->name, ATTRI_NAME, feature->switchFieldInfo->name);
+ }
+
+ /* Process <FieldList> */
+ fieldListNode = findXmlNodeByElemName(featureNode->children, ELEM_FIELD_LIST);
+ if (fieldListNode && fieldListNode->children)
+ {
+ fieldNode = fieldListNode->children;
+ while ((fieldNode = findXmlNodeByElemName(fieldNode->next, ELEM_FIELD)))
+ {
+ /* Process <Field> */
+ FieldInfo *fieldInfo = utilXmlNodeGetFieldInfo(audioType->appHandle, fieldNode, ATTRI_AUDIO_TYPE, ATTRI_PARAM, ATTRI_NAME);
+ if (fieldInfo)
+ {
+ FeatureField *featureField = featureFieldCreate(fieldInfo);
+ HASH_ADD_KEYPTR(hh, feature->featureFieldHash, featureField->fieldInfo->name, strlen(featureField->fieldInfo->name), featureField);
+ INFO_LOG("Add FeatureField %s=%s, %s=%s, %s=%s\n", ATTRI_AUDIO_TYPE, featureField->fieldInfo->paramInfo->audioType->name, ATTRI_PARAM, featureField->fieldInfo->paramInfo->name, ATTRI_NAME, featureField->fieldInfo->name);
+ }
+ }
+ }
+
+ /* Process <CategoryPathList> */
+ categoryPathListNode = findXmlNodeByElemName(featureNode->children, ELEM_CATEGORY_PATH_LIST);
+ if (categoryPathListNode && categoryPathListNode->children)
+ {
+ categoryNode = categoryPathListNode->children;
+ while ((categoryNode = findXmlNodeByElemName(categoryNode->next, ELEM_CATEGORY)))
+ {
+ /* Process <Category> */
+ xmlChar *path = xmlGetProp(categoryNode, ATTRI_PATH);
+ if (path)
+ {
+ CategoryPath *categoryPath = categoryPathCreate(feature, path);
+ if (categoryPath)
+ {
+ HASH_ADD_KEYPTR(hh, feature->categoryPathHash, categoryPath->path, strlen(categoryPath->path), categoryPath);
+ INFO_LOG("Add CategoryPath path=%s\n", categoryPath->path);
+ }
+ else
+ {
+ ERR_LOG("CategoryPath creation fail! (%s)\n", path);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamTreeHash(AudioType *audioType)
+{
+ xmlNode *root = NULL, *audioParamNode = NULL, *paramTreeNode = NULL, *paramNode = NULL;
+ root = xmlDocGetRootElement(audioType->audioParamDoc);
+
+ if (root)
+ {
+ audioParamNode = findXmlNodeByElemName(root, ELEM_AUDIO_PARAM);
+ }
+
+ if (audioParamNode)
+ {
+ paramTreeNode = findXmlNodeByElemName(audioParamNode->children, ELEM_PARAM_TREE);
+ }
+
+ if (paramTreeNode && paramTreeNode->children)
+ {
+ paramNode = paramTreeNode->children;
+ }
+ else
+ {
+ ERR_LOG("No param element found!\n");
+ return APP_ERROR;
+ }
+
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM)))
+ {
+ xmlChar *paramId = xmlNodeGetProp(paramNode, ATTRI_PARAM_ID);
+ xmlChar *path = xmlNodeGetProp(paramNode, ATTRI_PATH);
+
+ if (paramId && path)
+ {
+ ParamUnit *paramUnit = NULL;
+ ParamTree *item = paramTreeCreate((int)strtoul((char *)paramId, NULL, 0), (char *)path);
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+ DEBUG_LOG("Add param to ParamTree hash, path=\"%s\", paramId = %d\n", item->categoryPath, item->paramId);
+
+ /* Update the paramUnit's refCount */
+ HASH_FIND_INT(audioType->paramUnitHash, &item->paramId, paramUnit);
+ if (paramUnit)
+ {
+ paramUnit->refCount++;
+ }
+ }
+ else
+ {
+ WARN_LOG("Invalid ParamTree item! (path=%s, param_id=%s)\n", (char *)path, (char *)paramId);
+ }
+
+ xmlFree(paramId);
+ xmlFree(path);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamUnitHash(AudioType *audioType)
+{
+ xmlNode *root = NULL, *audioParamNode = NULL, *paramTreeNode = NULL, *paramUnitNode = NULL;
+ root = xmlDocGetRootElement(audioType->audioParamDoc);
+
+ if (root)
+ {
+ audioParamNode = findXmlNodeByElemName(root, ELEM_AUDIO_PARAM);
+ }
+
+ if (audioParamNode)
+ {
+ paramTreeNode = findXmlNodeByElemName(audioParamNode->children, ELEM_PARAM_UNIT_POOL);
+ }
+
+ if (paramTreeNode && paramTreeNode->children)
+ {
+ paramUnitNode = paramTreeNode->children;
+ }
+ else
+ {
+ ERR_LOG("No paramUnit element found!\n");
+ return APP_ERROR;
+ }
+
+ while ((paramUnitNode = findXmlNodeByElemName(paramUnitNode->next, ELEM_PARAM_UNIT)))
+ {
+ xmlChar *paramIdXmlStr = xmlNodeGetProp(paramUnitNode, ATTRI_PARAM_ID);
+ int paramId = (int)strtoul((char *)paramIdXmlStr, NULL, 0);
+ Param *paramHash = audioTypeGetParamHash(audioType, paramUnitNode);
+ ParamUnit *paramUnit = paramUnitCreate(audioType, paramId, paramHash);
+
+ /* Insert to hash */
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, paramUnit);
+ DEBUG_LOG("Add ParamHash to ParamUnit hash. (id=%d, param = %p)\n", paramUnit->paramId, paramUnit->paramHash);
+ xmlFree(paramIdXmlStr);
+ }
+
+ return APP_NO_ERROR;
+}
+EXPORT Param *audioTypeGetParamHash(AudioType *audioType, xmlNode *paramUnitNode)
+{
+ Param *paramHash = NULL;
+ Param *paramItem = NULL;
+ ParamInfo *paramInfo = NULL;
+ xmlNode *paramNode = paramUnitNode->children;
+
+ if (!paramNode)
+ {
+ return NULL;
+ }
+
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM)))
+ {
+ /* Get param info */
+ xmlNode *fieldNode = NULL;
+ xmlChar *paramName = xmlNodeGetProp(paramNode, ATTRI_NAME);
+ xmlChar *paramValue = xmlNodeGetProp(paramNode, ATTRI_VALUE);
+ HASH_FIND_STR(audioType->paramInfoHash, (char *)paramName, paramInfo);
+
+ /* Add param to hash */
+ paramItem = paramCreate((char *)paramName, paramInfo, (char *)paramValue);
+ HASH_ADD_KEYPTR(hh, paramHash, paramItem->name, strlen(paramItem->name), paramItem);
+ DEBUG_LOG("Add param (name = %s, value = %s) to paramHash(0x%p)\n", paramName, paramValue, paramHash);
+
+ xmlFree(paramName);
+ xmlFree(paramValue);
+ }
+
+ return paramHash;
+}
+
+EXPORT APP_STATUS audioTypeLoadCategoryTypeHash(AudioType *audioType)
+{
+ xmlNode *node, *categoryTypeListNode, *categoryTypeNode, *categoryNode, *subCategoryNode;
+ xmlNode *root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ if (!root_element)
+ {
+ return APP_ERROR;
+ }
+
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ if (!node)
+ {
+ return APP_ERROR;
+ }
+
+ categoryTypeListNode = findXmlNodeByElemName(node->children, ELEM_CATEGORY_TYPE_LIST);
+ if (!categoryTypeListNode)
+ {
+ return APP_ERROR;
+ }
+
+ categoryTypeNode = categoryTypeListNode->children;
+ if (!categoryTypeNode)
+ {
+ return APP_ERROR;
+ }
+
+ while ((categoryTypeNode = findXmlNodeByElemName(categoryTypeNode->next, ELEM_CATEGORY_TYPE)))
+ {
+ xmlChar *categoryTypeName = xmlNodeGetProp(categoryTypeNode, ATTRI_NAME);
+ xmlChar *categoryTypeWording = xmlNodeGetWording(categoryTypeNode);
+ xmlChar *categoryTypeVisibleStr = xmlNodeGetProp(categoryTypeNode, ATTRI_VISIBLE);
+ int categoryTypeVisible = categoryTypeVisibleStr ? strcmp(categoryTypeVisibleStr, "false") : 1;
+
+ CategoryType *categoryType = categoryTypeCreate((char *)categoryTypeName, (char *)categoryTypeWording, audioType, categoryTypeVisible);
+ HASH_ADD_KEYPTR(hh, audioType->categoryTypeHash, categoryType->wording, strlen(categoryType->wording), categoryType);
+
+ categoryNode = categoryTypeNode->children;
+ for (categoryNode = categoryTypeNode->children; categoryNode; categoryNode = categoryNode->next)
+ {
+ if (!strcmp((char *)categoryNode->name, ELEM_CATEGORY))
+ {
+ int size;
+ xmlChar *categoryName = xmlNodeGetProp(categoryNode, ATTRI_NAME);
+ xmlChar *categoryWording = xmlNodeGetWording(categoryNode);
+ xmlChar *aliasStr = xmlNodeGetProp(categoryNode, ATTRI_ALIAS);
+ xmlChar *categoryVisibleStr = xmlNodeGetProp(categoryNode, ATTRI_VISIBLE);
+ int categoryVisible = categoryVisibleStr ? strcmp(categoryVisibleStr, "false") : 1;
+
+ /* Process wording info */
+ Category *category = categoryCreate((char *)categoryName, (char *)categoryWording, PARENT_IS_CATEGORY_TYPE, categoryType, categoryVisible);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryHash, category->wording, strlen(category->wording), category);
+
+ /* Process alias info */
+ if (aliasStr)
+ {
+ size = paramGetArraySizeFromString((char *)aliasStr);
+ if (size == 1)
+ {
+ CategoryAlias *categoryAlias = categoryAliasCreate((char *)aliasStr, category);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryAliasHash, categoryAlias->alias, strlen(categoryAlias->alias), categoryAlias);
+ }
+ else
+ {
+ char *tmpStr = strdup((char *)aliasStr);
+ char *alias = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ CategoryAlias *categoryAlias = categoryAliasCreate(alias, category);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryAliasHash, categoryAlias->alias, strlen(categoryAlias->alias), categoryAlias);
+
+ while ((alias = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ categoryAlias = categoryAliasCreate(alias, category);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryAliasHash, categoryAlias->alias, strlen(categoryAlias->alias), categoryAlias);
+ }
+
+ free(tmpStr);
+ }
+ }
+
+ xmlFree(categoryName);
+ xmlFree(categoryWording);
+ xmlFree(aliasStr);
+ }
+ else if (!strcmp((char *)categoryNode->name, ELEM_CATEGORY_GROUP))
+ {
+ xmlChar *categoryGroupName = xmlNodeGetProp(categoryNode, ATTRI_NAME);
+ xmlChar *categoryGroupWording = xmlNodeGetWording(categoryNode);
+ xmlChar* categoryGroupVisibleStr = xmlNodeGetProp(categoryNode, ATTRI_VISIBLE);
+ int categoryGroupVisible = categoryGroupVisibleStr ? strcmp(categoryGroupVisibleStr, "false") : 1;
+
+ CategoryGroup *categoryGroup = categoryGroupCreate((char *)categoryGroupName, (char *)categoryGroupWording, categoryType, categoryGroupVisible);
+ HASH_ADD_KEYPTR(hh, categoryType->categoryGroupHash, categoryGroup->wording, strlen(categoryGroup->wording), categoryGroup);
+
+ xmlFree(categoryGroupName);
+ xmlFree(categoryGroupWording);
+
+ //Category* subCategory = categoryCreate(subCategoryNode->name, xmlNodeGetWording(subCategoryNode), IS_CATEGORY_GROUP, categoryType, NULL);
+ for (subCategoryNode = categoryNode->children; subCategoryNode; subCategoryNode = subCategoryNode->next)
+ {
+ if (!strcmp((char *)subCategoryNode->name, ELEM_CATEGORY))
+ {
+ xmlChar *categoryName = xmlNodeGetProp(subCategoryNode, ATTRI_NAME);
+ xmlChar *categoryWording = xmlNodeGetWording(subCategoryNode);
+ xmlChar *visibleStr = xmlNodeGetProp(categoryNode, ATTRI_VISIBLE);
+ int visible = visibleStr ? strcmp(visibleStr, "false") : 1;
+
+ Category *category = categoryCreate((char *)categoryName, (char *)categoryWording, PARENT_IS_CATEGORY_GROUP, categoryGroup, visible);
+ HASH_ADD_KEYPTR(hh, categoryGroup->categoryHash, category->wording, strlen(category->wording), category);
+ //printf("\t\t%s wording = %s (name = %s)\n", subCategoryNode->name, xmlNodeGetWording(subCategoryNode), xmlNodeGetProp(subCategoryNode, ATTRI_NAME));
+
+ xmlFree(categoryName);
+ xmlFree(categoryWording);
+ }
+ }
+
+ }
+ }
+ xmlFree(categoryTypeName);
+ xmlFree(categoryTypeWording);
+
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeLoadParamFieldInfoHash(AudioType *audioType)
+{
+ xmlNode *root = NULL, *audioParamUnitDescNode = NULL, *paramUnitNode = NULL, *paramNode = NULL, *fieldNode = NULL;
+ root = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+
+ if (root)
+ {
+ audioParamUnitDescNode = findXmlNodeByElemName(root, ELEM_PARAM_UNIT_DESC);
+ }
+
+ if (audioParamUnitDescNode && audioParamUnitDescNode->children)
+ {
+ paramUnitNode = findXmlNodeByElemName(audioParamUnitDescNode->children, ELEM_PARAM_UNIT);
+ }
+
+ if (paramUnitNode && paramUnitNode->children)
+ {
+ paramNode = paramUnitNode->children;
+ }
+ else
+ {
+ ERR_LOG("No paramUnit element found!\n");
+ return APP_ERROR;
+ }
+
+ while ((paramNode = findXmlNodeByElemName(paramNode->next, ELEM_PARAM)))
+ {
+ ParamInfo *paramInfo = NULL;
+ /* Get all param */
+ xmlChar *paramName = xmlNodeGetProp(paramNode, ATTRI_NAME);
+ xmlChar *paramTypeStr = xmlNodeGetProp(paramNode, ATTRI_TYPE);
+ DATA_TYPE paramType = paramDataTypeToEnum((char *)paramTypeStr);
+
+ if (!paramName)
+ {
+ ERR_LOG("Cannot find the paramName\n");
+ if (!paramTypeStr)
+ {
+ xmlFree(paramTypeStr);
+ }
+ continue;
+ }
+
+ if (!paramTypeStr)
+ {
+ ERR_LOG("Cannot find the paramType\n");
+ xmlFree(paramName);
+ continue;
+ }
+
+ if (paramType == TYPE_UNKNOWN)
+ {
+ /* The default data type of param element is string*/
+ paramType = TYPE_STR;
+ }
+
+ /* Insert to hash */
+ paramInfo = paramInfoCreate((char *)paramName, paramType, audioType);
+ HASH_ADD_KEYPTR(hh, audioType->paramInfoHash, paramInfo->name, strlen(paramInfo->name), paramInfo);
+ DEBUG_LOG("Add ParamInfo to paramInfoHash hash. (name=%s, type = %x)\n", paramInfo->name, (paramInfo->dataType));
+
+ fieldNode = paramNode->children;
+ if (!fieldNode)
+ {
+ xmlFree(paramName);
+ xmlFree(paramTypeStr);
+ continue;
+ }
+
+ while ((fieldNode = findXmlNodeByElemName(fieldNode->next, ELEM_FIELD)))
+ {
+ xmlChar *fieldName;
+ xmlChar *fieldArrayIndex;
+ xmlChar *fieldBit;
+ xmlChar *fieldCheckList;
+ char *tmpStr;
+ unsigned int arrayIndex;
+ int startBit;
+ int endBit;
+ errno = 0;
+
+ /* Get name */
+ fieldName = xmlNodeGetProp(fieldNode, ATTRI_NAME);
+ if (!fieldName)
+ {
+ ERR_LOG("Cannot find the fieldName\n");
+ continue;
+ }
+
+ /* Get array_index */
+ fieldArrayIndex = xmlNodeGetProp(fieldNode, ATTRI_ARRAY_INDEX);
+ if (!fieldArrayIndex)
+ {
+ ERR_LOG("Cannot find the array_index\n");
+ xmlFree(fieldName);
+ continue;
+ }
+
+ arrayIndex = strtoul((const char *)fieldArrayIndex, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to array_index!\n", fieldArrayIndex);
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ continue;
+ }
+
+ /* Get bit */
+ fieldBit = xmlNodeGetProp(fieldNode, ATTRI_BIT);
+ if (!fieldBit)
+ {
+ ERR_LOG("Cannot find the fieldBit\n");
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ continue;
+ }
+
+ tmpStr = strdup(fieldBit != NULL ? ((char *)fieldBit) : "");
+ startBit = strtoul(strtok(tmpStr, ARRAY_SEPERATOR), NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to startBit!\n", tmpStr);
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ free(tmpStr);
+ continue;
+ }
+
+ endBit = strtoul(strtok(NULL, ARRAY_SEPERATOR), NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to endBit!\n", tmpStr);
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ free(tmpStr);
+ continue;
+ }
+ free(tmpStr);
+
+ /* Get check list */
+ fieldCheckList = xmlNodeGetProp(fieldNode, ATTRI_CHECK_LIST);
+ if (arrayIndex >= 0 && startBit >= 0 && endBit >= 0)
+ {
+ FieldInfo *fieldInfo = fieldInfoCreate((char *)fieldName, arrayIndex, startBit, endBit, (char *)fieldCheckList, paramInfo);
+ HASH_ADD_KEYPTR(hh, paramInfo->fieldInfoHash, fieldInfo->name, strlen(fieldInfo->name), fieldInfo);
+ DEBUG_LOG("Add FieldInfo to fieldInfoHash hash. (name=%s, arrayIndex=%lu, bit[%d,%d], check_list = %s, hash size=%lu)\n", fieldInfo->name, arrayIndex, fieldInfo->startBit, fieldInfo->endBit, fieldCheckList, paramInfoGetNumOfFieldInfo(paramInfo));
+ }
+ else
+ {
+ ERR_LOG("Cannot create field information. (name=%s, arrayIndex=%lu, startBit=%d, endBit=%d, fieldCheckList=%s)\n", fieldName, arrayIndex, startBit, endBit, fieldCheckList);
+ }
+
+ xmlFree(fieldName);
+ xmlFree(fieldArrayIndex);
+ xmlFree(fieldBit);
+ xmlFree(fieldCheckList);
+ }
+
+ xmlFree(paramName);
+ xmlFree(paramTypeStr);
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT ParamTree *paramTreeCreate(int paramId, const char *categoryPath)
+{
+ ParamTree *paramTree = (ParamTree *)malloc(sizeof(ParamTree));
+ paramTree->paramId = paramId;
+ paramTree->categoryPath = strdup(categoryPath ? categoryPath : "");
+ return paramTree;
+}
+
+EXPORT void paramTreeRelease(ParamTree *paramTree)
+{
+ if (paramTree)
+ {
+ if (paramTree->categoryPath)
+ {
+ free(paramTree->categoryPath);
+ }
+ free(paramTree);
+ }
+}
+
+EXPORT size_t audioTypeGetNumOfParamTree(AudioType *audioType)
+{
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return 0;
+ }
+
+ return HASH_COUNT(audioType->paramTreeHash);
+}
+
+EXPORT size_t audioTypeGetNumOfParamInfo(AudioType *audioType)
+{
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return 0;
+ }
+
+ return HASH_COUNT(audioType->paramInfoHash);
+}
+
+EXPORT ParamInfo *audioTypeGetParamInfoByIndex(AudioType *audioType, size_t index)
+{
+ ParamInfo *paramInfo = NULL;
+ size_t i = 0;
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ for (paramInfo = audioType->paramInfoHash; paramInfo ; paramInfo = paramInfo->hh.next)
+ {
+ if (index == i++)
+ {
+ return paramInfo;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT ParamInfo *audioTypeGetParamInfoByName(AudioType *audioType, const char *paramName)
+{
+ ParamInfo *paramInfo;
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ if (!paramName)
+ {
+ ERR_LOG("paramName is NULL\n");
+ return NULL;
+ }
+
+ /* Query Param name */
+ HASH_FIND_STR(audioType->paramInfoHash, paramName, paramInfo);
+
+ return paramInfo;
+}
+
+EXPORT size_t audioTypeGetNumOfCategoryType(AudioType *audioType)
+{
+ return HASH_COUNT(audioType->categoryTypeHash);
+}
+
+EXPORT CategoryType *audioTypeGetCategoryTypeByIndex(AudioType *audioType, size_t index)
+{
+ CategoryType *categoryType = NULL;
+ size_t i = 0;
+
+ //INFO_LOG("audioType = %s, index = %d\n", audioType ? audioType->name : "NULL", index);
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ for (categoryType = audioType->categoryTypeHash; categoryType ; categoryType = categoryType->hh.next)
+ {
+ if (index == i++)
+ {
+ return categoryType;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryType *audioTypeGetCategoryTypeByName(AudioType *audioType, const char *categoryTypeName)
+{
+ CategoryType *categoryType = NULL;
+ size_t i = 0;
+
+ //INFO_LOG("audioType = %s, name = %s\n", audioType ? audioType->name : "NULL", categoryTypeName);
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ for (categoryType = audioType->categoryTypeHash; categoryType ; categoryType = categoryType->hh.next)
+ {
+ if (!strcmp(categoryType->name, categoryTypeName))
+ {
+ return categoryType;
+ }
+ }
+
+ return NULL;
+}
+
+EXPORT CategoryType *audioTypeGetCategoryTypeByWording(AudioType *audioType, const char *categoryTypeWording)
+{
+ CategoryType *categoryType;
+
+ //INFO_LOG("audioType = %s, categoryTypeWording = %s\n", audioType ? audioType->name : "NULL", categoryTypeWording);
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return NULL;
+ }
+
+ /* Query Param name */
+ HASH_FIND_STR(audioType->categoryTypeHash, categoryTypeWording, categoryType);
+
+ return categoryType;
+}
+
+EXPORT APP_STATUS audioTypeSetParamData(AudioType *audioType, const char *fullCategoryPath, ParamInfo *paramInfo, void *paramData, int arraySize)
+{
+ ParamTree *paramTree = NULL;
+ UT_string *categoryPath = NULL;
+ char *paramDataStr;
+
+ INFO_LOG("+++\n");
+ if (!audioType)
+ {
+ ERR_LOG("---audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fullCategoryPath)
+ {
+ ERR_LOG("---categoryPath is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!paramInfo)
+ {
+ ERR_LOG("---paramInfo is NULL\n");
+ return APP_ERROR;
+ }
+
+ categoryPath = utilNormalizeCategoryPathForAudioType(fullCategoryPath, audioType);
+ if (!categoryPath)
+ {
+ ERR_LOG("---Cannot normalize categoryPath for %s AudioType. (path = %s)\n", audioType->name, fullCategoryPath);
+ return APP_ERROR;
+ }
+
+ paramDataStr = utilConvDataToString(paramInfo->dataType, paramData, arraySize);
+ INFO_LOG("audioType = %s, fullCategoryPath = %s, param = %s, paramData = 0x%p, arraySize = %d\n", audioType->name, fullCategoryPath, paramInfo->name, paramData, arraySize);
+ INFO_LOG("paramData = %s\n", paramDataStr);
+ free(paramDataStr);
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ /* Check the target paramUnit status (category path exactly match? ref count?) */
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(categoryPath), paramTree);
+ if (paramTree)
+ {
+ /* Category path exactly match */
+ ParamUnit *paramUnit = NULL;
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, paramUnit);
+
+ if (!paramUnit)
+ {
+ ERR_LOG("---Cannot find target paramUnit for paramId %d for %s AudioType. (path = %s)\n", paramTree->paramId, audioType->name, utstring_body(categoryPath));
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ utstring_free(categoryPath);
+ return APP_ERROR;
+ }
+
+ if (paramUnit->refCount == 1)
+ {
+ /* ParamUnit only used by itself, update param data directly */
+ Param *param = paramUnitGetParamByName(paramUnit, paramInfo->name);
+ void *oldData = param->data; // Keep old data ptr & free it after new data settled.
+ paramSetupDataInfoByVal(param, paramData, arraySize);
+ free(oldData);
+ DEBUG_LOG("Find the ParamUnit by full category path. (paramId = %d, refCount = %d, categoryPath = %s)\n", paramTree->paramId, paramUnit->refCount, paramTree->categoryPath);
+ }
+ else
+ {
+ /* ParamUnit not only used by itself, new ParamUnit */
+ Param *param;
+
+ /* New paramUnit */
+ ParamUnit *newParamUnit = paramUnitClone(paramUnit);
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* Update the paramId of ParamTree */
+ paramTree->paramId = newParamUnit->paramId;
+
+ /* Old ParamUnit ref count -1 */
+ paramUnit->refCount--;
+
+ /* Update new ParamUnit param */
+ param = paramUnitGetParamByName(newParamUnit, paramInfo->name);
+ free(param->data);
+ paramSetupDataInfoByVal(param, paramData, arraySize);
+ DEBUG_LOG("Find the ParamUnit by full category path.(ref count = %d, new ParamUnit id = %d, categoryPath = %s)\n", paramUnit->refCount, newParamUnit->paramId, paramTree->categoryPath);
+ }
+ }
+ else
+ {
+ /* No exactly match ParamUnit, create new ParamUnit & ParamTree */
+ /* New paramUnit */
+ Param *param;
+ ParamUnit *paramUnit = audioTypeGetParamUnit(audioType, fullCategoryPath);
+ ParamUnit *newParamUnit = paramUnitClone(paramUnit);
+
+ if (!paramUnit)
+ {
+ ERR_LOG("---paramUnit is NULL\n");
+ audioTypeUnlock(audioType);
+ utstring_free(categoryPath);
+ return APP_NO_ERROR;
+ }
+
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* New ParamTree */
+ paramTree = paramTreeCreate(newParamUnit->paramId, utstring_body(categoryPath));
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, paramTree->categoryPath, strlen(paramTree->categoryPath), paramTree);
+
+ /* Update new ParamUnit param */
+ param = paramUnitGetParamByName(newParamUnit, paramInfo->name);
+ free(param->data);
+ paramSetupDataInfoByVal(param, paramData, arraySize);
+
+ DEBUG_LOG("Not found the match paramTree, new paramUnit & paramTree (paramId = %d, categoryPath = %s)\n", newParamUnit->paramId, utstring_body(categoryPath));
+ }
+
+ /* Param data modified, change the dirty info */
+ audioType->dirty = 1;
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(categoryPath);
+ INFO_LOG("---\n");
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeSaveAudioParamXml(AudioType *audioType, const char *saveDir, int clearDirtyBit)
+{
+ xmlDocPtr doc = NULL;
+ xmlNodePtr audioParamNode = NULL, paramTreeNode = NULL, paramNode = NULL, paramUnitPoolNode = NULL, paramUnitNode = NULL;
+ size_t size = 0;
+ ParamTree *paramTreeItem;
+ ParamUnit *paramUnitItem;
+ Param *paramItem;
+ UT_string *filePath, *str;
+ APP_STATUS result = APP_NO_ERROR;
+
+ INFO_LOG("audioType = %s, saveDir = %s\n", audioType ? audioType->name : "NULL", saveDir);
+
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!saveDir)
+ {
+ ERR_LOG("saveDir is NULL\n");
+ return APP_ERROR;
+ }
+
+ utstring_new(filePath);
+ utstring_new(str);
+
+ doc = xmlNewDoc(BAD_CAST "1.0");
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ audioParamNode = xmlNewNode(NULL, BAD_CAST ELEM_AUDIO_PARAM);
+ utstring_printf(str, "%d.%d", audioType->audioParamVerMaj, audioType->audioParamVerMin);
+ xmlNewProp(audioParamNode, BAD_CAST ATTRI_VERSION, BAD_CAST utstring_body(str));
+ utstring_clear(str);
+ xmlDocSetRootElement(doc, audioParamNode);
+
+ /* add ParamTree & Param */
+ paramTreeNode = xmlNewChild(audioParamNode, NULL, BAD_CAST ELEM_PARAM_TREE, NULL);
+ for (paramTreeItem = audioType->paramTreeHash; paramTreeItem != NULL; paramTreeItem = paramTreeItem->hh.next)
+ {
+ paramNode = xmlNewChild(paramTreeNode, NULL, BAD_CAST ELEM_PARAM, NULL);
+ utstring_printf(str, "%d", paramTreeItem->paramId);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_PATH, BAD_CAST paramTreeItem->categoryPath);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_PARAM_ID, BAD_CAST utstring_body(str));
+ utstring_clear(str);
+ }
+
+ /* add ParamUnitPool */
+ paramUnitPoolNode = xmlNewChild(audioParamNode, NULL, BAD_CAST ELEM_PARAM_UNIT_POOL, NULL);
+ for (paramUnitItem = audioType->paramUnitHash; paramUnitItem != NULL; paramUnitItem = paramUnitItem->hh.next)
+ {
+ paramUnitNode = xmlNewChild(paramUnitPoolNode, NULL, BAD_CAST ELEM_PARAM_UNIT, NULL);
+ utstring_printf(str, "%d", paramUnitItem->paramId);
+ xmlNewProp(paramUnitNode, BAD_CAST ATTRI_PARAM_ID, BAD_CAST utstring_body(str));
+ utstring_clear(str);
+
+ /* Add Param */
+ for (paramItem = paramUnitItem->paramHash; paramItem != NULL; paramItem = paramItem->hh.next)
+ {
+ char *data = paramNewDataStr(paramItem);
+ paramNode = xmlNewChild(paramUnitNode, NULL, BAD_CAST ELEM_PARAM, NULL);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_NAME, BAD_CAST paramItem->name);
+ xmlNewProp(paramNode, BAD_CAST ATTRI_VALUE, BAD_CAST data);
+ free(data);
+ }
+ }
+
+ utilMkdir(saveDir);
+
+ utstring_printf(filePath, "%s"FOLDER"%s"AUDIO_PARAM_XML_POSFIX, saveDir, audioType->name);
+ if (xmlSaveFormatFileEnc(utstring_body(filePath), doc, "UTF-8", 1) == -1)
+ {
+ result = APP_ERROR;
+ }
+ else
+ {
+ if (clearDirtyBit) {
+ audioType->dirty = 0;
+ }
+ }
+
+ xmlFreeDoc(doc);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(filePath);
+ utstring_free(str);
+
+ return result;
+}
+
+EXPORT APP_STATUS audioTypeSetFieldData(AudioType *audioType, const char *fullCategoryPath, FieldInfo *fieldInfo, unsigned int val)
+{
+ ParamTree *paramTree = NULL;
+ UT_string *categoryPath = NULL;
+
+ INFO_LOG("+++\n");
+ if (!audioType)
+ {
+ ERR_LOG("---audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fullCategoryPath)
+ {
+ ERR_LOG("---categoryPath is NULL\n");
+ return APP_ERROR;
+ }
+
+ if (!fieldInfo)
+ {
+ ERR_LOG("---fieldInfo is NULL\n");
+ return APP_ERROR;
+ }
+
+ INFO_LOG("audioType = %s, categoryPath = %s, field = %s, value = 0x%x\n", audioType->name, fullCategoryPath, fieldInfo->name, val);
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ categoryPath = utilNormalizeCategoryPathForAudioType(fullCategoryPath, audioType);
+ if (!categoryPath)
+ {
+ ERR_LOG("---Cannot normalize categoryPath for %s AudioType. (path = %s)\n", audioType->name, fullCategoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ /* Check the target paramUnit status (category path exactly match? ref count?) */
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(categoryPath), paramTree);
+ if (paramTree)
+ {
+ /* Category path exactly match */
+ ParamUnit *paramUnit = NULL;
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, paramUnit);
+
+ if (!paramUnit)
+ {
+ ERR_LOG("---Cannot find target paramUnit for paramId %d for %s AudioType. (path = %s)\n", paramTree->paramId, audioType->name, fullCategoryPath);
+ utstring_free(categoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ if (paramUnit->refCount == 1)
+ {
+ /* ParamUnit only used by itself, update field data directly */
+ Param *param = paramUnitGetParamByName(paramUnit, fieldInfo->paramInfo->name);
+ paramSetFieldVal(param, fieldInfo, val);
+ DEBUG_LOG("Find the ParamUnit by full category path. (paramId = %d, refCount = %d, categoryPath = %s)\n", paramTree->paramId, paramUnit->refCount, paramTree->categoryPath);
+
+ if (param && appDebugLevel <= DEBUG_LEVEL)
+ {
+ utilShowParamValue(param);
+ }
+ }
+ else
+ {
+ /* ParamUnit not only used by itself, new ParamUnit */
+ Param *param;
+
+ /* New paramUnit */
+ ParamUnit *newParamUnit = paramUnitClone(paramUnit);
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* Update the paramId of ParamTree */
+ paramTree->paramId = newParamUnit->paramId;
+
+ /* Old ParamUnit ref count -1 */
+ paramUnit->refCount--;
+
+ /* Update new ParamUnit field */
+ param = paramUnitGetParamByName(newParamUnit, fieldInfo->paramInfo->name);
+ paramSetFieldVal(param, fieldInfo, val);
+ DEBUG_LOG("Find the ParamUnit by full category path.(ref count = %d, new ParamUnit id = %d, categoryPath = %s)\n", paramUnit->refCount, newParamUnit->paramId, paramTree->categoryPath);
+
+ if (param && appDebugLevel <= DEBUG_LEVEL)
+ {
+ utilShowParamValue(param);
+ }
+ }
+ }
+ else
+ {
+ /* No exactly match ParamUnit, create new ParamUnit & ParamTree */
+ /* New paramUnit */
+ Param *param;
+ ParamUnit *paramUnit = audioTypeGetParamUnit(audioType, fullCategoryPath);
+ ParamUnit *newParamUnit;
+ if (!paramUnit)
+ {
+ ERR_LOG("---Cannot find the param unit (category path = %s)\n", fullCategoryPath);
+ utstring_free(categoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+ newParamUnit = paramUnitClone(paramUnit);
+ newParamUnit->refCount = 1;
+ newParamUnit->paramId = utilFindUnusedParamId(audioType);
+ HASH_ADD_INT(audioType->paramUnitHash, paramId, newParamUnit);
+
+ /* New ParamTree */
+ paramTree = paramTreeCreate(newParamUnit->paramId, utstring_body(categoryPath));
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, paramTree->categoryPath, strlen(paramTree->categoryPath), paramTree);
+
+ /* Update new ParamUnit field */
+ param = paramUnitGetParamByName(newParamUnit, fieldInfo->paramInfo->name);
+ paramSetFieldVal(param, fieldInfo, val);
+ DEBUG_LOG("Not found the match paramTree, new paramUnit & paramTree (paramId = %d, categoryPath = %s)\n", newParamUnit->paramId, utstring_body(categoryPath));
+
+ if (param && appDebugLevel <= DEBUG_LEVEL)
+ {
+ utilShowParamValue(param);
+ }
+ }
+
+ /* Param data modified, change the dirty info */
+ audioType->dirty = 1;
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(categoryPath);
+ INFO_LOG("---\n");
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS audioTypeParamUnitCopy(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath)
+{
+ ParamTree *paramTree;
+ ParamUnit *dstParamUnit = NULL;
+ UT_string *searchPath;
+ ParamUnit *srcParamUnit;
+
+ INFO_LOG("+++audioType = %s, srcCategoryPath = %s, dstCategoryPath = %s\n", audioType ? audioType->name : "NULL", srcCategoryPath, dstCategoryPath);
+
+ if (utilCompNormalizeCategoryPath(audioType, srcCategoryPath, dstCategoryPath) == 1)
+ {
+ WARN_LOG("---srcCategoryPath == dstCategoryPath, ignore it (%s)\n", srcCategoryPath);
+ return APP_NO_ERROR;
+ }
+
+ /* Write lock */
+ audioTypeWriteLock(audioType, __FUNCTION__);
+
+ srcParamUnit = audioTypeGetParamUnit(audioType, srcCategoryPath);
+ if (!srcParamUnit)
+ {
+ ERR_LOG("---Cannot find src param unit DONOT copy ParamUnit! (audioType=%s, category=%s)\n", audioType->name, srcCategoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ return APP_ERROR;
+ }
+
+ searchPath = utilNormalizeCategoryPathForAudioType(dstCategoryPath, audioType);
+ if (!searchPath)
+ {
+ ERR_LOG("---Cannot normalize categoryPath for %s AudioType. DONOT copy ParamUnit. (path = %s)\n", audioType->name, dstCategoryPath);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ utstring_free(searchPath);
+ return APP_ERROR;
+ }
+
+ HASH_FIND_STR(audioType->paramTreeHash, utstring_body(searchPath), paramTree);
+ if (paramTree)
+ {
+ /* Exactly match ParamUnit found */
+ HASH_FIND_INT(audioType->paramUnitHash, ¶mTree->paramId, dstParamUnit);
+ if (!dstParamUnit)
+ {
+ ERR_LOG("---Cannot find the dstParamUnit! DONOT copy ParamUnit. (%s -> %d -> NULL)\n", utstring_body(searchPath), paramTree->paramId);
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ utstring_free(searchPath);
+ return APP_ERROR;
+ }
+
+ if (dstParamUnit->refCount == 1)
+ {
+ /* Remove this param unit */
+ HASH_DEL(audioType->paramUnitHash, dstParamUnit);
+ paramUnitRelease(dstParamUnit);
+ dstParamUnit = NULL;
+ }
+ else
+ {
+ /* Update original ParamUnit ref count */
+ dstParamUnit->refCount--;
+ //INFO_LOG("dstParamUnit refCount = %d\n", dstParamUnit->refCount);
+ }
+
+ /* Update the paramTree's paramId info */
+ paramTree->paramId = srcParamUnit->paramId;
+ }
+ else
+ {
+ /* Add new ParamTree and refer to the srcParamUnit id */
+ paramTree = paramTreeCreate(srcParamUnit->paramId, utstring_body(searchPath));
+ HASH_ADD_KEYPTR(hh, audioType->paramTreeHash, paramTree->categoryPath, strlen(paramTree->categoryPath), paramTree);
+ }
+
+ /* Update src param unit ref count */
+ srcParamUnit->refCount++;
+ //INFO_LOG("srcParamUnit refCount = %d\n", srcParamUnit->refCount);
+
+ /* Param data modified, change the dirty info */
+ audioType->dirty = 1;
+ INFO_LOG("--- srcParamUnit = dstParamUnit(id = %d, ref count = %d), old dstParamUnit(ref count = %d)\n", srcParamUnit->paramId, srcParamUnit->refCount, dstParamUnit ? dstParamUnit->refCount : 0);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+
+ utstring_free(searchPath);
+ return APP_NO_ERROR;
+}
+
+EXPORT xmlNode *audioTypeGetCategoryTypeListNode(AudioType *audioType)
+{
+ xmlNode *root_element, *node;
+
+ root_element = xmlDocGetRootElement(audioType->paramUnitDescDoc);
+ if (!root_element)
+ {
+ WARN_LOG("No root element!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(root_element, ELEM_PARAM_UNIT_DESC);
+ if (!node)
+ {
+ WARN_LOG("No param unit desc node!\n");
+ return NULL;
+ }
+
+ node = findXmlNodeByElemName(node->children, ELEM_CATEGORY_TYPE_LIST);
+ if (!node)
+ {
+ WARN_LOG("No category type list node!\n");
+ return NULL;
+ }
+
+ return node;
+}
+
+EXPORT TreeRoot *audioTypeGetTreeRoot(AudioType *audioType, const char *treeRootName)
+{
+ TreeRoot *treeRoot = NULL;
+
+ INFO_LOG("audioType = %s, treeType = %s\n", audioType ? audioType->name : "NULL", treeRootName);
+
+ if (!audioType)
+ {
+ ERR_LOG("AudioType is NULL!\n");
+ return NULL;
+ }
+
+ if (audioType->paramTreeView)
+ {
+ HASH_FIND_STR(audioType->paramTreeView->treeRootHash, treeRootName, treeRoot);
+ }
+ else
+ {
+ ERR_LOG("paramTreeView is NULL\n");
+ }
+
+ return treeRoot;
+}
+
+EXPORT APP_STATUS audioTypeValidCategoryGroupName(AudioType *audioType, const char *name)
+{
+ CategoryType *categoryType;
+ CategoryGroup *categoryGroup;
+
+ if (audioTypeIsHardCategoryGroup(audioType, name))
+ {
+ return APP_NO_ERROR;
+ }
+
+ for (categoryType = audioType->categoryTypeHash; categoryType; categoryType = categoryType->hh.next)
+ {
+ HASH_FIND_STR(categoryType->categoryGroupHash, name, categoryGroup);
+ if (categoryGroup)
+ {
+ return APP_NO_ERROR;
+ }
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT int audioTypeIsHardCategoryGroup(AudioType *audioType, const char *categoryName)
+{
+ int arrayIndex;
+
+ for (arrayIndex = 0; HARD_CATEGORY_GROUP[arrayIndex][0]; arrayIndex++)
+ {
+ if (!strcmp(HARD_CATEGORY_GROUP[arrayIndex][0], audioType->name)
+ && !strcmp(HARD_CATEGORY_GROUP[arrayIndex][2], categoryName))
+ {
+ return 1;
+ }
+ }
+
+ return 0;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioUtils.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioUtils.c
new file mode 100644
index 0000000..fa0442a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/AudioUtils.c
@@ -0,0 +1,1800 @@
+#include "AudioParamParserPriv.h"
+#include <time.h>
+
+typedef struct StrPair
+{
+ char *key; /* key */
+ char *value;
+ UT_hash_handle hh; /* hash handle */
+} StrPair;
+
+StrPair *strPairCreate(const char *key, const char *value)
+{
+ StrPair *pair = malloc(sizeof(StrPair));
+ pair->key = strdup(key ? key : "");
+ pair->value = strdup(value ? value : "");
+ return pair;
+}
+
+void strPairRelease(StrPair *pair)
+{
+ if (pair)
+ {
+ free(pair->key);
+ free(pair->value);
+ free(pair);
+ }
+}
+
+EXPORT void appSetDebugLevel(MSG_LEVEL level)
+{
+ INFO_LOG("appSetDebugLevel(), level = %d\n", level);
+#ifndef FORCE_DEBUG_LEVEL
+ appDebugLevel = level;
+#endif
+}
+
+EXPORT MSG_LEVEL appGetDebugLevel()
+{
+ INFO_LOG("appGetDebugLevel(), level = %d\n", appDebugLevel);
+ return appDebugLevel;
+}
+
+EXPORT xmlNode *findXmlNodeByElemName(xmlNode *node, const char *elemName)
+{
+ xmlNode *cur_node;
+
+ if (!node)
+ {
+ DEBUG_LOG("xmlNode is NULL\n");
+ return NULL;
+ }
+
+ if (!elemName)
+ {
+ DEBUG_LOG("elemName is NULL\n");
+ return NULL;
+ }
+
+ for (cur_node = node; cur_node; cur_node = cur_node->next)
+ {
+ if (cur_node->type == XML_ELEMENT_NODE && !strcmp((const char *)cur_node->name, elemName))
+ {
+ return cur_node;
+ }
+ }
+ return NULL;
+}
+
+
+EXPORT xmlChar *xmlNodeGetProp(xmlNode *node, const char *prop)
+{
+ if (!node)
+ {
+ ERR_LOG("xmlNode is NULL\n");
+ return NULL;
+ }
+
+ if (!prop)
+ {
+ ERR_LOG("prop is NULL\n");
+ return NULL;
+ }
+
+ return xmlGetProp(node, (const xmlChar *)prop);
+}
+
+EXPORT xmlChar *xmlNodeGetWording(xmlNode *node)
+{
+ xmlChar *wording = xmlNodeGetProp(node, ATTRI_WORDING);
+ if (wording == NULL)
+ {
+ wording = xmlNodeGetProp(node, ATTRI_NAME);
+ }
+ return wording;
+}
+
+void print_element_names(xmlNode *a_node)
+{
+ xmlNode *cur_node = NULL;
+
+ for (cur_node = a_node; cur_node; cur_node = cur_node->next)
+ {
+ if (cur_node->type == XML_ELEMENT_NODE)
+ {
+ printf("node type: Element, name: %s\n", cur_node->name);
+ }
+
+ print_element_names(cur_node->children);
+ }
+}
+
+void appDumpXmlDoc(xmlDoc *doc)
+{
+ /*Get the root element node */
+ xmlNode *root_element = xmlDocGetRootElement(doc);
+
+ print_element_names(root_element);
+}
+
+#ifndef WIN32
+EXPORT void signalHandler(int sig, siginfo_t *info, void *ucontext)
+{
+ INFO_LOG("Got thread notify signal. sig = %d, info = %p, ucontext = %p\n", sig, info, ucontext);
+}
+#endif
+
+EXPORT APP_STATUS utilConvDataStringToNative(DATA_TYPE dataType, const char *str, void **data, size_t *arraySize)
+{
+ errno = 0;
+ switch (dataType)
+ {
+ case TYPE_STR:
+ *data = strdup(str);
+ *arraySize = 0;
+ break;
+ case TYPE_INT:
+ {
+ int *val = malloc(sizeof(int));
+ *val = strtol(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to int!\n", str);
+ free(val);
+ return APP_ERROR;
+ }
+
+ *data = val;
+ *arraySize = 0;
+ break;
+ }
+ case TYPE_UINT:
+ {
+ unsigned int *val = malloc(sizeof(unsigned int));
+ *val = strtoul(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to uint!\n", str);
+ free(val);
+ return APP_ERROR;
+ }
+
+ *data = val;
+ *arraySize = 0;
+ break;
+ }
+ case TYPE_FLOAT:
+ {
+ float *val = malloc(sizeof(float));
+ *val = (float)strtod(str, NULL);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to float!\n", str);
+ free(val);
+ return APP_ERROR;
+ }
+
+ *data = val;
+ *arraySize = 0;
+ break;
+ }
+ case TYPE_BYTE_ARRAY:
+ {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ char *val = malloc(sizeof(char) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtol(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to byte array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (char)convVal & 0xFF;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to byte array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (char)convVal & 0xFF;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to byte array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (char)convVal & 0xFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_UBYTE_ARRAY:
+ {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ unsigned char *val = malloc(sizeof(unsigned char) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtoul(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to ubyte array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (unsigned char)convVal & 0xFF;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to ubyte array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (unsigned char)convVal & 0xFF;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to ubyte array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (unsigned char)convVal & 0xFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_SHORT_ARRAY:
+ {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ short *val = malloc(sizeof(short) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtol(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to short array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (short)convVal & 0xFFFF;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to short array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (short)convVal & 0xFFFF;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to short array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (short)convVal & 0xFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_USHORT_ARRAY:
+ {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ unsigned short *val = malloc(sizeof(unsigned short) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtoul(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to ushort array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (unsigned short)convVal & 0xFFFF;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to ushort array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (unsigned short)convVal & 0xFFFF;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to ushort array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (unsigned short)convVal & 0xFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_INT_ARRAY:
+ {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ int *val = malloc(sizeof(int) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtol(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to int array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (int)convVal & 0xFFFFFFFF;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtol(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to int array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (int)convVal & 0xFFFFFFFF;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to int array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (int)convVal & 0xFFFFFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_UINT_ARRAY:
+ {
+ char *elemData;
+ unsigned int convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ unsigned int *val = malloc(sizeof(unsigned int) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtoul(str, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to uint array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (unsigned int)convVal & 0xFFFFFFFF;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to uint array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (unsigned int)convVal & 0xFFFFFFFF;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtoul(elemData, NULL, 0);
+ if (errno == ERANGE)
+ {
+ ERR_LOG("Cannot convert \"%s\" to uint array!\n", str);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (unsigned int)convVal & 0xFFFFFFFF;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_DOUBLE_ARRAY:
+ {
+ char *elemData, *p;
+ double convVal;
+ int index = 0;
+ APP_STATUS result = APP_NO_ERROR;
+
+ int size = paramGetArraySizeFromString(str);
+ double *val = malloc(sizeof(double) * size);
+
+ if (size == 1)
+ {
+ /* Convert str */
+ convVal = strtod(str, &p);
+ if (p != (str + strlen(str)))
+ {
+ ERR_LOG("Cannot convert \"%s\" to double array!\n", str);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[0] = (double)convVal;
+ }
+ }
+ else
+ {
+ char *tmpStr = strdup(str);
+ elemData = strtok(tmpStr, ARRAY_SEPERATOR);
+
+ /* Convert str */
+ convVal = strtod(elemData, &p);
+ if (p != (elemData + strlen(elemData)))
+ {
+ ERR_LOG("Cannot convert \"%s\" to double array!\n", elemData);
+ result = APP_ERROR;
+ }
+ else
+ {
+ val[index++] = (double)convVal;
+
+ while ((elemData = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ convVal = strtod(elemData, &p);
+ if (p != (elemData + strlen(elemData)))
+ {
+ ERR_LOG("Cannot convert \"%s\" to double array!\n", elemData);
+ result = APP_ERROR;
+ break;
+ }
+ val[index++] = (double)convVal;
+ }
+ }
+
+ free(tmpStr);
+ }
+
+ if (result == APP_NO_ERROR)
+ {
+ *data = val;
+ *arraySize = size;
+ }
+ else
+ {
+ free(val);
+ *data = NULL;
+ *arraySize = 0;
+ }
+ return result;
+ }
+ case TYPE_UNKNOWN:
+ *data = strdup(str);
+ *arraySize = 0;
+ break;
+ default:
+ *data = NULL;
+ *arraySize = 0;
+ break;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT char *utilConvDataToString(DATA_TYPE dataType, void *data, int arraySize)
+{
+ char *str = NULL;
+ UT_string *dataStr = NULL;
+
+ switch (dataType)
+ {
+ case TYPE_STR:
+ {
+ str = strdup((char *)data);
+ return str;
+ }
+ case TYPE_INT:
+ {
+ int value = *(int *) data;
+ utstring_new(dataStr);
+ utstring_printf(dataStr, "%d", value);
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UINT:
+ {
+ unsigned int value = *(unsigned int *) data;
+ utstring_new(dataStr);
+ utstring_printf(dataStr, "%u", value);
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_FLOAT:
+ {
+ float value = *(float *) data;
+ utstring_new(dataStr);
+ utstring_printf(dataStr, "%f", value);
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_BYTE_ARRAY:
+ {
+ char *byteArray = (char *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "%d", byteArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "%d,", byteArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UBYTE_ARRAY:
+ {
+ unsigned char *ubyteArray = (unsigned char *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "0x%X", ubyteArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "0x%X,", ubyteArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_SHORT_ARRAY:
+ {
+ short *shortArray = (short *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "%d", shortArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "%d,", shortArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_USHORT_ARRAY:
+ {
+ unsigned short *ushortArray = (unsigned short *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "0x%X", ushortArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "0x%X,", ushortArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_INT_ARRAY:
+ {
+ int *intArray = (int *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "%d", intArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "%d,", intArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UINT_ARRAY:
+ {
+ unsigned int *uintArray = (unsigned int *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "0x%X", uintArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "0x%X,", uintArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_DOUBLE_ARRAY:
+ {
+ double *doubleArray = (double *)data;
+ int i = 0;
+ utstring_new(dataStr);
+ for (i = 0; i < arraySize; i++)
+ {
+ if (i == arraySize - 1)
+ {
+ utstring_printf(dataStr, "%f", doubleArray[i]);
+ }
+ else
+ {
+ utstring_printf(dataStr, "%f,", doubleArray[i]);
+ }
+ }
+ str = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return str;
+ }
+ case TYPE_UNKNOWN:
+ case TYPE_FIELD:
+ break;
+ }
+
+ return str;
+}
+
+/* Convert category path to category group path. eg: HAC -> Handset */
+EXPORT UT_string *utilNormalizeCategoryGroupPathForAudioType(const char *categoryPath, AudioType *audioType)
+{
+ UT_string *searchPath = NULL;
+ char *categoryType, *category, *tmpCategoryPath;
+ StrPair *strPairHash = NULL, *pair = NULL;
+ size_t numOfCategoryType, i;
+ utstring_new(searchPath);
+
+ /* Split string with token to parse category path info */
+ tmpCategoryPath = strdup(categoryPath);
+ if ((categoryType = strtok(tmpCategoryPath, ARRAY_SEPERATOR)) == NULL)
+ {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ if ((category = strtok(NULL, ARRAY_SEPERATOR)) == NULL)
+ {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ while ((categoryType = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ if ((category = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ }
+ }
+ free(tmpCategoryPath);
+
+ /* Finding the audioType related Cateory*/
+ numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ for (i = 0; i < numOfCategoryType; i++)
+ {
+ CategoryType *categoryType = audioTypeGetCategoryTypeByIndex(audioType, i);
+ HASH_FIND_STR(strPairHash, categoryType->name, pair);
+ if (pair)
+ {
+ /* Checking if there is alias for the category name */
+ CategoryAlias *categoryAlias = categoryTypeGetCategoryByAlias(categoryType, pair->value);
+ if (categoryAlias)
+ {
+ if (categoryAlias->category->parentType == PARENT_IS_CATEGORY_GROUP)
+ {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, ((CategoryGroup *)categoryAlias->category->parent.category)->name);
+ }
+ else
+ {
+ WARN_LOG("Cannot get the categroup name of %s category!\n", categoryAlias->category->name);
+ }
+ }
+ else
+ {
+ Category *category = categoryTypeGetCategoryByName(categoryType, pair->value);
+ if (category && category->parentType == PARENT_IS_CATEGORY_GROUP)
+ {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, ((CategoryGroup *)category->parent.category)->name);
+ }
+ else
+ {
+ /* If the category is not category group, checking the bypass list */
+ int arrayIndex = 0;
+ int bypassCategoryName = 0;
+
+ for (arrayIndex = 0; HARD_CATEGORY_GROUP[arrayIndex][0]; arrayIndex++)
+ {
+ if (!strcmp(audioType->name, HARD_CATEGORY_GROUP[arrayIndex][0])
+ && !strcmp(pair->key, HARD_CATEGORY_GROUP[arrayIndex][1])
+ && !strcmp(pair->value, HARD_CATEGORY_GROUP[arrayIndex][2]))
+ {
+ bypassCategoryName = 1;
+ break;
+ }
+ }
+
+ if (bypassCategoryName)
+ {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, HARD_CATEGORY_GROUP[arrayIndex][2]);
+ }
+ else
+ {
+ WARN_LOG("Cannot get the categroup name of %s category!\n", pair->value);
+ }
+ }
+ }
+ }
+ }
+
+ /* Remove the end of seperator char */
+ {
+ char *ch = strrchr(utstring_body(searchPath), ARRAY_SEPERATOR_CH);
+ if (ch)
+ {
+ *ch = '\0';
+ }
+ }
+
+ /* Release strPair */
+ if (strPairHash)
+ {
+ StrPair *tmp, *item;
+ HASH_ITER(hh, strPairHash, item, tmp)
+ {
+ HASH_DEL(strPairHash, item);
+ strPairRelease(item);
+ }
+ }
+
+ return searchPath;
+}
+
+EXPORT UT_string *utilNormalizeCategoryPathForAudioType(const char *categoryPath, AudioType *audioType)
+{
+ UT_string *searchPath = NULL;
+ char *categoryType, *category, *tmpCategoryPath;
+ StrPair *strPairHash = NULL, *pair = NULL;
+ size_t numOfCategoryType, i;
+ utstring_new(searchPath);
+
+ /* Split string with token to parse category path info */
+ tmpCategoryPath = strdup(categoryPath);
+ if ((categoryType = strtok(tmpCategoryPath, ARRAY_SEPERATOR)) == NULL)
+ {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ if ((category = strtok(NULL, ARRAY_SEPERATOR)) == NULL)
+ {
+ free(tmpCategoryPath);
+ return searchPath;
+ }
+
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ while ((categoryType = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ if ((category = strtok(NULL, ARRAY_SEPERATOR)))
+ {
+ pair = strPairCreate(categoryType, category);
+ HASH_ADD_KEYPTR(hh, strPairHash, pair->key, strlen(pair->key), pair);
+ }
+ }
+ free(tmpCategoryPath);
+
+ /* Finding the audioType related Cateory*/
+ numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+ for (i = 0; i < numOfCategoryType; i++)
+ {
+ CategoryType *categoryType = audioTypeGetCategoryTypeByIndex(audioType, i);
+ HASH_FIND_STR(strPairHash, categoryType->name, pair);
+ if (pair)
+ {
+ /* Checking if there is alias for the category name */
+ CategoryAlias *categoryAlias = categoryTypeGetCategoryByAlias(categoryType, pair->value);
+ if (categoryAlias)
+ {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, categoryAlias->category->name);
+ }
+ else
+ {
+ utstring_printf(searchPath, "%s"ARRAY_SEPERATOR, pair->value);
+ }
+ }
+ }
+
+ /* Remove the end of seperator char */
+ {
+ char *ch = strrchr(utstring_body(searchPath), ARRAY_SEPERATOR_CH);
+ if (ch)
+ {
+ *ch = '\0';
+ }
+ }
+
+ /* Release strPair */
+ if (strPairHash)
+ {
+ StrPair *tmp, *item;
+ HASH_ITER(hh, strPairHash, item, tmp)
+ {
+ HASH_DEL(strPairHash, item);
+ strPairRelease(item);
+ }
+ }
+
+ return searchPath;
+}
+
+EXPORT int utilFindUnusedParamId(AudioType *audioType)
+{
+ ParamUnit *paramUnit;
+ while (1)
+ {
+ HASH_FIND_INT(audioType->paramUnitHash, &audioType->unusedParamId, paramUnit);
+ if (paramUnit)
+ {
+ audioType->unusedParamId++;
+ }
+ else
+ {
+ INFO_LOG("Unsed param ID found (id = %d)\n", audioType->unusedParamId);
+ return audioType->unusedParamId++;
+ }
+ }
+
+ return 0;
+}
+
+
+EXPORT void utilUsleep(unsigned int usec)
+{
+#ifndef WIN32
+ struct timespec ts;
+ pthread_cond_t cond;
+ pthread_mutex_t mutex;
+ nsecs_t reltime = usec * (nsecs_t)1000;
+
+ pthread_mutex_init(&mutex, NULL);
+ pthread_cond_init(&cond, NULL);
+ pthread_mutex_lock(&mutex);
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_sec += reltime / 1000000000;
+ ts.tv_nsec += reltime % 1000000000;
+ if (ts.tv_nsec >= 1000000000)
+ {
+ ts.tv_nsec -= 1000000000;
+ ts.tv_sec += 1;
+ }
+ pthread_cond_timedwait(&cond, &mutex, &ts);
+ pthread_mutex_unlock(&mutex);
+#else
+ Sleep(usec);
+#endif
+}
+
+EXPORT char *utilGetStdin(char *buf, int bufSize)
+{
+ char *input;
+ input = fgets(buf, bufSize, stdin);
+ if ((input = strchr(input, '\n')) != NULL)
+ {
+ *input = '\0';
+ }
+ return buf;
+}
+
+EXPORT void utilLog(char *format, ...)
+{
+ time_t timep;
+ struct tm *p;
+ va_list arglist;
+
+ /* Get time struct */
+ time(&timep);
+ p = localtime(&timep);
+
+ if (appLogFp == NULL)
+ {
+ /* Create file handle */
+ UT_string *fileName = NULL;
+ utstring_new(fileName);
+ utstring_printf(fileName, "%04d%02d%02d_%02d%02d%02d_AppLogFile.txt", 1900 + p->tm_year, 1 + p->tm_mon, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec);
+ appLogFp = fopen(utstring_body(fileName), "a");
+ utstring_free(fileName);
+
+ if (!appLogFp)
+ {
+ printf("Log file open failed!\n");
+ exit(1);
+ }
+ }
+
+ /* Write to file */
+ fprintf(appLogFp, "%02d-%02d %02d:%02d:%02d ", 1 + p->tm_mon, p->tm_mday, p->tm_hour, p->tm_min, p->tm_sec);
+ va_start(arglist, format);
+ vfprintf(appLogFp, format, arglist);
+ va_end(arglist);
+
+ /* Show log to console */
+ if (outputLogToStdout)
+ {
+ va_start(arglist, format);
+ vfprintf(stdout, format, arglist);
+ va_end(arglist);
+ }
+}
+
+EXPORT void utilLogClose()
+{
+ if (appLogFp)
+ {
+ fflush(appLogFp);
+ fclose(appLogFp);
+ appLogFp = NULL;
+ }
+}
+
+EXPORT void utilShowParamValue(Param *param)
+{
+ if (!param)
+ {
+ ERR_LOG("param is NULL\n");
+ return;
+ }
+
+ switch (param->paramInfo->dataType)
+ {
+ case TYPE_STR:
+ {
+ char *value = (char *)param->data;
+ printf("param name = %s, value = %s (type = %s)\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_INT:
+ {
+ int value = *(int *) param->data;
+ printf("param name = %s, value = %d (type = %s)\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_UINT:
+ {
+ unsigned int value = *(unsigned int *) param->data;
+ printf("param name = %s, value = %d (type = %s)\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_FLOAT:
+ {
+ float value = *(float *) param->data;
+ /* JH's platform cannot show the float type, wei chiu could show the value by %f*/
+ printf("param name = %s, value = %d (type = %s)\n", param->name, (int)value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_BYTE_ARRAY:
+ {
+ char *byteArray = (char *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, byteArray[i]);
+ }
+ break;
+ }
+ case TYPE_UBYTE_ARRAY:
+ {
+ unsigned char *ubyteArray = (unsigned char *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, ubyteArray[i]);
+ }
+ break;
+ }
+ case TYPE_SHORT_ARRAY:
+ {
+ short *shortArray = (short *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %d\n", i, shortArray[i]);
+ }
+ break;
+ }
+ case TYPE_USHORT_ARRAY:
+ {
+ unsigned short *ushortArray = (unsigned short *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, ushortArray[i]);
+ }
+ break;
+ }
+ case TYPE_INT_ARRAY:
+ {
+ int *intArray = (int *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %d\n", i, intArray[i]);
+ }
+ break;
+ }
+ case TYPE_UINT_ARRAY:
+ {
+ unsigned int *uintArray = (unsigned int *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, uintArray[i]);
+ }
+ break;
+ }
+ case TYPE_DOUBLE_ARRAY:
+ {
+ double *doubleArray = (double *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %f\n", i, doubleArray[i]);
+ }
+ break;
+ }
+ default:
+ printf("param name = %s, value = 0x%p (type = %s)\n", param->name, param->data, paramDataTypeToStr(param->paramInfo->dataType));
+ }
+}
+
+EXPORT FieldInfo *utilXmlNodeGetFieldInfo(AppHandle *appHandle, xmlNode *node, const char *audioTypeAttrName, const char *paramAttrName, const char *fieldAttrName)
+{
+ AudioType *audioType = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+
+ xmlChar *audioTypeName = NULL;
+ xmlChar *paramName = NULL;
+ xmlChar *fieldName = NULL;
+
+ audioTypeName = xmlNodeGetProp(node, audioTypeAttrName);
+ if (audioTypeName)
+ {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ }
+ else
+ {
+ return NULL;
+ }
+
+ paramName = xmlNodeGetProp(node, paramAttrName);
+ if (audioType && paramName)
+ {
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ }
+ else
+ {
+ ERR_LOG("Cannot find FieldInfo (AudioType = %s, Param = %s, Field = %s)\n", audioTypeName, paramName, fieldName);
+ return NULL;
+ }
+
+ fieldName = xmlNodeGetProp(node, fieldAttrName);
+ if (paramInfo && fieldName)
+ {
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ }
+ else
+ {
+ ERR_LOG("Cannot find FieldInfo (AudioType = %s, Param = %s, Field = %s)\n", audioTypeName, paramName, fieldName);
+ return NULL;
+ }
+
+ if (!fieldInfo)
+ {
+ ERR_LOG("Cannot find FieldInfo (AudioType = %s, Param = %s, Field = %s)\n", audioTypeName, paramName, fieldName);
+ }
+
+ return fieldInfo;
+}
+
+EXPORT char *utilGenCheckList(int bits)
+{
+ UT_string *dataStr = NULL;
+ double num = pow(2, bits);
+ int i = 0;
+ char *retStr = NULL;
+
+ utstring_new(dataStr);
+ for (i = 0; i < num; i++)
+ {
+ if (i != num - 1)
+ {
+ utstring_printf(dataStr, "%d,%d,", i, i);
+ }
+ else
+ {
+ utstring_printf(dataStr, "%d,%d", i, i);
+ }
+ }
+
+ retStr = strdup(utstring_body(dataStr));
+ utstring_free(dataStr);
+ return retStr;
+}
+
+EXPORT void showTreeRoot(xmlNode *treeRootNode, const char *categoryPath)
+{
+}
+
+EXPORT void utilMkdir(const char *dir)
+{
+#ifdef WIN32
+ _mkdir(dir);
+#else
+ mkdir(dir, 0770);
+#endif
+}
+
+unsigned int utilNativeGetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName)
+{
+ if (audioTypeName && categoryPath && paramName && fieldName)
+ {
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamUnit *paramUnit = NULL;
+ Param *param = NULL;
+ unsigned int fieldValue = 0;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle)
+ {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ }
+ else
+ {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ if (audioType)
+ {
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ }
+ else
+ {
+ ERR_LOG("categoryType is NULL\n");
+ }
+
+ if (paramUnitGetFieldVal(paramUnit, paramName, fieldName, &fieldValue) == APP_ERROR)
+ {
+ ERR_LOG("Query field value fail!\n");
+ }
+ else
+ {
+ audioTypeUnlock(audioType);
+ return fieldValue;
+ }
+ audioTypeUnlock(audioType);
+ }
+ else
+ {
+ ERR_LOG("Invalid parameter: audioType = %s, category path = %s, param = %s, field = %s\n", audioTypeName, categoryPath, paramName, fieldName);
+ }
+
+ return 0;
+}
+
+char *utilNativeGetParam(const char *audioTypeName, const char *categoryPath, const char *paramName)
+{
+ char *paramDataStr = NULL;
+ if (audioTypeName && categoryPath && paramName)
+ {
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamUnit *paramUnit = NULL;
+ Param *param = NULL;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle)
+ {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ }
+ else
+ {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ if (audioType)
+ {
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ }
+ else
+ {
+ ERR_LOG("categoryType is NULL\n");
+ }
+
+ if (paramUnit)
+ {
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ }
+ else
+ {
+ ERR_LOG("paramUnit is NULL\n");
+ }
+
+ if (param)
+ {
+ paramDataStr = paramNewDataStr(param);
+ }
+
+ audioTypeUnlock(audioType);
+ }
+ else
+ {
+ ERR_LOG("Invalid parameter: audioType = %s, category path = %s, param = %s\n", audioTypeName, categoryPath, paramName);
+ }
+
+ return paramDataStr;
+}
+
+EXPORT char *utilNativeGetCategory(const char *audioTypeName, const char *categoryTypeName)
+{
+ if (audioTypeName && categoryTypeName)
+ {
+ UT_string *utString = NULL;
+ char *result;
+ int firstCategory = 1;
+ int numOfCategory, numOfCategoryGroup = 0;
+ int i, j, k;
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ CategoryType *categoryType = NULL;
+
+ utstring_new(utString);
+ appHandle = appHandleGetInstance();
+ if (appHandle)
+ {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ }
+ else
+ {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ if (audioType)
+ {
+ categoryType = audioTypeGetCategoryTypeByName(audioType, categoryTypeName);
+ }
+ else
+ {
+ ERR_LOG("audioType is NULL\n");
+ }
+
+ if (!categoryType)
+ {
+ ERR_LOG("categoryType is NULL\n");
+ }
+
+ numOfCategoryGroup = categoryTypeGetNumOfCategoryGroup(categoryType);
+ for (i = 0; i < numOfCategoryGroup; i++)
+ {
+ CategoryGroup *categoryGroup = categoryTypeGetCategoryGroupByIndex(categoryType, i);
+ numOfCategory = categoryGroupGetNumOfCategory(categoryGroup);
+ for (j = 0; j < numOfCategory; j++)
+ {
+ Category *category = categoryGroupGetCategoryByIndex(categoryGroup, j);
+ if (firstCategory)
+ {
+ utstring_printf(utString, "%s,%s", category->name, category->wording);
+ firstCategory = 0;
+ }
+ else
+ {
+ utstring_printf(utString, ",%s,%s", category->name, category->wording);
+ }
+ }
+ }
+
+ numOfCategory = categoryTypeGetNumOfCategory(categoryType);
+ for (k = 0; k < numOfCategory; k++)
+ {
+ Category *category = categoryTypeGetCategoryByIndex(categoryType, k);
+ if (firstCategory)
+ {
+ utstring_printf(utString, "%s,%s", category->name, category->wording);
+ firstCategory = 0;
+ }
+ else
+ {
+ utstring_printf(utString, ",%s,%s", category->name, category->wording);
+ }
+ }
+
+ result = strdup(utstring_body(utString));
+ utstring_free(utString);
+ return result;
+ }
+
+ return NULL;
+}
+
+EXPORT APP_STATUS utilNativeSetParam(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *paramDataStr)
+{
+ if (audioTypeName && categoryPath && paramName && paramDataStr)
+ {
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamInfo *paramInfo = NULL;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle)
+ {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ }
+ else
+ {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ if (audioType)
+ {
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ }
+ else
+ {
+ ERR_LOG("audioType is NULL\n");
+ }
+
+ if (paramInfo)
+ {
+ void *paramData = NULL;
+ size_t arraySize = 0;
+
+ if (utilConvDataStringToNative(paramInfo->dataType, paramDataStr, ¶mData, &arraySize) == APP_NO_ERROR)
+ {
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, paramData, arraySize) == APP_ERROR)
+ {
+ ERR_LOG("audioTypeSetParamData fail! audioType = %s, categoryPath = %s, paramInfo = %s\n", audioType->name, categoryPath, paramInfo->name);
+ }
+ else
+ {
+ if (paramData)
+ {
+ free(paramData);
+ }
+ return APP_NO_ERROR;
+ }
+ }
+ else
+ {
+ ERR_LOG("Cannot convert param string to native type (param str = %s)\n", paramDataStr);
+ }
+
+ if (paramData)
+ {
+ free(paramData);
+ }
+ }
+ else
+ {
+ ERR_LOG("paramInfo is NULL\n");
+ }
+ }
+ else
+ {
+ ERR_LOG("Invalid parameter\n");
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT APP_STATUS utilNativeSetField(const char *audioTypeName, const char *categoryPath, const char *paramName, const char *fieldName, const char *fieldValueStr)
+{
+ if (audioTypeName && categoryPath && paramName && fieldName && fieldValueStr)
+ {
+ AppHandle *appHandle = NULL;
+ AudioType *audioType = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+
+ appHandle = appHandleGetInstance();
+ if (appHandle)
+ {
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ }
+ else
+ {
+ ERR_LOG("appHandle is NULL\n");
+ }
+
+ if (audioType)
+ {
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ }
+ else
+ {
+ ERR_LOG("audioType is NULL\n");
+ }
+
+ if (paramInfo)
+ {
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ }
+ else
+ {
+ ERR_LOG("paramInfo is NULL\n");
+ }
+
+ if (fieldInfo)
+ {
+ if (audioTypeSetFieldData(audioType, categoryPath, fieldInfo, strtoul(fieldValueStr, NULL, 0)) == APP_ERROR)
+ {
+ ERR_LOG("audioTypeSetFieldData fail!. audioType = %s, categoryPath = %s, paramInfo = %s, fieldInfo = %s, value = %s\n", audioType->name, categoryPath, paramInfo->name, fieldInfo->name, fieldValueStr);
+ }
+ else
+ {
+ return APP_NO_ERROR;
+ }
+ }
+ else
+ {
+ ERR_LOG("fieldInfo is NULL\n");
+ }
+ }
+ else
+ {
+ ERR_LOG("Invalid parameter\n");
+ }
+
+ return APP_ERROR;
+}
+
+EXPORT APP_STATUS utilNativeSaveXml(const char *audioTypeName)
+{
+ AppHandle *appHandle = appHandleGetInstance();
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (audioType)
+ {
+ if (audioType->dirty)
+ {
+#ifdef WIN32
+ return audioTypeSaveAudioParamXml(audioType, XML_CUS_FOLDER_ON_TUNING_TOOL, 1) ;
+#else
+ return audioTypeSaveAudioParamXml(audioType, XML_CUS_FOLDER_ON_DEVICE, 1);
+#endif
+ }
+ else
+ {
+ INFO_LOG("%s AudioType's parameter not changed, don't save XML\n", audioType->name);
+ }
+ }
+ else
+ {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ return APP_NO_ERROR;
+}
+
+EXPORT char *utilNativeGetChecklist(const char *audioTypeName, const char *paramName, const char *fieldName)
+{
+ AppHandle *appHandle = appHandleGetInstance();
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+
+ if (!audioType)
+ {
+ ERR_LOG("Cannot find %s AudioType\n", audioTypeName);
+ return NULL;
+ }
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ if (!paramInfo)
+ {
+ ERR_LOG("Cannot find %s paramInfo of %s AudioType\n", paramName, audioTypeName);
+ return NULL;
+ }
+
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, fieldName);
+ if (!fieldInfo)
+ {
+ ERR_LOG("Cannot find %s fieldInfo of %s paramInfo of %s AudioType\n", fieldName, paramName, audioTypeName);
+ return NULL;
+ }
+
+ return fieldInfo->checkListStr;
+}
+
+EXPORT int utilCompNormalizeCategoryPath(AudioType *audioType, const char *srcCategoryPath, const char *dstCategoryPath)
+{
+ UT_string *srcNormalizedPath;
+ UT_string *dstNormalizedPath;
+ int equal = 0;
+
+ if (!strcmp(srcCategoryPath, dstCategoryPath))
+ {
+ return 1;
+ }
+
+ srcNormalizedPath = utilNormalizeCategoryPathForAudioType(srcCategoryPath, audioType);
+ dstNormalizedPath = utilNormalizeCategoryPathForAudioType(dstCategoryPath, audioType);
+
+ if (!strcmp(utstring_body(srcNormalizedPath), utstring_body(dstNormalizedPath)))
+ {
+ equal = 1;
+ INFO_LOG("Src path %s and dst path %s are equal to %s\n", srcCategoryPath, dstCategoryPath, utstring_body(srcNormalizedPath));
+ }
+ else
+ {
+ equal = 0;
+ }
+
+ utstring_free(srcNormalizedPath);
+ utstring_free(dstNormalizedPath);
+
+ return equal;
+}
+
+EXPORT void utilShellExecute(const char* prog, const char* params)
+{
+#ifdef WIN32
+ SHELLEXECUTEINFO ShExecInfo = {0};
+ ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
+ ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
+ ShExecInfo.hwnd = NULL;
+ ShExecInfo.lpVerb = NULL;
+ ShExecInfo.lpFile = prog;
+ ShExecInfo.lpParameters = params;
+ ShExecInfo.lpDirectory = NULL;
+ ShExecInfo.nShow = SW_HIDE;
+ ShExecInfo.hInstApp = NULL;
+ ShellExecuteEx(&ShExecInfo);
+ WaitForSingleObject(ShExecInfo.hProcess,INFINITE);
+#endif
+}
\ No newline at end of file
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/Makefile b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/Makefile
new file mode 100644
index 0000000..b623d48
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/Makefile
@@ -0,0 +1,21 @@
+all:
+ $(CC) -c -fPIC -I./include -I./include/alps_utils AudioCategory.c AudioParam.c AudioParamFieldInfo.c AudioParamParser.c AudioParamTreeView.c AudioParamUnit.c AudioType.c AudioUtils.c UnitTest.c
+ $(CXX) -c -fPIC -I./include -I./include/alps_utils guicon.cpp
+ install -d obj
+ mv *.o obj
+ $(CXX) -Wl,--hash-style=gnu -shared -Wl,-soname,libaudioparamparser.so.1 -o libaudioparamparser.so.1.0.0 obj/*.o
+ $(CC) test/main.c -Wl,--hash-style=gnu -lxml2 -lpthread -lasound libaudioparamparser.so.1.0.0 -L. -I. -I./include -I./include/alps_utils -o audioXmlParserTest
+
+install:
+ cp -af audioXmlParserTest ../
+ cp -af libaudioparamparser.so.1.0.0 ../
+ mkdir -p ../audio_param
+ cp -af audio_param/* ../audio_param/
+ mkdir -p ../export_include
+ mkdir -p ../export_include/libxml
+ cp -af *h ../export_include
+ cp -af include/*.h ../export_include
+ cp -af include/libxml/*.h ../export_include/libxml
+
+clean:
+ rm -rf obj
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/UnitTest.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/UnitTest.c
new file mode 100644
index 0000000..78dfd7f
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/UnitTest.c
@@ -0,0 +1,564 @@
+#include "AudioParamParserPriv.h"
+
+typedef APP_STATUS(*TEST_FUN)(AppHandle *appHandle);
+
+typedef struct
+{
+ AppHandle *appHandle;
+ int times;
+ TEST_FUN fun;
+} ThreadParam;
+
+EXPORT APP_STATUS unitTest(AppHandle *appHandle)
+{
+ APP_STATUS res = APP_NO_ERROR;
+ APP_STATUS finalRes = APP_NO_ERROR;
+
+ printf("===APP internal unit test===\n");
+#if 0
+ res = testAppHandleInitUninit();
+ if (res == APP_ERROR)
+ {
+ finalRes = APP_ERROR;
+ }
+ printf("testAppHandleInitUninit: %s\n", res ? "pass" : "fail");
+#endif
+ res = testReadWriteParam(appHandle);
+ if (res == APP_ERROR)
+ {
+ finalRes = APP_ERROR;
+ }
+ printf("testReadWriteParam: %s\n", res ? "pass" : "fail");
+
+ res = testMemoryLeak(appHandle);
+ if (res == APP_ERROR)
+ {
+ finalRes = APP_ERROR;
+ }
+ printf("testMemoryLeak: %s\n", res ? "pass" : "fail");
+
+ res = testAudioTypeLock(appHandle);
+ if (res == APP_ERROR)
+ {
+ finalRes = APP_ERROR;
+ }
+ printf("testAudioTypeLock: %s\n", res ? "pass" : "fail");
+ printf("=============================\n");
+
+ return finalRes;
+}
+
+
+EXPORT void *commonThreadLoop(void *arg)
+{
+ ThreadParam threadParam = *(ThreadParam *)arg;
+ int i = 0 ;
+ for (i = 0; i < threadParam.times; i++)
+ {
+ (*threadParam.fun)(threadParam.appHandle);
+ INFO_LOG("2nd thread round = %d\n", i);
+ }
+ return NULL;
+}
+
+EXPORT void testDebugLevel()
+{
+ appSetDebugLevel(ERR_LEVEL);
+ ERR_LOG("error - pass\n");
+ WARN_LOG("warn - ok\n");
+ INFO_LOG("info - ok\n");
+ DEBUG_LOG("debug - ok\n");
+
+ appSetDebugLevel(WARN_LEVEL);
+ ERR_LOG("error - fail\n");
+ WARN_LOG("warn - pass\n");
+ INFO_LOG("info - ok\n");
+ DEBUG_LOG("debug - ok\n");
+
+ appSetDebugLevel(INFO_LEVEL);
+ ERR_LOG("error - fail\n");
+ WARN_LOG("warn - fail\n");
+ INFO_LOG("info - pass\n");
+ DEBUG_LOG("debug - ok\n");
+
+ appSetDebugLevel(DEBUG_LEVEL);
+ ERR_LOG("error - fail\n");
+ WARN_LOG("warn - fail\n");
+ INFO_LOG("info - fail\n");
+ DEBUG_LOG("debug - pass\n");
+}
+
+EXPORT void testHashParamTree()
+{
+ ParamTree *item;
+ ParamTree *ParamTreeHash = NULL, *tmp = NULL; /* Used for hash */
+ const char *key;
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "NB,Normal,,";
+ item->paramId = 1;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "WB,Normal,,";
+ item->paramId = 7;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "NB,Normal,0,GSM,";
+ item->paramId = 1;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ item = (ParamTree *)malloc(sizeof(ParamTree));
+ item->categoryPath = "NB,HAC,0,GSM";
+ item->paramId = 0;
+ HASH_ADD_KEYPTR(hh, ParamTreeHash, item->categoryPath, strlen(item->categoryPath), item);
+
+ /* Find string */
+ key = "WB,,,";
+ HASH_FIND_STR(ParamTreeHash, key, item);
+ if (item) { printf("[%s] id is %d\n", key, item->paramId); }
+
+ /* Free hash table content */
+ HASH_ITER(hh, ParamTreeHash, item, tmp)
+ {
+ HASH_DEL(ParamTreeHash, item);
+ free(item);
+ }
+}
+
+EXPORT void testHashParamUnit()
+{
+ ParamUnit *item;
+ ParamUnit *ParamUnitHash = NULL, *tmp = NULL; /* Used for hash */
+ int key;
+
+ item = (ParamUnit *)malloc(sizeof(ParamUnit));
+ item->paramId = 0;
+ item->paramHash = (Param *) 0x1;
+ HASH_ADD_INT(ParamUnitHash, paramId, item);
+
+ item = (ParamUnit *)malloc(sizeof(ParamUnit));
+ item->paramId = 1;
+ item->paramHash = (Param *)0x2;
+ HASH_ADD_INT(ParamUnitHash, paramId, item);
+ item = (ParamUnit *)malloc(sizeof(ParamUnit));
+
+ item->paramId = 7;
+ item->paramHash = (Param *)0x3;
+ HASH_ADD_INT(ParamUnitHash, paramId, item);
+
+ /* Find string */
+ key = 0;
+ HASH_FIND_INT(ParamUnitHash, &key, item);
+ if (item) { INFO_LOG("[%d] Param is %p\n", key, item->paramHash); }
+
+ key = 1;
+ HASH_FIND_INT(ParamUnitHash, &key, item);
+ if (item) { INFO_LOG("[%d] Param is %p\n", key, item->paramHash); }
+
+ key = 7;
+ HASH_FIND_INT(ParamUnitHash, &key, item);
+ if (item) { INFO_LOG("[%d] Param is %p\n", key, item->paramHash); }
+
+ /* Free hash table content */
+ HASH_ITER(hh, ParamUnitHash, item, tmp)
+ {
+ HASH_DEL(ParamUnitHash, item);
+ free(item);
+ }
+}
+
+EXPORT void testHashParam()
+{
+ Param *item;
+ Param *paramHash = NULL, *tmp = NULL; /* Used for hash */
+ const char *key;
+
+ item = (Param *)malloc(sizeof(Param));
+ memset(item, 0, sizeof(Param));
+ item->name = "speech_mode_para";
+ item->data = "0x0011,0x2233,0x4455";
+ HASH_ADD_KEYPTR(hh, paramHash, item->name, strlen(item->name), item);
+
+ item = (Param *)malloc(sizeof(Param));
+ memset(item, 0, sizeof(Param));
+ item->name = "uint_param";
+ item->data = "4294967295";
+ HASH_ADD_KEYPTR(hh, paramHash, item->name, strlen(item->name), item);
+
+ item = (Param *)malloc(sizeof(Param));
+ memset(item, 0, sizeof(Param));
+ item->name = "float_param";
+ item->data = "0.1234567";
+ HASH_ADD_KEYPTR(hh, paramHash, item->name, strlen(item->name), item);
+
+ /* Find string */
+ key = "speech_mode_para";
+ HASH_FIND_STR(paramHash, key, item);
+ if (item) { INFO_LOG("[%s] value is %s\n", key, (char *)item->data); }
+
+ key = "uint_param";
+ HASH_FIND_STR(paramHash, key, item);
+ if (item) { INFO_LOG("[%s] value is %s\n", key, (char *)item->data); }
+
+ key = "float_param";
+ HASH_FIND_STR(paramHash, key, item);
+ if (item) { INFO_LOG("[%s] value is %s\n", key, (char *)item->data); }
+
+ /* Free hash table content */
+ HASH_ITER(hh, paramHash, item, tmp)
+ {
+ HASH_DEL(paramHash, item);
+ free(item);
+ }
+}
+
+void testCb(AppHandle *appHandle, const char *audioTypeName)
+{
+ printf("XML file changed. (cus folder = %s, audioType = %s)\n", appHandle->xmlCusDir, audioTypeName);
+}
+
+EXPORT void notifyCbTest(AppHandle *appHandle)
+{
+ NotifyCb *cb;
+
+ appHandleRegXmlChangedCb(appHandle, testCb);
+
+ LL_FOREACH(appHandle->noficyCbList, cb)
+ {
+ (*cb->cb)(appHandle, "OK");
+ }
+
+ appHandleUnregXmlChangedCb(appHandle, testCb);
+
+ LL_FOREACH(appHandle->noficyCbList, cb)
+ {
+ (*cb->cb)(appHandle, "FAIL");
+ }
+}
+
+EXPORT void inotifyTest(const char *path)
+{
+
+#ifndef WIN32
+#define INOTIFY_BUF_SIZE 512
+ /* inotify test */
+ int wd;
+ size_t len;
+ char buf[INOTIFY_BUF_SIZE];
+ char *ptr;
+ const struct inotify_event *event;
+
+ int fd = inotify_init();
+ if (fd < 0)
+ {
+ printf("inotify_init failed !!!");
+ exit(1);
+ }
+
+ printf("inotify path = %s\n", path);
+ wd = inotify_add_watch(fd, path, IN_CLOSE_WRITE);
+ if (wd < 0)
+ {
+ printf("inotify_add_watch failed !!!");
+ exit(1);
+ }
+
+ while (1)
+ {
+ len = read(fd, buf, sizeof(buf));
+ if (len < 0)
+ {
+ perror("read");
+ exit(EXIT_FAILURE);
+ }
+
+ /* Loop over all events in the buffer */
+ for (ptr = buf; ptr < buf + len; ptr += sizeof(struct inotify_event) + event->len)
+ {
+ event = (const struct inotify_event *) ptr;
+
+ /* Print event type */
+ if (event->mask & IN_OPEN)
+ {
+ printf("IN_OPEN: ");
+ }
+ if (event->mask & IN_CLOSE_NOWRITE)
+ {
+ printf("IN_CLOSE_NOWRITE: ");
+ }
+ if (event->mask & IN_CLOSE_WRITE)
+ {
+ printf("IN_CLOSE_WRITE: ");
+ }
+ if (event->mask & IN_ACCESS)
+ {
+ printf("IN_ACCESS: ");
+ }
+
+ /* Print the name of the file */
+
+ if (event->len)
+ {
+ printf("%s", event->name);
+ }
+
+ /* Print type of filesystem object */
+
+ if (event->mask & IN_ISDIR)
+ {
+ printf(" [directory]\n");
+ }
+ else
+ {
+ printf(" [file]\n");
+ }
+ }
+ }
+ inotify_rm_watch(fd, IN_CLOSE_NOWRITE);
+#endif
+}
+
+/***********************************
+ * Test Steps:
+ * 1. Create thread to read/write param
+ * 2. Check the lock is work well
+ * Crash/deadlock checking
+ **********************************/
+EXPORT APP_STATUS testAudioTypeLockFun(AppHandle *appHandle)
+{
+ /* Read param */
+ char *audioTypeName = "Speech";
+ char *categoryPath = "Band,NB,Profile,4_pole_Headset,VolIndex,3";
+ char *paramName = "speech_mode_para";
+ unsigned short shortArray1[] = {0x1, 0x2, 0x3, 0x4, 0x5, 0x6, 0x7};
+ unsigned short shortArray2[] = {0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77};
+ int arraySize = 7;
+ AudioType *audioType;
+ ParamUnit *paramUnit;
+ ParamInfo *paramInfo;
+ Param *param;
+
+ appHandle = appHandleGetInstance();
+
+ /* Query AudioType */
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType)
+ {
+ ERR_LOG("audioType is NULL\n");
+ return APP_ERROR;
+ }
+
+ /* Read Lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit)
+ {
+ ERR_LOG("paramUnit is NULL\n");
+ return APP_ERROR;
+ }
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ if (!param)
+ {
+ ERR_LOG("Error: Cannot query param value!\n");
+ return APP_ERROR;
+ }
+
+ /* Read unlock */
+ audioTypeUnlock(audioType);
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ /* Write param */
+ paramInfo = audioTypeGetParamInfoByName(audioType, paramName);
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)shortArray1, arraySize) == APP_ERROR)
+ {
+ ERR_LOG("Cannot update the param data!!\n");
+ return APP_ERROR;
+ }
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)shortArray2, arraySize) == APP_ERROR)
+ {
+ ERR_LOG("Cannot update the param data!!\n");
+ return APP_ERROR;
+ }
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ /* Save XML */
+ audioTypeSaveAudioParamXml(audioType, XML_CUS_FOLDER_ON_DEVICE, 1);
+
+ utilUsleep(1); // delay time make cpu scheduling to other thread
+
+ /* Reload XML */
+ appHandleReloadAudioType(appHandle, audioType->name);
+
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS testAudioTypeLock(AppHandle *appHandle)
+{
+#ifndef WIN32
+ int i;
+ pthread_t appThread;
+ void *status;
+ ThreadParam threadParam;
+
+ threadParam.times = 50;
+ threadParam.appHandle = appHandle;
+ threadParam.fun = testAudioTypeLockFun;
+
+ if (pthread_create(&appThread, NULL, commonThreadLoop, &threadParam))
+ {
+ ERR_LOG("Create app thread fail!\n");
+ return APP_ERROR;
+ }
+
+ for (i = 0; i < threadParam.times; i++)
+ {
+ (*threadParam.fun)(appHandle);
+ INFO_LOG("Main thread test round = %d\n", i);
+ }
+
+ /* Waiting 2nd thread join */
+ pthread_join(appThread, &status);
+#else
+ INFO_LOG("Not test this UT on windows\n");
+#endif
+ return APP_NO_ERROR;
+}
+
+EXPORT APP_STATUS testAppHandleInitUninit()
+{
+ int times = 10;
+ int i;
+ for (i = 0; i < times; i++)
+ {
+ AppHandle testAppHandle;
+ appHandleInit(&testAppHandle);
+#ifdef WIN32
+ appHandleParseXml(&testAppHandle, XML_FOLDER_ON_TUNING_TOOL, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#else
+ appHandleParseXml(&testAppHandle, XML_FOLDER_ON_DEVICE, XML_CUS_FOLDER_ON_DEVICE);
+#endif
+ appHandleUninit(&testAppHandle);
+ }
+ return APP_NO_ERROR;
+}
+
+/***********************************
+ * Test Steps:
+ * 1. Reload audio type xml 100 times
+ * Memory leak / crash checking
+ **********************************/
+EXPORT APP_STATUS testMemoryLeak(AppHandle *appHandle)
+{
+ int i = 0;
+ for (i = 0; i < 100; i++)
+ {
+ /* stress test query / release / create */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ audioType->allowReload = 1;
+ if (appHandleReloadAudioType(appHandle, "Speech") == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+ }
+
+ printf("Checking memory status and press enter key to continue\n");
+ getchar();
+ return APP_NO_ERROR;
+}
+
+/***********************************
+ * Test Steps:
+ * 1. Read param array
+ * 2. Update param array one item with 32767
+ * 3. Repeat array size times
+ * 4. Check the result
+ **********************************/
+APP_STATUS testReadWriteParam(AppHandle *appHandle)
+{
+ size_t i, j;
+ ParamUnit *paramUnit;
+ ParamInfo *paramInfo;
+ Param *param;
+ unsigned short *shortArray;
+ size_t arraySize = 1; // The size will update by real array size latter
+
+ const char *audioTypeName = "Speech";
+ const char *paraName = "speech_mode_para";
+ const char *categoryPath = "Band,NB,Profile,Normal,VolIndex,2,Network,GSM";
+
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+
+ /* Test steps */
+ for (j = 0; j < arraySize; j++)
+ {
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit)
+ {
+ ERR_LOG("Cannot find paramUnit\n");
+ return APP_ERROR;
+ }
+
+ param = paramUnitGetParamByName(paramUnit, paraName);
+ if (!param)
+ {
+ ERR_LOG("Cannot query param value!\n");
+ return APP_ERROR;
+ }
+
+ shortArray = (unsigned short *)param->data;
+ arraySize = param->arraySize;
+ /*for(i = 0; i < param->arraySize; i++)
+ {
+ printf("[%d]0x%x\n", i, ((unsigned short*)param->data)[i])
+ }*/
+
+ shortArray[j] = 32767;
+
+ /* You should cache follow object in somewhere without query again */
+ paramInfo = audioTypeGetParamInfoByName(audioType, paraName);
+
+ /* The sph_in_fir param is short array type */
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)shortArray, param->arraySize) == APP_ERROR)
+ {
+ return APP_ERROR;
+ }
+ }
+
+ /* Result check */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit)
+ {
+ ERR_LOG("Cannot find paramUnit\n");
+ return APP_ERROR;
+ }
+
+ param = paramUnitGetParamByName(paramUnit, paraName);
+ if (!param)
+ {
+ ERR_LOG("Cannot query param value!\n");
+ return APP_ERROR;
+ }
+
+ shortArray = (unsigned short *)param->data;
+ for (i = 0; i < param->arraySize; i++)
+ {
+ if (shortArray[i] != 32767)
+ {
+ ERR_LOG("Verify short array[%lu] = %d != 32767\n", i, shortArray[i]);
+ return APP_ERROR;
+ }
+ }
+
+ return APP_NO_ERROR;
+}
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechUI_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechUI_AudioParam.xml
new file mode 100644
index 0000000..73c237c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechUI_AudioParam.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.0">
+ <ParamTree>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="0"/>
+ <Param path="NB,Normal" param_id="0"/>
+ <Param path="WB,Normal" param_id="0"/>
+ <Param path="NB,eCall" param_id="0"/>
+ <Param path="WB,eCall" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="DL FIR visibility" value="1"/>
+ <Param name="DL DRC+DG visibility" value="1"/>
+ <Param name="DL NR visibility" value="1"/>
+ <Param name="DL Digital Gain visibility" value="0"/>
+ <Param name="DL Limiter TH visibility" value="1"/>
+ <Param name="DL TASTE visibility" value="0"/>
+ <Param name="UL FIR visibility" value="1"/>
+ <Param name="UL DRC+DG visibility" value="1"/>
+ <Param name="UL NREC visibility" value="1"/>
+ <Param name="UL cal. visibility" value="0"/>
+ <Param name="UL Digital Gain visibility" value="0"/>
+ <Param name="UL Limiter TH visibility" value="1"/>
+ <Param name="UL AEC visibility" value="1"/>
+ <Param name="UL NLP visibility" value="1"/>
+ <Param name="UL ES LB visibility" value="1"/>
+ <Param name="UL AES LB visibility" value="1"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechUI_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechUI_ParamUnitDesc.xml
new file mode 100644
index 0000000..68660a5
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechUI_ParamUnitDesc.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc tab_name="Voice" version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <Category name="Normal" wording="Normal Call Hands-free"/>
+ <Category name="eCall" wording="eCall Hands-free"/>
+ <Category name="BT_ECNR" wording="BT Call"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="DL FIR visibility" type="int"/>
+ <Param name="DL DRC+DG visibility" type="int"/>
+ <Param name="DL NR visibility" type="int"/>
+ <Param name="DL Digital Gain visibility" type="int"/>
+ <Param name="DL Limiter TH visibility" type="int"/>
+ <Param name="DL TASTE visibility" type="int"/>
+ <Param name="UL FIR visibility" type="int"/>
+ <Param name="UL DRC+DG visibility" type="int"/>
+ <Param name="UL NREC visibility" type="int"/>
+ <Param name="UL cal. visibility" type="int"/>
+ <Param name="UL Digital Gain visibility" type="int"/>
+ <Param name="UL Limiter TH visibility" type="int"/>
+ <Param name="UL AEC visibility" type="int"/>
+ <Param name="UL NLP visibility" type="int"/>
+ <Param name="UL ES LB visibility" type="int"/>
+ <Param name="UL AES LB visibility" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVolUI_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVolUI_AudioParam.xml
new file mode 100644
index 0000000..aac4b2e
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVolUI_AudioParam.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.0">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="0"/>
+ <Param path="NB,Normal" param_id="0"/>
+ <Param path="WB,Normal" param_id="0"/>
+ <Param path="NB,eCall" param_id="0"/>
+ <Param path="WB,eCall" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_gain_visibility" value="-1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="-1"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="dl_gain_visibility" value="1"/>
+ <Param name="ul_gain_visibility" value="1"/>
+ <Param name="stf_gain_visibility" value="1"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVolUI_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVolUI_ParamUnitDesc.xml
new file mode 100644
index 0000000..c5953e4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVolUI_ParamUnitDesc.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <Category name="Normal" wording="Normal Call Hands-free"/>
+ <Category name="eCall" wording="eCall Hands-free"/>
+ <Category name="BT_ECNR" wording="BT Call"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_gain_visibility" type="int"/>
+ <Param name="ul_gain_visibility" type="int"/>
+ <Param name="stf_gain_visibility" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVol_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVol_AudioParam.xml
new file mode 100644
index 0000000..51b50d9
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVol_AudioParam.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.0">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="0"/>
+ <Param path="NB,Normal" param_id="0"/>
+ <Param path="WB,Normal" param_id="0"/>
+ <Param path="NB,eCall" param_id="0"/>
+ <Param path="WB,eCall" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_gain" value="4"/>
+ <Param name="ul_gain" value="18"/>
+ <Param name="stf_gain" value="0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVol_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVol_ParamUnitDesc.xml
new file mode 100644
index 0000000..925be48
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/SpeechVol_ParamUnitDesc.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <Category name="Normal" wording="Normal Call Hands-free"/>
+ <Category name="eCall" wording="eCall Hands-free"/>
+ <Category name="BT_ECNR" wording="BT Call"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_gain" type="short_array"/><!-- index, corresponding dB in another xml -->
+ <Param name="ul_gain" type="int"/><!-- unit is dB, range in other xml -->
+ <Param name="stf_gain" type="short_array">
+ <Field name="stf_gain_field" array_index="0" bit="0,15" check_list="30,20dB,28,18dB,26,16dB,24,14dB,22,12dB,20,10dB,18,8dB,16,6dB,14,4dB,12,2dB,10,0dB,8,-2dB,6,-4dB,4,-6dB,2,-8dB,0,-10dB"/>
+ </Param>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Speech_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Speech_AudioParam.xml
new file mode 100644
index 0000000..15ad60c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Speech_AudioParam.xml
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.0">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="1"/>
+ <Param path="NB,Normal" param_id="0"/>
+ <Param path="WB,Normal" param_id="1"/>
+ <Param path="NB,eCall" param_id="2"/>
+ <Param path="WB,eCall" param_id="3"/>
+ <Param path="NB,BT_ECNR" param_id="4"/>
+ <Param path="WB,BT_ECNR" param_id="5"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="speech_mode_para" value="0x60,0xE0,0x1488,0x1F,0xE007,0x601F,0x195,0x84,0x54,0x10E5,0x263,0x0,0x5008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100.000000,400.000000,800.000000,1200.000000,1600.000000,2000.000000,2400.000000,2800.000000,3200.000000,3800.000000"/>
+ <Param name="sph_out_fir_eq_freq" value="100.000000,400.000000,800.000000,1200.000000,1600.000000,2000.000000,2400.000000,2800.000000,3200.000000,3800.000000"/>
+ <Param name="sph_in_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ <Param name="sph_out_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="1">
+ <Param name="speech_mode_para" value="0x60,0xE0,0x1488,0x1F,0xE107,0x601F,0x195,0x84,0x54,0x10E5,0x263,0x0,0x4008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100.000000,500.000000,1000.000000,2000.000000,3000.000000,4000.000000,5000.000000,5300.000000,6000.000000,7500.000000"/>
+ <Param name="sph_out_fir_eq_freq" value="100.000000,500.000000,1000.000000,2000.000000,3000.000000,4000.000000,5000.000000,5300.000000,6000.000000,7500.000000"/>
+ <Param name="sph_in_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ <Param name="sph_out_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="2">
+ <Param name="speech_mode_para" value="0x60,0xE0,0x1488,0x1F,0xE007,0x601F,0x195,0x84,0x54,0x10E5,0x263,0x0,0x5008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100.000000,400.000000,800.000000,1200.000000,1600.000000,2000.000000,2400.000000,2800.000000,3200.000000,3800.000000"/>
+ <Param name="sph_out_fir_eq_freq" value="100.000000,400.000000,800.000000,1200.000000,1600.000000,2000.000000,2400.000000,2800.000000,3200.000000,3800.000000"/>
+ <Param name="sph_in_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ <Param name="sph_out_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="3">
+ <Param name="speech_mode_para" value="0x60,0xE0,0x1488,0x1F,0xE107,0x601F,0x195,0x84,0x54,0x10E5,0x263,0x0,0x4008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100.000000,500.000000,1000.000000,2000.000000,3000.000000,4000.000000,5000.000000,5300.000000,6000.000000,7500.000000"/>
+ <Param name="sph_out_fir_eq_freq" value="100.000000,500.000000,1000.000000,2000.000000,3000.000000,4000.000000,5000.000000,5300.000000,6000.000000,7500.000000"/>
+ <Param name="sph_in_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ <Param name="sph_out_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="4">
+ <Param name="speech_mode_para" value="0x8060,0xE0,0x1488,0x1F,0xE007,0x601F,0x19C,0x84,0x54,0x10E5,0x263,0x0,0x5008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100.000000,400.000000,800.000000,1200.000000,1600.000000,2000.000000,2400.000000,2800.000000,3200.000000,3800.000000"/>
+ <Param name="sph_out_fir_eq_freq" value="100.000000,400.000000,800.000000,1200.000000,1600.000000,2000.000000,2400.000000,2800.000000,3200.000000,3800.000000"/>
+ <Param name="sph_in_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ <Param name="sph_out_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ </ParamUnit>
+ <ParamUnit param_id="5">
+ <Param name="speech_mode_para" value="0x8060,0xE0,0x1488,0x1F,0xE107,0x601F,0x19C,0x84,0x54,0x10E5,0x263,0x0,0x4008,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_out_fir" value="0x7FFF,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0"/>
+ <Param name="sph_in_fir_eq_freq" value="100.000000,500.000000,1000.000000,2000.000000,3000.000000,4000.000000,5000.000000,5300.000000,6000.000000,7500.000000"/>
+ <Param name="sph_out_fir_eq_freq" value="100.000000,500.000000,1000.000000,2000.000000,3000.000000,4000.000000,5000.000000,5300.000000,6000.000000,7500.000000"/>
+ <Param name="sph_in_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ <Param name="sph_out_fir_eq_mag" value="1.000000,1.000000,4.000000,4.000000,5.000000,3.000000,2.000000,4.000000,8.000000,12.000000"/>
+ </ParamUnit>
+
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Speech_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Speech_ParamUnitDesc.xml
new file mode 100644
index 0000000..0b39124
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Speech_ParamUnitDesc.xml
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc tab_name="Voice" version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <Category name="Normal" wording="Normal Call Hands-free"/>
+ <Category name="eCall" wording="eCall Hands-free"/>
+ <Category name="BT_ECNR" wording="BT Call"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="speech_mode_para" type="ushort_array">
+ <!-- Gain -->
+ <Field name="DL Digital Gain" array_index="7" bit="4,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB,4,4dB,5,5dB,6,6dB,7,7dB,8,8dB,9,9dB,10,10dB,11,11dB,12,12dB,13,13dB,14,14dB,15,15dB"/>
+ <Field name="UL Digital Gain" array_index="7" bit="0,3" check_list="0,0dB,1,1dB,2,2dB,3,3dB,4,4dB,5,5dB,6,6dB,7,7dB,8,8dB,9,9dB,10,10dB,11,11dB,12,12dB,13,13dB,14,14dB,15,15dB"/>
+
+ <!-- New TX DRC -->
+ <Field name="TX Graphical_UI_DRC Switch" array_index="32" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="TX RMS_TAV_Count" array_index="32" bit="1,3" check_list="0,20,1,20,2,40,3,60,4,80,5,100,6,100,7,100"/>
+ <Field name="TX DRC-Delay" array_index="32" bit="4,5" check_list="0,0ms,1,5ms,2,10ms,3,15ms"/>
+ <Field name="TX DRC Min-Gain" array_index="32" bit="6,7" check_list="0,-6dB,1,-9dB,2,-12dB,3,-18dB"/>
+ <Field name="TX-1 Gain Attack_Rate" array_index="33" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-1 Gain Release_Rate" array_index="33" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-1 Gain Hysterisis" array_index="33" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-2 Gain Attack_Rate" array_index="34" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-2 Gain Release_Rate" array_index="34" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-2 Gain Hysterisis" array_index="34" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-3 Gain Attack_Rate" array_index="35" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-3 Gain Release_Rate" array_index="35" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-3 Gain Hysterisis" array_index="35" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-4 Gain Attack_Rate" array_index="36" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-4 Gain Release_Rate" array_index="36" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-4 Gain Hysterisis" array_index="36" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX-5 Gain Attack_Rate" array_index="37" bit="0,2" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-5 Gain Release_Rate" array_index="37" bit="3,5" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="TX-5 Gain Hysterisis" array_index="37" bit="6,7" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="TX DSP_Compression_ratio_0" array_index="38" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_1" array_index="39" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_2" array_index="40" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_3" array_index="41" bit="0,7"/>
+ <Field name="TX DSP_Compression_ratio_4" array_index="42" bit="0,7"/>
+ <Field name="TX DSP_Threshold_Y0" array_index="43" bit="0,3"/>
+ <Field name="TX DSP_Threshold_X1" array_index="44" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X2" array_index="45" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X3" array_index="46" bit="0,7"/>
+ <Field name="TX DSP_Threshold_X4" array_index="47" bit="0,7"/>
+
+ <!-- New RX DRC -->
+ <Field name="RX Graphical_UI_DRC Switch" array_index="32" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="RX RMS_TAV_Count" array_index="32" bit="9,11" check_list="0,20,1,20,2,40,3,60,4,80,5,100,6,100,7,100"/>
+ <Field name="RX DRC-Delay" array_index="32" bit="12,13" check_list="0,0ms,1,5ms,2,10ms,3,15ms"/>
+ <Field name="RX DRC Min-Gain" array_index="32" bit="14,15" check_list="0,-6dB,1,-9dB,2,-12dB,3,-18dB"/>
+ <Field name="RX-1 Gain Attack_Rate" array_index="33" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-1 Gain Release_Rate" array_index="33" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-1 Gain Hysterisis" array_index="33" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-2 Gain Attack_Rate" array_index="34" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-2 Gain Release_Rate" array_index="34" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-2 Gain Hysterisis" array_index="34" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-3 Gain Attack_Rate" array_index="35" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-3 Gain Release_Rate" array_index="35" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-3 Gain Hysterisis" array_index="35" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-4 Gain Attack_Rate" array_index="36" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-4 Gain Release_Rate" array_index="36" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-4 Gain Hysterisis" array_index="36" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX-5 Gain Attack_Rate" array_index="37" bit="8,10" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-5 Gain Release_Rate" array_index="37" bit="11,13" check_list="0,0.5ms,1,1ms,2,2ms,3,4ms,4,8ms,5,16ms,6,32ms,7,64ms"/>
+ <Field name="RX-5 Gain Hysterisis" array_index="37" bit="14,15" check_list="0,0dB,1,1dB,2,2dB,3,3dB"/>
+ <Field name="RX DSP_Compression_ratio_0" array_index="38" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_1" array_index="39" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_2" array_index="40" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_3" array_index="41" bit="8,15"/>
+ <Field name="RX DSP_Compression_ratio_4" array_index="42" bit="8,15"/>
+ <Field name="RX DSP_Threshold_Y0" array_index="43" bit="4,11 "/>
+ <Field name="RX DSP_Threshold_X1" array_index="44" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X2" array_index="45" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X3" array_index="46" bit="8,15"/>
+ <Field name="RX DSP_Threshold_X4" array_index="47" bit="8,15"/>
+
+ <!-- MagiNR(TX) -->
+ <Field name="TX NR Switch" array_index="4" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="TX NR Quick learning" array_index="4" bit="1,1" check_list="0,quick,1,slow"/>
+ <Field name="TX NR for high frequency" array_index="4" bit="8,8" check_list="0,on,1,off"/>
+ <Field name="TX NR suppression strength" array_index="8" bit="6,8" check_list="0,23dB,1,20.5dB,2,18dB,3,15.5dB,4,13dB,5,10.5dB,6,8dB,7,off"/>
+ <Field name="TX Adaptive gain control" array_index="4" bit="12,13" check_list="0,fixed 10 dB,1, fixed 0 dB,2,vary between 10 to 6dB, 3,vary between 10 to 0dB"/>
+ <Field name="TX mute 1s" array_index="10" bit="1,1" check_list="0,on,1,off"/>
+ <Field name="TX Ambient noise calibration" array_index="8" bit="12,13" check_list="0,0dB,1,3dB,2,6dB,3,9dB"/>
+ <Field name="TX Handfree Tone Detection" array_index="4" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="TX expander switch" array_index="3" bit="0,1" check_list="0,off,1,suppress echo,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="TX expander suppression gain" array_index="3" bit="4,5" check_list="0,3dB,1,9dB,2,12dB,3,15dB"/>
+ <Field name="TX NR Noise Adaption Rate" array_index="4" bit="10,11" check_list="0,722ms,1,209ms,2,62ms,3,32ms"/>
+
+ <!-- MagiNR(RX) -->
+ <Field name="RX NR Switch" array_index="4" bit="2,2" check_list="0,off,1,on"/>
+ <Field name="RX NR Strength" array_index="8" bit="9,11" check_list="0,23dB,1,20.5dB,2,18dB,3,15.5dB,4,13dB,5,10.5dB,6,8dB,7,off"/>
+ <Field name="RX expander switch" array_index="5" bit="0,1" check_list="0,off,1, off,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="RX expander suppression gain" array_index="5" bit="4,5" check_list="0,3dB,1,9dB,2,12dB,3,15dB"/>
+ <Field name="RX Comfort Noise" array_index="10" bit="13,15" check_list="0,+0dB(-83dBFS),1,+3dB,2,+6dB,3,+9dB,4,+12dB,5,+15dB,6,+18dB,7,+21dB"/>
+
+ <!-- MagiAEC -->
+ <Field name="AEC" array_index="1" bit="0,15" check_list="189,189,221,221,224,224,253,253,479,479"/>
+ <Field name="Switch" array_index="1" bit="8,8" check_list="0,on,1,off"/>
+ <Field name="device Mode" array_index="1" bit="0,0" check_list="0,Handfree Mode,1,Normal Mode"/>
+ <Field name="BGNT FE improvement control" array_index="1" bit="7,7" check_list="0,less aggressive,1,default"/>
+ <Field name="echo path change handler" array_index="1" bit="13, 13" check_list="0,on,1,off"/>
+ <Field name="manual clipping" array_index="0" bit="15, 15" check_list="0,off,1,on"/>
+ <Field name="Pre-clipping/manual clipping threshold" array_index="6" bit="0, 3" check_list="0,-15dB,1,-14dB,2,-13dB,3,-12dB,4,-11dB,5,-10dB,6,-9dB,7,-8dB,8,-7dB,9,-6dB,10,-5dB,11,-4dB,12,-3dB,13,-2dB,14,-1dB,15,0dB"/>
+ <Field name="ES switch" array_index="1" bit="1,1" check_list="0,on,1,off"/>
+ <Field name="residual echo weighting for linear part" array_index="2" bit="0,3"/>
+ <Field name="residual echo weighting for non-linear part" array_index="2" bit="4,7"/>
+ <Field name="ES" array_index="2" bit="11,14" check_list="0,-Inf,1,-24.1dB,2,-18.1dB,3,-14.5dB,4,-12.0dB,5,-10.1dB,6,-8.52dB,7,-7.18dB,8,-6.02dB,9,-5.00dB,10,-4.08dB,11,-3.25dB,12,-2.50dB,13,-1.80dB,14,-1.16dB,15,-0.56dB"/>
+ <Field name="First Echo Suppression control" array_index="1" bit="10,10" check_list="0,on,1,off"/>
+ <Field name="AES switch" array_index="1" bit="14,14" check_list="0,on,1,off"/>
+ <Field name="AES improvement" array_index="12" bit="7,7" check_list="0,off,1,on"/>
+ <Field name="AES" array_index="12" bit="11,14" check_list="0,-Inf,1,-24.1dB,2,-18.1dB,3,-14.5dB,4,-12.0dB,5,-10.1dB,6,-8.52dB,7,-7.18dB,8,-6.02dB,9,-5.00dB,10,-4.08dB,11,-3.25dB,12,-2.50dB,13,-1.80dB,14,-1.16dB,15,-0.56dB"/>
+ <Field name="Comfort noise generator" array_index="1" bit="5,5" check_list="0,off,1,on"/>
+ <Field name="Minimum comfort noise value" array_index="12" bit="0,4"/>
+ <Field name="NLP Suppression behavior control" array_index="1" bit="11,11" check_list="0,on,1,off"/>
+ <Field name="NLP" array_index="0" bit="0,7" check_list="0,0,64,64,96,96,128,128,192,192,255,255"/>
+ <Field name="EXT Echo ref" array_index="12" bit="6,6" check_list="0,off,1,on"/>
+ <Field name="BT Delay Control" array_index="15" bit="0,7"/>
+ <Field name="New echo suppression" array_index="1" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="0-2k residual echo weighting for linear part" array_index="16" bit="0,2" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="0-2k residual echo weighting for non-linear part" array_index="16" bit="3,5" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="0-2k ES smooth rate" array_index="16" bit="6,7" check_list="0,0,1,0.3,2,0.6,3,0.9"/>
+ <Field name="0-2k ES gain lower bound" array_index="18" bit="0,4" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="0-2k ES estimated echo control" array_index="17" bit="10,11" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="2-4k residual echo weighting for linear part" array_index="16" bit="8,10" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="2-4k residual echo weighting for non-linear part" array_index="16" bit="11,13" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="2-4k ES smooth rate" array_index="16" bit="14,15" check_list="0,0,1,0.3,2,0.6,3,0.9"/>
+ <Field name="2-4k ES gain lower bound" array_index="18" bit="5,9" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="2-4k ES estimated echo control" array_index="17" bit="12,13" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="4-8k residual echo weighting for linear part" array_index="17" bit="0,2" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="4-8k residual echo weighting for non-linear part" array_index="17" bit="3,5" check_list="0,0,1,2,2,4,3,8,4,16,5,32,6,64,7,128"/>
+ <Field name="4-8k ES smooth rate" array_index="17" bit="6,7" check_list="0,0,1,0.3,2,0.6,3,0.9"/>
+ <Field name="4-8k ES gain lower bound" array_index="18" bit="10,14" check_list="0,-62dB,1,-60dB,2,-58dB,3,-56dB,4,-54dB,5,-52dB,6,-50dB,7,-48dB,8,-46dB,9,-44dB,10,-42dB,11,-40dB,12,-38dB,13,-36dB,14,-34dB,15,-32dB,16,-30dB,17,-28dB,18,-26dB,19,-24dB,20,-22dB,21,-20dB,22,-18dB,23,-16dB,24,-14dB,25,-12dB,26,-10dB,27,-8dB,28,-6dB,29,-4dB,30,-2dB,31,0dB"/>
+ <Field name="4-8k ES estimated echo control" array_index="17" bit="14,15" check_list="0,0,1,0.3,2,0.7,3,1"/>
+ <Field name="EPC control" array_index="17" bit="8,9" check_list="0,EPC handler off,1,EPC ES handling,2,EPC ES handling+strict EPC EC handling,3,EPC ES handling+EPC EC handling"/>
+ <Field name="Normal mode DT improvement" array_index="18" bit="15,15" check_list="0,off,1,on"/>
+
+ <!-- TX DRC -->
+ <Field name="UL Limiter TH" array_index="3" bit="2,3" check_list="0,off,1,off,2,-4.3 dBFS,3,-1.4 dBFS"/>
+ <Field name="UL IIR cut off frequency" array_index="3" bit="6,7" check_list="0,off,1,175Hz,2,228Hz,3,279Hz"/>
+ <Field name="75Hz high-pass IIR" array_index="3" bit="12,12" check_list="0,122Hz,1,75Hz"/>
+ <Field name="comfort noise" array_index="4" bit="14,14" check_list="0,off,1,on"/>
+ <Field name="comfort noise level" array_index="10" bit="12,12" check_list="0,+0dB,1,-18dB"/>
+ <Field name="FIR/IIR switch" array_index="10" bit="2,2" check_list="0,FIR,1,IIR"/>
+
+ <!-- MagiTDNC -->
+ <Field name="TDNC switch" array_index="11" bit="0,0" check_list="0,off,1,on"/>
+
+ <!-- MagiNR(dual) -->
+ <Field name="MagiNRDual switch" array_index="13" bit="0,0" check_list="0,off,1,on"/>
+ <Field name="MagiNRDual-NS switch" array_index="13" bit="1,1" check_list="0,off,1,on"/>
+ <Field name="High band (>1250Hz) speech quality protection" array_index="13" bit="2,3" check_list="0,weak,1,off,2,medium,3,strong"/>
+ <Field name="MagiNRDual-NS mode" array_index="13" bit="4,5" check_list="0,none,1,strong,2,medium,3,weak"/>
+ <Field name="1-mic NS + expander capability" array_index="13" bit="6,7" check_list="0,suppress non-stationary noise,1,suppress stationary noise,2,suppress echo,3,off"/>
+ <Field name="1-mic NS + expander mode" array_index="13" bit="8,8" check_list="0,manual,1,combo"/>
+ <Field name="MagiNRDual-NC switch" array_index="13" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="1-mic NS switch" array_index="13" bit="11,11" check_list="0,on,1,off"/>
+ <Field name="Initial convergence improvement" array_index="13" bit="13,13" check_list="0,off,1,on"/>
+ <Field name="BGNT with NE improvement" array_index="13" bit="14,15" check_list="0,off,1,weak,2,medium,3,strong"/>
+ <Field name="Lower bound of MagiNRDual-NS Gain (dB)" array_index="14" bit="0,6" check_list="0,0.07,1,0.14,2,0.21,3,0.28,4,0.35,5,0.42,6,0.49,7,0.56,8,0.63,9,0.71,10,0.78,11,0.85,12,0.93,13,1.01,14,1.08,15,1.16,16,1.24,17,1.32,18,1.40,19,1.48,20,1.56,21,1.64,22,1.72,23,1.80,24,1.89,25,1.97,26,2.06,27,2.14,28,2.23,29,2.32,30,2.41,31,2.50,32,2.59,33,2.68,34,2.77,35,2.87,36,2.96,37,3.06,38,3.16,39,3.25,40,3.35,41,3.45,42,3.56,43,3.66,44,3.76,45,3.87,46,3.97,47,4.08,48,4.19,49,4.30,50,4.41,51,4.53,52,4.64,53,4.76,54,4.88,55,5.00,56,5.12,57,5.24,58,5.37,59,5.49,60,5.62,61,5.75,62,5.89,63,6.02,64,6.16,65,6.30,66,6.44,67,6.58,68,6.73,69,6.88,70,7.03,71,7.18,72,7.34,73,7.50,74,7.66,75,7.82,76,7.99,77,8.16,78,8.34,79,8.52,80,8.70,81,8.89,82,9.08,83,9.27,84,9.47,85,9.68,86,9.89,87,10.10,88,10.32,89,10.55,90,10.78,91,11.02,92,11.26,93,11.51,94,11.77,95,12.04,96,12.32,97,12.60,98,12.90,99,13.20,100,13.52,101,13.84,102,14.19,103,14.54,104,14.91,105,15.30,106,15.70,107,16.12,108,16.57,109,17.04,110,17.53,111,18.06,112,18.62,113,19.22,114,19.87,115,20.56,116,21.32,117,22.14,118,23.06,119,24.08,120,25.24,121,26.58,122,28.16,123,30.10,124,32.60,125,36.12,126,42.14,127,Inf"/>
+ <Field name="Less MagiNRDual-NS level" array_index="14" bit="7,8" check_list="0,off,1,weak,2,medium,3,strong"/>
+ <Field name="Non-stationary noise weight" array_index="14" bit="9,10" check_list="0,off,1,weak,2,medium,3,strong"/>
+ <Field name="Stationary noise weight" array_index="14" bit="11,12" check_list="0,off,1,weak,2,medium,3,strong"/>
+
+ <!-- MagiLoudness/MagiClarity -->
+ <Field name="RX expander mode" array_index="5" bit="0,1" check_list="0,off,1,off,2,suppress stationary noise,3,suppress non-stationary noise"/>
+ <Field name="DL Limiter TH" array_index="5" bit="2,3" check_list="0,off,1,-6 dBFS,2,-4.3 dBFS,3,-1.4 dBFS"/>
+ <Field name="RMS power limiter thd" array_index="5" bit="10,11" check_list="0,off,1,-7dBFs,2,-10dBFs,3,-14dBFs"/>
+ <Field name="20ms delay" array_index="5" bit="12,12" check_list="0,off,1,on"/>
+ <Field name="DL IIR cut off frequency" array_index="8" bit="0,2" check_list="0,all-pass,1,100Hz,2,150Hz,3,200Hz,4,250Hz,5,300Hz,6,350Hz,7,400Hz"/>
+
+ <Field name="MagiClarity DM/SM" array_index="5" bit="6,6" check_list="0,Dual-mic mode,1,Single-mic mode"/>
+ <Field name="MagiClarity Shape filter triggered by HF noise" array_index="5" bit="7,7" check_list="0,off,1,on"/>
+ <Field name="MagiClarity Shape filter triggered by babble noise" array_index="5" bit="8,8" check_list="0,off,1,on"/>
+ <Field name="MagiClarity Shape filter triggered by LF noise" array_index="5" bit="9,9" check_list="0,off,1,on"/>
+ <Field name="MagiClarity on/off" array_index="5" bit="13,13" check_list="0,on,1,off"/>
+
+ <Field name="MagiClarity Thd1" array_index="6" bit="4,7" check_list="0,-14dB,1,-12dB,2,-10dB,3,-8dB,4,-6dB,5,-4dB,6,-2dB,7,0dB,8,+2dB,9,+4dB,10,+6dB,11,+8dB,12,+10dB,13,+12dB,14,+14dB,15,+16dB"/>
+ <Field name="MagiClarity Thd2" array_index="6" bit="8,8" check_list="0,6dB,1,10dB"/>
+ <Field name="MagiClarity release rate" array_index="6" bit="9,10" check_list="0,0.5dB/20ms,1,1dB/20ms,2,2dB/20ms,3,3dB/20ms"/>
+ <Field name="MagiClarity RMS power limiter thd" array_index="6" bit="11,12" check_list="0,off,1,-7dBFs,2,-10dBFs,3,-14dBFs"/>
+ <Field name="MagiClarity DL bounder threshold" array_index="6" bit="13,14" check_list="0,off,1,-6dBFS,2,-4.3dBFS,3,-1.4dBFS"/>
+ <Field name="MagiClarity 20ms delay" array_index="6" bit="15,15" check_list="0,off,1,on"/>
+ <Field name="MagiClarity attack time" array_index="9" bit="2,3" check_list="0,0.5s,1,1s,2,1.5s,3,2.0s"/>
+ <Field name="MagiClarity release time" array_index="9" bit="8,10" check_list="0,2s,1,4s,2,8s,3,12s,4,16s,5,20s,6,24s,7,30s"/>
+ </Param>
+ <Param name="sph_in_fir" type="short_array"/>
+ <Param name="sph_out_fir" type="short_array"/>
+ <Param name="sph_in_fir_eq_freq" type="double_array"/>
+ <Param name="sph_out_fir_eq_freq" type="double_array"/>
+ <Param name="sph_in_fir_eq_mag" type="double_array"/>
+ <Param name="sph_out_fir_eq_mag" type="double_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/VolumeGainMap_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/VolumeGainMap_AudioParam.xml
new file mode 100644
index 0000000..20997ba
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/VolumeGainMap_AudioParam.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.0">
+ <ParamTree>
+ <Param path="" param_id="0"/>
+ <Param path="NB" param_id="0"/>
+ <Param path="WB" param_id="0"/>
+ <Param path="NB,Normal" param_id="0"/>
+ <Param path="WB,Normal" param_id="0"/>
+ <Param path="NB,eCall" param_id="0"/>
+ <Param path="WB,eCall" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="dl_total_gain" value="-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="dl_analog_gain" value="17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17"/>
+ <Param name="dl_digital_gain" value="-40,-39,-38,-37,-36,-35,-34,-33,-32,-31,-30,-29,-28,-27,-26,-25,-24,-23,-22,-21,-20,-19,-18,-17,-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1,0"/>
+ <Param name="dl_total_gain_decimal" value="17,16,15,14,13,12,11,10,9,8,7,6,5,4,0"/>
+ <Param name="dl_analog_type" value="0"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/VolumeGainMap_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/VolumeGainMap_ParamUnitDesc.xml
new file mode 100644
index 0000000..a847c2c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/VolumeGainMap_ParamUnitDesc.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="Band" wording="Bandwidth">
+ <Category name="NB" wording="Narrow Band"/>
+ <Category name="WB" wording="Wide Band"/>
+ </CategoryType>
+ <CategoryType name="Profile" wording="Device">
+ <Category name="Normal" wording="Normal Call Hands-free"/>
+ <Category name="eCall" wording="eCall Hands-free"/>
+ <Category name="BT_ECNR" wording="BT Call"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="dl_total_gain" type="short_array"/>
+ <Param name="dl_digital_gain" type="short_array"/>
+ <Param name="dl_analog_gain" type="short_array"/>
+ <Param name="dl_total_gain_decimal" type="short_array"/>
+ <Param name="dl_analog_type" type="int"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Volume_AudioParam.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Volume_AudioParam.xml
new file mode 100644
index 0000000..ac7ed2f
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Volume_AudioParam.xml
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AudioParam version="1.0">
+ <ParamTree>
+ <Param path="Common" param_id="0"/>
+ </ParamTree>
+ <ParamUnitPool>
+ <ParamUnit param_id="0">
+ <Param name="step_per_db" value="4"/>
+ <Param name="db_per_step" value="0.250000"/>
+ <Param name="volume_step" value="255.000000"/>
+ <Param name="mic_idx_range_max" value="45"/>
+ <Param name="mic_idx_range_min" value="0"/>
+ <Param name="play_digi_range_max" value="0"/>
+ <Param name="play_digi_range_min" value="-64"/>
+ <Param name="stf_idx_range_max" value="47"/>
+ <Param name="stf_idx_range_min" value="0"/>
+ <Param name="dec_play_hs_max" value="160"/>
+ <Param name="dec_play_hs_step_per_db" value="4"/>
+ <Param name="dec_play_spk_max" value="180"/>
+ <Param name="dec_play_spk_step_per_db" value="4"/>
+ <Param name="dec_play_digi_max" value="256"/>
+ <Param name="dec_play_digi_step_per_db" value="4"/>
+ <Param name="dec_rec_max" value="252"/>
+ <Param name="dec_rec_step_per_db" value="4"/>
+ <Param name="dec_stf_max" value="240"/>
+ <Param name="dec_stf_step_per_db" value="8"/>
+ <Param name="buffer_gain_level" value="20"/>
+ <Param name="buffer_gain_db" value="8,7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8,-9,-10,-40"/>
+ <Param name="buffer_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,31"/>
+ <Param name="buffer_gain_string" value="8Db,7Db,6Db,5Db,4Db,3Db,2Db,1Db,0Db,-1Db,-2Db,-3Db,-4Db,-5Db,-6Db,-7Db,-8Db,-9Db,-10Db,-40Db"/>
+ <Param name="buffer_gain_prefer_max_idx" value="18"/>
+ <Param name="spk_gain_level" value="16"/>
+ <Param name="spk_gain_db" value="-64,0,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
+ <Param name="spk_gain_idx" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15"/>
+ <Param name="spk_gain_string" value="MUTE,0Db,4Db,5Db,6Db,7Db,8Db,9Db,10Db,11Db,12Db,13Db,14Db,15Db,16Db,17Db"/>
+ <Param name="spk_l_mixer_name" value="Audio_Speaker_PGA_gain"/>
+ <Param name="spk_r_mixer_name" value="Audio_Speaker_PGA_gain"/>
+ <Param name="spk_analog_type" value="2"/>
+ <Param name="swagc_gain_map" value="4,5,6,7,8,9,10,11,12,13,14,15,16,11,12,13,14,15,16,11,12,13,14,15,16,11,12,13,14,15,16,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25"/>
+ <Param name="ul_pga_gain_map" value="0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,12,12,12,12,12,12,18,18,18,18,18,18,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24"/>
+ <Param name="ul_pga_gain_string" value="0Db,6Db,12Db,18Db,24Db,30Db"/>
+ <Param name="ul_gain_offset" value="2"/>
+ <Param name="ul_pga_gain_map_max" value="30"/>
+ <Param name="ul_hw_pga_max_idx" value="6"/>
+ <Param name="stf_gain_map" value="32767,29204,26027,23196,20674,18426,16422,14636,13044,11625,10361,9234,8230,7335,6537,5826,5193,4628,4125,3676,3276,2919,2602,2319,2066,1841,1641,1463,1304,1162,1035,923,822,733,653,582,519,462,412,367,327,291,260,231,206,183,163,145"/>
+ <Param name="hp_impedance_enable" value="1"/>
+ <Param name="hp_impedance_default_idx" value="1"/>
+ <Param name="hp_impedance_threshold_list" value="24,48,96,192,512"/>
+ <Param name="hp_impedance_compensate_list" value="3,0,-3,-6,-9"/>
+ </ParamUnit>
+ </ParamUnitPool>
+</AudioParam>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Volume_ParamUnitDesc.xml b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Volume_ParamUnitDesc.xml
new file mode 100644
index 0000000..ed3bba0
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/audio_param/Volume_ParamUnitDesc.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ParamUnitDesc version="1.0">
+ <CategoryTypeList>
+ <CategoryType name="VolumeParam">
+ <Category name="Common"/>
+ </CategoryType>
+ </CategoryTypeList>
+ <ParamUnit>
+ <Param name="step_per_db" type="int"/>
+ <Param name="db_per_step" type="float"/>
+ <Param name="volume_step" type="float"/>
+ <!-- Common -->
+ <Param name="mic_idx_range_max" type="int"/>
+ <Param name="mic_idx_range_min" type="int"/>
+ <!-- PlaybackVolDigi -->
+ <Param name="play_digi_range_max" type="int"/>
+ <Param name="play_digi_range_min" type="int"/>
+
+ <Param name="stf_idx_range_max" type="int"/>
+ <Param name="stf_idx_range_min" type="int"/>
+ <!-- Decimal -->
+ <Param name="dec_play_hs_max" type="int"/>
+ <Param name="dec_play_hs_step_per_db" type="int"/>
+ <Param name="dec_play_spk_max" type="int"/>
+ <Param name="dec_play_spk_step_per_db" type="int"/>
+ <Param name="dec_play_digi_max" type="int"/> <!-- decimal maximum == 255 -->
+ <Param name="dec_play_digi_step_per_db" type="int"/>
+
+ <Param name="dec_rec_max" type="int"/>
+ <Param name="dec_rec_step_per_db" type="int"/>
+
+ <Param name="dec_stf_max" type="int"/>
+ <Param name="dec_stf_step_per_db" type="int"/>
+ <!-- spec -->
+ <Param name="buffer_gain_level" type="int"/>
+ <Param name="buffer_gain_db" type="short_array"/>
+ <Param name="buffer_gain_idx" type="short_array"/>
+ <Param name="buffer_gain_string" type="string"/>
+ <Param name="buffer_gain_prefer_max_idx" type="int"/>
+
+ <Param name="spk_gain_level" type="int"/>
+ <Param name="spk_gain_db" type="short_array"/>
+ <Param name="spk_gain_idx" type="short_array"/>
+ <Param name="spk_gain_string" type="string"/>
+
+ <Param name="spk_l_mixer_name" type="string"/>
+ <Param name="spk_r_mixer_name" type="string"/>
+ <Param name="spk_analog_type" type="int"/>
+
+ <Param name="swagc_gain_map" type="short_array"/>
+ <Param name="ul_pga_gain_map" type="short_array"/>
+ <Param name="ul_pga_gain_string" type="string"/>
+ <Param name="ul_gain_offset" type="int"/>
+ <Param name="ul_pga_gain_map_max" type="int"/>
+ <Param name="ul_hw_pga_max_idx" type="int"/>
+
+ <Param name="stf_gain_map" type="short_array"/>
+
+ <Param name="hp_impedance_enable" type="int"/>
+ <Param name="hp_impedance_default_idx" type="int"/>
+ <Param name="hp_impedance_threshold_list" type="short_array"/>
+ <Param name="hp_impedance_compensate_list" type="short_array"/>
+ </ParamUnit>
+</ParamUnitDesc>
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/guicon.cpp b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/guicon.cpp
new file mode 100644
index 0000000..0f0d16e
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/guicon.cpp
@@ -0,0 +1,71 @@
+#include "AudioParamParserPriv.h"
+
+#ifdef WIN32
+#include <windows.h>
+#include <io.h>
+#include <iostream>
+#include <fstream>
+#include <fcntl.h>
+#include <stdio.h>
+
+#ifndef _USE_OLD_IOSTREAMS
+using namespace std;
+#endif
+
+#else
+#endif
+
+
+#ifndef WIN32
+
+EXPORT int isCustXmlEnable(void)
+{
+ return true;
+}
+
+#else /* WIN32 */
+
+// maximum mumber of lines the output console should have
+static const WORD MAX_CONSOLE_LINES = 500;
+
+/* For Tuning Tool show the debug message */
+EXPORT void redirectIOToConsole()
+{
+ int hConHandle;
+ long lStdHandle;
+
+ CONSOLE_SCREEN_BUFFER_INFO coninfo;
+ FILE *fp;
+
+ // allocate a console for this app
+ AllocConsole();
+
+ // set the screen buffer to be big enough to let us scroll text
+ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE),
+ &coninfo);
+ coninfo.dwSize.Y = MAX_CONSOLE_LINES;
+ SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize);
+
+ // redirect unbuffered STDOUT to the console
+ lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE);
+ hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+ fp = _fdopen(hConHandle, "w");
+ *stdout = *fp;
+ setvbuf(stdout, NULL, _IONBF, 0);
+
+ // redirect unbuffered STDIN to the console
+ lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
+ hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+ fp = _fdopen(hConHandle, "r");
+ *stdin = *fp;
+ setvbuf(stdin, NULL, _IONBF, 0);
+
+ // redirect unbuffered STDERR to the console
+ lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
+ hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+ fp = _fdopen(hConHandle, "w");
+ *stderr = *fp;
+ setvbuf(stderr, NULL, _IONBF, 0);
+ ios::sync_with_stdio();
+}
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/alps_utils/utils/Compat.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/alps_utils/utils/Compat.h
new file mode 100644
index 0000000..7d96310
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/alps_utils/utils/Compat.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __LIB_UTILS_COMPAT_H
+#define __LIB_UTILS_COMPAT_H
+
+#include <unistd.h>
+
+#if defined(__APPLE__)
+
+/* Mac OS has always had a 64-bit off_t, so it doesn't have off64_t. */
+
+typedef off_t off64_t;
+
+static inline off64_t lseek64(int fd, off64_t offset, int whence) {
+ return lseek(fd, offset, whence);
+}
+
+static inline ssize_t pread64(int fd, void* buf, size_t nbytes, off64_t offset) {
+ return pread(fd, buf, nbytes, offset);
+}
+
+#endif /* __APPLE__ */
+
+#if defined(_WIN32)
+#define O_CLOEXEC O_NOINHERIT
+#define O_NOFOLLOW 0
+#define DEFFILEMODE 0666
+#endif /* _WIN32 */
+
+#if defined(_WIN32)
+#define ZD "%ld"
+#define ZD_TYPE long
+#else
+#define ZD "%zd"
+#define ZD_TYPE ssize_t
+#endif
+
+/*
+ * Needed for cases where something should be constexpr if possible, but not
+ * being constexpr is fine if in pre-C++11 code (such as a const static float
+ * member variable).
+ */
+#if __cplusplus >= 201103L
+#define CONSTEXPR constexpr
+#else
+#define CONSTEXPR
+#endif
+
+/*
+ * TEMP_FAILURE_RETRY is defined by some, but not all, versions of
+ * <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
+ * not already defined, then define it here.
+ */
+#ifndef TEMP_FAILURE_RETRY
+/* Used to retry syscalls that can return EINTR. */
+#define TEMP_FAILURE_RETRY(exp) ({ \
+ typeof (exp) _rc; \
+ do { \
+ _rc = (exp); \
+ } while (_rc == -1 && errno == EINTR); \
+ _rc; })
+#endif
+
+#endif /* __LIB_UTILS_COMPAT_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/alps_utils/utils/Timers.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/alps_utils/utils/Timers.h
new file mode 100644
index 0000000..54ec474
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/alps_utils/utils/Timers.h
@@ -0,0 +1,108 @@
+/*
+ * Copyright (C) 2005 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// Timer functions.
+//
+#ifndef _LIBS_UTILS_TIMERS_H
+#define _LIBS_UTILS_TIMERS_H
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/time.h>
+
+#include <utils/Compat.h>
+
+// ------------------------------------------------------------------
+// C API
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef int64_t nsecs_t; // nano-seconds
+
+static CONSTEXPR inline nsecs_t seconds_to_nanoseconds(nsecs_t secs)
+{
+ return secs*1000000000;
+}
+
+static CONSTEXPR inline nsecs_t milliseconds_to_nanoseconds(nsecs_t secs)
+{
+ return secs*1000000;
+}
+
+static CONSTEXPR inline nsecs_t microseconds_to_nanoseconds(nsecs_t secs)
+{
+ return secs*1000;
+}
+
+static CONSTEXPR inline nsecs_t nanoseconds_to_seconds(nsecs_t secs)
+{
+ return secs/1000000000;
+}
+
+static CONSTEXPR inline nsecs_t nanoseconds_to_milliseconds(nsecs_t secs)
+{
+ return secs/1000000;
+}
+
+static CONSTEXPR inline nsecs_t nanoseconds_to_microseconds(nsecs_t secs)
+{
+ return secs/1000;
+}
+
+static CONSTEXPR inline nsecs_t s2ns(nsecs_t v) {return seconds_to_nanoseconds(v);}
+static CONSTEXPR inline nsecs_t ms2ns(nsecs_t v) {return milliseconds_to_nanoseconds(v);}
+static CONSTEXPR inline nsecs_t us2ns(nsecs_t v) {return microseconds_to_nanoseconds(v);}
+static CONSTEXPR inline nsecs_t ns2s(nsecs_t v) {return nanoseconds_to_seconds(v);}
+static CONSTEXPR inline nsecs_t ns2ms(nsecs_t v) {return nanoseconds_to_milliseconds(v);}
+static CONSTEXPR inline nsecs_t ns2us(nsecs_t v) {return nanoseconds_to_microseconds(v);}
+
+static CONSTEXPR inline nsecs_t seconds(nsecs_t v) { return s2ns(v); }
+static CONSTEXPR inline nsecs_t milliseconds(nsecs_t v) { return ms2ns(v); }
+static CONSTEXPR inline nsecs_t microseconds(nsecs_t v) { return us2ns(v); }
+
+enum {
+ SYSTEM_TIME_REALTIME = 0, // system-wide realtime clock
+ SYSTEM_TIME_MONOTONIC = 1, // monotonic time since unspecified starting point
+ SYSTEM_TIME_PROCESS = 2, // high-resolution per-process clock
+ SYSTEM_TIME_THREAD = 3, // high-resolution per-thread clock
+ SYSTEM_TIME_BOOTTIME = 4 // same as SYSTEM_TIME_MONOTONIC, but including CPU suspend time
+};
+
+// return the system-time according to the specified clock
+#ifdef __cplusplus
+nsecs_t systemTime(int clock = SYSTEM_TIME_MONOTONIC);
+#else
+nsecs_t systemTime(int clock);
+#endif // def __cplusplus
+
+/**
+ * Returns the number of milliseconds to wait between the reference time and the timeout time.
+ * If the timeout is in the past relative to the reference time, returns 0.
+ * If the timeout is more than INT_MAX milliseconds in the future relative to the reference time,
+ * such as when timeoutTime == LLONG_MAX, returns -1 to indicate an infinite timeout delay.
+ * Otherwise, returns the difference between the reference time and timeout time
+ * rounded up to the next millisecond.
+ */
+int toMillisecondTimeoutDelay(nsecs_t referenceTime, nsecs_t timeoutTime);
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _LIBS_UTILS_TIMERS_H
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/dev_string.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/dev_string.h
new file mode 100644
index 0000000..4b92b0f
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/dev_string.h
@@ -0,0 +1,8 @@
+#ifndef _DEV_STRING_H_
+#define _DEV_STRING_H_
+
+/* modem device name*/
+#define MODEM_DEV_NAME "hw:0,2"
+#define CARD_NAME "hw:0"
+
+#endif
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/iconv.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/iconv.h
new file mode 100644
index 0000000..d484fc8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/iconv.h
@@ -0,0 +1,134 @@
+/* Copyright (C) 1999-2003 Free Software Foundation, Inc.
+ This file is part of the GNU LIBICONV Library.
+
+ The GNU LIBICONV 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.
+
+ The GNU LIBICONV 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 the GNU LIBICONV Library; see the file COPYING.LIB.
+ If not, write to the Free Software Foundation, Inc., 59 Temple Place -
+ Suite 330, Boston, MA 02111-1307, USA. */
+
+/* When installed, this file is called "iconv.h". */
+
+#ifndef _LIBICONV_H
+#define _LIBICONV_H
+
+#define _LIBICONV_VERSION 0x0109 /* version number: (major<<8) + minor */
+extern int _libiconv_version; /* Likewise */
+
+/* We would like to #include any system header file which could define
+ iconv_t, 1. in order to eliminate the risk that the user gets compilation
+ errors because some other system header file includes /usr/include/iconv.h
+ which defines iconv_t or declares iconv after this file, 2. when compiling
+ for LIBICONV_PLUG, we need the proper iconv_t type in order to produce
+ binary compatible code.
+ But gcc's #include_next is not portable. Thus, once libiconv's iconv.h
+ has been installed in /usr/local/include, there is no way any more to
+ include the original /usr/include/iconv.h. We simply have to get away
+ without it.
+ Ad 1. The risk that a system header file does
+ #include "iconv.h" or #include_next "iconv.h"
+ is small. They all do #include <iconv.h>.
+ Ad 2. The iconv_t type is a pointer type in all cases I have seen. (It
+ has to be a scalar type because (iconv_t)(-1) is a possible return value
+ from iconv_open().) */
+
+/* Define iconv_t ourselves. */
+#undef iconv_t
+#define iconv_t libiconv_t
+typedef void* iconv_t;
+
+/* Get size_t declaration. */
+#include <stddef.h>
+
+/* Get errno declaration and values. */
+#include <errno.h>
+/* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
+ have EILSEQ in a different header. On these systems, define EILSEQ
+ ourselves. */
+#ifndef EILSEQ
+/* Igor: called upon EILSEQ from glibc, since autogeneration of this header
+ on Windows didn't do the job. */
+/* #define EILSEQ @EILSEQ@ */
+#define EILSEQ 84
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Allocates descriptor for code conversion from encoding `fromcode' to
+ encoding `tocode'. */
+#ifndef LIBICONV_PLUG
+#define iconv_open libiconv_open
+#endif
+extern iconv_t iconv_open (const char* tocode, const char* fromcode);
+
+/* Converts, using conversion descriptor `cd', at most `*inbytesleft' bytes
+ starting at `*inbuf', writing at most `*outbytesleft' bytes starting at
+ `*outbuf'.
+ Decrements `*inbytesleft' and increments `*inbuf' by the same amount.
+ Decrements `*outbytesleft' and increments `*outbuf' by the same amount. */
+#ifndef LIBICONV_PLUG
+#define iconv libiconv
+#endif
+extern size_t iconv (iconv_t cd, const char* * inbuf, size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
+
+/* Frees resources allocated for conversion descriptor `cd'. */
+#ifndef LIBICONV_PLUG
+#define iconv_close libiconv_close
+#endif
+extern int iconv_close (iconv_t cd);
+
+
+#ifndef LIBICONV_PLUG
+
+/* Nonstandard extensions. */
+
+/* Control of attributes. */
+#define iconvctl libiconvctl
+extern int iconvctl (iconv_t cd, int request, void* argument);
+
+/* Requests for iconvctl. */
+#define ICONV_TRIVIALP 0 /* int *argument */
+#define ICONV_GET_TRANSLITERATE 1 /* int *argument */
+#define ICONV_SET_TRANSLITERATE 2 /* const int *argument */
+#define ICONV_GET_DISCARD_ILSEQ 3 /* int *argument */
+#define ICONV_SET_DISCARD_ILSEQ 4 /* const int *argument */
+
+/* Listing of locale independent encodings. */
+#define iconvlist libiconvlist
+extern void iconvlist (int (*do_one) (unsigned int namescount,
+ const char * const * names,
+ void* data),
+ void* data);
+
+/* Support for relocatable packages. */
+
+/* Sets the original and the current installation prefix of the package.
+ Relocation simply replaces a pathname starting with the original prefix
+ by the corresponding pathname with the current prefix instead. Both
+ prefixes should be directory names without trailing slash (i.e. use ""
+ instead of "/"). */
+extern void libiconv_set_relocation_prefix (const char *orig_prefix,
+ const char *curr_prefix);
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LIBICONV_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/DOCBparser.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/DOCBparser.h
new file mode 100644
index 0000000..9394fa7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/DOCBparser.h
@@ -0,0 +1,96 @@
+/*
+ * Summary: old DocBook SGML parser
+ * Description: interface for a DocBook SGML non-verifying parser
+ * This code is DEPRECATED, and should not be used anymore.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DOCB_PARSER_H__
+#define __DOCB_PARSER_H__
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_DOCB_ENABLED
+
+#include <libxml/parser.h>
+#include <libxml/parserInternals.h>
+
+#ifndef IN_LIBXML
+#ifdef __GNUC__
+#warning "The DOCBparser module has been deprecated in libxml2-2.6.0"
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Most of the back-end structures from XML and SGML are shared.
+ */
+typedef xmlParserCtxt docbParserCtxt;
+typedef xmlParserCtxtPtr docbParserCtxtPtr;
+typedef xmlSAXHandler docbSAXHandler;
+typedef xmlSAXHandlerPtr docbSAXHandlerPtr;
+typedef xmlParserInput docbParserInput;
+typedef xmlParserInputPtr docbParserInputPtr;
+typedef xmlDocPtr docbDocPtr;
+
+/*
+ * There is only few public functions.
+ */
+XMLPUBFUN int XMLCALL
+ docbEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+
+XMLPUBFUN docbDocPtr XMLCALL
+ docbSAXParseDoc (xmlChar *cur,
+ const char *encoding,
+ docbSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbParseDoc (xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbSAXParseFile (const char *filename,
+ const char *encoding,
+ docbSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN docbDocPtr XMLCALL
+ docbParseFile (const char *filename,
+ const char *encoding);
+
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN void XMLCALL
+ docbFreeParserCtxt (docbParserCtxtPtr ctxt);
+XMLPUBFUN docbParserCtxtPtr XMLCALL
+ docbCreatePushParserCtxt(docbSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ docbParseChunk (docbParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+XMLPUBFUN docbParserCtxtPtr XMLCALL
+ docbCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ docbParseDocument (docbParserCtxtPtr ctxt);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DOCB_ENABLED */
+
+#endif /* __DOCB_PARSER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/HTMLparser.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/HTMLparser.h
new file mode 100644
index 0000000..625969d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/HTMLparser.h
@@ -0,0 +1,305 @@
+/*
+ * Summary: interface for an HTML 4.0 non-verifying parser
+ * Description: this module implements an HTML 4.0 non-verifying parser
+ * with API compatible with the XML parser ones. It should
+ * be able to parse "real world" HTML, even if severely
+ * broken from a specification point of view.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_PARSER_H__
+#define __HTML_PARSER_H__
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Most of the back-end structures from XML and HTML are shared.
+ */
+typedef xmlParserCtxt htmlParserCtxt;
+typedef xmlParserCtxtPtr htmlParserCtxtPtr;
+typedef xmlParserNodeInfo htmlParserNodeInfo;
+typedef xmlSAXHandler htmlSAXHandler;
+typedef xmlSAXHandlerPtr htmlSAXHandlerPtr;
+typedef xmlParserInput htmlParserInput;
+typedef xmlParserInputPtr htmlParserInputPtr;
+typedef xmlDocPtr htmlDocPtr;
+typedef xmlNodePtr htmlNodePtr;
+
+/*
+ * Internal description of an HTML element, representing HTML 4.01
+ * and XHTML 1.0 (which share the same structure).
+ */
+typedef struct _htmlElemDesc htmlElemDesc;
+typedef htmlElemDesc *htmlElemDescPtr;
+struct _htmlElemDesc {
+ const char *name; /* The tag name */
+ char startTag; /* Whether the start tag can be implied */
+ char endTag; /* Whether the end tag can be implied */
+ char saveEndTag; /* Whether the end tag should be saved */
+ char empty; /* Is this an empty element ? */
+ char depr; /* Is this a deprecated element ? */
+ char dtd; /* 1: only in Loose DTD, 2: only Frameset one */
+ char isinline; /* is this a block 0 or inline 1 element */
+ const char *desc; /* the description */
+
+/* NRK Jan.2003
+ * New fields encapsulating HTML structure
+ *
+ * Bugs:
+ * This is a very limited representation. It fails to tell us when
+ * an element *requires* subelements (we only have whether they're
+ * allowed or not), and it doesn't tell us where CDATA and PCDATA
+ * are allowed. Some element relationships are not fully represented:
+ * these are flagged with the word MODIFIER
+ */
+ const char** subelts; /* allowed sub-elements of this element */
+ const char* defaultsubelt; /* subelement for suggested auto-repair
+ if necessary or NULL */
+ const char** attrs_opt; /* Optional Attributes */
+ const char** attrs_depr; /* Additional deprecated attributes */
+ const char** attrs_req; /* Required attributes */
+};
+
+/*
+ * Internal description of an HTML entity.
+ */
+typedef struct _htmlEntityDesc htmlEntityDesc;
+typedef htmlEntityDesc *htmlEntityDescPtr;
+struct _htmlEntityDesc {
+ unsigned int value; /* the UNICODE value for the character */
+ const char *name; /* The entity name */
+ const char *desc; /* the description */
+};
+
+/*
+ * There is only few public functions.
+ */
+XMLPUBFUN const htmlElemDesc * XMLCALL
+ htmlTagLookup (const xmlChar *tag);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlEntityLookup(const xmlChar *name);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlEntityValueLookup(unsigned int value);
+
+XMLPUBFUN int XMLCALL
+ htmlIsAutoClosed(htmlDocPtr doc,
+ htmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ htmlAutoCloseTag(htmlDocPtr doc,
+ const xmlChar *name,
+ htmlNodePtr elem);
+XMLPUBFUN const htmlEntityDesc * XMLCALL
+ htmlParseEntityRef(htmlParserCtxtPtr ctxt,
+ const xmlChar **str);
+XMLPUBFUN int XMLCALL
+ htmlParseCharRef(htmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ htmlParseElement(htmlParserCtxtPtr ctxt);
+
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlNewParserCtxt(void);
+
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+
+XMLPUBFUN int XMLCALL
+ htmlParseDocument(htmlParserCtxtPtr ctxt);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlSAXParseDoc (xmlChar *cur,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlParseDoc (xmlChar *cur,
+ const char *encoding);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlSAXParseFile(const char *filename,
+ const char *encoding,
+ htmlSAXHandlerPtr sax,
+ void *userData);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlParseFile (const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ UTF8ToHtml (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+XMLPUBFUN int XMLCALL
+ htmlEncodeEntities(unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen, int quoteChar);
+XMLPUBFUN int XMLCALL
+ htmlIsScriptAttribute(const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ htmlHandleOmittedElem(int val);
+
+#ifdef LIBXML_PUSH_ENABLED
+/**
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN htmlParserCtxtPtr XMLCALL
+ htmlCreatePushParserCtxt(htmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ htmlParseChunk (htmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+XMLPUBFUN void XMLCALL
+ htmlFreeParserCtxt (htmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ HTML_PARSE_RECOVER = 1<<0, /* Relaxed parsing */
+ HTML_PARSE_NODEFDTD = 1<<2, /* do not default a doctype if not found */
+ HTML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ HTML_PARSE_NOWARNING= 1<<6, /* suppress warning reports */
+ HTML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ HTML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ HTML_PARSE_NONET = 1<<11,/* Forbid network access */
+ HTML_PARSE_NOIMPLIED= 1<<13,/* Do not add implied html/body... elements */
+ HTML_PARSE_COMPACT = 1<<16 /* compact small text nodes */
+} htmlParserOption;
+
+XMLPUBFUN void XMLCALL
+ htmlCtxtReset (htmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ htmlCtxtUseOptions (htmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/* NRK/Jan2003: further knowledge of HTML structure
+ */
+typedef enum {
+ HTML_NA = 0 , /* something we don't check at all */
+ HTML_INVALID = 0x1 ,
+ HTML_DEPRECATED = 0x2 ,
+ HTML_VALID = 0x4 ,
+ HTML_REQUIRED = 0xc /* VALID bit set so ( & HTML_VALID ) is TRUE */
+} htmlStatus ;
+
+/* Using htmlElemDesc rather than name here, to emphasise the fact
+ that otherwise there's a lookup overhead
+*/
+XMLPUBFUN htmlStatus XMLCALL htmlAttrAllowed(const htmlElemDesc*, const xmlChar*, int) ;
+XMLPUBFUN int XMLCALL htmlElementAllowedHere(const htmlElemDesc*, const xmlChar*) ;
+XMLPUBFUN htmlStatus XMLCALL htmlElementStatusHere(const htmlElemDesc*, const htmlElemDesc*) ;
+XMLPUBFUN htmlStatus XMLCALL htmlNodeStatus(const htmlNodePtr, int) ;
+/**
+ * htmlDefaultSubelement:
+ * @elt: HTML element
+ *
+ * Returns the default subelement for this element
+ */
+#define htmlDefaultSubelement(elt) elt->defaultsubelt
+/**
+ * htmlElementAllowedHereDesc:
+ * @parent: HTML parent element
+ * @elt: HTML element
+ *
+ * Checks whether an HTML element description may be a
+ * direct child of the specified element.
+ *
+ * Returns 1 if allowed; 0 otherwise.
+ */
+#define htmlElementAllowedHereDesc(parent,elt) \
+ htmlElementAllowedHere((parent), (elt)->name)
+/**
+ * htmlRequiredAttrs:
+ * @elt: HTML element
+ *
+ * Returns the attributes required for the specified element.
+ */
+#define htmlRequiredAttrs(elt) (elt)->attrs_req
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+#endif /* __HTML_PARSER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/HTMLtree.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/HTMLtree.h
new file mode 100644
index 0000000..c0e1103
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/HTMLtree.h
@@ -0,0 +1,147 @@
+/*
+ * Summary: specific APIs to process HTML tree, especially serialization
+ * Description: this module implements a few function needed to process
+ * tree in an HTML specific way.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __HTML_TREE_H__
+#define __HTML_TREE_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/HTMLparser.h>
+
+#ifdef LIBXML_HTML_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/**
+ * HTML_TEXT_NODE:
+ *
+ * Macro. A text node in a HTML document is really implemented
+ * the same way as a text node in an XML document.
+ */
+#define HTML_TEXT_NODE XML_TEXT_NODE
+/**
+ * HTML_ENTITY_REF_NODE:
+ *
+ * Macro. An entity reference in a HTML document is really implemented
+ * the same way as an entity reference in an XML document.
+ */
+#define HTML_ENTITY_REF_NODE XML_ENTITY_REF_NODE
+/**
+ * HTML_COMMENT_NODE:
+ *
+ * Macro. A comment in a HTML document is really implemented
+ * the same way as a comment in an XML document.
+ */
+#define HTML_COMMENT_NODE XML_COMMENT_NODE
+/**
+ * HTML_PRESERVE_NODE:
+ *
+ * Macro. A preserved node in a HTML document is really implemented
+ * the same way as a CDATA section in an XML document.
+ */
+#define HTML_PRESERVE_NODE XML_CDATA_SECTION_NODE
+/**
+ * HTML_PI_NODE:
+ *
+ * Macro. A processing instruction in a HTML document is really implemented
+ * the same way as a processing instruction in an XML document.
+ */
+#define HTML_PI_NODE XML_PI_NODE
+
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlNewDoc (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN htmlDocPtr XMLCALL
+ htmlNewDocNoDtD (const xmlChar *URI,
+ const xmlChar *ExternalID);
+XMLPUBFUN const xmlChar * XMLCALL
+ htmlGetMetaEncoding (htmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ htmlSetMetaEncoding (htmlDocPtr doc,
+ const xmlChar *encoding);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ htmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void XMLCALL
+ htmlDocDumpMemoryFormat (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN int XMLCALL
+ htmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ htmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ htmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpFile (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ htmlNodeDumpFileFormat (FILE *out,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN int XMLCALL
+ htmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ htmlSaveFileFormat (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ htmlDocContentDumpOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN void XMLCALL
+ htmlDocContentDumpFormatOutput(xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ htmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ htmlIsBooleanAttr (const xmlChar *name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTML_ENABLED */
+
+#endif /* __HTML_TREE_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/SAX.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/SAX.h
new file mode 100644
index 0000000..20093ce
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/SAX.h
@@ -0,0 +1,173 @@
+/*
+ * Summary: Old SAX version 1 handler, deprecated
+ * Description: DEPRECATED set of SAX version 1 interfaces used to
+ * build the DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX_H__
+#define __XML_SAX_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xlink.h>
+
+#ifdef LIBXML_LEGACY_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ getPublicId (void *ctx);
+XMLPUBFUN const xmlChar * XMLCALL
+ getSystemId (void *ctx);
+XMLPUBFUN void XMLCALL
+ setDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int XMLCALL
+ getLineNumber (void *ctx);
+XMLPUBFUN int XMLCALL
+ getColumnNumber (void *ctx);
+
+XMLPUBFUN int XMLCALL
+ isStandalone (void *ctx);
+XMLPUBFUN int XMLCALL
+ hasInternalSubset (void *ctx);
+XMLPUBFUN int XMLCALL
+ hasExternalSubset (void *ctx);
+
+XMLPUBFUN void XMLCALL
+ internalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void XMLCALL
+ externalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ getEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ getParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ resolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void XMLCALL
+ entityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void XMLCALL
+ attributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void XMLCALL
+ elementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ notationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void XMLCALL
+ unparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void XMLCALL
+ startDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ endDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ attribute (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ startElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XMLPUBFUN void XMLCALL
+ endElement (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ ignorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ processingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void XMLCALL
+ globalNamespace (void *ctx,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ setNamespace (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlNsPtr XMLCALL
+ getNamespace (void *ctx);
+XMLPUBFUN int XMLCALL
+ checkNamespace (void *ctx,
+ xmlChar *nameSpace);
+XMLPUBFUN void XMLCALL
+ namespaceDecl (void *ctx,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ cdataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN void XMLCALL
+ initxmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void XMLCALL
+ inithtmlDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN void XMLCALL
+ initdocbDefaultSAXHandler (xmlSAXHandlerV1 *hdlr);
+#endif
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#endif /* __XML_SAX_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/SAX2.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/SAX2.h
new file mode 100644
index 0000000..daafd17
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/SAX2.h
@@ -0,0 +1,176 @@
+/*
+ * Summary: SAX2 parser interface used to build the DOM tree
+ * Description: those are the default SAX2 interfaces used by
+ * the library when building DOM tree.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SAX2_H__
+#define __XML_SAX2_H__
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xlink.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSAX2GetPublicId (void *ctx);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSAX2GetSystemId (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSAX2SetDocumentLocator (void *ctx,
+ xmlSAXLocatorPtr loc);
+
+XMLPUBFUN int XMLCALL
+ xmlSAX2GetLineNumber (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2GetColumnNumber (void *ctx);
+
+XMLPUBFUN int XMLCALL
+ xmlSAX2IsStandalone (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2HasInternalSubset (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSAX2HasExternalSubset (void *ctx);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2InternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ExternalSubset (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlSAX2GetEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlSAX2GetParameterEntity (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlSAX2ResolveEntity (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2EntityDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+XMLPUBFUN void XMLCALL
+ xmlSAX2AttributeDecl (void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ElementDecl (void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlSAX2NotationDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+XMLPUBFUN void XMLCALL
+ xmlSAX2UnparsedEntityDecl (void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartDocument (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndDocument (void *ctx);
+#if defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartElement (void *ctx,
+ const xmlChar *fullname,
+ const xmlChar **atts);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndElement (void *ctx,
+ const xmlChar *name);
+#endif /* LIBXML_SAX1_ENABLED or LIBXML_HTML_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlSAX2StartElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+XMLPUBFUN void XMLCALL
+ xmlSAX2EndElementNs (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Reference (void *ctx,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Characters (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlSAX2IgnorableWhitespace (void *ctx,
+ const xmlChar *ch,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlSAX2ProcessingInstruction (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+XMLPUBFUN void XMLCALL
+ xmlSAX2Comment (void *ctx,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlSAX2CDataBlock (void *ctx,
+ const xmlChar *value,
+ int len);
+
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlSAXDefaultVersion (int version);
+#endif /* LIBXML_SAX1_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ xmlSAXVersion (xmlSAXHandler *hdlr,
+ int version);
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitDefaultSAXHandler (xmlSAXHandler *hdlr,
+ int warning);
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitHtmlDefaultSAXHandler(xmlSAXHandler *hdlr);
+XMLPUBFUN void XMLCALL
+ htmlDefaultSAXHandlerInit (void);
+#endif
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSAX2InitDocbDefaultSAXHandler(xmlSAXHandler *hdlr);
+XMLPUBFUN void XMLCALL
+ docbDefaultSAXHandlerInit (void);
+#endif
+XMLPUBFUN void XMLCALL
+ xmlDefaultSAXHandlerInit (void);
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_SAX2_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/c14n.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/c14n.h
new file mode 100644
index 0000000..b8971d9
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/c14n.h
@@ -0,0 +1,126 @@
+/*
+ * Summary: Provide Canonical XML and Exclusive XML Canonicalization
+ * Description: the c14n modules provides a
+ *
+ * "Canonical XML" implementation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * and an
+ *
+ * "Exclusive XML Canonicalization" implementation
+ * http://www.w3.org/TR/xml-exc-c14n
+
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Aleksey Sanin <aleksey@aleksey.com>
+ */
+#ifndef __XML_C14N_H__
+#define __XML_C14N_H__
+#ifdef LIBXML_C14N_ENABLED
+#ifdef LIBXML_OUTPUT_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+/*
+ * XML Canonicazation
+ * http://www.w3.org/TR/xml-c14n
+ *
+ * Exclusive XML Canonicazation
+ * http://www.w3.org/TR/xml-exc-c14n
+ *
+ * Canonical form of an XML document could be created if and only if
+ * a) default attributes (if any) are added to all nodes
+ * b) all character and parsed entity references are resolved
+ * In order to achive this in libxml2 the document MUST be loaded with
+ * following global setings:
+ *
+ * xmlLoadExtDtdDefaultValue = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ * xmlSubstituteEntitiesDefault(1);
+ *
+ * or corresponding parser context setting:
+ * xmlParserCtxtPtr ctxt;
+ *
+ * ...
+ * ctxt->loadsubset = XML_DETECT_IDS | XML_COMPLETE_ATTRS;
+ * ctxt->replaceEntities = 1;
+ * ...
+ */
+
+/*
+ * xmlC14NMode:
+ *
+ * Predefined values for C14N modes
+ *
+ */
+typedef enum {
+ XML_C14N_1_0 = 0, /* Origianal C14N 1.0 spec */
+ XML_C14N_EXCLUSIVE_1_0 = 1, /* Exclusive C14N 1.0 spec */
+ XML_C14N_1_1 = 2 /* C14N 1.1 spec */
+} xmlC14NMode;
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocSaveTo (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocDumpMemory (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlChar **doc_txt_ptr);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NDocSave (xmlDocPtr doc,
+ xmlNodeSetPtr nodes,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ const char* filename,
+ int compression);
+
+
+/**
+ * This is the core C14N function
+ */
+/**
+ * xmlC14NIsVisibleCallback:
+ * @user_data: user data
+ * @node: the curent node
+ * @parent: the parent node
+ *
+ * Signature for a C14N callback on visible nodes
+ *
+ * Returns 1 if the node should be included
+ */
+typedef int (*xmlC14NIsVisibleCallback) (void* user_data,
+ xmlNodePtr node,
+ xmlNodePtr parent);
+
+XMLPUBFUN int XMLCALL
+ xmlC14NExecute (xmlDocPtr doc,
+ xmlC14NIsVisibleCallback is_visible_callback,
+ void* user_data,
+ int mode, /* a xmlC14NMode */
+ xmlChar **inclusive_ns_prefixes,
+ int with_comments,
+ xmlOutputBufferPtr buf);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* LIBXML_C14N_ENABLED */
+#endif /* __XML_C14N_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/catalog.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/catalog.h
new file mode 100644
index 0000000..5a13f51
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/catalog.h
@@ -0,0 +1,182 @@
+/**
+ * Summary: interfaces to the Catalog handling system
+ * Description: the catalog module implements the support for
+ * XML Catalogs and SGML catalogs
+ *
+ * SGML Open Technical Resolution TR9401:1997.
+ * http://www.jclark.com/sp/catalog.htm
+ *
+ * XML Catalogs Working Draft 06 August 2001
+ * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CATALOG_H__
+#define __XML_CATALOG_H__
+
+#include <stdio.h>
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_CATALOG_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_CATALOGS_NAMESPACE:
+ *
+ * The namespace for the XML Catalogs elements.
+ */
+#define XML_CATALOGS_NAMESPACE \
+ (const xmlChar *) "urn:oasis:names:tc:entity:xmlns:xml:catalog"
+/**
+ * XML_CATALOG_PI:
+ *
+ * The specific XML Catalog Processing Instuction name.
+ */
+#define XML_CATALOG_PI \
+ (const xmlChar *) "oasis-xml-catalog"
+
+/*
+ * The API is voluntarily limited to general cataloging.
+ */
+typedef enum {
+ XML_CATA_PREFER_NONE = 0,
+ XML_CATA_PREFER_PUBLIC = 1,
+ XML_CATA_PREFER_SYSTEM
+} xmlCatalogPrefer;
+
+typedef enum {
+ XML_CATA_ALLOW_NONE = 0,
+ XML_CATA_ALLOW_GLOBAL = 1,
+ XML_CATA_ALLOW_DOCUMENT = 2,
+ XML_CATA_ALLOW_ALL = 3
+} xmlCatalogAllow;
+
+typedef struct _xmlCatalog xmlCatalog;
+typedef xmlCatalog *xmlCatalogPtr;
+
+/*
+ * Operations on a given catalog.
+ */
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlNewCatalog (int sgml);
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlLoadACatalog (const char *filename);
+XMLPUBFUN xmlCatalogPtr XMLCALL
+ xmlLoadSGMLSuperCatalog (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlConvertSGMLCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int XMLCALL
+ xmlACatalogAdd (xmlCatalogPtr catal,
+ const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int XMLCALL
+ xmlACatalogRemove (xmlCatalogPtr catal,
+ const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolve (xmlCatalogPtr catal,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolveSystem(xmlCatalogPtr catal,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolvePublic(xmlCatalogPtr catal,
+ const xmlChar *pubID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlACatalogResolveURI (xmlCatalogPtr catal,
+ const xmlChar *URI);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlACatalogDump (xmlCatalogPtr catal,
+ FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeCatalog (xmlCatalogPtr catal);
+XMLPUBFUN int XMLCALL
+ xmlCatalogIsEmpty (xmlCatalogPtr catal);
+
+/*
+ * Global operations.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitializeCatalog (void);
+XMLPUBFUN int XMLCALL
+ xmlLoadCatalog (const char *filename);
+XMLPUBFUN void XMLCALL
+ xmlLoadCatalogs (const char *paths);
+XMLPUBFUN void XMLCALL
+ xmlCatalogCleanup (void);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlCatalogDump (FILE *out);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolve (const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolveSystem (const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolvePublic (const xmlChar *pubID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogResolveURI (const xmlChar *URI);
+XMLPUBFUN int XMLCALL
+ xmlCatalogAdd (const xmlChar *type,
+ const xmlChar *orig,
+ const xmlChar *replace);
+XMLPUBFUN int XMLCALL
+ xmlCatalogRemove (const xmlChar *value);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseCatalogFile (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlCatalogConvert (void);
+
+/*
+ * Strictly minimal interfaces for per-document catalogs used
+ * by the parser.
+ */
+XMLPUBFUN void XMLCALL
+ xmlCatalogFreeLocal (void *catalogs);
+XMLPUBFUN void * XMLCALL
+ xmlCatalogAddLocal (void *catalogs,
+ const xmlChar *URL);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogLocalResolve (void *catalogs,
+ const xmlChar *pubID,
+ const xmlChar *sysID);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCatalogLocalResolveURI(void *catalogs,
+ const xmlChar *URI);
+/*
+ * Preference settings.
+ */
+XMLPUBFUN int XMLCALL
+ xmlCatalogSetDebug (int level);
+XMLPUBFUN xmlCatalogPrefer XMLCALL
+ xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer);
+XMLPUBFUN void XMLCALL
+ xmlCatalogSetDefaults (xmlCatalogAllow allow);
+XMLPUBFUN xmlCatalogAllow XMLCALL
+ xmlCatalogGetDefaults (void);
+
+
+/* DEPRECATED interfaces */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlCatalogGetSystem (const xmlChar *sysID);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlCatalogGetPublic (const xmlChar *pubID);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_CATALOG_ENABLED */
+#endif /* __XML_CATALOG_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/chvalid.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/chvalid.h
new file mode 100644
index 0000000..fb43016
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/chvalid.h
@@ -0,0 +1,230 @@
+/*
+ * Summary: Unicode character range checking
+ * Description: this module exports interfaces for the character
+ * range validation APIs
+ *
+ * This file is automatically generated from the cvs source
+ * definition files using the genChRanges.py Python script
+ *
+ * Generation date: Mon Mar 27 11:09:48 2006
+ * Sources: chvalid.def
+ * Author: William Brack <wbrack@mmm.com.hk>
+ */
+
+#ifndef __XML_CHVALID_H__
+#define __XML_CHVALID_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Define our typedefs and structures
+ *
+ */
+typedef struct _xmlChSRange xmlChSRange;
+typedef xmlChSRange *xmlChSRangePtr;
+struct _xmlChSRange {
+ unsigned short low;
+ unsigned short high;
+};
+
+typedef struct _xmlChLRange xmlChLRange;
+typedef xmlChLRange *xmlChLRangePtr;
+struct _xmlChLRange {
+ unsigned int low;
+ unsigned int high;
+};
+
+typedef struct _xmlChRangeGroup xmlChRangeGroup;
+typedef xmlChRangeGroup *xmlChRangeGroupPtr;
+struct _xmlChRangeGroup {
+ int nbShortRange;
+ int nbLongRange;
+ const xmlChSRange *shortRange; /* points to an array of ranges */
+ const xmlChLRange *longRange;
+};
+
+/**
+ * Range checking routine
+ */
+XMLPUBFUN int XMLCALL
+ xmlCharInRange(unsigned int val, const xmlChRangeGroup *group);
+
+
+/**
+ * xmlIsBaseChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseChar_ch(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)) || \
+ ((0xc0 <= (c)) && ((c) <= 0xd6)) || \
+ ((0xd8 <= (c)) && ((c) <= 0xf6)) || \
+ (0xf8 <= (c)))
+
+/**
+ * xmlIsBaseCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBaseCharQ(c) (((c) < 0x100) ? \
+ xmlIsBaseChar_ch((c)) : \
+ xmlCharInRange((c), &xmlIsBaseCharGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsBaseCharGroup;
+
+/**
+ * xmlIsBlank_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlank_ch(c) (((c) == 0x20) || \
+ ((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd))
+
+/**
+ * xmlIsBlankQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsBlankQ(c) (((c) < 0x100) ? \
+ xmlIsBlank_ch((c)) : 0)
+
+
+/**
+ * xmlIsChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsChar_ch(c) (((0x9 <= (c)) && ((c) <= 0xa)) || \
+ ((c) == 0xd) || \
+ (0x20 <= (c)))
+
+/**
+ * xmlIsCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCharQ(c) (((c) < 0x100) ? \
+ xmlIsChar_ch((c)) :\
+ (((0x100 <= (c)) && ((c) <= 0xd7ff)) || \
+ ((0xe000 <= (c)) && ((c) <= 0xfffd)) || \
+ ((0x10000 <= (c)) && ((c) <= 0x10ffff))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCharGroup;
+
+/**
+ * xmlIsCombiningQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsCombiningQ(c) (((c) < 0x100) ? \
+ 0 : \
+ xmlCharInRange((c), &xmlIsCombiningGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsCombiningGroup;
+
+/**
+ * xmlIsDigit_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigit_ch(c) (((0x30 <= (c)) && ((c) <= 0x39)))
+
+/**
+ * xmlIsDigitQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsDigitQ(c) (((c) < 0x100) ? \
+ xmlIsDigit_ch((c)) : \
+ xmlCharInRange((c), &xmlIsDigitGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsDigitGroup;
+
+/**
+ * xmlIsExtender_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtender_ch(c) (((c) == 0xb7))
+
+/**
+ * xmlIsExtenderQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsExtenderQ(c) (((c) < 0x100) ? \
+ xmlIsExtender_ch((c)) : \
+ xmlCharInRange((c), &xmlIsExtenderGroup))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsExtenderGroup;
+
+/**
+ * xmlIsIdeographicQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsIdeographicQ(c) (((c) < 0x100) ? \
+ 0 :\
+ (((0x4e00 <= (c)) && ((c) <= 0x9fa5)) || \
+ ((c) == 0x3007) || \
+ ((0x3021 <= (c)) && ((c) <= 0x3029))))
+
+XMLPUBVAR const xmlChRangeGroup xmlIsIdeographicGroup;
+XMLPUBVAR const unsigned char xmlIsPubidChar_tab[256];
+
+/**
+ * xmlIsPubidChar_ch:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidChar_ch(c) (xmlIsPubidChar_tab[(c)])
+
+/**
+ * xmlIsPubidCharQ:
+ * @c: char to validate
+ *
+ * Automatically generated by genChRanges.py
+ */
+#define xmlIsPubidCharQ(c) (((c) < 0x100) ? \
+ xmlIsPubidChar_ch((c)) : 0)
+
+XMLPUBFUN int XMLCALL
+ xmlIsBaseChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsBlank(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsChar(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsCombining(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsDigit(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsExtender(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsIdeographic(unsigned int ch);
+XMLPUBFUN int XMLCALL
+ xmlIsPubidChar(unsigned int ch);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_CHVALID_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/debugXML.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/debugXML.h
new file mode 100644
index 0000000..2377447
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/debugXML.h
@@ -0,0 +1,217 @@
+/*
+ * Summary: Tree debugging APIs
+ * Description: Interfaces to a set of routines used for debugging the tree
+ * produced by the XML parser.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __DEBUG_XML__
+#define __DEBUG_XML__
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_DEBUG_ENABLED
+
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The standard Dump routines.
+ */
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpString (FILE *output,
+ const xmlChar *str);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpAttr (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpAttrList (FILE *output,
+ xmlAttrPtr attr,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpOneNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpNode (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpNodeList (FILE *output,
+ xmlNodePtr node,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDocumentHead(FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDocument (FILE *output,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpDTD (FILE *output,
+ xmlDtdPtr dtd);
+XMLPUBFUN void XMLCALL
+ xmlDebugDumpEntities (FILE *output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * Checking routines *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN int XMLCALL
+ xmlDebugCheckDocument (FILE * output,
+ xmlDocPtr doc);
+
+/****************************************************************
+ * *
+ * XML shell helpers *
+ * *
+ ****************************************************************/
+
+XMLPUBFUN void XMLCALL
+ xmlLsOneNode (FILE *output, xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlLsCountNode (xmlNodePtr node);
+
+XMLPUBFUN const char * XMLCALL
+ xmlBoolToText (int boolval);
+
+/****************************************************************
+ * *
+ * The XML shell related structures and functions *
+ * *
+ ****************************************************************/
+
+#ifdef LIBXML_XPATH_ENABLED
+/**
+ * xmlShellReadlineFunc:
+ * @prompt: a string prompt
+ *
+ * This is a generic signature for the XML shell input function.
+ *
+ * Returns a string which will be freed by the Shell.
+ */
+typedef char * (* xmlShellReadlineFunc)(char *prompt);
+
+/**
+ * xmlShellCtxt:
+ *
+ * A debugging shell context.
+ * TODO: add the defined function tables.
+ */
+typedef struct _xmlShellCtxt xmlShellCtxt;
+typedef xmlShellCtxt *xmlShellCtxtPtr;
+struct _xmlShellCtxt {
+ char *filename;
+ xmlDocPtr doc;
+ xmlNodePtr node;
+ xmlXPathContextPtr pctxt;
+ int loaded;
+ FILE *output;
+ xmlShellReadlineFunc input;
+};
+
+/**
+ * xmlShellCmd:
+ * @ctxt: a shell context
+ * @arg: a string argument
+ * @node: a first node
+ * @node2: a second node
+ *
+ * This is a generic signature for the XML shell functions.
+ *
+ * Returns an int, negative returns indicating errors.
+ */
+typedef int (* xmlShellCmd) (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+
+XMLPUBFUN void XMLCALL
+ xmlShellPrintXPathError (int errorType,
+ const char *arg);
+XMLPUBFUN void XMLCALL
+ xmlShellPrintXPathResult(xmlXPathObjectPtr list);
+XMLPUBFUN int XMLCALL
+ xmlShellList (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellBase (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellDir (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellLoad (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlShellPrintNode (xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlShellCat (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellWrite (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellSave (xmlShellCtxtPtr ctxt,
+ char *filename,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlShellValidate (xmlShellCtxtPtr ctxt,
+ char *dtd,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+#endif /* LIBXML_VALID_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlShellDu (xmlShellCtxtPtr ctxt,
+ char *arg,
+ xmlNodePtr tree,
+ xmlNodePtr node2);
+XMLPUBFUN int XMLCALL
+ xmlShellPwd (xmlShellCtxtPtr ctxt,
+ char *buffer,
+ xmlNodePtr node,
+ xmlNodePtr node2);
+
+/*
+ * The Shell interface.
+ */
+XMLPUBFUN void XMLCALL
+ xmlShell (xmlDocPtr doc,
+ char *filename,
+ xmlShellReadlineFunc input,
+ FILE *output);
+
+#endif /* LIBXML_XPATH_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_DEBUG_ENABLED */
+#endif /* __DEBUG_XML__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/dict.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/dict.h
new file mode 100644
index 0000000..492d65a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/dict.h
@@ -0,0 +1,69 @@
+/*
+ * Summary: string dictionnary
+ * Description: dictionary of reusable strings, just used to avoid allocation
+ * and freeing operations.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_DICT_H__
+#define __XML_DICT_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The dictionnary.
+ */
+typedef struct _xmlDict xmlDict;
+typedef xmlDict *xmlDictPtr;
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreate (void);
+XMLPUBFUN xmlDictPtr XMLCALL
+ xmlDictCreateSub(xmlDictPtr sub);
+XMLPUBFUN int XMLCALL
+ xmlDictReference(xmlDictPtr dict);
+XMLPUBFUN void XMLCALL
+ xmlDictFree (xmlDictPtr dict);
+
+/*
+ * Lookup of entry in the dictionnary.
+ */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictLookup (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictExists (xmlDictPtr dict,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlDictQLookup (xmlDictPtr dict,
+ const xmlChar *prefix,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlDictOwns (xmlDictPtr dict,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlDictSize (xmlDictPtr dict);
+
+/*
+ * Cleanup function
+ */
+XMLPUBFUN void XMLCALL
+ xmlDictCleanup (void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_DICT_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/encoding.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/encoding.h
new file mode 100644
index 0000000..dbb3d66
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/encoding.h
@@ -0,0 +1,240 @@
+/*
+ * Summary: interface for the encoding conversion functions
+ * Description: interface for the encoding conversion functions needed for
+ * XML basic encoding and iconv() support.
+ *
+ * Related specs are
+ * rfc2044 (UTF-8 and UTF-16) F. Yergeau Alis Technologies
+ * [ISO-10646] UTF-8 and UTF-16 in Annexes
+ * [ISO-8859-1] ISO Latin-1 characters codes.
+ * [UNICODE] The Unicode Consortium, "The Unicode Standard --
+ * Worldwide Character Encoding -- Version 1.0", Addison-
+ * Wesley, Volume 1, 1991, Volume 2, 1992. UTF-8 is
+ * described in Unicode Technical Report #4.
+ * [US-ASCII] Coded Character Set--7-bit American Standard Code for
+ * Information Interchange, ANSI X3.4-1986.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_CHAR_ENCODING_H__
+#define __XML_CHAR_ENCODING_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_ICONV_ENABLED
+#include <iconv.h>
+#endif
+#ifdef LIBXML_ICU_ENABLED
+#include <unicode/ucnv.h>
+#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlCharEncoding:
+ *
+ * Predefined values for some standard encodings.
+ * Libxml does not do beforehand translation on UTF8 and ISOLatinX.
+ * It also supports ASCII, ISO-8859-1, and UTF16 (LE and BE) by default.
+ *
+ * Anything else would have to be translated to UTF8 before being
+ * given to the parser itself. The BOM for UTF16 and the encoding
+ * declaration are looked at and a converter is looked for at that
+ * point. If not found the parser stops here as asked by the XML REC. A
+ * converter can be registered by the user using xmlRegisterCharEncodingHandler
+ * but the current form doesn't allow stateful transcoding (a serious
+ * problem agreed !). If iconv has been found it will be used
+ * automatically and allow stateful transcoding, the simplest is then
+ * to be sure to enable iconv and to provide iconv libs for the encoding
+ * support needed.
+ *
+ * Note that the generic "UTF-16" is not a predefined value. Instead, only
+ * the specific UTF-16LE and UTF-16BE are present.
+ */
+typedef enum {
+ XML_CHAR_ENCODING_ERROR= -1, /* No char encoding detected */
+ XML_CHAR_ENCODING_NONE= 0, /* No char encoding detected */
+ XML_CHAR_ENCODING_UTF8= 1, /* UTF-8 */
+ XML_CHAR_ENCODING_UTF16LE= 2, /* UTF-16 little endian */
+ XML_CHAR_ENCODING_UTF16BE= 3, /* UTF-16 big endian */
+ XML_CHAR_ENCODING_UCS4LE= 4, /* UCS-4 little endian */
+ XML_CHAR_ENCODING_UCS4BE= 5, /* UCS-4 big endian */
+ XML_CHAR_ENCODING_EBCDIC= 6, /* EBCDIC uh! */
+ XML_CHAR_ENCODING_UCS4_2143=7, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS4_3412=8, /* UCS-4 unusual ordering */
+ XML_CHAR_ENCODING_UCS2= 9, /* UCS-2 */
+ XML_CHAR_ENCODING_8859_1= 10,/* ISO-8859-1 ISO Latin 1 */
+ XML_CHAR_ENCODING_8859_2= 11,/* ISO-8859-2 ISO Latin 2 */
+ XML_CHAR_ENCODING_8859_3= 12,/* ISO-8859-3 */
+ XML_CHAR_ENCODING_8859_4= 13,/* ISO-8859-4 */
+ XML_CHAR_ENCODING_8859_5= 14,/* ISO-8859-5 */
+ XML_CHAR_ENCODING_8859_6= 15,/* ISO-8859-6 */
+ XML_CHAR_ENCODING_8859_7= 16,/* ISO-8859-7 */
+ XML_CHAR_ENCODING_8859_8= 17,/* ISO-8859-8 */
+ XML_CHAR_ENCODING_8859_9= 18,/* ISO-8859-9 */
+ XML_CHAR_ENCODING_2022_JP= 19,/* ISO-2022-JP */
+ XML_CHAR_ENCODING_SHIFT_JIS=20,/* Shift_JIS */
+ XML_CHAR_ENCODING_EUC_JP= 21,/* EUC-JP */
+ XML_CHAR_ENCODING_ASCII= 22 /* pure ASCII */
+} xmlCharEncoding;
+
+/**
+ * xmlCharEncodingInputFunc:
+ * @out: a pointer to an array of bytes to store the UTF-8 result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of chars in the original encoding
+ * @inlen: the length of @in
+ *
+ * Take a block of chars in the original encoding and try to convert
+ * it to an UTF-8 block of chars out.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets consumed.
+ */
+typedef int (* xmlCharEncodingInputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/**
+ * xmlCharEncodingOutputFunc:
+ * @out: a pointer to an array of bytes to store the result
+ * @outlen: the length of @out
+ * @in: a pointer to an array of UTF-8 chars
+ * @inlen: the length of @in
+ *
+ * Take a block of UTF-8 chars in and try to convert it to another
+ * encoding.
+ * Note: a first call designed to produce heading info is called with
+ * in = NULL. If stateful this should also initialize the encoder state.
+ *
+ * Returns the number of bytes written, -1 if lack of space, or -2
+ * if the transcoding failed.
+ * The value of @inlen after return is the number of octets consumed
+ * if the return value is positive, else unpredictiable.
+ * The value of @outlen after return is the number of octets produced.
+ */
+typedef int (* xmlCharEncodingOutputFunc)(unsigned char *out, int *outlen,
+ const unsigned char *in, int *inlen);
+
+
+/*
+ * Block defining the handlers for non UTF-8 encodings.
+ * If iconv is supported, there are two extra fields.
+ */
+#ifdef LIBXML_ICU_ENABLED
+struct _uconv_t {
+ UConverter *uconv; /* for conversion between an encoding and UTF-16 */
+ UConverter *utf8; /* for conversion between UTF-8 and UTF-16 */
+};
+typedef struct _uconv_t uconv_t;
+#endif
+
+typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
+typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
+struct _xmlCharEncodingHandler {
+ char *name;
+ xmlCharEncodingInputFunc input;
+ xmlCharEncodingOutputFunc output;
+#ifdef LIBXML_ICONV_ENABLED
+ iconv_t iconv_in;
+ iconv_t iconv_out;
+#endif /* LIBXML_ICONV_ENABLED */
+#ifdef LIBXML_ICU_ENABLED
+ uconv_t *uconv_in;
+ uconv_t *uconv_out;
+#endif /* LIBXML_ICU_ENABLED */
+};
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/tree.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Interfaces for encoding handlers.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitCharEncodingHandlers (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupCharEncodingHandlers (void);
+XMLPUBFUN void XMLCALL
+ xmlRegisterCharEncodingHandler (xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlGetCharEncodingHandler (xmlCharEncoding enc);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlFindCharEncodingHandler (const char *name);
+XMLPUBFUN xmlCharEncodingHandlerPtr XMLCALL
+ xmlNewCharEncodingHandler (const char *name,
+ xmlCharEncodingInputFunc input,
+ xmlCharEncodingOutputFunc output);
+
+/*
+ * Interfaces for encoding names and aliases.
+ */
+XMLPUBFUN int XMLCALL
+ xmlAddEncodingAlias (const char *name,
+ const char *alias);
+XMLPUBFUN int XMLCALL
+ xmlDelEncodingAlias (const char *alias);
+XMLPUBFUN const char * XMLCALL
+ xmlGetEncodingAlias (const char *alias);
+XMLPUBFUN void XMLCALL
+ xmlCleanupEncodingAliases (void);
+XMLPUBFUN xmlCharEncoding XMLCALL
+ xmlParseCharEncoding (const char *name);
+XMLPUBFUN const char * XMLCALL
+ xmlGetCharEncodingName (xmlCharEncoding enc);
+
+/*
+ * Interfaces directly used by the parsers.
+ */
+XMLPUBFUN xmlCharEncoding XMLCALL
+ xmlDetectCharEncoding (const unsigned char *in,
+ int len);
+
+XMLPUBFUN int XMLCALL
+ xmlCharEncOutFunc (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+
+XMLPUBFUN int XMLCALL
+ xmlCharEncInFunc (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+XMLPUBFUN int XMLCALL
+ xmlCharEncFirstLine (xmlCharEncodingHandler *handler,
+ xmlBufferPtr out,
+ xmlBufferPtr in);
+XMLPUBFUN int XMLCALL
+ xmlCharEncCloseFunc (xmlCharEncodingHandler *handler);
+
+/*
+ * Export a few useful functions
+ */
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int XMLCALL
+ UTF8Toisolat1 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int XMLCALL
+ isolat1ToUTF8 (unsigned char *out,
+ int *outlen,
+ const unsigned char *in,
+ int *inlen);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_CHAR_ENCODING_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/entities.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/entities.h
new file mode 100644
index 0000000..cefb97f
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/entities.h
@@ -0,0 +1,150 @@
+/*
+ * Summary: interface for the XML entities handling
+ * Description: this module provides some of the entity API needed
+ * for the parser and applications.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_ENTITIES_H__
+#define __XML_ENTITIES_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The different valid entity types.
+ */
+typedef enum {
+ XML_INTERNAL_GENERAL_ENTITY = 1,
+ XML_EXTERNAL_GENERAL_PARSED_ENTITY = 2,
+ XML_EXTERNAL_GENERAL_UNPARSED_ENTITY = 3,
+ XML_INTERNAL_PARAMETER_ENTITY = 4,
+ XML_EXTERNAL_PARAMETER_ENTITY = 5,
+ XML_INTERNAL_PREDEFINED_ENTITY = 6
+} xmlEntityType;
+
+/*
+ * An unit of storage for an entity, contains the string, the value
+ * and the linkind data needed for the linking in the hash table.
+ */
+
+struct _xmlEntity {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ENTITY_DECL, must be second ! */
+ const xmlChar *name; /* Entity name */
+ struct _xmlNode *children; /* First child link */
+ struct _xmlNode *last; /* Last child link */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlChar *orig; /* content without ref substitution */
+ xmlChar *content; /* content or ndata if unparsed */
+ int length; /* the content length */
+ xmlEntityType etype; /* The entity type */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC Entity */
+
+ struct _xmlEntity *nexte; /* unused */
+ const xmlChar *URI; /* the full URI as computed */
+ int owner; /* does the entity own the childrens */
+ int checked; /* was the entity content checked */
+ /* this is also used to count entites
+ * references done from that entity */
+};
+
+/*
+ * All entities are stored in an hash table.
+ * There is 2 separate hash tables for global and parameter entities.
+ */
+
+typedef struct _xmlHashTable xmlEntitiesTable;
+typedef xmlEntitiesTable *xmlEntitiesTablePtr;
+
+/*
+ * External functions:
+ */
+
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlInitializePredefinedEntities (void);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlNewEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlAddDocEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlAddDtdEntity (xmlDocPtr doc,
+ const xmlChar *name,
+ int type,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID,
+ const xmlChar *content);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetPredefinedEntity (const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetDocEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetDtdEntity (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlGetParameterEntity (xmlDocPtr doc,
+ const xmlChar *name);
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlEncodeEntities (xmlDocPtr doc,
+ const xmlChar *input);
+#endif /* LIBXML_LEGACY_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlEncodeEntitiesReentrant(xmlDocPtr doc,
+ const xmlChar *input);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlEncodeSpecialChars (xmlDocPtr doc,
+ const xmlChar *input);
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+ xmlCreateEntitiesTable (void);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlEntitiesTablePtr XMLCALL
+ xmlCopyEntitiesTable (xmlEntitiesTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeEntitiesTable (xmlEntitiesTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpEntitiesTable (xmlBufferPtr buf,
+ xmlEntitiesTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpEntityDecl (xmlBufferPtr buf,
+ xmlEntityPtr ent);
+#endif /* LIBXML_OUTPUT_ENABLED */
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlCleanupPredefinedEntities(void);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+# endif /* __XML_ENTITIES_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/globals.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/globals.h
new file mode 100644
index 0000000..9d688e0
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/globals.h
@@ -0,0 +1,502 @@
+/*
+ * Summary: interface for all global variables of the library
+ * Description: all the global variables and thread handling for
+ * those variables is handled by this module.
+ *
+ * The bottom of this file is automatically generated by build_glob.py
+ * based on the description file global.data
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington <Gary.Pennington@uk.sun.com>, Daniel Veillard
+ */
+
+#ifndef __XML_GLOBALS_H
+#define __XML_GLOBALS_H
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/xmlerror.h>
+#include <libxml/SAX.h>
+#include <libxml/SAX2.h>
+#include <libxml/xmlmemory.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void XMLCALL xmlInitGlobals(void);
+XMLPUBFUN void XMLCALL xmlCleanupGlobals(void);
+
+/**
+ * xmlParserInputBufferCreateFilenameFunc:
+ * @URI: the URI to read from
+ * @enc: the requested source encoding
+ *
+ * Signature for the function doing the lookup for a suitable input method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlParserInputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlParserInputBufferPtr (*xmlParserInputBufferCreateFilenameFunc) (const char *URI, xmlCharEncoding enc);
+
+/**
+ * xmlOutputBufferCreateFilenameFunc:
+ * @URI: the URI to write to
+ * @enc: the requested target encoding
+ *
+ * Signature for the function doing the lookup for a suitable output method
+ * corresponding to an URI.
+ *
+ * Returns the new xmlOutputBufferPtr in case of success or NULL if no
+ * method was found.
+ */
+typedef xmlOutputBufferPtr (*xmlOutputBufferCreateFilenameFunc) (const char *URI, xmlCharEncodingHandlerPtr encoder, int compression);
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc
+XMLCALL xmlParserInputBufferCreateFilenameDefault (xmlParserInputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc
+XMLCALL xmlOutputBufferCreateFilenameDefault (xmlOutputBufferCreateFilenameFunc func);
+
+/*
+ * Externally global symbols which need to be protected for backwards
+ * compatibility support.
+ */
+
+#undef docbDefaultSAXHandler
+#undef htmlDefaultSAXHandler
+#undef oldXMLWDcompatibility
+#undef xmlBufferAllocScheme
+#undef xmlDefaultBufferSize
+#undef xmlDefaultSAXHandler
+#undef xmlDefaultSAXLocator
+#undef xmlDoValidityCheckingDefaultValue
+#undef xmlFree
+#undef xmlGenericError
+#undef xmlStructuredError
+#undef xmlGenericErrorContext
+#undef xmlStructuredErrorContext
+#undef xmlGetWarningsDefaultValue
+#undef xmlIndentTreeOutput
+#undef xmlTreeIndentString
+#undef xmlKeepBlanksDefaultValue
+#undef xmlLineNumbersDefaultValue
+#undef xmlLoadExtDtdDefaultValue
+#undef xmlMalloc
+#undef xmlMallocAtomic
+#undef xmlMemStrdup
+#undef xmlParserDebugEntities
+#undef xmlParserVersion
+#undef xmlPedanticParserDefaultValue
+#undef xmlRealloc
+#undef xmlSaveNoEmptyTags
+#undef xmlSubstituteEntitiesDefaultValue
+#undef xmlRegisterNodeDefaultValue
+#undef xmlDeregisterNodeDefaultValue
+#undef xmlLastError
+#undef xmlParserInputBufferCreateFilenameValue
+#undef xmlOutputBufferCreateFilenameValue
+
+/**
+ * xmlRegisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the registration callback of a created node
+ */
+typedef void (*xmlRegisterNodeFunc) (xmlNodePtr node);
+/**
+ * xmlDeregisterNodeFunc:
+ * @node: the current node
+ *
+ * Signature for the deregistration callback of a discarded node
+ */
+typedef void (*xmlDeregisterNodeFunc) (xmlNodePtr node);
+
+typedef struct _xmlGlobalState xmlGlobalState;
+typedef xmlGlobalState *xmlGlobalStatePtr;
+struct _xmlGlobalState
+{
+ const char *xmlParserVersion;
+
+ xmlSAXLocator xmlDefaultSAXLocator;
+ xmlSAXHandlerV1 xmlDefaultSAXHandler;
+ xmlSAXHandlerV1 docbDefaultSAXHandler;
+ xmlSAXHandlerV1 htmlDefaultSAXHandler;
+
+ xmlFreeFunc xmlFree;
+ xmlMallocFunc xmlMalloc;
+ xmlStrdupFunc xmlMemStrdup;
+ xmlReallocFunc xmlRealloc;
+
+ xmlGenericErrorFunc xmlGenericError;
+ xmlStructuredErrorFunc xmlStructuredError;
+ void *xmlGenericErrorContext;
+
+ int oldXMLWDcompatibility;
+
+ xmlBufferAllocationScheme xmlBufferAllocScheme;
+ int xmlDefaultBufferSize;
+
+ int xmlSubstituteEntitiesDefaultValue;
+ int xmlDoValidityCheckingDefaultValue;
+ int xmlGetWarningsDefaultValue;
+ int xmlKeepBlanksDefaultValue;
+ int xmlLineNumbersDefaultValue;
+ int xmlLoadExtDtdDefaultValue;
+ int xmlParserDebugEntities;
+ int xmlPedanticParserDefaultValue;
+
+ int xmlSaveNoEmptyTags;
+ int xmlIndentTreeOutput;
+ const char *xmlTreeIndentString;
+
+ xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+ xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+
+ xmlMallocFunc xmlMallocAtomic;
+ xmlError xmlLastError;
+
+ xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
+ xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
+
+ void *xmlStructuredErrorContext;
+};
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/threads.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN void XMLCALL xmlInitializeGlobalState(xmlGlobalStatePtr gs);
+
+XMLPUBFUN void XMLCALL xmlThrDefSetGenericErrorFunc(void *ctx, xmlGenericErrorFunc handler);
+
+XMLPUBFUN void XMLCALL xmlThrDefSetStructuredErrorFunc(void *ctx, xmlStructuredErrorFunc handler);
+
+XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlRegisterNodeFunc XMLCALL xmlThrDefRegisterNodeDefault(xmlRegisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+XMLPUBFUN xmlDeregisterNodeFunc XMLCALL xmlThrDefDeregisterNodeDefault(xmlDeregisterNodeFunc func);
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc XMLCALL
+ xmlThrDefOutputBufferCreateFilenameDefault(xmlOutputBufferCreateFilenameFunc func);
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc XMLCALL
+ xmlThrDefParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func);
+
+/** DOC_DISABLE */
+/*
+ * In general the memory allocation entry points are not kept
+ * thread specific but this can be overridden by LIBXML_THREAD_ALLOC_ENABLED
+ * - xmlMalloc
+ * - xmlMallocAtomic
+ * - xmlRealloc
+ * - xmlMemStrdup
+ * - xmlFree
+ */
+
+#ifdef LIBXML_THREAD_ALLOC_ENABLED
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMalloc(void);
+#define xmlMalloc \
+(*(__xmlMalloc()))
+#else
+XMLPUBVAR xmlMallocFunc xmlMalloc;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlMallocFunc * XMLCALL __xmlMallocAtomic(void);
+#define xmlMallocAtomic \
+(*(__xmlMallocAtomic()))
+#else
+XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlReallocFunc * XMLCALL __xmlRealloc(void);
+#define xmlRealloc \
+(*(__xmlRealloc()))
+#else
+XMLPUBVAR xmlReallocFunc xmlRealloc;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlFreeFunc * XMLCALL __xmlFree(void);
+#define xmlFree \
+(*(__xmlFree()))
+#else
+XMLPUBVAR xmlFreeFunc xmlFree;
+#endif
+
+#ifdef LIBXML_THREAD_ENABLED
+XMLPUBFUN xmlStrdupFunc * XMLCALL __xmlMemStrdup(void);
+#define xmlMemStrdup \
+(*(__xmlMemStrdup()))
+#else
+XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif
+
+#else /* !LIBXML_THREAD_ALLOC_ENABLED */
+XMLPUBVAR xmlMallocFunc xmlMalloc;
+XMLPUBVAR xmlMallocFunc xmlMallocAtomic;
+XMLPUBVAR xmlReallocFunc xmlRealloc;
+XMLPUBVAR xmlFreeFunc xmlFree;
+XMLPUBVAR xmlStrdupFunc xmlMemStrdup;
+#endif /* LIBXML_THREAD_ALLOC_ENABLED */
+
+#ifdef LIBXML_DOCB_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __docbDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define docbDefaultSAXHandler \
+(*(__docbDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 docbDefaultSAXHandler;
+#endif
+#endif
+
+#ifdef LIBXML_HTML_ENABLED
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __htmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define htmlDefaultSAXHandler \
+(*(__htmlDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 htmlDefaultSAXHandler;
+#endif
+#endif
+
+XMLPUBFUN xmlError * XMLCALL __xmlLastError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLastError \
+(*(__xmlLastError()))
+#else
+XMLPUBVAR xmlError xmlLastError;
+#endif
+
+/*
+ * Everything starting from the line below is
+ * Automatically generated by build_glob.py.
+ * Do not modify the previous line.
+ */
+
+
+XMLPUBFUN int * XMLCALL __oldXMLWDcompatibility(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define oldXMLWDcompatibility \
+(*(__oldXMLWDcompatibility()))
+#else
+XMLPUBVAR int oldXMLWDcompatibility;
+#endif
+
+XMLPUBFUN xmlBufferAllocationScheme * XMLCALL __xmlBufferAllocScheme(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlBufferAllocScheme \
+(*(__xmlBufferAllocScheme()))
+#else
+XMLPUBVAR xmlBufferAllocationScheme xmlBufferAllocScheme;
+#endif
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL xmlThrDefBufferAllocScheme(xmlBufferAllocationScheme v);
+
+XMLPUBFUN int * XMLCALL __xmlDefaultBufferSize(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultBufferSize \
+(*(__xmlDefaultBufferSize()))
+#else
+XMLPUBVAR int xmlDefaultBufferSize;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefDefaultBufferSize(int v);
+
+XMLPUBFUN xmlSAXHandlerV1 * XMLCALL __xmlDefaultSAXHandler(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultSAXHandler \
+(*(__xmlDefaultSAXHandler()))
+#else
+XMLPUBVAR xmlSAXHandlerV1 xmlDefaultSAXHandler;
+#endif
+
+XMLPUBFUN xmlSAXLocator * XMLCALL __xmlDefaultSAXLocator(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDefaultSAXLocator \
+(*(__xmlDefaultSAXLocator()))
+#else
+XMLPUBVAR xmlSAXLocator xmlDefaultSAXLocator;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlDoValidityCheckingDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDoValidityCheckingDefaultValue \
+(*(__xmlDoValidityCheckingDefaultValue()))
+#else
+XMLPUBVAR int xmlDoValidityCheckingDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefDoValidityCheckingDefaultValue(int v);
+
+XMLPUBFUN xmlGenericErrorFunc * XMLCALL __xmlGenericError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGenericError \
+(*(__xmlGenericError()))
+#else
+XMLPUBVAR xmlGenericErrorFunc xmlGenericError;
+#endif
+
+XMLPUBFUN xmlStructuredErrorFunc * XMLCALL __xmlStructuredError(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlStructuredError \
+(*(__xmlStructuredError()))
+#else
+XMLPUBVAR xmlStructuredErrorFunc xmlStructuredError;
+#endif
+
+XMLPUBFUN void * * XMLCALL __xmlGenericErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGenericErrorContext \
+(*(__xmlGenericErrorContext()))
+#else
+XMLPUBVAR void * xmlGenericErrorContext;
+#endif
+
+XMLPUBFUN void * * XMLCALL __xmlStructuredErrorContext(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlStructuredErrorContext \
+(*(__xmlStructuredErrorContext()))
+#else
+XMLPUBVAR void * xmlStructuredErrorContext;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlGetWarningsDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlGetWarningsDefaultValue \
+(*(__xmlGetWarningsDefaultValue()))
+#else
+XMLPUBVAR int xmlGetWarningsDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefGetWarningsDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlIndentTreeOutput(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlIndentTreeOutput \
+(*(__xmlIndentTreeOutput()))
+#else
+XMLPUBVAR int xmlIndentTreeOutput;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefIndentTreeOutput(int v);
+
+XMLPUBFUN const char * * XMLCALL __xmlTreeIndentString(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlTreeIndentString \
+(*(__xmlTreeIndentString()))
+#else
+XMLPUBVAR const char * xmlTreeIndentString;
+#endif
+XMLPUBFUN const char * XMLCALL xmlThrDefTreeIndentString(const char * v);
+
+XMLPUBFUN int * XMLCALL __xmlKeepBlanksDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlKeepBlanksDefaultValue \
+(*(__xmlKeepBlanksDefaultValue()))
+#else
+XMLPUBVAR int xmlKeepBlanksDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefKeepBlanksDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlLineNumbersDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLineNumbersDefaultValue \
+(*(__xmlLineNumbersDefaultValue()))
+#else
+XMLPUBVAR int xmlLineNumbersDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefLineNumbersDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlLoadExtDtdDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlLoadExtDtdDefaultValue \
+(*(__xmlLoadExtDtdDefaultValue()))
+#else
+XMLPUBVAR int xmlLoadExtDtdDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefLoadExtDtdDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlParserDebugEntities(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserDebugEntities \
+(*(__xmlParserDebugEntities()))
+#else
+XMLPUBVAR int xmlParserDebugEntities;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefParserDebugEntities(int v);
+
+XMLPUBFUN const char * * XMLCALL __xmlParserVersion(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserVersion \
+(*(__xmlParserVersion()))
+#else
+XMLPUBVAR const char * xmlParserVersion;
+#endif
+
+XMLPUBFUN int * XMLCALL __xmlPedanticParserDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlPedanticParserDefaultValue \
+(*(__xmlPedanticParserDefaultValue()))
+#else
+XMLPUBVAR int xmlPedanticParserDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefPedanticParserDefaultValue(int v);
+
+XMLPUBFUN int * XMLCALL __xmlSaveNoEmptyTags(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlSaveNoEmptyTags \
+(*(__xmlSaveNoEmptyTags()))
+#else
+XMLPUBVAR int xmlSaveNoEmptyTags;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefSaveNoEmptyTags(int v);
+
+XMLPUBFUN int * XMLCALL __xmlSubstituteEntitiesDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlSubstituteEntitiesDefaultValue \
+(*(__xmlSubstituteEntitiesDefaultValue()))
+#else
+XMLPUBVAR int xmlSubstituteEntitiesDefaultValue;
+#endif
+XMLPUBFUN int XMLCALL xmlThrDefSubstituteEntitiesDefaultValue(int v);
+
+XMLPUBFUN xmlRegisterNodeFunc * XMLCALL __xmlRegisterNodeDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlRegisterNodeDefaultValue \
+(*(__xmlRegisterNodeDefaultValue()))
+#else
+XMLPUBVAR xmlRegisterNodeFunc xmlRegisterNodeDefaultValue;
+#endif
+
+XMLPUBFUN xmlDeregisterNodeFunc * XMLCALL __xmlDeregisterNodeDefaultValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlDeregisterNodeDefaultValue \
+(*(__xmlDeregisterNodeDefaultValue()))
+#else
+XMLPUBVAR xmlDeregisterNodeFunc xmlDeregisterNodeDefaultValue;
+#endif
+
+XMLPUBFUN xmlParserInputBufferCreateFilenameFunc * XMLCALL __xmlParserInputBufferCreateFilenameValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlParserInputBufferCreateFilenameValue \
+(*(__xmlParserInputBufferCreateFilenameValue()))
+#else
+XMLPUBVAR xmlParserInputBufferCreateFilenameFunc xmlParserInputBufferCreateFilenameValue;
+#endif
+
+XMLPUBFUN xmlOutputBufferCreateFilenameFunc * XMLCALL __xmlOutputBufferCreateFilenameValue(void);
+#ifdef LIBXML_THREAD_ENABLED
+#define xmlOutputBufferCreateFilenameValue \
+(*(__xmlOutputBufferCreateFilenameValue()))
+#else
+XMLPUBVAR xmlOutputBufferCreateFilenameFunc xmlOutputBufferCreateFilenameValue;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_GLOBALS_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/hash.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/hash.h
new file mode 100644
index 0000000..02c11e4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/hash.h
@@ -0,0 +1,233 @@
+/*
+ * Summary: Chained hash tables
+ * Description: This module implements the hash table support used in
+ * various places in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Bjorn Reese <bjorn.reese@systematic.dk>
+ */
+
+#ifndef __XML_HASH_H__
+#define __XML_HASH_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The hash table.
+ */
+typedef struct _xmlHashTable xmlHashTable;
+typedef xmlHashTable *xmlHashTablePtr;
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/dict.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Recent version of gcc produce a warning when a function pointer is assigned
+ * to an object pointer, or vice versa. The following macro is a dirty hack
+ * to allow suppression of the warning. If your architecture has function
+ * pointers which are a different size than a void pointer, there may be some
+ * serious trouble within the library.
+ */
+/**
+ * XML_CAST_FPTR:
+ * @fptr: pointer to a function
+ *
+ * Macro to do a casting from an object pointer to a
+ * function pointer without encountering a warning from
+ * gcc
+ *
+ * #define XML_CAST_FPTR(fptr) (*(void **)(&fptr))
+ * This macro violated ISO C aliasing rules (gcc4 on s390 broke)
+ * so it is disabled now
+ */
+
+#define XML_CAST_FPTR(fptr) fptr
+
+
+/*
+ * function types:
+ */
+/**
+ * xmlHashDeallocator:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to free data from a hash.
+ */
+typedef void (*xmlHashDeallocator)(void *payload, xmlChar *name);
+/**
+ * xmlHashCopier:
+ * @payload: the data in the hash
+ * @name: the name associated
+ *
+ * Callback to copy data from a hash.
+ *
+ * Returns a copy of the data or NULL in case of error.
+ */
+typedef void *(*xmlHashCopier)(void *payload, xmlChar *name);
+/**
+ * xmlHashScanner:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ *
+ * Callback when scanning data in a hash with the simple scanner.
+ */
+typedef void (*xmlHashScanner)(void *payload, void *data, xmlChar *name);
+/**
+ * xmlHashScannerFull:
+ * @payload: the data in the hash
+ * @data: extra scannner data
+ * @name: the name associated
+ * @name2: the second name associated
+ * @name3: the third name associated
+ *
+ * Callback when scanning data in a hash with the full scanner.
+ */
+typedef void (*xmlHashScannerFull)(void *payload, void *data,
+ const xmlChar *name, const xmlChar *name2,
+ const xmlChar *name3);
+
+/*
+ * Constructor and destructor.
+ */
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCreate (int size);
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCreateDict(int size,
+ xmlDictPtr dict);
+XMLPUBFUN void XMLCALL
+ xmlHashFree (xmlHashTablePtr table,
+ xmlHashDeallocator f);
+
+/*
+ * Add a new entry to the hash table.
+ */
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry (xmlHashTablePtr table,
+ const xmlChar *name,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry(xmlHashTablePtr table,
+ const xmlChar *name,
+ void *userdata,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry2(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry2(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ void *userdata,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashAddEntry3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata);
+XMLPUBFUN int XMLCALL
+ xmlHashUpdateEntry3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ void *userdata,
+ xmlHashDeallocator f);
+
+/*
+ * Remove an entry from the hash table.
+ */
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry(xmlHashTablePtr table, const xmlChar *name,
+ xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry2(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, xmlHashDeallocator f);
+XMLPUBFUN int XMLCALL
+ xmlHashRemoveEntry3(xmlHashTablePtr table, const xmlChar *name,
+ const xmlChar *name2, const xmlChar *name3,
+ xmlHashDeallocator f);
+
+/*
+ * Retrieve the userdata.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup (xmlHashTablePtr table,
+ const xmlChar *name);
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup2 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2);
+XMLPUBFUN void * XMLCALL
+ xmlHashLookup3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup2 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix,
+ const xmlChar *name2,
+ const xmlChar *prefix2);
+XMLPUBFUN void * XMLCALL
+ xmlHashQLookup3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *prefix,
+ const xmlChar *name2,
+ const xmlChar *prefix2,
+ const xmlChar *name3,
+ const xmlChar *prefix3);
+
+/*
+ * Helpers.
+ */
+XMLPUBFUN xmlHashTablePtr XMLCALL
+ xmlHashCopy (xmlHashTablePtr table,
+ xmlHashCopier f);
+XMLPUBFUN int XMLCALL
+ xmlHashSize (xmlHashTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlHashScan (xmlHashTablePtr table,
+ xmlHashScanner f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScan3 (xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScanner f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScanFull (xmlHashTablePtr table,
+ xmlHashScannerFull f,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlHashScanFull3(xmlHashTablePtr table,
+ const xmlChar *name,
+ const xmlChar *name2,
+ const xmlChar *name3,
+ xmlHashScannerFull f,
+ void *data);
+#ifdef __cplusplus
+}
+#endif
+#endif /* ! __XML_HASH_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/list.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/list.h
new file mode 100644
index 0000000..0504e0c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/list.h
@@ -0,0 +1,137 @@
+/*
+ * Summary: lists interfaces
+ * Description: this module implement the list support used in
+ * various place in the library.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Gary Pennington <Gary.Pennington@uk.sun.com>
+ */
+
+#ifndef __XML_LINK_INCLUDE__
+#define __XML_LINK_INCLUDE__
+
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlLink xmlLink;
+typedef xmlLink *xmlLinkPtr;
+
+typedef struct _xmlList xmlList;
+typedef xmlList *xmlListPtr;
+
+/**
+ * xmlListDeallocator:
+ * @lk: the data to deallocate
+ *
+ * Callback function used to free data from a list.
+ */
+typedef void (*xmlListDeallocator) (xmlLinkPtr lk);
+/**
+ * xmlListDataCompare:
+ * @data0: the first data
+ * @data1: the second data
+ *
+ * Callback function used to compare 2 data.
+ *
+ * Returns 0 is equality, -1 or 1 otherwise depending on the ordering.
+ */
+typedef int (*xmlListDataCompare) (const void *data0, const void *data1);
+/**
+ * xmlListWalker:
+ * @data: the data found in the list
+ * @user: extra user provided data to the walker
+ *
+ * Callback function used when walking a list with xmlListWalk().
+ *
+ * Returns 0 to stop walking the list, 1 otherwise.
+ */
+typedef int (*xmlListWalker) (const void *data, const void *user);
+
+/* Creation/Deletion */
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlListCreate (xmlListDeallocator deallocator,
+ xmlListDataCompare compare);
+XMLPUBFUN void XMLCALL
+ xmlListDelete (xmlListPtr l);
+
+/* Basic Operators */
+XMLPUBFUN void * XMLCALL
+ xmlListSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN void * XMLCALL
+ xmlListReverseSearch (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListInsert (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int XMLCALL
+ xmlListAppend (xmlListPtr l,
+ void *data) ;
+XMLPUBFUN int XMLCALL
+ xmlListRemoveFirst (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListRemoveLast (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListRemoveAll (xmlListPtr l,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlListClear (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListEmpty (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr XMLCALL
+ xmlListFront (xmlListPtr l);
+XMLPUBFUN xmlLinkPtr XMLCALL
+ xmlListEnd (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListSize (xmlListPtr l);
+
+XMLPUBFUN void XMLCALL
+ xmlListPopFront (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListPopBack (xmlListPtr l);
+XMLPUBFUN int XMLCALL
+ xmlListPushFront (xmlListPtr l,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlListPushBack (xmlListPtr l,
+ void *data);
+
+/* Advanced Operators */
+XMLPUBFUN void XMLCALL
+ xmlListReverse (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListSort (xmlListPtr l);
+XMLPUBFUN void XMLCALL
+ xmlListWalk (xmlListPtr l,
+ xmlListWalker walker,
+ const void *user);
+XMLPUBFUN void XMLCALL
+ xmlListReverseWalk (xmlListPtr l,
+ xmlListWalker walker,
+ const void *user);
+XMLPUBFUN void XMLCALL
+ xmlListMerge (xmlListPtr l1,
+ xmlListPtr l2);
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlListDup (const xmlListPtr old);
+XMLPUBFUN int XMLCALL
+ xmlListCopy (xmlListPtr cur,
+ const xmlListPtr old);
+/* Link operators */
+XMLPUBFUN void * XMLCALL
+ xmlLinkGetData (xmlLinkPtr lk);
+
+/* xmlListUnique() */
+/* xmlListSwap */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_LINK_INCLUDE__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/nanoftp.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/nanoftp.h
new file mode 100644
index 0000000..397bbba
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/nanoftp.h
@@ -0,0 +1,162 @@
+/*
+ * Summary: minimal FTP implementation
+ * Description: minimal FTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_FTP_H__
+#define __NANO_FTP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_FTP_ENABLED
+
+/* Needed for portability to Windows 64 bits */
+#if defined(__MINGW32__) || defined(_WIN32_WCE)
+#include <winsock2.h>
+#else
+/**
+ * SOCKET:
+ *
+ * macro used to provide portability of code to windows sockets
+ */
+#define SOCKET int
+/**
+ * INVALID_SOCKET:
+ *
+ * macro used to provide portability of code to windows sockets
+ * the value to be used when the socket is not valid
+ */
+#define INVALID_SOCKET (-1)
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * ftpListCallback:
+ * @userData: user provided data for the callback
+ * @filename: the file name (including "->" when links are shown)
+ * @attrib: the attribute string
+ * @owner: the owner string
+ * @group: the group string
+ * @size: the file size
+ * @links: the link count
+ * @year: the year
+ * @month: the month
+ * @day: the day
+ * @hour: the hour
+ * @minute: the minute
+ *
+ * A callback for the xmlNanoFTPList command.
+ * Note that only one of year and day:minute are specified.
+ */
+typedef void (*ftpListCallback) (void *userData,
+ const char *filename, const char *attrib,
+ const char *owner, const char *group,
+ unsigned long size, int links, int year,
+ const char *month, int day, int hour,
+ int minute);
+/**
+ * ftpDataCallback:
+ * @userData: the user provided context
+ * @data: the data received
+ * @len: its size in bytes
+ *
+ * A callback for the xmlNanoFTPGet command.
+ */
+typedef void (*ftpDataCallback) (void *userData,
+ const char *data,
+ int len);
+
+/*
+ * Init
+ */
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPInit (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPCleanup (void);
+
+/*
+ * Creating/freeing contexts.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPNewCtxt (const char *URL);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPFreeCtxt (void * ctx);
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPConnectTo (const char *server,
+ int port);
+/*
+ * Opening/closing session connections.
+ */
+XMLPUBFUN void * XMLCALL
+ xmlNanoFTPOpen (const char *URL);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPConnect (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPClose (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPQuit (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPScanProxy (const char *URL);
+XMLPUBFUN void XMLCALL
+ xmlNanoFTPProxy (const char *host,
+ int port,
+ const char *user,
+ const char *passwd,
+ int type);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPUpdateURL (void *ctx,
+ const char *URL);
+
+/*
+ * Rather internal commands.
+ */
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPGetResponse (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCheckResponse (void *ctx);
+
+/*
+ * CD/DIR/GET handlers.
+ */
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCwd (void *ctx,
+ const char *directory);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPDele (void *ctx,
+ const char *file);
+
+XMLPUBFUN SOCKET XMLCALL
+ xmlNanoFTPGetConnection (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPCloseConnection(void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPList (void *ctx,
+ ftpListCallback callback,
+ void *userData,
+ const char *filename);
+XMLPUBFUN SOCKET XMLCALL
+ xmlNanoFTPGetSocket (void *ctx,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPGet (void *ctx,
+ ftpDataCallback callback,
+ void *userData,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlNanoFTPRead (void *ctx,
+ void *dest,
+ int len);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_FTP_ENABLED */
+#endif /* __NANO_FTP_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/nanohttp.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/nanohttp.h
new file mode 100644
index 0000000..22b8fb4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/nanohttp.h
@@ -0,0 +1,81 @@
+/*
+ * Summary: minimal HTTP implementation
+ * Description: minimal HTTP implementation allowing to fetch resources
+ * like external subset.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __NANO_HTTP_H__
+#define __NANO_HTTP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_HTTP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPInit (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPCleanup (void);
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPScanProxy (const char *URL);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPFetch (const char *URL,
+ const char *filename,
+ char **contentType);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPMethod (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ const char *headers,
+ int ilen);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPMethodRedir (const char *URL,
+ const char *method,
+ const char *input,
+ char **contentType,
+ char **redir,
+ const char *headers,
+ int ilen);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPOpen (const char *URL,
+ char **contentType);
+XMLPUBFUN void * XMLCALL
+ xmlNanoHTTPOpenRedir (const char *URL,
+ char **contentType,
+ char **redir);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPReturnCode (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPAuthHeader (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPRedir (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPContentLength( void * ctx );
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPEncoding (void *ctx);
+XMLPUBFUN const char * XMLCALL
+ xmlNanoHTTPMimeType (void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPRead (void *ctx,
+ void *dest,
+ int len);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlNanoHTTPSave (void *ctxt,
+ const char *filename);
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNanoHTTPClose (void *ctx);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_HTTP_ENABLED */
+#endif /* __NANO_HTTP_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/parser.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/parser.h
new file mode 100644
index 0000000..a2f9f27
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/parser.h
@@ -0,0 +1,1235 @@
+/*
+ * Summary: the core parser module
+ * Description: Interfaces, constants and types related to the XML parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_H__
+#define __XML_PARSER_H__
+
+#include <stdarg.h>
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#include <libxml/hash.h>
+#include <libxml/valid.h>
+#include <libxml/entities.h>
+#include <libxml/xmlerror.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XML_DEFAULT_VERSION:
+ *
+ * The default version of XML used: 1.0
+ */
+#define XML_DEFAULT_VERSION "1.0"
+
+/**
+ * xmlParserInput:
+ *
+ * An xmlParserInput is an input flow for the XML processor.
+ * Each entity parsed is associated an xmlParserInput (except the
+ * few predefined ones). This is the case both for internal entities
+ * - in which case the flow is already completely in memory - or
+ * external entities - in which case we use the buf structure for
+ * progressive reading and I18N conversions to the internal UTF-8 format.
+ */
+
+/**
+ * xmlParserInputDeallocate:
+ * @str: the string to deallocate
+ *
+ * Callback for freeing some parser input allocations.
+ */
+typedef void (* xmlParserInputDeallocate)(xmlChar *str);
+
+struct _xmlParserInput {
+ /* Input buffer */
+ xmlParserInputBufferPtr buf; /* UTF-8 encoded buffer */
+
+ const char *filename; /* The file analyzed, if any */
+ const char *directory; /* the directory/base of the file */
+ const xmlChar *base; /* Base of the array to parse */
+ const xmlChar *cur; /* Current char being parsed */
+ const xmlChar *end; /* end of the array to parse */
+ int length; /* length if known */
+ int line; /* Current line */
+ int col; /* Current column */
+ /*
+ * NOTE: consumed is only tested for equality in the parser code,
+ * so even if there is an overflow this should not give troubles
+ * for parsing very large instances.
+ */
+ unsigned long consumed; /* How many xmlChars already consumed */
+ xmlParserInputDeallocate free; /* function to deallocate the base */
+ const xmlChar *encoding; /* the encoding string for entity */
+ const xmlChar *version; /* the version string for entity */
+ int standalone; /* Was that entity marked standalone */
+ int id; /* an unique identifier for the entity */
+};
+
+/**
+ * xmlParserNodeInfo:
+ *
+ * The parser can be asked to collect Node informations, i.e. at what
+ * place in the file they were detected.
+ * NOTE: This is off by default and not very well tested.
+ */
+typedef struct _xmlParserNodeInfo xmlParserNodeInfo;
+typedef xmlParserNodeInfo *xmlParserNodeInfoPtr;
+
+struct _xmlParserNodeInfo {
+ const struct _xmlNode* node;
+ /* Position & line # that text that created the node begins & ends on */
+ unsigned long begin_pos;
+ unsigned long begin_line;
+ unsigned long end_pos;
+ unsigned long end_line;
+};
+
+typedef struct _xmlParserNodeInfoSeq xmlParserNodeInfoSeq;
+typedef xmlParserNodeInfoSeq *xmlParserNodeInfoSeqPtr;
+struct _xmlParserNodeInfoSeq {
+ unsigned long maximum;
+ unsigned long length;
+ xmlParserNodeInfo* buffer;
+};
+
+/**
+ * xmlParserInputState:
+ *
+ * The parser is now working also as a state based parser.
+ * The recursive one use the state info for entities processing.
+ */
+typedef enum {
+ XML_PARSER_EOF = -1, /* nothing is to be parsed */
+ XML_PARSER_START = 0, /* nothing has been parsed */
+ XML_PARSER_MISC, /* Misc* before int subset */
+ XML_PARSER_PI, /* Within a processing instruction */
+ XML_PARSER_DTD, /* within some DTD content */
+ XML_PARSER_PROLOG, /* Misc* after internal subset */
+ XML_PARSER_COMMENT, /* within a comment */
+ XML_PARSER_START_TAG, /* within a start tag */
+ XML_PARSER_CONTENT, /* within the content */
+ XML_PARSER_CDATA_SECTION, /* within a CDATA section */
+ XML_PARSER_END_TAG, /* within a closing tag */
+ XML_PARSER_ENTITY_DECL, /* within an entity declaration */
+ XML_PARSER_ENTITY_VALUE, /* within an entity value in a decl */
+ XML_PARSER_ATTRIBUTE_VALUE, /* within an attribute value */
+ XML_PARSER_SYSTEM_LITERAL, /* within a SYSTEM value */
+ XML_PARSER_EPILOG, /* the Misc* after the last end tag */
+ XML_PARSER_IGNORE, /* within an IGNORED section */
+ XML_PARSER_PUBLIC_LITERAL /* within a PUBLIC value */
+} xmlParserInputState;
+
+/**
+ * XML_DETECT_IDS:
+ *
+ * Bit in the loadsubset context field to tell to do ID/REFs lookups.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+ */
+#define XML_DETECT_IDS 2
+
+/**
+ * XML_COMPLETE_ATTRS:
+ *
+ * Bit in the loadsubset context field to tell to do complete the
+ * elements attributes lists with the ones defaulted from the DTDs.
+ * Use it to initialize xmlLoadExtDtdDefaultValue.
+ */
+#define XML_COMPLETE_ATTRS 4
+
+/**
+ * XML_SKIP_IDS:
+ *
+ * Bit in the loadsubset context field to tell to not do ID/REFs registration.
+ * Used to initialize xmlLoadExtDtdDefaultValue in some special cases.
+ */
+#define XML_SKIP_IDS 8
+
+/**
+ * xmlParserMode:
+ *
+ * A parser can operate in various modes
+ */
+typedef enum {
+ XML_PARSE_UNKNOWN = 0,
+ XML_PARSE_DOM = 1,
+ XML_PARSE_SAX = 2,
+ XML_PARSE_PUSH_DOM = 3,
+ XML_PARSE_PUSH_SAX = 4,
+ XML_PARSE_READER = 5
+} xmlParserMode;
+
+/**
+ * xmlParserCtxt:
+ *
+ * The parser context.
+ * NOTE This doesn't completely define the parser state, the (current ?)
+ * design of the parser uses recursive function calls since this allow
+ * and easy mapping from the production rules of the specification
+ * to the actual code. The drawback is that the actual function call
+ * also reflect the parser state. However most of the parsing routines
+ * takes as the only argument the parser context pointer, so migrating
+ * to a state based parser for progressive parsing shouldn't be too hard.
+ */
+struct _xmlParserCtxt {
+ struct _xmlSAXHandler *sax; /* The SAX handler */
+ void *userData; /* For SAX interface only, used by DOM build */
+ xmlDocPtr myDoc; /* the document being built */
+ int wellFormed; /* is the document well formed */
+ int replaceEntities; /* shall we replace entities ? */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* the declared encoding, if any */
+ int standalone; /* standalone document */
+ int html; /* an HTML(1)/Docbook(2) document
+ * 3 is HTML after <head>
+ * 10 is HTML after <body>
+ */
+
+ /* Input stream stack */
+ xmlParserInputPtr input; /* Current input stream */
+ int inputNr; /* Number of current input streams */
+ int inputMax; /* Max number of input streams */
+ xmlParserInputPtr *inputTab; /* stack of inputs */
+
+ /* Node analysis stack only used for DOM building */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ int record_info; /* Whether node info should be kept */
+ xmlParserNodeInfoSeq node_seq; /* info about each node parsed */
+
+ int errNo; /* error code */
+
+ int hasExternalSubset; /* reference and external subset */
+ int hasPErefs; /* the internal subset has PE refs */
+ int external; /* are we parsing an external entity */
+
+ int valid; /* is the document valid */
+ int validate; /* shall we try to validate ? */
+ xmlValidCtxt vctxt; /* The validity context */
+
+ xmlParserInputState instate; /* current type of input */
+ int token; /* next char look-ahead */
+
+ char *directory; /* the data directory */
+
+ /* Node name stack */
+ const xmlChar *name; /* Current parsed Node */
+ int nameNr; /* Depth of the parsing stack */
+ int nameMax; /* Max depth of the parsing stack */
+ const xmlChar * *nameTab; /* array of nodes */
+
+ long nbChars; /* number of xmlChar processed */
+ long checkIndex; /* used by progressive parsing lookup */
+ int keepBlanks; /* ugly but ... */
+ int disableSAX; /* SAX callbacks are disabled */
+ int inSubset; /* Parsing is in int 1/ext 2 subset */
+ const xmlChar * intSubName; /* name of subset */
+ xmlChar * extSubURI; /* URI of external subset */
+ xmlChar * extSubSystem; /* SYSTEM ID of external subset */
+
+ /* xml:space values */
+ int * space; /* Should the parser preserve spaces */
+ int spaceNr; /* Depth of the parsing stack */
+ int spaceMax; /* Max depth of the parsing stack */
+ int * spaceTab; /* array of space infos */
+
+ int depth; /* to prevent entity substitution loops */
+ xmlParserInputPtr entity; /* used to check entities boundaries */
+ int charset; /* encoding of the in-memory content
+ actually an xmlCharEncoding */
+ int nodelen; /* Those two fields are there to */
+ int nodemem; /* Speed up large node parsing */
+ int pedantic; /* signal pedantic warnings */
+ void *_private; /* For user data, libxml won't touch it */
+
+ int loadsubset; /* should the external subset be loaded */
+ int linenumbers; /* set line number in element content */
+ void *catalogs; /* document's own catalog */
+ int recovery; /* run in recovery mode */
+ int progressive; /* is this a progressive parsing */
+ xmlDictPtr dict; /* dictionnary for the parser */
+ const xmlChar * *atts; /* array for the attributes callbacks */
+ int maxatts; /* the size of the array */
+ int docdict; /* use strings from dict to build tree */
+
+ /*
+ * pre-interned strings
+ */
+ const xmlChar *str_xml;
+ const xmlChar *str_xmlns;
+ const xmlChar *str_xml_ns;
+
+ /*
+ * Everything below is used only by the new SAX mode
+ */
+ int sax2; /* operating in the new SAX mode */
+ int nsNr; /* the number of inherited namespaces */
+ int nsMax; /* the size of the arrays */
+ const xmlChar * *nsTab; /* the array of prefix/namespace name */
+ int *attallocs; /* which attribute were allocated */
+ void * *pushTab; /* array of data for push */
+ xmlHashTablePtr attsDefault; /* defaulted attributes if any */
+ xmlHashTablePtr attsSpecial; /* non-CDATA attributes if any */
+ int nsWellFormed; /* is the document XML Nanespace okay */
+ int options; /* Extra options */
+
+ /*
+ * Those fields are needed only for treaming parsing so far
+ */
+ int dictNames; /* Use dictionary names for the tree */
+ int freeElemsNr; /* number of freed element nodes */
+ xmlNodePtr freeElems; /* List of freed element nodes */
+ int freeAttrsNr; /* number of freed attributes nodes */
+ xmlAttrPtr freeAttrs; /* List of freed attributes nodes */
+
+ /*
+ * the complete error informations for the last error.
+ */
+ xmlError lastError;
+ xmlParserMode parseMode; /* the parser mode */
+ unsigned long nbentities; /* number of entities references */
+ unsigned long sizeentities; /* size of parsed entities */
+
+ /* for use by HTML non-recursive parser */
+ xmlParserNodeInfo *nodeInfo; /* Current NodeInfo */
+ int nodeInfoNr; /* Depth of the parsing stack */
+ int nodeInfoMax; /* Max depth of the parsing stack */
+ xmlParserNodeInfo *nodeInfoTab; /* array of nodeInfos */
+};
+
+/**
+ * xmlSAXLocator:
+ *
+ * A SAX Locator.
+ */
+struct _xmlSAXLocator {
+ const xmlChar *(*getPublicId)(void *ctx);
+ const xmlChar *(*getSystemId)(void *ctx);
+ int (*getLineNumber)(void *ctx);
+ int (*getColumnNumber)(void *ctx);
+};
+
+/**
+ * xmlSAXHandler:
+ *
+ * A SAX handler is bunch of callbacks called by the parser when processing
+ * of the input generate data or structure informations.
+ */
+
+/**
+ * resolveEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * Callback:
+ * The entity loader, to control the loading of external entities,
+ * the application can either:
+ * - override this resolveEntity() callback in the SAX block
+ * - or better use the xmlSetExternalEntityLoader() function to
+ * set up it's own entity resolution routine
+ *
+ * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour.
+ */
+typedef xmlParserInputPtr (*resolveEntitySAXFunc) (void *ctx,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * internalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on internal subset declaration.
+ */
+typedef void (*internalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * externalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the root element name
+ * @ExternalID: the external ID
+ * @SystemID: the SYSTEM ID (e.g. filename or URL)
+ *
+ * Callback on external subset declaration.
+ */
+typedef void (*externalSubsetSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * getEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get an entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * getParameterEntitySAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Get a parameter entity by name.
+ *
+ * Returns the xmlEntityPtr if found.
+ */
+typedef xmlEntityPtr (*getParameterEntitySAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * entityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the entity name
+ * @type: the entity type
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @content: the entity value (without processing).
+ *
+ * An entity definition has been parsed.
+ */
+typedef void (*entityDeclSAXFunc) (void *ctx,
+ const xmlChar *name,
+ int type,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ xmlChar *content);
+/**
+ * notationDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the notation
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ *
+ * What to do when a notation declaration has been parsed.
+ */
+typedef void (*notationDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId);
+/**
+ * attributeDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @elem: the name of the element
+ * @fullname: the attribute name
+ * @type: the attribute type
+ * @def: the type of default value
+ * @defaultValue: the attribute default value
+ * @tree: the tree of enumerated value set
+ *
+ * An attribute definition has been parsed.
+ */
+typedef void (*attributeDeclSAXFunc)(void *ctx,
+ const xmlChar *elem,
+ const xmlChar *fullname,
+ int type,
+ int def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+/**
+ * elementDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: the element name
+ * @type: the element type
+ * @content: the element value tree
+ *
+ * An element definition has been parsed.
+ */
+typedef void (*elementDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ int type,
+ xmlElementContentPtr content);
+/**
+ * unparsedEntityDeclSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The name of the entity
+ * @publicId: The public ID of the entity
+ * @systemId: The system ID of the entity
+ * @notationName: the name of the notation
+ *
+ * What to do when an unparsed entity declaration is parsed.
+ */
+typedef void (*unparsedEntityDeclSAXFunc)(void *ctx,
+ const xmlChar *name,
+ const xmlChar *publicId,
+ const xmlChar *systemId,
+ const xmlChar *notationName);
+/**
+ * setDocumentLocatorSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @loc: A SAX Locator
+ *
+ * Receive the document locator at startup, actually xmlDefaultSAXLocator.
+ * Everything is available on the context, so this is useless in our case.
+ */
+typedef void (*setDocumentLocatorSAXFunc) (void *ctx,
+ xmlSAXLocatorPtr loc);
+/**
+ * startDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document start being processed.
+ */
+typedef void (*startDocumentSAXFunc) (void *ctx);
+/**
+ * endDocumentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Called when the document end has been detected.
+ */
+typedef void (*endDocumentSAXFunc) (void *ctx);
+/**
+ * startElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name, including namespace prefix
+ * @atts: An array of name/value attributes pairs, NULL terminated
+ *
+ * Called when an opening tag has been processed.
+ */
+typedef void (*startElementSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar **atts);
+/**
+ * endElementSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The element name
+ *
+ * Called when the end of an element has been detected.
+ */
+typedef void (*endElementSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * attributeSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The attribute name, including namespace prefix
+ * @value: The attribute value
+ *
+ * Handle an attribute that has been read by the parser.
+ * The default handling is to convert the attribute into an
+ * DOM subtree and past it in a new xmlAttr element added to
+ * the element.
+ */
+typedef void (*attributeSAXFunc) (void *ctx,
+ const xmlChar *name,
+ const xmlChar *value);
+/**
+ * referenceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @name: The entity name
+ *
+ * Called when an entity reference is detected.
+ */
+typedef void (*referenceSAXFunc) (void *ctx,
+ const xmlChar *name);
+/**
+ * charactersSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some chars from the parser.
+ */
+typedef void (*charactersSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * ignorableWhitespaceSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @ch: a xmlChar string
+ * @len: the number of xmlChar
+ *
+ * Receiving some ignorable whitespaces from the parser.
+ * UNUSED: by default the DOM building will use characters.
+ */
+typedef void (*ignorableWhitespaceSAXFunc) (void *ctx,
+ const xmlChar *ch,
+ int len);
+/**
+ * processingInstructionSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @target: the target name
+ * @data: the PI data's
+ *
+ * A processing instruction has been parsed.
+ */
+typedef void (*processingInstructionSAXFunc) (void *ctx,
+ const xmlChar *target,
+ const xmlChar *data);
+/**
+ * commentSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: the comment content
+ *
+ * A comment has been parsed.
+ */
+typedef void (*commentSAXFunc) (void *ctx,
+ const xmlChar *value);
+/**
+ * cdataBlockSAXFunc:
+ * @ctx: the user data (XML parser context)
+ * @value: The pcdata content
+ * @len: the block length
+ *
+ * Called when a pcdata block has been parsed.
+ */
+typedef void (*cdataBlockSAXFunc) (
+ void *ctx,
+ const xmlChar *value,
+ int len);
+/**
+ * warningSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format a warning messages, callback.
+ */
+typedef void (XMLCDECL *warningSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * errorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format an error messages, callback.
+ */
+typedef void (XMLCDECL *errorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * fatalErrorSAXFunc:
+ * @ctx: an XML parser context
+ * @msg: the message to display/transmit
+ * @...: extra parameters for the message display
+ *
+ * Display and format fatal error messages, callback.
+ * Note: so far fatalError() SAX callbacks are not used, error()
+ * get all the callbacks for errors.
+ */
+typedef void (XMLCDECL *fatalErrorSAXFunc) (void *ctx,
+ const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * isStandaloneSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Is this document tagged standalone?
+ *
+ * Returns 1 if true
+ */
+typedef int (*isStandaloneSAXFunc) (void *ctx);
+/**
+ * hasInternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an internal subset.
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasInternalSubsetSAXFunc) (void *ctx);
+
+/**
+ * hasExternalSubsetSAXFunc:
+ * @ctx: the user data (XML parser context)
+ *
+ * Does this document has an external subset?
+ *
+ * Returns 1 if true
+ */
+typedef int (*hasExternalSubsetSAXFunc) (void *ctx);
+
+/************************************************************************
+ * *
+ * The SAX version 2 API extensions *
+ * *
+ ************************************************************************/
+/**
+ * XML_SAX2_MAGIC:
+ *
+ * Special constant found in SAX2 blocks initialized fields
+ */
+#define XML_SAX2_MAGIC 0xDEEDBEAF
+
+/**
+ * startElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ * @nb_namespaces: number of namespace definitions on that node
+ * @namespaces: pointer to the array of prefix/URI pairs namespace definitions
+ * @nb_attributes: the number of attributes on that node
+ * @nb_defaulted: the number of defaulted attributes. The defaulted
+ * ones are at the end of the array
+ * @attributes: pointer to the array of (localname/prefix/URI/value/end)
+ * attribute values.
+ *
+ * SAX2 callback when an element start has been detected by the parser.
+ * It provides the namespace informations for the element, as well as
+ * the new namespace declarations on the element.
+ */
+
+typedef void (*startElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI,
+ int nb_namespaces,
+ const xmlChar **namespaces,
+ int nb_attributes,
+ int nb_defaulted,
+ const xmlChar **attributes);
+
+/**
+ * endElementNsSAX2Func:
+ * @ctx: the user data (XML parser context)
+ * @localname: the local name of the element
+ * @prefix: the element namespace prefix if available
+ * @URI: the element namespace name if available
+ *
+ * SAX2 callback when an element end has been detected by the parser.
+ * It provides the namespace informations for the element.
+ */
+
+typedef void (*endElementNsSAX2Func) (void *ctx,
+ const xmlChar *localname,
+ const xmlChar *prefix,
+ const xmlChar *URI);
+
+
+struct _xmlSAXHandler {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+ /* The following fields are extensions available only on version 2 */
+ void *_private;
+ startElementNsSAX2Func startElementNs;
+ endElementNsSAX2Func endElementNs;
+ xmlStructuredErrorFunc serror;
+};
+
+/*
+ * SAX Version 1
+ */
+typedef struct _xmlSAXHandlerV1 xmlSAXHandlerV1;
+typedef xmlSAXHandlerV1 *xmlSAXHandlerV1Ptr;
+struct _xmlSAXHandlerV1 {
+ internalSubsetSAXFunc internalSubset;
+ isStandaloneSAXFunc isStandalone;
+ hasInternalSubsetSAXFunc hasInternalSubset;
+ hasExternalSubsetSAXFunc hasExternalSubset;
+ resolveEntitySAXFunc resolveEntity;
+ getEntitySAXFunc getEntity;
+ entityDeclSAXFunc entityDecl;
+ notationDeclSAXFunc notationDecl;
+ attributeDeclSAXFunc attributeDecl;
+ elementDeclSAXFunc elementDecl;
+ unparsedEntityDeclSAXFunc unparsedEntityDecl;
+ setDocumentLocatorSAXFunc setDocumentLocator;
+ startDocumentSAXFunc startDocument;
+ endDocumentSAXFunc endDocument;
+ startElementSAXFunc startElement;
+ endElementSAXFunc endElement;
+ referenceSAXFunc reference;
+ charactersSAXFunc characters;
+ ignorableWhitespaceSAXFunc ignorableWhitespace;
+ processingInstructionSAXFunc processingInstruction;
+ commentSAXFunc comment;
+ warningSAXFunc warning;
+ errorSAXFunc error;
+ fatalErrorSAXFunc fatalError; /* unused error() get all the errors */
+ getParameterEntitySAXFunc getParameterEntity;
+ cdataBlockSAXFunc cdataBlock;
+ externalSubsetSAXFunc externalSubset;
+ unsigned int initialized;
+};
+
+
+/**
+ * xmlExternalEntityLoader:
+ * @URL: The System ID of the resource requested
+ * @ID: The Public ID of the resource requested
+ * @context: the XML parser context
+ *
+ * External entity loaders types.
+ *
+ * Returns the entity input parser.
+ */
+typedef xmlParserInputPtr (*xmlExternalEntityLoader) (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr context);
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+#include <libxml/globals.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+ * Init/Cleanup
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitParser (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupParser (void);
+
+/*
+ * Input functions
+ */
+XMLPUBFUN int XMLCALL
+ xmlParserInputRead (xmlParserInputPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputGrow (xmlParserInputPtr in,
+ int len);
+
+/*
+ * Basic parsing Interfaces
+ */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseFile (const char *filename);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseMemory (const char *buffer,
+ int size);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlSubstituteEntitiesDefault(int val);
+XMLPUBFUN int XMLCALL
+ xmlKeepBlanksDefault (int val);
+XMLPUBFUN void XMLCALL
+ xmlStopParser (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlPedanticParserDefault(int val);
+XMLPUBFUN int XMLCALL
+ xmlLineNumbersDefault (int val);
+
+#ifdef LIBXML_SAX1_ENABLED
+/*
+ * Recovery mode
+ */
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverDoc (const xmlChar *cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverMemory (const char *buffer,
+ int size);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlRecoverFile (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+/*
+ * Less common routines and SAX interfaces
+ */
+XMLPUBFUN int XMLCALL
+ xmlParseDocument (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseExtParsedEnt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlSAXUserParseFile (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlSAXUserParseMemory (xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *buffer,
+ int size);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseDoc (xmlSAXHandlerPtr sax,
+ const xmlChar *cur,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseMemory (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseMemoryWithData (xmlSAXHandlerPtr sax,
+ const char *buffer,
+ int size,
+ int recovery,
+ void *data);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseFile (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseFileWithData (xmlSAXHandlerPtr sax,
+ const char *filename,
+ int recovery,
+ void *data);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlSAXParseEntity (xmlSAXHandlerPtr sax,
+ const char *filename);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlParseEntity (const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+
+#ifdef LIBXML_VALID_ENABLED
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlSAXParseDTD (xmlSAXHandlerPtr sax,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlParseDTD (const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlIOParseDTD (xmlSAXHandlerPtr sax,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+#endif /* LIBXML_VALID_ENABLE */
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlParseBalancedChunkMemory(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserErrors XMLCALL
+ xmlParseInNodeContext (xmlNodePtr node,
+ const char *data,
+ int datalen,
+ int options,
+ xmlNodePtr *lst);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlParseBalancedChunkMemoryRecover(xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *string,
+ xmlNodePtr *lst,
+ int recover);
+XMLPUBFUN int XMLCALL
+ xmlParseExternalEntity (xmlDocPtr doc,
+ xmlSAXHandlerPtr sax,
+ void *user_data,
+ int depth,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlParseCtxtExternalEntity(xmlParserCtxtPtr ctx,
+ const xmlChar *URL,
+ const xmlChar *ID,
+ xmlNodePtr *lst);
+
+/*
+ * Parser contexts handling.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlNewParserCtxt (void);
+XMLPUBFUN int XMLCALL
+ xmlInitParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlClearParserCtxt (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlFreeParserCtxt (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSetupParserForBuffer (xmlParserCtxtPtr ctxt,
+ const xmlChar* buffer,
+ const char *filename);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateDocParserCtxt (const xmlChar *cur);
+
+#ifdef LIBXML_LEGACY_ENABLED
+/*
+ * Reading/setting optional parsing features.
+ */
+XMLPUBFUN int XMLCALL
+ xmlGetFeaturesList (int *len,
+ const char **result);
+XMLPUBFUN int XMLCALL
+ xmlGetFeature (xmlParserCtxtPtr ctxt,
+ const char *name,
+ void *result);
+XMLPUBFUN int XMLCALL
+ xmlSetFeature (xmlParserCtxtPtr ctxt,
+ const char *name,
+ void *value);
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#ifdef LIBXML_PUSH_ENABLED
+/*
+ * Interfaces for the Push mode.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax,
+ void *user_data,
+ const char *chunk,
+ int size,
+ const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlParseChunk (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ int terminate);
+#endif /* LIBXML_PUSH_ENABLED */
+
+/*
+ * Special I/O mode.
+ */
+
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateIOParserCtxt (xmlSAXHandlerPtr sax,
+ void *user_data,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewIOInputStream (xmlParserCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc);
+
+/*
+ * Node infos.
+ */
+XMLPUBFUN const xmlParserNodeInfo* XMLCALL
+ xmlParserFindNodeInfo (const xmlParserCtxtPtr ctxt,
+ const xmlNodePtr node);
+XMLPUBFUN void XMLCALL
+ xmlInitNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XMLPUBFUN void XMLCALL
+ xmlClearNodeInfoSeq (xmlParserNodeInfoSeqPtr seq);
+XMLPUBFUN unsigned long XMLCALL
+ xmlParserFindNodeInfoIndex(const xmlParserNodeInfoSeqPtr seq,
+ const xmlNodePtr node);
+XMLPUBFUN void XMLCALL
+ xmlParserAddNodeInfo (xmlParserCtxtPtr ctxt,
+ const xmlParserNodeInfoPtr info);
+
+/*
+ * External entities handling actually implemented in xmlIO.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlSetExternalEntityLoader(xmlExternalEntityLoader f);
+XMLPUBFUN xmlExternalEntityLoader XMLCALL
+ xmlGetExternalEntityLoader(void);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlLoadExternalEntity (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/*
+ * Index lookup, actually implemented in the encoding module
+ */
+XMLPUBFUN long XMLCALL
+ xmlByteConsumed (xmlParserCtxtPtr ctxt);
+
+/*
+ * New set of simpler/more flexible APIs
+ */
+/**
+ * xmlParserOption:
+ *
+ * This is the set of XML parser options that can be passed down
+ * to the xmlReadDoc() and similar calls.
+ */
+typedef enum {
+ XML_PARSE_RECOVER = 1<<0, /* recover on errors */
+ XML_PARSE_NOENT = 1<<1, /* substitute entities */
+ XML_PARSE_DTDLOAD = 1<<2, /* load the external subset */
+ XML_PARSE_DTDATTR = 1<<3, /* default DTD attributes */
+ XML_PARSE_DTDVALID = 1<<4, /* validate with the DTD */
+ XML_PARSE_NOERROR = 1<<5, /* suppress error reports */
+ XML_PARSE_NOWARNING = 1<<6, /* suppress warning reports */
+ XML_PARSE_PEDANTIC = 1<<7, /* pedantic error reporting */
+ XML_PARSE_NOBLANKS = 1<<8, /* remove blank nodes */
+ XML_PARSE_SAX1 = 1<<9, /* use the SAX1 interface internally */
+ XML_PARSE_XINCLUDE = 1<<10,/* Implement XInclude substitition */
+ XML_PARSE_NONET = 1<<11,/* Forbid network access */
+ XML_PARSE_NODICT = 1<<12,/* Do not reuse the context dictionnary */
+ XML_PARSE_NSCLEAN = 1<<13,/* remove redundant namespaces declarations */
+ XML_PARSE_NOCDATA = 1<<14,/* merge CDATA as text nodes */
+ XML_PARSE_NOXINCNODE= 1<<15,/* do not generate XINCLUDE START/END nodes */
+ XML_PARSE_COMPACT = 1<<16,/* compact small text nodes; no modification of
+ the tree allowed afterwards (will possibly
+ crash if you try to modify the tree) */
+ XML_PARSE_OLD10 = 1<<17,/* parse using XML-1.0 before update 5 */
+ XML_PARSE_NOBASEFIX = 1<<18,/* do not fixup XINCLUDE xml:base uris */
+ XML_PARSE_HUGE = 1<<19, /* relax any hardcoded limit from the parser */
+ XML_PARSE_OLDSAX = 1<<20 /* parse using SAX2 interface from before 2.7.0 */
+} xmlParserOption;
+
+XMLPUBFUN void XMLCALL
+ xmlCtxtReset (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlCtxtResetPush (xmlParserCtxtPtr ctxt,
+ const char *chunk,
+ int size,
+ const char *filename,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ xmlCtxtUseOptions (xmlParserCtxtPtr ctxt,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadDoc (const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadFile (const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlReadIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadDoc (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadFile (xmlParserCtxtPtr ctxt,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadMemory (xmlParserCtxtPtr ctxt,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadFd (xmlParserCtxtPtr ctxt,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCtxtReadIO (xmlParserCtxtPtr ctxt,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+/*
+ * Library wide options
+ */
+/**
+ * xmlFeature:
+ *
+ * Used to examine the existance of features that can be enabled
+ * or disabled at compile-time.
+ * They used to be called XML_FEATURE_xxx but this clashed with Expat
+ */
+typedef enum {
+ XML_WITH_THREAD = 1,
+ XML_WITH_TREE = 2,
+ XML_WITH_OUTPUT = 3,
+ XML_WITH_PUSH = 4,
+ XML_WITH_READER = 5,
+ XML_WITH_PATTERN = 6,
+ XML_WITH_WRITER = 7,
+ XML_WITH_SAX1 = 8,
+ XML_WITH_FTP = 9,
+ XML_WITH_HTTP = 10,
+ XML_WITH_VALID = 11,
+ XML_WITH_HTML = 12,
+ XML_WITH_LEGACY = 13,
+ XML_WITH_C14N = 14,
+ XML_WITH_CATALOG = 15,
+ XML_WITH_XPATH = 16,
+ XML_WITH_XPTR = 17,
+ XML_WITH_XINCLUDE = 18,
+ XML_WITH_ICONV = 19,
+ XML_WITH_ISO8859X = 20,
+ XML_WITH_UNICODE = 21,
+ XML_WITH_REGEXP = 22,
+ XML_WITH_AUTOMATA = 23,
+ XML_WITH_EXPR = 24,
+ XML_WITH_SCHEMAS = 25,
+ XML_WITH_SCHEMATRON = 26,
+ XML_WITH_MODULES = 27,
+ XML_WITH_DEBUG = 28,
+ XML_WITH_DEBUG_MEM = 29,
+ XML_WITH_DEBUG_RUN = 30,
+ XML_WITH_ZLIB = 31,
+ XML_WITH_ICU = 32,
+ XML_WITH_NONE = 99999 /* just to be sure of allocation size */
+} xmlFeature;
+
+XMLPUBFUN int XMLCALL
+ xmlHasFeature (xmlFeature feature);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/parserInternals.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/parserInternals.h
new file mode 100644
index 0000000..10f1e16
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/parserInternals.h
@@ -0,0 +1,611 @@
+/*
+ * Summary: internals routines exported by the parser.
+ * Description: this module exports a number of internal parsing routines
+ * they are not really all intended for applications but
+ * can prove useful doing low level processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PARSER_INTERNALS_H__
+#define __XML_PARSER_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/parser.h>
+#include <libxml/HTMLparser.h>
+#include <libxml/chvalid.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserMaxDepth:
+ *
+ * arbitrary depth limit for the XML documents that we allow to
+ * process. This is not a limitation of the parser but a safety
+ * boundary feature, use XML_PARSE_HUGE option to override it.
+ */
+XMLPUBVAR unsigned int xmlParserMaxDepth;
+
+/**
+ * XML_MAX_TEXT_LENGTH:
+ *
+ * Maximum size allowed for a single text node when building a tree.
+ * This is not a limitation of the parser but a safety boundary feature,
+ * use XML_PARSE_HUGE option to override it.
+ */
+#define XML_MAX_TEXT_LENGTH 10000000
+
+/**
+ * XML_MAX_NAMELEN:
+ *
+ * Identifiers can be longer, but this will be more costly
+ * at runtime.
+ */
+#define XML_MAX_NAMELEN 100
+
+/**
+ * INPUT_CHUNK:
+ *
+ * The parser tries to always have that amount of input ready.
+ * One of the point is providing context when reporting errors.
+ */
+#define INPUT_CHUNK 250
+
+/************************************************************************
+ * *
+ * UNICODE version of the macros. *
+ * *
+ ************************************************************************/
+/**
+ * IS_BYTE_CHAR:
+ * @c: an byte value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20...]
+ * any byte character in the accepted range
+ */
+#define IS_BYTE_CHAR(c) xmlIsChar_ch(c)
+
+/**
+ * IS_CHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [2] Char ::= #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD]
+ * | [#x10000-#x10FFFF]
+ * any Unicode character, excluding the surrogate blocks, FFFE, and FFFF.
+ */
+#define IS_CHAR(c) xmlIsCharQ(c)
+
+/**
+ * IS_CHAR_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Behaves like IS_CHAR on single-byte value
+ */
+#define IS_CHAR_CH(c) xmlIsChar_ch(c)
+
+/**
+ * IS_BLANK:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [3] S ::= (#x20 | #x9 | #xD | #xA)+
+ */
+#define IS_BLANK(c) xmlIsBlankQ(c)
+
+/**
+ * IS_BLANK_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Behaviour same as IS_BLANK
+ */
+#define IS_BLANK_CH(c) xmlIsBlank_ch(c)
+
+/**
+ * IS_BASECHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [85] BaseChar ::= ... long list see REC ...
+ */
+#define IS_BASECHAR(c) xmlIsBaseCharQ(c)
+
+/**
+ * IS_DIGIT:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [88] Digit ::= ... long list see REC ...
+ */
+#define IS_DIGIT(c) xmlIsDigitQ(c)
+
+/**
+ * IS_DIGIT_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_DIGIT but with a single byte argument
+ */
+#define IS_DIGIT_CH(c) xmlIsDigit_ch(c)
+
+/**
+ * IS_COMBINING:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ * [87] CombiningChar ::= ... long list see REC ...
+ */
+#define IS_COMBINING(c) xmlIsCombiningQ(c)
+
+/**
+ * IS_COMBINING_CH:
+ * @c: an xmlChar (usually an unsigned char)
+ *
+ * Always false (all combining chars > 0xff)
+ */
+#define IS_COMBINING_CH(c) 0
+
+/**
+ * IS_EXTENDER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [89] Extender ::= #x00B7 | #x02D0 | #x02D1 | #x0387 | #x0640 |
+ * #x0E46 | #x0EC6 | #x3005 | [#x3031-#x3035] |
+ * [#x309D-#x309E] | [#x30FC-#x30FE]
+ */
+#define IS_EXTENDER(c) xmlIsExtenderQ(c)
+
+/**
+ * IS_EXTENDER_CH:
+ * @c: an xmlChar value (usually an unsigned char)
+ *
+ * Behaves like IS_EXTENDER but with a single-byte argument
+ */
+#define IS_EXTENDER_CH(c) xmlIsExtender_ch(c)
+
+/**
+ * IS_IDEOGRAPHIC:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [86] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | [#x3021-#x3029]
+ */
+#define IS_IDEOGRAPHIC(c) xmlIsIdeographicQ(c)
+
+/**
+ * IS_LETTER:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [84] Letter ::= BaseChar | Ideographic
+ */
+#define IS_LETTER(c) (IS_BASECHAR(c) || IS_IDEOGRAPHIC(c))
+
+/**
+ * IS_LETTER_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Macro behaves like IS_LETTER, but only check base chars
+ *
+ */
+#define IS_LETTER_CH(c) xmlIsBaseChar_ch(c)
+
+/**
+ * IS_ASCII_LETTER:
+ * @c: an xmlChar value
+ *
+ * Macro to check [a-zA-Z]
+ *
+ */
+#define IS_ASCII_LETTER(c) (((0x41 <= (c)) && ((c) <= 0x5a)) || \
+ ((0x61 <= (c)) && ((c) <= 0x7a)))
+
+/**
+ * IS_ASCII_DIGIT:
+ * @c: an xmlChar value
+ *
+ * Macro to check [0-9]
+ *
+ */
+#define IS_ASCII_DIGIT(c) ((0x30 <= (c)) && ((c) <= 0x39))
+
+/**
+ * IS_PUBIDCHAR:
+ * @c: an UNICODE value (int)
+ *
+ * Macro to check the following production in the XML spec:
+ *
+ *
+ * [13] PubidChar ::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%]
+ */
+#define IS_PUBIDCHAR(c) xmlIsPubidCharQ(c)
+
+/**
+ * IS_PUBIDCHAR_CH:
+ * @c: an xmlChar value (normally unsigned char)
+ *
+ * Same as IS_PUBIDCHAR but for single-byte value
+ */
+#define IS_PUBIDCHAR_CH(c) xmlIsPubidChar_ch(c)
+
+/**
+ * SKIP_EOL:
+ * @p: and UTF8 string pointer
+ *
+ * Skips the end of line chars.
+ */
+#define SKIP_EOL(p) \
+ if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \
+ if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }
+
+/**
+ * MOVETO_ENDTAG:
+ * @p: and UTF8 string pointer
+ *
+ * Skips to the next '>' char.
+ */
+#define MOVETO_ENDTAG(p) \
+ while ((*p) && (*(p) != '>')) (p)++
+
+/**
+ * MOVETO_STARTTAG:
+ * @p: and UTF8 string pointer
+ *
+ * Skips to the next '<' char.
+ */
+#define MOVETO_STARTTAG(p) \
+ while ((*p) && (*(p) != '<')) (p)++
+
+/**
+ * Global variables used for predefined strings.
+ */
+XMLPUBVAR const xmlChar xmlStringText[];
+XMLPUBVAR const xmlChar xmlStringTextNoenc[];
+XMLPUBVAR const xmlChar xmlStringComment[];
+
+/*
+ * Function to finish the work of the macros where needed.
+ */
+XMLPUBFUN int XMLCALL xmlIsLetter (int c);
+
+/**
+ * Parser context.
+ */
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateFileParserCtxt (const char *filename);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateURLParserCtxt (const char *filename,
+ int options);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateMemoryParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlCreateEntityParserCtxt(const xmlChar *URL,
+ const xmlChar *ID,
+ const xmlChar *base);
+XMLPUBFUN int XMLCALL
+ xmlSwitchEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ xmlSwitchToEncoding (xmlParserCtxtPtr ctxt,
+ xmlCharEncodingHandlerPtr handler);
+XMLPUBFUN int XMLCALL
+ xmlSwitchInputEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input,
+ xmlCharEncodingHandlerPtr handler);
+
+#ifdef IN_LIBXML
+/* internal error reporting */
+XMLPUBFUN void XMLCALL
+ __xmlErrEncoding (xmlParserCtxtPtr ctxt,
+ xmlParserErrors xmlerr,
+ const char *msg,
+ const xmlChar * str1,
+ const xmlChar * str2);
+#endif
+
+/**
+ * Input Streams.
+ */
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewStringInputStream (xmlParserCtxtPtr ctxt,
+ const xmlChar *buffer);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewEntityInputStream (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+XMLPUBFUN int XMLCALL
+ xmlPushInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr input);
+XMLPUBFUN xmlChar XMLCALL
+ xmlPopInput (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlFreeInputStream (xmlParserInputPtr input);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewInputFromFile (xmlParserCtxtPtr ctxt,
+ const char *filename);
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNewInputStream (xmlParserCtxtPtr ctxt);
+
+/**
+ * Namespaces.
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSplitQName (xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlChar **prefix);
+
+/**
+ * Generic production rules.
+ */
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseNmtoken (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseEntityValue (xmlParserCtxtPtr ctxt,
+ xmlChar **orig);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseAttValue (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseSystemLiteral (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParsePubidLiteral (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseCharData (xmlParserCtxtPtr ctxt,
+ int cdata);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseExternalID (xmlParserCtxtPtr ctxt,
+ xmlChar **publicID,
+ int strict);
+XMLPUBFUN void XMLCALL
+ xmlParseComment (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParsePITarget (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParsePI (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseNotationDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseEntityDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseDefaultDecl (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlParseNotationType (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlParseEnumerationType (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseEnumeratedType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XMLPUBFUN int XMLCALL
+ xmlParseAttributeType (xmlParserCtxtPtr ctxt,
+ xmlEnumerationPtr *tree);
+XMLPUBFUN void XMLCALL
+ xmlParseAttributeListDecl(xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlParseElementMixedContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlParseElementChildrenContentDecl
+ (xmlParserCtxtPtr ctxt,
+ int inputchk);
+XMLPUBFUN int XMLCALL
+ xmlParseElementContentDecl(xmlParserCtxtPtr ctxt,
+ const xmlChar *name,
+ xmlElementContentPtr *result);
+XMLPUBFUN int XMLCALL
+ xmlParseElementDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseMarkupDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseCharRef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlEntityPtr XMLCALL
+ xmlParseEntityRef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseReference (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParsePEReference (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseDocTypeDecl (xmlParserCtxtPtr ctxt);
+#ifdef LIBXML_SAX1_ENABLED
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseAttribute (xmlParserCtxtPtr ctxt,
+ xmlChar **value);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseStartTag (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseEndTag (xmlParserCtxtPtr ctxt);
+#endif /* LIBXML_SAX1_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlParseCDSect (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseContent (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseElement (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseVersionNum (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseVersionInfo (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseEncName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlParseEncodingDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlParseSDDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseXMLDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseTextDecl (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseMisc (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseExternalSubset (xmlParserCtxtPtr ctxt,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+/**
+ * XML_SUBSTITUTE_NONE:
+ *
+ * If no entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_NONE 0
+/**
+ * XML_SUBSTITUTE_REF:
+ *
+ * Whether general entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_REF 1
+/**
+ * XML_SUBSTITUTE_PEREF:
+ *
+ * Whether parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_PEREF 2
+/**
+ * XML_SUBSTITUTE_BOTH:
+ *
+ * Both general and parameter entities need to be substituted.
+ */
+#define XML_SUBSTITUTE_BOTH 3
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStringDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStringLenDecodeEntities (xmlParserCtxtPtr ctxt,
+ const xmlChar *str,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+
+/*
+ * Generated by MACROS on top of parser.c c.f. PUSH_AND_POP.
+ */
+XMLPUBFUN int XMLCALL nodePush (xmlParserCtxtPtr ctxt,
+ xmlNodePtr value);
+XMLPUBFUN xmlNodePtr XMLCALL nodePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL inputPush (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr value);
+XMLPUBFUN xmlParserInputPtr XMLCALL inputPop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN const xmlChar * XMLCALL namePop (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL namePush (xmlParserCtxtPtr ctxt,
+ const xmlChar *value);
+
+/*
+ * other commodities shared between parser.c and parserInternals.
+ */
+XMLPUBFUN int XMLCALL xmlSkipBlankChars (xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL xmlStringCurrentChar (xmlParserCtxtPtr ctxt,
+ const xmlChar *cur,
+ int *len);
+XMLPUBFUN void XMLCALL xmlParserHandlePEReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL xmlCheckLanguageID (const xmlChar *lang);
+
+/*
+ * Really core function shared with HTML parser.
+ */
+XMLPUBFUN int XMLCALL xmlCurrentChar (xmlParserCtxtPtr ctxt,
+ int *len);
+XMLPUBFUN int XMLCALL xmlCopyCharMultiByte (xmlChar *out,
+ int val);
+XMLPUBFUN int XMLCALL xmlCopyChar (int len,
+ xmlChar *out,
+ int val);
+XMLPUBFUN void XMLCALL xmlNextChar (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL xmlParserInputShrink (xmlParserInputPtr in);
+
+#ifdef LIBXML_HTML_ENABLED
+/*
+ * Actually comes from the HTML parser but launched from the init stuff.
+ */
+XMLPUBFUN void XMLCALL htmlInitAutoClose (void);
+XMLPUBFUN htmlParserCtxtPtr XMLCALL htmlCreateFileParserCtxt(const char *filename,
+ const char *encoding);
+#endif
+
+/*
+ * Specific function to keep track of entities references
+ * and used by the XSLT debugger.
+ */
+#ifdef LIBXML_LEGACY_ENABLED
+/**
+ * xmlEntityReferenceFunc:
+ * @ent: the entity
+ * @firstNode: the fist node in the chunk
+ * @lastNode: the last nod in the chunk
+ *
+ * Callback function used when one needs to be able to track back the
+ * provenance of a chunk of nodes inherited from an entity replacement.
+ */
+typedef void (*xmlEntityReferenceFunc) (xmlEntityPtr ent,
+ xmlNodePtr firstNode,
+ xmlNodePtr lastNode);
+
+XMLPUBFUN void XMLCALL xmlSetEntityReferenceFunc (xmlEntityReferenceFunc func);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlParseQuotedString (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlParseNamespace (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseNSDef (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlScanName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseNCName (xmlParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL xmlParserHandleReference(xmlParserCtxtPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNamespaceParseQName (xmlParserCtxtPtr ctxt,
+ xmlChar **prefix);
+/**
+ * Entities
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlDecodeEntities (xmlParserCtxtPtr ctxt,
+ int len,
+ int what,
+ xmlChar end,
+ xmlChar end2,
+ xmlChar end3);
+XMLPUBFUN void XMLCALL
+ xmlHandleEntity (xmlParserCtxtPtr ctxt,
+ xmlEntityPtr entity);
+
+#endif /* LIBXML_LEGACY_ENABLED */
+
+#ifdef IN_LIBXML
+/*
+ * internal only
+ */
+XMLPUBFUN void XMLCALL
+ xmlErrMemory (xmlParserCtxtPtr ctxt,
+ const char *extra);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_PARSER_INTERNALS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/pattern.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/pattern.h
new file mode 100644
index 0000000..97d2cd2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/pattern.h
@@ -0,0 +1,100 @@
+/*
+ * Summary: pattern expression handling
+ * Description: allows to compile and test pattern expressions for nodes
+ * either in a tree or based on a parser state.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_PATTERN_H__
+#define __XML_PATTERN_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+
+#ifdef LIBXML_PATTERN_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlPattern:
+ *
+ * A compiled (XPath based) pattern to select nodes
+ */
+typedef struct _xmlPattern xmlPattern;
+typedef xmlPattern *xmlPatternPtr;
+
+/**
+ * xmlPatternFlags:
+ *
+ * This is the set of options affecting the behaviour of pattern
+ * matching with this module
+ *
+ */
+typedef enum {
+ XML_PATTERN_DEFAULT = 0, /* simple pattern match */
+ XML_PATTERN_XPATH = 1<<0, /* standard XPath pattern */
+ XML_PATTERN_XSSEL = 1<<1, /* XPath subset for schema selector */
+ XML_PATTERN_XSFIELD = 1<<2 /* XPath subset for schema field */
+} xmlPatternFlags;
+
+XMLPUBFUN void XMLCALL
+ xmlFreePattern (xmlPatternPtr comp);
+
+XMLPUBFUN void XMLCALL
+ xmlFreePatternList (xmlPatternPtr comp);
+
+XMLPUBFUN xmlPatternPtr XMLCALL
+ xmlPatterncompile (const xmlChar *pattern,
+ xmlDict *dict,
+ int flags,
+ const xmlChar **namespaces);
+XMLPUBFUN int XMLCALL
+ xmlPatternMatch (xmlPatternPtr comp,
+ xmlNodePtr node);
+
+/* streaming interfaces */
+typedef struct _xmlStreamCtxt xmlStreamCtxt;
+typedef xmlStreamCtxt *xmlStreamCtxtPtr;
+
+XMLPUBFUN int XMLCALL
+ xmlPatternStreamable (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternMaxDepth (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternMinDepth (xmlPatternPtr comp);
+XMLPUBFUN int XMLCALL
+ xmlPatternFromRoot (xmlPatternPtr comp);
+XMLPUBFUN xmlStreamCtxtPtr XMLCALL
+ xmlPatternGetStreamCtxt (xmlPatternPtr comp);
+XMLPUBFUN void XMLCALL
+ xmlFreeStreamCtxt (xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+ xmlStreamPushNode (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns,
+ int nodeType);
+XMLPUBFUN int XMLCALL
+ xmlStreamPush (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlStreamPushAttr (xmlStreamCtxtPtr stream,
+ const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlStreamPop (xmlStreamCtxtPtr stream);
+XMLPUBFUN int XMLCALL
+ xmlStreamWantsAnyNode (xmlStreamCtxtPtr stream);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_PATTERN_ENABLED */
+
+#endif /* __XML_PATTERN_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/relaxng.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/relaxng.h
new file mode 100644
index 0000000..bdb0a7d
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/relaxng.h
@@ -0,0 +1,213 @@
+/*
+ * Summary: implementation of the Relax-NG validation
+ * Description: implementation of the Relax-NG validation
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_RELAX_NG__
+#define __XML_RELAX_NG__
+
+#include <libxml/xmlversion.h>
+#include <libxml/hash.h>
+#include <libxml/xmlstring.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _xmlRelaxNG xmlRelaxNG;
+typedef xmlRelaxNG *xmlRelaxNGPtr;
+
+
+/**
+ * xmlRelaxNGValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Relax-NG validation
+ */
+typedef void (XMLCDECL *xmlRelaxNGValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlRelaxNGValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Relax-NG validation
+ */
+typedef void (XMLCDECL *xmlRelaxNGValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlRelaxNGParserCtxt xmlRelaxNGParserCtxt;
+typedef xmlRelaxNGParserCtxt *xmlRelaxNGParserCtxtPtr;
+
+typedef struct _xmlRelaxNGValidCtxt xmlRelaxNGValidCtxt;
+typedef xmlRelaxNGValidCtxt *xmlRelaxNGValidCtxtPtr;
+
+/*
+ * xmlRelaxNGValidErr:
+ *
+ * List of possible Relax NG validation errors
+ */
+typedef enum {
+ XML_RELAXNG_OK = 0,
+ XML_RELAXNG_ERR_MEMORY,
+ XML_RELAXNG_ERR_TYPE,
+ XML_RELAXNG_ERR_TYPEVAL,
+ XML_RELAXNG_ERR_DUPID,
+ XML_RELAXNG_ERR_TYPECMP,
+ XML_RELAXNG_ERR_NOSTATE,
+ XML_RELAXNG_ERR_NODEFINE,
+ XML_RELAXNG_ERR_LISTEXTRA,
+ XML_RELAXNG_ERR_LISTEMPTY,
+ XML_RELAXNG_ERR_INTERNODATA,
+ XML_RELAXNG_ERR_INTERSEQ,
+ XML_RELAXNG_ERR_INTEREXTRA,
+ XML_RELAXNG_ERR_ELEMNAME,
+ XML_RELAXNG_ERR_ATTRNAME,
+ XML_RELAXNG_ERR_ELEMNONS,
+ XML_RELAXNG_ERR_ATTRNONS,
+ XML_RELAXNG_ERR_ELEMWRONGNS,
+ XML_RELAXNG_ERR_ATTRWRONGNS,
+ XML_RELAXNG_ERR_ELEMEXTRANS,
+ XML_RELAXNG_ERR_ATTREXTRANS,
+ XML_RELAXNG_ERR_ELEMNOTEMPTY,
+ XML_RELAXNG_ERR_NOELEM,
+ XML_RELAXNG_ERR_NOTELEM,
+ XML_RELAXNG_ERR_ATTRVALID,
+ XML_RELAXNG_ERR_CONTENTVALID,
+ XML_RELAXNG_ERR_EXTRACONTENT,
+ XML_RELAXNG_ERR_INVALIDATTR,
+ XML_RELAXNG_ERR_DATAELEM,
+ XML_RELAXNG_ERR_VALELEM,
+ XML_RELAXNG_ERR_LISTELEM,
+ XML_RELAXNG_ERR_DATATYPE,
+ XML_RELAXNG_ERR_VALUE,
+ XML_RELAXNG_ERR_LIST,
+ XML_RELAXNG_ERR_NOGRAMMAR,
+ XML_RELAXNG_ERR_EXTRADATA,
+ XML_RELAXNG_ERR_LACKDATA,
+ XML_RELAXNG_ERR_INTERNAL,
+ XML_RELAXNG_ERR_ELEMWRONG,
+ XML_RELAXNG_ERR_TEXTWRONG
+} xmlRelaxNGValidErr;
+
+/*
+ * xmlRelaxNGParserFlags:
+ *
+ * List of possible Relax NG Parser flags
+ */
+typedef enum {
+ XML_RELAXNGP_NONE = 0,
+ XML_RELAXNGP_FREE_DOC = 1,
+ XML_RELAXNGP_CRNG = 2
+} xmlRelaxNGParserFlag;
+
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGInitTypes (void);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGCleanupTypes (void);
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewParserCtxt (const char *URL);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlRelaxNGParserCtxtPtr XMLCALL
+ xmlRelaxNGNewDocParserCtxt (xmlDocPtr doc);
+
+XMLPUBFUN int XMLCALL
+ xmlRelaxParserSetFlag (xmlRelaxNGParserCtxtPtr ctxt,
+ int flag);
+
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFreeParserCtxt (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGGetParserErrors(xmlRelaxNGParserCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetParserStructuredErrors(
+ xmlRelaxNGParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN xmlRelaxNGPtr XMLCALL
+ xmlRelaxNGParse (xmlRelaxNGParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFree (xmlRelaxNGPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGDump (FILE *output,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGDumpTree (FILE * output,
+ xmlRelaxNGPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc err,
+ xmlRelaxNGValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGGetValidErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlRelaxNGValidityErrorFunc *err,
+ xmlRelaxNGValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGSetValidStructuredErrors(xmlRelaxNGValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror, void *ctx);
+XMLPUBFUN xmlRelaxNGValidCtxtPtr XMLCALL
+ xmlRelaxNGNewValidCtxt (xmlRelaxNGPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlRelaxNGFreeValidCtxt (xmlRelaxNGValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidateDoc (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+/*
+ * Interfaces for progressive validation when possible
+ */
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePushElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePushCData (xmlRelaxNGValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidatePopElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlRelaxNGValidateFullElement (xmlRelaxNGValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+
+#endif /* __XML_RELAX_NG__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/schemasInternals.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/schemasInternals.h
new file mode 100644
index 0000000..4f0ca9a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/schemasInternals.h
@@ -0,0 +1,958 @@
+/*
+ * Summary: internal interfaces for XML Schemas
+ * Description: internal interfaces for the XML Schemas handling
+ * and schema validity checking
+ * The Schemas development is a Work In Progress.
+ * Some of those interfaces are not garanteed to be API or ABI stable !
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_INTERNALS_H__
+#define __XML_SCHEMA_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/xmlregexp.h>
+#include <libxml/hash.h>
+#include <libxml/dict.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMAS_UNKNOWN = 0,
+ XML_SCHEMAS_STRING,
+ XML_SCHEMAS_NORMSTRING,
+ XML_SCHEMAS_DECIMAL,
+ XML_SCHEMAS_TIME,
+ XML_SCHEMAS_GDAY,
+ XML_SCHEMAS_GMONTH,
+ XML_SCHEMAS_GMONTHDAY,
+ XML_SCHEMAS_GYEAR,
+ XML_SCHEMAS_GYEARMONTH,
+ XML_SCHEMAS_DATE,
+ XML_SCHEMAS_DATETIME,
+ XML_SCHEMAS_DURATION,
+ XML_SCHEMAS_FLOAT,
+ XML_SCHEMAS_DOUBLE,
+ XML_SCHEMAS_BOOLEAN,
+ XML_SCHEMAS_TOKEN,
+ XML_SCHEMAS_LANGUAGE,
+ XML_SCHEMAS_NMTOKEN,
+ XML_SCHEMAS_NMTOKENS,
+ XML_SCHEMAS_NAME,
+ XML_SCHEMAS_QNAME,
+ XML_SCHEMAS_NCNAME,
+ XML_SCHEMAS_ID,
+ XML_SCHEMAS_IDREF,
+ XML_SCHEMAS_IDREFS,
+ XML_SCHEMAS_ENTITY,
+ XML_SCHEMAS_ENTITIES,
+ XML_SCHEMAS_NOTATION,
+ XML_SCHEMAS_ANYURI,
+ XML_SCHEMAS_INTEGER,
+ XML_SCHEMAS_NPINTEGER,
+ XML_SCHEMAS_NINTEGER,
+ XML_SCHEMAS_NNINTEGER,
+ XML_SCHEMAS_PINTEGER,
+ XML_SCHEMAS_INT,
+ XML_SCHEMAS_UINT,
+ XML_SCHEMAS_LONG,
+ XML_SCHEMAS_ULONG,
+ XML_SCHEMAS_SHORT,
+ XML_SCHEMAS_USHORT,
+ XML_SCHEMAS_BYTE,
+ XML_SCHEMAS_UBYTE,
+ XML_SCHEMAS_HEXBINARY,
+ XML_SCHEMAS_BASE64BINARY,
+ XML_SCHEMAS_ANYTYPE,
+ XML_SCHEMAS_ANYSIMPLETYPE
+} xmlSchemaValType;
+
+/*
+ * XML Schemas defines multiple type of types.
+ */
+typedef enum {
+ XML_SCHEMA_TYPE_BASIC = 1, /* A built-in datatype */
+ XML_SCHEMA_TYPE_ANY,
+ XML_SCHEMA_TYPE_FACET,
+ XML_SCHEMA_TYPE_SIMPLE,
+ XML_SCHEMA_TYPE_COMPLEX,
+ XML_SCHEMA_TYPE_SEQUENCE = 6,
+ XML_SCHEMA_TYPE_CHOICE,
+ XML_SCHEMA_TYPE_ALL,
+ XML_SCHEMA_TYPE_SIMPLE_CONTENT,
+ XML_SCHEMA_TYPE_COMPLEX_CONTENT,
+ XML_SCHEMA_TYPE_UR,
+ XML_SCHEMA_TYPE_RESTRICTION,
+ XML_SCHEMA_TYPE_EXTENSION,
+ XML_SCHEMA_TYPE_ELEMENT,
+ XML_SCHEMA_TYPE_ATTRIBUTE,
+ XML_SCHEMA_TYPE_ATTRIBUTEGROUP,
+ XML_SCHEMA_TYPE_GROUP,
+ XML_SCHEMA_TYPE_NOTATION,
+ XML_SCHEMA_TYPE_LIST,
+ XML_SCHEMA_TYPE_UNION,
+ XML_SCHEMA_TYPE_ANY_ATTRIBUTE,
+ XML_SCHEMA_TYPE_IDC_UNIQUE,
+ XML_SCHEMA_TYPE_IDC_KEY,
+ XML_SCHEMA_TYPE_IDC_KEYREF,
+ XML_SCHEMA_TYPE_PARTICLE = 25,
+ XML_SCHEMA_TYPE_ATTRIBUTE_USE,
+ XML_SCHEMA_FACET_MININCLUSIVE = 1000,
+ XML_SCHEMA_FACET_MINEXCLUSIVE,
+ XML_SCHEMA_FACET_MAXINCLUSIVE,
+ XML_SCHEMA_FACET_MAXEXCLUSIVE,
+ XML_SCHEMA_FACET_TOTALDIGITS,
+ XML_SCHEMA_FACET_FRACTIONDIGITS,
+ XML_SCHEMA_FACET_PATTERN,
+ XML_SCHEMA_FACET_ENUMERATION,
+ XML_SCHEMA_FACET_WHITESPACE,
+ XML_SCHEMA_FACET_LENGTH,
+ XML_SCHEMA_FACET_MAXLENGTH,
+ XML_SCHEMA_FACET_MINLENGTH,
+ XML_SCHEMA_EXTRA_QNAMEREF = 2000,
+ XML_SCHEMA_EXTRA_ATTR_USE_PROHIB
+} xmlSchemaTypeType;
+
+typedef enum {
+ XML_SCHEMA_CONTENT_UNKNOWN = 0,
+ XML_SCHEMA_CONTENT_EMPTY = 1,
+ XML_SCHEMA_CONTENT_ELEMENTS,
+ XML_SCHEMA_CONTENT_MIXED,
+ XML_SCHEMA_CONTENT_SIMPLE,
+ XML_SCHEMA_CONTENT_MIXED_OR_ELEMENTS, /* Obsolete */
+ XML_SCHEMA_CONTENT_BASIC,
+ XML_SCHEMA_CONTENT_ANY
+} xmlSchemaContentType;
+
+typedef struct _xmlSchemaVal xmlSchemaVal;
+typedef xmlSchemaVal *xmlSchemaValPtr;
+
+typedef struct _xmlSchemaType xmlSchemaType;
+typedef xmlSchemaType *xmlSchemaTypePtr;
+
+typedef struct _xmlSchemaFacet xmlSchemaFacet;
+typedef xmlSchemaFacet *xmlSchemaFacetPtr;
+
+/**
+ * Annotation
+ */
+typedef struct _xmlSchemaAnnot xmlSchemaAnnot;
+typedef xmlSchemaAnnot *xmlSchemaAnnotPtr;
+struct _xmlSchemaAnnot {
+ struct _xmlSchemaAnnot *next;
+ xmlNodePtr content; /* the annotation */
+};
+
+/**
+ * XML_SCHEMAS_ANYATTR_SKIP:
+ *
+ * Skip unknown attribute from validation
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_SKIP 1
+/**
+ * XML_SCHEMAS_ANYATTR_LAX:
+ *
+ * Ignore validation non definition on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_LAX 2
+/**
+ * XML_SCHEMAS_ANYATTR_STRICT:
+ *
+ * Apply strict validation rules on attributes
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ANYATTR_STRICT 3
+/**
+ * XML_SCHEMAS_ANY_SKIP:
+ *
+ * Skip unknown attribute from validation
+ */
+#define XML_SCHEMAS_ANY_SKIP 1
+/**
+ * XML_SCHEMAS_ANY_LAX:
+ *
+ * Used by wildcards.
+ * Validate if type found, don't worry if not found
+ */
+#define XML_SCHEMAS_ANY_LAX 2
+/**
+ * XML_SCHEMAS_ANY_STRICT:
+ *
+ * Used by wildcards.
+ * Apply strict validation rules
+ */
+#define XML_SCHEMAS_ANY_STRICT 3
+/**
+ * XML_SCHEMAS_ATTR_USE_PROHIBITED:
+ *
+ * Used by wildcards.
+ * The attribute is prohibited.
+ */
+#define XML_SCHEMAS_ATTR_USE_PROHIBITED 0
+/**
+ * XML_SCHEMAS_ATTR_USE_REQUIRED:
+ *
+ * The attribute is required.
+ */
+#define XML_SCHEMAS_ATTR_USE_REQUIRED 1
+/**
+ * XML_SCHEMAS_ATTR_USE_OPTIONAL:
+ *
+ * The attribute is optional.
+ */
+#define XML_SCHEMAS_ATTR_USE_OPTIONAL 2
+/**
+ * XML_SCHEMAS_ATTR_GLOBAL:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_GLOBAL 1 << 0
+/**
+ * XML_SCHEMAS_ATTR_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ */
+#define XML_SCHEMAS_ATTR_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ATTR_INTERNAL_RESOLVED:
+ *
+ * this is set when the "type" and "ref" references
+ * have been resolved.
+ */
+#define XML_SCHEMAS_ATTR_INTERNAL_RESOLVED 1 << 8
+/**
+ * XML_SCHEMAS_ATTR_FIXED:
+ *
+ * the attribute has a fixed value
+ */
+#define XML_SCHEMAS_ATTR_FIXED 1 << 9
+
+/**
+ * xmlSchemaAttribute:
+ * An attribute definition.
+ */
+
+typedef struct _xmlSchemaAttribute xmlSchemaAttribute;
+typedef xmlSchemaAttribute *xmlSchemaAttributePtr;
+struct _xmlSchemaAttribute {
+ xmlSchemaTypeType type;
+ struct _xmlSchemaAttribute *next; /* the next attribute (not used?) */
+ const xmlChar *name; /* the name of the declaration */
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ const xmlChar *typeName; /* the local name of the type definition */
+ const xmlChar *typeNs; /* the ns URI of the type definition */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaTypePtr base; /* Deprecated; not used */
+ int occurs; /* Deprecated; not used */
+ const xmlChar *defValue; /* The initial value of the value constraint */
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlNodePtr node;
+ const xmlChar *targetNamespace;
+ int flags;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value constraint */
+ xmlSchemaAttributePtr refDecl; /* Deprecated; not used */
+};
+
+/**
+ * xmlSchemaAttributeLink:
+ * Used to build a list of attribute uses on complexType definitions.
+ * WARNING: Deprecated; not used.
+ */
+typedef struct _xmlSchemaAttributeLink xmlSchemaAttributeLink;
+typedef xmlSchemaAttributeLink *xmlSchemaAttributeLinkPtr;
+struct _xmlSchemaAttributeLink {
+ struct _xmlSchemaAttributeLink *next;/* the next attribute link ... */
+ struct _xmlSchemaAttribute *attr;/* the linked attribute */
+};
+
+/**
+ * XML_SCHEMAS_WILDCARD_COMPLETE:
+ *
+ * If the wildcard is complete.
+ */
+#define XML_SCHEMAS_WILDCARD_COMPLETE 1 << 0
+
+/**
+ * xmlSchemaCharValueLink:
+ * Used to build a list of namespaces on wildcards.
+ */
+typedef struct _xmlSchemaWildcardNs xmlSchemaWildcardNs;
+typedef xmlSchemaWildcardNs *xmlSchemaWildcardNsPtr;
+struct _xmlSchemaWildcardNs {
+ struct _xmlSchemaWildcardNs *next;/* the next constraint link ... */
+ const xmlChar *value;/* the value */
+};
+
+/**
+ * xmlSchemaWildcard.
+ * A wildcard.
+ */
+typedef struct _xmlSchemaWildcard xmlSchemaWildcard;
+typedef xmlSchemaWildcard *xmlSchemaWildcardPtr;
+struct _xmlSchemaWildcard {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *id; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+ int processContents;
+ int any; /* Indicates if the ns constraint is of ##any */
+ xmlSchemaWildcardNsPtr nsSet; /* The list of allowed namespaces */
+ xmlSchemaWildcardNsPtr negNsSet; /* The negated namespace */
+ int flags;
+};
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED:
+ *
+ * The attribute wildcard has been already builded.
+ */
+#define XML_SCHEMAS_ATTRGROUP_WILDCARD_BUILDED 1 << 0
+/**
+ * XML_SCHEMAS_ATTRGROUP_GLOBAL:
+ *
+ * The attribute wildcard has been already builded.
+ */
+#define XML_SCHEMAS_ATTRGROUP_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ATTRGROUP_MARKED:
+ *
+ * Marks the attr group as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_ATTRGROUP_MARKED 1 << 2
+
+/**
+ * XML_SCHEMAS_ATTRGROUP_REDEFINED:
+ *
+ * The attr group was redefined.
+ */
+#define XML_SCHEMAS_ATTRGROUP_REDEFINED 1 << 3
+/**
+ * XML_SCHEMAS_ATTRGROUP_HAS_REFS:
+ *
+ * Whether this attr. group contains attr. group references.
+ */
+#define XML_SCHEMAS_ATTRGROUP_HAS_REFS 1 << 4
+
+/**
+ * An attribute group definition.
+ *
+ * xmlSchemaAttribute and xmlSchemaAttributeGroup start of structures
+ * must be kept similar
+ */
+typedef struct _xmlSchemaAttributeGroup xmlSchemaAttributeGroup;
+typedef xmlSchemaAttributeGroup *xmlSchemaAttributeGroupPtr;
+struct _xmlSchemaAttributeGroup {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaAttribute *next;/* the next attribute if in a group ... */
+ const xmlChar *name;
+ const xmlChar *id;
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int flags;
+ xmlSchemaWildcardPtr attributeWildcard;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaAttributeGroupPtr refItem; /* Deprecated; not used */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/**
+ * xmlSchemaTypeLink:
+ * Used to build a list of types (e.g. member types of
+ * simpleType with variety "union").
+ */
+typedef struct _xmlSchemaTypeLink xmlSchemaTypeLink;
+typedef xmlSchemaTypeLink *xmlSchemaTypeLinkPtr;
+struct _xmlSchemaTypeLink {
+ struct _xmlSchemaTypeLink *next;/* the next type link ... */
+ xmlSchemaTypePtr type;/* the linked type */
+};
+
+/**
+ * xmlSchemaFacetLink:
+ * Used to build a list of facets.
+ */
+typedef struct _xmlSchemaFacetLink xmlSchemaFacetLink;
+typedef xmlSchemaFacetLink *xmlSchemaFacetLinkPtr;
+struct _xmlSchemaFacetLink {
+ struct _xmlSchemaFacetLink *next;/* the next facet link ... */
+ xmlSchemaFacetPtr facet;/* the linked facet */
+};
+
+/**
+ * XML_SCHEMAS_TYPE_MIXED:
+ *
+ * the element content type is mixed
+ */
+#define XML_SCHEMAS_TYPE_MIXED 1 << 0
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION:
+ *
+ * the simple or complex type has a derivation method of "extension".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_EXTENSION 1 << 1
+/**
+ * XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION:
+ *
+ * the simple or complex type has a derivation method of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_DERIVATION_METHOD_RESTRICTION 1 << 2
+/**
+ * XML_SCHEMAS_TYPE_GLOBAL:
+ *
+ * the type is global
+ */
+#define XML_SCHEMAS_TYPE_GLOBAL 1 << 3
+/**
+ * XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD:
+ *
+ * the complexType owns an attribute wildcard, i.e.
+ * it can be freed by the complexType
+ */
+#define XML_SCHEMAS_TYPE_OWNED_ATTR_WILDCARD 1 << 4 /* Obsolete. */
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ABSENT:
+ *
+ * the simpleType has a variety of "absent".
+ * TODO: Actually not necessary :-/, since if
+ * none of the variety flags occur then it's
+ * automatically absent.
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ABSENT 1 << 5
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_LIST:
+ *
+ * the simpleType has a variety of "list".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_LIST 1 << 6
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_UNION:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_UNION 1 << 7
+/**
+ * XML_SCHEMAS_TYPE_VARIETY_ATOMIC:
+ *
+ * the simpleType has a variety of "union".
+ */
+#define XML_SCHEMAS_TYPE_VARIETY_ATOMIC 1 << 8
+/**
+ * XML_SCHEMAS_TYPE_FINAL_EXTENSION:
+ *
+ * the complexType has a final of "extension".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_EXTENSION 1 << 9
+/**
+ * XML_SCHEMAS_TYPE_FINAL_RESTRICTION:
+ *
+ * the simpleType/complexType has a final of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_RESTRICTION 1 << 10
+/**
+ * XML_SCHEMAS_TYPE_FINAL_LIST:
+ *
+ * the simpleType has a final of "list".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_LIST 1 << 11
+/**
+ * XML_SCHEMAS_TYPE_FINAL_UNION:
+ *
+ * the simpleType has a final of "union".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_UNION 1 << 12
+/**
+ * XML_SCHEMAS_TYPE_FINAL_DEFAULT:
+ *
+ * the simpleType has a final of "default".
+ */
+#define XML_SCHEMAS_TYPE_FINAL_DEFAULT 1 << 13
+/**
+ * XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE:
+ *
+ * Marks the item as a builtin primitive.
+ */
+#define XML_SCHEMAS_TYPE_BUILTIN_PRIMITIVE 1 << 14
+/**
+ * XML_SCHEMAS_TYPE_MARKED:
+ *
+ * Marks the item as marked; used for circular checks.
+ */
+#define XML_SCHEMAS_TYPE_MARKED 1 << 16
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_DEFAULT:
+ *
+ * the complexType did not specify 'block' so use the default of the
+ * <schema> item.
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_DEFAULT 1 << 17
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_EXTENSION:
+ *
+ * the complexType has a 'block' of "extension".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_EXTENSION 1 << 18
+/**
+ * XML_SCHEMAS_TYPE_BLOCK_RESTRICTION:
+ *
+ * the complexType has a 'block' of "restriction".
+ */
+#define XML_SCHEMAS_TYPE_BLOCK_RESTRICTION 1 << 19
+/**
+ * XML_SCHEMAS_TYPE_ABSTRACT:
+ *
+ * the simple/complexType is abstract.
+ */
+#define XML_SCHEMAS_TYPE_ABSTRACT 1 << 20
+/**
+ * XML_SCHEMAS_TYPE_FACETSNEEDVALUE:
+ *
+ * indicates if the facets need a computed value
+ */
+#define XML_SCHEMAS_TYPE_FACETSNEEDVALUE 1 << 21
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_RESOLVED:
+ *
+ * indicates that the type was typefixed
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_RESOLVED 1 << 22
+/**
+ * XML_SCHEMAS_TYPE_INTERNAL_INVALID:
+ *
+ * indicates that the type is invalid
+ */
+#define XML_SCHEMAS_TYPE_INTERNAL_INVALID 1 << 23
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE:
+ *
+ * a whitespace-facet value of "preserve"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_PRESERVE 1 << 24
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_REPLACE:
+ *
+ * a whitespace-facet value of "replace"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_REPLACE 1 << 25
+/**
+ * XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE:
+ *
+ * a whitespace-facet value of "collapse"
+ */
+#define XML_SCHEMAS_TYPE_WHITESPACE_COLLAPSE 1 << 26
+/**
+ * XML_SCHEMAS_TYPE_HAS_FACETS:
+ *
+ * has facets
+ */
+#define XML_SCHEMAS_TYPE_HAS_FACETS 1 << 27
+/**
+ * XML_SCHEMAS_TYPE_NORMVALUENEEDED:
+ *
+ * indicates if the facets (pattern) need a normalized value
+ */
+#define XML_SCHEMAS_TYPE_NORMVALUENEEDED 1 << 28
+
+/**
+ * XML_SCHEMAS_TYPE_FIXUP_1:
+ *
+ * First stage of fixup was done.
+ */
+#define XML_SCHEMAS_TYPE_FIXUP_1 1 << 29
+
+/**
+ * XML_SCHEMAS_TYPE_REDEFINED:
+ *
+ * The type was redefined.
+ */
+#define XML_SCHEMAS_TYPE_REDEFINED 1 << 30
+/**
+ * XML_SCHEMAS_TYPE_REDEFINING:
+ *
+ * The type redefines an other type.
+ */
+/* #define XML_SCHEMAS_TYPE_REDEFINING 1 << 31 */
+
+/**
+ * _xmlSchemaType:
+ *
+ * Schemas type definition.
+ */
+struct _xmlSchemaType {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* the next type if in a sequence ... */
+ const xmlChar *name;
+ const xmlChar *id ; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes;
+ xmlSchemaAttributePtr attributes; /* Deprecated; not used */
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ xmlSchemaContentType contentType;
+ const xmlChar *base; /* Base type's local name */
+ const xmlChar *baseNs; /* Base type's target namespace */
+ xmlSchemaTypePtr baseType; /* The base type component */
+ xmlSchemaFacetPtr facets; /* Local facets */
+ struct _xmlSchemaType *redef; /* Deprecated; not used */
+ int recurse; /* Obsolete */
+ xmlSchemaAttributeLinkPtr *attributeUses; /* Deprecated; not used */
+ xmlSchemaWildcardPtr attributeWildcard;
+ int builtInType; /* Type of built-in types. */
+ xmlSchemaTypeLinkPtr memberTypes; /* member-types if a union type. */
+ xmlSchemaFacetLinkPtr facetSet; /* All facets (incl. inherited) */
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaTypePtr contentTypeDef; /* Used for the simple content of complex types.
+ Could we use @subtypes for this? */
+ xmlRegexpPtr contModel; /* Holds the automaton of the content model */
+ const xmlChar *targetNamespace;
+ void *attrUses;
+};
+
+/*
+ * xmlSchemaElement:
+ * An element definition.
+ *
+ * xmlSchemaType, xmlSchemaFacet and xmlSchemaElement start of
+ * structures must be kept similar
+ */
+/**
+ * XML_SCHEMAS_ELEM_NILLABLE:
+ *
+ * the element is nillable
+ */
+#define XML_SCHEMAS_ELEM_NILLABLE 1 << 0
+/**
+ * XML_SCHEMAS_ELEM_GLOBAL:
+ *
+ * the element is global
+ */
+#define XML_SCHEMAS_ELEM_GLOBAL 1 << 1
+/**
+ * XML_SCHEMAS_ELEM_DEFAULT:
+ *
+ * the element has a default value
+ */
+#define XML_SCHEMAS_ELEM_DEFAULT 1 << 2
+/**
+ * XML_SCHEMAS_ELEM_FIXED:
+ *
+ * the element has a fixed value
+ */
+#define XML_SCHEMAS_ELEM_FIXED 1 << 3
+/**
+ * XML_SCHEMAS_ELEM_ABSTRACT:
+ *
+ * the element is abstract
+ */
+#define XML_SCHEMAS_ELEM_ABSTRACT 1 << 4
+/**
+ * XML_SCHEMAS_ELEM_TOPLEVEL:
+ *
+ * the element is top level
+ * obsolete: use XML_SCHEMAS_ELEM_GLOBAL instead
+ */
+#define XML_SCHEMAS_ELEM_TOPLEVEL 1 << 5
+/**
+ * XML_SCHEMAS_ELEM_REF:
+ *
+ * the element is a reference to a type
+ */
+#define XML_SCHEMAS_ELEM_REF 1 << 6
+/**
+ * XML_SCHEMAS_ELEM_NSDEFAULT:
+ *
+ * allow elements in no namespace
+ * Obsolete, not used anymore.
+ */
+#define XML_SCHEMAS_ELEM_NSDEFAULT 1 << 7
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_RESOLVED:
+ *
+ * this is set when "type", "ref", "substitutionGroup"
+ * references have been resolved.
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_RESOLVED 1 << 8
+ /**
+ * XML_SCHEMAS_ELEM_CIRCULAR:
+ *
+ * a helper flag for the search of circular references.
+ */
+#define XML_SCHEMAS_ELEM_CIRCULAR 1 << 9
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_ABSENT:
+ *
+ * the "block" attribute is absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_ABSENT 1 << 10
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_EXTENSION:
+ *
+ * disallowed substitutions are absent
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_EXTENSION 1 << 11
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_RESTRICTION:
+ *
+ * disallowed substitutions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_RESTRICTION 1 << 12
+/**
+ * XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION:
+ *
+ * disallowed substitutions: "substituion"
+ */
+#define XML_SCHEMAS_ELEM_BLOCK_SUBSTITUTION 1 << 13
+/**
+ * XML_SCHEMAS_ELEM_FINAL_ABSENT:
+ *
+ * substitution group exclusions are absent
+ */
+#define XML_SCHEMAS_ELEM_FINAL_ABSENT 1 << 14
+/**
+ * XML_SCHEMAS_ELEM_FINAL_EXTENSION:
+ *
+ * substitution group exclusions: "extension"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_EXTENSION 1 << 15
+/**
+ * XML_SCHEMAS_ELEM_FINAL_RESTRICTION:
+ *
+ * substitution group exclusions: "restriction"
+ */
+#define XML_SCHEMAS_ELEM_FINAL_RESTRICTION 1 << 16
+/**
+ * XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD:
+ *
+ * the declaration is a substitution group head
+ */
+#define XML_SCHEMAS_ELEM_SUBST_GROUP_HEAD 1 << 17
+/**
+ * XML_SCHEMAS_ELEM_INTERNAL_CHECKED:
+ *
+ * this is set when the elem decl has been checked against
+ * all constraints
+ */
+#define XML_SCHEMAS_ELEM_INTERNAL_CHECKED 1 << 18
+
+typedef struct _xmlSchemaElement xmlSchemaElement;
+typedef xmlSchemaElement *xmlSchemaElementPtr;
+struct _xmlSchemaElement {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaType *next; /* Not used? */
+ const xmlChar *name;
+ const xmlChar *id; /* Deprecated; not used */
+ const xmlChar *ref; /* Deprecated; not used */
+ const xmlChar *refNs; /* Deprecated; not used */
+ xmlSchemaAnnotPtr annot;
+ xmlSchemaTypePtr subtypes; /* the type definition */
+ xmlSchemaAttributePtr attributes;
+ xmlNodePtr node;
+ int minOccurs; /* Deprecated; not used */
+ int maxOccurs; /* Deprecated; not used */
+
+ int flags;
+ const xmlChar *targetNamespace;
+ const xmlChar *namedType;
+ const xmlChar *namedTypeNs;
+ const xmlChar *substGroup;
+ const xmlChar *substGroupNs;
+ const xmlChar *scope;
+ const xmlChar *value; /* The original value of the value constraint. */
+ struct _xmlSchemaElement *refDecl; /* This will now be used for the
+ substitution group affiliation */
+ xmlRegexpPtr contModel; /* Obsolete for WXS, maybe used for RelaxNG */
+ xmlSchemaContentType contentType;
+ const xmlChar *refPrefix; /* Deprecated; not used */
+ xmlSchemaValPtr defVal; /* The compiled value contraint. */
+ void *idcs; /* The identity-constraint defs */
+};
+
+/*
+ * XML_SCHEMAS_FACET_UNKNOWN:
+ *
+ * unknown facet handling
+ */
+#define XML_SCHEMAS_FACET_UNKNOWN 0
+/*
+ * XML_SCHEMAS_FACET_PRESERVE:
+ *
+ * preserve the type of the facet
+ */
+#define XML_SCHEMAS_FACET_PRESERVE 1
+/*
+ * XML_SCHEMAS_FACET_REPLACE:
+ *
+ * replace the type of the facet
+ */
+#define XML_SCHEMAS_FACET_REPLACE 2
+/*
+ * XML_SCHEMAS_FACET_COLLAPSE:
+ *
+ * collapse the types of the facet
+ */
+#define XML_SCHEMAS_FACET_COLLAPSE 3
+/**
+ * A facet definition.
+ */
+struct _xmlSchemaFacet {
+ xmlSchemaTypeType type; /* The kind of type */
+ struct _xmlSchemaFacet *next;/* the next type if in a sequence ... */
+ const xmlChar *value; /* The original value */
+ const xmlChar *id; /* Obsolete */
+ xmlSchemaAnnotPtr annot;
+ xmlNodePtr node;
+ int fixed; /* XML_SCHEMAS_FACET_PRESERVE, etc. */
+ int whitespace;
+ xmlSchemaValPtr val; /* The compiled value */
+ xmlRegexpPtr regexp; /* The regex for patterns */
+};
+
+/**
+ * A notation definition.
+ */
+typedef struct _xmlSchemaNotation xmlSchemaNotation;
+typedef xmlSchemaNotation *xmlSchemaNotationPtr;
+struct _xmlSchemaNotation {
+ xmlSchemaTypeType type; /* The kind of type */
+ const xmlChar *name;
+ xmlSchemaAnnotPtr annot;
+ const xmlChar *identifier;
+ const xmlChar *targetNamespace;
+};
+
+/*
+* TODO: Actually all those flags used for the schema should sit
+* on the schema parser context, since they are used only
+* during parsing an XML schema document, and not available
+* on the component level as per spec.
+*/
+/**
+ * XML_SCHEMAS_QUALIF_ELEM:
+ *
+ * Reflects elementFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ELEM 1 << 0
+/**
+ * XML_SCHEMAS_QUALIF_ATTR:
+ *
+ * Reflects attributeFormDefault == qualified in
+ * an XML schema document.
+ */
+#define XML_SCHEMAS_QUALIF_ATTR 1 << 1
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_EXTENSION 1 << 2
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_RESTRICTION 1 << 3
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_LIST:
+ *
+ * the cshema has "list" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_LIST 1 << 4
+/**
+ * XML_SCHEMAS_FINAL_DEFAULT_UNION:
+ *
+ * the schema has "union" in the set of finalDefault.
+ */
+#define XML_SCHEMAS_FINAL_DEFAULT_UNION 1 << 5
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION:
+ *
+ * the schema has "extension" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_EXTENSION 1 << 6
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION:
+ *
+ * the schema has "restriction" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_RESTRICTION 1 << 7
+/**
+ * XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION:
+ *
+ * the schema has "substitution" in the set of blockDefault.
+ */
+#define XML_SCHEMAS_BLOCK_DEFAULT_SUBSTITUTION 1 << 8
+/**
+ * XML_SCHEMAS_INCLUDING_CONVERT_NS:
+ *
+ * the schema is currently including an other schema with
+ * no target namespace.
+ */
+#define XML_SCHEMAS_INCLUDING_CONVERT_NS 1 << 9
+/**
+ * _xmlSchema:
+ *
+ * A Schemas definition
+ */
+struct _xmlSchema {
+ const xmlChar *name; /* schema name */
+ const xmlChar *targetNamespace; /* the target namespace */
+ const xmlChar *version;
+ const xmlChar *id; /* Obsolete */
+ xmlDocPtr doc;
+ xmlSchemaAnnotPtr annot;
+ int flags;
+
+ xmlHashTablePtr typeDecl;
+ xmlHashTablePtr attrDecl;
+ xmlHashTablePtr attrgrpDecl;
+ xmlHashTablePtr elemDecl;
+ xmlHashTablePtr notaDecl;
+
+ xmlHashTablePtr schemasImports;
+
+ void *_private; /* unused by the library for users or bindings */
+ xmlHashTablePtr groupDecl;
+ xmlDictPtr dict;
+ void *includes; /* the includes, this is opaque for now */
+ int preserve; /* whether to free the document */
+ int counter; /* used to give ononymous components unique names */
+ xmlHashTablePtr idcDef; /* All identity-constraint defs. */
+ void *volatiles; /* Obsolete */
+};
+
+XMLPUBFUN void XMLCALL xmlSchemaFreeType (xmlSchemaTypePtr type);
+XMLPUBFUN void XMLCALL xmlSchemaFreeWildcard(xmlSchemaWildcardPtr wildcard);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_INTERNALS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/schematron.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/schematron.h
new file mode 100644
index 0000000..af7bea6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/schematron.h
@@ -0,0 +1,142 @@
+/*
+ * Summary: XML Schemastron implementation
+ * Description: interface to the XML Schematron validity checking.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMATRON_H__
+#define __XML_SCHEMATRON_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMATRON_ENABLED
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMATRON_OUT_QUIET = 1 << 0, /* quiet no report */
+ XML_SCHEMATRON_OUT_TEXT = 1 << 1, /* build a textual report */
+ XML_SCHEMATRON_OUT_XML = 1 << 2, /* output SVRL */
+ XML_SCHEMATRON_OUT_ERROR = 1 << 3, /* output via xmlStructuredErrorFunc */
+ XML_SCHEMATRON_OUT_FILE = 1 << 8, /* output to a file descriptor */
+ XML_SCHEMATRON_OUT_BUFFER = 1 << 9, /* output to a buffer */
+ XML_SCHEMATRON_OUT_IO = 1 << 10 /* output to I/O mechanism */
+} xmlSchematronValidOptions;
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchematron xmlSchematron;
+typedef xmlSchematron *xmlSchematronPtr;
+
+/**
+ * xmlSchematronValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityErrorFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * xmlSchematronValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from a Schematron validation
+ */
+typedef void (*xmlSchematronValidityWarningFunc) (void *ctx, const char *msg, ...);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchematronParserCtxt xmlSchematronParserCtxt;
+typedef xmlSchematronParserCtxt *xmlSchematronParserCtxtPtr;
+
+typedef struct _xmlSchematronValidCtxt xmlSchematronValidCtxt;
+typedef xmlSchematronValidCtxt *xmlSchematronValidCtxtPtr;
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewMemParserCtxt(const char *buffer,
+ int size);
+XMLPUBFUN xmlSchematronParserCtxtPtr XMLCALL
+ xmlSchematronNewDocParserCtxt(xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFreeParserCtxt (xmlSchematronParserCtxtPtr ctxt);
+/*****
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronGetParserErrors(xmlSchematronParserCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc * err,
+ xmlSchematronValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronIsValid (xmlSchematronValidCtxtPtr ctxt);
+ *****/
+XMLPUBFUN xmlSchematronPtr XMLCALL
+ xmlSchematronParse (xmlSchematronParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFree (xmlSchematronPtr schema);
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetValidStructuredErrors(
+ xmlSchematronValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+/******
+XMLPUBFUN void XMLCALL
+ xmlSchematronSetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc err,
+ xmlSchematronValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronGetValidErrors (xmlSchematronValidCtxtPtr ctxt,
+ xmlSchematronValidityErrorFunc *err,
+ xmlSchematronValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchematronSetValidOptions(xmlSchematronValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidCtxtGetOptions(xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidateOneElement (xmlSchematronValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+ *******/
+
+XMLPUBFUN xmlSchematronValidCtxtPtr XMLCALL
+ xmlSchematronNewValidCtxt (xmlSchematronPtr schema,
+ int options);
+XMLPUBFUN void XMLCALL
+ xmlSchematronFreeValidCtxt (xmlSchematronValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchematronValidateDoc (xmlSchematronValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMATRON_ENABLED */
+#endif /* __XML_SCHEMATRON_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/threads.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/threads.h
new file mode 100644
index 0000000..d31f16a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/threads.h
@@ -0,0 +1,84 @@
+/**
+ * Summary: interfaces for thread handling
+ * Description: set of generic threading related routines
+ * should work with pthreads, Windows native or TLS threads
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_THREADS_H__
+#define __XML_THREADS_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * xmlMutex are a simple mutual exception locks.
+ */
+typedef struct _xmlMutex xmlMutex;
+typedef xmlMutex *xmlMutexPtr;
+
+/*
+ * xmlRMutex are reentrant mutual exception locks.
+ */
+typedef struct _xmlRMutex xmlRMutex;
+typedef xmlRMutex *xmlRMutexPtr;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/globals.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+XMLPUBFUN xmlMutexPtr XMLCALL
+ xmlNewMutex (void);
+XMLPUBFUN void XMLCALL
+ xmlMutexLock (xmlMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlMutexUnlock (xmlMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlFreeMutex (xmlMutexPtr tok);
+
+XMLPUBFUN xmlRMutexPtr XMLCALL
+ xmlNewRMutex (void);
+XMLPUBFUN void XMLCALL
+ xmlRMutexLock (xmlRMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlRMutexUnlock (xmlRMutexPtr tok);
+XMLPUBFUN void XMLCALL
+ xmlFreeRMutex (xmlRMutexPtr tok);
+
+/*
+ * Library wide APIs.
+ */
+XMLPUBFUN void XMLCALL
+ xmlInitThreads (void);
+XMLPUBFUN void XMLCALL
+ xmlLockLibrary (void);
+XMLPUBFUN void XMLCALL
+ xmlUnlockLibrary(void);
+XMLPUBFUN int XMLCALL
+ xmlGetThreadId (void);
+XMLPUBFUN int XMLCALL
+ xmlIsMainThread (void);
+XMLPUBFUN void XMLCALL
+ xmlCleanupThreads(void);
+XMLPUBFUN xmlGlobalStatePtr XMLCALL
+ xmlGetGlobalState(void);
+
+#if defined(HAVE_WIN32_THREADS) && !defined(HAVE_COMPILER_TLS) && defined(LIBXML_STATIC_FOR_DLL)
+int XMLCALL xmlDllMain(void *hinstDLL, unsigned long fdwReason, void *lpvReserved);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XML_THREADS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/tree.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/tree.h
new file mode 100644
index 0000000..17fd1e4
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/tree.h
@@ -0,0 +1,1252 @@
+/*
+ * Summary: interfaces for tree manipulation
+ * Description: this module describes the structures found in an tree resulting
+ * from an XML or HTML parsing, as well as the API provided for
+ * various processing on that tree
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_TREE_H__
+#define __XML_TREE_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Some of the basic types pointer to structures:
+ */
+/* xmlIO.h */
+typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
+typedef xmlParserInputBuffer *xmlParserInputBufferPtr;
+
+typedef struct _xmlOutputBuffer xmlOutputBuffer;
+typedef xmlOutputBuffer *xmlOutputBufferPtr;
+
+/* parser.h */
+typedef struct _xmlParserInput xmlParserInput;
+typedef xmlParserInput *xmlParserInputPtr;
+
+typedef struct _xmlParserCtxt xmlParserCtxt;
+typedef xmlParserCtxt *xmlParserCtxtPtr;
+
+typedef struct _xmlSAXLocator xmlSAXLocator;
+typedef xmlSAXLocator *xmlSAXLocatorPtr;
+
+typedef struct _xmlSAXHandler xmlSAXHandler;
+typedef xmlSAXHandler *xmlSAXHandlerPtr;
+
+/* entities.h */
+typedef struct _xmlEntity xmlEntity;
+typedef xmlEntity *xmlEntityPtr;
+
+/**
+ * BASE_BUFFER_SIZE:
+ *
+ * default buffer size 4000.
+ */
+#define BASE_BUFFER_SIZE 4096
+
+/**
+ * LIBXML_NAMESPACE_DICT:
+ *
+ * Defines experimental behaviour:
+ * 1) xmlNs gets an additional field @context (a xmlDoc)
+ * 2) when creating a tree, xmlNs->href is stored in the dict of xmlDoc.
+ */
+/* #define LIBXML_NAMESPACE_DICT */
+
+/**
+ * xmlBufferAllocationScheme:
+ *
+ * A buffer allocation scheme can be defined to either match exactly the
+ * need or double it's allocated size each time it is found too small.
+ */
+
+typedef enum {
+ XML_BUFFER_ALLOC_DOUBLEIT, /* double each time one need to grow */
+ XML_BUFFER_ALLOC_EXACT, /* grow only to the minimal size */
+ XML_BUFFER_ALLOC_IMMUTABLE, /* immutable buffer */
+ XML_BUFFER_ALLOC_IO /* special allocation scheme used for I/O */
+} xmlBufferAllocationScheme;
+
+/**
+ * xmlBuffer:
+ *
+ * A buffer structure.
+ */
+typedef struct _xmlBuffer xmlBuffer;
+typedef xmlBuffer *xmlBufferPtr;
+struct _xmlBuffer {
+ xmlChar *content; /* The buffer content UTF8 */
+ unsigned int use; /* The buffer size used */
+ unsigned int size; /* The buffer size */
+ xmlBufferAllocationScheme alloc; /* The realloc method */
+ xmlChar *contentIO; /* in IO mode we may have a different base */
+};
+
+/**
+ * XML_XML_NAMESPACE:
+ *
+ * This is the namespace for the special xml: prefix predefined in the
+ * XML Namespace specification.
+ */
+#define XML_XML_NAMESPACE \
+ (const xmlChar *) "http://www.w3.org/XML/1998/namespace"
+
+/**
+ * XML_XML_ID:
+ *
+ * This is the name for the special xml:id attribute
+ */
+#define XML_XML_ID (const xmlChar *) "xml:id"
+
+/*
+ * The different element types carried by an XML tree.
+ *
+ * NOTE: This is synchronized with DOM Level1 values
+ * See http://www.w3.org/TR/REC-DOM-Level-1/
+ *
+ * Actually this had diverged a bit, and now XML_DOCUMENT_TYPE_NODE should
+ * be deprecated to use an XML_DTD_NODE.
+ */
+typedef enum {
+ XML_ELEMENT_NODE= 1,
+ XML_ATTRIBUTE_NODE= 2,
+ XML_TEXT_NODE= 3,
+ XML_CDATA_SECTION_NODE= 4,
+ XML_ENTITY_REF_NODE= 5,
+ XML_ENTITY_NODE= 6,
+ XML_PI_NODE= 7,
+ XML_COMMENT_NODE= 8,
+ XML_DOCUMENT_NODE= 9,
+ XML_DOCUMENT_TYPE_NODE= 10,
+ XML_DOCUMENT_FRAG_NODE= 11,
+ XML_NOTATION_NODE= 12,
+ XML_HTML_DOCUMENT_NODE= 13,
+ XML_DTD_NODE= 14,
+ XML_ELEMENT_DECL= 15,
+ XML_ATTRIBUTE_DECL= 16,
+ XML_ENTITY_DECL= 17,
+ XML_NAMESPACE_DECL= 18,
+ XML_XINCLUDE_START= 19,
+ XML_XINCLUDE_END= 20
+#ifdef LIBXML_DOCB_ENABLED
+ ,XML_DOCB_DOCUMENT_NODE= 21
+#endif
+} xmlElementType;
+
+
+/**
+ * xmlNotation:
+ *
+ * A DTD Notation definition.
+ */
+
+typedef struct _xmlNotation xmlNotation;
+typedef xmlNotation *xmlNotationPtr;
+struct _xmlNotation {
+ const xmlChar *name; /* Notation name */
+ const xmlChar *PublicID; /* Public identifier, if any */
+ const xmlChar *SystemID; /* System identifier, if any */
+};
+
+/**
+ * xmlAttributeType:
+ *
+ * A DTD Attribute type definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_CDATA = 1,
+ XML_ATTRIBUTE_ID,
+ XML_ATTRIBUTE_IDREF ,
+ XML_ATTRIBUTE_IDREFS,
+ XML_ATTRIBUTE_ENTITY,
+ XML_ATTRIBUTE_ENTITIES,
+ XML_ATTRIBUTE_NMTOKEN,
+ XML_ATTRIBUTE_NMTOKENS,
+ XML_ATTRIBUTE_ENUMERATION,
+ XML_ATTRIBUTE_NOTATION
+} xmlAttributeType;
+
+/**
+ * xmlAttributeDefault:
+ *
+ * A DTD Attribute default definition.
+ */
+
+typedef enum {
+ XML_ATTRIBUTE_NONE = 1,
+ XML_ATTRIBUTE_REQUIRED,
+ XML_ATTRIBUTE_IMPLIED,
+ XML_ATTRIBUTE_FIXED
+} xmlAttributeDefault;
+
+/**
+ * xmlEnumeration:
+ *
+ * List structure used when there is an enumeration in DTDs.
+ */
+
+typedef struct _xmlEnumeration xmlEnumeration;
+typedef xmlEnumeration *xmlEnumerationPtr;
+struct _xmlEnumeration {
+ struct _xmlEnumeration *next; /* next one */
+ const xmlChar *name; /* Enumeration name */
+};
+
+/**
+ * xmlAttribute:
+ *
+ * An Attribute declaration in a DTD.
+ */
+
+typedef struct _xmlAttribute xmlAttribute;
+typedef xmlAttribute *xmlAttributePtr;
+struct _xmlAttribute {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_DECL, must be second ! */
+ const xmlChar *name; /* Attribute name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ struct _xmlAttribute *nexth; /* next in hash table */
+ xmlAttributeType atype; /* The attribute type */
+ xmlAttributeDefault def; /* the default */
+ const xmlChar *defaultValue; /* or the default value */
+ xmlEnumerationPtr tree; /* or the enumeration tree if any */
+ const xmlChar *prefix; /* the namespace prefix if any */
+ const xmlChar *elem; /* Element holding the attribute */
+};
+
+/**
+ * xmlElementContentType:
+ *
+ * Possible definitions of element content types.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_PCDATA = 1,
+ XML_ELEMENT_CONTENT_ELEMENT,
+ XML_ELEMENT_CONTENT_SEQ,
+ XML_ELEMENT_CONTENT_OR
+} xmlElementContentType;
+
+/**
+ * xmlElementContentOccur:
+ *
+ * Possible definitions of element content occurrences.
+ */
+typedef enum {
+ XML_ELEMENT_CONTENT_ONCE = 1,
+ XML_ELEMENT_CONTENT_OPT,
+ XML_ELEMENT_CONTENT_MULT,
+ XML_ELEMENT_CONTENT_PLUS
+} xmlElementContentOccur;
+
+/**
+ * xmlElementContent:
+ *
+ * An XML Element content as stored after parsing an element definition
+ * in a DTD.
+ */
+
+typedef struct _xmlElementContent xmlElementContent;
+typedef xmlElementContent *xmlElementContentPtr;
+struct _xmlElementContent {
+ xmlElementContentType type; /* PCDATA, ELEMENT, SEQ or OR */
+ xmlElementContentOccur ocur; /* ONCE, OPT, MULT or PLUS */
+ const xmlChar *name; /* Element name */
+ struct _xmlElementContent *c1; /* first child */
+ struct _xmlElementContent *c2; /* second child */
+ struct _xmlElementContent *parent; /* parent */
+ const xmlChar *prefix; /* Namespace prefix */
+};
+
+/**
+ * xmlElementTypeVal:
+ *
+ * The different possibilities for an element content type.
+ */
+
+typedef enum {
+ XML_ELEMENT_TYPE_UNDEFINED = 0,
+ XML_ELEMENT_TYPE_EMPTY = 1,
+ XML_ELEMENT_TYPE_ANY,
+ XML_ELEMENT_TYPE_MIXED,
+ XML_ELEMENT_TYPE_ELEMENT
+} xmlElementTypeVal;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/xmlregexp.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlElement:
+ *
+ * An XML Element declaration from a DTD.
+ */
+
+typedef struct _xmlElement xmlElement;
+typedef xmlElement *xmlElementPtr;
+struct _xmlElement {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ELEMENT_DECL, must be second ! */
+ const xmlChar *name; /* Element name */
+ struct _xmlNode *children; /* NULL */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlDtd *parent; /* -> DTD */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ xmlElementTypeVal etype; /* The type */
+ xmlElementContentPtr content; /* the allowed element content */
+ xmlAttributePtr attributes; /* List of the declared attributes */
+ const xmlChar *prefix; /* the namespace prefix if any */
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlRegexpPtr contModel; /* the validating regexp */
+#else
+ void *contModel;
+#endif
+};
+
+
+/**
+ * XML_LOCAL_NAMESPACE:
+ *
+ * A namespace declaration node.
+ */
+#define XML_LOCAL_NAMESPACE XML_NAMESPACE_DECL
+typedef xmlElementType xmlNsType;
+
+/**
+ * xmlNs:
+ *
+ * An XML namespace.
+ * Note that prefix == NULL is valid, it defines the default namespace
+ * within the subtree (until overridden).
+ *
+ * xmlNsType is unified with xmlElementType.
+ */
+
+typedef struct _xmlNs xmlNs;
+typedef xmlNs *xmlNsPtr;
+struct _xmlNs {
+ struct _xmlNs *next; /* next Ns link for this node */
+ xmlNsType type; /* global or local */
+ const xmlChar *href; /* URL for the namespace */
+ const xmlChar *prefix; /* prefix for the namespace */
+ void *_private; /* application data */
+ struct _xmlDoc *context; /* normally an xmlDoc */
+};
+
+/**
+ * xmlDtd:
+ *
+ * An XML DTD, as defined by <!DOCTYPE ... There is actually one for
+ * the internal subset and for the external subset.
+ */
+typedef struct _xmlDtd xmlDtd;
+typedef xmlDtd *xmlDtdPtr;
+struct _xmlDtd {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DTD_NODE, must be second ! */
+ const xmlChar *name; /* Name of the DTD */
+ struct _xmlNode *children; /* the value of the property link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlDoc *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ void *notations; /* Hash table for notations if any */
+ void *elements; /* Hash table for elements if any */
+ void *attributes; /* Hash table for attributes if any */
+ void *entities; /* Hash table for entities if any */
+ const xmlChar *ExternalID; /* External identifier for PUBLIC DTD */
+ const xmlChar *SystemID; /* URI for a SYSTEM or PUBLIC DTD */
+ void *pentities; /* Hash table for param entities if any */
+};
+
+/**
+ * xmlAttr:
+ *
+ * An attribute on an XML node.
+ */
+typedef struct _xmlAttr xmlAttr;
+typedef xmlAttr *xmlAttrPtr;
+struct _xmlAttr {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_ATTRIBUTE_NODE, must be second ! */
+ const xmlChar *name; /* the name of the property */
+ struct _xmlNode *children; /* the value of the property */
+ struct _xmlNode *last; /* NULL */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlAttr *next; /* next sibling link */
+ struct _xmlAttr *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlAttributeType atype; /* the attribute type if validating */
+ void *psvi; /* for type/PSVI informations */
+};
+
+/**
+ * xmlID:
+ *
+ * An XML ID instance.
+ */
+
+typedef struct _xmlID xmlID;
+typedef xmlID *xmlIDPtr;
+struct _xmlID {
+ struct _xmlID *next; /* next ID */
+ const xmlChar *value; /* The ID name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+ struct _xmlDoc *doc; /* The document holding the ID */
+};
+
+/**
+ * xmlRef:
+ *
+ * An XML IDREF instance.
+ */
+
+typedef struct _xmlRef xmlRef;
+typedef xmlRef *xmlRefPtr;
+struct _xmlRef {
+ struct _xmlRef *next; /* next Ref */
+ const xmlChar *value; /* The Ref name */
+ xmlAttrPtr attr; /* The attribute holding it */
+ const xmlChar *name; /* The attribute if attr is not available */
+ int lineno; /* The line number if attr is not available */
+};
+
+/**
+ * xmlNode:
+ *
+ * A node in an XML tree.
+ */
+typedef struct _xmlNode xmlNode;
+typedef xmlNode *xmlNodePtr;
+struct _xmlNode {
+ void *_private; /* application data */
+ xmlElementType type; /* type number, must be second ! */
+ const xmlChar *name; /* the name of the node, or the entity */
+ struct _xmlNode *children; /* parent->childs link */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* the containing document */
+
+ /* End of common part */
+ xmlNs *ns; /* pointer to the associated namespace */
+ xmlChar *content; /* the content */
+ struct _xmlAttr *properties;/* properties list */
+ xmlNs *nsDef; /* namespace definitions on this node */
+ void *psvi; /* for type/PSVI informations */
+ unsigned short line; /* line number */
+ unsigned short extra; /* extra data for XPath/XSLT */
+};
+
+/**
+ * XML_GET_CONTENT:
+ *
+ * Macro to extract the content pointer of a node.
+ */
+#define XML_GET_CONTENT(n) \
+ ((n)->type == XML_ELEMENT_NODE ? NULL : (n)->content)
+
+/**
+ * XML_GET_LINE:
+ *
+ * Macro to extract the line number of an element node.
+ */
+#define XML_GET_LINE(n) \
+ (xmlGetLineNo(n))
+
+/**
+ * xmlDocProperty
+ *
+ * Set of properties of the document as found by the parser
+ * Some of them are linked to similary named xmlParserOption
+ */
+typedef enum {
+ XML_DOC_WELLFORMED = 1<<0, /* document is XML well formed */
+ XML_DOC_NSVALID = 1<<1, /* document is Namespace valid */
+ XML_DOC_OLD10 = 1<<2, /* parsed with old XML-1.0 parser */
+ XML_DOC_DTDVALID = 1<<3, /* DTD validation was successful */
+ XML_DOC_XINCLUDE = 1<<4, /* XInclude substitution was done */
+ XML_DOC_USERBUILT = 1<<5, /* Document was built using the API
+ and not by parsing an instance */
+ XML_DOC_INTERNAL = 1<<6, /* built for internal processing */
+ XML_DOC_HTML = 1<<7 /* parsed or built HTML document */
+} xmlDocProperties;
+
+/**
+ * xmlDoc:
+ *
+ * An XML document.
+ */
+typedef struct _xmlDoc xmlDoc;
+typedef xmlDoc *xmlDocPtr;
+struct _xmlDoc {
+ void *_private; /* application data */
+ xmlElementType type; /* XML_DOCUMENT_NODE, must be second ! */
+ char *name; /* name/filename/URI of the document */
+ struct _xmlNode *children; /* the document tree */
+ struct _xmlNode *last; /* last child link */
+ struct _xmlNode *parent; /* child->parent link */
+ struct _xmlNode *next; /* next sibling link */
+ struct _xmlNode *prev; /* previous sibling link */
+ struct _xmlDoc *doc; /* autoreference to itself */
+
+ /* End of common part */
+ int compression;/* level of zlib compression */
+ int standalone; /* standalone document (no external refs)
+ 1 if standalone="yes"
+ 0 if standalone="no"
+ -1 if there is no XML declaration
+ -2 if there is an XML declaration, but no
+ standalone attribute was specified */
+ struct _xmlDtd *intSubset; /* the document internal subset */
+ struct _xmlDtd *extSubset; /* the document external subset */
+ struct _xmlNs *oldNs; /* Global namespace, the old way */
+ const xmlChar *version; /* the XML version string */
+ const xmlChar *encoding; /* external initial encoding, if any */
+ void *ids; /* Hash table for ID attributes if any */
+ void *refs; /* Hash table for IDREFs attributes if any */
+ const xmlChar *URL; /* The URI for that document */
+ int charset; /* encoding of the in-memory content
+ actually an xmlCharEncoding */
+ struct _xmlDict *dict; /* dict used to allocate names or NULL */
+ void *psvi; /* for type/PSVI informations */
+ int parseFlags; /* set of xmlParserOption used to parse the
+ document */
+ int properties; /* set of xmlDocProperties for this document
+ set at the end of parsing */
+};
+
+
+typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
+typedef xmlDOMWrapCtxt *xmlDOMWrapCtxtPtr;
+
+/**
+ * xmlDOMWrapAcquireNsFunction:
+ * @ctxt: a DOM wrapper context
+ * @node: the context node (element or attribute)
+ * @nsName: the requested namespace name
+ * @nsPrefix: the requested namespace prefix
+ *
+ * A function called to acquire namespaces (xmlNs) from the wrapper.
+ *
+ * Returns an xmlNsPtr or NULL in case of an error.
+ */
+typedef xmlNsPtr (*xmlDOMWrapAcquireNsFunction) (xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr node,
+ const xmlChar *nsName,
+ const xmlChar *nsPrefix);
+
+/**
+ * xmlDOMWrapCtxt:
+ *
+ * Context for DOM wrapper-operations.
+ */
+struct _xmlDOMWrapCtxt {
+ void * _private;
+ /*
+ * The type of this context, just in case we need specialized
+ * contexts in the future.
+ */
+ int type;
+ /*
+ * Internal namespace map used for various operations.
+ */
+ void * namespaceMap;
+ /*
+ * Use this one to acquire an xmlNsPtr intended for node->ns.
+ * (Note that this is not intended for elem->nsDef).
+ */
+ xmlDOMWrapAcquireNsFunction getNsForNodeFunc;
+};
+
+/**
+ * xmlChildrenNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children."
+ */
+#ifndef xmlChildrenNode
+#define xmlChildrenNode children
+#endif
+
+/**
+ * xmlRootNode:
+ *
+ * Macro for compatibility naming layer with libxml1. Maps
+ * to "children".
+ */
+#ifndef xmlRootNode
+#define xmlRootNode children
+#endif
+
+/*
+ * Variables.
+ */
+
+/*
+ * Some helper functions
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_DEBUG_ENABLED) || defined (LIBXML_HTML_ENABLED) || defined(LIBXML_SAX1_ENABLED) || defined(LIBXML_HTML_ENABLED) || defined(LIBXML_WRITER_ENABLED) || defined(LIBXML_DOCB_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateNCName (const xmlChar *value,
+ int space);
+#endif
+
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateQName (const xmlChar *value,
+ int space);
+XMLPUBFUN int XMLCALL
+ xmlValidateName (const xmlChar *value,
+ int space);
+XMLPUBFUN int XMLCALL
+ xmlValidateNMToken (const xmlChar *value,
+ int space);
+#endif
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildQName (const xmlChar *ncname,
+ const xmlChar *prefix,
+ xmlChar *memory,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSplitQName2 (const xmlChar *name,
+ xmlChar **prefix);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSplitQName3 (const xmlChar *name,
+ int *len);
+
+/*
+ * Handling Buffers.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlSetBufferAllocationScheme(xmlBufferAllocationScheme scheme);
+XMLPUBFUN xmlBufferAllocationScheme XMLCALL
+ xmlGetBufferAllocationScheme(void);
+
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreate (void);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateSize (size_t size);
+XMLPUBFUN xmlBufferPtr XMLCALL
+ xmlBufferCreateStatic (void *mem,
+ size_t size);
+XMLPUBFUN int XMLCALL
+ xmlBufferResize (xmlBufferPtr buf,
+ unsigned int size);
+XMLPUBFUN void XMLCALL
+ xmlBufferFree (xmlBufferPtr buf);
+XMLPUBFUN int XMLCALL
+ xmlBufferDump (FILE *file,
+ xmlBufferPtr buf);
+XMLPUBFUN int XMLCALL
+ xmlBufferAdd (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferAddHead (xmlBufferPtr buf,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferCat (xmlBufferPtr buf,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlBufferCCat (xmlBufferPtr buf,
+ const char *str);
+XMLPUBFUN int XMLCALL
+ xmlBufferShrink (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN int XMLCALL
+ xmlBufferGrow (xmlBufferPtr buf,
+ unsigned int len);
+XMLPUBFUN void XMLCALL
+ xmlBufferEmpty (xmlBufferPtr buf);
+XMLPUBFUN const xmlChar* XMLCALL
+ xmlBufferContent (const xmlBufferPtr buf);
+XMLPUBFUN void XMLCALL
+ xmlBufferSetAllocationScheme(xmlBufferPtr buf,
+ xmlBufferAllocationScheme scheme);
+XMLPUBFUN int XMLCALL
+ xmlBufferLength (const xmlBufferPtr buf);
+
+/*
+ * Creating/freeing new structures.
+ */
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlCreateIntSubset (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlNewDtd (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *ExternalID,
+ const xmlChar *SystemID);
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlGetIntSubset (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlFreeDtd (xmlDtdPtr cur);
+#ifdef LIBXML_LEGACY_ENABLED
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlNewGlobalNs (xmlDocPtr doc,
+ const xmlChar *href,
+ const xmlChar *prefix);
+#endif /* LIBXML_LEGACY_ENABLED */
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlNewNs (xmlNodePtr node,
+ const xmlChar *href,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ xmlFreeNs (xmlNsPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeNsList (xmlNsPtr cur);
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlNewDoc (const xmlChar *version);
+XMLPUBFUN void XMLCALL
+ xmlFreeDoc (xmlDocPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewDocProp (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *value);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+#endif
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlNewNsPropEatName (xmlNodePtr node,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlFreePropList (xmlAttrPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeProp (xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlCopyProp (xmlNodePtr target,
+ xmlAttrPtr cur);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlCopyPropList (xmlNodePtr target,
+ xmlAttrPtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlDtdPtr XMLCALL
+ xmlCopyDtd (xmlDtdPtr dtd);
+#endif /* LIBXML_TREE_ENABLED */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlCopyDoc (xmlDocPtr doc,
+ int recursive);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+/*
+ * Creating new nodes.
+ */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocNodeEatName (xmlDocPtr doc,
+ xmlNsPtr ns,
+ xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewNode (xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewNodeEatName (xmlNsPtr ns,
+ xmlChar *name);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+#endif
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocText (xmlDocPtr doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewText (const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocPI (xmlDocPtr doc,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewPI (const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocTextLen (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewTextLen (const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocComment (xmlDocPtr doc,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewComment (const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewCDataBlock (xmlDocPtr doc,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewCharRef (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewReference (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlCopyNode (const xmlNodePtr node,
+ int recursive);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocCopyNode (const xmlNodePtr node,
+ xmlDocPtr doc,
+ int recursive);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocCopyNodeList (xmlDocPtr doc,
+ const xmlNodePtr node);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlCopyNodeList (const xmlNodePtr node);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewTextChild (xmlNodePtr parent,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocRawNode (xmlDocPtr doc,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *content);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNewDocFragment (xmlDocPtr doc);
+#endif /* LIBXML_TREE_ENABLED */
+
+/*
+ * Navigating.
+ */
+XMLPUBFUN long XMLCALL
+ xmlGetLineNo (xmlNodePtr node);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED)
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNodePath (xmlNodePtr node);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_DEBUG_ENABLED) */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocGetRootElement (xmlDocPtr doc);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlGetLastChild (xmlNodePtr parent);
+XMLPUBFUN int XMLCALL
+ xmlNodeIsText (xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlIsBlankNode (xmlNodePtr node);
+
+/*
+ * Changing the structure.
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlDocSetRootElement (xmlDocPtr doc,
+ xmlNodePtr root);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetName (xmlNodePtr cur,
+ const xmlChar *name);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddChild (xmlNodePtr parent,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddChildList (xmlNodePtr parent,
+ xmlNodePtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlReplaceNode (xmlNodePtr old,
+ xmlNodePtr cur);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_WRITER_ENABLED) */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_HTML_ENABLED) || \
+ defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddPrevSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+#endif /* LIBXML_TREE_ENABLED || LIBXML_HTML_ENABLED || LIBXML_SCHEMAS_ENABLED */
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlAddNextSibling (xmlNodePtr cur,
+ xmlNodePtr elem);
+XMLPUBFUN void XMLCALL
+ xmlUnlinkNode (xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextMerge (xmlNodePtr first,
+ xmlNodePtr second);
+XMLPUBFUN int XMLCALL
+ xmlTextConcat (xmlNodePtr node,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN void XMLCALL
+ xmlFreeNodeList (xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ xmlFreeNode (xmlNodePtr cur);
+XMLPUBFUN void XMLCALL
+ xmlSetTreeDoc (xmlNodePtr tree,
+ xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSetListDoc (xmlNodePtr list,
+ xmlDocPtr doc);
+/*
+ * Namespaces.
+ */
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlSearchNs (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlSearchNsByHref (xmlDocPtr doc,
+ xmlNodePtr node,
+ const xmlChar *href);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN xmlNsPtr * XMLCALL
+ xmlGetNsList (xmlDocPtr doc,
+ xmlNodePtr node);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XPATH_ENABLED) */
+
+XMLPUBFUN void XMLCALL
+ xmlSetNs (xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlCopyNamespace (xmlNsPtr cur);
+XMLPUBFUN xmlNsPtr XMLCALL
+ xmlCopyNamespaceList (xmlNsPtr cur);
+
+/*
+ * Changing the content.
+ */
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED)
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlSetProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlSetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name,
+ const xmlChar *value);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) || defined(LIBXML_HTML_ENABLED) */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNoNsProp (xmlNodePtr node,
+ const xmlChar *name);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetProp (xmlNodePtr node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlHasProp (xmlNodePtr node,
+ const xmlChar *name);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlHasNsProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlGetNsProp (xmlNodePtr node,
+ const xmlChar *name,
+ const xmlChar *nameSpace);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlStringGetNodeList (xmlDocPtr doc,
+ const xmlChar *value);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlStringLenGetNodeList (xmlDocPtr doc,
+ const xmlChar *value,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeListGetString (xmlDocPtr doc,
+ xmlNodePtr list,
+ int inLine);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeListGetRawString (xmlDocPtr doc,
+ xmlNodePtr list,
+ int inLine);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNodeSetContent (xmlNodePtr cur,
+ const xmlChar *content);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlNodeAddContent (xmlNodePtr cur,
+ const xmlChar *content);
+XMLPUBFUN void XMLCALL
+ xmlNodeAddContentLen (xmlNodePtr cur,
+ const xmlChar *content,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetContent (xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlNodeBufGetContent (xmlBufferPtr buffer,
+ xmlNodePtr cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetLang (xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlNodeGetSpacePreserve (xmlNodePtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlNodeSetLang (xmlNodePtr cur,
+ const xmlChar *lang);
+XMLPUBFUN void XMLCALL
+ xmlNodeSetSpacePreserve (xmlNodePtr cur,
+ int val);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNodeGetBase (xmlDocPtr doc,
+ xmlNodePtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_XINCLUDE_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlNodeSetBase (xmlNodePtr cur,
+ const xmlChar *uri);
+#endif
+
+/*
+ * Removing content.
+ */
+XMLPUBFUN int XMLCALL
+ xmlRemoveProp (xmlAttrPtr cur);
+#if defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlUnsetNsProp (xmlNodePtr node,
+ xmlNsPtr ns,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlUnsetProp (xmlNodePtr node,
+ const xmlChar *name);
+#endif /* defined(LIBXML_TREE_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED) */
+
+/*
+ * Internal, don't use.
+ */
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteCHAR (xmlBufferPtr buf,
+ const xmlChar *string);
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteChar (xmlBufferPtr buf,
+ const char *string);
+XMLPUBFUN void XMLCALL
+ xmlBufferWriteQuotedString(xmlBufferPtr buf,
+ const xmlChar *string);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void xmlAttrSerializeTxtContent(xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlAttrPtr attr,
+ const xmlChar *string);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * Namespace handling.
+ */
+XMLPUBFUN int XMLCALL
+ xmlReconciliateNs (xmlDocPtr doc,
+ xmlNodePtr tree);
+#endif
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Saving.
+ */
+XMLPUBFUN void XMLCALL
+ xmlDocDumpFormatMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size,
+ int format);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpMemory (xmlDocPtr cur,
+ xmlChar **mem,
+ int *size);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpMemoryEnc (xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding);
+XMLPUBFUN void XMLCALL
+ xmlDocDumpFormatMemoryEnc(xmlDocPtr out_doc,
+ xmlChar **doc_txt_ptr,
+ int * doc_txt_len,
+ const char *txt_encoding,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlDocFormatDump (FILE *f,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlDocDump (FILE *f,
+ xmlDocPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlElemDump (FILE *f,
+ xmlDocPtr doc,
+ xmlNodePtr cur);
+XMLPUBFUN int XMLCALL
+ xmlSaveFile (const char *filename,
+ xmlDocPtr cur);
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFile (const char *filename,
+ xmlDocPtr cur,
+ int format);
+XMLPUBFUN int XMLCALL
+ xmlNodeDump (xmlBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding);
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFileTo (xmlOutputBufferPtr buf,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+XMLPUBFUN void XMLCALL
+ xmlNodeDumpOutput (xmlOutputBufferPtr buf,
+ xmlDocPtr doc,
+ xmlNodePtr cur,
+ int level,
+ int format,
+ const char *encoding);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFormatFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding,
+ int format);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFileEnc (const char *filename,
+ xmlDocPtr cur,
+ const char *encoding);
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * XHTML
+ */
+XMLPUBFUN int XMLCALL
+ xmlIsXHTML (const xmlChar *systemID,
+ const xmlChar *publicID);
+
+/*
+ * Compression.
+ */
+XMLPUBFUN int XMLCALL
+ xmlGetDocCompressMode (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSetDocCompressMode (xmlDocPtr doc,
+ int mode);
+XMLPUBFUN int XMLCALL
+ xmlGetCompressMode (void);
+XMLPUBFUN void XMLCALL
+ xmlSetCompressMode (int mode);
+
+/*
+* DOM-wrapper helper functions.
+*/
+XMLPUBFUN xmlDOMWrapCtxtPtr XMLCALL
+ xmlDOMWrapNewCtxt (void);
+XMLPUBFUN void XMLCALL
+ xmlDOMWrapFreeCtxt (xmlDOMWrapCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapReconcileNamespaces(xmlDOMWrapCtxtPtr ctxt,
+ xmlNodePtr elem,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapAdoptNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapRemoveNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr node,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlDOMWrapCloneNode (xmlDOMWrapCtxtPtr ctxt,
+ xmlDocPtr sourceDoc,
+ xmlNodePtr node,
+ xmlNodePtr *clonedNode,
+ xmlDocPtr destDoc,
+ xmlNodePtr destParent,
+ int deep,
+ int options);
+
+#ifdef LIBXML_TREE_ENABLED
+/*
+ * 5 interfaces from DOM ElementTraversal, but different in entities
+ * traversal.
+ */
+XMLPUBFUN unsigned long XMLCALL
+ xmlChildElementCount (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlNextElementSibling (xmlNodePtr node);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlFirstElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlLastElementChild (xmlNodePtr parent);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlPreviousElementSibling (xmlNodePtr node);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#ifndef __XML_PARSER_H__
+#include <libxml/xmlmemory.h>
+#endif
+
+#endif /* __XML_TREE_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/uri.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/uri.h
new file mode 100644
index 0000000..db48262
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/uri.h
@@ -0,0 +1,94 @@
+/**
+ * Summary: library of generic URI related routines
+ * Description: library of generic URI related routines
+ * Implements RFC 2396
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_URI_H__
+#define __XML_URI_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlURI:
+ *
+ * A parsed URI reference. This is a struct containing the various fields
+ * as described in RFC 2396 but separated for further processing.
+ *
+ * Note: query is a deprecated field which is incorrectly unescaped.
+ * query_raw takes precedence over query if the former is set.
+ * See: http://mail.gnome.org/archives/xml/2007-April/thread.html#00127
+ */
+typedef struct _xmlURI xmlURI;
+typedef xmlURI *xmlURIPtr;
+struct _xmlURI {
+ char *scheme; /* the URI scheme */
+ char *opaque; /* opaque part */
+ char *authority; /* the authority part */
+ char *server; /* the server part */
+ char *user; /* the user part */
+ int port; /* the port number */
+ char *path; /* the path string */
+ char *query; /* the query string (deprecated - use with caution) */
+ char *fragment; /* the fragment identifier */
+ int cleanup; /* parsing potentially unclean URI */
+ char *query_raw; /* the query string (as it appears in the URI) */
+};
+
+/*
+ * This function is in tree.h:
+ * xmlChar * xmlNodeGetBase (xmlDocPtr doc,
+ * xmlNodePtr cur);
+ */
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlCreateURI (void);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlBuildRelativeURI (const xmlChar *URI,
+ const xmlChar *base);
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlParseURI (const char *str);
+XMLPUBFUN xmlURIPtr XMLCALL
+ xmlParseURIRaw (const char *str,
+ int raw);
+XMLPUBFUN int XMLCALL
+ xmlParseURIReference (xmlURIPtr uri,
+ const char *str);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSaveUri (xmlURIPtr uri);
+XMLPUBFUN void XMLCALL
+ xmlPrintURI (FILE *stream,
+ xmlURIPtr uri);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlURIEscapeStr (const xmlChar *str,
+ const xmlChar *list);
+XMLPUBFUN char * XMLCALL
+ xmlURIUnescapeString (const char *str,
+ int len,
+ char *target);
+XMLPUBFUN int XMLCALL
+ xmlNormalizeURIPath (char *path);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlURIEscape (const xmlChar *str);
+XMLPUBFUN void XMLCALL
+ xmlFreeURI (xmlURIPtr uri);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlCanonicPath (const xmlChar *path);
+XMLPUBFUN xmlChar* XMLCALL
+ xmlPathToURI (const xmlChar *path);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_URI_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/valid.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/valid.h
new file mode 100644
index 0000000..2bc7b38
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/valid.h
@@ -0,0 +1,458 @@
+/*
+ * Summary: The DTD validation
+ * Description: API for the DTD handling and the validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_VALID_H__
+#define __XML_VALID_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xmlerror.h>
+#include <libxml/tree.h>
+#include <libxml/list.h>
+#include <libxml/xmlautomata.h>
+#include <libxml/xmlregexp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Validation state added for non-determinist content model.
+ */
+typedef struct _xmlValidState xmlValidState;
+typedef xmlValidState *xmlValidStatePtr;
+
+/**
+ * xmlValidityErrorFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity error is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (XMLCDECL *xmlValidityErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlValidityWarningFunc:
+ * @ctx: usually an xmlValidCtxtPtr to a validity error context,
+ * but comes from ctxt->userData (which normally contains such
+ * a pointer); ctxt->userData can be changed by the user.
+ * @msg: the string to format *printf like vararg
+ * @...: remaining arguments to the format
+ *
+ * Callback called when a validity warning is found. This is a message
+ * oriented function similar to an *printf function.
+ */
+typedef void (XMLCDECL *xmlValidityWarningFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+
+#ifdef IN_LIBXML
+/**
+ * XML_CTXT_FINISH_DTD_0:
+ *
+ * Special value for finishDtd field when embedded in an xmlParserCtxt
+ */
+#define XML_CTXT_FINISH_DTD_0 0xabcd1234
+/**
+ * XML_CTXT_FINISH_DTD_1:
+ *
+ * Special value for finishDtd field when embedded in an xmlParserCtxt
+ */
+#define XML_CTXT_FINISH_DTD_1 0xabcd1235
+#endif
+
+/*
+ * xmlValidCtxt:
+ * An xmlValidCtxt is used for error reporting when validating.
+ */
+typedef struct _xmlValidCtxt xmlValidCtxt;
+typedef xmlValidCtxt *xmlValidCtxtPtr;
+struct _xmlValidCtxt {
+ void *userData; /* user specific data block */
+ xmlValidityErrorFunc error; /* the callback in case of errors */
+ xmlValidityWarningFunc warning; /* the callback in case of warning */
+
+ /* Node analysis stack used when validating within entities */
+ xmlNodePtr node; /* Current parsed Node */
+ int nodeNr; /* Depth of the parsing stack */
+ int nodeMax; /* Max depth of the parsing stack */
+ xmlNodePtr *nodeTab; /* array of nodes */
+
+ unsigned int finishDtd; /* finished validating the Dtd ? */
+ xmlDocPtr doc; /* the document */
+ int valid; /* temporary validity check result */
+
+ /* state state used for non-determinist content validation */
+ xmlValidState *vstate; /* current state */
+ int vstateNr; /* Depth of the validation stack */
+ int vstateMax; /* Max depth of the validation stack */
+ xmlValidState *vstateTab; /* array of validation states */
+
+#ifdef LIBXML_REGEXP_ENABLED
+ xmlAutomataPtr am; /* the automata */
+ xmlAutomataStatePtr state; /* used to build the automata */
+#else
+ void *am;
+ void *state;
+#endif
+};
+
+/*
+ * ALL notation declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlNotationTable;
+typedef xmlNotationTable *xmlNotationTablePtr;
+
+/*
+ * ALL element declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlElementTable;
+typedef xmlElementTable *xmlElementTablePtr;
+
+/*
+ * ALL attribute declarations are stored in a table.
+ * There is one table per DTD.
+ */
+
+typedef struct _xmlHashTable xmlAttributeTable;
+typedef xmlAttributeTable *xmlAttributeTablePtr;
+
+/*
+ * ALL IDs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlIDTable;
+typedef xmlIDTable *xmlIDTablePtr;
+
+/*
+ * ALL Refs attributes are stored in a table.
+ * There is one table per document.
+ */
+
+typedef struct _xmlHashTable xmlRefTable;
+typedef xmlRefTable *xmlRefTablePtr;
+
+/* Notation */
+XMLPUBFUN xmlNotationPtr XMLCALL
+ xmlAddNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *PublicID,
+ const xmlChar *SystemID);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlNotationTablePtr XMLCALL
+ xmlCopyNotationTable (xmlNotationTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeNotationTable (xmlNotationTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpNotationDecl (xmlBufferPtr buf,
+ xmlNotationPtr nota);
+XMLPUBFUN void XMLCALL
+ xmlDumpNotationTable (xmlBufferPtr buf,
+ xmlNotationTablePtr table);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Element Content */
+/* the non Doc version are being deprecated */
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlNewElementContent (const xmlChar *name,
+ xmlElementContentType type);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlCopyElementContent (xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlFreeElementContent (xmlElementContentPtr cur);
+/* the new versions with doc argument */
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlNewDocElementContent (xmlDocPtr doc,
+ const xmlChar *name,
+ xmlElementContentType type);
+XMLPUBFUN xmlElementContentPtr XMLCALL
+ xmlCopyDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr content);
+XMLPUBFUN void XMLCALL
+ xmlFreeDocElementContent(xmlDocPtr doc,
+ xmlElementContentPtr cur);
+XMLPUBFUN void XMLCALL
+ xmlSnprintfElementContent(char *buf,
+ int size,
+ xmlElementContentPtr content,
+ int englob);
+#ifdef LIBXML_OUTPUT_ENABLED
+/* DEPRECATED */
+XMLPUBFUN void XMLCALL
+ xmlSprintfElementContent(char *buf,
+ xmlElementContentPtr content,
+ int englob);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/* DEPRECATED */
+
+/* Element */
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlAddElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *name,
+ xmlElementTypeVal type,
+ xmlElementContentPtr content);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlElementTablePtr XMLCALL
+ xmlCopyElementTable (xmlElementTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeElementTable (xmlElementTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpElementTable (xmlBufferPtr buf,
+ xmlElementTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpElementDecl (xmlBufferPtr buf,
+ xmlElementPtr elem);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* Enumeration */
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlCreateEnumeration (const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlFreeEnumeration (xmlEnumerationPtr cur);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlEnumerationPtr XMLCALL
+ xmlCopyEnumeration (xmlEnumerationPtr cur);
+#endif /* LIBXML_TREE_ENABLED */
+
+/* Attribute */
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlAddAttributeDecl (xmlValidCtxtPtr ctxt,
+ xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *ns,
+ xmlAttributeType type,
+ xmlAttributeDefault def,
+ const xmlChar *defaultValue,
+ xmlEnumerationPtr tree);
+#ifdef LIBXML_TREE_ENABLED
+XMLPUBFUN xmlAttributeTablePtr XMLCALL
+ xmlCopyAttributeTable (xmlAttributeTablePtr table);
+#endif /* LIBXML_TREE_ENABLED */
+XMLPUBFUN void XMLCALL
+ xmlFreeAttributeTable (xmlAttributeTablePtr table);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlDumpAttributeTable (xmlBufferPtr buf,
+ xmlAttributeTablePtr table);
+XMLPUBFUN void XMLCALL
+ xmlDumpAttributeDecl (xmlBufferPtr buf,
+ xmlAttributePtr attr);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/* IDs */
+XMLPUBFUN xmlIDPtr XMLCALL
+ xmlAddID (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void XMLCALL
+ xmlFreeIDTable (xmlIDTablePtr table);
+XMLPUBFUN xmlAttrPtr XMLCALL
+ xmlGetID (xmlDocPtr doc,
+ const xmlChar *ID);
+XMLPUBFUN int XMLCALL
+ xmlIsID (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int XMLCALL
+ xmlRemoveID (xmlDocPtr doc,
+ xmlAttrPtr attr);
+
+/* IDREFs */
+XMLPUBFUN xmlRefPtr XMLCALL
+ xmlAddRef (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *value,
+ xmlAttrPtr attr);
+XMLPUBFUN void XMLCALL
+ xmlFreeRefTable (xmlRefTablePtr table);
+XMLPUBFUN int XMLCALL
+ xmlIsRef (xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr);
+XMLPUBFUN int XMLCALL
+ xmlRemoveRef (xmlDocPtr doc,
+ xmlAttrPtr attr);
+XMLPUBFUN xmlListPtr XMLCALL
+ xmlGetRefs (xmlDocPtr doc,
+ const xmlChar *ID);
+
+/**
+ * The public function calls related to validity checking.
+ */
+#ifdef LIBXML_VALID_ENABLED
+/* Allocate/Release Validation Contexts */
+XMLPUBFUN xmlValidCtxtPtr XMLCALL
+ xmlNewValidCtxt(void);
+XMLPUBFUN void XMLCALL
+ xmlFreeValidCtxt(xmlValidCtxtPtr);
+
+XMLPUBFUN int XMLCALL
+ xmlValidateRoot (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateElementDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlElementPtr elem);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlValidNormalizeAttributeValue(xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlValidCtxtNormalizeAttributeValue(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *name,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlAttributePtr attr);
+XMLPUBFUN int XMLCALL
+ xmlValidateAttributeValue(xmlAttributeType type,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNotationDecl (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNotationPtr nota);
+XMLPUBFUN int XMLCALL
+ xmlValidateDtd (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlDtdPtr dtd);
+XMLPUBFUN int XMLCALL
+ xmlValidateDtdFinal (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateDocument (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlValidateElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneAttribute (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ xmlAttrPtr attr,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateOneNamespace (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *prefix,
+ xmlNsPtr ns,
+ const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateDocumentFinal(xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc);
+#endif /* LIBXML_VALID_ENABLED */
+
+#if defined(LIBXML_VALID_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN int XMLCALL
+ xmlValidateNotationUse (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ const xmlChar *notationName);
+#endif /* LIBXML_VALID_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+XMLPUBFUN int XMLCALL
+ xmlIsMixedElement (xmlDocPtr doc,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlGetDtdAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name);
+XMLPUBFUN xmlAttributePtr XMLCALL
+ xmlGetDtdQAttrDesc (xmlDtdPtr dtd,
+ const xmlChar *elem,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlNotationPtr XMLCALL
+ xmlGetDtdNotationDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlGetDtdQElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name,
+ const xmlChar *prefix);
+XMLPUBFUN xmlElementPtr XMLCALL
+ xmlGetDtdElementDesc (xmlDtdPtr dtd,
+ const xmlChar *name);
+
+#ifdef LIBXML_VALID_ENABLED
+
+XMLPUBFUN int XMLCALL
+ xmlValidGetPotentialChildren(xmlElementContent *ctree,
+ const xmlChar **names,
+ int *len,
+ int max);
+
+XMLPUBFUN int XMLCALL
+ xmlValidGetValidElements(xmlNode *prev,
+ xmlNode *next,
+ const xmlChar **names,
+ int max);
+XMLPUBFUN int XMLCALL
+ xmlValidateNameValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNamesValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNmtokenValue (const xmlChar *value);
+XMLPUBFUN int XMLCALL
+ xmlValidateNmtokensValue(const xmlChar *value);
+
+#ifdef LIBXML_REGEXP_ENABLED
+/*
+ * Validation based on the regexp support
+ */
+XMLPUBFUN int XMLCALL
+ xmlValidBuildContentModel(xmlValidCtxtPtr ctxt,
+ xmlElementPtr elem);
+
+XMLPUBFUN int XMLCALL
+ xmlValidatePushElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+XMLPUBFUN int XMLCALL
+ xmlValidatePushCData (xmlValidCtxtPtr ctxt,
+ const xmlChar *data,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlValidatePopElement (xmlValidCtxtPtr ctxt,
+ xmlDocPtr doc,
+ xmlNodePtr elem,
+ const xmlChar *qname);
+#endif /* LIBXML_REGEXP_ENABLED */
+#endif /* LIBXML_VALID_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_VALID_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xinclude.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xinclude.h
new file mode 100644
index 0000000..863ab25
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xinclude.h
@@ -0,0 +1,129 @@
+/*
+ * Summary: implementation of XInclude
+ * Description: API to handle XInclude processing,
+ * implements the
+ * World Wide Web Consortium Last Call Working Draft 10 November 2003
+ * http://www.w3.org/TR/2003/WD-xinclude-20031110
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XINCLUDE_H__
+#define __XML_XINCLUDE_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_XINCLUDE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * XINCLUDE_NS:
+ *
+ * Macro defining the Xinclude namespace: http://www.w3.org/2003/XInclude
+ */
+#define XINCLUDE_NS (const xmlChar *) "http://www.w3.org/2003/XInclude"
+/**
+ * XINCLUDE_OLD_NS:
+ *
+ * Macro defining the draft Xinclude namespace: http://www.w3.org/2001/XInclude
+ */
+#define XINCLUDE_OLD_NS (const xmlChar *) "http://www.w3.org/2001/XInclude"
+/**
+ * XINCLUDE_NODE:
+ *
+ * Macro defining "include"
+ */
+#define XINCLUDE_NODE (const xmlChar *) "include"
+/**
+ * XINCLUDE_FALLBACK:
+ *
+ * Macro defining "fallback"
+ */
+#define XINCLUDE_FALLBACK (const xmlChar *) "fallback"
+/**
+ * XINCLUDE_HREF:
+ *
+ * Macro defining "href"
+ */
+#define XINCLUDE_HREF (const xmlChar *) "href"
+/**
+ * XINCLUDE_PARSE:
+ *
+ * Macro defining "parse"
+ */
+#define XINCLUDE_PARSE (const xmlChar *) "parse"
+/**
+ * XINCLUDE_PARSE_XML:
+ *
+ * Macro defining "xml"
+ */
+#define XINCLUDE_PARSE_XML (const xmlChar *) "xml"
+/**
+ * XINCLUDE_PARSE_TEXT:
+ *
+ * Macro defining "text"
+ */
+#define XINCLUDE_PARSE_TEXT (const xmlChar *) "text"
+/**
+ * XINCLUDE_PARSE_ENCODING:
+ *
+ * Macro defining "encoding"
+ */
+#define XINCLUDE_PARSE_ENCODING (const xmlChar *) "encoding"
+/**
+ * XINCLUDE_PARSE_XPOINTER:
+ *
+ * Macro defining "xpointer"
+ */
+#define XINCLUDE_PARSE_XPOINTER (const xmlChar *) "xpointer"
+
+typedef struct _xmlXIncludeCtxt xmlXIncludeCtxt;
+typedef xmlXIncludeCtxt *xmlXIncludeCtxtPtr;
+
+/*
+ * standalone processing
+ */
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcess (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessFlags (xmlDocPtr doc,
+ int flags);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessFlagsData(xmlDocPtr doc,
+ int flags,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTreeFlagsData(xmlNodePtr tree,
+ int flags,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTree (xmlNodePtr tree);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessTreeFlags(xmlNodePtr tree,
+ int flags);
+/*
+ * contextual processing
+ */
+XMLPUBFUN xmlXIncludeCtxtPtr XMLCALL
+ xmlXIncludeNewContext (xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeSetFlags (xmlXIncludeCtxtPtr ctxt,
+ int flags);
+XMLPUBFUN void XMLCALL
+ xmlXIncludeFreeContext (xmlXIncludeCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXIncludeProcessNode (xmlXIncludeCtxtPtr ctxt,
+ xmlNodePtr tree);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XINCLUDE_ENABLED */
+
+#endif /* __XML_XINCLUDE_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xlink.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xlink.h
new file mode 100644
index 0000000..a209a99
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xlink.h
@@ -0,0 +1,189 @@
+/*
+ * Summary: unfinished XLink detection module
+ * Description: unfinished XLink detection module
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XLINK_H__
+#define __XML_XLINK_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * Various defines for the various Link properties.
+ *
+ * NOTE: the link detection layer will try to resolve QName expansion
+ * of namespaces. If "foo" is the prefix for "http://foo.com/"
+ * then the link detection layer will expand role="foo:myrole"
+ * to "http://foo.com/:myrole".
+ * NOTE: the link detection layer will expand URI-Refences found on
+ * href attributes by using the base mechanism if found.
+ */
+typedef xmlChar *xlinkHRef;
+typedef xmlChar *xlinkRole;
+typedef xmlChar *xlinkTitle;
+
+typedef enum {
+ XLINK_TYPE_NONE = 0,
+ XLINK_TYPE_SIMPLE,
+ XLINK_TYPE_EXTENDED,
+ XLINK_TYPE_EXTENDED_SET
+} xlinkType;
+
+typedef enum {
+ XLINK_SHOW_NONE = 0,
+ XLINK_SHOW_NEW,
+ XLINK_SHOW_EMBED,
+ XLINK_SHOW_REPLACE
+} xlinkShow;
+
+typedef enum {
+ XLINK_ACTUATE_NONE = 0,
+ XLINK_ACTUATE_AUTO,
+ XLINK_ACTUATE_ONREQUEST
+} xlinkActuate;
+
+/**
+ * xlinkNodeDetectFunc:
+ * @ctx: user data pointer
+ * @node: the node to check
+ *
+ * This is the prototype for the link detection routine.
+ * It calls the default link detection callbacks upon link detection.
+ */
+typedef void (*xlinkNodeDetectFunc) (void *ctx, xmlNodePtr node);
+
+/*
+ * The link detection module interact with the upper layers using
+ * a set of callback registered at parsing time.
+ */
+
+/**
+ * xlinkSimpleLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @href: the target of the link
+ * @role: the role string
+ * @title: the link title
+ *
+ * This is the prototype for a simple link detection callback.
+ */
+typedef void
+(*xlinkSimpleLinkFunk) (void *ctx,
+ xmlNodePtr node,
+ const xlinkHRef href,
+ const xlinkRole role,
+ const xlinkTitle title);
+
+/**
+ * xlinkExtendedLinkFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbArcs: the number of arcs detected on the link
+ * @from: pointer to the array of source roles found on the arcs
+ * @to: pointer to the array of target roles found on the arcs
+ * @show: array of values for the show attributes found on the arcs
+ * @actuate: array of values for the actuate attributes found on the arcs
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkFunk)(void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbArcs,
+ const xlinkRole *from,
+ const xlinkRole *to,
+ xlinkShow *show,
+ xlinkActuate *actuate,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * xlinkExtendedLinkSetFunk:
+ * @ctx: user data pointer
+ * @node: the node carrying the link
+ * @nbLocators: the number of locators detected on the link
+ * @hrefs: pointer to the array of locator hrefs
+ * @roles: pointer to the array of locator roles
+ * @nbTitles: the number of titles detected on the link
+ * @title: array of titles detected on the link
+ * @langs: array of xml:lang values for the titles
+ *
+ * This is the prototype for a extended link set detection callback.
+ */
+typedef void
+(*xlinkExtendedLinkSetFunk) (void *ctx,
+ xmlNodePtr node,
+ int nbLocators,
+ const xlinkHRef *hrefs,
+ const xlinkRole *roles,
+ int nbTitles,
+ const xlinkTitle *titles,
+ const xmlChar **langs);
+
+/**
+ * This is the structure containing a set of Links detection callbacks.
+ *
+ * There is no default xlink callbacks, if one want to get link
+ * recognition activated, those call backs must be provided before parsing.
+ */
+typedef struct _xlinkHandler xlinkHandler;
+typedef xlinkHandler *xlinkHandlerPtr;
+struct _xlinkHandler {
+ xlinkSimpleLinkFunk simple;
+ xlinkExtendedLinkFunk extended;
+ xlinkExtendedLinkSetFunk set;
+};
+
+/*
+ * The default detection routine, can be overridden, they call the default
+ * detection callbacks.
+ */
+
+XMLPUBFUN xlinkNodeDetectFunc XMLCALL
+ xlinkGetDefaultDetect (void);
+XMLPUBFUN void XMLCALL
+ xlinkSetDefaultDetect (xlinkNodeDetectFunc func);
+
+/*
+ * Routines to set/get the default handlers.
+ */
+XMLPUBFUN xlinkHandlerPtr XMLCALL
+ xlinkGetDefaultHandler (void);
+XMLPUBFUN void XMLCALL
+ xlinkSetDefaultHandler (xlinkHandlerPtr handler);
+
+/*
+ * Link detection module itself.
+ */
+XMLPUBFUN xlinkType XMLCALL
+ xlinkIsLink (xmlDocPtr doc,
+ xmlNodePtr node);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+
+#endif /* __XML_XLINK_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlIO.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlIO.h
new file mode 100644
index 0000000..bd543b7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlIO.h
@@ -0,0 +1,360 @@
+/*
+ * Summary: interface for the I/O interfaces used by the parser
+ * Description: interface for the I/O interfaces used by the parser
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_IO_H__
+#define __XML_IO_H__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Those are the functions and datatypes for the parser input
+ * I/O structures.
+ */
+
+/**
+ * xmlInputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to detect if the current handler
+ * can provide input fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Input module should be used
+ */
+typedef int (XMLCALL *xmlInputMatchCallback) (char const *filename);
+/**
+ * xmlInputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Input API to open the resource
+ *
+ * Returns an Input context or NULL in case or error
+ */
+typedef void * (XMLCALL *xmlInputOpenCallback) (char const *filename);
+/**
+ * xmlInputReadCallback:
+ * @context: an Input context
+ * @buffer: the buffer to store data read
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Input API to read the resource
+ *
+ * Returns the number of bytes read or -1 in case of error
+ */
+typedef int (XMLCALL *xmlInputReadCallback) (void * context, char * buffer, int len);
+/**
+ * xmlInputCloseCallback:
+ * @context: an Input context
+ *
+ * Callback used in the I/O Input API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (XMLCALL *xmlInputCloseCallback) (void * context);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Those are the functions and datatypes for the library output
+ * I/O structures.
+ */
+
+/**
+ * xmlOutputMatchCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to detect if the current handler
+ * can provide output fonctionnalities for this resource.
+ *
+ * Returns 1 if yes and 0 if another Output module should be used
+ */
+typedef int (XMLCALL *xmlOutputMatchCallback) (char const *filename);
+/**
+ * xmlOutputOpenCallback:
+ * @filename: the filename or URI
+ *
+ * Callback used in the I/O Output API to open the resource
+ *
+ * Returns an Output context or NULL in case or error
+ */
+typedef void * (XMLCALL *xmlOutputOpenCallback) (char const *filename);
+/**
+ * xmlOutputWriteCallback:
+ * @context: an Output context
+ * @buffer: the buffer of data to write
+ * @len: the length of the buffer in bytes
+ *
+ * Callback used in the I/O Output API to write to the resource
+ *
+ * Returns the number of bytes written or -1 in case of error
+ */
+typedef int (XMLCALL *xmlOutputWriteCallback) (void * context, const char * buffer,
+ int len);
+/**
+ * xmlOutputCloseCallback:
+ * @context: an Output context
+ *
+ * Callback used in the I/O Output API to close the resource
+ *
+ * Returns 0 or -1 in case of error
+ */
+typedef int (XMLCALL *xmlOutputCloseCallback) (void * context);
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#include <libxml/globals.h>
+#include <libxml/tree.h>
+#include <libxml/parser.h>
+#include <libxml/encoding.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+struct _xmlParserInputBuffer {
+ void* context;
+ xmlInputReadCallback readcallback;
+ xmlInputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 */
+ xmlBufferPtr raw; /* if encoder != NULL buffer for raw input */
+ int compressed; /* -1=unknown, 0=not compressed, 1=compressed */
+ int error;
+ unsigned long rawconsumed;/* amount consumed from raw */
+};
+
+
+#ifdef LIBXML_OUTPUT_ENABLED
+struct _xmlOutputBuffer {
+ void* context;
+ xmlOutputWriteCallback writecallback;
+ xmlOutputCloseCallback closecallback;
+
+ xmlCharEncodingHandlerPtr encoder; /* I18N conversions to UTF-8 */
+
+ xmlBufferPtr buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
+ xmlBufferPtr conv; /* if encoder != NULL buffer for output */
+ int written; /* total number of byte written */
+ int error;
+};
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+/*
+ * Interfaces for input
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupInputCallbacks (void);
+
+XMLPUBFUN int XMLCALL
+ xmlPopInputCallbacks (void);
+
+XMLPUBFUN void XMLCALL
+ xmlRegisterDefaultInputCallbacks (void);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlAllocParserInputBuffer (xmlCharEncoding enc);
+
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFilename (const char *URI,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFile (FILE *file,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateFd (int fd,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateMem (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateStatic (const char *mem, int size,
+ xmlCharEncoding enc);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlParserInputBufferCreateIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncoding enc);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferRead (xmlParserInputBufferPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferGrow (xmlParserInputBufferPtr in,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlParserInputBufferPush (xmlParserInputBufferPtr in,
+ int len,
+ const char *buf);
+XMLPUBFUN void XMLCALL
+ xmlFreeParserInputBuffer (xmlParserInputBufferPtr in);
+XMLPUBFUN char * XMLCALL
+ xmlParserGetDirectory (const char *filename);
+
+XMLPUBFUN int XMLCALL
+ xmlRegisterInputCallbacks (xmlInputMatchCallback matchFunc,
+ xmlInputOpenCallback openFunc,
+ xmlInputReadCallback readFunc,
+ xmlInputCloseCallback closeFunc);
+
+xmlParserInputBufferPtr
+ __xmlParserInputBufferCreateFilename(const char *URI,
+ xmlCharEncoding enc);
+
+#ifdef LIBXML_OUTPUT_ENABLED
+/*
+ * Interfaces for output
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupOutputCallbacks (void);
+XMLPUBFUN void XMLCALL
+ xmlRegisterDefaultOutputCallbacks(void);
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlAllocOutputBuffer (xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFilename (const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFile (FILE *file,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateBuffer (xmlBufferPtr buffer,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateFd (int fd,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN xmlOutputBufferPtr XMLCALL
+ xmlOutputBufferCreateIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ xmlCharEncodingHandlerPtr encoder);
+
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWrite (xmlOutputBufferPtr out,
+ int len,
+ const char *buf);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWriteString (xmlOutputBufferPtr out,
+ const char *str);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferWriteEscape (xmlOutputBufferPtr out,
+ const xmlChar *str,
+ xmlCharEncodingOutputFunc escaping);
+
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferFlush (xmlOutputBufferPtr out);
+XMLPUBFUN int XMLCALL
+ xmlOutputBufferClose (xmlOutputBufferPtr out);
+
+XMLPUBFUN int XMLCALL
+ xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
+ xmlOutputOpenCallback openFunc,
+ xmlOutputWriteCallback writeFunc,
+ xmlOutputCloseCallback closeFunc);
+
+xmlOutputBufferPtr
+ __xmlOutputBufferCreateFilename(const char *URI,
+ xmlCharEncodingHandlerPtr encoder,
+ int compression);
+
+#ifdef LIBXML_HTTP_ENABLED
+/* This function only exists if HTTP support built into the library */
+XMLPUBFUN void XMLCALL
+ xmlRegisterHTTPPostCallbacks (void );
+#endif /* LIBXML_HTTP_ENABLED */
+
+#endif /* LIBXML_OUTPUT_ENABLED */
+
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlCheckHTTPInput (xmlParserCtxtPtr ctxt,
+ xmlParserInputPtr ret);
+
+/*
+ * A predefined entity loader disabling network accesses
+ */
+XMLPUBFUN xmlParserInputPtr XMLCALL
+ xmlNoNetExternalEntityLoader (const char *URL,
+ const char *ID,
+ xmlParserCtxtPtr ctxt);
+
+/*
+ * xmlNormalizeWindowsPath is obsolete, don't use it.
+ * Check xmlCanonicPath in uri.h for a better alternative.
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlNormalizeWindowsPath (const xmlChar *path);
+
+XMLPUBFUN int XMLCALL
+ xmlCheckFilename (const char *path);
+/**
+ * Default 'file://' protocol callbacks
+ */
+XMLPUBFUN int XMLCALL
+ xmlFileMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlFileOpen (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlFileRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlFileClose (void * context);
+
+/**
+ * Default 'http://' protocol callbacks
+ */
+#ifdef LIBXML_HTTP_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlIOHTTPOpen (const char *filename);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void * XMLCALL
+ xmlIOHTTPOpenW (const char * post_uri,
+ int compression );
+#endif /* LIBXML_OUTPUT_ENABLED */
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlIOHTTPClose (void * context);
+#endif /* LIBXML_HTTP_ENABLED */
+
+/**
+ * Default 'ftp://' protocol callbacks
+ */
+#ifdef LIBXML_FTP_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlIOFTPMatch (const char *filename);
+XMLPUBFUN void * XMLCALL
+ xmlIOFTPOpen (const char *filename);
+XMLPUBFUN int XMLCALL
+ xmlIOFTPRead (void * context,
+ char * buffer,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlIOFTPClose (void * context);
+#endif /* LIBXML_FTP_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_IO_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlautomata.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlautomata.h
new file mode 100644
index 0000000..bf1b131
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlautomata.h
@@ -0,0 +1,146 @@
+/*
+ * Summary: API to build regexp automata
+ * Description: the API to build regexp automata
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_AUTOMATA_H__
+#define __XML_AUTOMATA_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+
+#ifdef LIBXML_REGEXP_ENABLED
+#ifdef LIBXML_AUTOMATA_ENABLED
+#include <libxml/xmlregexp.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlAutomataPtr:
+ *
+ * A libxml automata description, It can be compiled into a regexp
+ */
+typedef struct _xmlAutomata xmlAutomata;
+typedef xmlAutomata *xmlAutomataPtr;
+
+/**
+ * xmlAutomataStatePtr:
+ *
+ * A state int the automata description,
+ */
+typedef struct _xmlAutomataState xmlAutomataState;
+typedef xmlAutomataState *xmlAutomataStatePtr;
+
+/*
+ * Building API
+ */
+XMLPUBFUN xmlAutomataPtr XMLCALL
+ xmlNewAutomata (void);
+XMLPUBFUN void XMLCALL
+ xmlFreeAutomata (xmlAutomataPtr am);
+
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataGetInitState (xmlAutomataPtr am);
+XMLPUBFUN int XMLCALL
+ xmlAutomataSetFinalState (xmlAutomataPtr am,
+ xmlAutomataStatePtr state);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewState (xmlAutomataPtr am);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewTransition (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewTransition2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewNegTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ void *data);
+
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewOnceTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewOnceTrans2 (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ const xmlChar *token,
+ const xmlChar *token2,
+ int min,
+ int max,
+ void *data);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewAllTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int lax);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewEpsilon (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCountedTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XMLPUBFUN xmlAutomataStatePtr XMLCALL
+ xmlAutomataNewCounterTrans (xmlAutomataPtr am,
+ xmlAutomataStatePtr from,
+ xmlAutomataStatePtr to,
+ int counter);
+XMLPUBFUN int XMLCALL
+ xmlAutomataNewCounter (xmlAutomataPtr am,
+ int min,
+ int max);
+
+XMLPUBFUN xmlRegexpPtr XMLCALL
+ xmlAutomataCompile (xmlAutomataPtr am);
+XMLPUBFUN int XMLCALL
+ xmlAutomataIsDeterminist (xmlAutomataPtr am);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_AUTOMATA_ENABLED */
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /* __XML_AUTOMATA_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlerror.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlerror.h
new file mode 100644
index 0000000..e924211
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlerror.h
@@ -0,0 +1,944 @@
+/*
+ * Summary: error handling
+ * Description: the API used to report errors
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#include <libxml/parser.h>
+
+#ifndef __XML_ERROR_H__
+#define __XML_ERROR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlErrorLevel:
+ *
+ * Indicates the level of an error
+ */
+typedef enum {
+ XML_ERR_NONE = 0,
+ XML_ERR_WARNING = 1, /* A simple warning */
+ XML_ERR_ERROR = 2, /* A recoverable error */
+ XML_ERR_FATAL = 3 /* A fatal error */
+} xmlErrorLevel;
+
+/**
+ * xmlErrorDomain:
+ *
+ * Indicates where an error may have come from
+ */
+typedef enum {
+ XML_FROM_NONE = 0,
+ XML_FROM_PARSER, /* The XML parser */
+ XML_FROM_TREE, /* The tree module */
+ XML_FROM_NAMESPACE, /* The XML Namespace module */
+ XML_FROM_DTD, /* The XML DTD validation with parser context*/
+ XML_FROM_HTML, /* The HTML parser */
+ XML_FROM_MEMORY, /* The memory allocator */
+ XML_FROM_OUTPUT, /* The serialization code */
+ XML_FROM_IO, /* The Input/Output stack */
+ XML_FROM_FTP, /* The FTP module */
+ XML_FROM_HTTP, /* The HTTP module */
+ XML_FROM_XINCLUDE, /* The XInclude processing */
+ XML_FROM_XPATH, /* The XPath module */
+ XML_FROM_XPOINTER, /* The XPointer module */
+ XML_FROM_REGEXP, /* The regular expressions module */
+ XML_FROM_DATATYPE, /* The W3C XML Schemas Datatype module */
+ XML_FROM_SCHEMASP, /* The W3C XML Schemas parser module */
+ XML_FROM_SCHEMASV, /* The W3C XML Schemas validation module */
+ XML_FROM_RELAXNGP, /* The Relax-NG parser module */
+ XML_FROM_RELAXNGV, /* The Relax-NG validator module */
+ XML_FROM_CATALOG, /* The Catalog module */
+ XML_FROM_C14N, /* The Canonicalization module */
+ XML_FROM_XSLT, /* The XSLT engine from libxslt */
+ XML_FROM_VALID, /* The XML DTD validation with valid context */
+ XML_FROM_CHECK, /* The error checking module */
+ XML_FROM_WRITER, /* The xmlwriter module */
+ XML_FROM_MODULE, /* The dynamically loaded module module*/
+ XML_FROM_I18N, /* The module handling character conversion */
+ XML_FROM_SCHEMATRONV /* The Schematron validator module */
+} xmlErrorDomain;
+
+/**
+ * xmlError:
+ *
+ * An XML Error instance.
+ */
+
+typedef struct _xmlError xmlError;
+typedef xmlError *xmlErrorPtr;
+struct _xmlError {
+ int domain; /* What part of the library raised this error */
+ int code; /* The error code, e.g. an xmlParserError */
+ char *message;/* human-readable informative error message */
+ xmlErrorLevel level;/* how consequent is the error */
+ char *file; /* the filename */
+ int line; /* the line number if available */
+ char *str1; /* extra string information */
+ char *str2; /* extra string information */
+ char *str3; /* extra string information */
+ int int1; /* extra number information */
+ int int2; /* column number of the error or 0 if N/A (todo: rename this field when we would break ABI) */
+ void *ctxt; /* the parser context if available */
+ void *node; /* the node in the tree */
+};
+
+/**
+ * xmlParserError:
+ *
+ * This is an error that the XML (or HTML) parser can generate
+ */
+typedef enum {
+ XML_ERR_OK = 0,
+ XML_ERR_INTERNAL_ERROR, /* 1 */
+ XML_ERR_NO_MEMORY, /* 2 */
+ XML_ERR_DOCUMENT_START, /* 3 */
+ XML_ERR_DOCUMENT_EMPTY, /* 4 */
+ XML_ERR_DOCUMENT_END, /* 5 */
+ XML_ERR_INVALID_HEX_CHARREF, /* 6 */
+ XML_ERR_INVALID_DEC_CHARREF, /* 7 */
+ XML_ERR_INVALID_CHARREF, /* 8 */
+ XML_ERR_INVALID_CHAR, /* 9 */
+ XML_ERR_CHARREF_AT_EOF, /* 10 */
+ XML_ERR_CHARREF_IN_PROLOG, /* 11 */
+ XML_ERR_CHARREF_IN_EPILOG, /* 12 */
+ XML_ERR_CHARREF_IN_DTD, /* 13 */
+ XML_ERR_ENTITYREF_AT_EOF, /* 14 */
+ XML_ERR_ENTITYREF_IN_PROLOG, /* 15 */
+ XML_ERR_ENTITYREF_IN_EPILOG, /* 16 */
+ XML_ERR_ENTITYREF_IN_DTD, /* 17 */
+ XML_ERR_PEREF_AT_EOF, /* 18 */
+ XML_ERR_PEREF_IN_PROLOG, /* 19 */
+ XML_ERR_PEREF_IN_EPILOG, /* 20 */
+ XML_ERR_PEREF_IN_INT_SUBSET, /* 21 */
+ XML_ERR_ENTITYREF_NO_NAME, /* 22 */
+ XML_ERR_ENTITYREF_SEMICOL_MISSING, /* 23 */
+ XML_ERR_PEREF_NO_NAME, /* 24 */
+ XML_ERR_PEREF_SEMICOL_MISSING, /* 25 */
+ XML_ERR_UNDECLARED_ENTITY, /* 26 */
+ XML_WAR_UNDECLARED_ENTITY, /* 27 */
+ XML_ERR_UNPARSED_ENTITY, /* 28 */
+ XML_ERR_ENTITY_IS_EXTERNAL, /* 29 */
+ XML_ERR_ENTITY_IS_PARAMETER, /* 30 */
+ XML_ERR_UNKNOWN_ENCODING, /* 31 */
+ XML_ERR_UNSUPPORTED_ENCODING, /* 32 */
+ XML_ERR_STRING_NOT_STARTED, /* 33 */
+ XML_ERR_STRING_NOT_CLOSED, /* 34 */
+ XML_ERR_NS_DECL_ERROR, /* 35 */
+ XML_ERR_ENTITY_NOT_STARTED, /* 36 */
+ XML_ERR_ENTITY_NOT_FINISHED, /* 37 */
+ XML_ERR_LT_IN_ATTRIBUTE, /* 38 */
+ XML_ERR_ATTRIBUTE_NOT_STARTED, /* 39 */
+ XML_ERR_ATTRIBUTE_NOT_FINISHED, /* 40 */
+ XML_ERR_ATTRIBUTE_WITHOUT_VALUE, /* 41 */
+ XML_ERR_ATTRIBUTE_REDEFINED, /* 42 */
+ XML_ERR_LITERAL_NOT_STARTED, /* 43 */
+ XML_ERR_LITERAL_NOT_FINISHED, /* 44 */
+ XML_ERR_COMMENT_NOT_FINISHED, /* 45 */
+ XML_ERR_PI_NOT_STARTED, /* 46 */
+ XML_ERR_PI_NOT_FINISHED, /* 47 */
+ XML_ERR_NOTATION_NOT_STARTED, /* 48 */
+ XML_ERR_NOTATION_NOT_FINISHED, /* 49 */
+ XML_ERR_ATTLIST_NOT_STARTED, /* 50 */
+ XML_ERR_ATTLIST_NOT_FINISHED, /* 51 */
+ XML_ERR_MIXED_NOT_STARTED, /* 52 */
+ XML_ERR_MIXED_NOT_FINISHED, /* 53 */
+ XML_ERR_ELEMCONTENT_NOT_STARTED, /* 54 */
+ XML_ERR_ELEMCONTENT_NOT_FINISHED, /* 55 */
+ XML_ERR_XMLDECL_NOT_STARTED, /* 56 */
+ XML_ERR_XMLDECL_NOT_FINISHED, /* 57 */
+ XML_ERR_CONDSEC_NOT_STARTED, /* 58 */
+ XML_ERR_CONDSEC_NOT_FINISHED, /* 59 */
+ XML_ERR_EXT_SUBSET_NOT_FINISHED, /* 60 */
+ XML_ERR_DOCTYPE_NOT_FINISHED, /* 61 */
+ XML_ERR_MISPLACED_CDATA_END, /* 62 */
+ XML_ERR_CDATA_NOT_FINISHED, /* 63 */
+ XML_ERR_RESERVED_XML_NAME, /* 64 */
+ XML_ERR_SPACE_REQUIRED, /* 65 */
+ XML_ERR_SEPARATOR_REQUIRED, /* 66 */
+ XML_ERR_NMTOKEN_REQUIRED, /* 67 */
+ XML_ERR_NAME_REQUIRED, /* 68 */
+ XML_ERR_PCDATA_REQUIRED, /* 69 */
+ XML_ERR_URI_REQUIRED, /* 70 */
+ XML_ERR_PUBID_REQUIRED, /* 71 */
+ XML_ERR_LT_REQUIRED, /* 72 */
+ XML_ERR_GT_REQUIRED, /* 73 */
+ XML_ERR_LTSLASH_REQUIRED, /* 74 */
+ XML_ERR_EQUAL_REQUIRED, /* 75 */
+ XML_ERR_TAG_NAME_MISMATCH, /* 76 */
+ XML_ERR_TAG_NOT_FINISHED, /* 77 */
+ XML_ERR_STANDALONE_VALUE, /* 78 */
+ XML_ERR_ENCODING_NAME, /* 79 */
+ XML_ERR_HYPHEN_IN_COMMENT, /* 80 */
+ XML_ERR_INVALID_ENCODING, /* 81 */
+ XML_ERR_EXT_ENTITY_STANDALONE, /* 82 */
+ XML_ERR_CONDSEC_INVALID, /* 83 */
+ XML_ERR_VALUE_REQUIRED, /* 84 */
+ XML_ERR_NOT_WELL_BALANCED, /* 85 */
+ XML_ERR_EXTRA_CONTENT, /* 86 */
+ XML_ERR_ENTITY_CHAR_ERROR, /* 87 */
+ XML_ERR_ENTITY_PE_INTERNAL, /* 88 */
+ XML_ERR_ENTITY_LOOP, /* 89 */
+ XML_ERR_ENTITY_BOUNDARY, /* 90 */
+ XML_ERR_INVALID_URI, /* 91 */
+ XML_ERR_URI_FRAGMENT, /* 92 */
+ XML_WAR_CATALOG_PI, /* 93 */
+ XML_ERR_NO_DTD, /* 94 */
+ XML_ERR_CONDSEC_INVALID_KEYWORD, /* 95 */
+ XML_ERR_VERSION_MISSING, /* 96 */
+ XML_WAR_UNKNOWN_VERSION, /* 97 */
+ XML_WAR_LANG_VALUE, /* 98 */
+ XML_WAR_NS_URI, /* 99 */
+ XML_WAR_NS_URI_RELATIVE, /* 100 */
+ XML_ERR_MISSING_ENCODING, /* 101 */
+ XML_WAR_SPACE_VALUE, /* 102 */
+ XML_ERR_NOT_STANDALONE, /* 103 */
+ XML_ERR_ENTITY_PROCESSING, /* 104 */
+ XML_ERR_NOTATION_PROCESSING, /* 105 */
+ XML_WAR_NS_COLUMN, /* 106 */
+ XML_WAR_ENTITY_REDEFINED, /* 107 */
+ XML_ERR_UNKNOWN_VERSION, /* 108 */
+ XML_ERR_VERSION_MISMATCH, /* 109 */
+ XML_NS_ERR_XML_NAMESPACE = 200,
+ XML_NS_ERR_UNDEFINED_NAMESPACE, /* 201 */
+ XML_NS_ERR_QNAME, /* 202 */
+ XML_NS_ERR_ATTRIBUTE_REDEFINED, /* 203 */
+ XML_NS_ERR_EMPTY, /* 204 */
+ XML_NS_ERR_COLON, /* 205 */
+ XML_DTD_ATTRIBUTE_DEFAULT = 500,
+ XML_DTD_ATTRIBUTE_REDEFINED, /* 501 */
+ XML_DTD_ATTRIBUTE_VALUE, /* 502 */
+ XML_DTD_CONTENT_ERROR, /* 503 */
+ XML_DTD_CONTENT_MODEL, /* 504 */
+ XML_DTD_CONTENT_NOT_DETERMINIST, /* 505 */
+ XML_DTD_DIFFERENT_PREFIX, /* 506 */
+ XML_DTD_ELEM_DEFAULT_NAMESPACE, /* 507 */
+ XML_DTD_ELEM_NAMESPACE, /* 508 */
+ XML_DTD_ELEM_REDEFINED, /* 509 */
+ XML_DTD_EMPTY_NOTATION, /* 510 */
+ XML_DTD_ENTITY_TYPE, /* 511 */
+ XML_DTD_ID_FIXED, /* 512 */
+ XML_DTD_ID_REDEFINED, /* 513 */
+ XML_DTD_ID_SUBSET, /* 514 */
+ XML_DTD_INVALID_CHILD, /* 515 */
+ XML_DTD_INVALID_DEFAULT, /* 516 */
+ XML_DTD_LOAD_ERROR, /* 517 */
+ XML_DTD_MISSING_ATTRIBUTE, /* 518 */
+ XML_DTD_MIXED_CORRUPT, /* 519 */
+ XML_DTD_MULTIPLE_ID, /* 520 */
+ XML_DTD_NO_DOC, /* 521 */
+ XML_DTD_NO_DTD, /* 522 */
+ XML_DTD_NO_ELEM_NAME, /* 523 */
+ XML_DTD_NO_PREFIX, /* 524 */
+ XML_DTD_NO_ROOT, /* 525 */
+ XML_DTD_NOTATION_REDEFINED, /* 526 */
+ XML_DTD_NOTATION_VALUE, /* 527 */
+ XML_DTD_NOT_EMPTY, /* 528 */
+ XML_DTD_NOT_PCDATA, /* 529 */
+ XML_DTD_NOT_STANDALONE, /* 530 */
+ XML_DTD_ROOT_NAME, /* 531 */
+ XML_DTD_STANDALONE_WHITE_SPACE, /* 532 */
+ XML_DTD_UNKNOWN_ATTRIBUTE, /* 533 */
+ XML_DTD_UNKNOWN_ELEM, /* 534 */
+ XML_DTD_UNKNOWN_ENTITY, /* 535 */
+ XML_DTD_UNKNOWN_ID, /* 536 */
+ XML_DTD_UNKNOWN_NOTATION, /* 537 */
+ XML_DTD_STANDALONE_DEFAULTED, /* 538 */
+ XML_DTD_XMLID_VALUE, /* 539 */
+ XML_DTD_XMLID_TYPE, /* 540 */
+ XML_DTD_DUP_TOKEN, /* 541 */
+ XML_HTML_STRUCURE_ERROR = 800,
+ XML_HTML_UNKNOWN_TAG, /* 801 */
+ XML_RNGP_ANYNAME_ATTR_ANCESTOR = 1000,
+ XML_RNGP_ATTR_CONFLICT, /* 1001 */
+ XML_RNGP_ATTRIBUTE_CHILDREN, /* 1002 */
+ XML_RNGP_ATTRIBUTE_CONTENT, /* 1003 */
+ XML_RNGP_ATTRIBUTE_EMPTY, /* 1004 */
+ XML_RNGP_ATTRIBUTE_NOOP, /* 1005 */
+ XML_RNGP_CHOICE_CONTENT, /* 1006 */
+ XML_RNGP_CHOICE_EMPTY, /* 1007 */
+ XML_RNGP_CREATE_FAILURE, /* 1008 */
+ XML_RNGP_DATA_CONTENT, /* 1009 */
+ XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, /* 1010 */
+ XML_RNGP_DEFINE_CREATE_FAILED, /* 1011 */
+ XML_RNGP_DEFINE_EMPTY, /* 1012 */
+ XML_RNGP_DEFINE_MISSING, /* 1013 */
+ XML_RNGP_DEFINE_NAME_MISSING, /* 1014 */
+ XML_RNGP_ELEM_CONTENT_EMPTY, /* 1015 */
+ XML_RNGP_ELEM_CONTENT_ERROR, /* 1016 */
+ XML_RNGP_ELEMENT_EMPTY, /* 1017 */
+ XML_RNGP_ELEMENT_CONTENT, /* 1018 */
+ XML_RNGP_ELEMENT_NAME, /* 1019 */
+ XML_RNGP_ELEMENT_NO_CONTENT, /* 1020 */
+ XML_RNGP_ELEM_TEXT_CONFLICT, /* 1021 */
+ XML_RNGP_EMPTY, /* 1022 */
+ XML_RNGP_EMPTY_CONSTRUCT, /* 1023 */
+ XML_RNGP_EMPTY_CONTENT, /* 1024 */
+ XML_RNGP_EMPTY_NOT_EMPTY, /* 1025 */
+ XML_RNGP_ERROR_TYPE_LIB, /* 1026 */
+ XML_RNGP_EXCEPT_EMPTY, /* 1027 */
+ XML_RNGP_EXCEPT_MISSING, /* 1028 */
+ XML_RNGP_EXCEPT_MULTIPLE, /* 1029 */
+ XML_RNGP_EXCEPT_NO_CONTENT, /* 1030 */
+ XML_RNGP_EXTERNALREF_EMTPY, /* 1031 */
+ XML_RNGP_EXTERNAL_REF_FAILURE, /* 1032 */
+ XML_RNGP_EXTERNALREF_RECURSE, /* 1033 */
+ XML_RNGP_FORBIDDEN_ATTRIBUTE, /* 1034 */
+ XML_RNGP_FOREIGN_ELEMENT, /* 1035 */
+ XML_RNGP_GRAMMAR_CONTENT, /* 1036 */
+ XML_RNGP_GRAMMAR_EMPTY, /* 1037 */
+ XML_RNGP_GRAMMAR_MISSING, /* 1038 */
+ XML_RNGP_GRAMMAR_NO_START, /* 1039 */
+ XML_RNGP_GROUP_ATTR_CONFLICT, /* 1040 */
+ XML_RNGP_HREF_ERROR, /* 1041 */
+ XML_RNGP_INCLUDE_EMPTY, /* 1042 */
+ XML_RNGP_INCLUDE_FAILURE, /* 1043 */
+ XML_RNGP_INCLUDE_RECURSE, /* 1044 */
+ XML_RNGP_INTERLEAVE_ADD, /* 1045 */
+ XML_RNGP_INTERLEAVE_CREATE_FAILED, /* 1046 */
+ XML_RNGP_INTERLEAVE_EMPTY, /* 1047 */
+ XML_RNGP_INTERLEAVE_NO_CONTENT, /* 1048 */
+ XML_RNGP_INVALID_DEFINE_NAME, /* 1049 */
+ XML_RNGP_INVALID_URI, /* 1050 */
+ XML_RNGP_INVALID_VALUE, /* 1051 */
+ XML_RNGP_MISSING_HREF, /* 1052 */
+ XML_RNGP_NAME_MISSING, /* 1053 */
+ XML_RNGP_NEED_COMBINE, /* 1054 */
+ XML_RNGP_NOTALLOWED_NOT_EMPTY, /* 1055 */
+ XML_RNGP_NSNAME_ATTR_ANCESTOR, /* 1056 */
+ XML_RNGP_NSNAME_NO_NS, /* 1057 */
+ XML_RNGP_PARAM_FORBIDDEN, /* 1058 */
+ XML_RNGP_PARAM_NAME_MISSING, /* 1059 */
+ XML_RNGP_PARENTREF_CREATE_FAILED, /* 1060 */
+ XML_RNGP_PARENTREF_NAME_INVALID, /* 1061 */
+ XML_RNGP_PARENTREF_NO_NAME, /* 1062 */
+ XML_RNGP_PARENTREF_NO_PARENT, /* 1063 */
+ XML_RNGP_PARENTREF_NOT_EMPTY, /* 1064 */
+ XML_RNGP_PARSE_ERROR, /* 1065 */
+ XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, /* 1066 */
+ XML_RNGP_PAT_ATTR_ATTR, /* 1067 */
+ XML_RNGP_PAT_ATTR_ELEM, /* 1068 */
+ XML_RNGP_PAT_DATA_EXCEPT_ATTR, /* 1069 */
+ XML_RNGP_PAT_DATA_EXCEPT_ELEM, /* 1070 */
+ XML_RNGP_PAT_DATA_EXCEPT_EMPTY, /* 1071 */
+ XML_RNGP_PAT_DATA_EXCEPT_GROUP, /* 1072 */
+ XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, /* 1073 */
+ XML_RNGP_PAT_DATA_EXCEPT_LIST, /* 1074 */
+ XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, /* 1075 */
+ XML_RNGP_PAT_DATA_EXCEPT_REF, /* 1076 */
+ XML_RNGP_PAT_DATA_EXCEPT_TEXT, /* 1077 */
+ XML_RNGP_PAT_LIST_ATTR, /* 1078 */
+ XML_RNGP_PAT_LIST_ELEM, /* 1079 */
+ XML_RNGP_PAT_LIST_INTERLEAVE, /* 1080 */
+ XML_RNGP_PAT_LIST_LIST, /* 1081 */
+ XML_RNGP_PAT_LIST_REF, /* 1082 */
+ XML_RNGP_PAT_LIST_TEXT, /* 1083 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, /* 1084 */
+ XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, /* 1085 */
+ XML_RNGP_PAT_ONEMORE_GROUP_ATTR, /* 1086 */
+ XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, /* 1087 */
+ XML_RNGP_PAT_START_ATTR, /* 1088 */
+ XML_RNGP_PAT_START_DATA, /* 1089 */
+ XML_RNGP_PAT_START_EMPTY, /* 1090 */
+ XML_RNGP_PAT_START_GROUP, /* 1091 */
+ XML_RNGP_PAT_START_INTERLEAVE, /* 1092 */
+ XML_RNGP_PAT_START_LIST, /* 1093 */
+ XML_RNGP_PAT_START_ONEMORE, /* 1094 */
+ XML_RNGP_PAT_START_TEXT, /* 1095 */
+ XML_RNGP_PAT_START_VALUE, /* 1096 */
+ XML_RNGP_PREFIX_UNDEFINED, /* 1097 */
+ XML_RNGP_REF_CREATE_FAILED, /* 1098 */
+ XML_RNGP_REF_CYCLE, /* 1099 */
+ XML_RNGP_REF_NAME_INVALID, /* 1100 */
+ XML_RNGP_REF_NO_DEF, /* 1101 */
+ XML_RNGP_REF_NO_NAME, /* 1102 */
+ XML_RNGP_REF_NOT_EMPTY, /* 1103 */
+ XML_RNGP_START_CHOICE_AND_INTERLEAVE, /* 1104 */
+ XML_RNGP_START_CONTENT, /* 1105 */
+ XML_RNGP_START_EMPTY, /* 1106 */
+ XML_RNGP_START_MISSING, /* 1107 */
+ XML_RNGP_TEXT_EXPECTED, /* 1108 */
+ XML_RNGP_TEXT_HAS_CHILD, /* 1109 */
+ XML_RNGP_TYPE_MISSING, /* 1110 */
+ XML_RNGP_TYPE_NOT_FOUND, /* 1111 */
+ XML_RNGP_TYPE_VALUE, /* 1112 */
+ XML_RNGP_UNKNOWN_ATTRIBUTE, /* 1113 */
+ XML_RNGP_UNKNOWN_COMBINE, /* 1114 */
+ XML_RNGP_UNKNOWN_CONSTRUCT, /* 1115 */
+ XML_RNGP_UNKNOWN_TYPE_LIB, /* 1116 */
+ XML_RNGP_URI_FRAGMENT, /* 1117 */
+ XML_RNGP_URI_NOT_ABSOLUTE, /* 1118 */
+ XML_RNGP_VALUE_EMPTY, /* 1119 */
+ XML_RNGP_VALUE_NO_CONTENT, /* 1120 */
+ XML_RNGP_XMLNS_NAME, /* 1121 */
+ XML_RNGP_XML_NS, /* 1122 */
+ XML_XPATH_EXPRESSION_OK = 1200,
+ XML_XPATH_NUMBER_ERROR, /* 1201 */
+ XML_XPATH_UNFINISHED_LITERAL_ERROR, /* 1202 */
+ XML_XPATH_START_LITERAL_ERROR, /* 1203 */
+ XML_XPATH_VARIABLE_REF_ERROR, /* 1204 */
+ XML_XPATH_UNDEF_VARIABLE_ERROR, /* 1205 */
+ XML_XPATH_INVALID_PREDICATE_ERROR, /* 1206 */
+ XML_XPATH_EXPR_ERROR, /* 1207 */
+ XML_XPATH_UNCLOSED_ERROR, /* 1208 */
+ XML_XPATH_UNKNOWN_FUNC_ERROR, /* 1209 */
+ XML_XPATH_INVALID_OPERAND, /* 1210 */
+ XML_XPATH_INVALID_TYPE, /* 1211 */
+ XML_XPATH_INVALID_ARITY, /* 1212 */
+ XML_XPATH_INVALID_CTXT_SIZE, /* 1213 */
+ XML_XPATH_INVALID_CTXT_POSITION, /* 1214 */
+ XML_XPATH_MEMORY_ERROR, /* 1215 */
+ XML_XPTR_SYNTAX_ERROR, /* 1216 */
+ XML_XPTR_RESOURCE_ERROR, /* 1217 */
+ XML_XPTR_SUB_RESOURCE_ERROR, /* 1218 */
+ XML_XPATH_UNDEF_PREFIX_ERROR, /* 1219 */
+ XML_XPATH_ENCODING_ERROR, /* 1220 */
+ XML_XPATH_INVALID_CHAR_ERROR, /* 1221 */
+ XML_TREE_INVALID_HEX = 1300,
+ XML_TREE_INVALID_DEC, /* 1301 */
+ XML_TREE_UNTERMINATED_ENTITY, /* 1302 */
+ XML_TREE_NOT_UTF8, /* 1303 */
+ XML_SAVE_NOT_UTF8 = 1400,
+ XML_SAVE_CHAR_INVALID, /* 1401 */
+ XML_SAVE_NO_DOCTYPE, /* 1402 */
+ XML_SAVE_UNKNOWN_ENCODING, /* 1403 */
+ XML_REGEXP_COMPILE_ERROR = 1450,
+ XML_IO_UNKNOWN = 1500,
+ XML_IO_EACCES, /* 1501 */
+ XML_IO_EAGAIN, /* 1502 */
+ XML_IO_EBADF, /* 1503 */
+ XML_IO_EBADMSG, /* 1504 */
+ XML_IO_EBUSY, /* 1505 */
+ XML_IO_ECANCELED, /* 1506 */
+ XML_IO_ECHILD, /* 1507 */
+ XML_IO_EDEADLK, /* 1508 */
+ XML_IO_EDOM, /* 1509 */
+ XML_IO_EEXIST, /* 1510 */
+ XML_IO_EFAULT, /* 1511 */
+ XML_IO_EFBIG, /* 1512 */
+ XML_IO_EINPROGRESS, /* 1513 */
+ XML_IO_EINTR, /* 1514 */
+ XML_IO_EINVAL, /* 1515 */
+ XML_IO_EIO, /* 1516 */
+ XML_IO_EISDIR, /* 1517 */
+ XML_IO_EMFILE, /* 1518 */
+ XML_IO_EMLINK, /* 1519 */
+ XML_IO_EMSGSIZE, /* 1520 */
+ XML_IO_ENAMETOOLONG, /* 1521 */
+ XML_IO_ENFILE, /* 1522 */
+ XML_IO_ENODEV, /* 1523 */
+ XML_IO_ENOENT, /* 1524 */
+ XML_IO_ENOEXEC, /* 1525 */
+ XML_IO_ENOLCK, /* 1526 */
+ XML_IO_ENOMEM, /* 1527 */
+ XML_IO_ENOSPC, /* 1528 */
+ XML_IO_ENOSYS, /* 1529 */
+ XML_IO_ENOTDIR, /* 1530 */
+ XML_IO_ENOTEMPTY, /* 1531 */
+ XML_IO_ENOTSUP, /* 1532 */
+ XML_IO_ENOTTY, /* 1533 */
+ XML_IO_ENXIO, /* 1534 */
+ XML_IO_EPERM, /* 1535 */
+ XML_IO_EPIPE, /* 1536 */
+ XML_IO_ERANGE, /* 1537 */
+ XML_IO_EROFS, /* 1538 */
+ XML_IO_ESPIPE, /* 1539 */
+ XML_IO_ESRCH, /* 1540 */
+ XML_IO_ETIMEDOUT, /* 1541 */
+ XML_IO_EXDEV, /* 1542 */
+ XML_IO_NETWORK_ATTEMPT, /* 1543 */
+ XML_IO_ENCODER, /* 1544 */
+ XML_IO_FLUSH, /* 1545 */
+ XML_IO_WRITE, /* 1546 */
+ XML_IO_NO_INPUT, /* 1547 */
+ XML_IO_BUFFER_FULL, /* 1548 */
+ XML_IO_LOAD_ERROR, /* 1549 */
+ XML_IO_ENOTSOCK, /* 1550 */
+ XML_IO_EISCONN, /* 1551 */
+ XML_IO_ECONNREFUSED, /* 1552 */
+ XML_IO_ENETUNREACH, /* 1553 */
+ XML_IO_EADDRINUSE, /* 1554 */
+ XML_IO_EALREADY, /* 1555 */
+ XML_IO_EAFNOSUPPORT, /* 1556 */
+ XML_XINCLUDE_RECURSION=1600,
+ XML_XINCLUDE_PARSE_VALUE, /* 1601 */
+ XML_XINCLUDE_ENTITY_DEF_MISMATCH, /* 1602 */
+ XML_XINCLUDE_NO_HREF, /* 1603 */
+ XML_XINCLUDE_NO_FALLBACK, /* 1604 */
+ XML_XINCLUDE_HREF_URI, /* 1605 */
+ XML_XINCLUDE_TEXT_FRAGMENT, /* 1606 */
+ XML_XINCLUDE_TEXT_DOCUMENT, /* 1607 */
+ XML_XINCLUDE_INVALID_CHAR, /* 1608 */
+ XML_XINCLUDE_BUILD_FAILED, /* 1609 */
+ XML_XINCLUDE_UNKNOWN_ENCODING, /* 1610 */
+ XML_XINCLUDE_MULTIPLE_ROOT, /* 1611 */
+ XML_XINCLUDE_XPTR_FAILED, /* 1612 */
+ XML_XINCLUDE_XPTR_RESULT, /* 1613 */
+ XML_XINCLUDE_INCLUDE_IN_INCLUDE, /* 1614 */
+ XML_XINCLUDE_FALLBACKS_IN_INCLUDE, /* 1615 */
+ XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, /* 1616 */
+ XML_XINCLUDE_DEPRECATED_NS, /* 1617 */
+ XML_XINCLUDE_FRAGMENT_ID, /* 1618 */
+ XML_CATALOG_MISSING_ATTR = 1650,
+ XML_CATALOG_ENTRY_BROKEN, /* 1651 */
+ XML_CATALOG_PREFER_VALUE, /* 1652 */
+ XML_CATALOG_NOT_CATALOG, /* 1653 */
+ XML_CATALOG_RECURSION, /* 1654 */
+ XML_SCHEMAP_PREFIX_UNDEFINED = 1700,
+ XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, /* 1701 */
+ XML_SCHEMAP_ATTRGRP_NONAME_NOREF, /* 1702 */
+ XML_SCHEMAP_ATTR_NONAME_NOREF, /* 1703 */
+ XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, /* 1704 */
+ XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, /* 1705 */
+ XML_SCHEMAP_ELEM_NONAME_NOREF, /* 1706 */
+ XML_SCHEMAP_EXTENSION_NO_BASE, /* 1707 */
+ XML_SCHEMAP_FACET_NO_VALUE, /* 1708 */
+ XML_SCHEMAP_FAILED_BUILD_IMPORT, /* 1709 */
+ XML_SCHEMAP_GROUP_NONAME_NOREF, /* 1710 */
+ XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, /* 1711 */
+ XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, /* 1712 */
+ XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, /* 1713 */
+ XML_SCHEMAP_INVALID_BOOLEAN, /* 1714 */
+ XML_SCHEMAP_INVALID_ENUM, /* 1715 */
+ XML_SCHEMAP_INVALID_FACET, /* 1716 */
+ XML_SCHEMAP_INVALID_FACET_VALUE, /* 1717 */
+ XML_SCHEMAP_INVALID_MAXOCCURS, /* 1718 */
+ XML_SCHEMAP_INVALID_MINOCCURS, /* 1719 */
+ XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, /* 1720 */
+ XML_SCHEMAP_INVALID_WHITE_SPACE, /* 1721 */
+ XML_SCHEMAP_NOATTR_NOREF, /* 1722 */
+ XML_SCHEMAP_NOTATION_NO_NAME, /* 1723 */
+ XML_SCHEMAP_NOTYPE_NOREF, /* 1724 */
+ XML_SCHEMAP_REF_AND_SUBTYPE, /* 1725 */
+ XML_SCHEMAP_RESTRICTION_NONAME_NOREF, /* 1726 */
+ XML_SCHEMAP_SIMPLETYPE_NONAME, /* 1727 */
+ XML_SCHEMAP_TYPE_AND_SUBTYPE, /* 1728 */
+ XML_SCHEMAP_UNKNOWN_ALL_CHILD, /* 1729 */
+ XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, /* 1730 */
+ XML_SCHEMAP_UNKNOWN_ATTR_CHILD, /* 1731 */
+ XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, /* 1732 */
+ XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, /* 1733 */
+ XML_SCHEMAP_UNKNOWN_BASE_TYPE, /* 1734 */
+ XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, /* 1735 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, /* 1736 */
+ XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, /* 1737 */
+ XML_SCHEMAP_UNKNOWN_ELEM_CHILD, /* 1738 */
+ XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, /* 1739 */
+ XML_SCHEMAP_UNKNOWN_FACET_CHILD, /* 1740 */
+ XML_SCHEMAP_UNKNOWN_FACET_TYPE, /* 1741 */
+ XML_SCHEMAP_UNKNOWN_GROUP_CHILD, /* 1742 */
+ XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, /* 1743 */
+ XML_SCHEMAP_UNKNOWN_LIST_CHILD, /* 1744 */
+ XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, /* 1745 */
+ XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, /* 1746 */
+ XML_SCHEMAP_UNKNOWN_REF, /* 1747 */
+ XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, /* 1748 */
+ XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, /* 1749 */
+ XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, /* 1750 */
+ XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, /* 1751 */
+ XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, /* 1752 */
+ XML_SCHEMAP_UNKNOWN_TYPE, /* 1753 */
+ XML_SCHEMAP_UNKNOWN_UNION_CHILD, /* 1754 */
+ XML_SCHEMAP_ELEM_DEFAULT_FIXED, /* 1755 */
+ XML_SCHEMAP_REGEXP_INVALID, /* 1756 */
+ XML_SCHEMAP_FAILED_LOAD, /* 1757 */
+ XML_SCHEMAP_NOTHING_TO_PARSE, /* 1758 */
+ XML_SCHEMAP_NOROOT, /* 1759 */
+ XML_SCHEMAP_REDEFINED_GROUP, /* 1760 */
+ XML_SCHEMAP_REDEFINED_TYPE, /* 1761 */
+ XML_SCHEMAP_REDEFINED_ELEMENT, /* 1762 */
+ XML_SCHEMAP_REDEFINED_ATTRGROUP, /* 1763 */
+ XML_SCHEMAP_REDEFINED_ATTR, /* 1764 */
+ XML_SCHEMAP_REDEFINED_NOTATION, /* 1765 */
+ XML_SCHEMAP_FAILED_PARSE, /* 1766 */
+ XML_SCHEMAP_UNKNOWN_PREFIX, /* 1767 */
+ XML_SCHEMAP_DEF_AND_PREFIX, /* 1768 */
+ XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, /* 1769 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, /* 1770 */
+ XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, /* 1771 */
+ XML_SCHEMAP_NOT_SCHEMA, /* 1772 */
+ XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, /* 1773 */
+ XML_SCHEMAP_INVALID_ATTR_USE, /* 1774 */
+ XML_SCHEMAP_RECURSIVE, /* 1775 */
+ XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, /* 1776 */
+ XML_SCHEMAP_INVALID_ATTR_COMBINATION, /* 1777 */
+ XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, /* 1778 */
+ XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, /* 1779 */
+ XML_SCHEMAP_INVALID_ATTR_NAME, /* 1780 */
+ XML_SCHEMAP_REF_AND_CONTENT, /* 1781 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_1, /* 1782 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_2, /* 1783 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_3, /* 1784 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_4, /* 1785 */
+ XML_SCHEMAP_CT_PROPS_CORRECT_5, /* 1786 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, /* 1787 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, /* 1788 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, /* 1789 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, /* 1790 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, /* 1791 */
+ XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, /* 1792 */
+ XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, /* 1793 */
+ XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, /* 1794 */
+ XML_SCHEMAP_SRC_IMPORT_3_1, /* 1795 */
+ XML_SCHEMAP_SRC_IMPORT_3_2, /* 1796 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, /* 1797 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, /* 1798 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, /* 1799 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_3, /* 1800 */
+ XML_SCHEMAV_NOROOT = 1801,
+ XML_SCHEMAV_UNDECLAREDELEM, /* 1802 */
+ XML_SCHEMAV_NOTTOPLEVEL, /* 1803 */
+ XML_SCHEMAV_MISSING, /* 1804 */
+ XML_SCHEMAV_WRONGELEM, /* 1805 */
+ XML_SCHEMAV_NOTYPE, /* 1806 */
+ XML_SCHEMAV_NOROLLBACK, /* 1807 */
+ XML_SCHEMAV_ISABSTRACT, /* 1808 */
+ XML_SCHEMAV_NOTEMPTY, /* 1809 */
+ XML_SCHEMAV_ELEMCONT, /* 1810 */
+ XML_SCHEMAV_HAVEDEFAULT, /* 1811 */
+ XML_SCHEMAV_NOTNILLABLE, /* 1812 */
+ XML_SCHEMAV_EXTRACONTENT, /* 1813 */
+ XML_SCHEMAV_INVALIDATTR, /* 1814 */
+ XML_SCHEMAV_INVALIDELEM, /* 1815 */
+ XML_SCHEMAV_NOTDETERMINIST, /* 1816 */
+ XML_SCHEMAV_CONSTRUCT, /* 1817 */
+ XML_SCHEMAV_INTERNAL, /* 1818 */
+ XML_SCHEMAV_NOTSIMPLE, /* 1819 */
+ XML_SCHEMAV_ATTRUNKNOWN, /* 1820 */
+ XML_SCHEMAV_ATTRINVALID, /* 1821 */
+ XML_SCHEMAV_VALUE, /* 1822 */
+ XML_SCHEMAV_FACET, /* 1823 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, /* 1824 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, /* 1825 */
+ XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, /* 1826 */
+ XML_SCHEMAV_CVC_TYPE_3_1_1, /* 1827 */
+ XML_SCHEMAV_CVC_TYPE_3_1_2, /* 1828 */
+ XML_SCHEMAV_CVC_FACET_VALID, /* 1829 */
+ XML_SCHEMAV_CVC_LENGTH_VALID, /* 1830 */
+ XML_SCHEMAV_CVC_MINLENGTH_VALID, /* 1831 */
+ XML_SCHEMAV_CVC_MAXLENGTH_VALID, /* 1832 */
+ XML_SCHEMAV_CVC_MININCLUSIVE_VALID, /* 1833 */
+ XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, /* 1834 */
+ XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, /* 1835 */
+ XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, /* 1836 */
+ XML_SCHEMAV_CVC_TOTALDIGITS_VALID, /* 1837 */
+ XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, /* 1838 */
+ XML_SCHEMAV_CVC_PATTERN_VALID, /* 1839 */
+ XML_SCHEMAV_CVC_ENUMERATION_VALID, /* 1840 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, /* 1841 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, /* 1842 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, /* 1843 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, /* 1844 */
+ XML_SCHEMAV_CVC_ELT_1, /* 1845 */
+ XML_SCHEMAV_CVC_ELT_2, /* 1846 */
+ XML_SCHEMAV_CVC_ELT_3_1, /* 1847 */
+ XML_SCHEMAV_CVC_ELT_3_2_1, /* 1848 */
+ XML_SCHEMAV_CVC_ELT_3_2_2, /* 1849 */
+ XML_SCHEMAV_CVC_ELT_4_1, /* 1850 */
+ XML_SCHEMAV_CVC_ELT_4_2, /* 1851 */
+ XML_SCHEMAV_CVC_ELT_4_3, /* 1852 */
+ XML_SCHEMAV_CVC_ELT_5_1_1, /* 1853 */
+ XML_SCHEMAV_CVC_ELT_5_1_2, /* 1854 */
+ XML_SCHEMAV_CVC_ELT_5_2_1, /* 1855 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_1, /* 1856 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_1, /* 1857 */
+ XML_SCHEMAV_CVC_ELT_5_2_2_2_2, /* 1858 */
+ XML_SCHEMAV_CVC_ELT_6, /* 1859 */
+ XML_SCHEMAV_CVC_ELT_7, /* 1860 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_1, /* 1861 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_2, /* 1862 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_3, /* 1863 */
+ XML_SCHEMAV_CVC_ATTRIBUTE_4, /* 1864 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, /* 1865 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, /* 1866 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, /* 1867 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_4, /* 1868 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, /* 1869 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, /* 1870 */
+ XML_SCHEMAV_ELEMENT_CONTENT, /* 1871 */
+ XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, /* 1872 */
+ XML_SCHEMAV_CVC_COMPLEX_TYPE_1, /* 1873 */
+ XML_SCHEMAV_CVC_AU, /* 1874 */
+ XML_SCHEMAV_CVC_TYPE_1, /* 1875 */
+ XML_SCHEMAV_CVC_TYPE_2, /* 1876 */
+ XML_SCHEMAV_CVC_IDC, /* 1877 */
+ XML_SCHEMAV_CVC_WILDCARD, /* 1878 */
+ XML_SCHEMAV_MISC, /* 1879 */
+ XML_XPTR_UNKNOWN_SCHEME = 1900,
+ XML_XPTR_CHILDSEQ_START, /* 1901 */
+ XML_XPTR_EVAL_FAILED, /* 1902 */
+ XML_XPTR_EXTRA_OBJECTS, /* 1903 */
+ XML_C14N_CREATE_CTXT = 1950,
+ XML_C14N_REQUIRES_UTF8, /* 1951 */
+ XML_C14N_CREATE_STACK, /* 1952 */
+ XML_C14N_INVALID_NODE, /* 1953 */
+ XML_C14N_UNKNOW_NODE, /* 1954 */
+ XML_C14N_RELATIVE_NAMESPACE, /* 1955 */
+ XML_FTP_PASV_ANSWER = 2000,
+ XML_FTP_EPSV_ANSWER, /* 2001 */
+ XML_FTP_ACCNT, /* 2002 */
+ XML_FTP_URL_SYNTAX, /* 2003 */
+ XML_HTTP_URL_SYNTAX = 2020,
+ XML_HTTP_USE_IP, /* 2021 */
+ XML_HTTP_UNKNOWN_HOST, /* 2022 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_1 = 3000,
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_2, /* 3001 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_3, /* 3002 */
+ XML_SCHEMAP_SRC_SIMPLE_TYPE_4, /* 3003 */
+ XML_SCHEMAP_SRC_RESOLVE, /* 3004 */
+ XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, /* 3005 */
+ XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, /* 3006 */
+ XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, /* 3007 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_1, /* 3008 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_2, /* 3009 */
+ XML_SCHEMAP_ST_PROPS_CORRECT_3, /* 3010 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_1, /* 3011 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_2, /* 3012 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, /* 3013 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, /* 3014 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_1, /* 3015 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, /* 3016 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, /* 3017 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, /* 3018 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, /* 3019 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, /* 3020 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, /* 3021 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, /* 3022 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_1, /* 3023 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, /* 3024 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, /* 3025 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, /* 3026 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, /* 3027 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, /* 3028 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, /* 3029 */
+ XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, /* 3030 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, /* 3031 */
+ XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, /* 3032 */
+ XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, /* 3033 */
+ XML_SCHEMAP_S4S_ELEM_MISSING, /* 3034 */
+ XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, /* 3035 */
+ XML_SCHEMAP_S4S_ATTR_MISSING, /* 3036 */
+ XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, /* 3037 */
+ XML_SCHEMAP_SRC_ELEMENT_1, /* 3038 */
+ XML_SCHEMAP_SRC_ELEMENT_2_1, /* 3039 */
+ XML_SCHEMAP_SRC_ELEMENT_2_2, /* 3040 */
+ XML_SCHEMAP_SRC_ELEMENT_3, /* 3041 */
+ XML_SCHEMAP_P_PROPS_CORRECT_1, /* 3042 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_1, /* 3043 */
+ XML_SCHEMAP_P_PROPS_CORRECT_2_2, /* 3044 */
+ XML_SCHEMAP_E_PROPS_CORRECT_2, /* 3045 */
+ XML_SCHEMAP_E_PROPS_CORRECT_3, /* 3046 */
+ XML_SCHEMAP_E_PROPS_CORRECT_4, /* 3047 */
+ XML_SCHEMAP_E_PROPS_CORRECT_5, /* 3048 */
+ XML_SCHEMAP_E_PROPS_CORRECT_6, /* 3049 */
+ XML_SCHEMAP_SRC_INCLUDE, /* 3050 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_1, /* 3051 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_2, /* 3052 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_1, /* 3053 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_3_2, /* 3054 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_4, /* 3055 */
+ XML_SCHEMAP_NO_XMLNS, /* 3056 */
+ XML_SCHEMAP_NO_XSI, /* 3057 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_1, /* 3058 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_1, /* 3059 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, /* 3060 */
+ XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, /* 3061 */
+ XML_SCHEMAP_CVC_SIMPLE_TYPE, /* 3062 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_1, /* 3063 */
+ XML_SCHEMAP_SRC_IMPORT_1_1, /* 3064 */
+ XML_SCHEMAP_SRC_IMPORT_1_2, /* 3065 */
+ XML_SCHEMAP_SRC_IMPORT_2, /* 3066 */
+ XML_SCHEMAP_SRC_IMPORT_2_1, /* 3067 */
+ XML_SCHEMAP_SRC_IMPORT_2_2, /* 3068 */
+ XML_SCHEMAP_INTERNAL, /* 3069 non-W3C */
+ XML_SCHEMAP_NOT_DETERMINISTIC, /* 3070 non-W3C */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, /* 3071 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, /* 3072 */
+ XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, /* 3073 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_1, /* 3074 */
+ XML_SCHEMAP_MG_PROPS_CORRECT_2, /* 3075 */
+ XML_SCHEMAP_SRC_CT_1, /* 3076 */
+ XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, /* 3077 */
+ XML_SCHEMAP_AU_PROPS_CORRECT_2, /* 3078 */
+ XML_SCHEMAP_A_PROPS_CORRECT_2, /* 3079 */
+ XML_SCHEMAP_C_PROPS_CORRECT, /* 3080 */
+ XML_SCHEMAP_SRC_REDEFINE, /* 3081 */
+ XML_SCHEMAP_SRC_IMPORT, /* 3082 */
+ XML_SCHEMAP_WARN_SKIP_SCHEMA, /* 3083 */
+ XML_SCHEMAP_WARN_UNLOCATED_SCHEMA, /* 3084 */
+ XML_SCHEMAP_WARN_ATTR_REDECL_PROH, /* 3085 */
+ XML_SCHEMAP_WARN_ATTR_POINTLESS_PROH, /* 3085 */
+ XML_SCHEMAP_AG_PROPS_CORRECT, /* 3086 */
+ XML_SCHEMAP_COS_CT_EXTENDS_1_2, /* 3087 */
+ XML_SCHEMAP_AU_PROPS_CORRECT, /* 3088 */
+ XML_SCHEMAP_A_PROPS_CORRECT_3, /* 3089 */
+ XML_SCHEMAP_COS_ALL_LIMITED, /* 3090 */
+ XML_SCHEMATRONV_ASSERT = 4000, /* 4000 */
+ XML_SCHEMATRONV_REPORT,
+ XML_MODULE_OPEN = 4900, /* 4900 */
+ XML_MODULE_CLOSE, /* 4901 */
+ XML_CHECK_FOUND_ELEMENT = 5000,
+ XML_CHECK_FOUND_ATTRIBUTE, /* 5001 */
+ XML_CHECK_FOUND_TEXT, /* 5002 */
+ XML_CHECK_FOUND_CDATA, /* 5003 */
+ XML_CHECK_FOUND_ENTITYREF, /* 5004 */
+ XML_CHECK_FOUND_ENTITY, /* 5005 */
+ XML_CHECK_FOUND_PI, /* 5006 */
+ XML_CHECK_FOUND_COMMENT, /* 5007 */
+ XML_CHECK_FOUND_DOCTYPE, /* 5008 */
+ XML_CHECK_FOUND_FRAGMENT, /* 5009 */
+ XML_CHECK_FOUND_NOTATION, /* 5010 */
+ XML_CHECK_UNKNOWN_NODE, /* 5011 */
+ XML_CHECK_ENTITY_TYPE, /* 5012 */
+ XML_CHECK_NO_PARENT, /* 5013 */
+ XML_CHECK_NO_DOC, /* 5014 */
+ XML_CHECK_NO_NAME, /* 5015 */
+ XML_CHECK_NO_ELEM, /* 5016 */
+ XML_CHECK_WRONG_DOC, /* 5017 */
+ XML_CHECK_NO_PREV, /* 5018 */
+ XML_CHECK_WRONG_PREV, /* 5019 */
+ XML_CHECK_NO_NEXT, /* 5020 */
+ XML_CHECK_WRONG_NEXT, /* 5021 */
+ XML_CHECK_NOT_DTD, /* 5022 */
+ XML_CHECK_NOT_ATTR, /* 5023 */
+ XML_CHECK_NOT_ATTR_DECL, /* 5024 */
+ XML_CHECK_NOT_ELEM_DECL, /* 5025 */
+ XML_CHECK_NOT_ENTITY_DECL, /* 5026 */
+ XML_CHECK_NOT_NS_DECL, /* 5027 */
+ XML_CHECK_NO_HREF, /* 5028 */
+ XML_CHECK_WRONG_PARENT,/* 5029 */
+ XML_CHECK_NS_SCOPE, /* 5030 */
+ XML_CHECK_NS_ANCESTOR, /* 5031 */
+ XML_CHECK_NOT_UTF8, /* 5032 */
+ XML_CHECK_NO_DICT, /* 5033 */
+ XML_CHECK_NOT_NCNAME, /* 5034 */
+ XML_CHECK_OUTSIDE_DICT, /* 5035 */
+ XML_CHECK_WRONG_NAME, /* 5036 */
+ XML_CHECK_NAME_NOT_NULL, /* 5037 */
+ XML_I18N_NO_NAME = 6000,
+ XML_I18N_NO_HANDLER, /* 6001 */
+ XML_I18N_EXCESS_HANDLER, /* 6002 */
+ XML_I18N_CONV_FAILED, /* 6003 */
+ XML_I18N_NO_OUTPUT /* 6004 */
+#if 0
+ XML_CHECK_, /* 5033 */
+ XML_CHECK_X /* 503 */
+#endif
+} xmlParserErrors;
+
+/**
+ * xmlGenericErrorFunc:
+ * @ctx: a parsing context
+ * @msg: the message
+ * @...: the extra arguments of the varags to format the message
+ *
+ * Signature of the function to use when there is an error and
+ * no parsing or validity context available .
+ */
+typedef void (XMLCDECL *xmlGenericErrorFunc) (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+/**
+ * xmlStructuredErrorFunc:
+ * @userData: user provided data for the error callback
+ * @error: the error being raised.
+ *
+ * Signature of the function to use when there is an error and
+ * the module handles the new error reporting mechanism.
+ */
+typedef void (XMLCALL *xmlStructuredErrorFunc) (void *userData, xmlErrorPtr error);
+
+/*
+ * Use the following function to reset the two global variables
+ * xmlGenericError and xmlGenericErrorContext.
+ */
+XMLPUBFUN void XMLCALL
+ xmlSetGenericErrorFunc (void *ctx,
+ xmlGenericErrorFunc handler);
+XMLPUBFUN void XMLCALL
+ initGenericErrorDefaultFunc (xmlGenericErrorFunc *handler);
+
+XMLPUBFUN void XMLCALL
+ xmlSetStructuredErrorFunc (void *ctx,
+ xmlStructuredErrorFunc handler);
+/*
+ * Default message routines used by SAX and Valid context for error
+ * and warning reporting.
+ */
+XMLPUBFUN void XMLCDECL
+ xmlParserError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserValidityError (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCDECL
+ xmlParserValidityWarning (void *ctx,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(2,3);
+XMLPUBFUN void XMLCALL
+ xmlParserPrintFileInfo (xmlParserInputPtr input);
+XMLPUBFUN void XMLCALL
+ xmlParserPrintFileContext (xmlParserInputPtr input);
+
+/*
+ * Extended error information routines
+ */
+XMLPUBFUN xmlErrorPtr XMLCALL
+ xmlGetLastError (void);
+XMLPUBFUN void XMLCALL
+ xmlResetLastError (void);
+XMLPUBFUN xmlErrorPtr XMLCALL
+ xmlCtxtGetLastError (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlCtxtResetLastError (void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlResetError (xmlErrorPtr err);
+XMLPUBFUN int XMLCALL
+ xmlCopyError (xmlErrorPtr from,
+ xmlErrorPtr to);
+
+#ifdef IN_LIBXML
+/*
+ * Internal callback reporting routine
+ */
+XMLPUBFUN void XMLCALL
+ __xmlRaiseError (xmlStructuredErrorFunc schannel,
+ xmlGenericErrorFunc channel,
+ void *data,
+ void *ctx,
+ void *node,
+ int domain,
+ int code,
+ xmlErrorLevel level,
+ const char *file,
+ int line,
+ const char *str1,
+ const char *str2,
+ const char *str3,
+ int int1,
+ int col,
+ const char *msg,
+ ...) LIBXML_ATTR_FORMAT(16,17);
+XMLPUBFUN void XMLCALL
+ __xmlSimpleError (int domain,
+ int code,
+ xmlNodePtr node,
+ const char *msg,
+ const char *extra);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_ERROR_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlexports.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlexports.h
new file mode 100644
index 0000000..7a72ec7
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlexports.h
@@ -0,0 +1,162 @@
+/*
+ * Summary: macros for marking symbols as exportable/importable.
+ * Description: macros for marking symbols as exportable/importable.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Igor Zlatovic <igor@zlatkovic.com>
+ */
+
+#ifndef __XML_EXPORTS_H__
+#define __XML_EXPORTS_H__
+
+/**
+ * XMLPUBFUN, XMLPUBVAR, XMLCALL
+ *
+ * Macros which declare an exportable function, an exportable variable and
+ * the calling convention used for functions.
+ *
+ * Please use an extra block for every platform/compiler combination when
+ * modifying this, rather than overlong #ifdef lines. This helps
+ * readability as well as the fact that different compilers on the same
+ * platform might need different definitions.
+ */
+
+/**
+ * XMLPUBFUN:
+ *
+ * Macros which declare an exportable function
+ */
+#define XMLPUBFUN
+/**
+ * XMLPUBVAR:
+ *
+ * Macros which declare an exportable variable
+ */
+#define XMLPUBVAR extern
+/**
+ * XMLCALL:
+ *
+ * Macros which declare the called convention for exported functions
+ */
+#define XMLCALL
+/**
+ * XMLCDECL:
+ *
+ * Macro which declares the calling convention for exported functions that
+ * use '...'.
+ */
+#define XMLCDECL
+
+/** DOC_DISABLE */
+
+/* Windows platform with MS compiler */
+#if defined(_WIN32) && defined(_MSC_VER)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #if defined(LIBXML_FASTCALL)
+ #define XMLCALL __fastcall
+ #else
+ #define XMLCALL __cdecl
+ #endif
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Windows platform with Borland compiler */
+#if defined(_WIN32) && defined(__BORLANDC__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport) extern
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Windows platform with GNU compiler (Mingw) */
+#if defined(_WIN32) && defined(__MINGW32__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ /*
+ * if defined(IN_LIBXML) this raises problems on mingw with msys
+ * _imp__xmlFree listed as missing. Try to workaround the problem
+ * by also making that declaration when compiling client code.
+ */
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR extern
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+ #if !defined _REENTRANT
+ #define _REENTRANT
+ #endif
+#endif
+
+/* Cygwin platform, GNU compiler */
+#if defined(_WIN32) && defined(__CYGWIN__)
+ #undef XMLPUBFUN
+ #undef XMLPUBVAR
+ #undef XMLCALL
+ #undef XMLCDECL
+ #if defined(IN_LIBXML) && !defined(LIBXML_STATIC)
+ #define XMLPUBFUN __declspec(dllexport)
+ #define XMLPUBVAR __declspec(dllexport)
+ #else
+ #define XMLPUBFUN
+ #if !defined(LIBXML_STATIC)
+ #define XMLPUBVAR __declspec(dllimport) extern
+ #else
+ #define XMLPUBVAR
+ #endif
+ #endif
+ #define XMLCALL __cdecl
+ #define XMLCDECL __cdecl
+#endif
+
+/* Compatibility */
+#if !defined(LIBXML_DLL_IMPORT)
+#define LIBXML_DLL_IMPORT XMLPUBVAR
+#endif
+
+#endif /* __XML_EXPORTS_H__ */
+
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlmemory.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlmemory.h
new file mode 100644
index 0000000..17e375a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlmemory.h
@@ -0,0 +1,224 @@
+/*
+ * Summary: interface for the memory allocator
+ * Description: provides interfaces for the memory allocator,
+ * including debugging capabilities.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __DEBUG_MEMORY_ALLOC__
+#define __DEBUG_MEMORY_ALLOC__
+
+#include <stdio.h>
+#include <libxml/xmlversion.h>
+
+/**
+ * DEBUG_MEMORY:
+ *
+ * DEBUG_MEMORY replaces the allocator with a collect and debug
+ * shell to the libc allocator.
+ * DEBUG_MEMORY should only be activated when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+ */
+/* #define DEBUG_MEMORY_FREED */
+/* #define DEBUG_MEMORY_LOCATION */
+
+#ifdef DEBUG
+#ifndef DEBUG_MEMORY
+#define DEBUG_MEMORY
+#endif
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * DEBUG_MEMORY_LOCATION should be activated only when debugging
+ * libxml i.e. if libxml has been configured with --with-debug-mem too.
+ */
+#ifdef DEBUG_MEMORY_LOCATION
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The XML memory wrapper support 4 basic overloadable functions.
+ */
+/**
+ * xmlFreeFunc:
+ * @mem: an already allocated block of memory
+ *
+ * Signature for a free() implementation.
+ */
+typedef void (XMLCALL *xmlFreeFunc)(void *mem);
+/**
+ * xmlMallocFunc:
+ * @size: the size requested in bytes
+ *
+ * Signature for a malloc() implementation.
+ *
+ * Returns a pointer to the newly allocated block or NULL in case of error.
+ */
+typedef void *(LIBXML_ATTR_ALLOC_SIZE(1) XMLCALL *xmlMallocFunc)(size_t size);
+
+/**
+ * xmlReallocFunc:
+ * @mem: an already allocated block of memory
+ * @size: the new size requested in bytes
+ *
+ * Signature for a realloc() implementation.
+ *
+ * Returns a pointer to the newly reallocated block or NULL in case of error.
+ */
+typedef void *(XMLCALL *xmlReallocFunc)(void *mem, size_t size);
+
+/**
+ * xmlStrdupFunc:
+ * @str: a zero terminated string
+ *
+ * Signature for an strdup() implementation.
+ *
+ * Returns the copy of the string or NULL in case of error.
+ */
+typedef char *(XMLCALL *xmlStrdupFunc)(const char *str);
+
+/*
+ * The 4 interfaces used for all memory handling within libxml.
+LIBXML_DLL_IMPORT xmlFreeFunc xmlFree;
+LIBXML_DLL_IMPORT xmlMallocFunc xmlMalloc;
+LIBXML_DLL_IMPORT xmlMallocFunc xmlMallocAtomic;
+LIBXML_DLL_IMPORT xmlReallocFunc xmlRealloc;
+LIBXML_DLL_IMPORT xmlStrdupFunc xmlMemStrdup;
+ */
+
+/*
+ * The way to overload the existing functions.
+ * The xmlGc function have an extra entry for atomic block
+ * allocations useful for garbage collected memory allocators
+ */
+XMLPUBFUN int XMLCALL
+ xmlMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlGcMemSetup (xmlFreeFunc freeFunc,
+ xmlMallocFunc mallocFunc,
+ xmlMallocFunc mallocAtomicFunc,
+ xmlReallocFunc reallocFunc,
+ xmlStrdupFunc strdupFunc);
+XMLPUBFUN int XMLCALL
+ xmlGcMemGet (xmlFreeFunc *freeFunc,
+ xmlMallocFunc *mallocFunc,
+ xmlMallocFunc *mallocAtomicFunc,
+ xmlReallocFunc *reallocFunc,
+ xmlStrdupFunc *strdupFunc);
+
+/*
+ * Initialization of the memory layer.
+ */
+XMLPUBFUN int XMLCALL
+ xmlInitMemory (void);
+
+/*
+ * Cleanup of the memory layer.
+ */
+XMLPUBFUN void XMLCALL
+ xmlCleanupMemory (void);
+/*
+ * These are specific to the XML debug memory wrapper.
+ */
+XMLPUBFUN int XMLCALL
+ xmlMemUsed (void);
+XMLPUBFUN int XMLCALL
+ xmlMemBlocks (void);
+XMLPUBFUN void XMLCALL
+ xmlMemDisplay (FILE *fp);
+XMLPUBFUN void XMLCALL
+ xmlMemDisplayLast(FILE *fp, long nbBytes);
+XMLPUBFUN void XMLCALL
+ xmlMemShow (FILE *fp, int nr);
+XMLPUBFUN void XMLCALL
+ xmlMemoryDump (void);
+XMLPUBFUN void * XMLCALL
+ xmlMemMalloc (size_t size) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void * XMLCALL
+ xmlMemRealloc (void *ptr,size_t size);
+XMLPUBFUN void XMLCALL
+ xmlMemFree (void *ptr);
+XMLPUBFUN char * XMLCALL
+ xmlMemoryStrdup (const char *str);
+XMLPUBFUN void * XMLCALL
+ xmlMallocLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN void * XMLCALL
+ xmlReallocLoc (void *ptr, size_t size, const char *file, int line);
+XMLPUBFUN void * XMLCALL
+ xmlMallocAtomicLoc (size_t size, const char *file, int line) LIBXML_ATTR_ALLOC_SIZE(1);
+XMLPUBFUN char * XMLCALL
+ xmlMemStrdupLoc (const char *str, const char *file, int line);
+
+
+#ifdef DEBUG_MEMORY_LOCATION
+/**
+ * xmlMalloc:
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the malloc() function used in the XML library.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMalloc(size) xmlMallocLoc((size), __FILE__, __LINE__)
+/**
+ * xmlMallocAtomic:
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the malloc() function used in the XML library for allocation
+ * of block not containing pointers to other areas.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMallocAtomic(size) xmlMallocAtomicLoc((size), __FILE__, __LINE__)
+/**
+ * xmlRealloc:
+ * @ptr: pointer to the existing allocated area
+ * @size: number of bytes to allocate
+ *
+ * Wrapper for the realloc() function used in the XML library.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlRealloc(ptr, size) xmlReallocLoc((ptr), (size), __FILE__, __LINE__)
+/**
+ * xmlMemStrdup:
+ * @str: pointer to the existing string
+ *
+ * Wrapper for the strdup() function, xmlStrdup() is usually preferred.
+ *
+ * Returns the pointer to the allocated area or NULL in case of error.
+ */
+#define xmlMemStrdup(str) xmlMemStrdupLoc((str), __FILE__, __LINE__)
+
+#endif /* DEBUG_MEMORY_LOCATION */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#ifndef __XML_GLOBALS_H
+#ifndef __XML_THREADS_H__
+#include <libxml/threads.h>
+#include <libxml/globals.h>
+#endif
+#endif
+
+#endif /* __DEBUG_MEMORY_ALLOC__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlmodule.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlmodule.h
new file mode 100644
index 0000000..9667820
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlmodule.h
@@ -0,0 +1,57 @@
+/*
+ * Summary: dynamic module loading
+ * Description: basic API for dynamic module loading, used by
+ * libexslt added in 2.6.17
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Joel W. Reed
+ */
+
+#ifndef __XML_MODULE_H__
+#define __XML_MODULE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_MODULES_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlModulePtr:
+ *
+ * A handle to a dynamically loaded module
+ */
+typedef struct _xmlModule xmlModule;
+typedef xmlModule *xmlModulePtr;
+
+/**
+ * xmlModuleOption:
+ *
+ * enumeration of options that can be passed down to xmlModuleOpen()
+ */
+typedef enum {
+ XML_MODULE_LAZY = 1, /* lazy binding */
+ XML_MODULE_LOCAL= 2 /* local binding */
+} xmlModuleOption;
+
+XMLPUBFUN xmlModulePtr XMLCALL xmlModuleOpen (const char *filename,
+ int options);
+
+XMLPUBFUN int XMLCALL xmlModuleSymbol (xmlModulePtr module,
+ const char* name,
+ void **result);
+
+XMLPUBFUN int XMLCALL xmlModuleClose (xmlModulePtr module);
+
+XMLPUBFUN int XMLCALL xmlModuleFree (xmlModulePtr module);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_MODULES_ENABLED */
+
+#endif /*__XML_MODULE_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlreader.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlreader.h
new file mode 100644
index 0000000..6964482
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlreader.h
@@ -0,0 +1,424 @@
+/*
+ * Summary: the XMLReader implementation
+ * Description: API of the XML streaming API based on C# interfaces.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLREADER_H__
+#define __XML_XMLREADER_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/xmlIO.h>
+#ifdef LIBXML_SCHEMAS_ENABLED
+#include <libxml/relaxng.h>
+#include <libxml/xmlschemas.h>
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlParserSeverities:
+ *
+ * How severe an error callback is when the per-reader error callback API
+ * is used.
+ */
+typedef enum {
+ XML_PARSER_SEVERITY_VALIDITY_WARNING = 1,
+ XML_PARSER_SEVERITY_VALIDITY_ERROR = 2,
+ XML_PARSER_SEVERITY_WARNING = 3,
+ XML_PARSER_SEVERITY_ERROR = 4
+} xmlParserSeverities;
+
+#ifdef LIBXML_READER_ENABLED
+
+/**
+ * xmlTextReaderMode:
+ *
+ * Internal state values for the reader.
+ */
+typedef enum {
+ XML_TEXTREADER_MODE_INITIAL = 0,
+ XML_TEXTREADER_MODE_INTERACTIVE = 1,
+ XML_TEXTREADER_MODE_ERROR = 2,
+ XML_TEXTREADER_MODE_EOF =3,
+ XML_TEXTREADER_MODE_CLOSED = 4,
+ XML_TEXTREADER_MODE_READING = 5
+} xmlTextReaderMode;
+
+/**
+ * xmlParserProperties:
+ *
+ * Some common options to use with xmlTextReaderSetParserProp, but it
+ * is better to use xmlParserOption and the xmlReaderNewxxx and
+ * xmlReaderForxxx APIs now.
+ */
+typedef enum {
+ XML_PARSER_LOADDTD = 1,
+ XML_PARSER_DEFAULTATTRS = 2,
+ XML_PARSER_VALIDATE = 3,
+ XML_PARSER_SUBST_ENTITIES = 4
+} xmlParserProperties;
+
+/**
+ * xmlReaderTypes:
+ *
+ * Predefined constants for the different types of nodes.
+ */
+typedef enum {
+ XML_READER_TYPE_NONE = 0,
+ XML_READER_TYPE_ELEMENT = 1,
+ XML_READER_TYPE_ATTRIBUTE = 2,
+ XML_READER_TYPE_TEXT = 3,
+ XML_READER_TYPE_CDATA = 4,
+ XML_READER_TYPE_ENTITY_REFERENCE = 5,
+ XML_READER_TYPE_ENTITY = 6,
+ XML_READER_TYPE_PROCESSING_INSTRUCTION = 7,
+ XML_READER_TYPE_COMMENT = 8,
+ XML_READER_TYPE_DOCUMENT = 9,
+ XML_READER_TYPE_DOCUMENT_TYPE = 10,
+ XML_READER_TYPE_DOCUMENT_FRAGMENT = 11,
+ XML_READER_TYPE_NOTATION = 12,
+ XML_READER_TYPE_WHITESPACE = 13,
+ XML_READER_TYPE_SIGNIFICANT_WHITESPACE = 14,
+ XML_READER_TYPE_END_ELEMENT = 15,
+ XML_READER_TYPE_END_ENTITY = 16,
+ XML_READER_TYPE_XML_DECLARATION = 17
+} xmlReaderTypes;
+
+/**
+ * xmlTextReader:
+ *
+ * Structure for an xmlReader context.
+ */
+typedef struct _xmlTextReader xmlTextReader;
+
+/**
+ * xmlTextReaderPtr:
+ *
+ * Pointer to an xmlReader context.
+ */
+typedef xmlTextReader *xmlTextReaderPtr;
+
+/*
+ * Constructors & Destructor
+ */
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlNewTextReader (xmlParserInputBufferPtr input,
+ const char *URI);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlNewTextReaderFilename(const char *URI);
+
+XMLPUBFUN void XMLCALL
+ xmlFreeTextReader (xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetup(xmlTextReaderPtr reader,
+ xmlParserInputBufferPtr input, const char *URL,
+ const char *encoding, int options);
+
+/*
+ * Iterators
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRead (xmlTextReaderPtr reader);
+
+#ifdef LIBXML_WRITER_ENABLED
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadInnerXml (xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadOuterXml (xmlTextReaderPtr reader);
+#endif
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderReadString (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderReadAttributeValue (xmlTextReaderPtr reader);
+
+/*
+ * Attributes of the node
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderAttributeCount(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderDepth (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderHasAttributes(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderHasValue(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsDefault (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsEmptyElement(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNodeType (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderQuoteChar (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderReadState (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsNamespaceDecl(xmlTextReaderPtr reader);
+
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstName (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstString (xmlTextReaderPtr reader,
+ const xmlChar *str);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstValue (xmlTextReaderPtr reader);
+
+/*
+ * use the Const version of the routine for
+ * better performance and simpler code
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderBaseUri (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLocalName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderName (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderNamespaceUri(xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderPrefix (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderXmlLang (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderValue (xmlTextReaderPtr reader);
+
+/*
+ * Methods of the XmlTextReader
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderClose (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttributeNo (xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttribute (xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderGetAttributeNs (xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN xmlParserInputBufferPtr XMLCALL
+ xmlTextReaderGetRemainder (xmlTextReaderPtr reader);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLookupNamespace(xmlTextReaderPtr reader,
+ const xmlChar *prefix);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttributeNo(xmlTextReaderPtr reader,
+ int no);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttribute(xmlTextReaderPtr reader,
+ const xmlChar *name);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToAttributeNs(xmlTextReaderPtr reader,
+ const xmlChar *localName,
+ const xmlChar *namespaceURI);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToFirstAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToNextAttribute(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderMoveToElement (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNormalization (xmlTextReaderPtr reader);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstEncoding (xmlTextReaderPtr reader);
+
+/*
+ * Extensions
+ */
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetParserProp (xmlTextReaderPtr reader,
+ int prop,
+ int value);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserProp (xmlTextReaderPtr reader,
+ int prop);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderCurrentNode (xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserLineNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN int XMLCALL
+ xmlTextReaderGetParserColumnNumber(xmlTextReaderPtr reader);
+
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderPreserve (xmlTextReaderPtr reader);
+#ifdef LIBXML_PATTERN_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlTextReaderPreservePattern(xmlTextReaderPtr reader,
+ const xmlChar *pattern,
+ const xmlChar **namespaces);
+#endif /* LIBXML_PATTERN_ENABLED */
+XMLPUBFUN xmlDocPtr XMLCALL
+ xmlTextReaderCurrentDoc (xmlTextReaderPtr reader);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlTextReaderExpand (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNext (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderNextSibling (xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderIsValid (xmlTextReaderPtr reader);
+#ifdef LIBXML_SCHEMAS_ENABLED
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGValidate(xmlTextReaderPtr reader,
+ const char *rng);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderRelaxNGSetSchema(xmlTextReaderPtr reader,
+ xmlRelaxNGPtr schema);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSchemaValidate (xmlTextReaderPtr reader,
+ const char *xsd);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSchemaValidateCtxt(xmlTextReaderPtr reader,
+ xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderSetSchema (xmlTextReaderPtr reader,
+ xmlSchemaPtr schema);
+#endif
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlTextReaderConstXmlVersion(xmlTextReaderPtr reader);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderStandalone (xmlTextReaderPtr reader);
+
+
+/*
+ * Index lookup
+ */
+XMLPUBFUN long XMLCALL
+ xmlTextReaderByteConsumed (xmlTextReaderPtr reader);
+
+/*
+ * New more complete APIs for simpler creation and reuse of readers
+ */
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderWalker (xmlDocPtr doc);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForDoc (const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForFile (const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForMemory (const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForFd (int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlTextReaderPtr XMLCALL
+ xmlReaderForIO (xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN int XMLCALL
+ xmlReaderNewWalker (xmlTextReaderPtr reader,
+ xmlDocPtr doc);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewDoc (xmlTextReaderPtr reader,
+ const xmlChar * cur,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewFile (xmlTextReaderPtr reader,
+ const char *filename,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewMemory (xmlTextReaderPtr reader,
+ const char *buffer,
+ int size,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewFd (xmlTextReaderPtr reader,
+ int fd,
+ const char *URL,
+ const char *encoding,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlReaderNewIO (xmlTextReaderPtr reader,
+ xmlInputReadCallback ioread,
+ xmlInputCloseCallback ioclose,
+ void *ioctx,
+ const char *URL,
+ const char *encoding,
+ int options);
+/*
+ * Error handling extensions
+ */
+typedef void * xmlTextReaderLocatorPtr;
+
+/**
+ * xmlTextReaderErrorFunc:
+ * @arg: the user argument
+ * @msg: the message
+ * @severity: the severity of the error
+ * @locator: a locator indicating where the error occured
+ *
+ * Signature of an error callback from a reader parser
+ */
+typedef void (XMLCALL *xmlTextReaderErrorFunc)(void *arg,
+ const char *msg,
+ xmlParserSeverities severity,
+ xmlTextReaderLocatorPtr locator);
+XMLPUBFUN int XMLCALL
+ xmlTextReaderLocatorLineNumber(xmlTextReaderLocatorPtr locator);
+/*int xmlTextReaderLocatorLinePosition(xmlTextReaderLocatorPtr locator);*/
+XMLPUBFUN xmlChar * XMLCALL
+ xmlTextReaderLocatorBaseURI (xmlTextReaderLocatorPtr locator);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc f,
+ void *arg);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderSetStructuredErrorHandler(xmlTextReaderPtr reader,
+ xmlStructuredErrorFunc f,
+ void *arg);
+XMLPUBFUN void XMLCALL
+ xmlTextReaderGetErrorHandler(xmlTextReaderPtr reader,
+ xmlTextReaderErrorFunc *f,
+ void **arg);
+
+#endif /* LIBXML_READER_ENABLED */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __XML_XMLREADER_H__ */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlregexp.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlregexp.h
new file mode 100644
index 0000000..7009645
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlregexp.h
@@ -0,0 +1,222 @@
+/*
+ * Summary: regular expressions handling
+ * Description: basic API for libxml regular expressions handling used
+ * for XML Schemas and validation.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_REGEXP_H__
+#define __XML_REGEXP_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_REGEXP_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlRegexpPtr:
+ *
+ * A libxml regular expression, they can actually be far more complex
+ * thank the POSIX regex expressions.
+ */
+typedef struct _xmlRegexp xmlRegexp;
+typedef xmlRegexp *xmlRegexpPtr;
+
+/**
+ * xmlRegExecCtxtPtr:
+ *
+ * A libxml progressive regular expression evaluation context
+ */
+typedef struct _xmlRegExecCtxt xmlRegExecCtxt;
+typedef xmlRegExecCtxt *xmlRegExecCtxtPtr;
+
+#ifdef __cplusplus
+}
+#endif
+#include <libxml/tree.h>
+#include <libxml/dict.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * The POSIX like API
+ */
+XMLPUBFUN xmlRegexpPtr XMLCALL
+ xmlRegexpCompile (const xmlChar *regexp);
+XMLPUBFUN void XMLCALL xmlRegFreeRegexp(xmlRegexpPtr regexp);
+XMLPUBFUN int XMLCALL
+ xmlRegexpExec (xmlRegexpPtr comp,
+ const xmlChar *value);
+XMLPUBFUN void XMLCALL
+ xmlRegexpPrint (FILE *output,
+ xmlRegexpPtr regexp);
+XMLPUBFUN int XMLCALL
+ xmlRegexpIsDeterminist(xmlRegexpPtr comp);
+
+/**
+ * xmlRegExecCallbacks:
+ * @exec: the regular expression context
+ * @token: the current token string
+ * @transdata: transition data
+ * @inputdata: input data
+ *
+ * Callback function when doing a transition in the automata
+ */
+typedef void (*xmlRegExecCallbacks) (xmlRegExecCtxtPtr exec,
+ const xmlChar *token,
+ void *transdata,
+ void *inputdata);
+
+/*
+ * The progressive API
+ */
+XMLPUBFUN xmlRegExecCtxtPtr XMLCALL
+ xmlRegNewExecCtxt (xmlRegexpPtr comp,
+ xmlRegExecCallbacks callback,
+ void *data);
+XMLPUBFUN void XMLCALL
+ xmlRegFreeExecCtxt (xmlRegExecCtxtPtr exec);
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ void *data);
+XMLPUBFUN int XMLCALL
+ xmlRegExecPushString2(xmlRegExecCtxtPtr exec,
+ const xmlChar *value,
+ const xmlChar *value2,
+ void *data);
+
+XMLPUBFUN int XMLCALL
+ xmlRegExecNextValues(xmlRegExecCtxtPtr exec,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+XMLPUBFUN int XMLCALL
+ xmlRegExecErrInfo (xmlRegExecCtxtPtr exec,
+ const xmlChar **string,
+ int *nbval,
+ int *nbneg,
+ xmlChar **values,
+ int *terminal);
+#ifdef LIBXML_EXPR_ENABLED
+/*
+ * Formal regular expression handling
+ * Its goal is to do some formal work on content models
+ */
+
+/* expressions are used within a context */
+typedef struct _xmlExpCtxt xmlExpCtxt;
+typedef xmlExpCtxt *xmlExpCtxtPtr;
+
+XMLPUBFUN void XMLCALL
+ xmlExpFreeCtxt (xmlExpCtxtPtr ctxt);
+XMLPUBFUN xmlExpCtxtPtr XMLCALL
+ xmlExpNewCtxt (int maxNodes,
+ xmlDictPtr dict);
+
+XMLPUBFUN int XMLCALL
+ xmlExpCtxtNbNodes(xmlExpCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlExpCtxtNbCons(xmlExpCtxtPtr ctxt);
+
+/* Expressions are trees but the tree is opaque */
+typedef struct _xmlExpNode xmlExpNode;
+typedef xmlExpNode *xmlExpNodePtr;
+
+typedef enum {
+ XML_EXP_EMPTY = 0,
+ XML_EXP_FORBID = 1,
+ XML_EXP_ATOM = 2,
+ XML_EXP_SEQ = 3,
+ XML_EXP_OR = 4,
+ XML_EXP_COUNT = 5
+} xmlExpNodeType;
+
+/*
+ * 2 core expressions shared by all for the empty language set
+ * and for the set with just the empty token
+ */
+XMLPUBVAR xmlExpNodePtr forbiddenExp;
+XMLPUBVAR xmlExpNodePtr emptyExp;
+
+/*
+ * Expressions are reference counted internally
+ */
+XMLPUBFUN void XMLCALL
+ xmlExpFree (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr);
+XMLPUBFUN void XMLCALL
+ xmlExpRef (xmlExpNodePtr expr);
+
+/*
+ * constructors can be either manual or from a string
+ */
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpParse (xmlExpCtxtPtr ctxt,
+ const char *expr);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewAtom (xmlExpCtxtPtr ctxt,
+ const xmlChar *name,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewOr (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr left,
+ xmlExpNodePtr right);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewSeq (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr left,
+ xmlExpNodePtr right);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpNewRange (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr subset,
+ int min,
+ int max);
+/*
+ * The really interesting APIs
+ */
+XMLPUBFUN int XMLCALL
+ xmlExpIsNillable(xmlExpNodePtr expr);
+XMLPUBFUN int XMLCALL
+ xmlExpMaxToken (xmlExpNodePtr expr);
+XMLPUBFUN int XMLCALL
+ xmlExpGetLanguage(xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar**langList,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlExpGetStart (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar**tokList,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpStringDerive(xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ const xmlChar *str,
+ int len);
+XMLPUBFUN xmlExpNodePtr XMLCALL
+ xmlExpExpDerive (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ xmlExpNodePtr sub);
+XMLPUBFUN int XMLCALL
+ xmlExpSubsume (xmlExpCtxtPtr ctxt,
+ xmlExpNodePtr expr,
+ xmlExpNodePtr sub);
+XMLPUBFUN void XMLCALL
+ xmlExpDump (xmlBufferPtr buf,
+ xmlExpNodePtr expr);
+#endif /* LIBXML_EXPR_ENABLED */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_REGEXP_ENABLED */
+
+#endif /*__XML_REGEXP_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlsave.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlsave.h
new file mode 100644
index 0000000..fb329b2
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlsave.h
@@ -0,0 +1,88 @@
+/*
+ * Summary: the XML document serializer
+ * Description: API to save document or subtree of document
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XMLSAVE_H__
+#define __XML_XMLSAVE_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/tree.h>
+#include <libxml/encoding.h>
+#include <libxml/xmlIO.h>
+
+#ifdef LIBXML_OUTPUT_ENABLED
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlSaveOption:
+ *
+ * This is the set of XML save options that can be passed down
+ * to the xmlSaveToFd() and similar calls.
+ */
+typedef enum {
+ XML_SAVE_FORMAT = 1<<0, /* format save output */
+ XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
+ XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
+ XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */
+ XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
+ XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
+ XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
+ XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
+} xmlSaveOption;
+
+
+typedef struct _xmlSaveCtxt xmlSaveCtxt;
+typedef xmlSaveCtxt *xmlSaveCtxtPtr;
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToFd (int fd,
+ const char *encoding,
+ int options);
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToFilename (const char *filename,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToBuffer (xmlBufferPtr buffer,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN xmlSaveCtxtPtr XMLCALL
+ xmlSaveToIO (xmlOutputWriteCallback iowrite,
+ xmlOutputCloseCallback ioclose,
+ void *ioctx,
+ const char *encoding,
+ int options);
+
+XMLPUBFUN long XMLCALL
+ xmlSaveDoc (xmlSaveCtxtPtr ctxt,
+ xmlDocPtr doc);
+XMLPUBFUN long XMLCALL
+ xmlSaveTree (xmlSaveCtxtPtr ctxt,
+ xmlNodePtr node);
+
+XMLPUBFUN int XMLCALL
+ xmlSaveFlush (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSaveClose (xmlSaveCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+XMLPUBFUN int XMLCALL
+ xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
+ xmlCharEncodingOutputFunc escape);
+#ifdef __cplusplus
+}
+#endif
+#endif /* LIBXML_OUTPUT_ENABLED */
+#endif /* __XML_XMLSAVE_H__ */
+
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlschemas.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlschemas.h
new file mode 100644
index 0000000..752bc3a
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlschemas.h
@@ -0,0 +1,218 @@
+/*
+ * Summary: incomplete XML Schemas structure implementation
+ * Description: interface to the XML Schemas handling and schema validity
+ * checking, it is incomplete right now.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_H__
+#define __XML_SCHEMA_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/tree.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * This error codes are obsolete; not used any more.
+ */
+typedef enum {
+ XML_SCHEMAS_ERR_OK = 0,
+ XML_SCHEMAS_ERR_NOROOT = 1,
+ XML_SCHEMAS_ERR_UNDECLAREDELEM,
+ XML_SCHEMAS_ERR_NOTTOPLEVEL,
+ XML_SCHEMAS_ERR_MISSING,
+ XML_SCHEMAS_ERR_WRONGELEM,
+ XML_SCHEMAS_ERR_NOTYPE,
+ XML_SCHEMAS_ERR_NOROLLBACK,
+ XML_SCHEMAS_ERR_ISABSTRACT,
+ XML_SCHEMAS_ERR_NOTEMPTY,
+ XML_SCHEMAS_ERR_ELEMCONT,
+ XML_SCHEMAS_ERR_HAVEDEFAULT,
+ XML_SCHEMAS_ERR_NOTNILLABLE,
+ XML_SCHEMAS_ERR_EXTRACONTENT,
+ XML_SCHEMAS_ERR_INVALIDATTR,
+ XML_SCHEMAS_ERR_INVALIDELEM,
+ XML_SCHEMAS_ERR_NOTDETERMINIST,
+ XML_SCHEMAS_ERR_CONSTRUCT,
+ XML_SCHEMAS_ERR_INTERNAL,
+ XML_SCHEMAS_ERR_NOTSIMPLE,
+ XML_SCHEMAS_ERR_ATTRUNKNOWN,
+ XML_SCHEMAS_ERR_ATTRINVALID,
+ XML_SCHEMAS_ERR_VALUE,
+ XML_SCHEMAS_ERR_FACET,
+ XML_SCHEMAS_ERR_,
+ XML_SCHEMAS_ERR_XXX
+} xmlSchemaValidError;
+
+/*
+* ATTENTION: Change xmlSchemaSetValidOptions's check
+* for invalid values, if adding to the validation
+* options below.
+*/
+/**
+ * xmlSchemaValidOption:
+ *
+ * This is the set of XML Schema validation options.
+ */
+typedef enum {
+ XML_SCHEMA_VAL_VC_I_CREATE = 1<<0
+ /* Default/fixed: create an attribute node
+ * or an element's text node on the instance.
+ */
+} xmlSchemaValidOption;
+
+/*
+ XML_SCHEMA_VAL_XSI_ASSEMBLE = 1<<1,
+ * assemble schemata using
+ * xsi:schemaLocation and
+ * xsi:noNamespaceSchemaLocation
+*/
+
+/**
+ * The schemas related types are kept internal
+ */
+typedef struct _xmlSchema xmlSchema;
+typedef xmlSchema *xmlSchemaPtr;
+
+/**
+ * xmlSchemaValidityErrorFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of an error callback from an XSD validation
+ */
+typedef void (XMLCDECL *xmlSchemaValidityErrorFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * xmlSchemaValidityWarningFunc:
+ * @ctx: the validation context
+ * @msg: the message
+ * @...: extra arguments
+ *
+ * Signature of a warning callback from an XSD validation
+ */
+typedef void (XMLCDECL *xmlSchemaValidityWarningFunc) (void *ctx, const char *msg, ...) LIBXML_ATTR_FORMAT(2,3);
+
+/**
+ * A schemas validation context
+ */
+typedef struct _xmlSchemaParserCtxt xmlSchemaParserCtxt;
+typedef xmlSchemaParserCtxt *xmlSchemaParserCtxtPtr;
+
+typedef struct _xmlSchemaValidCtxt xmlSchemaValidCtxt;
+typedef xmlSchemaValidCtxt *xmlSchemaValidCtxtPtr;
+
+/*
+ * Interfaces for parsing.
+ */
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewParserCtxt (const char *URL);
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewMemParserCtxt (const char *buffer,
+ int size);
+XMLPUBFUN xmlSchemaParserCtxtPtr XMLCALL
+ xmlSchemaNewDocParserCtxt (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeParserCtxt (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetParserErrors (xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetParserStructuredErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetParserErrors(xmlSchemaParserCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc * err,
+ xmlSchemaValidityWarningFunc * warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaIsValid (xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaPtr XMLCALL
+ xmlSchemaParse (xmlSchemaParserCtxtPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFree (xmlSchemaPtr schema);
+#ifdef LIBXML_OUTPUT_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlSchemaDump (FILE *output,
+ xmlSchemaPtr schema);
+#endif /* LIBXML_OUTPUT_ENABLED */
+/*
+ * Interfaces for validating
+ */
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc err,
+ xmlSchemaValidityWarningFunc warn,
+ void *ctx);
+XMLPUBFUN void XMLCALL
+ xmlSchemaSetValidStructuredErrors(xmlSchemaValidCtxtPtr ctxt,
+ xmlStructuredErrorFunc serror,
+ void *ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetValidErrors (xmlSchemaValidCtxtPtr ctxt,
+ xmlSchemaValidityErrorFunc *err,
+ xmlSchemaValidityWarningFunc *warn,
+ void **ctx);
+XMLPUBFUN int XMLCALL
+ xmlSchemaSetValidOptions (xmlSchemaValidCtxtPtr ctxt,
+ int options);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidCtxtGetOptions(xmlSchemaValidCtxtPtr ctxt);
+
+XMLPUBFUN xmlSchemaValidCtxtPtr XMLCALL
+ xmlSchemaNewValidCtxt (xmlSchemaPtr schema);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeValidCtxt (xmlSchemaValidCtxtPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateDoc (xmlSchemaValidCtxtPtr ctxt,
+ xmlDocPtr instance);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateOneElement (xmlSchemaValidCtxtPtr ctxt,
+ xmlNodePtr elem);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateStream (xmlSchemaValidCtxtPtr ctxt,
+ xmlParserInputBufferPtr input,
+ xmlCharEncoding enc,
+ xmlSAXHandlerPtr sax,
+ void *user_data);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFile (xmlSchemaValidCtxtPtr ctxt,
+ const char * filename,
+ int options);
+
+XMLPUBFUN xmlParserCtxtPtr XMLCALL
+ xmlSchemaValidCtxtGetParserCtxt(xmlSchemaValidCtxtPtr ctxt);
+
+/*
+ * Interface to insert Schemas SAX validation in a SAX stream
+ */
+typedef struct _xmlSchemaSAXPlug xmlSchemaSAXPlugStruct;
+typedef xmlSchemaSAXPlugStruct *xmlSchemaSAXPlugPtr;
+
+XMLPUBFUN xmlSchemaSAXPlugPtr XMLCALL
+ xmlSchemaSAXPlug (xmlSchemaValidCtxtPtr ctxt,
+ xmlSAXHandlerPtr *sax,
+ void **user_data);
+XMLPUBFUN int XMLCALL
+ xmlSchemaSAXUnplug (xmlSchemaSAXPlugPtr plug);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlschemastypes.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlschemastypes.h
new file mode 100644
index 0000000..96017b5
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlschemastypes.h
@@ -0,0 +1,151 @@
+/*
+ * Summary: implementation of XML Schema Datatypes
+ * Description: module providing the XML Schema Datatypes implementation
+ * both definition and validity checking
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+
+#ifndef __XML_SCHEMA_TYPES_H__
+#define __XML_SCHEMA_TYPES_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_SCHEMAS_ENABLED
+
+#include <libxml/schemasInternals.h>
+#include <libxml/xmlschemas.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ XML_SCHEMA_WHITESPACE_UNKNOWN = 0,
+ XML_SCHEMA_WHITESPACE_PRESERVE = 1,
+ XML_SCHEMA_WHITESPACE_REPLACE = 2,
+ XML_SCHEMA_WHITESPACE_COLLAPSE = 3
+} xmlSchemaWhitespaceValueType;
+
+XMLPUBFUN void XMLCALL
+ xmlSchemaInitTypes (void);
+XMLPUBFUN void XMLCALL
+ xmlSchemaCleanupTypes (void);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetPredefinedType (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidatePredefinedType (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValPredefTypeNode (xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFacet (xmlSchemaTypePtr base,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateFacetWhtsp (xmlSchemaFacetPtr facet,
+ xmlSchemaWhitespaceValueType fws,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaFacetPtr XMLCALL
+ xmlSchemaNewFacet (void);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCheckFacet (xmlSchemaFacetPtr facet,
+ xmlSchemaTypePtr typeDecl,
+ xmlSchemaParserCtxtPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN void XMLCALL
+ xmlSchemaFreeFacet (xmlSchemaFacetPtr facet);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCompareValues (xmlSchemaValPtr x,
+ xmlSchemaValPtr y);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetBuiltInListSimpleTypeItemType (xmlSchemaTypePtr type);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateListSimpleTypeFacet (xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ unsigned long actualLen,
+ unsigned long *expectedLen);
+XMLPUBFUN xmlSchemaTypePtr XMLCALL
+ xmlSchemaGetBuiltInType (xmlSchemaValType type);
+XMLPUBFUN int XMLCALL
+ xmlSchemaIsBuiltInTypeFacet (xmlSchemaTypePtr type,
+ int facetType);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSchemaCollapseString (const xmlChar *value);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlSchemaWhiteSpaceReplace (const xmlChar *value);
+XMLPUBFUN unsigned long XMLCALL
+ xmlSchemaGetFacetValueAsULong (xmlSchemaFacetPtr facet);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateLengthFacet (xmlSchemaTypePtr type,
+ xmlSchemaFacetPtr facet,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValidateLengthFacetWhtsp(xmlSchemaFacetPtr facet,
+ xmlSchemaValType valType,
+ const xmlChar *value,
+ xmlSchemaValPtr val,
+ unsigned long *length,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValPredefTypeNodeNoNorm(xmlSchemaTypePtr type,
+ const xmlChar *value,
+ xmlSchemaValPtr *val,
+ xmlNodePtr node);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetCanonValue (xmlSchemaValPtr val,
+ const xmlChar **retValue);
+XMLPUBFUN int XMLCALL
+ xmlSchemaGetCanonValueWhtsp (xmlSchemaValPtr val,
+ const xmlChar **retValue,
+ xmlSchemaWhitespaceValueType ws);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValueAppend (xmlSchemaValPtr prev,
+ xmlSchemaValPtr cur);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaValueGetNext (xmlSchemaValPtr cur);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlSchemaValueGetAsString (xmlSchemaValPtr val);
+XMLPUBFUN int XMLCALL
+ xmlSchemaValueGetAsBoolean (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewStringValue (xmlSchemaValType type,
+ const xmlChar *value);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewNOTATIONValue (const xmlChar *name,
+ const xmlChar *ns);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaNewQNameValue (const xmlChar *namespaceName,
+ const xmlChar *localName);
+XMLPUBFUN int XMLCALL
+ xmlSchemaCompareValuesWhtsp (xmlSchemaValPtr x,
+ xmlSchemaWhitespaceValueType xws,
+ xmlSchemaValPtr y,
+ xmlSchemaWhitespaceValueType yws);
+XMLPUBFUN xmlSchemaValPtr XMLCALL
+ xmlSchemaCopyValue (xmlSchemaValPtr val);
+XMLPUBFUN xmlSchemaValType XMLCALL
+ xmlSchemaGetValType (xmlSchemaValPtr val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_SCHEMAS_ENABLED */
+#endif /* __XML_SCHEMA_TYPES_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlstring.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlstring.h
new file mode 100644
index 0000000..2036236
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlstring.h
@@ -0,0 +1,140 @@
+/*
+ * Summary: set of routines to process strings
+ * Description: type and interfaces needed for the internal string handling
+ * of the library, especially UTF8 processing.
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_STRING_H__
+#define __XML_STRING_H__
+
+#include <stdarg.h>
+#include <libxml/xmlversion.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * xmlChar:
+ *
+ * This is a basic byte in an UTF-8 encoded string.
+ * It's unsigned allowing to pinpoint case where char * are assigned
+ * to xmlChar * (possibly making serialization back impossible).
+ */
+typedef unsigned char xmlChar;
+
+/**
+ * BAD_CAST:
+ *
+ * Macro to cast a string to an xmlChar * when one know its safe.
+ */
+#define BAD_CAST (xmlChar *)
+
+/*
+ * xmlChar handling
+ */
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrdup (const xmlChar *cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrndup (const xmlChar *cur,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCharStrndup (const char *cur,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlCharStrdup (const char *cur);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrsub (const xmlChar *str,
+ int start,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrchr (const xmlChar *str,
+ xmlChar val);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrstr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlStrcasestr (const xmlChar *str,
+ const xmlChar *val);
+XMLPUBFUN int XMLCALL
+ xmlStrcmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrncmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrcasecmp (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrncasecmp (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrEqual (const xmlChar *str1,
+ const xmlChar *str2);
+XMLPUBFUN int XMLCALL
+ xmlStrQEqual (const xmlChar *pref,
+ const xmlChar *name,
+ const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlStrlen (const xmlChar *str);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrcat (xmlChar *cur,
+ const xmlChar *add);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrncat (xmlChar *cur,
+ const xmlChar *add,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlStrncatNew (const xmlChar *str1,
+ const xmlChar *str2,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlStrPrintf (xmlChar *buf,
+ int len,
+ const xmlChar *msg,
+ ...);
+XMLPUBFUN int XMLCALL
+ xmlStrVPrintf (xmlChar *buf,
+ int len,
+ const xmlChar *msg,
+ va_list ap);
+
+XMLPUBFUN int XMLCALL
+ xmlGetUTF8Char (const unsigned char *utf,
+ int *len);
+XMLPUBFUN int XMLCALL
+ xmlCheckUTF8 (const unsigned char *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strsize (const xmlChar *utf,
+ int len);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlUTF8Strndup (const xmlChar *utf,
+ int len);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlUTF8Strpos (const xmlChar *utf,
+ int pos);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strloc (const xmlChar *utf,
+ const xmlChar *utfchar);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlUTF8Strsub (const xmlChar *utf,
+ int start,
+ int len);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Strlen (const xmlChar *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Size (const xmlChar *utf);
+XMLPUBFUN int XMLCALL
+ xmlUTF8Charcmp (const xmlChar *utf1,
+ const xmlChar *utf2);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* __XML_STRING_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlunicode.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlunicode.h
new file mode 100644
index 0000000..01ac8b6
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlunicode.h
@@ -0,0 +1,202 @@
+/*
+ * Summary: Unicode character APIs
+ * Description: API for the Unicode character APIs
+ *
+ * This file is automatically generated from the
+ * UCS description files of the Unicode Character Database
+ * http://www.unicode.org/Public/4.0-Update1/UCD-4.0.1.html
+ * using the genUnicode.py Python script.
+ *
+ * Generation date: Mon Mar 27 11:09:52 2006
+ * Sources: Blocks-4.0.1.txt UnicodeData-4.0.1.txt
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_UNICODE_H__
+#define __XML_UNICODE_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_UNICODE_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+XMLPUBFUN int XMLCALL xmlUCSIsAegeanNumbers (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsAlphabeticPresentationForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArabicPresentationFormsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArmenian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsArrows (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBasicLatin (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBengali (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBlockElements (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBopomofo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBopomofoExtended (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBoxDrawing (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBraillePatterns (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsBuhid (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsByzantineMusicalSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibility (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKCompatibilityIdeographsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKRadicalsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKSymbolsandPunctuation (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCJKUnifiedIdeographsExtensionB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCherokee (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarks (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningDiacriticalMarksforSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningHalfMarks (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCombiningMarksforSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsControlPictures (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCurrencySymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCypriotSyllabary (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCyrillic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCyrillicSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDeseret (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDevanagari (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsDingbats (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEnclosedAlphanumerics (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEnclosedCJKLettersandMonths (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsEthiopic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeneralPunctuation (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeometricShapes (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGeorgian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGothic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreek (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreekExtended (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGreekandCoptic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGujarati (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsGurmukhi (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHalfwidthandFullwidthForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulCompatibilityJamo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulJamo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHangulSyllables (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHanunoo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHebrew (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHighPrivateUseSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHighSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsHiragana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsIPAExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsIdeographicDescriptionCharacters (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKanbun (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKangxiRadicals (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKannada (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKatakana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKatakanaPhoneticExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKhmer (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsKhmerSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLao (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatin1Supplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLatinExtendedAdditional (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLetterlikeSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLimbu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLinearBIdeograms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLinearBSyllabary (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsLowSurrogates (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMalayalam (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMathematicalAlphanumericSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMathematicalOperators (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousMathematicalSymbolsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousSymbolsandArrows (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMiscellaneousTechnical (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMongolian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMusicalSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsMyanmar (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsNumberForms (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOgham (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOldItalic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOpticalCharacterRecognition (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOriya (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsOsmanya (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPhoneticExtensions (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPrivateUse (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsPrivateUseArea (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsRunic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsShavian (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSinhala (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSmallFormVariants (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSpacingModifierLetters (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSpecials (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSuperscriptsandSubscripts (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalArrowsB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementalMathematicalOperators (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaA (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSupplementaryPrivateUseAreaB (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsSyriac (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTagalog (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTagbanwa (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTags (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTaiLe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTaiXuanJingSymbols (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTamil (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTelugu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsThaana (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsThai (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsTibetan (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsUgaritic (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsUnifiedCanadianAboriginalSyllabics (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectors (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsVariationSelectorsSupplement (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYiRadicals (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYiSyllables (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsYijingHexagramSymbols (int code);
+
+XMLPUBFUN int XMLCALL xmlUCSIsBlock (int code, const char *block);
+
+XMLPUBFUN int XMLCALL xmlUCSIsCatC (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCf (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatCs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatL (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLm (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLt (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatLu (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatM (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatMn (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatN (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNd (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatNo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatP (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPd (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPe (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPf (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPi (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatPs (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatS (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSc (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSk (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSm (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatSo (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZ (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZl (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZp (int code);
+XMLPUBFUN int XMLCALL xmlUCSIsCatZs (int code);
+
+XMLPUBFUN int XMLCALL xmlUCSIsCat (int code, const char *cat);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_UNICODE_ENABLED */
+
+#endif /* __XML_UNICODE_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlversion.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlversion.h
new file mode 100644
index 0000000..a66eaea
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlversion.h
@@ -0,0 +1,467 @@
+/*
+ * Summary: compile-time version informations
+ * Description: compile-time version informations for the XML library
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_VERSION_H__
+#define __XML_VERSION_H__
+
+#include <libxml/xmlexports.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * use those to be sure nothing nasty will happen if
+ * your library and includes mismatch
+ */
+#ifndef LIBXML2_COMPILING_MSCCDEF
+XMLPUBFUN void XMLCALL xmlCheckVersion(int version);
+#endif /* LIBXML2_COMPILING_MSCCDEF */
+
+/**
+ * LIBXML_DOTTED_VERSION:
+ *
+ * the version string like "1.2.3"
+ */
+#define LIBXML_DOTTED_VERSION "2.7.8"
+
+/**
+ * LIBXML_VERSION:
+ *
+ * the version number: 1.2.3 value is 10203
+ */
+#define LIBXML_VERSION 20708
+
+/**
+ * LIBXML_VERSION_STRING:
+ *
+ * the version number string, 1.2.3 value is "10203"
+ */
+#define LIBXML_VERSION_STRING "20708"
+
+/**
+ * LIBXML_VERSION_EXTRA:
+ *
+ * extra version information, used to show a CVS compilation
+ */
+#define LIBXML_VERSION_EXTRA ""
+
+/**
+ * LIBXML_TEST_VERSION:
+ *
+ * Macro to check that the libxml version in use is compatible with
+ * the version the software has been compiled against
+ */
+#define LIBXML_TEST_VERSION xmlCheckVersion(20708);
+
+#ifndef VMS
+#if 0
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO
+#else
+/**
+ * WITHOUT_TRIO:
+ *
+ * defined if the trio support should not be configured in
+ */
+#define WITHOUT_TRIO
+#endif
+#else /* VMS */
+/**
+ * WITH_TRIO:
+ *
+ * defined if the trio support need to be configured in
+ */
+#define WITH_TRIO 1
+#endif /* VMS */
+
+/**
+ * LIBXML_THREAD_ENABLED:
+ *
+ * Whether the thread support is configured in
+ */
+#if 1
+#if defined(_REENTRANT) || defined(__MT__) || \
+ (defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE - 0 >= 199506L))
+#define LIBXML_THREAD_ENABLED
+#endif
+#endif
+
+/**
+ * LIBXML_TREE_ENABLED:
+ *
+ * Whether the DOM like tree manipulation API support is configured in
+ */
+#if 1
+#define LIBXML_TREE_ENABLED
+#endif
+
+/**
+ * LIBXML_OUTPUT_ENABLED:
+ *
+ * Whether the serialization/saving support is configured in
+ */
+#if 1
+#define LIBXML_OUTPUT_ENABLED
+#endif
+
+/**
+ * LIBXML_PUSH_ENABLED:
+ *
+ * Whether the push parsing interfaces are configured in
+ */
+#if 1
+#define LIBXML_PUSH_ENABLED
+#endif
+
+/**
+ * LIBXML_READER_ENABLED:
+ *
+ * Whether the xmlReader parsing interface is configured in
+ */
+#if 1
+#define LIBXML_READER_ENABLED
+#endif
+
+/**
+ * LIBXML_PATTERN_ENABLED:
+ *
+ * Whether the xmlPattern node selection interface is configured in
+ */
+#if 1
+#define LIBXML_PATTERN_ENABLED
+#endif
+
+/**
+ * LIBXML_WRITER_ENABLED:
+ *
+ * Whether the xmlWriter saving interface is configured in
+ */
+#if 1
+#define LIBXML_WRITER_ENABLED
+#endif
+
+/**
+ * LIBXML_SAX1_ENABLED:
+ *
+ * Whether the older SAX1 interface is configured in
+ */
+#if 1
+#define LIBXML_SAX1_ENABLED
+#endif
+
+/**
+ * LIBXML_FTP_ENABLED:
+ *
+ * Whether the FTP support is configured in
+ */
+#if 1
+#define LIBXML_FTP_ENABLED
+#endif
+
+/**
+ * LIBXML_HTTP_ENABLED:
+ *
+ * Whether the HTTP support is configured in
+ */
+#if 1
+#define LIBXML_HTTP_ENABLED
+#endif
+
+/**
+ * LIBXML_VALID_ENABLED:
+ *
+ * Whether the DTD validation support is configured in
+ */
+#if 1
+#define LIBXML_VALID_ENABLED
+#endif
+
+/**
+ * LIBXML_HTML_ENABLED:
+ *
+ * Whether the HTML support is configured in
+ */
+#if 1
+#define LIBXML_HTML_ENABLED
+#endif
+
+/**
+ * LIBXML_LEGACY_ENABLED:
+ *
+ * Whether the deprecated APIs are compiled in for compatibility
+ */
+#if 1
+#define LIBXML_LEGACY_ENABLED
+#endif
+
+/**
+ * LIBXML_C14N_ENABLED:
+ *
+ * Whether the Canonicalization support is configured in
+ */
+#if 1
+#define LIBXML_C14N_ENABLED
+#endif
+
+/**
+ * LIBXML_CATALOG_ENABLED:
+ *
+ * Whether the Catalog support is configured in
+ */
+#if 1
+#define LIBXML_CATALOG_ENABLED
+#endif
+
+/**
+ * LIBXML_DOCB_ENABLED:
+ *
+ * Whether the SGML Docbook support is configured in
+ */
+#if 1
+#define LIBXML_DOCB_ENABLED
+#endif
+
+/**
+ * LIBXML_XPATH_ENABLED:
+ *
+ * Whether XPath is configured in
+ */
+#if 1
+#define LIBXML_XPATH_ENABLED
+#endif
+
+/**
+ * LIBXML_XPTR_ENABLED:
+ *
+ * Whether XPointer is configured in
+ */
+#if 1
+#define LIBXML_XPTR_ENABLED
+#endif
+
+/**
+ * LIBXML_XINCLUDE_ENABLED:
+ *
+ * Whether XInclude is configured in
+ */
+#if 1
+#define LIBXML_XINCLUDE_ENABLED
+#endif
+
+/**
+ * LIBXML_ICONV_ENABLED:
+ *
+ * Whether iconv support is available
+ */
+#if 1
+#define LIBXML_ICONV_ENABLED
+#endif
+
+/**
+ * LIBXML_ICU_ENABLED:
+ *
+ * Whether icu support is available
+ */
+#if 0
+#define LIBXML_ICU_ENABLED
+#endif
+
+/**
+ * LIBXML_ISO8859X_ENABLED:
+ *
+ * Whether ISO-8859-* support is made available in case iconv is not
+ */
+#if 0
+#define LIBXML_ISO8859X_ENABLED
+#endif
+
+/**
+ * LIBXML_DEBUG_ENABLED:
+ *
+ * Whether Debugging module is configured in
+ */
+#if 1
+#define LIBXML_DEBUG_ENABLED
+#endif
+
+/**
+ * DEBUG_MEMORY_LOCATION:
+ *
+ * Whether the memory debugging is configured in
+ */
+#if 0
+#define DEBUG_MEMORY_LOCATION
+#endif
+
+/**
+ * LIBXML_DEBUG_RUNTIME:
+ *
+ * Whether the runtime debugging is configured in
+ */
+#if 0
+#define LIBXML_DEBUG_RUNTIME
+#endif
+
+/**
+ * LIBXML_UNICODE_ENABLED:
+ *
+ * Whether the Unicode related interfaces are compiled in
+ */
+#if 1
+#define LIBXML_UNICODE_ENABLED
+#endif
+
+/**
+ * LIBXML_REGEXP_ENABLED:
+ *
+ * Whether the regular expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_REGEXP_ENABLED
+#endif
+
+/**
+ * LIBXML_AUTOMATA_ENABLED:
+ *
+ * Whether the automata interfaces are compiled in
+ */
+#if 1
+#define LIBXML_AUTOMATA_ENABLED
+#endif
+
+/**
+ * LIBXML_EXPR_ENABLED:
+ *
+ * Whether the formal expressions interfaces are compiled in
+ */
+#if 1
+#define LIBXML_EXPR_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMAS_ENABLED:
+ *
+ * Whether the Schemas validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMAS_ENABLED
+#endif
+
+/**
+ * LIBXML_SCHEMATRON_ENABLED:
+ *
+ * Whether the Schematron validation interfaces are compiled in
+ */
+#if 1
+#define LIBXML_SCHEMATRON_ENABLED
+#endif
+
+/**
+ * LIBXML_MODULES_ENABLED:
+ *
+ * Whether the module interfaces are compiled in
+ */
+#if 1
+#define LIBXML_MODULES_ENABLED
+/**
+ * LIBXML_MODULE_EXTENSION:
+ *
+ * the string suffix used by dynamic modules (usually shared libraries)
+ */
+#define LIBXML_MODULE_EXTENSION ".dll"
+#endif
+
+/**
+ * LIBXML_ZLIB_ENABLED:
+ *
+ * Whether the Zlib support is compiled in
+ */
+#if 1
+#define LIBXML_ZLIB_ENABLED
+#endif
+
+#ifdef __GNUC__
+#ifdef HAVE_ANSIDECL_H
+#include <ansidecl.h>
+#endif
+
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+
+#ifndef ATTRIBUTE_UNUSED
+#define ATTRIBUTE_UNUSED __attribute__((unused))
+#endif
+
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+
+#ifndef LIBXML_ATTR_ALLOC_SIZE
+# if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_ALLOC_SIZE(x) __attribute__((alloc_size(x)))
+# else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+# endif
+#else
+# define LIBXML_ATTR_ALLOC_SIZE(x)
+#endif
+
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+
+#ifndef LIBXML_ATTR_FORMAT
+# if ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
+# define LIBXML_ATTR_FORMAT(fmt,args) __attribute__((__format__(__printf__,fmt,args)))
+# else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+# endif
+#else
+# define LIBXML_ATTR_FORMAT(fmt,args)
+#endif
+
+#else /* ! __GNUC__ */
+/**
+ * ATTRIBUTE_UNUSED:
+ *
+ * Macro used to signal to GCC unused function parameters
+ */
+#define ATTRIBUTE_UNUSED
+/**
+ * LIBXML_ATTR_ALLOC_SIZE:
+ *
+ * Macro used to indicate to GCC this is an allocator function
+ */
+#define LIBXML_ATTR_ALLOC_SIZE(x)
+/**
+ * LIBXML_ATTR_FORMAT:
+ *
+ * Macro used to indicate to GCC the parameter are printf like
+ */
+#define LIBXML_ATTR_FORMAT(fmt,args)
+#endif /* __GNUC__ */
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif
+
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlwriter.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlwriter.h
new file mode 100644
index 0000000..91e683c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xmlwriter.h
@@ -0,0 +1,485 @@
+
+/*
+ * Summary: text writing API for XML
+ * Description: text writing API for XML
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Alfred Mickautsch <alfred@mickautsch.de>
+ */
+
+#ifndef __XML_XMLWRITER_H__
+#define __XML_XMLWRITER_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_WRITER_ENABLED
+
+#include <stdarg.h>
+#include <libxml/xmlIO.h>
+#include <libxml/list.h>
+#include <libxml/xmlstring.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef struct _xmlTextWriter xmlTextWriter;
+ typedef xmlTextWriter *xmlTextWriterPtr;
+
+/*
+ * Constructors & Destructor
+ */
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriter(xmlOutputBufferPtr out);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterFilename(const char *uri, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterMemory(xmlBufferPtr buf, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterPushParser(xmlParserCtxtPtr ctxt, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterDoc(xmlDocPtr * doc, int compression);
+ XMLPUBFUN xmlTextWriterPtr XMLCALL
+ xmlNewTextWriterTree(xmlDocPtr doc, xmlNodePtr node,
+ int compression);
+ XMLPUBFUN void XMLCALL xmlFreeTextWriter(xmlTextWriterPtr writer);
+
+/*
+ * Functions
+ */
+
+
+/*
+ * Document
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDocument(xmlTextWriterPtr writer,
+ const char *version,
+ const char *encoding,
+ const char *standalone);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDocument(xmlTextWriterPtr
+ writer);
+
+/*
+ * Comments
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterStartComment(xmlTextWriterPtr
+ writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndComment(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatComment(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatComment(xmlTextWriterPtr writer,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteComment(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ content);
+
+/*
+ * Elements
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterStartElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndElement(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterFullEndElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * Elements conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElement(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatElementNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteElementNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar * name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * Text
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatRaw(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatRaw(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRawLen(xmlTextWriterPtr writer,
+ const xmlChar * content, int len);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteRaw(xmlTextWriterPtr writer,
+ const xmlChar * content);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteVFormatString(xmlTextWriterPtr
+ writer,
+ const char
+ *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteString(xmlTextWriterPtr writer,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteBase64(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteBinHex(xmlTextWriterPtr writer,
+ const char *data,
+ int start, int len);
+
+/*
+ * Attributes
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterStartAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndAttribute(xmlTextWriterPtr
+ writer);
+
+/*
+ * Attributes conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttribute(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttribute(xmlTextWriterPtr
+ writer,
+ const xmlChar * name,
+ const xmlChar *
+ content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatAttributeNS(xmlTextWriterPtr writer,
+ const xmlChar * prefix,
+ const xmlChar * name,
+ const xmlChar * namespaceURI,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteAttributeNS(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ prefix,
+ const xmlChar *
+ name,
+ const xmlChar *
+ namespaceURI,
+ const xmlChar *
+ content);
+
+/*
+ * PI's
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartPI(xmlTextWriterPtr writer,
+ const xmlChar * target);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndPI(xmlTextWriterPtr writer);
+
+/*
+ * PI conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatPI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWritePI(xmlTextWriterPtr writer,
+ const xmlChar * target,
+ const xmlChar * content);
+
+/**
+ * xmlTextWriterWriteProcessingInstruction:
+ *
+ * This macro maps to xmlTextWriterWritePI
+ */
+#define xmlTextWriterWriteProcessingInstruction xmlTextWriterWritePI
+
+/*
+ * CDATA
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterStartCDATA(xmlTextWriterPtr writer);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndCDATA(xmlTextWriterPtr writer);
+
+/*
+ * CDATA conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(2,3);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatCDATA(xmlTextWriterPtr writer,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(2,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteCDATA(xmlTextWriterPtr writer,
+ const xmlChar * content);
+
+/*
+ * DTD
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTD(xmlTextWriterPtr writer);
+
+/*
+ * DTD conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(5,6);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const char *format, va_list argptr)
+ LIBXML_ATTR_FORMAT(5,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTD(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * subset);
+
+/**
+ * xmlTextWriterWriteDocType:
+ *
+ * this macro maps to xmlTextWriterWriteDTD
+ */
+#define xmlTextWriterWriteDocType xmlTextWriterWriteDTD
+
+/*
+ * DTD element definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDElement(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD element definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDElement(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDElement(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD attribute list definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDAttlist(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD attribute list definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(3,4);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDAttlist(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(3,0);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDAttlist(xmlTextWriterPtr
+ writer,
+ const xmlChar *
+ name,
+ const xmlChar *
+ content);
+
+/*
+ * DTD entity definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterStartDTDEntity(xmlTextWriterPtr writer,
+ int pe, const xmlChar * name);
+ XMLPUBFUN int XMLCALL xmlTextWriterEndDTDEntity(xmlTextWriterPtr
+ writer);
+
+/*
+ * DTD entity definition conveniency functions
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format, ...)
+ LIBXML_ATTR_FORMAT(4,5);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteVFormatDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const char *format,
+ va_list argptr)
+ LIBXML_ATTR_FORMAT(4,0);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDInternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * content);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDExternalEntity(xmlTextWriterPtr writer,
+ int pe,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar * ndataid);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDExternalEntityContents(xmlTextWriterPtr
+ writer,
+ const xmlChar * pubid,
+ const xmlChar * sysid,
+ const xmlChar *
+ ndataid);
+ XMLPUBFUN int XMLCALL xmlTextWriterWriteDTDEntity(xmlTextWriterPtr
+ writer, int pe,
+ const xmlChar * name,
+ const xmlChar *
+ pubid,
+ const xmlChar *
+ sysid,
+ const xmlChar *
+ ndataid,
+ const xmlChar *
+ content);
+
+/*
+ * DTD notation definition
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterWriteDTDNotation(xmlTextWriterPtr writer,
+ const xmlChar * name,
+ const xmlChar * pubid,
+ const xmlChar * sysid);
+
+/*
+ * Indentation
+ */
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetIndent(xmlTextWriterPtr writer, int indent);
+ XMLPUBFUN int XMLCALL
+ xmlTextWriterSetIndentString(xmlTextWriterPtr writer,
+ const xmlChar * str);
+
+/*
+ * misc
+ */
+ XMLPUBFUN int XMLCALL xmlTextWriterFlush(xmlTextWriterPtr writer);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_WRITER_ENABLED */
+
+#endif /* __XML_XMLWRITER_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpath.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpath.h
new file mode 100644
index 0000000..be27346
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpath.h
@@ -0,0 +1,546 @@
+/*
+ * Summary: XML Path Language implementation
+ * Description: API for the XML Path Language implementation
+ *
+ * XML Path Language implementation
+ * XPath is a language for addressing parts of an XML document,
+ * designed to be used by both XSLT and XPointer
+ * http://www.w3.org/TR/xpath
+ *
+ * Implements
+ * W3C Recommendation 16 November 1999
+ * http://www.w3.org/TR/1999/REC-xpath-19991116
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_H__
+#define __XML_XPATH_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#include <libxml/xmlerror.h>
+#include <libxml/tree.h>
+#include <libxml/hash.h>
+#endif /* LIBXML_XPATH_ENABLED */
+
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+#ifdef __cplusplus
+extern "C" {
+#endif
+#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED */
+
+#ifdef LIBXML_XPATH_ENABLED
+
+typedef struct _xmlXPathContext xmlXPathContext;
+typedef xmlXPathContext *xmlXPathContextPtr;
+typedef struct _xmlXPathParserContext xmlXPathParserContext;
+typedef xmlXPathParserContext *xmlXPathParserContextPtr;
+
+/**
+ * The set of XPath error codes.
+ */
+
+typedef enum {
+ XPATH_EXPRESSION_OK = 0,
+ XPATH_NUMBER_ERROR,
+ XPATH_UNFINISHED_LITERAL_ERROR,
+ XPATH_START_LITERAL_ERROR,
+ XPATH_VARIABLE_REF_ERROR,
+ XPATH_UNDEF_VARIABLE_ERROR,
+ XPATH_INVALID_PREDICATE_ERROR,
+ XPATH_EXPR_ERROR,
+ XPATH_UNCLOSED_ERROR,
+ XPATH_UNKNOWN_FUNC_ERROR,
+ XPATH_INVALID_OPERAND,
+ XPATH_INVALID_TYPE,
+ XPATH_INVALID_ARITY,
+ XPATH_INVALID_CTXT_SIZE,
+ XPATH_INVALID_CTXT_POSITION,
+ XPATH_MEMORY_ERROR,
+ XPTR_SYNTAX_ERROR,
+ XPTR_RESOURCE_ERROR,
+ XPTR_SUB_RESOURCE_ERROR,
+ XPATH_UNDEF_PREFIX_ERROR,
+ XPATH_ENCODING_ERROR,
+ XPATH_INVALID_CHAR_ERROR,
+ XPATH_INVALID_CTXT
+} xmlXPathError;
+
+/*
+ * A node-set (an unordered collection of nodes without duplicates).
+ */
+typedef struct _xmlNodeSet xmlNodeSet;
+typedef xmlNodeSet *xmlNodeSetPtr;
+struct _xmlNodeSet {
+ int nodeNr; /* number of nodes in the set */
+ int nodeMax; /* size of the array as allocated */
+ xmlNodePtr *nodeTab; /* array of nodes in no particular order */
+ /* @@ with_ns to check wether namespace nodes should be looked at @@ */
+};
+
+/*
+ * An expression is evaluated to yield an object, which
+ * has one of the following four basic types:
+ * - node-set
+ * - boolean
+ * - number
+ * - string
+ *
+ * @@ XPointer will add more types !
+ */
+
+typedef enum {
+ XPATH_UNDEFINED = 0,
+ XPATH_NODESET = 1,
+ XPATH_BOOLEAN = 2,
+ XPATH_NUMBER = 3,
+ XPATH_STRING = 4,
+ XPATH_POINT = 5,
+ XPATH_RANGE = 6,
+ XPATH_LOCATIONSET = 7,
+ XPATH_USERS = 8,
+ XPATH_XSLT_TREE = 9 /* An XSLT value tree, non modifiable */
+} xmlXPathObjectType;
+
+typedef struct _xmlXPathObject xmlXPathObject;
+typedef xmlXPathObject *xmlXPathObjectPtr;
+struct _xmlXPathObject {
+ xmlXPathObjectType type;
+ xmlNodeSetPtr nodesetval;
+ int boolval;
+ double floatval;
+ xmlChar *stringval;
+ void *user;
+ int index;
+ void *user2;
+ int index2;
+};
+
+/**
+ * xmlXPathConvertFunc:
+ * @obj: an XPath object
+ * @type: the number of the target type
+ *
+ * A conversion function is associated to a type and used to cast
+ * the new type to primitive values.
+ *
+ * Returns -1 in case of error, 0 otherwise
+ */
+typedef int (*xmlXPathConvertFunc) (xmlXPathObjectPtr obj, int type);
+
+/*
+ * Extra type: a name and a conversion function.
+ */
+
+typedef struct _xmlXPathType xmlXPathType;
+typedef xmlXPathType *xmlXPathTypePtr;
+struct _xmlXPathType {
+ const xmlChar *name; /* the type name */
+ xmlXPathConvertFunc func; /* the conversion function */
+};
+
+/*
+ * Extra variable: a name and a value.
+ */
+
+typedef struct _xmlXPathVariable xmlXPathVariable;
+typedef xmlXPathVariable *xmlXPathVariablePtr;
+struct _xmlXPathVariable {
+ const xmlChar *name; /* the variable name */
+ xmlXPathObjectPtr value; /* the value */
+};
+
+/**
+ * xmlXPathEvalFunc:
+ * @ctxt: an XPath parser context
+ * @nargs: the number of arguments passed to the function
+ *
+ * An XPath evaluation function, the parameters are on the XPath context stack.
+ */
+
+typedef void (*xmlXPathEvalFunc)(xmlXPathParserContextPtr ctxt,
+ int nargs);
+
+/*
+ * Extra function: a name and a evaluation function.
+ */
+
+typedef struct _xmlXPathFunct xmlXPathFunct;
+typedef xmlXPathFunct *xmlXPathFuncPtr;
+struct _xmlXPathFunct {
+ const xmlChar *name; /* the function name */
+ xmlXPathEvalFunc func; /* the evaluation function */
+};
+
+/**
+ * xmlXPathAxisFunc:
+ * @ctxt: the XPath interpreter context
+ * @cur: the previous node being explored on that axis
+ *
+ * An axis traversal function. To traverse an axis, the engine calls
+ * the first time with cur == NULL and repeat until the function returns
+ * NULL indicating the end of the axis traversal.
+ *
+ * Returns the next node in that axis or NULL if at the end of the axis.
+ */
+
+typedef xmlXPathObjectPtr (*xmlXPathAxisFunc) (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr cur);
+
+/*
+ * Extra axis: a name and an axis function.
+ */
+
+typedef struct _xmlXPathAxis xmlXPathAxis;
+typedef xmlXPathAxis *xmlXPathAxisPtr;
+struct _xmlXPathAxis {
+ const xmlChar *name; /* the axis name */
+ xmlXPathAxisFunc func; /* the search function */
+};
+
+/**
+ * xmlXPathFunction:
+ * @ctxt: the XPath interprestation context
+ * @nargs: the number of arguments
+ *
+ * An XPath function.
+ * The arguments (if any) are popped out from the context stack
+ * and the result is pushed on the stack.
+ */
+
+typedef void (*xmlXPathFunction) (xmlXPathParserContextPtr ctxt, int nargs);
+
+/*
+ * Function and Variable Lookup.
+ */
+
+/**
+ * xmlXPathVariableLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the variable
+ * @ns_uri: the namespace name hosting this variable
+ *
+ * Prototype for callbacks used to plug variable lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath object value or NULL if not found.
+ */
+typedef xmlXPathObjectPtr (*xmlXPathVariableLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFuncLookupFunc:
+ * @ctxt: an XPath context
+ * @name: name of the function
+ * @ns_uri: the namespace name hosting this function
+ *
+ * Prototype for callbacks used to plug function lookup in the XPath
+ * engine.
+ *
+ * Returns the XPath function or NULL if not found.
+ */
+typedef xmlXPathFunction (*xmlXPathFuncLookupFunc) (void *ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+
+/**
+ * xmlXPathFlags:
+ * Flags for XPath engine compilation and runtime
+ */
+/**
+ * XML_XPATH_CHECKNS:
+ *
+ * check namespaces at compilation
+ */
+#define XML_XPATH_CHECKNS (1<<0)
+/**
+ * XML_XPATH_NOVAR:
+ *
+ * forbid variables in expression
+ */
+#define XML_XPATH_NOVAR (1<<1)
+
+/**
+ * xmlXPathContext:
+ *
+ * Expression evaluation occurs with respect to a context.
+ * he context consists of:
+ * - a node (the context node)
+ * - a node list (the context node list)
+ * - a set of variable bindings
+ * - a function library
+ * - the set of namespace declarations in scope for the expression
+ * Following the switch to hash tables, this need to be trimmed up at
+ * the next binary incompatible release.
+ * The node may be modified when the context is passed to libxml2
+ * for an XPath evaluation so you may need to initialize it again
+ * before the next call.
+ */
+
+struct _xmlXPathContext {
+ xmlDocPtr doc; /* The current document */
+ xmlNodePtr node; /* The current node */
+
+ int nb_variables_unused; /* unused (hash table) */
+ int max_variables_unused; /* unused (hash table) */
+ xmlHashTablePtr varHash; /* Hash table of defined variables */
+
+ int nb_types; /* number of defined types */
+ int max_types; /* max number of types */
+ xmlXPathTypePtr types; /* Array of defined types */
+
+ int nb_funcs_unused; /* unused (hash table) */
+ int max_funcs_unused; /* unused (hash table) */
+ xmlHashTablePtr funcHash; /* Hash table of defined funcs */
+
+ int nb_axis; /* number of defined axis */
+ int max_axis; /* max number of axis */
+ xmlXPathAxisPtr axis; /* Array of defined axis */
+
+ /* the namespace nodes of the context node */
+ xmlNsPtr *namespaces; /* Array of namespaces */
+ int nsNr; /* number of namespace in scope */
+ void *user; /* function to free */
+
+ /* extra variables */
+ int contextSize; /* the context size */
+ int proximityPosition; /* the proximity position */
+
+ /* extra stuff for XPointer */
+ int xptr; /* is this an XPointer context? */
+ xmlNodePtr here; /* for here() */
+ xmlNodePtr origin; /* for origin() */
+
+ /* the set of namespace declarations in scope for the expression */
+ xmlHashTablePtr nsHash; /* The namespaces hash table */
+ xmlXPathVariableLookupFunc varLookupFunc;/* variable lookup func */
+ void *varLookupData; /* variable lookup data */
+
+ /* Possibility to link in an extra item */
+ void *extra; /* needed for XSLT */
+
+ /* The function name and URI when calling a function */
+ const xmlChar *function;
+ const xmlChar *functionURI;
+
+ /* function lookup function and data */
+ xmlXPathFuncLookupFunc funcLookupFunc;/* function lookup func */
+ void *funcLookupData; /* function lookup data */
+
+ /* temporary namespace lists kept for walking the namespace axis */
+ xmlNsPtr *tmpNsList; /* Array of namespaces */
+ int tmpNsNr; /* number of namespaces in scope */
+
+ /* error reporting mechanism */
+ void *userData; /* user specific data block */
+ xmlStructuredErrorFunc error; /* the callback in case of errors */
+ xmlError lastError; /* the last error */
+ xmlNodePtr debugNode; /* the source node XSLT */
+
+ /* dictionary */
+ xmlDictPtr dict; /* dictionary if any */
+
+ int flags; /* flags to control compilation */
+
+ /* Cache for reusal of XPath objects */
+ void *cache;
+};
+
+/*
+ * The structure of a compiled expression form is not public.
+ */
+
+typedef struct _xmlXPathCompExpr xmlXPathCompExpr;
+typedef xmlXPathCompExpr *xmlXPathCompExprPtr;
+
+/**
+ * xmlXPathParserContext:
+ *
+ * An XPath parser context. It contains pure parsing informations,
+ * an xmlXPathContext, and the stack of objects.
+ */
+struct _xmlXPathParserContext {
+ const xmlChar *cur; /* the current char being parsed */
+ const xmlChar *base; /* the full expression */
+
+ int error; /* error code */
+
+ xmlXPathContextPtr context; /* the evaluation context */
+ xmlXPathObjectPtr value; /* the current value */
+ int valueNr; /* number of values stacked */
+ int valueMax; /* max number of values stacked */
+ xmlXPathObjectPtr *valueTab; /* stack of values */
+
+ xmlXPathCompExprPtr comp; /* the precompiled expression */
+ int xptr; /* it this an XPointer expression */
+ xmlNodePtr ancestor; /* used for walking preceding axis */
+};
+
+/************************************************************************
+ * *
+ * Public API *
+ * *
+ ************************************************************************/
+
+/**
+ * Objects and Nodesets handling
+ */
+
+XMLPUBVAR double xmlXPathNAN;
+XMLPUBVAR double xmlXPathPINF;
+XMLPUBVAR double xmlXPathNINF;
+
+/* These macros may later turn into functions */
+/**
+ * xmlXPathNodeSetGetLength:
+ * @ns: a node-set
+ *
+ * Implement a functionality similar to the DOM NodeList.length.
+ *
+ * Returns the number of nodes in the node-set.
+ */
+#define xmlXPathNodeSetGetLength(ns) ((ns) ? (ns)->nodeNr : 0)
+/**
+ * xmlXPathNodeSetItem:
+ * @ns: a node-set
+ * @index: index of a node in the set
+ *
+ * Implements a functionality similar to the DOM NodeList.item().
+ *
+ * Returns the xmlNodePtr at the given @index in @ns or NULL if
+ * @index is out of range (0 to length-1)
+ */
+#define xmlXPathNodeSetItem(ns, index) \
+ ((((ns) != NULL) && \
+ ((index) >= 0) && ((index) < (ns)->nodeNr)) ? \
+ (ns)->nodeTab[(index)] \
+ : NULL)
+/**
+ * xmlXPathNodeSetIsEmpty:
+ * @ns: a node-set
+ *
+ * Checks whether @ns is empty or not.
+ *
+ * Returns %TRUE if @ns is an empty node-set.
+ */
+#define xmlXPathNodeSetIsEmpty(ns) \
+ (((ns) == NULL) || ((ns)->nodeNr == 0) || ((ns)->nodeTab == NULL))
+
+
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeObject (xmlXPathObjectPtr obj);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeSetCreate (xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeNodeSetList (xmlXPathObjectPtr obj);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeNodeSet (xmlNodeSetPtr obj);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathObjectCopy (xmlXPathObjectPtr val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCmpNodes (xmlNodePtr node1,
+ xmlNodePtr node2);
+/**
+ * Conversion functions to basic types.
+ */
+XMLPUBFUN int XMLCALL
+ xmlXPathCastNumberToBoolean (double val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastStringToBoolean (const xmlChar * val);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastNodeSetToBoolean(xmlNodeSetPtr ns);
+XMLPUBFUN int XMLCALL
+ xmlXPathCastToBoolean (xmlXPathObjectPtr val);
+
+XMLPUBFUN double XMLCALL
+ xmlXPathCastBooleanToNumber (int val);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastStringToNumber (const xmlChar * val);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastNodeToNumber (xmlNodePtr node);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastNodeSetToNumber (xmlNodeSetPtr ns);
+XMLPUBFUN double XMLCALL
+ xmlXPathCastToNumber (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastBooleanToString (int val);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNumberToString (double val);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNodeToString (xmlNodePtr node);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastNodeSetToString (xmlNodeSetPtr ns);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathCastToString (xmlXPathObjectPtr val);
+
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertBoolean (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertNumber (xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathConvertString (xmlXPathObjectPtr val);
+
+/**
+ * Context handling.
+ */
+XMLPUBFUN xmlXPathContextPtr XMLCALL
+ xmlXPathNewContext (xmlDocPtr doc);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeContext (xmlXPathContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXPathContextSetCache(xmlXPathContextPtr ctxt,
+ int active,
+ int value,
+ int options);
+/**
+ * Evaluation functions.
+ */
+XMLPUBFUN long XMLCALL
+ xmlXPathOrderDocElems (xmlDocPtr doc);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathEvalExpression (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ xmlXPathEvalPredicate (xmlXPathContextPtr ctxt,
+ xmlXPathObjectPtr res);
+/**
+ * Separate compilation/evaluation entry points.
+ */
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+ xmlXPathCompile (const xmlChar *str);
+XMLPUBFUN xmlXPathCompExprPtr XMLCALL
+ xmlXPathCtxtCompile (xmlXPathContextPtr ctxt,
+ const xmlChar *str);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathCompiledEval (xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN int XMLCALL
+ xmlXPathCompiledEvalToBoolean(xmlXPathCompExprPtr comp,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeCompExpr (xmlXPathCompExprPtr comp);
+#endif /* LIBXML_XPATH_ENABLED */
+#if defined(LIBXML_XPATH_ENABLED) || defined(LIBXML_SCHEMAS_ENABLED)
+XMLPUBFUN void XMLCALL
+ xmlXPathInit (void);
+XMLPUBFUN int XMLCALL
+ xmlXPathIsNaN (double val);
+XMLPUBFUN int XMLCALL
+ xmlXPathIsInf (double val);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED or LIBXML_SCHEMAS_ENABLED*/
+#endif /* ! __XML_XPATH_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpathInternals.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpathInternals.h
new file mode 100644
index 0000000..8532757
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpathInternals.h
@@ -0,0 +1,630 @@
+/*
+ * Summary: internal interfaces for XML Path Language implementation
+ * Description: internal interfaces for XML Path Language implementation
+ * used to build new modules on top of XPath like XPointer and
+ * XSLT
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPATH_INTERNALS_H__
+#define __XML_XPATH_INTERNALS_H__
+
+#include <libxml/xmlversion.h>
+#include <libxml/xpath.h>
+
+#ifdef LIBXML_XPATH_ENABLED
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************************************
+ * *
+ * Helpers *
+ * *
+ ************************************************************************/
+
+/*
+ * Many of these macros may later turn into functions. They
+ * shouldn't be used in #ifdef's preprocessor instructions.
+ */
+/**
+ * xmlXPathSetError:
+ * @ctxt: an XPath parser context
+ * @err: an xmlXPathError code
+ *
+ * Raises an error.
+ */
+#define xmlXPathSetError(ctxt, err) \
+ { xmlXPatherror((ctxt), __FILE__, __LINE__, (err)); \
+ if ((ctxt) != NULL) (ctxt)->error = (err); }
+
+/**
+ * xmlXPathSetArityError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_ARITY error.
+ */
+#define xmlXPathSetArityError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_ARITY)
+
+/**
+ * xmlXPathSetTypeError:
+ * @ctxt: an XPath parser context
+ *
+ * Raises an XPATH_INVALID_TYPE error.
+ */
+#define xmlXPathSetTypeError(ctxt) \
+ xmlXPathSetError((ctxt), XPATH_INVALID_TYPE)
+
+/**
+ * xmlXPathGetError:
+ * @ctxt: an XPath parser context
+ *
+ * Get the error code of an XPath context.
+ *
+ * Returns the context error.
+ */
+#define xmlXPathGetError(ctxt) ((ctxt)->error)
+
+/**
+ * xmlXPathCheckError:
+ * @ctxt: an XPath parser context
+ *
+ * Check if an XPath error was raised.
+ *
+ * Returns true if an error has been raised, false otherwise.
+ */
+#define xmlXPathCheckError(ctxt) ((ctxt)->error != XPATH_EXPRESSION_OK)
+
+/**
+ * xmlXPathGetDocument:
+ * @ctxt: an XPath parser context
+ *
+ * Get the document of an XPath context.
+ *
+ * Returns the context document.
+ */
+#define xmlXPathGetDocument(ctxt) ((ctxt)->context->doc)
+
+/**
+ * xmlXPathGetContextNode:
+ * @ctxt: an XPath parser context
+ *
+ * Get the context node of an XPath context.
+ *
+ * Returns the context node.
+ */
+#define xmlXPathGetContextNode(ctxt) ((ctxt)->context->node)
+
+XMLPUBFUN int XMLCALL
+ xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN double XMLCALL
+ xmlXPathPopNumber (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathPopString (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathPopNodeSet (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void * XMLCALL
+ xmlXPathPopExternal (xmlXPathParserContextPtr ctxt);
+
+/**
+ * xmlXPathReturnBoolean:
+ * @ctxt: an XPath parser context
+ * @val: a boolean
+ *
+ * Pushes the boolean @val on the context stack.
+ */
+#define xmlXPathReturnBoolean(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewBoolean(val))
+
+/**
+ * xmlXPathReturnTrue:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes true on the context stack.
+ */
+#define xmlXPathReturnTrue(ctxt) xmlXPathReturnBoolean((ctxt), 1)
+
+/**
+ * xmlXPathReturnFalse:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes false on the context stack.
+ */
+#define xmlXPathReturnFalse(ctxt) xmlXPathReturnBoolean((ctxt), 0)
+
+/**
+ * xmlXPathReturnNumber:
+ * @ctxt: an XPath parser context
+ * @val: a double
+ *
+ * Pushes the double @val on the context stack.
+ */
+#define xmlXPathReturnNumber(ctxt, val) \
+ valuePush((ctxt), xmlXPathNewFloat(val))
+
+/**
+ * xmlXPathReturnString:
+ * @ctxt: an XPath parser context
+ * @str: a string
+ *
+ * Pushes the string @str on the context stack.
+ */
+#define xmlXPathReturnString(ctxt, str) \
+ valuePush((ctxt), xmlXPathWrapString(str))
+
+/**
+ * xmlXPathReturnEmptyString:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty string on the stack.
+ */
+#define xmlXPathReturnEmptyString(ctxt) \
+ valuePush((ctxt), xmlXPathNewCString(""))
+
+/**
+ * xmlXPathReturnNodeSet:
+ * @ctxt: an XPath parser context
+ * @ns: a node-set
+ *
+ * Pushes the node-set @ns on the context stack.
+ */
+#define xmlXPathReturnNodeSet(ctxt, ns) \
+ valuePush((ctxt), xmlXPathWrapNodeSet(ns))
+
+/**
+ * xmlXPathReturnEmptyNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Pushes an empty node-set on the context stack.
+ */
+#define xmlXPathReturnEmptyNodeSet(ctxt) \
+ valuePush((ctxt), xmlXPathNewNodeSet(NULL))
+
+/**
+ * xmlXPathReturnExternal:
+ * @ctxt: an XPath parser context
+ * @val: user data
+ *
+ * Pushes user data on the context stack.
+ */
+#define xmlXPathReturnExternal(ctxt, val) \
+ valuePush((ctxt), xmlXPathWrapExternal(val))
+
+/**
+ * xmlXPathStackIsNodeSet:
+ * @ctxt: an XPath parser context
+ *
+ * Check if the current value on the XPath stack is a node set or
+ * an XSLT value tree.
+ *
+ * Returns true if the current object on the stack is a node-set.
+ */
+#define xmlXPathStackIsNodeSet(ctxt) \
+ (((ctxt)->value != NULL) \
+ && (((ctxt)->value->type == XPATH_NODESET) \
+ || ((ctxt)->value->type == XPATH_XSLT_TREE)))
+
+/**
+ * xmlXPathStackIsExternal:
+ * @ctxt: an XPath parser context
+ *
+ * Checks if the current value on the XPath stack is an external
+ * object.
+ *
+ * Returns true if the current object on the stack is an external
+ * object.
+ */
+#define xmlXPathStackIsExternal(ctxt) \
+ ((ctxt->value != NULL) && (ctxt->value->type == XPATH_USERS))
+
+/**
+ * xmlXPathEmptyNodeSet:
+ * @ns: a node-set
+ *
+ * Empties a node-set.
+ */
+#define xmlXPathEmptyNodeSet(ns) \
+ { while ((ns)->nodeNr > 0) (ns)->nodeTab[(ns)->nodeNr--] = NULL; }
+
+/**
+ * CHECK_ERROR:
+ *
+ * Macro to return from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return
+
+/**
+ * CHECK_ERROR0:
+ *
+ * Macro to return 0 from the function if an XPath error was detected.
+ */
+#define CHECK_ERROR0 \
+ if (ctxt->error != XPATH_EXPRESSION_OK) return(0)
+
+/**
+ * XP_ERROR:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return.
+ */
+#define XP_ERROR(X) \
+ { xmlXPathErr(ctxt, X); return; }
+
+/**
+ * XP_ERROR0:
+ * @X: the error code
+ *
+ * Macro to raise an XPath error and return 0.
+ */
+#define XP_ERROR0(X) \
+ { xmlXPathErr(ctxt, X); return(0); }
+
+/**
+ * CHECK_TYPE:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type.
+ */
+#define CHECK_TYPE(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_TYPE0:
+ * @typeval: the XPath type
+ *
+ * Macro to check that the value on top of the XPath stack is of a given
+ * type. Return(0) in case of failure
+ */
+#define CHECK_TYPE0(typeval) \
+ if ((ctxt->value == NULL) || (ctxt->value->type != typeval)) \
+ XP_ERROR0(XPATH_INVALID_TYPE)
+
+/**
+ * CHECK_ARITY:
+ * @x: the number of expected args
+ *
+ * Macro to check that the number of args passed to an XPath function matches.
+ */
+#define CHECK_ARITY(x) \
+ if (ctxt == NULL) return; \
+ if (nargs != (x)) \
+ XP_ERROR(XPATH_INVALID_ARITY);
+
+/**
+ * CAST_TO_STRING:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a string.
+ */
+#define CAST_TO_STRING \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_STRING)) \
+ xmlXPathStringFunction(ctxt, 1);
+
+/**
+ * CAST_TO_NUMBER:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a number.
+ */
+#define CAST_TO_NUMBER \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_NUMBER)) \
+ xmlXPathNumberFunction(ctxt, 1);
+
+/**
+ * CAST_TO_BOOLEAN:
+ *
+ * Macro to try to cast the value on the top of the XPath stack to a boolean.
+ */
+#define CAST_TO_BOOLEAN \
+ if ((ctxt->value != NULL) && (ctxt->value->type != XPATH_BOOLEAN)) \
+ xmlXPathBooleanFunction(ctxt, 1);
+
+/*
+ * Variable Lookup forwarding.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterVariableLookup (xmlXPathContextPtr ctxt,
+ xmlXPathVariableLookupFunc f,
+ void *data);
+
+/*
+ * Function Lookup forwarding.
+ */
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterFuncLookup (xmlXPathContextPtr ctxt,
+ xmlXPathFuncLookupFunc f,
+ void *funcCtxt);
+
+/*
+ * Error reporting.
+ */
+XMLPUBFUN void XMLCALL
+ xmlXPatherror (xmlXPathParserContextPtr ctxt,
+ const char *file,
+ int line,
+ int no);
+
+XMLPUBFUN void XMLCALL
+ xmlXPathErr (xmlXPathParserContextPtr ctxt,
+ int error);
+
+#ifdef LIBXML_DEBUG_ENABLED
+XMLPUBFUN void XMLCALL
+ xmlXPathDebugDumpObject (FILE *output,
+ xmlXPathObjectPtr cur,
+ int depth);
+XMLPUBFUN void XMLCALL
+ xmlXPathDebugDumpCompExpr(FILE *output,
+ xmlXPathCompExprPtr comp,
+ int depth);
+#endif
+/**
+ * NodeSet handling.
+ */
+XMLPUBFUN int XMLCALL
+ xmlXPathNodeSetContains (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDifference (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathIntersection (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDistinctSorted (xmlNodeSetPtr nodes);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathDistinct (xmlNodeSetPtr nodes);
+
+XMLPUBFUN int XMLCALL
+ xmlXPathHasSameNodes (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeLeadingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathLeadingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeLeading (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathLeading (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeTrailingSorted (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathTrailingSorted (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeTrailing (xmlNodeSetPtr nodes,
+ xmlNodePtr node);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathTrailing (xmlNodeSetPtr nodes1,
+ xmlNodeSetPtr nodes2);
+
+
+/**
+ * Extending a context.
+ */
+
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterNs (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix,
+ const xmlChar *ns_uri);
+XMLPUBFUN const xmlChar * XMLCALL
+ xmlXPathNsLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *prefix);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredNsCleanup (xmlXPathContextPtr ctxt);
+
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterFunc (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathFunction f);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterFuncNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathFunction f);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterVariable (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ xmlXPathObjectPtr value);
+XMLPUBFUN int XMLCALL
+ xmlXPathRegisterVariableNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri,
+ xmlXPathObjectPtr value);
+XMLPUBFUN xmlXPathFunction XMLCALL
+ xmlXPathFunctionLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathFunction XMLCALL
+ xmlXPathFunctionLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredFuncsCleanup (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathVariableLookup (xmlXPathContextPtr ctxt,
+ const xmlChar *name);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathVariableLookupNS (xmlXPathContextPtr ctxt,
+ const xmlChar *name,
+ const xmlChar *ns_uri);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisteredVariablesCleanup(xmlXPathContextPtr ctxt);
+
+/**
+ * Utilities to extend XPath.
+ */
+XMLPUBFUN xmlXPathParserContextPtr XMLCALL
+ xmlXPathNewParserContext (const xmlChar *str,
+ xmlXPathContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathFreeParserContext (xmlXPathParserContextPtr ctxt);
+
+/* TODO: remap to xmlXPathValuePop and Push. */
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ valuePop (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL
+ valuePush (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr value);
+
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewString (const xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewCString (const char *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapString (xmlChar *val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapCString (char * val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewFloat (double val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewBoolean (int val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewNodeSet (xmlNodePtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewValueTree (xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetAdd (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetAddUnique (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetAddNs (xmlNodeSetPtr cur,
+ xmlNodePtr node,
+ xmlNsPtr ns);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetSort (xmlNodeSetPtr set);
+
+XMLPUBFUN void XMLCALL
+ xmlXPathRoot (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL
+ xmlXPathEvalExpr (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathParseName (xmlXPathParserContextPtr ctxt);
+XMLPUBFUN xmlChar * XMLCALL
+ xmlXPathParseNCName (xmlXPathParserContextPtr ctxt);
+
+/*
+ * Existing functions.
+ */
+XMLPUBFUN double XMLCALL
+ xmlXPathStringEvalNumber (const xmlChar *str);
+XMLPUBFUN int XMLCALL
+ xmlXPathEvaluatePredicateResult (xmlXPathParserContextPtr ctxt,
+ xmlXPathObjectPtr res);
+XMLPUBFUN void XMLCALL
+ xmlXPathRegisterAllFunctions (xmlXPathContextPtr ctxt);
+XMLPUBFUN xmlNodeSetPtr XMLCALL
+ xmlXPathNodeSetMerge (xmlNodeSetPtr val1,
+ xmlNodeSetPtr val2);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetDel (xmlNodeSetPtr cur,
+ xmlNodePtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPathNodeSetRemove (xmlNodeSetPtr cur,
+ int val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathNewNodeSetList (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapNodeSet (xmlNodeSetPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPathWrapExternal (void *val);
+
+XMLPUBFUN int XMLCALL xmlXPathEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL xmlXPathNotEqualValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN int XMLCALL xmlXPathCompareValues(xmlXPathParserContextPtr ctxt, int inf, int strict);
+XMLPUBFUN void XMLCALL xmlXPathValueFlipSign(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathAddValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathSubValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathMultValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathDivValues(xmlXPathParserContextPtr ctxt);
+XMLPUBFUN void XMLCALL xmlXPathModValues(xmlXPathParserContextPtr ctxt);
+
+XMLPUBFUN int XMLCALL xmlXPathIsNodeType(const xmlChar *name);
+
+/*
+ * Some of the axis navigation routines.
+ */
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextChild(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendant(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextDescendantOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextParent(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestorOrSelf(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextFollowing(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextNamespace(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAttribute(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPreceding(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextAncestor(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+XMLPUBFUN xmlNodePtr XMLCALL xmlXPathNextPrecedingSibling(xmlXPathParserContextPtr ctxt,
+ xmlNodePtr cur);
+/*
+ * The official core of XPath functions.
+ */
+XMLPUBFUN void XMLCALL xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathPositionFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathCountFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathIdFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathLocalNameFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNamespaceURIFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStringLengthFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathConcatFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathContainsFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathStartsWithFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringBeforeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSubstringAfterFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNormalizeFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathTranslateFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNotFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathTrueFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathFalseFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathLangFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathNumberFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathSumFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathFloorFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathCeilingFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathRoundFunction(xmlXPathParserContextPtr ctxt, int nargs);
+XMLPUBFUN void XMLCALL xmlXPathBooleanFunction(xmlXPathParserContextPtr ctxt, int nargs);
+
+/**
+ * Really internal functions
+ */
+XMLPUBFUN void XMLCALL xmlXPathNodeSetFreeNs(xmlNsPtr ns);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPATH_ENABLED */
+#endif /* ! __XML_XPATH_INTERNALS_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpointer.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpointer.h
new file mode 100644
index 0000000..32b11b0
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/libxml/xpointer.h
@@ -0,0 +1,114 @@
+/*
+ * Summary: API to handle XML Pointers
+ * Description: API to handle XML Pointers
+ * Base implementation was made accordingly to
+ * W3C Candidate Recommendation 7 June 2000
+ * http://www.w3.org/TR/2000/CR-xptr-20000607
+ *
+ * Added support for the element() scheme described in:
+ * W3C Proposed Recommendation 13 November 2002
+ * http://www.w3.org/TR/2002/PR-xptr-element-20021113/
+ *
+ * Copy: See Copyright for the status of this software.
+ *
+ * Author: Daniel Veillard
+ */
+
+#ifndef __XML_XPTR_H__
+#define __XML_XPTR_H__
+
+#include <libxml/xmlversion.h>
+
+#ifdef LIBXML_XPTR_ENABLED
+
+#include <libxml/tree.h>
+#include <libxml/xpath.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * A Location Set
+ */
+typedef struct _xmlLocationSet xmlLocationSet;
+typedef xmlLocationSet *xmlLocationSetPtr;
+struct _xmlLocationSet {
+ int locNr; /* number of locations in the set */
+ int locMax; /* size of the array as allocated */
+ xmlXPathObjectPtr *locTab;/* array of locations */
+};
+
+/*
+ * Handling of location sets.
+ */
+
+XMLPUBFUN xmlLocationSetPtr XMLCALL
+ xmlXPtrLocationSetCreate (xmlXPathObjectPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrFreeLocationSet (xmlLocationSetPtr obj);
+XMLPUBFUN xmlLocationSetPtr XMLCALL
+ xmlXPtrLocationSetMerge (xmlLocationSetPtr val1,
+ xmlLocationSetPtr val2);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRange (xmlNodePtr start,
+ int startindex,
+ xmlNodePtr end,
+ int endindex);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangePoints (xmlXPathObjectPtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodePoint (xmlNodePtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangePointNode (xmlXPathObjectPtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodes (xmlNodePtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewLocationSetNodes (xmlNodePtr start,
+ xmlNodePtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewLocationSetNodeSet(xmlNodeSetPtr set);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewRangeNodeObject (xmlNodePtr start,
+ xmlXPathObjectPtr end);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrNewCollapsedRange (xmlNodePtr start);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetAdd (xmlLocationSetPtr cur,
+ xmlXPathObjectPtr val);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrWrapLocationSet (xmlLocationSetPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetDel (xmlLocationSetPtr cur,
+ xmlXPathObjectPtr val);
+XMLPUBFUN void XMLCALL
+ xmlXPtrLocationSetRemove (xmlLocationSetPtr cur,
+ int val);
+
+/*
+ * Functions.
+ */
+XMLPUBFUN xmlXPathContextPtr XMLCALL
+ xmlXPtrNewContext (xmlDocPtr doc,
+ xmlNodePtr here,
+ xmlNodePtr origin);
+XMLPUBFUN xmlXPathObjectPtr XMLCALL
+ xmlXPtrEval (const xmlChar *str,
+ xmlXPathContextPtr ctx);
+XMLPUBFUN void XMLCALL
+ xmlXPtrRangeToFunction (xmlXPathParserContextPtr ctxt,
+ int nargs);
+XMLPUBFUN xmlNodePtr XMLCALL
+ xmlXPtrBuildNodeList (xmlXPathObjectPtr obj);
+XMLPUBFUN void XMLCALL
+ xmlXPtrEvalRangePredicate (xmlXPathParserContextPtr ctxt);
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* LIBXML_XPTR_ENABLED */
+#endif /* __XML_XPTR_H__ */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/mixer_ctrl.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/mixer_ctrl.h
new file mode 100644
index 0000000..d3f449f
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/mixer_ctrl.h
@@ -0,0 +1,51 @@
+/*
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2016. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+
+Auther: Garlic Tseng <garlic.tseng@mediatek.com>
+*/
+
+#ifndef _MIXER_CTRL_H_
+#define _MIXER_CTRL_H_
+
+int set_mixer_ctrl_value_string(const char *mixer_ctrl_name,
+ const char *option_name);
+int set_mixer_ctrl_value_int(const char *mixer_ctrl_name,
+ const int option_int);
+int get_mixer_ctrl_value_int(const char *mixer_ctrl_name);
+char *get_mixer_ctrl_value_string(const char *mixer_ctrl_name,
+ char *returned_value_name,
+ int value_name_size);
+
+
+#endif //_MIXER_CTRL_H_
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utarray.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utarray.h
new file mode 100644
index 0000000..75e9dc5
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utarray.h
@@ -0,0 +1,232 @@
+/*
+Copyright (c) 2008-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* a dynamic array implementation using macros
+ */
+#ifndef UTARRAY_H
+#define UTARRAY_H
+
+#define UTARRAY_VERSION 1.9.9
+
+#ifdef __GNUC__
+#define _UNUSED_ __attribute__ ((__unused__))
+#else
+#define _UNUSED_
+#endif
+
+#include <stddef.h> /* size_t */
+#include <string.h> /* memset, etc */
+#include <stdlib.h> /* exit */
+
+#define oom() exit(-1)
+
+typedef void (ctor_f)(void *dst, const void *src);
+typedef void (dtor_f)(void *elt);
+typedef void (init_f)(void *elt);
+typedef struct {
+ size_t sz;
+ init_f *init;
+ ctor_f *copy;
+ dtor_f *dtor;
+} UT_icd;
+
+typedef struct {
+ unsigned i,n;/* i: index of next available slot, n: num slots */
+ UT_icd icd; /* initializer, copy and destructor functions */
+ char *d; /* n slots of size icd->sz*/
+} UT_array;
+
+#define utarray_init(a,_icd) do { \
+ memset(a,0,sizeof(UT_array)); \
+ (a)->icd=*_icd; \
+} while(0)
+
+#define utarray_done(a) do { \
+ if ((a)->n) { \
+ if ((a)->icd.dtor) { \
+ size_t _ut_i; \
+ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
+ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \
+ } \
+ } \
+ free((a)->d); \
+ } \
+ (a)->n=0; \
+} while(0)
+
+#define utarray_new(a,_icd) do { \
+ a=(UT_array*)malloc(sizeof(UT_array)); \
+ utarray_init(a,_icd); \
+} while(0)
+
+#define utarray_free(a) do { \
+ utarray_done(a); \
+ free(a); \
+} while(0)
+
+#define utarray_reserve(a,by) do { \
+ if (((a)->i+by) > ((a)->n)) { \
+ while(((a)->i+by) > ((a)->n)) { (a)->n = ((a)->n ? (2*(a)->n) : 8); } \
+ if ( ((a)->d=(char*)realloc((a)->d, (a)->n*(a)->icd.sz)) == NULL) oom(); \
+ } \
+} while(0)
+
+#define utarray_push_back(a,p) do { \
+ utarray_reserve(a,1); \
+ if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,(a)->i++), p); } \
+ else { memcpy(_utarray_eltptr(a,(a)->i++), p, (a)->icd.sz); }; \
+} while(0)
+
+#define utarray_pop_back(a) do { \
+ if ((a)->icd.dtor) { (a)->icd.dtor( _utarray_eltptr(a,--((a)->i))); } \
+ else { (a)->i--; } \
+} while(0)
+
+#define utarray_extend_back(a) do { \
+ utarray_reserve(a,1); \
+ if ((a)->icd.init) { (a)->icd.init(_utarray_eltptr(a,(a)->i)); } \
+ else { memset(_utarray_eltptr(a,(a)->i),0,(a)->icd.sz); } \
+ (a)->i++; \
+} while(0)
+
+#define utarray_len(a) ((a)->i)
+
+#define utarray_eltptr(a,j) (((j) < (a)->i) ? _utarray_eltptr(a,j) : NULL)
+#define _utarray_eltptr(a,j) ((char*)((a)->d + ((a)->icd.sz*(j) )))
+
+#define utarray_insert(a,p,j) do { \
+ if (j > (a)->i) utarray_resize(a,j); \
+ utarray_reserve(a,1); \
+ if ((j) < (a)->i) { \
+ memmove( _utarray_eltptr(a,(j)+1), _utarray_eltptr(a,j), \
+ ((a)->i - (j))*((a)->icd.sz)); \
+ } \
+ if ((a)->icd.copy) { (a)->icd.copy( _utarray_eltptr(a,j), p); } \
+ else { memcpy(_utarray_eltptr(a,j), p, (a)->icd.sz); }; \
+ (a)->i++; \
+} while(0)
+
+#define utarray_inserta(a,w,j) do { \
+ if (utarray_len(w) == 0) break; \
+ if (j > (a)->i) utarray_resize(a,j); \
+ utarray_reserve(a,utarray_len(w)); \
+ if ((j) < (a)->i) { \
+ memmove(_utarray_eltptr(a,(j)+utarray_len(w)), \
+ _utarray_eltptr(a,j), \
+ ((a)->i - (j))*((a)->icd.sz)); \
+ } \
+ if ((a)->icd.copy) { \
+ size_t _ut_i; \
+ for(_ut_i=0;_ut_i<(w)->i;_ut_i++) { \
+ (a)->icd.copy(_utarray_eltptr(a,j+_ut_i), _utarray_eltptr(w,_ut_i)); \
+ } \
+ } else { \
+ memcpy(_utarray_eltptr(a,j), _utarray_eltptr(w,0), \
+ utarray_len(w)*((a)->icd.sz)); \
+ } \
+ (a)->i += utarray_len(w); \
+} while(0)
+
+#define utarray_resize(dst,num) do { \
+ size_t _ut_i; \
+ if (dst->i > (size_t)(num)) { \
+ if ((dst)->icd.dtor) { \
+ for(_ut_i=num; _ut_i < dst->i; _ut_i++) { \
+ (dst)->icd.dtor(utarray_eltptr(dst,_ut_i)); \
+ } \
+ } \
+ } else if (dst->i < (size_t)(num)) { \
+ utarray_reserve(dst,num-dst->i); \
+ if ((dst)->icd.init) { \
+ for(_ut_i=dst->i; _ut_i < num; _ut_i++) { \
+ (dst)->icd.init(utarray_eltptr(dst,_ut_i)); \
+ } \
+ } else { \
+ memset(_utarray_eltptr(dst,dst->i),0,(dst)->icd.sz*(num-dst->i)); \
+ } \
+ } \
+ dst->i = num; \
+} while(0)
+
+#define utarray_concat(dst,src) do { \
+ utarray_inserta((dst),(src),utarray_len(dst)); \
+} while(0)
+
+#define utarray_erase(a,pos,len) do { \
+ if ((a)->icd.dtor) { \
+ size_t _ut_i; \
+ for(_ut_i=0; _ut_i < len; _ut_i++) { \
+ (a)->icd.dtor(utarray_eltptr((a),pos+_ut_i)); \
+ } \
+ } \
+ if ((a)->i > (pos+len)) { \
+ memmove( _utarray_eltptr((a),pos), _utarray_eltptr((a),pos+len), \
+ (((a)->i)-(pos+len))*((a)->icd.sz)); \
+ } \
+ (a)->i -= (len); \
+} while(0)
+
+#define utarray_renew(a,u) do { \
+ if (a) utarray_clear(a); \
+ else utarray_new((a),(u)); \
+} while(0)
+
+#define utarray_clear(a) do { \
+ if ((a)->i > 0) { \
+ if ((a)->icd.dtor) { \
+ size_t _ut_i; \
+ for(_ut_i=0; _ut_i < (a)->i; _ut_i++) { \
+ (a)->icd.dtor(utarray_eltptr(a,_ut_i)); \
+ } \
+ } \
+ (a)->i = 0; \
+ } \
+} while(0)
+
+#define utarray_sort(a,cmp) do { \
+ qsort((a)->d, (a)->i, (a)->icd.sz, cmp); \
+} while(0)
+
+#define utarray_find(a,v,cmp) bsearch((v),(a)->d,(a)->i,(a)->icd.sz,cmp)
+
+#define utarray_front(a) (((a)->i) ? (_utarray_eltptr(a,0)) : NULL)
+#define utarray_next(a,e) (((e)==NULL) ? utarray_front(a) : ((((a)->i) > (utarray_eltidx(a,e)+1)) ? _utarray_eltptr(a,utarray_eltidx(a,e)+1) : NULL))
+#define utarray_prev(a,e) (((e)==NULL) ? utarray_back(a) : ((utarray_eltidx(a,e) > 0) ? _utarray_eltptr(a,utarray_eltidx(a,e)-1) : NULL))
+#define utarray_back(a) (((a)->i) ? (_utarray_eltptr(a,(a)->i-1)) : NULL)
+#define utarray_eltidx(a,e) (((char*)(e) >= (char*)((a)->d)) ? (((char*)(e) - (char*)((a)->d))/(size_t)(a)->icd.sz) : -1)
+
+/* last we pre-define a few icd for common utarrays of ints and strings */
+static void utarray_str_cpy(void *dst, const void *src) {
+ char **_src = (char**)src, **_dst = (char**)dst;
+ *_dst = (*_src == NULL) ? NULL : strdup(*_src);
+}
+static void utarray_str_dtor(void *elt) {
+ char **eltc = (char**)elt;
+ if (*eltc) free(*eltc);
+}
+static const UT_icd ut_str_icd _UNUSED_ = {sizeof(char*),NULL,utarray_str_cpy,utarray_str_dtor};
+static const UT_icd ut_int_icd _UNUSED_ = {sizeof(int),NULL,NULL,NULL};
+static const UT_icd ut_ptr_icd _UNUSED_ = {sizeof(void*),NULL,NULL,NULL};
+
+
+#endif /* UTARRAY_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/uthash.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/uthash.h
new file mode 100644
index 0000000..39fd891
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/uthash.h
@@ -0,0 +1,960 @@
+/*
+Copyright (c) 2003-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef UTHASH_H
+#define UTHASH_H
+
+#include <string.h> /* memcmp,strlen */
+#include <stddef.h> /* ptrdiff_t */
+#include <stdlib.h> /* exit() */
+
+/* These macros use decltype or the earlier __typeof GNU extension.
+ As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+ when compiling c++ source) this code uses whatever method is needed
+ or, for VS2008 where neither is available, uses casting workarounds. */
+#if defined(_MSC_VER) /* MS compiler */
+#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */
+#define DECLTYPE(x) (decltype(x))
+#else /* VS2008 or older (or VS2010 in C mode) */
+#define NO_DECLTYPE
+#define DECLTYPE(x)
+#endif
+#elif defined(__BORLANDC__) || defined(__LCC__) || defined(__WATCOMC__)
+#define NO_DECLTYPE
+#define DECLTYPE(x)
+#else /* GNU, Sun and other compilers */
+#define DECLTYPE(x) (__typeof(x))
+#endif
+
+#ifdef NO_DECLTYPE
+#define DECLTYPE_ASSIGN(dst,src) \
+do { \
+ char **_da_dst = (char**)(&(dst)); \
+ *_da_dst = (char*)(src); \
+} while(0)
+#else
+#define DECLTYPE_ASSIGN(dst,src) \
+do { \
+ (dst) = DECLTYPE(dst)(src); \
+} while(0)
+#endif
+
+/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */
+#if defined (_WIN32)
+#if defined(_MSC_VER) && _MSC_VER >= 1600
+#include <stdint.h>
+#elif defined(__WATCOMC__)
+#include <stdint.h>
+#else
+typedef unsigned int uint32_t;
+typedef unsigned char uint8_t;
+#endif
+#else
+#include <stdint.h>
+#endif
+
+#define UTHASH_VERSION 1.9.9
+
+#ifndef uthash_fatal
+#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */
+#endif
+#ifndef uthash_malloc
+#define uthash_malloc(sz) malloc(sz) /* malloc fcn */
+#endif
+#ifndef uthash_free
+#define uthash_free(ptr,sz) free(ptr) /* free fcn */
+#endif
+
+#ifndef uthash_noexpand_fyi
+#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */
+#endif
+#ifndef uthash_expand_fyi
+#define uthash_expand_fyi(tbl) /* can be defined to log expands */
+#endif
+
+/* initial number of buckets */
+#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */
+#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */
+#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */
+
+/* calculate the element whose hash handle address is hhe */
+#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho)))
+
+#define HASH_FIND(hh,head,keyptr,keylen,out) \
+do { \
+ out=NULL; \
+ if (head) { \
+ unsigned _hf_bkt,_hf_hashv; \
+ HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \
+ if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \
+ HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \
+ keyptr,keylen,out); \
+ } \
+ } \
+} while (0)
+
+#ifdef HASH_BLOOM
+#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM)
+#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0)
+#define HASH_BLOOM_MAKE(tbl) \
+do { \
+ (tbl)->bloom_nbits = HASH_BLOOM; \
+ (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \
+ if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \
+ memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \
+ (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \
+} while (0)
+
+#define HASH_BLOOM_FREE(tbl) \
+do { \
+ uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \
+} while (0)
+
+#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8)))
+#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8)))
+
+#define HASH_BLOOM_ADD(tbl,hashv) \
+ HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+
+#define HASH_BLOOM_TEST(tbl,hashv) \
+ HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1)))
+
+#else
+#define HASH_BLOOM_MAKE(tbl)
+#define HASH_BLOOM_FREE(tbl)
+#define HASH_BLOOM_ADD(tbl,hashv)
+#define HASH_BLOOM_TEST(tbl,hashv) (1)
+#define HASH_BLOOM_BYTELEN 0
+#endif
+
+#define HASH_MAKE_TABLE(hh,head) \
+do { \
+ (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \
+ sizeof(UT_hash_table)); \
+ if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \
+ memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \
+ (head)->hh.tbl->tail = &((head)->hh); \
+ (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \
+ (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \
+ (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \
+ (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \
+ HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \
+ if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \
+ memset((head)->hh.tbl->buckets, 0, \
+ HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \
+ HASH_BLOOM_MAKE((head)->hh.tbl); \
+ (head)->hh.tbl->signature = HASH_SIGNATURE; \
+} while(0)
+
+#define HASH_ADD(hh,head,fieldname,keylen_in,add) \
+ HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add)
+
+#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \
+do { \
+ replaced=NULL; \
+ HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \
+ if (replaced!=NULL) { \
+ HASH_DELETE(hh,head,replaced); \
+ } \
+ HASH_ADD(hh,head,fieldname,keylen_in,add); \
+} while(0)
+
+#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \
+do { \
+ unsigned _ha_bkt; \
+ (add)->hh.next = NULL; \
+ (add)->hh.key = (char*)(keyptr); \
+ (add)->hh.keylen = (unsigned)(keylen_in); \
+ if (!(head)) { \
+ head = (add); \
+ (head)->hh.prev = NULL; \
+ HASH_MAKE_TABLE(hh,head); \
+ } else { \
+ (head)->hh.tbl->tail->next = (add); \
+ (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \
+ (head)->hh.tbl->tail = &((add)->hh); \
+ } \
+ (head)->hh.tbl->num_items++; \
+ (add)->hh.tbl = (head)->hh.tbl; \
+ HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \
+ (add)->hh.hashv, _ha_bkt); \
+ HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \
+ HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \
+ HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \
+ HASH_FSCK(hh,head); \
+} while(0)
+
+#define HASH_TO_BKT( hashv, num_bkts, bkt ) \
+do { \
+ bkt = ((hashv) & ((num_bkts) - 1)); \
+} while(0)
+
+/* delete "delptr" from the hash table.
+ * "the usual" patch-up process for the app-order doubly-linked-list.
+ * The use of _hd_hh_del below deserves special explanation.
+ * These used to be expressed using (delptr) but that led to a bug
+ * if someone used the same symbol for the head and deletee, like
+ * HASH_DELETE(hh,users,users);
+ * We want that to work, but by changing the head (users) below
+ * we were forfeiting our ability to further refer to the deletee (users)
+ * in the patch-up process. Solution: use scratch space to
+ * copy the deletee pointer, then the latter references are via that
+ * scratch pointer rather than through the repointed (users) symbol.
+ */
+#define HASH_DELETE(hh,head,delptr) \
+do { \
+ struct UT_hash_handle *_hd_hh_del; \
+ if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \
+ uthash_free((head)->hh.tbl->buckets, \
+ (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+ HASH_BLOOM_FREE((head)->hh.tbl); \
+ uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \
+ head = NULL; \
+ } else { \
+ unsigned _hd_bkt; \
+ _hd_hh_del = &((delptr)->hh); \
+ if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \
+ (head)->hh.tbl->tail = \
+ (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \
+ (head)->hh.tbl->hho); \
+ } \
+ if ((delptr)->hh.prev) { \
+ ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \
+ (head)->hh.tbl->hho))->next = (delptr)->hh.next; \
+ } else { \
+ DECLTYPE_ASSIGN(head,(delptr)->hh.next); \
+ } \
+ if (_hd_hh_del->next) { \
+ ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \
+ (head)->hh.tbl->hho))->prev = \
+ _hd_hh_del->prev; \
+ } \
+ HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \
+ HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \
+ (head)->hh.tbl->num_items--; \
+ } \
+ HASH_FSCK(hh,head); \
+} while (0)
+
+
+/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */
+#define HASH_FIND_STR(head,findstr,out) \
+ HASH_FIND(hh,head,findstr,(unsigned)strlen(findstr),out)
+#define HASH_ADD_STR(head,strfield,add) \
+ HASH_ADD(hh,head,strfield[0],strlen(add->strfield),add)
+#define HASH_REPLACE_STR(head,strfield,add,replaced) \
+ HASH_REPLACE(hh,head,strfield[0],(unsigned)strlen(add->strfield),add,replaced)
+#define HASH_FIND_INT(head,findint,out) \
+ HASH_FIND(hh,head,findint,sizeof(int),out)
+#define HASH_ADD_INT(head,intfield,add) \
+ HASH_ADD(hh,head,intfield,sizeof(int),add)
+#define HASH_REPLACE_INT(head,intfield,add,replaced) \
+ HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced)
+#define HASH_FIND_PTR(head,findptr,out) \
+ HASH_FIND(hh,head,findptr,sizeof(void *),out)
+#define HASH_ADD_PTR(head,ptrfield,add) \
+ HASH_ADD(hh,head,ptrfield,sizeof(void *),add)
+#define HASH_REPLACE_PTR(head,ptrfield,add,replaced) \
+ HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced)
+#define HASH_DEL(head,delptr) \
+ HASH_DELETE(hh,head,delptr)
+
+/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined.
+ * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined.
+ */
+#ifdef HASH_DEBUG
+#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0)
+#define HASH_FSCK(hh,head) \
+do { \
+ struct UT_hash_handle *_thh; \
+ if (head) { \
+ unsigned _bkt_i; \
+ unsigned _count; \
+ char *_prev; \
+ _count = 0; \
+ for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \
+ unsigned _bkt_count = 0; \
+ _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \
+ _prev = NULL; \
+ while (_thh) { \
+ if (_prev != (char*)(_thh->hh_prev)) { \
+ HASH_OOPS("invalid hh_prev %p, actual %p\n", \
+ _thh->hh_prev, _prev ); \
+ } \
+ _bkt_count++; \
+ _prev = (char*)(_thh); \
+ _thh = _thh->hh_next; \
+ } \
+ _count += _bkt_count; \
+ if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \
+ HASH_OOPS("invalid bucket count %u, actual %u\n", \
+ (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \
+ } \
+ } \
+ if (_count != (head)->hh.tbl->num_items) { \
+ HASH_OOPS("invalid hh item count %u, actual %u\n", \
+ (head)->hh.tbl->num_items, _count ); \
+ } \
+ /* traverse hh in app order; check next/prev integrity, count */ \
+ _count = 0; \
+ _prev = NULL; \
+ _thh = &(head)->hh; \
+ while (_thh) { \
+ _count++; \
+ if (_prev !=(char*)(_thh->prev)) { \
+ HASH_OOPS("invalid prev %p, actual %p\n", \
+ _thh->prev, _prev ); \
+ } \
+ _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \
+ _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \
+ (head)->hh.tbl->hho) : NULL ); \
+ } \
+ if (_count != (head)->hh.tbl->num_items) { \
+ HASH_OOPS("invalid app item count %u, actual %u\n", \
+ (head)->hh.tbl->num_items, _count ); \
+ } \
+ } \
+} while (0)
+#else
+#define HASH_FSCK(hh,head)
+#endif
+
+/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to
+ * the descriptor to which this macro is defined for tuning the hash function.
+ * The app can #include <unistd.h> to get the prototype for write(2). */
+#ifdef HASH_EMIT_KEYS
+#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \
+do { \
+ unsigned _klen = fieldlen; \
+ write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \
+ write(HASH_EMIT_KEYS, keyptr, fieldlen); \
+} while (0)
+#else
+#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen)
+#endif
+
+/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */
+#ifdef HASH_FUNCTION
+#define HASH_FCN HASH_FUNCTION
+#else
+#define HASH_FCN HASH_JEN
+#endif
+
+/* The Bernstein hash function, used in Perl prior to v5.6. Note (x<<5+x)=x*33. */
+#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _hb_keylen=keylen; \
+ const char *_hb_key=(const char*)(key); \
+ (hashv) = 0; \
+ while (_hb_keylen--) { (hashv) = (((hashv) << 5) + (hashv)) + *_hb_key++; } \
+ bkt = (hashv) & (num_bkts-1); \
+} while (0)
+
+
+/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
+ * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
+#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _sx_i; \
+ const char *_hs_key=(const char*)(key); \
+ hashv = 0; \
+ for(_sx_i=0; _sx_i < keylen; _sx_i++) \
+ hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \
+ bkt = hashv & (num_bkts-1); \
+} while (0)
+/* FNV-1a variation */
+#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _fn_i; \
+ const char *_hf_key=(const char*)(key); \
+ hashv = 2166136261UL; \
+ for(_fn_i=0; _fn_i < keylen; _fn_i++) { \
+ hashv = hashv ^ _hf_key[_fn_i]; \
+ hashv = hashv * 16777619; \
+ } \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _ho_i; \
+ const char *_ho_key=(const char*)(key); \
+ hashv = 0; \
+ for(_ho_i=0; _ho_i < keylen; _ho_i++) { \
+ hashv += _ho_key[_ho_i]; \
+ hashv += (hashv << 10); \
+ hashv ^= (hashv >> 6); \
+ } \
+ hashv += (hashv << 3); \
+ hashv ^= (hashv >> 11); \
+ hashv += (hashv << 15); \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+#define HASH_JEN_MIX(a,b,c) \
+do { \
+ a -= b; a -= c; a ^= ( c >> 13 ); \
+ b -= c; b -= a; b ^= ( a << 8 ); \
+ c -= a; c -= b; c ^= ( b >> 13 ); \
+ a -= b; a -= c; a ^= ( c >> 12 ); \
+ b -= c; b -= a; b ^= ( a << 16 ); \
+ c -= a; c -= b; c ^= ( b >> 5 ); \
+ a -= b; a -= c; a ^= ( c >> 3 ); \
+ b -= c; b -= a; b ^= ( a << 10 ); \
+ c -= a; c -= b; c ^= ( b >> 15 ); \
+} while (0)
+
+#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned _hj_i,_hj_j,_hj_k; \
+ unsigned const char *_hj_key=(unsigned const char*)(key); \
+ hashv = 0xfeedbeef; \
+ _hj_i = _hj_j = 0x9e3779b9; \
+ _hj_k = (unsigned)(keylen); \
+ while (_hj_k >= 12) { \
+ _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \
+ + ( (unsigned)_hj_key[2] << 16 ) \
+ + ( (unsigned)_hj_key[3] << 24 ) ); \
+ _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \
+ + ( (unsigned)_hj_key[6] << 16 ) \
+ + ( (unsigned)_hj_key[7] << 24 ) ); \
+ hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \
+ + ( (unsigned)_hj_key[10] << 16 ) \
+ + ( (unsigned)_hj_key[11] << 24 ) ); \
+ \
+ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \
+ \
+ _hj_key += 12; \
+ _hj_k -= 12; \
+ } \
+ hashv += keylen; \
+ switch ( _hj_k ) { \
+ case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \
+ case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \
+ case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \
+ case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \
+ case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \
+ case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \
+ case 5: _hj_j += _hj_key[4]; \
+ case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \
+ case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \
+ case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \
+ case 1: _hj_i += _hj_key[0]; \
+ } \
+ HASH_JEN_MIX(_hj_i, _hj_j, hashv); \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+/* The Paul Hsieh hash function */
+#undef get16bits
+#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \
+ || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__)
+#define get16bits(d) (*((const uint16_t *) (d)))
+#endif
+
+#if !defined (get16bits)
+#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \
+ +(uint32_t)(((const uint8_t *)(d))[0]) )
+#endif
+#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ unsigned const char *_sfh_key=(unsigned const char*)(key); \
+ uint32_t _sfh_tmp, _sfh_len = keylen; \
+ \
+ int _sfh_rem = _sfh_len & 3; \
+ _sfh_len >>= 2; \
+ hashv = 0xcafebabe; \
+ \
+ /* Main loop */ \
+ for (;_sfh_len > 0; _sfh_len--) { \
+ hashv += get16bits (_sfh_key); \
+ _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \
+ hashv = (hashv << 16) ^ _sfh_tmp; \
+ _sfh_key += 2*sizeof (uint16_t); \
+ hashv += hashv >> 11; \
+ } \
+ \
+ /* Handle end cases */ \
+ switch (_sfh_rem) { \
+ case 3: hashv += get16bits (_sfh_key); \
+ hashv ^= hashv << 16; \
+ hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \
+ hashv += hashv >> 11; \
+ break; \
+ case 2: hashv += get16bits (_sfh_key); \
+ hashv ^= hashv << 11; \
+ hashv += hashv >> 17; \
+ break; \
+ case 1: hashv += *_sfh_key; \
+ hashv ^= hashv << 10; \
+ hashv += hashv >> 1; \
+ } \
+ \
+ /* Force "avalanching" of final 127 bits */ \
+ hashv ^= hashv << 3; \
+ hashv += hashv >> 5; \
+ hashv ^= hashv << 4; \
+ hashv += hashv >> 17; \
+ hashv ^= hashv << 25; \
+ hashv += hashv >> 6; \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+
+#ifdef HASH_USING_NO_STRICT_ALIASING
+/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads.
+ * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error.
+ * MurmurHash uses the faster approach only on CPU's where we know it's safe.
+ *
+ * Note the preprocessor built-in defines can be emitted using:
+ *
+ * gcc -m64 -dM -E - < /dev/null (on gcc)
+ * cc -## a.c (where a.c is a simple test file) (Sun Studio)
+ */
+#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86))
+#define MUR_GETBLOCK(p,i) p[i]
+#else /* non intel */
+#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0)
+#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1)
+#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2)
+#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3)
+#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL))
+#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__))
+#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24))
+#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16))
+#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8))
+#else /* assume little endian non-intel */
+#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24))
+#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16))
+#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8))
+#endif
+#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \
+ (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \
+ (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \
+ MUR_ONE_THREE(p))))
+#endif
+#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r))))
+#define MUR_FMIX(_h) \
+do { \
+ _h ^= _h >> 16; \
+ _h *= 0x85ebca6b; \
+ _h ^= _h >> 13; \
+ _h *= 0xc2b2ae35l; \
+ _h ^= _h >> 16; \
+} while(0)
+
+#define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \
+do { \
+ const uint8_t *_mur_data = (const uint8_t*)(key); \
+ const int _mur_nblocks = (keylen) / 4; \
+ uint32_t _mur_h1 = 0xf88D5353; \
+ uint32_t _mur_c1 = 0xcc9e2d51; \
+ uint32_t _mur_c2 = 0x1b873593; \
+ uint32_t _mur_k1 = 0; \
+ const uint8_t *_mur_tail; \
+ const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \
+ int _mur_i; \
+ for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \
+ _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \
+ _mur_k1 *= _mur_c1; \
+ _mur_k1 = MUR_ROTL32(_mur_k1,15); \
+ _mur_k1 *= _mur_c2; \
+ \
+ _mur_h1 ^= _mur_k1; \
+ _mur_h1 = MUR_ROTL32(_mur_h1,13); \
+ _mur_h1 = _mur_h1*5+0xe6546b64; \
+ } \
+ _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \
+ _mur_k1=0; \
+ switch((keylen) & 3) { \
+ case 3: _mur_k1 ^= _mur_tail[2] << 16; \
+ case 2: _mur_k1 ^= _mur_tail[1] << 8; \
+ case 1: _mur_k1 ^= _mur_tail[0]; \
+ _mur_k1 *= _mur_c1; \
+ _mur_k1 = MUR_ROTL32(_mur_k1,15); \
+ _mur_k1 *= _mur_c2; \
+ _mur_h1 ^= _mur_k1; \
+ } \
+ _mur_h1 ^= (keylen); \
+ MUR_FMIX(_mur_h1); \
+ hashv = _mur_h1; \
+ bkt = hashv & (num_bkts-1); \
+} while(0)
+#endif /* HASH_USING_NO_STRICT_ALIASING */
+
+/* key comparison function; return 0 if keys equal */
+#define HASH_KEYCMP(a,b,len) memcmp(a,b,len)
+
+/* iterate over items in a known bucket to find desired item */
+#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \
+do { \
+ if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \
+ else out=NULL; \
+ while (out) { \
+ if ((out)->hh.keylen == keylen_in) { \
+ if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \
+ } \
+ if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \
+ else out = NULL; \
+ } \
+} while(0)
+
+/* add an item to a bucket */
+#define HASH_ADD_TO_BKT(head,addhh) \
+do { \
+ head.count++; \
+ (addhh)->hh_next = head.hh_head; \
+ (addhh)->hh_prev = NULL; \
+ if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \
+ (head).hh_head=addhh; \
+ if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \
+ && (addhh)->tbl->noexpand != 1) { \
+ HASH_EXPAND_BUCKETS((addhh)->tbl); \
+ } \
+} while(0)
+
+/* remove an item from a given bucket */
+#define HASH_DEL_IN_BKT(hh,head,hh_del) \
+ (head).count--; \
+ if ((head).hh_head == hh_del) { \
+ (head).hh_head = hh_del->hh_next; \
+ } \
+ if (hh_del->hh_prev) { \
+ hh_del->hh_prev->hh_next = hh_del->hh_next; \
+ } \
+ if (hh_del->hh_next) { \
+ hh_del->hh_next->hh_prev = hh_del->hh_prev; \
+ }
+
+/* Bucket expansion has the effect of doubling the number of buckets
+ * and redistributing the items into the new buckets. Ideally the
+ * items will distribute more or less evenly into the new buckets
+ * (the extent to which this is true is a measure of the quality of
+ * the hash function as it applies to the key domain).
+ *
+ * With the items distributed into more buckets, the chain length
+ * (item count) in each bucket is reduced. Thus by expanding buckets
+ * the hash keeps a bound on the chain length. This bounded chain
+ * length is the essence of how a hash provides constant time lookup.
+ *
+ * The calculation of tbl->ideal_chain_maxlen below deserves some
+ * explanation. First, keep in mind that we're calculating the ideal
+ * maximum chain length based on the *new* (doubled) bucket count.
+ * In fractions this is just n/b (n=number of items,b=new num buckets).
+ * Since the ideal chain length is an integer, we want to calculate
+ * ceil(n/b). We don't depend on floating point arithmetic in this
+ * hash, so to calculate ceil(n/b) with integers we could write
+ *
+ * ceil(n/b) = (n/b) + ((n%b)?1:0)
+ *
+ * and in fact a previous version of this hash did just that.
+ * But now we have improved things a bit by recognizing that b is
+ * always a power of two. We keep its base 2 log handy (call it lb),
+ * so now we can write this with a bit shift and logical AND:
+ *
+ * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0)
+ *
+ */
+#define HASH_EXPAND_BUCKETS(tbl) \
+do { \
+ unsigned _he_bkt; \
+ unsigned _he_bkt_i; \
+ struct UT_hash_handle *_he_thh, *_he_hh_nxt; \
+ UT_hash_bucket *_he_new_buckets, *_he_newbkt; \
+ _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \
+ 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \
+ if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \
+ memset(_he_new_buckets, 0, \
+ 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \
+ tbl->ideal_chain_maxlen = \
+ (tbl->num_items >> (tbl->log2_num_buckets+1)) + \
+ ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \
+ tbl->nonideal_items = 0; \
+ for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \
+ { \
+ _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \
+ while (_he_thh) { \
+ _he_hh_nxt = _he_thh->hh_next; \
+ HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \
+ _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \
+ if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \
+ tbl->nonideal_items++; \
+ _he_newbkt->expand_mult = _he_newbkt->count / \
+ tbl->ideal_chain_maxlen; \
+ } \
+ _he_thh->hh_prev = NULL; \
+ _he_thh->hh_next = _he_newbkt->hh_head; \
+ if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \
+ _he_thh; \
+ _he_newbkt->hh_head = _he_thh; \
+ _he_thh = _he_hh_nxt; \
+ } \
+ } \
+ uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \
+ tbl->num_buckets *= 2; \
+ tbl->log2_num_buckets++; \
+ tbl->buckets = _he_new_buckets; \
+ tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \
+ (tbl->ineff_expands+1) : 0; \
+ if (tbl->ineff_expands > 1) { \
+ tbl->noexpand=1; \
+ uthash_noexpand_fyi(tbl); \
+ } \
+ uthash_expand_fyi(tbl); \
+} while(0)
+
+
+/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */
+/* Note that HASH_SORT assumes the hash handle name to be hh.
+ * HASH_SRT was added to allow the hash handle name to be passed in. */
+#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn)
+#define HASH_SRT(hh,head,cmpfcn) \
+do { \
+ unsigned _hs_i; \
+ unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \
+ struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \
+ if (head) { \
+ _hs_insize = 1; \
+ _hs_looping = 1; \
+ _hs_list = &((head)->hh); \
+ while (_hs_looping) { \
+ _hs_p = _hs_list; \
+ _hs_list = NULL; \
+ _hs_tail = NULL; \
+ _hs_nmerges = 0; \
+ while (_hs_p) { \
+ _hs_nmerges++; \
+ _hs_q = _hs_p; \
+ _hs_psize = 0; \
+ for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \
+ _hs_psize++; \
+ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \
+ ((void*)((char*)(_hs_q->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ if (! (_hs_q) ) break; \
+ } \
+ _hs_qsize = _hs_insize; \
+ while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \
+ if (_hs_psize == 0) { \
+ _hs_e = _hs_q; \
+ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \
+ ((void*)((char*)(_hs_q->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ _hs_qsize--; \
+ } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \
+ _hs_e = _hs_p; \
+ if (_hs_p){ \
+ _hs_p = (UT_hash_handle*)((_hs_p->next) ? \
+ ((void*)((char*)(_hs_p->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ } \
+ _hs_psize--; \
+ } else if (( \
+ cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \
+ DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \
+ ) <= 0) { \
+ _hs_e = _hs_p; \
+ if (_hs_p){ \
+ _hs_p = (UT_hash_handle*)((_hs_p->next) ? \
+ ((void*)((char*)(_hs_p->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ } \
+ _hs_psize--; \
+ } else { \
+ _hs_e = _hs_q; \
+ _hs_q = (UT_hash_handle*)((_hs_q->next) ? \
+ ((void*)((char*)(_hs_q->next) + \
+ (head)->hh.tbl->hho)) : NULL); \
+ _hs_qsize--; \
+ } \
+ if ( _hs_tail ) { \
+ _hs_tail->next = ((_hs_e) ? \
+ ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \
+ } else { \
+ _hs_list = _hs_e; \
+ } \
+ if (_hs_e) { \
+ _hs_e->prev = ((_hs_tail) ? \
+ ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \
+ } \
+ _hs_tail = _hs_e; \
+ } \
+ _hs_p = _hs_q; \
+ } \
+ if (_hs_tail){ \
+ _hs_tail->next = NULL; \
+ } \
+ if ( _hs_nmerges <= 1 ) { \
+ _hs_looping=0; \
+ (head)->hh.tbl->tail = _hs_tail; \
+ DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \
+ } \
+ _hs_insize *= 2; \
+ } \
+ HASH_FSCK(hh,head); \
+ } \
+} while (0)
+
+/* This function selects items from one hash into another hash.
+ * The end result is that the selected items have dual presence
+ * in both hashes. There is no copy of the items made; rather
+ * they are added into the new hash through a secondary hash
+ * hash handle that must be present in the structure. */
+#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \
+do { \
+ unsigned _src_bkt, _dst_bkt; \
+ void *_last_elt=NULL, *_elt; \
+ UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \
+ ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \
+ if (src) { \
+ for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \
+ for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \
+ _src_hh; \
+ _src_hh = _src_hh->hh_next) { \
+ _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \
+ if (cond(_elt)) { \
+ _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \
+ _dst_hh->key = _src_hh->key; \
+ _dst_hh->keylen = _src_hh->keylen; \
+ _dst_hh->hashv = _src_hh->hashv; \
+ _dst_hh->prev = _last_elt; \
+ _dst_hh->next = NULL; \
+ if (_last_elt_hh) { _last_elt_hh->next = _elt; } \
+ if (!dst) { \
+ DECLTYPE_ASSIGN(dst,_elt); \
+ HASH_MAKE_TABLE(hh_dst,dst); \
+ } else { \
+ _dst_hh->tbl = (dst)->hh_dst.tbl; \
+ } \
+ HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \
+ HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \
+ (dst)->hh_dst.tbl->num_items++; \
+ _last_elt = _elt; \
+ _last_elt_hh = _dst_hh; \
+ } \
+ } \
+ } \
+ } \
+ HASH_FSCK(hh_dst,dst); \
+} while (0)
+
+#define HASH_CLEAR(hh,head) \
+do { \
+ if (head) { \
+ uthash_free((head)->hh.tbl->buckets, \
+ (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \
+ HASH_BLOOM_FREE((head)->hh.tbl); \
+ uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \
+ (head)=NULL; \
+ } \
+} while(0)
+
+#define HASH_OVERHEAD(hh,head) \
+ ((head) ? ( \
+ (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \
+ ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \
+ (sizeof(UT_hash_table)) + \
+ (HASH_BLOOM_BYTELEN)))) : 0)
+
+#ifdef NO_DECLTYPE
+#define HASH_ITER(hh,head,el,tmp) \
+for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \
+ el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL))
+#else
+#define HASH_ITER(hh,head,el,tmp) \
+for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \
+ el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL))
+#endif
+
+/* obtain a count of items in the hash */
+#define HASH_COUNT(head) HASH_CNT(hh,head)
+#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0)
+
+typedef struct UT_hash_bucket {
+ struct UT_hash_handle *hh_head;
+ unsigned count;
+
+ /* expand_mult is normally set to 0. In this situation, the max chain length
+ * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If
+ * the bucket's chain exceeds this length, bucket expansion is triggered).
+ * However, setting expand_mult to a non-zero value delays bucket expansion
+ * (that would be triggered by additions to this particular bucket)
+ * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH.
+ * (The multiplier is simply expand_mult+1). The whole idea of this
+ * multiplier is to reduce bucket expansions, since they are expensive, in
+ * situations where we know that a particular bucket tends to be overused.
+ * It is better to let its chain length grow to a longer yet-still-bounded
+ * value, than to do an O(n) bucket expansion too often.
+ */
+ unsigned expand_mult;
+
+} UT_hash_bucket;
+
+/* random signature used only to find hash tables in external analysis */
+#define HASH_SIGNATURE 0xa0111fe1
+#define HASH_BLOOM_SIGNATURE 0xb12220f2
+
+typedef struct UT_hash_table {
+ UT_hash_bucket *buckets;
+ unsigned num_buckets, log2_num_buckets;
+ unsigned num_items;
+ struct UT_hash_handle *tail; /* tail hh in app order, for fast append */
+ ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */
+
+ /* in an ideal situation (all buckets used equally), no bucket would have
+ * more than ceil(#items/#buckets) items. that's the ideal chain length. */
+ unsigned ideal_chain_maxlen;
+
+ /* nonideal_items is the number of items in the hash whose chain position
+ * exceeds the ideal chain maxlen. these items pay the penalty for an uneven
+ * hash distribution; reaching them in a chain traversal takes >ideal steps */
+ unsigned nonideal_items;
+
+ /* ineffective expands occur when a bucket doubling was performed, but
+ * afterward, more than half the items in the hash had nonideal chain
+ * positions. If this happens on two consecutive expansions we inhibit any
+ * further expansion, as it's not helping; this happens when the hash
+ * function isn't a good fit for the key domain. When expansion is inhibited
+ * the hash will still work, albeit no longer in constant time. */
+ unsigned ineff_expands, noexpand;
+
+ uint32_t signature; /* used only to find hash tables in external analysis */
+#ifdef HASH_BLOOM
+ uint32_t bloom_sig; /* used only to test bloom exists in external analysis */
+ uint8_t *bloom_bv;
+ char bloom_nbits;
+#endif
+
+} UT_hash_table;
+
+typedef struct UT_hash_handle {
+ struct UT_hash_table *tbl;
+ void *prev; /* prev element in app order */
+ void *next; /* next element in app order */
+ struct UT_hash_handle *hh_prev; /* previous hh in bucket order */
+ struct UT_hash_handle *hh_next; /* next hh in bucket order */
+ void *key; /* ptr to enclosing struct's key */
+ unsigned keylen; /* enclosing struct's key len */
+ unsigned hashv; /* result of hash-fcn(key) */
+} UT_hash_handle;
+
+#endif /* UTHASH_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utlist.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utlist.h
new file mode 100644
index 0000000..b5f3f04
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utlist.h
@@ -0,0 +1,757 @@
+/*
+Copyright (c) 2007-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef UTLIST_H
+#define UTLIST_H
+
+#define UTLIST_VERSION 1.9.9
+
+#include <assert.h>
+
+/*
+ * This file contains macros to manipulate singly and doubly-linked lists.
+ *
+ * 1. LL_ macros: singly-linked lists.
+ * 2. DL_ macros: doubly-linked lists.
+ * 3. CDL_ macros: circular doubly-linked lists.
+ *
+ * To use singly-linked lists, your structure must have a "next" pointer.
+ * To use doubly-linked lists, your structure must "prev" and "next" pointers.
+ * Either way, the pointer to the head of the list must be initialized to NULL.
+ *
+ * ----------------.EXAMPLE -------------------------
+ * struct item {
+ * int id;
+ * struct item *prev, *next;
+ * }
+ *
+ * struct item *list = NULL:
+ *
+ * int main() {
+ * struct item *item;
+ * ... allocate and populate item ...
+ * DL_APPEND(list, item);
+ * }
+ * --------------------------------------------------
+ *
+ * For doubly-linked lists, the append and delete macros are O(1)
+ * For singly-linked lists, append and delete are O(n) but prepend is O(1)
+ * The sort macro is O(n log(n)) for all types of single/double/circular lists.
+ */
+
+/* These macros use decltype or the earlier __typeof GNU extension.
+ As decltype is only available in newer compilers (VS2010 or gcc 4.3+
+ when compiling c++ code), this code uses whatever method is needed
+ or, for VS2008 where neither is available, uses casting workarounds. */
+#ifdef _MSC_VER /* MS compiler */
+#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */
+#define LDECLTYPE(x) decltype(x)
+#else /* VS2008 or older (or VS2010 in C mode) */
+#define NO_DECLTYPE
+#define LDECLTYPE(x) char*
+#endif
+#elif defined(__ICCARM__)
+#define NO_DECLTYPE
+#define LDECLTYPE(x) char*
+#else /* GNU, Sun and other compilers */
+#define LDECLTYPE(x) __typeof(x)
+#endif
+
+/* for VS2008 we use some workarounds to get around the lack of decltype,
+ * namely, we always reassign our tmp variable to the list head if we need
+ * to dereference its prev/next pointers, and save/restore the real head.*/
+#ifdef NO_DECLTYPE
+#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); }
+#define _NEXT(elt,list,next) ((char*)((list)->next))
+#define _NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); }
+/* #define _PREV(elt,list,prev) ((char*)((list)->prev)) */
+#define _PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); }
+#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; }
+#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); }
+#else
+#define _SV(elt,list)
+#define _NEXT(elt,list,next) ((elt)->next)
+#define _NEXTASGN(elt,list,to,next) ((elt)->next)=(to)
+/* #define _PREV(elt,list,prev) ((elt)->prev) */
+#define _PREVASGN(elt,list,to,prev) ((elt)->prev)=(to)
+#define _RS(list)
+#define _CASTASGN(a,b) (a)=(b)
+#endif
+
+/******************************************************************************
+ * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort *
+ * Unwieldy variable names used here to avoid shadowing passed-in variables. *
+ *****************************************************************************/
+#define LL_SORT(list, cmp) \
+ LL_SORT2(list, cmp, next)
+
+#define LL_SORT2(list, cmp, next) \
+do { \
+ LDECLTYPE(list) _ls_p; \
+ LDECLTYPE(list) _ls_q; \
+ LDECLTYPE(list) _ls_e; \
+ LDECLTYPE(list) _ls_tail; \
+ int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
+ if (list) { \
+ _ls_insize = 1; \
+ _ls_looping = 1; \
+ while (_ls_looping) { \
+ _CASTASGN(_ls_p,list); \
+ list = NULL; \
+ _ls_tail = NULL; \
+ _ls_nmerges = 0; \
+ while (_ls_p) { \
+ _ls_nmerges++; \
+ _ls_q = _ls_p; \
+ _ls_psize = 0; \
+ for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
+ _ls_psize++; \
+ _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \
+ if (!_ls_q) break; \
+ } \
+ _ls_qsize = _ls_insize; \
+ while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
+ if (_ls_psize == 0) { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } else if (_ls_qsize == 0 || !_ls_q) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else if (cmp(_ls_p,_ls_q) <= 0) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \
+ } else { \
+ _CASTASGN(list,_ls_e); \
+ } \
+ _ls_tail = _ls_e; \
+ } \
+ _ls_p = _ls_q; \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \
+ } \
+ if (_ls_nmerges <= 1) { \
+ _ls_looping=0; \
+ } \
+ _ls_insize *= 2; \
+ } \
+ } \
+} while (0)
+
+
+#define DL_SORT(list, cmp) \
+ DL_SORT2(list, cmp, prev, next)
+
+#define DL_SORT2(list, cmp, prev, next) \
+do { \
+ LDECLTYPE(list) _ls_p; \
+ LDECLTYPE(list) _ls_q; \
+ LDECLTYPE(list) _ls_e; \
+ LDECLTYPE(list) _ls_tail; \
+ int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
+ if (list) { \
+ _ls_insize = 1; \
+ _ls_looping = 1; \
+ while (_ls_looping) { \
+ _CASTASGN(_ls_p,list); \
+ list = NULL; \
+ _ls_tail = NULL; \
+ _ls_nmerges = 0; \
+ while (_ls_p) { \
+ _ls_nmerges++; \
+ _ls_q = _ls_p; \
+ _ls_psize = 0; \
+ for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
+ _ls_psize++; \
+ _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \
+ if (!_ls_q) break; \
+ } \
+ _ls_qsize = _ls_insize; \
+ while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
+ if (_ls_psize == 0) { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } else if (_ls_qsize == 0 || !_ls_q) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else if (cmp(_ls_p,_ls_q) <= 0) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ } else { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \
+ } else { \
+ _CASTASGN(list,_ls_e); \
+ } \
+ _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \
+ _ls_tail = _ls_e; \
+ } \
+ _ls_p = _ls_q; \
+ } \
+ _CASTASGN(list->prev, _ls_tail); \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \
+ if (_ls_nmerges <= 1) { \
+ _ls_looping=0; \
+ } \
+ _ls_insize *= 2; \
+ } \
+ } \
+} while (0)
+
+#define CDL_SORT(list, cmp) \
+ CDL_SORT2(list, cmp, prev, next)
+
+#define CDL_SORT2(list, cmp, prev, next) \
+do { \
+ LDECLTYPE(list) _ls_p; \
+ LDECLTYPE(list) _ls_q; \
+ LDECLTYPE(list) _ls_e; \
+ LDECLTYPE(list) _ls_tail; \
+ LDECLTYPE(list) _ls_oldhead; \
+ LDECLTYPE(list) _tmp; \
+ int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \
+ if (list) { \
+ _ls_insize = 1; \
+ _ls_looping = 1; \
+ while (_ls_looping) { \
+ _CASTASGN(_ls_p,list); \
+ _CASTASGN(_ls_oldhead,list); \
+ list = NULL; \
+ _ls_tail = NULL; \
+ _ls_nmerges = 0; \
+ while (_ls_p) { \
+ _ls_nmerges++; \
+ _ls_q = _ls_p; \
+ _ls_psize = 0; \
+ for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \
+ _ls_psize++; \
+ _SV(_ls_q,list); \
+ if (_NEXT(_ls_q,list,next) == _ls_oldhead) { \
+ _ls_q = NULL; \
+ } else { \
+ _ls_q = _NEXT(_ls_q,list,next); \
+ } \
+ _RS(list); \
+ if (!_ls_q) break; \
+ } \
+ _ls_qsize = _ls_insize; \
+ while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \
+ if (_ls_psize == 0) { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \
+ } else if (_ls_qsize == 0 || !_ls_q) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \
+ } else if (cmp(_ls_p,_ls_q) <= 0) { \
+ _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \
+ _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \
+ if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \
+ } else { \
+ _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \
+ _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \
+ if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \
+ } \
+ if (_ls_tail) { \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \
+ } else { \
+ _CASTASGN(list,_ls_e); \
+ } \
+ _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \
+ _ls_tail = _ls_e; \
+ } \
+ _ls_p = _ls_q; \
+ } \
+ _CASTASGN(list->prev,_ls_tail); \
+ _CASTASGN(_tmp,list); \
+ _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp,next); _RS(list); \
+ if (_ls_nmerges <= 1) { \
+ _ls_looping=0; \
+ } \
+ _ls_insize *= 2; \
+ } \
+ } \
+} while (0)
+
+/******************************************************************************
+ * singly linked list macros (non-circular) *
+ *****************************************************************************/
+#define LL_PREPEND(head,add) \
+ LL_PREPEND2(head,add,next)
+
+#define LL_PREPEND2(head,add,next) \
+do { \
+ (add)->next = head; \
+ head = add; \
+} while (0)
+
+#define LL_CONCAT(head1,head2) \
+ LL_CONCAT2(head1,head2,next)
+
+#define LL_CONCAT2(head1,head2,next) \
+do { \
+ LDECLTYPE(head1) _tmp; \
+ if (head1) { \
+ _tmp = head1; \
+ while (_tmp->next) { _tmp = _tmp->next; } \
+ _tmp->next=(head2); \
+ } else { \
+ (head1)=(head2); \
+ } \
+} while (0)
+
+#define LL_APPEND(head,add) \
+ LL_APPEND2(head,add,next)
+
+#define LL_APPEND2(head,add,next) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ (add)->next=NULL; \
+ if (head) { \
+ _tmp = head; \
+ while (_tmp->next) { _tmp = _tmp->next; } \
+ _tmp->next=(add); \
+ } else { \
+ (head)=(add); \
+ } \
+} while (0)
+
+#define LL_DELETE(head,del) \
+ LL_DELETE2(head,del,next)
+
+#define LL_DELETE2(head,del,next) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ if ((head) == (del)) { \
+ (head)=(head)->next; \
+ } else { \
+ _tmp = head; \
+ while (_tmp->next && (_tmp->next != (del))) { \
+ _tmp = _tmp->next; \
+ } \
+ if (_tmp->next) { \
+ _tmp->next = ((del)->next); \
+ } \
+ } \
+} while (0)
+
+/* Here are VS2008 replacements for LL_APPEND and LL_DELETE */
+#define LL_APPEND_VS2008(head,add) \
+ LL_APPEND2_VS2008(head,add,next)
+
+#define LL_APPEND2_VS2008(head,add,next) \
+do { \
+ if (head) { \
+ (add)->next = head; /* use add->next as a temp variable */ \
+ while ((add)->next->next) { (add)->next = (add)->next->next; } \
+ (add)->next->next=(add); \
+ } else { \
+ (head)=(add); \
+ } \
+ (add)->next=NULL; \
+} while (0)
+
+#define LL_DELETE_VS2008(head,del) \
+ LL_DELETE2_VS2008(head,del,next)
+
+#define LL_DELETE2_VS2008(head,del,next) \
+do { \
+ if ((head) == (del)) { \
+ (head)=(head)->next; \
+ } else { \
+ char *_tmp = (char*)(head); \
+ while ((head)->next && ((head)->next != (del))) { \
+ head = (head)->next; \
+ } \
+ if ((head)->next) { \
+ (head)->next = ((del)->next); \
+ } \
+ { \
+ char **_head_alias = (char**)&(head); \
+ *_head_alias = _tmp; \
+ } \
+ } \
+} while (0)
+#ifdef NO_DECLTYPE
+#undef LL_APPEND
+#define LL_APPEND LL_APPEND_VS2008
+#undef LL_DELETE
+#define LL_DELETE LL_DELETE_VS2008
+#undef LL_DELETE2
+#define LL_DELETE2 LL_DELETE2_VS2008
+#undef LL_APPEND2
+#define LL_APPEND2 LL_APPEND2_VS2008
+#undef LL_CONCAT /* no LL_CONCAT_VS2008 */
+#undef DL_CONCAT /* no DL_CONCAT_VS2008 */
+#endif
+/* end VS2008 replacements */
+
+#define LL_COUNT(head,el,counter) \
+ LL_COUNT2(head,el,counter,next) \
+
+#define LL_COUNT2(head,el,counter,next) \
+{ \
+ counter = 0; \
+ LL_FOREACH2(head,el,next){ ++counter; } \
+}
+
+#define LL_FOREACH(head,el) \
+ LL_FOREACH2(head,el,next)
+
+#define LL_FOREACH2(head,el,next) \
+ for(el=head;el;el=(el)->next)
+
+#define LL_FOREACH_SAFE(head,el,tmp) \
+ LL_FOREACH_SAFE2(head,el,tmp,next)
+
+#define LL_FOREACH_SAFE2(head,el,tmp,next) \
+ for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
+
+#define LL_SEARCH_SCALAR(head,out,field,val) \
+ LL_SEARCH_SCALAR2(head,out,field,val,next)
+
+#define LL_SEARCH_SCALAR2(head,out,field,val,next) \
+do { \
+ LL_FOREACH2(head,out,next) { \
+ if ((out)->field == (val)) break; \
+ } \
+} while(0)
+
+#define LL_SEARCH(head,out,elt,cmp) \
+ LL_SEARCH2(head,out,elt,cmp,next)
+
+#define LL_SEARCH2(head,out,elt,cmp,next) \
+do { \
+ LL_FOREACH2(head,out,next) { \
+ if ((cmp(out,elt))==0) break; \
+ } \
+} while(0)
+
+#define LL_REPLACE_ELEM(head, el, add) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el)->next; \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } else { \
+ _tmp = head; \
+ while (_tmp->next && (_tmp->next != (el))) { \
+ _tmp = _tmp->next; \
+ } \
+ if (_tmp->next) { \
+ _tmp->next = (add); \
+ } \
+ } \
+} while (0)
+
+#define LL_PREPEND_ELEM(head, el, add) \
+do { \
+ LDECLTYPE(head) _tmp; \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } else { \
+ _tmp = head; \
+ while (_tmp->next && (_tmp->next != (el))) { \
+ _tmp = _tmp->next; \
+ } \
+ if (_tmp->next) { \
+ _tmp->next = (add); \
+ } \
+ } \
+} while (0) \
+
+
+/******************************************************************************
+ * doubly linked list macros (non-circular) *
+ *****************************************************************************/
+#define DL_PREPEND(head,add) \
+ DL_PREPEND2(head,add,prev,next)
+
+#define DL_PREPEND2(head,add,prev,next) \
+do { \
+ (add)->next = head; \
+ if (head) { \
+ (add)->prev = (head)->prev; \
+ (head)->prev = (add); \
+ } else { \
+ (add)->prev = (add); \
+ } \
+ (head) = (add); \
+} while (0)
+
+#define DL_APPEND(head,add) \
+ DL_APPEND2(head,add,prev,next)
+
+#define DL_APPEND2(head,add,prev,next) \
+do { \
+ if (head) { \
+ (add)->prev = (head)->prev; \
+ (head)->prev->next = (add); \
+ (head)->prev = (add); \
+ (add)->next = NULL; \
+ } else { \
+ (head)=(add); \
+ (head)->prev = (head); \
+ (head)->next = NULL; \
+ } \
+} while (0)
+
+#define DL_CONCAT(head1,head2) \
+ DL_CONCAT2(head1,head2,prev,next)
+
+#define DL_CONCAT2(head1,head2,prev,next) \
+do { \
+ LDECLTYPE(head1) _tmp; \
+ if (head2) { \
+ if (head1) { \
+ _tmp = (head2)->prev; \
+ (head2)->prev = (head1)->prev; \
+ (head1)->prev->next = (head2); \
+ (head1)->prev = _tmp; \
+ } else { \
+ (head1)=(head2); \
+ } \
+ } \
+} while (0)
+
+#define DL_DELETE(head,del) \
+ DL_DELETE2(head,del,prev,next)
+
+#define DL_DELETE2(head,del,prev,next) \
+do { \
+ assert((del)->prev != NULL); \
+ if ((del)->prev == (del)) { \
+ (head)=NULL; \
+ } else if ((del)==(head)) { \
+ (del)->next->prev = (del)->prev; \
+ (head) = (del)->next; \
+ } else { \
+ (del)->prev->next = (del)->next; \
+ if ((del)->next) { \
+ (del)->next->prev = (del)->prev; \
+ } else { \
+ (head)->prev = (del)->prev; \
+ } \
+ } \
+} while (0)
+
+#define DL_COUNT(head,el,counter) \
+ DL_COUNT2(head,el,counter,next) \
+
+#define DL_COUNT2(head,el,counter,next) \
+{ \
+ counter = 0; \
+ DL_FOREACH2(head,el,next){ ++counter; } \
+}
+
+#define DL_FOREACH(head,el) \
+ DL_FOREACH2(head,el,next)
+
+#define DL_FOREACH2(head,el,next) \
+ for(el=head;el;el=(el)->next)
+
+/* this version is safe for deleting the elements during iteration */
+#define DL_FOREACH_SAFE(head,el,tmp) \
+ DL_FOREACH_SAFE2(head,el,tmp,next)
+
+#define DL_FOREACH_SAFE2(head,el,tmp,next) \
+ for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp)
+
+/* these are identical to their singly-linked list counterparts */
+#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR
+#define DL_SEARCH LL_SEARCH
+#define DL_SEARCH_SCALAR2 LL_SEARCH_SCALAR2
+#define DL_SEARCH2 LL_SEARCH2
+
+#define DL_REPLACE_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ (add)->next = (el)->next; \
+ if ((el)->next == NULL) { \
+ (add)->prev = (add); \
+ } else { \
+ (add)->prev = (el)->prev; \
+ (add)->next->prev = (add); \
+ } \
+ } else { \
+ (add)->next = (el)->next; \
+ (add)->prev = (el)->prev; \
+ (add)->prev->next = (add); \
+ if ((el)->next == NULL) { \
+ (head)->prev = (add); \
+ } else { \
+ (add)->next->prev = (add); \
+ } \
+ } \
+} while (0)
+
+#define DL_PREPEND_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el); \
+ (add)->prev = (el)->prev; \
+ (el)->prev = (add); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } else { \
+ (add)->prev->next = (add); \
+ } \
+} while (0) \
+
+
+/******************************************************************************
+ * circular doubly linked list macros *
+ *****************************************************************************/
+#define CDL_PREPEND(head,add) \
+ CDL_PREPEND2(head,add,prev,next)
+
+#define CDL_PREPEND2(head,add,prev,next) \
+do { \
+ if (head) { \
+ (add)->prev = (head)->prev; \
+ (add)->next = (head); \
+ (head)->prev = (add); \
+ (add)->prev->next = (add); \
+ } else { \
+ (add)->prev = (add); \
+ (add)->next = (add); \
+ } \
+(head)=(add); \
+} while (0)
+
+#define CDL_DELETE(head,del) \
+ CDL_DELETE2(head,del,prev,next)
+
+#define CDL_DELETE2(head,del,prev,next) \
+do { \
+ if ( ((head)==(del)) && ((head)->next == (head))) { \
+ (head) = 0L; \
+ } else { \
+ (del)->next->prev = (del)->prev; \
+ (del)->prev->next = (del)->next; \
+ if ((del) == (head)) (head)=(del)->next; \
+ } \
+} while (0)
+
+#define CDL_COUNT(head,el,counter) \
+ CDL_COUNT2(head,el,counter,next) \
+
+#define CDL_COUNT2(head, el, counter,next) \
+{ \
+ counter = 0; \
+ CDL_FOREACH2(head,el,next){ ++counter; } \
+}
+
+#define CDL_FOREACH(head,el) \
+ CDL_FOREACH2(head,el,next)
+
+#define CDL_FOREACH2(head,el,next) \
+ for(el=head;el;el=((el)->next==head ? 0L : (el)->next))
+
+#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \
+ CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next)
+
+#define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \
+ for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \
+ (el) && ((tmp2)=(el)->next, 1); \
+ ((el) = (((el)==(tmp1)) ? 0L : (tmp2))))
+
+#define CDL_SEARCH_SCALAR(head,out,field,val) \
+ CDL_SEARCH_SCALAR2(head,out,field,val,next)
+
+#define CDL_SEARCH_SCALAR2(head,out,field,val,next) \
+do { \
+ CDL_FOREACH2(head,out,next) { \
+ if ((out)->field == (val)) break; \
+ } \
+} while(0)
+
+#define CDL_SEARCH(head,out,elt,cmp) \
+ CDL_SEARCH2(head,out,elt,cmp,next)
+
+#define CDL_SEARCH2(head,out,elt,cmp,next) \
+do { \
+ CDL_FOREACH2(head,out,next) { \
+ if ((cmp(out,elt))==0) break; \
+ } \
+} while(0)
+
+#define CDL_REPLACE_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ if ((el)->next == (el)) { \
+ (add)->next = (add); \
+ (add)->prev = (add); \
+ (head) = (add); \
+ } else { \
+ (add)->next = (el)->next; \
+ (add)->prev = (el)->prev; \
+ (add)->next->prev = (add); \
+ (add)->prev->next = (add); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } \
+ } \
+} while (0)
+
+#define CDL_PREPEND_ELEM(head, el, add) \
+do { \
+ assert(head != NULL); \
+ assert(el != NULL); \
+ assert(add != NULL); \
+ (add)->next = (el); \
+ (add)->prev = (el)->prev; \
+ (el)->prev = (add); \
+ (add)->prev->next = (add); \
+ if ((head) == (el)) { \
+ (head) = (add); \
+ } \
+} while (0) \
+
+#endif /* UTLIST_H */
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utstring.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utstring.h
new file mode 100644
index 0000000..867442c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/utstring.h
@@ -0,0 +1,393 @@
+/*
+Copyright (c) 2008-2014, Troy D. Hanson http://troydhanson.github.com/uthash/
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+/* a dynamic string implementation using macros
+ */
+#ifndef UTSTRING_H
+#define UTSTRING_H
+
+#define UTSTRING_VERSION 1.9.9
+
+#ifdef __GNUC__
+#define _UNUSED_ __attribute__ ((__unused__))
+#else
+#define _UNUSED_
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdarg.h>
+#define oom() exit(-1)
+
+typedef struct {
+ char *d;
+ size_t n; /* allocd size */
+ size_t i; /* index of first unused byte */
+} UT_string;
+
+#define utstring_reserve(s,amt) \
+do { \
+ if (((s)->n - (s)->i) < (size_t)(amt)) { \
+ (s)->d = (char*)realloc((s)->d, (s)->n + amt); \
+ if ((s)->d == NULL) oom(); \
+ (s)->n += amt; \
+ } \
+} while(0)
+
+#define utstring_init(s) \
+do { \
+ (s)->n = 0; (s)->i = 0; (s)->d = NULL; \
+ utstring_reserve(s,100); \
+ (s)->d[0] = '\0'; \
+} while(0)
+
+#define utstring_done(s) \
+do { \
+ if ((s)->d != NULL) free((s)->d); \
+ (s)->n = 0; \
+} while(0)
+
+#define utstring_free(s) \
+do { \
+ utstring_done(s); \
+ free(s); \
+} while(0)
+
+#define utstring_new(s) \
+do { \
+ s = (UT_string*)calloc(sizeof(UT_string),1); \
+ if (!s) oom(); \
+ utstring_init(s); \
+} while(0)
+
+#define utstring_renew(s) \
+do { \
+ if (s) { \
+ utstring_clear(s); \
+ } else { \
+ utstring_new(s); \
+ } \
+} while(0)
+
+#define utstring_clear(s) \
+do { \
+ (s)->i = 0; \
+ (s)->d[0] = '\0'; \
+} while(0)
+
+#define utstring_bincpy(s,b,l) \
+do { \
+ utstring_reserve((s),(l)+1); \
+ if (l) memcpy(&(s)->d[(s)->i], b, l); \
+ (s)->i += l; \
+ (s)->d[(s)->i]='\0'; \
+} while(0)
+
+#define utstring_concat(dst,src) \
+do { \
+ utstring_reserve((dst),((src)->i)+1); \
+ if ((src)->i) memcpy(&(dst)->d[(dst)->i], (src)->d, (src)->i); \
+ (dst)->i += (src)->i; \
+ (dst)->d[(dst)->i]='\0'; \
+} while(0)
+
+#define utstring_len(s) ((unsigned)((s)->i))
+
+#define utstring_body(s) ((s)->d)
+
+_UNUSED_ static void utstring_printf_va(UT_string *s, const char *fmt, va_list ap) {
+ int n;
+ va_list cp;
+ while (1) {
+#ifdef _WIN32
+ cp = ap;
+#else
+ va_copy(cp, ap);
+#endif
+ n = vsnprintf (&s->d[s->i], s->n-s->i, fmt, cp);
+ va_end(cp);
+
+ if ((n > -1) && ((size_t) n < (s->n-s->i))) {
+ s->i += n;
+ return;
+ }
+
+ /* Else try again with more space. */
+ if (n > -1) utstring_reserve(s,n+1); /* exact */
+ else utstring_reserve(s,(s->n)*2); /* 2x */
+ }
+}
+#ifdef __GNUC__
+/* support printf format checking (2=the format string, 3=start of varargs) */
+static void utstring_printf(UT_string *s, const char *fmt, ...)
+ __attribute__ (( format( printf, 2, 3) ));
+#endif
+_UNUSED_ static void utstring_printf(UT_string *s, const char *fmt, ...) {
+ va_list ap;
+ va_start(ap,fmt);
+ utstring_printf_va(s,fmt,ap);
+ va_end(ap);
+}
+
+/*******************************************************************************
+ * begin substring search functions *
+ ******************************************************************************/
+/* Build KMP table from left to right. */
+_UNUSED_ static void _utstring_BuildTable(
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+
+ i = 0;
+ j = i - 1;
+ P_KMP_Table[i] = j;
+ while (i < (long) P_NeedleLen)
+ {
+ while ( (j > -1) && (P_Needle[i] != P_Needle[j]) )
+ {
+ j = P_KMP_Table[j];
+ }
+ i++;
+ j++;
+ if (i < (long) P_NeedleLen)
+ {
+ if (P_Needle[i] == P_Needle[j])
+ {
+ P_KMP_Table[i] = P_KMP_Table[j];
+ }
+ else
+ {
+ P_KMP_Table[i] = j;
+ }
+ }
+ else
+ {
+ P_KMP_Table[i] = j;
+ }
+ }
+
+ return;
+}
+
+
+/* Build KMP table from right to left. */
+_UNUSED_ static void _utstring_BuildTableR(
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+
+ i = P_NeedleLen - 1;
+ j = i + 1;
+ P_KMP_Table[i + 1] = j;
+ while (i >= 0)
+ {
+ while ( (j < (long) P_NeedleLen) && (P_Needle[i] != P_Needle[j]) )
+ {
+ j = P_KMP_Table[j + 1];
+ }
+ i--;
+ j--;
+ if (i >= 0)
+ {
+ if (P_Needle[i] == P_Needle[j])
+ {
+ P_KMP_Table[i + 1] = P_KMP_Table[j + 1];
+ }
+ else
+ {
+ P_KMP_Table[i + 1] = j;
+ }
+ }
+ else
+ {
+ P_KMP_Table[i + 1] = j;
+ }
+ }
+
+ return;
+}
+
+
+/* Search data from left to right. ( Multiple search mode. ) */
+_UNUSED_ static long _utstring_find(
+ const char *P_Haystack,
+ size_t P_HaystackLen,
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+ long V_FindPosition = -1;
+
+ /* Search from left to right. */
+ i = j = 0;
+ while ( (j < (int)P_HaystackLen) && (((P_HaystackLen - j) + i) >= P_NeedleLen) )
+ {
+ while ( (i > -1) && (P_Needle[i] != P_Haystack[j]) )
+ {
+ i = P_KMP_Table[i];
+ }
+ i++;
+ j++;
+ if (i >= (int)P_NeedleLen)
+ {
+ /* Found. */
+ V_FindPosition = j - i;
+ break;
+ }
+ }
+
+ return V_FindPosition;
+}
+
+
+/* Search data from right to left. ( Multiple search mode. ) */
+_UNUSED_ static long _utstring_findR(
+ const char *P_Haystack,
+ size_t P_HaystackLen,
+ const char *P_Needle,
+ size_t P_NeedleLen,
+ long *P_KMP_Table)
+{
+ long i, j;
+ long V_FindPosition = -1;
+
+ /* Search from right to left. */
+ j = (P_HaystackLen - 1);
+ i = (P_NeedleLen - 1);
+ while ( (j >= 0) && (j >= i) )
+ {
+ while ( (i < (int)P_NeedleLen) && (P_Needle[i] != P_Haystack[j]) )
+ {
+ i = P_KMP_Table[i + 1];
+ }
+ i--;
+ j--;
+ if (i < 0)
+ {
+ /* Found. */
+ V_FindPosition = j + 1;
+ break;
+ }
+ }
+
+ return V_FindPosition;
+}
+
+
+/* Search data from left to right. ( One time search mode. ) */
+_UNUSED_ static long utstring_find(
+ UT_string *s,
+ long P_StartPosition, /* Start from 0. -1 means last position. */
+ const char *P_Needle,
+ size_t P_NeedleLen)
+{
+ long V_StartPosition;
+ long V_HaystackLen;
+ long *V_KMP_Table;
+ long V_FindPosition = -1;
+
+ if (P_StartPosition < 0)
+ {
+ V_StartPosition = s->i + P_StartPosition;
+ }
+ else
+ {
+ V_StartPosition = P_StartPosition;
+ }
+ V_HaystackLen = s->i - V_StartPosition;
+ if ( (V_HaystackLen >= (long) P_NeedleLen) && (P_NeedleLen > 0) )
+ {
+ V_KMP_Table = (long *)malloc(sizeof(long) * (P_NeedleLen + 1));
+ if (V_KMP_Table != NULL)
+ {
+ _utstring_BuildTable(P_Needle, P_NeedleLen, V_KMP_Table);
+
+ V_FindPosition = _utstring_find(s->d + V_StartPosition,
+ V_HaystackLen,
+ P_Needle,
+ P_NeedleLen,
+ V_KMP_Table);
+ if (V_FindPosition >= 0)
+ {
+ V_FindPosition += V_StartPosition;
+ }
+
+ free(V_KMP_Table);
+ }
+ }
+
+ return V_FindPosition;
+}
+
+
+/* Search data from right to left. ( One time search mode. ) */
+_UNUSED_ static long utstring_findR(
+ UT_string *s,
+ long P_StartPosition, /* Start from 0. -1 means last position. */
+ const char *P_Needle,
+ size_t P_NeedleLen)
+{
+ long V_StartPosition;
+ long V_HaystackLen;
+ long *V_KMP_Table;
+ long V_FindPosition = -1;
+
+ if (P_StartPosition < 0)
+ {
+ V_StartPosition = s->i + P_StartPosition;
+ }
+ else
+ {
+ V_StartPosition = P_StartPosition;
+ }
+ V_HaystackLen = V_StartPosition + 1;
+ if ( (V_HaystackLen >= (long) P_NeedleLen) && (P_NeedleLen > 0) )
+ {
+ V_KMP_Table = (long *)malloc(sizeof(long) * (P_NeedleLen + 1));
+ if (V_KMP_Table != NULL)
+ {
+ _utstring_BuildTableR(P_Needle, P_NeedleLen, V_KMP_Table);
+
+ V_FindPosition = _utstring_findR(s->d,
+ V_HaystackLen,
+ P_Needle,
+ P_NeedleLen,
+ V_KMP_Table);
+
+ free(V_KMP_Table);
+ }
+ }
+
+ return V_FindPosition;
+}
+/*******************************************************************************
+ * end substring search functions *
+ ******************************************************************************/
+
+#endif /* UTSTRING_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/zconf.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/zconf.h
new file mode 100644
index 0000000..02ce56c
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/zconf.h
@@ -0,0 +1,428 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
+# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
+# define deflateEnd z_deflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateInit_ z_deflateInit_
+# define deflateParams z_deflateParams
+# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetHeader z_inflateGetHeader
+# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateUndermine z_inflateUndermine
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
+# define uncompress z_uncompress
+# define zError z_zError
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
+# define alloc_func z_alloc_func
+# define charf z_charf
+# define free_func z_free_func
+# define gzFile z_gzFile
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
+# define in_func z_in_func
+# define intf z_intf
+# define out_func z_out_func
+# define uInt z_uInt
+# define uIntf z_uIntf
+# define uLong z_uLong
+# define uLongf z_uLongf
+# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef STDC
+# include <sys/types.h> /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
+#endif
+
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+# define z_off64_t off64_t
+#else
+# define z_off64_t z_off_t
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/zlib.h b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/zlib.h
new file mode 100644
index 0000000..bfbba83
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/include/zlib.h
@@ -0,0 +1,1613 @@
+/* zlib.h -- interface of the 'zlib' general purpose compression library
+ version 1.2.5, April 19th, 2010
+
+ Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.
+ 3. This notice may not be removed or altered from any source distribution.
+
+ Jean-loup Gailly Mark Adler
+ jloup@gzip.org madler@alumni.caltech.edu
+
+
+ The data format used by the zlib library is described by RFCs (Request for
+ Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt
+ (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format).
+*/
+
+#ifndef ZLIB_H
+#define ZLIB_H
+
+#include "zconf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ZLIB_VERSION "1.2.5"
+#define ZLIB_VERNUM 0x1250
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_SUBREVISION 0
+
+/*
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed data.
+ This version of the library supports only one compression method (deflation)
+ but other algorithms will be added later and will have the same stream
+ interface.
+
+ Compression can be done in a single step if the buffers are large enough,
+ or can be done by repeated calls of the compression function. In the latter
+ case, the application must provide more input and/or consume the output
+ (providing more output space) before each call.
+
+ The compressed data format used by default by the in-memory functions is
+ the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
+ around a deflate stream, which is itself documented in RFC 1951.
+
+ The library also supports reading and writing files in gzip (.gz) format
+ with an interface similar to that of stdio using the functions that start
+ with "gz". The gzip format is different from the zlib format. gzip is a
+ gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
+
+ This library can optionally read and write gzip streams in memory as well.
+
+ The zlib format was designed to be compact and fast for use in memory
+ and on communications channels. The gzip format was designed for single-
+ file compression on file systems, has a larger header than zlib to maintain
+ directory information, and uses a different, slower check method than zlib.
+
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never crash
+ even in case of corrupted input.
+*/
+
+typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
+typedef void (*free_func) OF((voidpf opaque, voidpf address));
+
+struct internal_state;
+
+typedef struct z_stream_s {
+ Bytef *next_in; /* next input byte */
+ uInt avail_in; /* number of bytes available at next_in */
+ uLong total_in; /* total nb of input bytes read so far */
+
+ Bytef *next_out; /* next output byte should be put there */
+ uInt avail_out; /* remaining free space at next_out */
+ uLong total_out; /* total nb of bytes output so far */
+
+ char *msg; /* last error message, NULL if no error */
+ struct internal_state FAR *state; /* not visible by applications */
+
+ alloc_func zalloc; /* used to allocate the internal state */
+ free_func zfree; /* used to free the internal state */
+ voidpf opaque; /* private data object passed to zalloc and zfree */
+
+ int data_type; /* best guess about the data type: binary or text */
+ uLong adler; /* adler32 value of the uncompressed data */
+ uLong reserved; /* reserved for future use */
+} z_stream;
+
+typedef z_stream FAR *z_streamp;
+
+/*
+ gzip header information passed to and from zlib routines. See RFC 1952
+ for more details on the meanings of these fields.
+*/
+typedef struct gz_header_s {
+ int text; /* true if compressed data believed to be text */
+ uLong time; /* modification time */
+ int xflags; /* extra flags (not used when writing a gzip file) */
+ int os; /* operating system */
+ Bytef *extra; /* pointer to extra field or Z_NULL if none */
+ uInt extra_len; /* extra field length (valid if extra != Z_NULL) */
+ uInt extra_max; /* space at extra (only when reading header) */
+ Bytef *name; /* pointer to zero-terminated file name or Z_NULL */
+ uInt name_max; /* space at name (only when reading header) */
+ Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */
+ uInt comm_max; /* space at comment (only when reading header) */
+ int hcrc; /* true if there was or will be a header crc */
+ int done; /* true when done reading gzip header (not used
+ when writing a gzip file) */
+} gz_header;
+
+typedef gz_header FAR *gz_headerp;
+
+/*
+ The application must update next_in and avail_in when avail_in has dropped
+ to zero. It must update next_out and avail_out when avail_out has dropped
+ to zero. The application must initialize zalloc, zfree and opaque before
+ calling the init function. All other fields are set by the compression
+ library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
+ opaque value.
+
+ zalloc must return Z_NULL if there is not enough memory for the object.
+ If zlib is used in a multi-threaded application, zalloc and zfree must be
+ thread safe.
+
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this if
+ the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers
+ returned by zalloc for objects of exactly 65536 bytes *must* have their
+ offset normalized to zero. The default allocation function provided by this
+ library ensures this (see zutil.c). To reduce memory requirements and avoid
+ any allocation of 64K objects, at the expense of compression ratio, compile
+ the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or progress
+ reports. After compression, total_in holds the total size of the
+ uncompressed data and may be saved for use in the decompressor (particularly
+ if the decompressor wants to decompress everything in a single step).
+*/
+
+ /* constants */
+
+#define Z_NO_FLUSH 0
+#define Z_PARTIAL_FLUSH 1
+#define Z_SYNC_FLUSH 2
+#define Z_FULL_FLUSH 3
+#define Z_FINISH 4
+#define Z_BLOCK 5
+#define Z_TREES 6
+/* Allowed flush values; see deflate() and inflate() below for details */
+
+#define Z_OK 0
+#define Z_STREAM_END 1
+#define Z_NEED_DICT 2
+#define Z_ERRNO (-1)
+#define Z_STREAM_ERROR (-2)
+#define Z_DATA_ERROR (-3)
+#define Z_MEM_ERROR (-4)
+#define Z_BUF_ERROR (-5)
+#define Z_VERSION_ERROR (-6)
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
+ */
+
+#define Z_NO_COMPRESSION 0
+#define Z_BEST_SPEED 1
+#define Z_BEST_COMPRESSION 9
+#define Z_DEFAULT_COMPRESSION (-1)
+/* compression levels */
+
+#define Z_FILTERED 1
+#define Z_HUFFMAN_ONLY 2
+#define Z_RLE 3
+#define Z_FIXED 4
+#define Z_DEFAULT_STRATEGY 0
+/* compression strategy; see deflateInit2() below for details */
+
+#define Z_BINARY 0
+#define Z_TEXT 1
+#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */
+#define Z_UNKNOWN 2
+/* Possible values of the data_type field (though see inflate()) */
+
+#define Z_DEFLATED 8
+/* The deflate compression method (the only one supported in this version) */
+
+#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */
+
+#define zlib_version zlibVersion()
+/* for compatibility with versions < 1.0.2 */
+
+
+ /* basic functions */
+
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
+/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
+ If the first character differs, the library code actually used is not
+ compatible with the zlib.h header file used by the application. This check
+ is automatically made by deflateInit and inflateInit.
+ */
+
+/*
+ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
+
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller. If
+ zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+ allocation functions.
+
+ The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at all
+ (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION
+ requests a default compromise between speed and compression (currently
+ equivalent to level 6).
+
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if level is not a valid compression level, or
+ Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
+ with the version assumed by the caller (ZLIB_VERSION). msg is set to null
+ if there is no error message. deflateInit does not perform any compression:
+ this will be done by deflate().
+*/
+
+
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
+/*
+ deflate compresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. deflate performs one or both of the
+ following actions:
+
+ - Compress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in and avail_in are updated and
+ processing will resume at this point for the next call of deflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. This action is forced if the parameter flush is non zero.
+ Forcing flush frequently degrades the compression ratio, so this parameter
+ should be set only when necessary (in interactive applications). Some
+ output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating avail_in or avail_out accordingly; avail_out should
+ never be zero before the call. The application can consume the compressed
+ output when it wants, for example when the output buffer is full (avail_out
+ == 0), or after each call of deflate(). If deflate returns Z_OK and with
+ zero avail_out, it must be called again after making room in the output
+ buffer because there might be more output pending.
+
+ Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
+ decide how much data to accumulate before producing output, in order to
+ maximize compression.
+
+ If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
+ flushed to the output buffer and the output is aligned on a byte boundary, so
+ that the decompressor can get all input data available so far. (In
+ particular avail_in is zero after the call if enough output space has been
+ provided before the call.) Flushing may degrade compression for some
+ compression algorithms and so it should be used only when necessary. This
+ completes the current deflate block and follows it with an empty stored block
+ that is three bits plus filler bits to the next byte, followed by four bytes
+ (00 00 ff ff).
+
+ If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+ output buffer, but the output is not aligned to a byte boundary. All of the
+ input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+ This completes the current deflate block and follows it with an empty fixed
+ codes block that is 10 bits long. This assures that enough bytes are output
+ in order for the decompressor to finish the block before the empty fixed code
+ block.
+
+ If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+ for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+ seven bits of the current block are held to be written as the next byte after
+ the next deflate block is completed. In this case, the decompressor may not
+ be provided enough bits at this point in order to complete decompression of
+ the data provided so far to the compressor. It may need to wait for the next
+ block to be emitted. This is for advanced applications that need to control
+ the emission of deflate blocks.
+
+ If flush is set to Z_FULL_FLUSH, all output is flushed as with
+ Z_SYNC_FLUSH, and the compression state is reset so that decompression can
+ restart from this point if previous compressed data has been damaged or if
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ compression.
+
+ If deflate returns with avail_out == 0, this function must be called again
+ with the same value of the flush parameter and more output space (updated
+ avail_out), until the flush is complete (deflate returns with non-zero
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out is greater than six to avoid repeated flush markers due to
+ avail_out == 0 on return.
+
+ If the parameter flush is set to Z_FINISH, pending input is processed,
+ pending output is flushed and deflate returns with Z_STREAM_END if there was
+ enough output space; if deflate returns with Z_OK, this function must be
+ called again with Z_FINISH and more output space (updated avail_out) but no
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the stream
+ are deflateReset or deflateEnd.
+
+ Z_FINISH can be used immediately after deflateInit if all the compression
+ is to be done in a single step. In this case, avail_out must be at least the
+ value returned by deflateBound (see below). If deflate does not return
+ Z_STREAM_END, then it must be called again as described above.
+
+ deflate() sets strm->adler to the adler32 checksum of all input read
+ so far (that is, total_in bytes).
+
+ deflate() may update strm->data_type if it can make a good guess about
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect the
+ compression algorithm in any manner.
+
+ deflate() returns Z_OK if some progress has been made (more input
+ processed or more output produced), Z_STREAM_END if all input has been
+ consumed and all output has been produced (only when flush is set to
+ Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
+ if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ fatal, and deflate() can be called again with more input and more output
+ space to continue compressing.
+*/
+
+
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any pending
+ output.
+
+ deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
+ stream state was inconsistent, Z_DATA_ERROR if the stream was freed
+ prematurely (some input or output was discarded). In the error case, msg
+ may be set but then points to a static string (which must not be
+ deallocated).
+*/
+
+
+/*
+ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
+
+ Initializes the internal stream state for decompression. The fields
+ next_in, avail_in, zalloc, zfree and opaque must be initialized before by
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the
+ exact value depends on the compression method), inflateInit determines the
+ compression method from the zlib header and allocates all data structures
+ accordingly; otherwise the allocation will be deferred to the first call of
+ inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
+ use default allocation functions.
+
+ inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit() does not process any header information -- that is deferred
+ until inflate() is called.
+*/
+
+
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
+/*
+ inflate decompresses as much data as possible, and stops when the input
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
+ forced to flush.
+
+ The detailed semantics are as follows. inflate performs one or both of the
+ following actions:
+
+ - Decompress more input starting at next_in and update next_in and avail_in
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing will
+ resume at this point for the next call of inflate().
+
+ - Provide more output starting at next_out and update next_out and avail_out
+ accordingly. inflate() provides as much output as possible, until there is
+ no more input data or no more space in the output buffer (see below about
+ the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating the next_* and avail_* values accordingly. The
+ application can consume the uncompressed output when it wants, for example
+ when the output buffer is full (avail_out == 0), or after each call of
+ inflate(). If inflate returns Z_OK and with zero avail_out, it must be
+ called again after making room in the output buffer because there might be
+ more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+ Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate()
+ stop if and when it gets to the next deflate block boundary. When decoding
+ the zlib or gzip format, this will cause inflate() to return immediately
+ after the header and before the first block. When doing a raw inflate,
+ inflate() will go ahead and process the first block, and will return when it
+ gets to the end of that block, or when it runs out of data.
+
+ The Z_BLOCK option assists in appending to or combining deflate streams.
+ Also to assist in this, on return inflate() will set strm->data_type to the
+ number of unused bits in the last byte taken from strm->next_in, plus 64 if
+ inflate() is currently decoding the last block in the deflate stream, plus
+ 128 if inflate() returned immediately after decoding an end-of-block code or
+ decoding the complete header up to just before the first byte of the deflate
+ stream. The end-of-block will not be indicated until all of the uncompressed
+ data from that block has been written to strm->next_out. The number of
+ unused bits may in general be greater than seven, except when bit 7 of
+ data_type is set, in which case the number of unused bits will be less than
+ eight. data_type is set as noted here every time inflate() returns for all
+ flush options, and so can be used to determine the amount of currently
+ consumed input in bits.
+
+ The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+ end of each deflate block header is reached, before any actual data in that
+ block is decoded. This allows the caller to determine the length of the
+ deflate block header for later use in random access within a deflate block.
+ 256 is added to the value of strm->data_type when inflate() returns
+ immediately after reaching the end of the deflate block header.
+
+ inflate() should normally be called until it returns Z_STREAM_END or an
+ error. However if all decompression is to be performed in a single step (a
+ single call of inflate), the parameter flush should be set to Z_FINISH. In
+ this case all pending input is processed and all pending output is flushed;
+ avail_out must be large enough to hold all the uncompressed data. (The size
+ of the uncompressed data may have been saved by the compressor for this
+ purpose.) The next operation on this stream must be inflateEnd to deallocate
+ the decompression state. The use of Z_FINISH is never required, but can be
+ used to inform inflate that a faster approach may be used for the single
+ inflate() call.
+
+ In this implementation, inflate() always flushes as much output as
+ possible to the output buffer, and always uses the faster approach on the
+ first call. So the only effect of the flush parameter in this implementation
+ is on the return value of inflate(), as noted below, or when it returns early
+ because Z_BLOCK or Z_TREES is used.
+
+ If a preset dictionary is needed after this call (see inflateSetDictionary
+ below), inflate sets strm->adler to the adler32 checksum of the dictionary
+ chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
+ strm->adler to the adler32 checksum of all output produced so far (that is,
+ total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
+ below. At the end of the stream, inflate() checks that its computed adler32
+ checksum is equal to that saved by the compressor and returns Z_STREAM_END
+ only if the checksum is correct.
+
+ inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically, if requested when
+ initializing with inflateInit2(). Any information contained in the gzip
+ header is not retained, so applications that need that information should
+ instead use raw inflate, see inflateInit2() below, or inflateBack() and
+ perform their own processing of the gzip header and trailer.
+
+ inflate() returns Z_OK if some progress has been made (more input processed
+ or more output produced), Z_STREAM_END if the end of the compressed data has
+ been reached and all uncompressed output has been produced, Z_NEED_DICT if a
+ preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
+ corrupted (input stream not conforming to the zlib format or incorrect check
+ value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
+ next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
+ Z_BUF_ERROR if no progress is possible or if there was not enough room in the
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ inflate() can be called again with more input and more output space to
+ continue decompressing. If Z_DATA_ERROR is returned, the application may
+ then call inflateSync() to look for a good compression block if a partial
+ recovery of the data is desired.
+*/
+
+
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
+/*
+ All dynamically allocated data structures for this stream are freed.
+ This function discards any unprocessed input and does not flush any pending
+ output.
+
+ inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
+ was inconsistent. In the error case, msg may be set but then points to a
+ static string (which must not be deallocated).
+*/
+
+
+ /* Advanced functions */
+
+/*
+ The following functions are needed only in some special applications.
+*/
+
+/*
+ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
+ int level,
+ int method,
+ int windowBits,
+ int memLevel,
+ int strategy));
+
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by the
+ caller.
+
+ The method parameter is the compression method. It must be Z_DEFLATED in
+ this version of the library.
+
+ The windowBits parameter is the base two logarithm of the window size
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
+ deflateInit is used instead.
+
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
+ with no zlib header or trailer, and will not compute an adler32 check value.
+
+ windowBits can also be greater than 15 for optional gzip encoding. Add
+ 16 to windowBits to write a simple gzip header and trailer around the
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero), no
+ header crc, and the operating system will be set to 255 (unknown). If a
+ gzip stream is being written, strm->adler is a crc32 instead of an adler32.
+
+ The memLevel parameter specifies how much memory should be allocated
+ for the internal compression state. memLevel=1 uses minimum memory but is
+ slow and reduces compression ratio; memLevel=9 uses maximum memory for
+ optimal speed. The default value is 8. See zconf.h for total memory usage
+ as a function of windowBits and memLevel.
+
+ The strategy parameter is used to tune the compression algorithm. Use the
+ value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
+ filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
+ string match), or Z_RLE to limit match distances to one (run-length
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
+ coding and less string matching; it is somewhat intermediate between
+ Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
+ fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
+ strategy parameter only affects the compression ratio but not the
+ correctness of the compressed output even if it is not set appropriately.
+ Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+ decoder for special applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+ method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+ incompatible with the version assumed by the caller (ZLIB_VERSION). msg is
+ set to null if there is no error message. deflateInit2 does not perform any
+ compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the compression dictionary from the given byte sequence
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any call
+ of deflate. The compressor and decompressor must use exactly the same
+ dictionary (see inflateSetDictionary).
+
+ The dictionary should consist of strings (byte sequences) that are likely
+ to be encountered later in the data to be compressed, with the most commonly
+ used strings preferably put towards the end of the dictionary. Using a
+ dictionary is most useful when the data to be compressed is short and can be
+ predicted with good accuracy; the data can then be compressed better than
+ with the default empty dictionary.
+
+ Depending on the size of the compression data structures selected by
+ deflateInit or deflateInit2, a part of the dictionary may in effect be
+ discarded, for example if the dictionary is larger than the window size
+ provided in deflateInit or deflateInit2. Thus the strings most likely to be
+ useful should be put at the end of the dictionary, not at the front. In
+ addition, the current implementation of deflate will use at most the window
+ size minus 262 bytes of the provided dictionary.
+
+ Upon return of this function, strm->adler is set to the adler32 value
+ of the dictionary; the decompressor may later use this value to determine
+ which dictionary has been used by the compressor. (The adler32 value
+ applies to the whole dictionary even if only a subset of the dictionary is
+ actually used by the compressor.) If a raw deflate was requested, then the
+ adler32 value is not computed and strm->adler is not set.
+
+ deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
+ inconsistent (for example if deflate has already been called for this stream
+ or if the compression method is bsort). deflateSetDictionary does not
+ perform any compression: this will be done by deflate().
+*/
+
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when several compression strategies will be
+ tried, for example when there are several ways of pre-processing the input
+ data with a filter. The streams that will be discarded should then be freed
+ by calling deflateEnd. Note that deflateCopy duplicates the internal
+ compression state which can be quite large, so this strategy is slow and can
+ consume lots of memory.
+
+ deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to deflateEnd followed by deflateInit,
+ but does not free and reallocate all the internal compression state. The
+ stream will keep the same compression level and any other attributes that
+ may have been set by deflateInit2.
+
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
+ int level,
+ int strategy));
+/*
+ Dynamically update the compression level and compression strategy. The
+ interpretation of level and strategy is as in deflateInit2. This can be
+ used to switch between compression and straight copy of the input data, or
+ to switch to a different kind of input data requiring a different strategy.
+ If the compression level is changed, the input available so far is
+ compressed with the old level (and may be flushed); the new level will take
+ effect only at the next call of deflate().
+
+ Before the call of deflateParams, the stream state must be set as for
+ a call of deflate(), since the currently available input may have to be
+ compressed and flushed. In particular, strm->avail_out must be non-zero.
+
+ deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+ strm->avail_out was zero.
+*/
+
+ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
+ int good_length,
+ int max_lazy,
+ int nice_length,
+ int max_chain));
+/*
+ Fine tune deflate's internal compression parameters. This should only be
+ used by someone who understands the algorithm used by zlib's deflate for
+ searching for the best matching string, and even then only by the most
+ fanatic optimizer trying to squeeze out the last compressed bit for their
+ specific input data. Read the deflate.c source code for the meaning of the
+ max_lazy, good_length, nice_length, and max_chain parameters.
+
+ deflateTune() can be called after deflateInit() or deflateInit2(), and
+ returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream.
+ */
+
+ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
+ uLong sourceLen));
+/*
+ deflateBound() returns an upper bound on the compressed size after
+ deflation of sourceLen bytes. It must be called after deflateInit() or
+ deflateInit2(), and after deflateSetHeader(), if used. This would be used
+ to allocate an output buffer for deflation in a single pass, and so would be
+ called before deflate().
+*/
+
+ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ deflatePrime() inserts bits in the deflate output stream. The intent
+ is that this function is used to start off the deflate output with the bits
+ leftover from a previous deflate stream when appending to it. As such, this
+ function can only be used for raw deflate, and must be used before the first
+ deflate() call after a deflateInit2() or deflateReset(). bits must be less
+ than or equal to 16, and that many of the least significant bits of value
+ will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ deflateSetHeader() provides gzip header information for when a gzip
+ stream is requested by deflateInit2(). deflateSetHeader() may be called
+ after deflateInit2() or deflateReset() and before the first call of
+ deflate(). The text, time, os, extra field, name, and comment information
+ in the provided gz_header structure are written to the gzip header (xflag is
+ ignored -- the extra flags are set according to the compression level). The
+ caller must assure that, if not Z_NULL, name and comment are terminated with
+ a zero byte, and that if extra is not Z_NULL, that extra_len bytes are
+ available there. If hcrc is true, a gzip header crc is included. Note that
+ the current versions of the command-line version of gzip (up through version
+ 1.3.x) do not support header crc's, and will report that it is a "multi-part
+ gzip file" and give up.
+
+ If deflateSetHeader is not used, the default gzip header has text false,
+ the time set to zero, and os set to 255, with no extra, name, or comment
+ fields. The gzip header is returned to the default state by deflateReset().
+
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
+ int windowBits));
+
+ This is another version of inflateInit with an extra parameter. The
+ fields next_in, avail_in, zalloc, zfree and opaque must be initialized
+ before by the caller.
+
+ The windowBits parameter is the base two logarithm of the maximum window
+ size (the size of the history buffer). It should be in the range 8..15 for
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
+ provided to deflateInit2() while compressing, or it must be equal to 15 if
+ deflateInit2() was not used. If a compressed stream with a larger window
+ size is given as input, inflate() will return with the error code
+ Z_DATA_ERROR instead of trying to allocate a larger window.
+
+ windowBits can also be zero to request that inflate use the window size in
+ the zlib header of the compressed stream.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
+ not looking for a zlib or gzip header, not generating a check value, and not
+ looking for any check values for comparison at the end of the stream. This
+ is for use with other formats that use the deflate compressed data format
+ such as zip. Those formats provide their own check values. If a custom
+ format is developed using the raw deflate format for compressed data, it is
+ recommended that a check value such as an adler32 or a crc32 be applied to
+ the uncompressed data as is done in the zlib, gzip, and zip formats. For
+ most applications, the zlib format should be used as is. Note that comments
+ above on the use in deflateInit2() applies to the magnitude of windowBits.
+
+ windowBits can also be greater than 15 for optional gzip decoding. Add
+ 32 to windowBits to enable zlib and gzip decoding with automatic header
+ detection, or add 16 to decode only the gzip format (the zlib format will
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
+ crc32 instead of an adler32.
+
+ inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit2 does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit2() does not process any header information -- that is
+ deferred until inflate() is called.
+*/
+
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ const Bytef *dictionary,
+ uInt dictLength));
+/*
+ Initializes the decompression dictionary from the given uncompressed byte
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ can be determined from the adler32 value returned by that call of inflate.
+ The compressor and decompressor must use exactly the same dictionary (see
+ deflateSetDictionary). For raw inflate, this function can be called
+ immediately after inflateInit2() or inflateReset() and before any call of
+ inflate() to set the dictionary. The application must insure that the
+ dictionary that was used for compression is provided.
+
+ inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
+ inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
+ expected one (incorrect adler32 value). inflateSetDictionary does not
+ perform any decompression: this will be done by subsequent calls of
+ inflate().
+*/
+
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
+/*
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been
+ found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the
+ success case, the application may save the current current value of total_in
+ which indicates where valid compressed data was found. In the error case,
+ the application may repeatedly call inflateSync, providing more input each
+ time, until success or end of the input data.
+*/
+
+ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
+ z_streamp source));
+/*
+ Sets the destination stream as a complete copy of the source stream.
+
+ This function can be useful when randomly accessing a large stream. The
+ first pass through the stream can periodically record the inflate state,
+ allowing restarting inflate at those points when randomly accessing the
+ stream.
+
+ inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
+ destination.
+*/
+
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
+/*
+ This function is equivalent to inflateEnd followed by inflateInit,
+ but does not free and reallocate all the internal decompression state. The
+ stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
+
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+ int windowBits));
+/*
+ This function is the same as inflateReset, but it also permits changing
+ the wrap and window size requests. The windowBits parameter is interpreted
+ the same as it is for inflateInit2.
+
+ inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+ the windowBits parameter is invalid.
+*/
+
+ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
+ int bits,
+ int value));
+/*
+ This function inserts bits in the inflate input stream. The intent is
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ If bits is negative, then the input stream bit buffer is emptied. Then
+ inflatePrime() can be called again to put bits in the buffer. This is used
+ to clear out bits leftover after feeding inflate a block description prior
+ to feeding inflate codes.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+ This function returns two values, one in the lower 16 bits of the return
+ value, and the other in the remaining upper bits, obtained by shifting the
+ return value down 16 bits. If the upper value is -1 and the lower value is
+ zero, then inflate() is currently decoding information outside of a block.
+ If the upper value is -1 and the lower value is non-zero, then inflate is in
+ the middle of a stored block, with the lower value equaling the number of
+ bytes from the input remaining to copy. If the upper value is not -1, then
+ it is the number of bits back from the current bit position in the input of
+ the code (literal or length/distance pair) currently being processed. In
+ that case the lower value is the number of bytes already emitted for that
+ code.
+
+ A code is being processed if inflate is waiting for more input to complete
+ decoding of the code, or if it has completed decoding but is waiting for
+ more output space to write the literal or match data.
+
+ inflateMark() is used to mark locations in the input data for random
+ access, which may be at bit positions, and to note those cases where the
+ output of a code may span boundaries of random access blocks. The current
+ location in the input stream can be determined from avail_in and data_type
+ as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+ inflateMark returns the value noted above or -1 << 16 if the provided
+ source stream state was inconsistent.
+*/
+
+ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
+ gz_headerp head));
+/*
+ inflateGetHeader() requests that gzip header information be stored in the
+ provided gz_header structure. inflateGetHeader() may be called after
+ inflateInit2() or inflateReset(), and before the first call of inflate().
+ As inflate() processes the gzip stream, head->done is zero until the header
+ is completed, at which time head->done is set to one. If a zlib stream is
+ being decoded, then head->done is set to -1 to indicate that there will be
+ no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be
+ used to force inflate() to return immediately after header processing is
+ complete and before any actual data is decompressed.
+
+ The text, time, xflags, and os fields are filled in with the gzip header
+ contents. hcrc is set to true if there is a header CRC. (The header CRC
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ contains the maximum number of bytes to write to extra. Once done is true,
+ extra_len contains the actual extra field length, and extra contains the
+ extra field, or that field truncated if extra_max is less than extra_len.
+ If name is not Z_NULL, then up to name_max characters are written there,
+ terminated with a zero unless the length is greater than name_max. If
+ comment is not Z_NULL, then up to comm_max characters are written there,
+ terminated with a zero unless the length is greater than comm_max. When any
+ of extra, name, or comment are not Z_NULL and the respective field is not
+ present in the header, then that field is set to Z_NULL to signal its
+ absence. This allows the use of deflateSetHeader() with the returned
+ structure to duplicate the header. However if those fields are set to
+ allocated memory, then the application will need to save those pointers
+ elsewhere so that they can be eventually freed.
+
+ If inflateGetHeader is not used, then the header information is simply
+ discarded. The header is always checked for validity, including the header
+ CRC if present. inflateReset() will reset the process to discard the header
+ information. The application would need to call inflateGetHeader() again to
+ retrieve the header from the next gzip stream.
+
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent.
+*/
+
+/*
+ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window));
+
+ Initialize the internal stream state for decompression using inflateBack()
+ calls. The fields zalloc, zfree and opaque in strm must be initialized
+ before the call. If zalloc and zfree are Z_NULL, then the default library-
+ derived memory allocation routines are used. windowBits is the base two
+ logarithm of the window size, in the range 8..15. window is a caller
+ supplied buffer of that size. Except for special applications where it is
+ assured that deflate was used with small window sizes, windowBits must be 15
+ and a 32K byte window must be supplied to be able to decompress general
+ deflate streams.
+
+ See inflateBack() for the usage of these routines.
+
+ inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+ allocated, or Z_VERSION_ERROR if the version of the library does not match
+ the version of the header file.
+*/
+
+typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
+typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned));
+
+ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
+ in_func in, void FAR *in_desc,
+ out_func out, void FAR *out_desc));
+/*
+ inflateBack() does a raw inflate with a single call using a call-back
+ interface for input and output. This is more efficient than inflate() for
+ file i/o applications in that it avoids copying between the output and the
+ sliding window by simply making the window itself the output buffer. This
+ function trusts the application to not change the output buffer passed by
+ the output function, at least until inflateBack() returns.
+
+ inflateBackInit() must be called first to allocate the internal state
+ and to initialize the state with the user-provided window buffer.
+ inflateBack() may then be used multiple times to inflate a complete, raw
+ deflate stream with each call. inflateBackEnd() is then called to free the
+ allocated state.
+
+ A raw deflate stream is one with no zlib or gzip header or trailer.
+ This routine would normally be used in a utility that reads zip or gzip
+ files and writes out uncompressed files. The utility would decode the
+ header and process the trailer on its own, hence this routine expects only
+ the raw deflate stream to decompress. This is different from the normal
+ behavior of inflate(), which expects either a zlib or gzip header and
+ trailer around the deflate stream.
+
+ inflateBack() uses two subroutines supplied by the caller that are then
+ called by inflateBack() for input and output. inflateBack() calls those
+ routines until it reads a complete deflate stream and writes out all of the
+ uncompressed data, or until it encounters an error. The function's
+ parameters and return types are defined above in the in_func and out_func
+ typedefs. inflateBack() will call in(in_desc, &buf) which should return the
+ number of bytes of provided input, and a pointer to that input in buf. If
+ there is no input available, in() must return zero--buf is ignored in that
+ case--and inflateBack() will return a buffer error. inflateBack() will call
+ out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out()
+ should return zero on success, or non-zero on failure. If out() returns
+ non-zero, inflateBack() will return with an error. Neither in() nor out()
+ are permitted to change the contents of the window provided to
+ inflateBackInit(), which is also the buffer that out() uses to write from.
+ The length written by out() will be at most the window size. Any non-zero
+ amount of input may be provided by in().
+
+ For convenience, inflateBack() can be provided input on the first call by
+ setting strm->next_in and strm->avail_in. If that input is exhausted, then
+ in() will be called. Therefore strm->next_in must be initialized before
+ calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
+ immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
+ must also be initialized, and then if strm->avail_in is not zero, input will
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+
+ The in_desc and out_desc parameters of inflateBack() is passed as the
+ first parameter of in() and out() respectively when they are called. These
+ descriptors can be optionally used to pass any information that the caller-
+ supplied in() and out() functions need to do their job.
+
+ On return, inflateBack() will set strm->next_in and strm->avail_in to
+ pass back any unused input that was provided by the last in() call. The
+ return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+ in the deflate stream (in which case strm->msg is set to indicate the nature
+ of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+ In the case of Z_BUF_ERROR, an input or output error can be distinguished
+ using strm->next_in which will be Z_NULL only if in() returned an error. If
+ strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+ non-zero. (in() will always be called before out(), so strm->next_in is
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
+ cannot return Z_OK.
+*/
+
+ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
+/*
+ All memory allocated by inflateBackInit() is freed.
+
+ inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream
+ state was inconsistent.
+*/
+
+ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
+/* Return flags indicating compile-time options.
+
+ Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other:
+ 1.0: size of uInt
+ 3.2: size of uLong
+ 5.4: size of voidpf (pointer)
+ 7.6: size of z_off_t
+
+ Compiler, assembler, and debug options:
+ 8: DEBUG
+ 9: ASMV or ASMINF -- use ASM code
+ 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention
+ 11: 0 (reserved)
+
+ One-time table building (smaller code, but not thread-safe if true):
+ 12: BUILDFIXED -- build static block decoding tables when needed
+ 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed
+ 14,15: 0 (reserved)
+
+ Library content (indicates missing functionality):
+ 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking
+ deflate code when not needed)
+ 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect
+ and decode gzip streams (to avoid linking crc code)
+ 18-19: 0 (reserved)
+
+ Operation variations (changes in library functionality):
+ 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate
+ 21: FASTEST -- deflate algorithm with only one, lowest compression level
+ 22,23: 0 (reserved)
+
+ The sprintf variant used by gzprintf (zero is best):
+ 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format
+ 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure!
+ 26: 0 = returns value, 1 = void -- 1 means inferred string length returned
+
+ Remainder:
+ 27-31: 0 (reserved)
+ */
+
+
+ /* utility functions */
+
+/*
+ The following utility functions are implemented on top of the basic
+ stream-oriented functions. To simplify the interface, some default options
+ are assumed (compression level and memory usage, standard memory allocation
+ functions). The source code of these utility functions can be modified if
+ you need special options.
+*/
+
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Compresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer.
+*/
+
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen,
+ int level));
+/*
+ Compresses the source buffer into the destination buffer. The level
+ parameter has the same meaning as in deflateInit. sourceLen is the byte
+ length of the source buffer. Upon entry, destLen is the total size of the
+ destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressed buffer.
+
+ compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_BUF_ERROR if there was not enough room in the output buffer,
+ Z_STREAM_ERROR if the level parameter is invalid.
+*/
+
+ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
+/*
+ compressBound() returns an upper bound on the compressed size after
+ compress() or compress2() on sourceLen bytes. It would be used before a
+ compress() or compress2() call to allocate the destination buffer.
+*/
+
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ const Bytef *source, uLong sourceLen));
+/*
+ Decompresses the source buffer into the destination buffer. sourceLen is
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be large enough to hold the entire
+ uncompressed data. (The size of the uncompressed data must have been saved
+ previously by the compressor and transmitted to the decompressor by some
+ mechanism outside the scope of this compression library.) Upon exit, destLen
+ is the actual size of the uncompressed buffer.
+
+ uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
+ enough memory, Z_BUF_ERROR if there was not enough room in the output
+ buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete.
+*/
+
+
+ /* gzip file access functions */
+
+/*
+ This library supports reading and writing files in gzip (.gz) format with
+ an interface similar to that of stdio, using the functions that start with
+ "gz". The gzip format is different from the zlib format. gzip is a gzip
+ wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef voidp gzFile; /* opaque gzip file descriptor */
+
+/*
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+ Opens a gzip (.gz) file for reading or writing. The mode parameter is as
+ in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+ a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+ compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+ for fixed code compression as in "wb9F". (See the description of
+ deflateInit2 for more information about the strategy parameter.) Also "a"
+ can be used instead of "w" to request that the gzip stream that will be
+ written be appended to the file. "+" will result in an error, since reading
+ and writing to the same gzip file is not supported.
+
+ gzopen can be used to read a file which is not in gzip format; in this
+ case gzread will directly read from the file without decompression.
+
+ gzopen returns NULL if the file could not be opened, if there was
+ insufficient memory to allocate the gzFile state, or if an invalid mode was
+ specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+ errno can be checked to determine if the reason gzopen failed was that the
+ file could not be opened.
+*/
+
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
+/*
+ gzdopen associates a gzFile with the file descriptor fd. File descriptors
+ are obtained from calls like open, dup, creat, pipe or fileno (if the file
+ has been previously opened with fopen). The mode parameter is as in gzopen.
+
+ The next call of gzclose on the returned gzFile will also close the file
+ descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+ fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+ mode);. The duplicated descriptor should be saved to avoid a leak, since
+ gzdopen does not close fd if it fails.
+
+ gzdopen returns NULL if there was insufficient memory to allocate the
+ gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+ provided, or '+' was provided), or if fd is -1. The file descriptor is not
+ used until the next gz* read, write, seek, or close operation, so gzdopen
+ will not detect if fd is invalid (unless fd is -1).
+*/
+
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
+/*
+ Set the internal buffer size used by this library's functions. The
+ default buffer size is 8192 bytes. This function must be called after
+ gzopen() or gzdopen(), and before any other calls that read or write the
+ file. The buffer memory allocation is always deferred to the first read or
+ write. Two buffers are allocated, either both of the specified size when
+ writing, or one of the specified size and the other twice that size when
+ reading. A larger buffer size of, for example, 64K or 128K bytes will
+ noticeably increase the speed of decompression (reading).
+
+ The new buffer size also affects the maximum length for gzprintf().
+
+ gzbuffer() returns 0 on success, or -1 on failure, such as being called
+ too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
+ of deflateInit2 for the meaning of these parameters.
+
+ gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
+ opened for writing.
+*/
+
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+/*
+ Reads the given number of uncompressed bytes from the compressed file. If
+ the input file was not in gzip format, gzread copies the given number of
+ bytes into the buffer.
+
+ After reaching the end of a gzip stream in the input, gzread will continue
+ to read, looking for another gzip stream, or failing that, reading the rest
+ of the input file directly without decompression. The entire input file
+ will be read if gzread is called until it returns less than the requested
+ len.
+
+ gzread returns the number of uncompressed bytes actually read, less than
+ len for end of file, or -1 for error.
+*/
+
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
+/*
+ Writes the given number of uncompressed bytes into the compressed file.
+ gzwrite returns the number of uncompressed bytes written or 0 in case of
+ error.
+*/
+
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
+/*
+ Converts, formats, and writes the arguments to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written, or 0 in case of error. The number of
+ uncompressed bytes written is limited to 8191, or one less than the buffer
+ size given to gzbuffer(). The caller should assure that this limit is not
+ exceeded. If it is exceeded, then gzprintf() will return an error (0) with
+ nothing written. In this case, there may also be a buffer overflow with
+ unpredictable consequences, which is possible only if zlib was compiled with
+ the insecure functions sprintf() or vsprintf() because the secure snprintf()
+ or vsnprintf() functions were not available. This can be determined using
+ zlibCompileFlags().
+*/
+
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
+/*
+ Writes the given null-terminated string to the compressed file, excluding
+ the terminating null character.
+
+ gzputs returns the number of characters written, or -1 in case of error.
+*/
+
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
+/*
+ Reads bytes from the compressed file until len-1 characters are read, or a
+ newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. If any characters are read or if len == 1, the
+ string is terminated with a null character. If no characters are read due
+ to an end-of-file or len < 1, then the buffer is left untouched.
+
+ gzgets returns buf which is a null-terminated string, or it returns NULL
+ for end-of-file or in case of error. If there was an error, the contents at
+ buf are indeterminate.
+*/
+
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
+/*
+ Writes c, converted to an unsigned char, into the compressed file. gzputc
+ returns the value that was written, or -1 in case of error.
+*/
+
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
+/*
+ Reads one byte from the compressed file. gzgetc returns this byte or -1
+ in case of end of file or error.
+*/
+
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
+/*
+ Push one character back onto the stream to be read as the first character
+ on the next read. At least one character of push-back is allowed.
+ gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
+ fail if c is -1, and may fail if a character has been pushed but not read
+ yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
+ output buffer size of pushed characters is allowed. (See gzbuffer above.)
+ The pushed character will be discarded if the stream is repositioned with
+ gzseek() or gzrewind().
+*/
+
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
+/*
+ Flushes all pending output into the compressed file. The parameter flush
+ is as in the deflate() function. The return value is the zlib error number
+ (see function gzerror below). gzflush is only permitted when writing.
+
+ If the flush parameter is Z_FINISH, the remaining data is written and the
+ gzip stream is completed in the output. If gzwrite() is called again, a new
+ gzip stream will be started in the output. gzread() is able to read such
+ concatented gzip streams.
+
+ gzflush should be called only when strictly necessary because it will
+ degrade compression if called too often.
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+
+ Sets the starting position for the next gzread or gzwrite on the given
+ compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
+ the value SEEK_END is not supported.
+
+ If the file is opened for reading, this function is emulated but can be
+ extremely slow. If the file is opened for writing, only forward seeks are
+ supported; gzseek then compresses a sequence of zeroes up to the new
+ starting position.
+
+ gzseek returns the resulting offset location as measured in bytes from
+ the beginning of the uncompressed stream, or -1 in case of error, in
+ particular if the file is opened for writing and the new starting position
+ would be before the current position.
+*/
+
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
+/*
+ Rewinds the given file. This function is supported only for reading.
+
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+
+ Returns the starting position for the next gzread or gzwrite on the given
+ compressed file. This position represents a number of bytes in the
+ uncompressed data stream, and is zero when starting, even if appending or
+ reading a gzip stream from the middle of a file using gzdopen().
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
+
+ Returns the current offset in the file being read or written. This offset
+ includes the count of bytes that precede the gzip stream, for example when
+ appending or when using gzdopen() for reading. When reading, the offset
+ does not include as yet unused buffered input. This information can be used
+ for a progress indicator. On error, gzoffset() returns -1.
+*/
+
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
+/*
+ Returns true (1) if the end-of-file indicator has been set while reading,
+ false (0) otherwise. Note that the end-of-file indicator is set only if the
+ read tried to go past the end of the input, but came up short. Therefore,
+ just like feof(), gzeof() may return false even if there is no more data to
+ read, in the event that the last read request was for the exact number of
+ bytes remaining in the input file. This will happen if the input file size
+ is an exact multiple of the buffer size.
+
+ If gzeof() returns true, then the read functions will return no more data,
+ unless the end-of-file indicator is reset by gzclearerr() and the input file
+ has grown since the previous end of file was detected.
+*/
+
+ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
+/*
+ Returns true (1) if file is being copied directly while reading, or false
+ (0) if file is a gzip stream being decompressed. This state can change from
+ false to true while reading the input file if the end of a gzip stream is
+ reached, but is followed by data that is not another gzip stream.
+
+ If the input file is empty, gzdirect() will return true, since the input
+ does not contain a gzip stream.
+
+ If gzdirect() is used immediately after gzopen() or gzdopen() it will
+ cause buffers to be allocated to allow reading the file to determine if it
+ is a gzip file. Therefore if gzbuffer() is used, it should be called before
+ gzdirect().
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file and
+ deallocates the (de)compression state. Note that once file is closed, you
+ cannot call gzerror with file, since its structures have been deallocated.
+ gzclose must not be called more than once on the same file, just as free
+ must not be called more than once on the same allocation.
+
+ gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+ file operation error, or Z_OK on success.
+*/
+
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
+/*
+ Same as gzclose(), but gzclose_r() is only for use when reading, and
+ gzclose_w() is only for use when writing or appending. The advantage to
+ using these instead of gzclose() is that they avoid linking in zlib
+ compression or decompression code that is not used when only reading or only
+ writing respectively. If gzclose() is used, then both compression and
+ decompression code will be included the application when linking to a static
+ zlib library.
+*/
+
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
+/*
+ Returns the error message for the last error which occurred on the given
+ compressed file. errnum is set to zlib error number. If an error occurred
+ in the file system and not in the compression library, errnum is set to
+ Z_ERRNO and the application may consult errno to get the exact error code.
+
+ The application must not modify the returned string. Future calls to
+ this function may invalidate the previously returned string. If file is
+ closed, then the string previously returned by gzerror will no longer be
+ available.
+
+ gzerror() should be used to distinguish errors from end-of-file for those
+ functions above that do not distinguish those cases in their return values.
+*/
+
+ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
+/*
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
+ file that is being written concurrently.
+*/
+
+
+ /* checksum functions */
+
+/*
+ These functions are not related to compression but are exported
+ anyway because they might be useful in applications using the compression
+ library.
+*/
+
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+/*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1] and
+ return the updated checksum. If buf is Z_NULL, this function returns the
+ required initial value for the checksum.
+
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster.
+
+ Usage example:
+
+ uLong adler = adler32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
+ z_off_t len2));
+
+ Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
+ and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
+ each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
+ seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
+*/
+
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+/*
+ Update a running CRC-32 with the bytes buf[0..len-1] and return the
+ updated CRC-32. If buf is Z_NULL, this function returns the required
+ initial value for the for the crc. Pre- and post-conditioning (one's
+ complement) is performed within this function so it shouldn't be done by the
+ application.
+
+ Usage example:
+
+ uLong crc = crc32(0L, Z_NULL, 0);
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = crc32(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+*/
+
+/*
+ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
+
+ Combine two CRC-32 check values into one. For two sequences of bytes,
+ seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
+ calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
+ check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
+ len2.
+*/
+
+
+ /* various hacks, don't look :) */
+
+/* deflateInit and inflateInit are macros to allow checking the zlib version
+ * and the compiler's view of z_stream:
+ */
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ int windowBits, int memLevel,
+ int strategy, const char *version,
+ int stream_size));
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ const char *version, int stream_size));
+ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
+ unsigned char FAR *window,
+ const char *version,
+ int stream_size));
+#define deflateInit(strm, level) \
+ deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit(strm) \
+ inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
+#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \
+ deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
+ (strategy), ZLIB_VERSION, sizeof(z_stream))
+#define inflateInit2(strm, windowBits) \
+ inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
+#define inflateBackInit(strm, windowBits, window) \
+ inflateBackInit_((strm), (windowBits), (window), \
+ ZLIB_VERSION, sizeof(z_stream))
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+# define gzopen gzopen64
+# define gzseek gzseek64
+# define gztell gztell64
+# define gzoffset gzoffset64
+# define adler32_combine adler32_combine64
+# define crc32_combine crc32_combine64
+# ifdef _LARGEFILE64_SOURCE
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+ ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+# endif
+#else
+ ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+
+/* hack for buggy compilers */
+#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
+ struct internal_state {int dummy;};
+#endif
+
+/* undocumented functions */
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* ZLIB_H */
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/mixer_ctrl.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/mixer_ctrl.c
new file mode 100644
index 0000000..770e2e8
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/mixer_ctrl.c
@@ -0,0 +1,253 @@
+/*
+Copyright Statement:
+
+This software/firmware and related documentation ("MediaTek Software") are
+protected under relevant copyright laws. The information contained herein is
+confidential and proprietary to MediaTek Inc. and/or its licensors. Without
+the prior written permission of MediaTek inc. and/or its licensors, any
+reproduction, modification, use or disclosure of MediaTek Software, and
+information contained herein, in whole or in part, shall be strictly
+prohibited.
+
+MediaTek Inc. (C) 2016. All rights reserved.
+
+BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
+THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
+RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
+ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
+WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
+NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
+RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
+INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
+TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
+RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
+OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
+SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
+RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
+STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
+ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
+RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
+MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
+CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
+
+Auther: Garlic Tseng <garlic.tseng@mediatek.com>
+*/
+
+#include <stdlib.h>
+#include <errno.h>
+#include <stdio.h>
+#include <alsa/asoundlib.h>
+#include "dev_string.h"
+#define STR_SIZE 128
+
+//mixer control structure for sound card
+static snd_mixer_t *g_all_mixer_handler;
+
+static snd_mixer_elem_t *get_mixer_item_handler(const char *mixer_ctrl_name)
+{
+ snd_mixer_selem_id_t *mixer_select = NULL;
+ snd_mixer_elem_t *mixer_item_handler = NULL;
+ int ret = 0;
+
+
+ ret = snd_mixer_selem_id_malloc(&mixer_select);
+ if (ret) {
+ printf("%s, snd_mixer_open failed: %d\n", __func__, ret);
+ goto MIXER_ITEM_CREATE_ERROR;
+ }
+
+ snd_mixer_selem_id_set_index(mixer_select, 0);
+ if (ret) {
+ printf("%s, snd_mixer_selem_id_set_index failed: %d\n",
+ __func__, ret);
+ goto MIXER_ITEM_CREATE_ERROR;
+ }
+
+ snd_mixer_selem_id_set_name(mixer_select, mixer_ctrl_name);
+ if (ret) {
+ printf("%s, snd_mixer_selem_id_set_name failed: %d\n",
+ __func__, ret);
+ goto MIXER_ITEM_CREATE_ERROR;
+ }
+
+ mixer_item_handler = snd_mixer_find_selem(g_all_mixer_handler,
+ mixer_select);
+
+ if (!mixer_item_handler) {
+ printf("%s, snd_mixer_find_selem not found\n", __func__);
+ }
+
+ snd_mixer_selem_id_free(mixer_select);
+ return mixer_item_handler;
+
+MIXER_ITEM_CREATE_ERROR:
+ snd_mixer_selem_id_free(mixer_select);
+ return NULL;
+}
+
+static int initial_all_mixer_handler()
+{
+ int ret = 0;
+ ret = snd_mixer_open(&g_all_mixer_handler, 0);
+ if (ret) {
+ printf("%s, snd_mixer_open failed: %d\n", __func__, ret);
+ goto ALL_MIXER_CREATE_ERROR;
+ }
+
+ ret = snd_mixer_attach(g_all_mixer_handler, CARD_NAME);
+ if (ret) {
+ printf("%s, snd_mixer_attach failed: %d\n", __func__, ret);
+ goto ALL_MIXER_CREATE_ERROR;
+ }
+
+ ret = snd_mixer_selem_register(g_all_mixer_handler, NULL, NULL);
+ if (ret) {
+ printf("%s, snd_mixer_selem_register failed: %d\n", __func__,
+ ret);
+ goto ALL_MIXER_CREATE_ERROR;
+ }
+
+ ret = snd_mixer_load(g_all_mixer_handler);
+ if (ret) {
+ printf("%s, snd_mixer_load failed: %d\n", __func__, ret);
+ goto ALL_MIXER_CREATE_ERROR;
+ }
+ return 0;
+
+ALL_MIXER_CREATE_ERROR:
+ snd_mixer_close(g_all_mixer_handler);
+ return ret;
+}
+
+
+int set_mixer_ctrl_value_int(const char *mixer_ctrl_name,
+ const int option_int)
+{
+ snd_mixer_elem_t *mixer_item_handler = NULL;
+ int ret;
+
+ if (!g_all_mixer_handler)
+ initial_all_mixer_handler();
+
+ /* mixer control item */
+ mixer_item_handler = get_mixer_item_handler(mixer_ctrl_name);
+ if (!mixer_item_handler) {
+ printf("%s, get_mixer_item_handler failed!\n", __func__);
+ return -EINVAL;
+ }
+
+ ret = snd_mixer_selem_set_enum_item(mixer_item_handler, 0, option_int);
+ if (ret) {
+ printf("%s, set_enum_item failed: %d, option_int: %d\n",
+ __func__, ret, option_int);
+ return ret;
+ }
+
+ return 0;
+}
+
+int set_mixer_ctrl_value_string(const char *mixer_ctrl_name,
+ const char *option_name)
+{
+ snd_mixer_elem_t *mixer_item_handler = NULL;
+ int mixer_item_option_num = 0;
+ int i, ret;
+ char item_name[STR_SIZE];
+
+ if (!g_all_mixer_handler)
+ initial_all_mixer_handler();
+
+ /* mixer control item */
+ mixer_item_handler = get_mixer_item_handler(mixer_ctrl_name);
+ if (!mixer_item_handler) {
+ printf("%s, get_mixer_item_handler failed!\n", __func__);
+ return -EINVAL;
+ }
+ mixer_item_option_num =
+ snd_mixer_selem_get_enum_items(mixer_item_handler);
+
+ /* if failed, get_enum_items return nagetive error num. */
+ if (mixer_item_option_num < 0) {
+ printf("%s, snd_mixer_selem_get_enum_items failed: %d\n",
+ __func__, mixer_item_option_num);
+ return mixer_item_option_num;
+ }
+
+ /* find option_name index */
+ for (i = 0; i < mixer_item_option_num; i++) {
+ ret = snd_mixer_selem_get_enum_item_name(mixer_item_handler, i,
+ STR_SIZE, item_name);
+ if (ret)
+ printf("%s, get_enum_item_name failed: %d, i: %d\n",
+ __func__, ret, i);
+ if (!strcmp(option_name, item_name))
+ break;
+ }
+
+ /* not found */
+ if (i == mixer_item_option_num) {
+ printf("%s, option_name (%s) not found in mixerctrl (%s)!\n",
+ __func__, option_name, mixer_ctrl_name);
+ return -EINVAL;
+ }
+
+ /* found: the index is 'i' */
+ ret = snd_mixer_selem_set_enum_item(mixer_item_handler, 0, i);
+ if (ret) {
+ printf("%s, set_enum_item failed: %d, i: %d\n",
+ __func__, ret, i);
+ return ret;
+ }
+
+ return 0;
+}
+
+int get_mixer_ctrl_value_int(const char *mixer_ctrl_name)
+{
+ snd_mixer_elem_t *mixer_item_handler = NULL;
+ unsigned int mixer_item_value[1];
+ int ret;
+
+ if (!g_all_mixer_handler)
+ initial_all_mixer_handler();
+
+ mixer_item_handler = get_mixer_item_handler(mixer_ctrl_name);
+ if (!mixer_item_handler) {
+ printf("%s, get_mixer_item_handler failed!\n", __func__);
+ return -EINVAL;
+ }
+
+ ret = snd_mixer_selem_get_enum_item(mixer_item_handler, 0,
+ mixer_item_value);
+
+ if (ret) {
+ printf("%s, selem_get_enum_item failed: %d\n", __func__, ret);
+ return ret;
+ }
+
+ return mixer_item_value[0];
+}
+
+char *get_mixer_ctrl_value_string(const char *mixer_ctrl_name,
+ char *returned_value_name,
+ int value_name_size)
+{
+ snd_mixer_elem_t *mixer_item_handler =
+ get_mixer_item_handler(mixer_ctrl_name);
+ int mixer_value_int = get_mixer_ctrl_value_int(mixer_ctrl_name);
+ int ret;
+ char item_name[STR_SIZE];
+
+ ret = snd_mixer_selem_get_enum_item_name(mixer_item_handler,
+ mixer_value_int,
+ STR_SIZE, item_name);
+ if (ret) {
+ printf("%s, get_enum_item_name failed: %d, mixer_value_int: %d\n",
+ __func__, ret, mixer_value_int);
+ return NULL;
+ }
+
+ return strncpy(returned_value_name, item_name, value_name_size);
+}
+
diff --git a/src/multimedia/audio-tuning/audio-xml-parser/mt2635/test/main.c b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/test/main.c
new file mode 100644
index 0000000..53b9612
--- /dev/null
+++ b/src/multimedia/audio-tuning/audio-xml-parser/mt2635/test/main.c
@@ -0,0 +1,1677 @@
+#include "AudioParamParser.h"
+#include "AudioParamParserPriv.h"
+
+#include <stdio.h>
+#include <string.h>
+
+#define BUF_SIZE 1024
+
+void showParamValue(Param *param)
+{
+ switch (param->paramInfo->dataType)
+ {
+ case TYPE_STR:
+ {
+ char *value = (char *)param->data;
+ printf("param name = %s, value = %s (type = %s)\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_INT:
+ {
+ int value = *(int *) param->data;
+ printf("param name = %s, value = %d (type = %s)\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_UINT:
+ {
+ unsigned int value = *(unsigned int *) param->data;
+ printf("param name = %s, value = %d (type = %s)\n", param->name, value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_FLOAT:
+ {
+ float value = *(float *) param->data;
+ /* JH's platform cannot show the float type, wei chiu could show the value by %f*/
+ printf("param name = %s, value = %d (type = %s)\n", param->name, (int)value, paramDataTypeToStr(param->paramInfo->dataType));
+ break;
+ }
+ case TYPE_BYTE_ARRAY:
+ {
+ char *byteArray = (char *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %d\n", i, byteArray[i]);
+ }
+ break;
+ }
+ case TYPE_UBYTE_ARRAY:
+ {
+ unsigned char *ubyteArray = (unsigned char *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, ubyteArray[i]);
+ }
+ break;
+ }
+ case TYPE_SHORT_ARRAY:
+ {
+ short *shortArray = (short *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %d\n", i, shortArray[i]);
+ }
+ break;
+ }
+ case TYPE_USHORT_ARRAY:
+ {
+ unsigned short *ushortArray = (unsigned short *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, ushortArray[i]);
+ }
+ break;
+ }
+ case TYPE_INT_ARRAY:
+ {
+ int *intArray = (int *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %d\n", i, intArray[i]);
+ }
+ break;
+ }
+ case TYPE_UINT_ARRAY:
+ {
+ unsigned int *uintArray = (unsigned int *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] 0x%x\n", i, uintArray[i]);
+ }
+ break;
+ }
+ case TYPE_DOUBLE_ARRAY:
+ {
+ double *doubleArray = (double *)param->data;
+ int arraySize = param->arraySize;
+ int i = 0;
+ printf("param name = %s (type = %s, size = %d)\n", param->name, paramDataTypeToStr(param->paramInfo->dataType), arraySize);
+ for (i = 0; i < arraySize; i++)
+ {
+ printf("\tarray[%d] %f\n", i, doubleArray[i]);
+ }
+ break;
+ }
+ default:
+ printf("param name = %s, value = 0x%p (type = %s)\n", param->name, param->data, paramDataTypeToStr(param->paramInfo->dataType));
+ }
+}
+
+void showFieldValueOfParam(Param *param)
+{
+ // Enum all field value
+ size_t i;
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(param->paramUnit->audioType, param->name);
+ unsigned int val;
+ size_t numOfFieldInfo;
+
+ printf("\t---------------------\n");
+ numOfFieldInfo = paramInfoGetNumOfFieldInfo(paramInfo);
+ for (i = 0; i < numOfFieldInfo; i++)
+ {
+
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByIndex(paramInfo, i);
+ if (paramGetFieldVal(param, fieldInfo, &val) == APP_ERROR)
+ {
+ printf("Cannot get field value. (param name=%s, field name=%s)\n", param->name, fieldInfo->name);
+ continue;
+ }
+
+ printf("\tfield[%lu] name = %s, value = 0x%u.\n", i, fieldInfo->name, val);
+ }
+}
+
+void showFieldInfo(FieldInfo *fieldInfo)
+{
+ if (!fieldInfo)
+ {
+ return;
+ }
+
+ printf("FieldInfo name = %s, array_index = %lu, bit[%d,%d], check_list = %s\n", fieldInfo->name, fieldInfo->arrayIndex, fieldInfo->startBit, fieldInfo->endBit, fieldInfo->checkListStr);
+}
+
+void showParamInfo(ParamInfo *paramInfo)
+{
+ size_t i;
+ size_t numOfFieldInfo = paramInfoGetNumOfFieldInfo(paramInfo);
+
+ printf("ParamInfo name = %s, type = %s\n", paramInfo->name, paramDataTypeToStr(paramInfo->dataType));
+ for (i = 0; i < numOfFieldInfo; i++)
+ {
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByIndex(paramInfo, i);
+ if (fieldInfo)
+ {
+ printf("\t[%lu] ", i);
+ showFieldInfo(fieldInfo);
+ }
+ }
+}
+
+#if 0
+void showCategoryTypeList(AudioType *audioType)
+{
+ xmlNode *categoryTypeListNode, *categoryTypeNode, *categoryNode, *subCategoryNode;
+
+ printf("\n====Dump \"%s\" AudioType CategoryList Info====\n", audioType->name);
+ categoryTypeListNode = audioTypeGetCategoryTypeListNode(audioType);
+ if (!categoryTypeListNode)
+ {
+ printf("No category type list node!\n");
+ return;
+ }
+
+ categoryTypeNode = categoryTypeListNode->children;
+
+ while ((categoryTypeNode = findXmlNodeByElemName(categoryTypeNode->next, ELEM_CATEGORY_TYPE)))
+ {
+ printf("CategoryType, wording = %s, name = %s\n", xmlNodeGetWording(categoryTypeNode), xmlNodeGetProp(categoryTypeNode, ATTRI_NAME));
+
+ categoryNode = categoryTypeNode->children;
+ for (categoryNode = categoryTypeNode->children; categoryNode; categoryNode = categoryNode->next)
+ {
+ if (!strcmp((char *)categoryNode->name, ELEM_CATEGORY))
+ {
+ // Show Category
+ printf("\t%s wording = %s (name = %s)\n", categoryNode->name, xmlNodeGetWording(categoryNode), xmlNodeGetProp(categoryNode, ATTRI_NAME));
+ }
+ else if (!strcmp((char *)categoryNode->name, ELEM_CATEGORY_GROUP))
+ {
+ // Show CategoryGroup
+ printf("\t%s wording = %s (name = %s)\n", categoryNode->name, xmlNodeGetWording(categoryNode), xmlNodeGetProp(categoryNode, ATTRI_NAME));
+
+ // Show Category's sub category
+ for (subCategoryNode = categoryNode->children; subCategoryNode; subCategoryNode = subCategoryNode->next)
+ {
+ if (!strcmp((char *)subCategoryNode->name, ELEM_CATEGORY))
+ {
+ printf("\t\t%s wording = %s (name = %s)\n", subCategoryNode->name, xmlNodeGetWording(subCategoryNode), xmlNodeGetProp(subCategoryNode, ATTRI_NAME));
+ }
+ }
+ }
+ }
+ }
+}
+#else
+void showCategoryTypeList(AudioType *audioType)
+{
+ size_t i, j, k;
+ size_t numOfCategory;
+ size_t numOfCategoryType = audioTypeGetNumOfCategoryType(audioType);
+
+ printf("\n====%s AudioType's Category====\n\n", audioType->name);
+ for (i = 0; i < numOfCategoryType; i++)
+ {
+ CategoryType *categoryType = audioTypeGetCategoryTypeByIndex(audioType, i);
+
+ /* Show CategoryGroup part */
+ size_t numOfCategoryGroup = categoryTypeGetNumOfCategoryGroup(categoryType);
+ printf("CategoryType[%zu] name = %s wording = %s %s\n", i, categoryType->name, categoryType->wording, categoryType->visible ? "" : "visible = 0");
+ for (j = 0; j < numOfCategoryGroup; j++)
+ {
+ /* Show CategoryGroup's category */
+ CategoryGroup *categoryGroup = categoryTypeGetCategoryGroupByIndex(categoryType, j);
+ size_t numOfCategory = categoryGroupGetNumOfCategory(categoryGroup);
+ printf("\tCategoryGroup[%zu] name = %s wording = %s %s\n", j, categoryGroup->name, categoryGroup->wording, categoryGroup->visible ? "" : "visible = 0");
+ for (k = 0; k < numOfCategory; k++)
+ {
+ Category *category = categoryGroupGetCategoryByIndex(categoryGroup, k);
+ printf("\t\tCategory[%zu] name = %s wording = %s %s\n", k , category->name, category->wording, category->visible ? "" : "visible = 0");
+ }
+ }
+
+ /* Show CategoryType's category */
+ numOfCategory = categoryTypeGetNumOfCategory(categoryType);
+ for (k = 0; k < numOfCategory; k++)
+ {
+ Category *category = categoryTypeGetCategoryByIndex(categoryType, k);
+ printf("\tCategory[%zu] name = %s wording = %s %s\n", k , category->name, category->wording, category->visible ? "" : "visible = 0");
+ }
+ }
+}
+#endif
+
+void showParamFieldInfo(AudioType *audioType)
+{
+ int i;
+ int numOfParamInfo;
+ ParamInfo *paramInfo;
+
+ /* Enum all param & it's field information */
+ numOfParamInfo = audioTypeGetNumOfParamInfo(audioType);
+ printf("\n====%s AudioType's param field info====\n\n", audioType->name);
+ for (i = 0; i < numOfParamInfo; i++)
+ {
+ paramInfo = audioTypeGetParamInfoByIndex(audioType, i);
+ printf("[%d] ", i);
+ showParamInfo(paramInfo);
+ }
+}
+
+void showParamTreeViewInfo(AudioType *audioType)
+{
+ printf("\n====%s AudioType's param tree view info====\n\n", audioType->name);
+ if (!audioType->paramTreeView)
+ {
+ printf("No definition!\n");
+ return;
+ }
+
+ printf("ParamTreeView version(%d.%d)\n", audioType->paramTreeView->verMaj, audioType->paramTreeView->verMin);
+ if (audioType->paramTreeView->treeRootHash)
+ {
+ TreeRoot *treeRoot;
+ Feature *feature;
+ FeatureField *featureField;
+ CategoryPath *categoryPath;
+ size_t i = 0;
+ /* Enum all TreeRoot */
+ for (treeRoot = audioType->paramTreeView->treeRootHash; treeRoot ; treeRoot = treeRoot->hh.next)
+ {
+
+ printf("+TreeRoot[%d] name = %s\n", i++, treeRoot->name);
+ if (treeRoot->switchFieldInfo)
+ {
+ printf(" +switch (audio_type = %s, param = %s, field = %s)\n",
+ treeRoot->switchFieldInfo ? treeRoot->switchFieldInfo->paramInfo->audioType->name : "",
+ treeRoot->switchFieldInfo ? treeRoot->switchFieldInfo->paramInfo->name : "",
+ treeRoot->switchFieldInfo ? treeRoot->switchFieldInfo->name : "");
+ }
+ else
+ {
+ printf(" +no switch\n");
+ }
+
+ /* Enum all Feature */
+ for (feature = treeRoot->featureHash; feature ; feature = feature->hh.next)
+ {
+ printf(" +Feature name = %s, feature_option = %s(val = %s), switch (audio_type = %s, param = %s, field = %s)\n", feature->name,
+ feature->featureOption,
+ appHandleGetFeatureOptionValue(audioType->appHandle, feature->featureOption),
+ feature->switchFieldInfo ? feature->switchFieldInfo->paramInfo->audioType->name : "null",
+ feature->switchFieldInfo ? feature->switchFieldInfo->paramInfo->name : "null",
+ feature->switchFieldInfo ? feature->switchFieldInfo->name : "null");
+
+ /* Enum all field */
+ for (featureField = feature->featureFieldHash; featureField ; featureField = featureField->hh.next)
+ {
+ printf(" +Field audio_type = %s, param = %s, name = %s\n",
+ featureField->fieldInfo->paramInfo->audioType->name,
+ featureField->fieldInfo->paramInfo->name,
+ featureField->fieldInfo->name);
+ }
+
+ /* Enum all category path */
+ for (categoryPath = feature->categoryPathHash; categoryPath ; categoryPath = categoryPath->hh.next)
+ {
+ printf(" +CategoryPath path = %s\n", categoryPath->path);
+ }
+ }
+ }
+ }
+}
+
+void showParamUnit(AudioType *audioType, const char *categoryPath)
+{
+ int i;
+ int numOfParam;
+ Param *param;
+ ParamUnit *paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (paramUnit == NULL)
+ {
+ printf("Cannot find ParamUnit.\n");
+ return;
+ }
+
+
+ /* Example: provide retrieve all param ways */
+ numOfParam = paramUnitGetNumOfParam(paramUnit);
+ printf("\n\n====Query all param unit's param (param unit id = %d)====\n", paramUnit->paramId);
+ for (i = 0; i < numOfParam; i++)
+ {
+ /* Show param info */
+ param = paramUnitGetParamByIndex(paramUnit, i);
+ printf("[%d] ", i);
+ showParamValue(param);
+
+ /* Show field info */
+ showFieldValueOfParam(param);
+ }
+
+ /* Example: retrieve param by name */
+ printf("\n\n====Query specific param (name = %s)====\n", "speech_mode_para");
+ param = paramUnitGetParamByName(paramUnit, "speech_mode_para");
+ if (param)
+ {
+ showParamValue(param);
+ }
+}
+
+void showAllAudioType(AppHandle *appHandle)
+{
+ size_t i;
+ printf("\n==== List All Audio Type ===\n\n");
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* XML Version check for AudioTuningTool */
+ if (!audioTypeIsTuningToolSupportedXmlVer(audioType))
+ {
+ printf("Error: %s AudioType's XML version is newer than tuning tool supported ver. (ParamUnitDesc ver (%d,%d), AudioParam ver (%d,%d))\n", audioType->name, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, audioType->audioParamVerMaj, audioType->audioParamVerMin);
+ continue;
+ }
+
+ // Tuning tool support backward compatible, need to know the XML version
+ printf("AudioType[%lu] : %s (tab name = %s, ParamUnitDesc ver = %d.%d, AudioParam ver = %d.%d)\n", i, audioType->name, audioType->tabName, audioType->paramUnitDescVerMaj, audioType->paramUnitDescVerMin, audioType->audioParamVerMaj, audioType->audioParamVerMin);
+ }
+}
+
+void showAllCategoryInformation(AppHandle *appHandle)
+{
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Example to retrieve category info */
+ showCategoryTypeList(audioType);
+ }
+}
+
+void showAllParamFieldInformation(AppHandle *appHandle)
+{
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Example to retrieve ParamInfo */
+ showParamFieldInfo(audioType);
+ }
+}
+
+void showAllParamTreeInformation(AppHandle *appHandle)
+{
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Example to retrieve ParamInfo */
+ showParamTreeViewInfo(audioType);
+ }
+}
+
+void showFeatureOptions(AppHandle *appHandle)
+{
+ size_t i;
+ printf("\n===== Feature Option =====\n");
+ for (i = 0; i < appHandleGetNumOfFeatureOption(appHandle); i++)
+ {
+ FeatureOption *featureOption = appHandleGetFeatureOptionByIndex(appHandle, i);
+ printf("[%lu] %s = \"%s\" (enabled = %d)\n", i, featureOption->name, featureOption->value, appHandleIsFeatureOptionEnabled(appHandle, featureOption->name));
+ }
+ printf("============================\n");
+}
+
+void processTreeRootNode(xmlNode *node, int level, TreeRoot *treeRoot, const char *categoryPath)
+{
+ int isFeatureNode = 0;
+
+ if (!node)
+ {
+ return;
+ }
+
+ if (node->type == XML_ELEMENT_NODE)
+ {
+ /* Show indent first */
+ int i = 0;
+ for (i = 0; i < level; i++)
+ {
+ printf(" ");
+ }
+
+ /* Process each element */
+ if (!strcmp(node->name, ELEM_TREE_ROOT))
+ {
+ printf("+<TreeRoot name = %s>\n", xmlNodeGetProp(node, ATTRI_NAME));
+ }
+ else if (!strcmp(node->name, ELEM_SHEET))
+ {
+ /* Show sheet node */
+ if (treeRoot->switchFieldInfo)
+ {
+ int fieldVal = 0;
+ int onVal = 0;
+
+ ParamUnit *paramUnit = audioTypeGetParamUnit(treeRoot->paramTreeView->audioType, categoryPath);
+ paramUnitGetFieldVal(paramUnit, treeRoot->switchFieldInfo->paramInfo->name, treeRoot->switchFieldInfo->name, &fieldVal);
+
+ if ((fieldInfoGetCheckListValue(treeRoot->switchFieldInfo, "on", &onVal) == APP_NO_ERROR)
+ && onVal == fieldVal)
+ {
+ printf("+<\"check\" Sheet %s>\n", categoryPath); // checkbox checked
+ }
+ else
+ {
+ printf("+<\"uncheck\" Sheet %s>\n", categoryPath); // checkbox unchecked
+ }
+ }
+ else
+ {
+ printf("+<Sheet %s>\n", categoryPath); // no checkbox
+ }
+ }
+ else if (!strcmp(node->name, ELEM_FEATURE))
+ {
+ /* Get Feature obj by name */
+ FeatureField *featureField;
+ int ignore = 0;
+ Feature *feature = treeRootGetFeatureByName(treeRoot, xmlNodeGetProp(node, ATTRI_NAME));
+ isFeatureNode = 1;
+
+ /* Check feature option */
+ if (feature->featureOption && !appHandleIsFeatureOptionEnabled(treeRoot->paramTreeView->audioType->appHandle, feature->featureOption))
+ {
+ //printf ("Feature %s unsupport (%s is disabled)\n", feature->name, feature->featureOption);
+ ignore = 1;
+ }
+
+ /* Check category path */
+ if (!ignore && !featureIsCategoryPathSupport(feature, categoryPath))
+ {
+ //printf ("Feature %s unsupport (%s is not valid category path)\n", feature->name, categoryPath);
+ ignore = 1;
+ }
+
+ if (ignore == 0)
+ {
+ ParamUnit *paramUnit = audioTypeGetParamUnit(treeRoot->paramTreeView->audioType, categoryPath);
+
+ if (feature->switchFieldInfo)
+ {
+ int fieldVal = 0;
+ int onVal = 0;
+
+ ParamUnit *switchParamUnit = audioTypeGetParamUnit(feature->switchFieldInfo->paramInfo->audioType, categoryPath);
+ paramUnitGetFieldVal(switchParamUnit, feature->switchFieldInfo->paramInfo->name, feature->switchFieldInfo->name, &fieldVal);
+
+ if ((fieldInfoGetCheckListValue(feature->switchFieldInfo, "on", &onVal) == APP_NO_ERROR)
+ && onVal == fieldVal)
+ {
+ printf("+<\"check\" Feature name = %s>\n", feature->name); // checkbox checked
+ }
+ else
+ {
+ printf("+<\"uncheck\" Feature name = %s>\n", feature->name); // checkbox unchecked
+ }
+ }
+ else
+ {
+ printf("+<Feature name = %s>\n", feature->name); // no checkbox
+ }
+
+ for (featureField = feature->featureFieldHash; featureField; featureField = featureField->hh.next)
+ {
+ unsigned int fieldVal = 0;
+ paramUnitGetFieldVal(paramUnit,
+ featureField->fieldInfo->paramInfo->name,
+ featureField->fieldInfo->name,
+ &fieldVal);
+
+ printf(" <Field name = %s, val = %d, check_list=%s>\n",
+ featureField->fieldInfo->name,
+ fieldVal,
+ featureField->fieldInfo->checkListStr);
+ }
+ }
+ }
+ else
+ {
+ printf("+<%s>\n", node->name);
+ }
+ }
+
+ if (level && node->next)
+ {
+ processTreeRootNode(node->next, level, treeRoot, categoryPath);
+ }
+
+ if (!isFeatureNode && node->children)
+ {
+ processTreeRootNode(node->children, level + 1, treeRoot, categoryPath);
+ }
+}
+
+/* Notice: it's just example, the num of categoryType may be 4, 5... you have to get the category path more flexible */
+char *queryCategoryPathByWording(AppHandle *appHandle, const char *audioTypeName, const char *categoryType1Wording, const char *category1Wording, const char *categoryType2Wording, const char *categoryGroup2Wording, const char *category2Wording, const char *categoryType3Wording, const char *categoryGroup3Wording, const char *category3Wording)
+{
+ char *result;
+ UT_string *searchPath = NULL;
+ CategoryType *categoryType = NULL;
+ CategoryGroup *categoryGroup = NULL;
+ Category *category = NULL;
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+
+ /* If user select a category path, just like "NarrowBand / Normal of Handset / Level0" */
+ utstring_new(searchPath);
+
+ /* Query first category type name & category name */
+ if (audioType)
+ {
+ categoryType = audioTypeGetCategoryTypeByName(audioType, categoryType1Wording);
+ }
+ if (categoryType)
+ {
+ category = categoryTypeGetCategoryByWording(categoryType, category1Wording);
+ utstring_printf(searchPath, "%s,%s,", categoryType->name, category->name);
+ }
+
+ /* Query 2nd category type name & category name (include category group)*/
+ categoryGroup = NULL;
+ categoryGroup = NULL;
+
+ if (audioType)
+ {
+ categoryType = audioTypeGetCategoryTypeByName(audioType, categoryType2Wording);
+ }
+ if (audioType)
+ {
+ categoryGroup = categoryTypeGetCategoryGroupByWording(categoryType, categoryGroup2Wording);
+ }
+ if (categoryGroup)
+ {
+ category = categoryGroupGetCategoryByWording(categoryGroup, category2Wording);
+ if (category)
+ {
+ utstring_printf(searchPath, "%s,%s,", categoryType->name, category->name);
+ }
+ else
+ {
+ printf("Error: Cannot find \"%s\" category from \"%s\" category group.\n", category2Wording, categoryGroup->name);
+ utstring_free(searchPath);
+ return NULL;
+ }
+ }
+
+ /* Query 3nd category type name & category name */
+ categoryGroup = NULL;
+ categoryGroup = NULL;
+
+ if (audioType)
+ {
+ categoryType = audioTypeGetCategoryTypeByWording(audioType, categoryType3Wording);
+ }
+ if (categoryType)
+ {
+ categoryGroup = categoryTypeGetCategoryGroupByWording(categoryType, categoryGroup3Wording);
+ }
+ if (categoryGroup)
+ {
+ category = categoryGroupGetCategoryByWording(categoryGroup, category3Wording);
+ utstring_printf(searchPath, "%s,%s", categoryType->name, category->name);
+ }
+
+ if (searchPath)
+ {
+ result = strdup(utstring_body(searchPath));
+ //printf("==> The param unit search path = %s\n", result);
+ }
+ else
+ {
+ printf("Error: cannot get the category path\n");
+ }
+
+ utstring_free(searchPath);
+
+ return result;
+}
+
+void queryFieldValue(AppHandle *appHandle, const char *targetAudioTypeName, const char *categoryPath, const char *paramName, const char *fieldName)
+{
+ unsigned int fieldValue;
+ ParamUnit *paramUnit;
+
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, targetAudioTypeName);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+
+ /* Query the field value */
+ if (paramUnitGetFieldVal(paramUnit, paramName, fieldName, &fieldValue) == APP_ERROR)
+ {
+ printf("Error: Cannot query field value successfully!!\n");
+ }
+ else
+ {
+ printf("Field value = 0x%x (%s/%s)\n", fieldValue, paramName, fieldName);
+ }
+}
+
+void simpleFieldQuery(AppHandle *appHandle)
+{
+ unsigned int fieldValue;
+ ParamUnit *paramUnit;
+ Param *param;
+ FieldInfo *fieldInfo;
+
+ const char *targetAudioTypeName = "Speech";
+ const char *targetParamName = "speech_mode_para";
+ const char *targetFieldName = "DL Digital Gain";
+
+ /* Example of category combination */
+ const char *categoryType1Wording = "Bandwidth";
+ const char *category1Wording = "Narrow Band";
+
+ const char *categoryType2Wording = "Profile";
+ const char *categoryGroup2Wording = "Handset";
+ const char *category2Wording = "Handset";
+
+ const char *categoryType3Wording = "Volume";
+ const char *categoryGroup3Wording = "Index";
+ const char *category3Wording = "Level0";
+
+ /* Query category path */
+ char *categoryPath = queryCategoryPathByWording(appHandle, targetAudioTypeName, categoryType1Wording, category1Wording, categoryType2Wording, categoryGroup2Wording, category2Wording, categoryType3Wording, categoryGroup3Wording, category3Wording);
+
+ /* Query AudioType */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, targetAudioTypeName);
+ if (!audioType)
+ {
+ free(categoryPath);
+ return;
+ }
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit)
+ {
+ free(categoryPath);
+ audioTypeUnlock(audioType);
+ return;
+ }
+
+ printf("\n\n==== Simple Test Query ====\n");
+ printf("AudioType/Param/Field = %s / %s / %s\n", targetAudioTypeName, targetParamName, targetFieldName);
+ printf("Category path = %s\n", categoryPath);
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, "speech_mode_para");
+ if (!param)
+ {
+ printf("Error: Cannot query param value!\n");
+ free(categoryPath);
+ audioTypeUnlock(audioType);
+ return;
+ }
+ showParamValue(param);
+
+ /* Query the field value */
+ if (paramUnitGetFieldVal(paramUnit, targetParamName, targetFieldName, &fieldValue) == APP_ERROR)
+ {
+ printf("Error: Cannot query field value!!\n");
+ free(categoryPath);
+ audioTypeUnlock(audioType);
+ return;
+ }
+
+ /* Query the field's check list */
+ fieldInfo = paramInfoGetFieldInfoByName(param->paramInfo, targetFieldName);
+ if (fieldInfo)
+ {
+ printf("==> Field val = %x (check_list = %s)\n", fieldValue, fieldInfo->checkListStr);
+ }
+ else
+ {
+ printf("Error: Cannot find the fieldInfo!\n");
+ }
+
+ free(categoryPath);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+}
+
+void simpleParamQuery(AppHandle *appHandle)
+{
+ /* Query category path */
+ char *audioTypeName = "Speech";
+ char *categoryPath = "Band,NB,Profile,4_pole_Headset,VolIndex,3";
+ char *paramName = "speech_mode_para";
+ ParamUnit *paramUnit;
+ Param *param;
+
+ /* Query AudioType */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType)
+ {
+ return;
+ }
+
+ /* Read Lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, categoryPath);
+ if (!paramUnit)
+ {
+ return;
+ }
+
+ printf("\n\n==== Simple Test Query ====\n");
+ printf("AudioType/Param/Field = %s / %s\n", audioTypeName, paramName);
+ printf("Category path = %s\n", categoryPath);
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, paramName);
+ if (!param)
+ {
+ printf("Error: Cannot query param value!\n");
+ return;
+ }
+ showParamValue(param);
+
+ /* Read unlock */
+ audioTypeUnlock(audioType);
+}
+
+void simpleParamUpdate(AppHandle *appHandle)
+{
+ unsigned short shortArray[] = {0x1111, 0x2222, 0x3333, 0x4444, 0x5555, 0x6666, 0x7777, 0x8888, 0x9999, 0x0000};
+ int arraySize = 10;
+
+ /* You should cache follow object in somewhere without query again */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(audioType, "sph_in_fir");
+
+ /* The sph_in_fir param is short array type */
+ if (audioTypeSetParamData(audioType, "Band,NB,Profile,HAC,VolIndex,3,Network,GSM", paramInfo, (void *)shortArray, arraySize) == APP_ERROR)
+ {
+ printf("Cannot update the param data!!\n");
+ }
+}
+
+void simpleFieldUpdate(AppHandle *appHandle)
+{
+ unsigned int fieldVal = 0xff;
+
+ /* You should cache follow object in somewhere without query again */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(audioType, "speech_mode_para");
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByName(paramInfo, "DL Digital Gain");
+
+ /* Update the fieldInfo for specific categoryPath */
+ if (audioTypeSetFieldData(audioType, "Band,NB,Profile,HAC,VolIndex,3,Network,GSM", fieldInfo, fieldVal) == APP_ERROR)
+ {
+ printf("Cannot update the field data!!\n");
+ }
+}
+
+void applyParamUnitToCategory(AppHandle *appHandle)
+{
+ const char *srcCategoryPath = "Band,NB,Profile,HAC,VolIndex,3,Network,GSM";
+ const char *dstCategoryPath = "Band,NB,Profile,HAC,VolIndex,4,Network,GSM";
+
+ /* Query AudioType */
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+
+ /* Apply the ParamUnit */
+ audioTypeParamUnitCopy(audioType, srcCategoryPath, dstCategoryPath);
+}
+
+void saveModifiedAudioParamXml(AppHandle *appHandle, const char *folder)
+{
+ size_t i;
+ for (i = 0; i < appHandleGetNumOfAudioType(appHandle); i++)
+ {
+ AudioType *audioType = appHandleGetAudioTypeByIndex(appHandle, i);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ if (audioType->dirty && audioTypeSaveAudioParamXml(audioType, folder, 1) == APP_ERROR)
+ {
+ printf("Error: cannot save audio param XML to %s dir\n", folder);
+ }
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ }
+}
+
+void xmlChangedCallback(AppHandle *appHandle, const char *audioTypeName)
+{
+ printf("XML file changed. (cus folder = %s, audioType = %s)\n", appHandle->xmlCusDir, audioTypeName);
+
+ // reload XML file
+ if (appHandleReloadAudioType(appHandle, audioTypeName) == APP_ERROR)
+ {
+ printf("Reload xml fail! (audioType = %s)\n", audioTypeName);
+ }
+ else
+ {
+#if 0
+ AudioType *audioType;
+ ParamUnit *paramUnit;
+ Param *param;
+
+ printf("Reload XML done. (audioType = %s)\n", audioTypeName);
+
+ /* Query AudioType */
+ audioType = appHandleGetAudioTypeByName(appHandle, audioTypeName);
+ if (!audioType)
+ {
+ printf("Cannot find %s audio type\n", audioTypeName);
+ return;
+ }
+
+ /* Query the ParamUnit */
+ paramUnit = audioTypeGetParamUnit(audioType, "Band,NB,Profile,Normal,VolIndex,0,Network,GSM");
+ if (!paramUnit)
+ {
+ printf("Cannot find paramUnit\n");
+ return;
+ }
+
+ /* Query the param value */
+ param = paramUnitGetParamByName(paramUnit, "speech_mode_para");
+ if (!param)
+ {
+ printf("Error: Cannot query param value!\n");
+ return;
+ }
+ showParamValue(param);
+#else
+ printf("Reload XML done. (audioType = %s)\n", audioTypeName);
+ utilUsleep(2000000);
+ printf("Sleep 2 sec done...\n");
+#endif
+ }
+}
+
+int showDynamicTest(AppHandle *appHandle)
+{
+ AudioType *audioType = NULL;
+ char *categoryPath = NULL;
+ char *paramName = NULL;
+ ParamUnit *paramUnit = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+ Param *param = NULL;
+ void *paramData = NULL;
+ size_t arraySize = 0;
+ char tmp[BUF_SIZE];
+ char *input;
+ unsigned int fieldValue = 0;
+
+ printf("\n\n====== Dynamic Test =====\n");
+ printf("[0] Back to main menu\n");
+ printf("[1] Get param value\n");
+ printf("[2] Set param value\n");
+ printf("[3] Get field value\n");
+ printf("[4] Set field value\n");
+ printf("[5] ParamUnit copy\n");
+ printf("[6] Save xml\n");
+ printf("[7] Show param tree view\n");
+ printf("[8] Set switchField on/off \n");
+ printf("[9] Compress files\n");
+ printf("[10] UnCompress file\n");
+ printf("==========================\n");
+ printf("Please enter the selection: ");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strcmp(input, "0"))
+ {
+ return 0;
+ }
+ else if (!strcmp(input, "1"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ paramUnit = audioTypeGetParamUnit(audioType, input);
+ if (paramUnit)
+ {
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ param = paramUnitGetParamByName(paramUnit, input);
+ if (param)
+ {
+ showParamValue(param);
+ }
+ else
+ {
+ printf("Error: Cannot find the param!\n");
+ }
+ }
+ else
+ {
+ printf("Error: Cannot find the param unit!\n");
+ }
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "2"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo)
+ {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ categoryPath = strdup(input);
+
+ printf("Enter param value (type:%s):", paramDataTypeToStr(paramInfo->dataType));
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (utilConvDataStringToNative(paramInfo->dataType, input, ¶mData, &arraySize) == APP_NO_ERROR)
+ {
+ /* The sph_in_fir param is short array type */
+ if (audioTypeSetParamData(audioType, categoryPath, paramInfo, (void *)paramData, arraySize) == APP_ERROR)
+ {
+ printf("Cannot update the param data!!\n");
+ }
+ }
+
+ free(categoryPath);
+ }
+ else
+ {
+ printf("Error: cannot find the param!\n");
+ }
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "3"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ paramUnit = audioTypeGetParamUnit(audioType, input);
+ if (paramUnit)
+ {
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo)
+ {
+ printf("Enter field name (eg. DL Digital Gain):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (paramUnitGetFieldVal(paramUnit, paramInfo->name, input, &fieldValue) == APP_ERROR)
+ {
+ printf("Error: Cannot query field value!\n");
+ }
+ else
+ {
+ printf("Field value = 0x%x\n", fieldValue);
+ }
+ }
+ else
+ {
+ printf("Error: Cannot find the param!\n");
+ }
+ }
+ else
+ {
+ printf("Error: Cannot find the param unit!\n");
+ }
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "4"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ categoryPath = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo)
+ {
+ printf("Enter field name (eg. DL Digital Gain):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ fieldInfo = paramInfoGetFieldInfoByName(paramInfo, input);
+ if (fieldInfo)
+ {
+ printf("Enter field value:");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (audioTypeSetFieldData(audioType, categoryPath, fieldInfo, strtoul(input, NULL, 0)) == APP_NO_ERROR)
+ {
+ printf("Set field value = 0x%zx\n", strtoul(input, NULL, 0));
+ }
+ else
+ {
+ printf("Error: Cannot set field value!\n");
+ }
+ }
+ else
+ {
+ printf("Error: Cannot find the field!\n");
+ }
+ }
+ else
+ {
+ printf("Error: Cannot find the param!\n");
+ }
+
+ free(categoryPath);
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "5"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ char *src = NULL;
+ printf("Enter src category path (eg. Band,NB,Profile,HAC,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ src = strdup(input);
+
+ printf("Enter dst category path (eg. Band,NB,Profile,HAC,VolIndex,4,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (audioTypeParamUnitCopy(audioType, src, input))
+ {
+ printf("ParamUnit copied\n");
+ }
+ else
+ {
+ printf("Error: Cannot copy paramUnit!\n");
+ }
+
+ free(src);
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "6"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+
+#ifdef WIN32
+ printf("Enter folder to save XML (eg. .\\cus):");
+#else
+ printf("Enter folder to save XML (eg. /sdcard/.audio_param/):");
+#endif
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Read lock */
+ audioTypeReadLock(audioType, __FUNCTION__);
+
+ /* Save changed AudioType to XML */
+ audioTypeSaveAudioParamXml(audioType, input, 1);
+
+ /* Unlock */
+ audioTypeUnlock(audioType);
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "7"))
+ {
+ char *treeRootName;
+ AudioType *audioType;
+
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ TreeRoot *treeRoot;
+ printf("Enter tree root name (eg. NREC):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+ treeRootName = strdup(input);
+ treeRoot = audioTypeGetTreeRoot(audioType, treeRootName);
+ if (treeRoot)
+ {
+ printf("Enter category path (eg. Band,NB,Profile,HAC,VolIndex,3,Network,GSM):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Show tree root */
+ processTreeRootNode(treeRoot->treeRootNode, 0, treeRoot, input);
+ }
+ else
+ {
+ printf("Error: Cannot find the %s tree root!\n", treeRootName);
+ }
+ free(treeRootName);
+ }
+ else
+ {
+ printf("Error: Cannot find %s audio type!\n", input);
+ }
+ }
+ else if (!strcmp(input, "8"))
+ {
+ printf("Enter audio type name (eg. Speech):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ audioType = appHandleGetAudioTypeByName(appHandle, input);
+ if (audioType)
+ {
+ printf("Enter category path (eg. Band,NB,Profile,4_pole_Headset,VolIndex,3,Network,GSM):");
+ categoryPath = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter param name (eg. speech_mode_para):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ paramInfo = audioTypeGetParamInfoByName(audioType, input);
+ if (paramInfo)
+ {
+ FieldInfo *switchFieldInfo;
+ printf("Enter field name (eg. switch):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ switchFieldInfo = paramInfoGetFieldInfoByName(paramInfo, input);
+
+ /* For parameter tree, you can get the fieldInfo by treeRoot->switchFieldInfo & feature-> switchFieldInfo*/
+ if (switchFieldInfo)
+ {
+ printf("Enter switch on/off (1/0):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strcmp(input, "1"))
+ {
+ /* Get the check list on's value */
+ unsigned int onValue;
+ if (fieldInfoGetCheckListValue(switchFieldInfo, "on", &onValue) == APP_ERROR)
+ {
+ printf("Error: Cannot get the check list's on value! (XML should define the on's value)\n");
+ }
+ else
+ {
+ /* Set the field with on's value */
+ if (audioTypeSetFieldData(switchFieldInfo->paramInfo->audioType, categoryPath, switchFieldInfo, onValue) == APP_ERROR)
+ {
+ printf("Cannot set the filed data successfully!\n");
+ }
+ else
+ {
+ printf("Set the field data successfully!\n");
+ }
+ }
+ }
+ else
+ {
+ /* Get the check list off's value */
+ unsigned int offValue;
+ if (fieldInfoGetCheckListValue(switchFieldInfo, "off", &offValue) == APP_ERROR)
+ {
+ printf("Error: Cannot get the check list's off value! (XML should define the off's value)\n");
+ }
+ else
+ {
+ /* Set the field with off's value */
+ if (audioTypeSetFieldData(switchFieldInfo->paramInfo->audioType, categoryPath, switchFieldInfo, offValue) == APP_ERROR)
+ {
+ printf("Cannot set the filed data successfully!\n");
+ }
+ else
+ {
+ printf("Set the field data successfully!\n");
+ }
+ }
+ }
+ }
+ else
+ {
+ printf("Error: Cannot find the field!\n");
+ }
+ }
+ else
+ {
+ printf("Error: No fieldInfo found!\n");
+ }
+
+ free(categoryPath);
+ }
+ else
+ {
+ printf("Error: no such audio type\n");
+ }
+ }
+ else if (!strcmp(input, "9"))
+ {
+ char* srcDir;
+ char* dstFile;
+ printf("Enter compress folder full path: ");
+ srcDir = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter target file full path: ");
+ dstFile = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ if (appHandleCompressFiles(srcDir, dstFile) == APP_ERROR)
+ {
+ printf("File compress fail\n");
+ } else {
+ printf("File compress done\n");
+ }
+ free(srcDir);
+ free(dstFile);
+ }
+ else if (!strcmp(input, "10"))
+ {
+ char* srcFile;
+ char* dstDir;
+ printf("Enter src file full path: ");
+ srcFile = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ printf("Enter target dir full path: ");
+ dstDir = strdup(utilGetStdin(tmp, BUF_SIZE));
+
+ if (appHandleUncompressFile(srcFile, dstDir) == APP_ERROR)
+ {
+ printf("File uncompress fail\n");
+ } else {
+ printf("File uncompress done\n");
+ }
+ free(srcFile);
+ free(dstDir);
+ }
+ return 1;
+}
+
+void testAppLibAPIs()
+{
+ AppHandle *appHandle = appHandleGetInstance();
+ int oldDebugLevel = appGetDebugLevel();
+ AudioType *audioType = appHandleGetAudioTypeByName(appHandle, "Speech");
+ ParamInfo *paramInfo = audioTypeGetParamInfoByName(audioType, "speech_mode_para");
+ FieldInfo *fieldInfo = paramInfoGetFieldInfoByName(paramInfo, "AEC");
+
+ /* Change level to debug */
+ appSetDebugLevel(DEBUG_LEVEL);
+
+ /* Set AEC field */
+ audioTypeSetFieldData(audioType, "Band,NB,Profile,Normal,VolIndex,3,Network,GSM", fieldInfo, 0xbd);
+
+ /* Copy ParamUnit src = dst */
+ audioTypeParamUnitCopy(audioType, "Band,NB,Profile,Normal,VolIndex,3,Network,GSM", "Band,NB,Profile,Normal,VolIndex,3,Network,GSM");
+
+ /* Copy ParamUnit src != dst */
+ audioTypeParamUnitCopy(audioType, "Band,NB,Profile,Normal,VolIndex,3,Network,GSM", "Band,NB,Profile,HAC,VolIndex,3,Network,GSM");
+
+ /* Query param */
+ simpleParamQuery(appHandle);
+
+ /* Retrieve specific audio type's param & field information */
+ simpleFieldQuery(appHandle);
+
+ /* Query non-exist ParamUnit, it shouldn't crash */
+ audioTypeGetParamUnit(audioType, "aaa,bbb");
+
+ /* Update param value */
+ simpleParamUpdate(appHandle);
+
+ /* Update field value */
+ simpleFieldUpdate(appHandle);
+
+ /* Apply param to other category */
+ applyParamUnitToCategory(appHandle);
+
+#ifndef WIN32
+ /* Save changed AudioType to XML */
+ saveModifiedAudioParamXml(appHandle, XML_CUS_FOLDER_ON_DEVICE);
+#else
+ /* Save changed AudioType to XML */
+ saveModifiedAudioParamXml(appHandle, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#endif
+ appSetDebugLevel(oldDebugLevel);
+}
+
+void testUtilNativeAPIs()
+{
+ APP_STATUS status;
+ unsigned int fieldResult = 0;
+ char *strResult;
+
+ /* Get category string */
+ strResult = utilNativeGetCategory("Speech", "Band");
+ printf("Category result = %s\n", strResult);
+#ifndef WIN32
+ free(strResult);
+#else
+ printf("Cannot free the memory allocated by APP on WIN32, just for testing\n");
+#endif
+
+ /* Set param */
+ status = utilNativeSetParam("SpeechGeneral", "CategoryLayer,Common", "speech_common_para", "0x1,0xDABD,0x7918,0x2A00,0x8001,0x0,0x0,0x0,0x0,0x0,0x0,0x0");
+ if (status == APP_ERROR)
+ {
+ printf("utilNativeSetParam fail!\n");
+ exit(1);
+ }
+
+ /* Get param */
+ strResult = utilNativeGetParam("SpeechGeneral", "CategoryLayer,Common", "speech_common_para");
+ printf("Param = %s\n", strResult);
+#ifndef WIN32
+ free(strResult);
+#else
+ printf("Cannot free the memory allocated by APP on WIN32, just for testing\n");
+#endif
+
+ /* Set field */
+ status = utilNativeSetField("Speech", "Band,NB,Profile,Normal", "speech_mode_para", "AEC", "252");
+ if (status == APP_ERROR)
+ {
+ printf("utilNativeSetField fail!\n");
+ exit(1);
+ }
+
+ /* Get field */
+ fieldResult = utilNativeGetField("Speech", "Band,NB,Profile,Normal", "speech_mode_para", "AEC");
+ printf("Field = 0x%x\n", fieldResult);
+
+ /* Get check list */
+ strResult = utilNativeGetChecklist("Speech", "speech_mode_para", "AEC");
+ printf("Check list = %s\n", strResult);
+
+ /* Save parameter */
+ status = utilNativeSaveXml("Speech");
+ if (status == APP_ERROR)
+ {
+ printf("utilNativeSaveXml fail!\n");
+ exit(1);
+ }
+}
+
+int showXmlInfo(AppHandle *appHandle)
+{
+ AudioType *audioType = NULL;
+ char *categoryPath = NULL;
+ char *paramName = NULL;
+ ParamUnit *paramUnit = NULL;
+ ParamInfo *paramInfo = NULL;
+ FieldInfo *fieldInfo = NULL;
+ Param *param = NULL;
+ void *paramData = NULL;
+ size_t arraySize = 0;
+ char tmp[BUF_SIZE];
+ char *input;
+ unsigned int fieldValue = 0;
+
+ printf("\n\n====== Show XML Information =====\n");
+ printf("[0] Back to main menu\n");
+ printf("[1] Show all audio type info\n");
+ printf("[2] Show all category info\n");
+ printf("[3] Show all param/field info\n");
+ printf("[4] Show all param tree view info\n");
+ printf("[5] Show feature options\n");
+ printf("==========================\n");
+ printf("Please enter the selection: ");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strcmp(input, "0"))
+ {
+ return 0;
+ }
+ else if (!strcmp(input, "1"))
+ {
+ showAllAudioType(appHandle);
+ }
+ else if (!strcmp(input, "2"))
+ {
+ showAllCategoryInformation(appHandle);
+ }
+ else if (!strcmp(input, "3"))
+ {
+ showAllParamFieldInformation(appHandle);
+ }
+ else if (!strcmp(input, "4"))
+ {
+ showAllParamTreeInformation(appHandle);
+ }
+ else if (!strcmp(input, "5"))
+ {
+ showFeatureOptions(appHandle);
+ }
+ return 1;
+}
+
+int showMainMenu(AppHandle *appHandle)
+{
+ char tmp[BUF_SIZE];
+ char *input;
+ printf("\n\n======= Main Menu =======\n");
+ printf("[0] Exit\n");
+ printf("[1] Unit test\n");
+ printf("[2] Show XML information (AudioType/Category/ParamInfo/FieldInfo)\n");
+ printf("[3] Test formal Speech audio type xml. (Fixed test pattern)\n");
+ printf("[4] File changed callback test (only support on android version)\n");
+ printf("[5] Dynamic operation test\n");
+ printf("[6] Set debug level\n");
+ printf("[7] Show log to console\n");
+ printf("[8] Show app lib build timestamp\n");
+ printf("==========================\n");
+ printf("Please enter the selection: ");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ if (!strcmp(input, "0"))
+ {
+ return 0;
+ }
+ else if (!strcmp(input, "1"))
+ {
+ /* APP Parser internal unit test */
+ if (unitTest(appHandle) == APP_ERROR)
+ {
+ printf("Unit test failure!\n");
+ }
+ else
+ {
+ printf("Unit test pass!\n");
+ }
+ }
+ else if (!strcmp(input, "2"))
+ {
+ while (1)
+ {
+ if (showXmlInfo(appHandle) == 0)
+ {
+ break;
+ }
+ }
+ }
+ else if (!strcmp(input, "3"))
+ {
+ testAppLibAPIs();
+
+ printf("Press enter to continuous next test:");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ /* Test 2 */
+ testUtilNativeAPIs();
+ }
+ else if (!strcmp(input, "4"))
+ {
+#ifndef WIN32
+ /* XML changed callback process example for audio driver */
+ appHandleRegXmlChangedCb(appHandle, xmlChangedCallback);
+ printf("Please push AudioParam xml to %s folder to test the xml changed callback\n", XML_CUS_FOLDER_ON_DEVICE);
+ printf("You can press any key to continue!\n");;
+ getchar(); // waiting inotify thead loop
+#else
+ printf("Not support windows version\n");
+#endif
+ }
+ else if (!strcmp(input, "5"))
+ {
+ while (1)
+ {
+ if (showDynamicTest(appHandle) == 0)
+ {
+ break;
+ }
+ }
+ }
+ else if (!strcmp(input, "6"))
+ {
+ int level;
+ printf("Enter debug level (eg. 0:DEBUG, 1:INFO, 2:WARN, 3:ERR):");
+ input = utilGetStdin(tmp, BUF_SIZE);
+
+ level = (int)strtoul(input, NULL, 0);
+ if (level < 0 || level > ERR_LEVEL)
+ {
+ printf("Invalid level value. (%d)\n", level);
+ }
+ else
+ {
+ appSetDebugLevel(level);
+ printf("Set debug level = %d\n", level);
+ }
+ }
+ else if (!strcmp(input, "7"))
+ {
+ appHandleRedirectIOToConsole();
+ }
+ else if (!strcmp(input, "8"))
+ {
+ printf("APP lib building time stamp: %s\n", appHandleGetBuildTimeStamp());
+ }
+ return 1;
+}
+
+int main()
+{
+
+ AppHandle *appHandle = NULL;
+
+#ifdef WIN32
+ AppHandle Handle;
+ /* For Tuning Tool debug usage, used to show the APP lib message to the console */
+ appHandleRedirectIOToConsole();
+
+ /* Init app handle */
+ appHandleInit(&Handle);
+ appHandle = &Handle;
+
+ /* Parse the xml in default and cus folder,
+ if cus folder has the same name of XML file,
+ parser will load the cus folder xml instead of default xml folder */
+ appHandleParseXml(appHandle, XML_FOLDER_ON_TUNING_TOOL, XML_CUS_FOLDER_ON_TUNING_TOOL);
+#else
+ /* Get AppHandle global instance, this API will parse xml automatically */
+ appHandle = appHandleGetInstance();
+#endif
+
+ /* Set the debug level, default is INFO_LEVEL */
+ appSetDebugLevel(WARN_LEVEL);
+
+ while (1)
+ {
+ if (showMainMenu(appHandle) == 0)
+ {
+ break;
+ }
+ }
+
+ /* Release appHandle resources */
+ appHandleUninit(appHandle);
+
+ return 0;
+}
+