Blame maemo/constants.h

Packit 675970
/**
Packit 675970
 * @file constants.h 
Packit 675970
 * @brief PCM Task node protocol constants definition
Packit 675970
 * 

Packit 675970
 * Copyright (C) 2006 Nokia Corporation
Packit 675970
 * 

Packit 675970
 * Contact: Eduardo Bezerra Valentin <eduardo.valentin@indt.org.br>
Packit 675970
 * 
Packit 675970
 * This library is free software; you can redistribute it and/or
Packit 675970
 * modify it under the terms of the GNU Library General Public
Packit 675970
 * License as published by the Free Software Foundation; either
Packit 675970
 * version 2 of the License, or (at your option) any later version.
Packit 675970
 *
Packit 675970
 * This library is distributed in the hope that it will be useful,
Packit 675970
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 675970
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 675970
 * Library General Public License for more details.
Packit 675970
 *
Packit 675970
 * You should have received a copy of the GNU Library General Public License
Packit 675970
 * along with this program; if not, write to the Free Software
Packit 675970
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
Packit 675970
 * */
Packit 675970
#ifndef _CONSTANTS_H
Packit 675970
#define _CONSTANTS_H
Packit 675970
/**
Packit 675970
 * Commands
Packit 675970
 * */
Packit 675970
/** No command */
Packit 675970
#define DSP_CMD_NONE 		0x00
Packit 675970
/** Informs the DSP that the following data is about initialisation. */
Packit 675970
#define DSP_CMD_INIT		0x01
Packit 675970
/** Informs the DSP that the following data is parameters */
Packit 675970
#define DSP_CMD_SET_PARAMS	0x02
Packit 675970
/** Informs the DSP that the following data is general data (compressed 
Packit 675970
 * or raw audio or video) 
Packit 675970
 * */
Packit 675970
#define DSP_CMD_DATA_WRITE	0x03
Packit 675970
/** Starts audio or video playback or recording */
Packit 675970
#define DSP_CMD_PLAY		0x04
Packit 675970
/** Pauses playback */
Packit 675970
#define DSP_CMD_PAUSE		0x05
Packit 675970
/** Stops playback */
Packit 675970
#define DSP_CMD_STOP		0x06
Packit 675970
/** Informs the DSP that the following data is volume */
Packit 675970
#define DSP_CMD_SET_VOLUME	0x07
Packit 675970
/** Requests from the DSP to send information about current task node 
Packit 675970
 * state 
Packit 675970
 * */
Packit 675970
#define DSP_CMD_STATE		0x08
Packit 675970
/** Informs the DSP that the following data is about setting the current
Packit 675970
 *  presentation time 
Packit 675970
 * */
Packit 675970
#define DSP_CMD_SET_TIME	0x09
Packit 675970
/** Informs the DSP that the ARM queries the current presentation time */
Packit 675970
#define DSP_CMD_GET_TIME	0x0A
Packit 675970
/** Informs the DSP that the following data is about setting video 
Packit 675970
 * post-processing parameters 
Packit 675970
 * */
Packit 675970
#define DSP_CMD_SET_POSTPROC	0x0B
Packit 675970
/** Informs the DSP that the following data is about setting the panning
Packit 675970
 * */
Packit 675970
#define DSP_CMD_SET_PANNING	0x0D
Packit 675970
/** Informs the DSP about discontinuity in the audio stream */
Packit 675970
#define DSP_CMD_DISCONT		0x0E
Packit 675970
/** Mutes the audio playback */
Packit 675970
#define DSP_CMD_MUTE		0x0F
Packit 675970
/** Unmutes the audio playback */
Packit 675970
#define DSP_CMD_UNMUTE		0x10
Packit 675970
/**Closes the task node*/
Packit 675970
#define DSP_CMD_CLOSE		0x14
Packit 675970
/** Command from DSP to start to read data*/
Packit 675970
#define DSP_CMD_DATA_READ	0x25
Packit 675970
/**Sets speech parameters*/
Packit 675970
#define DSP_CMD_SET_SPEECH_PARAMS 0x26
Packit 675970
Packit 675970
/**
Packit 675970
 * Audio formats
Packit 675970
 * */
Packit 675970
/** Unsigned 8 bits per sample PCM */
Packit 675970
#define DSP_AFMT_U8		0x01
Packit 675970
/** Signed 16 bits per sample PCM, little endian */
Packit 675970
#define DSP_AFMT_S16_LE		0x02
Packit 675970
/** Signed 16 bits per sample PCM, big endian */
Packit 675970
#define DSP_AFMT_S16_BE		0x03
Packit 675970
/** Signed 8 bits per sample PCM */
Packit 675970
#define DSP_AFMT_S8		0x04
Packit 675970
/** Unsigned 16 bits per sample PCM, little endian */
Packit 675970
#define DSP_AFMT_U16_LE		0x05
Packit 675970
/** Unsigned 16 bits per sample PCM, big endian */
Packit 675970
#define DSP_AFMT_U16_BE		0x06
Packit 675970
/** A-law encoded PCM */
Packit 675970
#define DSP_AFMT_ALAW		0x07
Packit 675970
/** μ-Law encoded PCM */
Packit 675970
#define DSP_AFMT_ULAW		0x08
Packit 675970
/** MP3 stream */
Packit 675970
#define DSP_AFMT_MP3		0x09
Packit 675970
/** AAC stream */
Packit 675970
#define DSP_AFMT_AAC		0x0A
Packit 675970
/** AMR stream */
Packit 675970
#define DSP_AFMT_AMR		0x0B
Packit 675970
/** MP2 stream */
Packit 675970
#define DSP_AFMT_MP2		0x0C
Packit 675970
/** iLBC stream */
Packit 675970
#define DSP_AFMT_ILBC		0x0D
Packit 675970
/** G.729 stream */
Packit 675970
#define DSP_AFMT_G729		0x0E
Packit 675970
/**
Packit 675970
 * Supported Sample rates
Packit 675970
 * */
Packit 675970
/** 96KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_96KHZ	0x00
Packit 675970
/** 88.2KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_88_2KHZ	0x01
Packit 675970
/** 64KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_64KHZ	0x02
Packit 675970
/** 48KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_48KHZ	0x03
Packit 675970
/** 44.1KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_44_1KHZ	0x04
Packit 675970
/** 32KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_32KHZ	0x05
Packit 675970
/** 24KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_24KHZ	0x06
Packit 675970
/** 22.05KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_22_05KHZ	0x07
Packit 675970
/** 16KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_16KHZ	0x08
Packit 675970
/** 12KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_12KHZ	0x09
Packit 675970
/** 11.025KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_11_025KHZ	0x0A
Packit 675970
/** 8KHz sampling rate */
Packit 675970
#define SAMPLE_RATE_8KHZ	0x0B
Packit 675970
/** 5.5125Khz sampling rate */
Packit 675970
#define SAMPLE_RATE_5_5125KHZ	0X0C
Packit 675970
/**
Packit 675970
 * DSP Return values
Packit 675970
 * */
Packit 675970
/** Operation successful */
Packit 675970
#define DSP_OK 			0x01
Packit 675970
/** Unrecognised or unsupported command value */
Packit 675970
#define DSP_ERROR_CMD		0x02
Packit 675970
/** Unrecognised or unsupported audio format value */
Packit 675970
#define DSP_ERROR_FMT		0x03
Packit 675970
/** Unrecognised or unsupported sampling rate value */
Packit 675970
#define DSP_ERROR_RATE		0x04
Packit 675970
/** Unrecognised or unsupported number of channels */
Packit 675970
#define DSP_ERROR_CHANNELS	0x05
Packit 675970
/** Destination/source stream ID out of range */
Packit 675970
#define DSP_ERROR_DS_ID		0x06
Packit 675970
/** Insufficient memory to perform requested action */
Packit 675970
#define DSP_ERROR_MEMORY 	0x07
Packit 675970
/** Unspecified error */
Packit 675970
#define DSP_ERROR_GENERAL	0x08
Packit 675970
/** Error in stream (audio or video) */
Packit 675970
#define DSP_ERROR_STREAM 	0x09
Packit 675970
/** Unexpected task node state */
Packit 675970
#define DSP_ERROR_STATE 	0x0A
Packit 675970
/** Error in synchronisation: 
Packit 675970
   For MP3 – synchronisation marker not found */
Packit 675970
#define DSP_ERROR_SYNC		0x0B
Packit 675970
/** For MPEG4: non-compliant video stream */
Packit 675970
#define DSP_ERROR_VIDEO_NON_COMPLIANT 0x100
Packit 675970
/** For MPEG4: Error in VOS */
Packit 675970
#define DSP_ERROR_VIDEO_FAULT_IN_VOS  0x101
Packit 675970
/** For MPEG4: Image size not supported */
Packit 675970
#define DSP_ERROR_VIDEO_SIZE_NOT_SUPPORTED 0x102
Packit 675970
/** End of VOS code reached */
Packit 675970
#define DSP_ERROR_VIDEO_VOS_END_CODE 0x103
Packit 675970
/**
Packit 675970
 * Channels
Packit 675970
 * */
Packit 675970
/** One channel (mono) */
Packit 675970
#define CHANNELS_1 		0x01
Packit 675970
/** Two channels (stereo) */
Packit 675970
#define CHANNELS_2		0x02
Packit 675970
/**
Packit 675970
 * Audio Task node states
Packit 675970
 * */
Packit 675970
/** Initialised */
Packit 675970
#define STATE_INITIALISED	0x00
Packit 675970
/** Playing/recording */
Packit 675970
#define STATE_PLAYING		0x01
Packit 675970
/** Stopped */
Packit 675970
#define STATE_STOPPED		0x02
Packit 675970
/** Paused */
Packit 675970
#define STATE_PAUSED		0x03
Packit 675970
/** Not initialised */
Packit 675970
#define STATE_UNINITIALISED	0x04
Packit 675970
/** Reseted */
Packit 675970
#define STATE_RESET		0x05
Packit 675970
/** Muted */
Packit 675970
#define STATE_MUTED		0x06
Packit 675970
Packit 675970
/** Sending commands */
Packit 675970
#define REQUEST_CONFIRMATION	0x01
Packit 675970
#define WITHOU_CONFIRMATION	0x00
Packit 675970
#endif				/* _CONSTANTS_H */