* @file constants.h
* @brief PCM Task node protocol constants definition
* <p>
* Copyright (C) 2006 Nokia Corporation
* <p>
* Contact: Eduardo Bezerra Valentin <eduardo.valentin@indt.org.br>
*
* This 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.
*
* This 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 this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* */
#ifndef _CONSTANTS_H
#define _CONSTANTS_H
* Commands
* */
#define DSP_CMD_NONE 0x00
#define DSP_CMD_INIT 0x01
#define DSP_CMD_SET_PARAMS 0x02
* or raw audio or video)
* */
#define DSP_CMD_DATA_WRITE 0x03
#define DSP_CMD_PLAY 0x04
#define DSP_CMD_PAUSE 0x05
#define DSP_CMD_STOP 0x06
#define DSP_CMD_SET_VOLUME 0x07
* state
* */
#define DSP_CMD_STATE 0x08
* presentation time
* */
#define DSP_CMD_SET_TIME 0x09
#define DSP_CMD_GET_TIME 0x0A
* post-processing parameters
* */
#define DSP_CMD_SET_POSTPROC 0x0B
* */
#define DSP_CMD_SET_PANNING 0x0D
#define DSP_CMD_DISCONT 0x0E
#define DSP_CMD_MUTE 0x0F
#define DSP_CMD_UNMUTE 0x10
#define DSP_CMD_CLOSE 0x14
#define DSP_CMD_DATA_READ 0x25
#define DSP_CMD_SET_SPEECH_PARAMS 0x26
* Audio formats
* */
#define DSP_AFMT_U8 0x01
#define DSP_AFMT_S16_LE 0x02
#define DSP_AFMT_S16_BE 0x03
#define DSP_AFMT_S8 0x04
#define DSP_AFMT_U16_LE 0x05
#define DSP_AFMT_U16_BE 0x06
#define DSP_AFMT_ALAW 0x07
#define DSP_AFMT_ULAW 0x08
#define DSP_AFMT_MP3 0x09
#define DSP_AFMT_AAC 0x0A
#define DSP_AFMT_AMR 0x0B
#define DSP_AFMT_MP2 0x0C
#define DSP_AFMT_ILBC 0x0D
#define DSP_AFMT_G729 0x0E
* Supported Sample rates
* */
#define SAMPLE_RATE_96KHZ 0x00
#define SAMPLE_RATE_88_2KHZ 0x01
#define SAMPLE_RATE_64KHZ 0x02
#define SAMPLE_RATE_48KHZ 0x03
#define SAMPLE_RATE_44_1KHZ 0x04
#define SAMPLE_RATE_32KHZ 0x05
#define SAMPLE_RATE_24KHZ 0x06
#define SAMPLE_RATE_22_05KHZ 0x07
#define SAMPLE_RATE_16KHZ 0x08
#define SAMPLE_RATE_12KHZ 0x09
#define SAMPLE_RATE_11_025KHZ 0x0A
#define SAMPLE_RATE_8KHZ 0x0B
#define SAMPLE_RATE_5_5125KHZ 0X0C
* DSP Return values
* */
#define DSP_OK 0x01
#define DSP_ERROR_CMD 0x02
#define DSP_ERROR_FMT 0x03
#define DSP_ERROR_RATE 0x04
#define DSP_ERROR_CHANNELS 0x05
#define DSP_ERROR_DS_ID 0x06
#define DSP_ERROR_MEMORY 0x07
#define DSP_ERROR_GENERAL 0x08
#define DSP_ERROR_STREAM 0x09
#define DSP_ERROR_STATE 0x0A
For MP3 – synchronisation marker not found */
#define DSP_ERROR_SYNC 0x0B
#define DSP_ERROR_VIDEO_NON_COMPLIANT 0x100
#define DSP_ERROR_VIDEO_FAULT_IN_VOS 0x101
#define DSP_ERROR_VIDEO_SIZE_NOT_SUPPORTED 0x102
#define DSP_ERROR_VIDEO_VOS_END_CODE 0x103
* Channels
* */
#define CHANNELS_1 0x01
#define CHANNELS_2 0x02
* Audio Task node states
* */
#define STATE_INITIALISED 0x00
#define STATE_PLAYING 0x01
#define STATE_STOPPED 0x02
#define STATE_PAUSED 0x03
#define STATE_UNINITIALISED 0x04
#define STATE_RESET 0x05
#define STATE_MUTED 0x06
#define REQUEST_CONFIRMATION 0x01
#define WITHOU_CONFIRMATION 0x00
#endif