~ubuntu-branches/ubuntu/hardy/alsa-plugins/hardy-proposed

« back to all changes in this revision

Viewing changes to maemo/constants.h

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2007-06-12 19:03:08 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20070612190308-yhyjw8t4wk7zhte0
Tags: 1.0.14-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/control:
    + Don't build-depend on JACK, as it's in universe.  Clarify and
      update the Description to note the above restriction and
      {in,ex}clusion of newer plugins (LP: #57089),
    + Adhere to DebianMaintainerField.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/**
 
2
 * @file constants.h 
 
3
 * @brief PCM Task node protocol constants definition
 
4
 * <p>
 
5
 * Copyright (C) 2006 Nokia Corporation
 
6
 * <p>
 
7
 * Contact: Eduardo Bezerra Valentin <eduardo.valentin@indt.org.br>
 
8
 * 
 
9
 * This library is free software; you can redistribute it and/or
 
10
 * modify it under the terms of the GNU Library General Public
 
11
 * License as published by the Free Software Foundation; either
 
12
 * version 2 of the License, or (at your option) any later version.
 
13
 *
 
14
 * This library is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
 * Library General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU Library General Public
 
20
 * License along with this library; if not, write to the
 
21
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
22
 * Boston, MA 02111-1307, USA.
 
23
 * */
 
24
#ifndef _CONSTANTS_H
 
25
#define _CONSTANTS_H
 
26
/**
 
27
 * Commands
 
28
 * */
 
29
/** No command */
 
30
#define DSP_CMD_NONE            0x00
 
31
/** Informs the DSP that the following data is about initialisation. */
 
32
#define DSP_CMD_INIT            0x01
 
33
/** Informs the DSP that the following data is parameters */
 
34
#define DSP_CMD_SET_PARAMS      0x02
 
35
/** Informs the DSP that the following data is general data (compressed 
 
36
 * or raw audio or video) 
 
37
 * */
 
38
#define DSP_CMD_DATA_WRITE      0x03
 
39
/** Starts audio or video playback or recording */
 
40
#define DSP_CMD_PLAY            0x04
 
41
/** Pauses playback */
 
42
#define DSP_CMD_PAUSE           0x05
 
43
/** Stops playback */
 
44
#define DSP_CMD_STOP            0x06
 
45
/** Informs the DSP that the following data is volume */
 
46
#define DSP_CMD_SET_VOLUME      0x07
 
47
/** Requests from the DSP to send information about current task node 
 
48
 * state 
 
49
 * */
 
50
#define DSP_CMD_STATE           0x08
 
51
/** Informs the DSP that the following data is about setting the current
 
52
 *  presentation time 
 
53
 * */
 
54
#define DSP_CMD_SET_TIME        0x09
 
55
/** Informs the DSP that the ARM queries the current presentation time */
 
56
#define DSP_CMD_GET_TIME        0x0A
 
57
/** Informs the DSP that the following data is about setting video 
 
58
 * post-processing parameters 
 
59
 * */
 
60
#define DSP_CMD_SET_POSTPROC    0x0B
 
61
/** Informs the DSP that the following data is about setting the panning
 
62
 * */
 
63
#define DSP_CMD_SET_PANNING     0x0D
 
64
/** Informs the DSP about discontinuity in the audio stream */
 
65
#define DSP_CMD_DISCONT         0x0E
 
66
/** Mutes the audio playback */
 
67
#define DSP_CMD_MUTE            0x0F
 
68
/** Unmutes the audio playback */
 
69
#define DSP_CMD_UNMUTE          0x10
 
70
/**Closes the task node*/
 
71
#define DSP_CMD_CLOSE           0x14
 
72
/** Command from DSP to start to read data*/
 
73
#define DSP_CMD_DATA_READ       0x25
 
74
/**Sets speech parameters*/
 
75
#define DSP_CMD_SET_SPEECH_PARAMS 0x26
 
76
 
 
77
/**
 
78
 * Audio formats
 
79
 * */
 
80
/** Unsigned 8 bits per sample PCM */
 
81
#define DSP_AFMT_U8             0x01
 
82
/** Signed 16 bits per sample PCM, little endian */
 
83
#define DSP_AFMT_S16_LE         0x02
 
84
/** Signed 16 bits per sample PCM, big endian */
 
85
#define DSP_AFMT_S16_BE         0x03
 
86
/** Signed 8 bits per sample PCM */
 
87
#define DSP_AFMT_S8             0x04
 
88
/** Unsigned 16 bits per sample PCM, little endian */
 
89
#define DSP_AFMT_U16_LE         0x05
 
90
/** Unsigned 16 bits per sample PCM, big endian */
 
91
#define DSP_AFMT_U16_BE         0x06
 
92
/** A-law encoded PCM */
 
93
#define DSP_AFMT_ALAW           0x07
 
94
/** μ-Law encoded PCM */
 
95
#define DSP_AFMT_ULAW           0x08
 
96
/** MP3 stream */
 
97
#define DSP_AFMT_MP3            0x09
 
98
/** AAC stream */
 
99
#define DSP_AFMT_AAC            0x0A
 
100
/** AMR stream */
 
101
#define DSP_AFMT_AMR            0x0B
 
102
/** MP2 stream */
 
103
#define DSP_AFMT_MP2            0x0C
 
104
/** iLBC stream */
 
105
#define DSP_AFMT_ILBC           0x0D
 
106
/** G.729 stream */
 
107
#define DSP_AFMT_G729           0x0E
 
108
/**
 
109
 * Supported Sample rates
 
110
 * */
 
111
/** 96KHz sampling rate */
 
112
#define SAMPLE_RATE_96KHZ       0x00
 
113
/** 88.2KHz sampling rate */
 
114
#define SAMPLE_RATE_88_2KHZ     0x01
 
115
/** 64KHz sampling rate */
 
116
#define SAMPLE_RATE_64KHZ       0x02
 
117
/** 48KHz sampling rate */
 
118
#define SAMPLE_RATE_48KHZ       0x03
 
119
/** 44.1KHz sampling rate */
 
120
#define SAMPLE_RATE_44_1KHZ     0x04
 
121
/** 32KHz sampling rate */
 
122
#define SAMPLE_RATE_32KHZ       0x05
 
123
/** 24KHz sampling rate */
 
124
#define SAMPLE_RATE_24KHZ       0x06
 
125
/** 22.05KHz sampling rate */
 
126
#define SAMPLE_RATE_22_05KHZ    0x07
 
127
/** 16KHz sampling rate */
 
128
#define SAMPLE_RATE_16KHZ       0x08
 
129
/** 12KHz sampling rate */
 
130
#define SAMPLE_RATE_12KHZ       0x09
 
131
/** 11.025KHz sampling rate */
 
132
#define SAMPLE_RATE_11_025KHZ   0x0A
 
133
/** 8KHz sampling rate */
 
134
#define SAMPLE_RATE_8KHZ        0x0B
 
135
/** 5.5125Khz sampling rate */
 
136
#define SAMPLE_RATE_5_5125KHZ   0X0C
 
137
/**
 
138
 * DSP Return values
 
139
 * */
 
140
/** Operation successful */
 
141
#define DSP_OK                  0x01
 
142
/** Unrecognised or unsupported command value */
 
143
#define DSP_ERROR_CMD           0x02
 
144
/** Unrecognised or unsupported audio format value */
 
145
#define DSP_ERROR_FMT           0x03
 
146
/** Unrecognised or unsupported sampling rate value */
 
147
#define DSP_ERROR_RATE          0x04
 
148
/** Unrecognised or unsupported number of channels */
 
149
#define DSP_ERROR_CHANNELS      0x05
 
150
/** Destination/source stream ID out of range */
 
151
#define DSP_ERROR_DS_ID         0x06
 
152
/** Insufficient memory to perform requested action */
 
153
#define DSP_ERROR_MEMORY        0x07
 
154
/** Unspecified error */
 
155
#define DSP_ERROR_GENERAL       0x08
 
156
/** Error in stream (audio or video) */
 
157
#define DSP_ERROR_STREAM        0x09
 
158
/** Unexpected task node state */
 
159
#define DSP_ERROR_STATE         0x0A
 
160
/** Error in synchronisation: 
 
161
   For MP3 – synchronisation marker not found */
 
162
#define DSP_ERROR_SYNC          0x0B
 
163
/** For MPEG4: non-compliant video stream */
 
164
#define DSP_ERROR_VIDEO_NON_COMPLIANT 0x100
 
165
/** For MPEG4: Error in VOS */
 
166
#define DSP_ERROR_VIDEO_FAULT_IN_VOS  0x101
 
167
/** For MPEG4: Image size not supported */
 
168
#define DSP_ERROR_VIDEO_SIZE_NOT_SUPPORTED 0x102
 
169
/** End of VOS code reached */
 
170
#define DSP_ERROR_VIDEO_VOS_END_CODE 0x103
 
171
/**
 
172
 * Channels
 
173
 * */
 
174
/** One channel (mono) */
 
175
#define CHANNELS_1              0x01
 
176
/** Two channels (stereo) */
 
177
#define CHANNELS_2              0x02
 
178
/**
 
179
 * Audio Task node states
 
180
 * */
 
181
/** Initialised */
 
182
#define STATE_INITIALISED       0x00
 
183
/** Playing/recording */
 
184
#define STATE_PLAYING           0x01
 
185
/** Stopped */
 
186
#define STATE_STOPPED           0x02
 
187
/** Paused */
 
188
#define STATE_PAUSED            0x03
 
189
/** Not initialised */
 
190
#define STATE_UNINITIALISED     0x04
 
191
/** Reseted */
 
192
#define STATE_RESET             0x05
 
193
/** Muted */
 
194
#define STATE_MUTED             0x06
 
195
 
 
196
/** Sending commands */
 
197
#define REQUEST_CONFIRMATION    0x01
 
198
#define WITHOU_CONFIRMATION     0x00
 
199
#endif                          /* _CONSTANTS_H */