xa_mp3_enc_api.h 4.24 KB
/* Copyright (c) 2005-2011 by Tensilica Inc.  ALL RIGHTS RESERVED.
 * These coded instructions, statements, and computer programs are the
 * copyrighted works and confidential proprietary information of
 * Tensilica Inc. and its licensors, and are licensed to the recipient
 * under the terms of a separate license agreement.  They may be
 * adapted and modified by bona fide purchasers under the terms of the
 * separate license agreement for internal use, but no adapted or
 * modified version may be disclosed or distributed to third parties
 * in any manner, medium, or form, in whole or in part, without the
 * prior written consent of Tensilica Inc.
 */

/*****************************************************************************/
/*                                                                           */
/*  File Name        : xa_mp3_enc_config_params.h                            */
/*                                                                           */
/*  Description      : Configuration parameters list                         */
/*                                                                           */
/*  List of Functions: None                                                  */
/*                                                                           */
/*  Issues / Problems: None                                                  */
/*                                                                           */
/*  Revision History :                                                       */
/*                                                                           */
/*        DD MM YYYY       Author                Changes                     */
/*                                                                           */
/*****************************************************************************/

#ifndef __XA_MP3ENC_CONFIG_PARAMS_H__
#define __XA_MP3ENC_CONFIG_PARAMS_H__

/* mp3_enc-specific configuration parameters */
enum xa_config_param_mp3_enc {
  XA_MP3ENC_CONFIG_PARAM_PCM_WDSZ     = 0,
  XA_MP3ENC_CONFIG_PARAM_SAMP_FREQ    = 1,
  XA_MP3ENC_CONFIG_PARAM_NUM_CHANNELS = 2,
  XA_MP3ENC_CONFIG_PARAM_BITRATE      = 3
#ifdef ENABLE_CUT_OFF_FREQ_CONFIG
  , XA_MP3ENC_CONFIG_FATAL_FRAC_BANDWIDTH = 4
#endif // ENABLE_CUT_OFF_FREQ_CONFIG
};

/* commands */
#include "xa_apicmd_standards.h"

/* mp3_enc-specific commands */
/* (none) */

/* mp3_enc-specific command types */
/* (none) */

/* error codes */
#include "xa_error_standards.h"

#define	XA_CODEC_MP3_ENC	2

/* mp3_enc-specific error_codes */
/*****************************************************************************/
/* Class 0: API Errors                                                       */
/*****************************************************************************/
/* Nonfatal Errors */
/* (none) */
/* Fatal Errors */
/* (none) */

/*****************************************************************************/
/* Class 1: Configuration Errors                                             */
/*****************************************************************************/
/* Nonfatal Errors */
enum xa_error_nonfatal_config_mp3_enc {
  XA_MP3ENC_CONFIG_NONFATAL_INVALID_BITRATE = XA_ERROR_CODE(xa_severity_nonfatal, xa_class_config, XA_CODEC_MP3_ENC, 0)
};

/* Fatal Errors */
enum xa_error_fatal_config_mp3_enc {
  XA_MP3ENC_CONFIG_FATAL_SAMP_FREQ    = XA_ERROR_CODE(xa_severity_fatal, xa_class_config, XA_CODEC_MP3_ENC, 0),
  XA_MP3ENC_CONFIG_FATAL_NUM_CHANNELS = XA_ERROR_CODE(xa_severity_fatal, xa_class_config, XA_CODEC_MP3_ENC, 1),
  XA_MP3ENC_CONFIG_FATAL_PCM_WDSZ     = XA_ERROR_CODE(xa_severity_fatal, xa_class_config, XA_CODEC_MP3_ENC, 2)
#ifdef ENABLE_CUT_OFF_FREQ_CONFIG
  , XA_MP3ENC_CONFIG_PARAM_FRAC_BANDWIDTH   = XA_ERROR_CODE(xa_severity_fatal, xa_class_config, XA_CODEC_MP3_ENC, 3)
#endif // ENABLE_CUT_OFF_FREQ_CONFIG
};
/* (none) */

#include "xa_type_def.h"

#if defined(__cplusplus)
extern "C" {
#endif	/* __cplusplus */

//#undef CODEC_LIB_IN_MASK_ROM
#if 1//def CODEC_LIB_IN_MASK_ROM
//xa_codec_func_t *prom_xa_mp3_enc = (xa_codec_func_t*)ROM_MP3_ENCODER_ADDR;
xa_codec_func_t *xa_mp3_enc = (xa_codec_func_t*)ROM_MP3_ENCODER_ADDR;
#else
xa_codec_func_t xa_mp3_enc;
#endif

#if defined(__cplusplus)
}
#endif	/* __cplusplus */
#endif /* __XA_MP3ENC_CONFIG_PARAMS_H__ */