summaryrefslogtreecommitdiffstats
path: root/maemo/types.h
blob: 12809a1c4a86d251cdd57c09cd3e4916fb31119e (plain)
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/**
 * @file types.h - datatypes defined to communicate with PCM task 
 * 		node using its protocol. 
 * <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 library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 * */
#ifndef _TYPES_H
#define _TYPES_H

typedef struct {
	unsigned short dsp_cmd;
	unsigned short init_status;
	unsigned short stream_id;
	unsigned short bridge_buffer_size;
	unsigned short mmap_buffer_size;
} audio_init_status_t;

typedef struct {
	unsigned short dsp_cmd;
	unsigned short dsp_audio_fmt;
	unsigned short sample_rate;
	unsigned short number_channels;
	unsigned short ds_stream_id;
	unsigned short stream_priority;
} audio_params_data_t;

typedef struct {
	unsigned short dsp_cmd;	//DSP_CMD_SET_SPEECH_PARAMS
	unsigned short audio_fmt;	//S16_LE,ALAW,ULAW,ILBC
	unsigned short sample_rate;
	unsigned short ds_stream_id;	//Stream ID from EAP mixer
	unsigned short stream_priority;	//N/A
	unsigned short frame_size;
} speech_params_data_t;

typedef struct {
	unsigned short dsp_cmd;
	unsigned short stream_id;
	unsigned short ds_stream_id;
	unsigned short bridge_buffer_size;
	unsigned short mmap_buffer_size;
	unsigned short status;
	unsigned int num_frames;
	unsigned short sample_rate;
	unsigned short number_channels;
	unsigned short vol_scale;
	unsigned short vol_power2;
	unsigned short left_gain;
	unsigned short right_gain;
	unsigned short dsp_audio_fmt;
#ifndef NORMAL_DSP_TASK
	unsigned short mute;
	unsigned long int samples_played_high;
	unsigned long int samples_played_low;
#endif
} audio_status_info_t;

typedef struct {
	unsigned short int dsp_cmd;
	unsigned short int status;
} dsp_cmd_status_t;

/* data write status structure */
typedef struct {
	unsigned short int dsp_cmd;
	unsigned short int status;
	unsigned short int buffer_bytes_free;
} write_status_t;

typedef struct {
	unsigned short dsp_cmd;
	unsigned short data_size;
} data_write_t;

typedef struct {
	unsigned short int dsp_cmd;
	unsigned short int status;
	unsigned short int frame_size;
	unsigned int stream_time_ms;
} read_status_t;

/* get time data structure */
typedef struct {
	unsigned short int dsp_cmd;
	unsigned short int status;
	unsigned short int stream_ID;
	long int time_ms;
} time_data_t;

/* general stream command data structure */
typedef struct {
	unsigned short int dsp_cmd;
	unsigned short int stream_ID;
} stream_cmd_data_t;

typedef struct {
	unsigned short dsp_cmd;
	unsigned short scale;
	unsigned short power2;
} volume_data_t;

typedef struct {
	unsigned short dsp_cmd;
	unsigned short left_gain;
	unsigned short right_gain;
	unsigned short steps;
} panning_data_t;

#endif				/* _TYPES_H */