|
Packit |
675970 |
/**
|
|
Packit |
675970 |
* @file types.h - datatypes defined to communicate with PCM task
|
|
Packit |
675970 |
* node using its protocol.
|
|
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 _TYPES_H
|
|
Packit |
675970 |
#define _TYPES_H
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd;
|
|
Packit |
675970 |
unsigned short init_status;
|
|
Packit |
675970 |
unsigned short stream_id;
|
|
Packit |
675970 |
unsigned short bridge_buffer_size;
|
|
Packit |
675970 |
unsigned short mmap_buffer_size;
|
|
Packit |
675970 |
} audio_init_status_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd;
|
|
Packit |
675970 |
unsigned short dsp_audio_fmt;
|
|
Packit |
675970 |
unsigned short sample_rate;
|
|
Packit |
675970 |
unsigned short number_channels;
|
|
Packit |
675970 |
unsigned short ds_stream_id;
|
|
Packit |
675970 |
unsigned short stream_priority;
|
|
Packit |
675970 |
} audio_params_data_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd; //DSP_CMD_SET_SPEECH_PARAMS
|
|
Packit |
675970 |
unsigned short audio_fmt; //S16_LE,ALAW,ULAW,ILBC
|
|
Packit |
675970 |
unsigned short sample_rate;
|
|
Packit |
675970 |
unsigned short ds_stream_id; //Stream ID from EAP mixer
|
|
Packit |
675970 |
unsigned short stream_priority; //N/A
|
|
Packit |
675970 |
unsigned short frame_size;
|
|
Packit |
675970 |
} speech_params_data_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd;
|
|
Packit |
675970 |
unsigned short stream_id;
|
|
Packit |
675970 |
unsigned short ds_stream_id;
|
|
Packit |
675970 |
unsigned short bridge_buffer_size;
|
|
Packit |
675970 |
unsigned short mmap_buffer_size;
|
|
Packit |
675970 |
unsigned short status;
|
|
Packit |
675970 |
unsigned int num_frames;
|
|
Packit |
675970 |
unsigned short sample_rate;
|
|
Packit |
675970 |
unsigned short number_channels;
|
|
Packit |
675970 |
unsigned short vol_scale;
|
|
Packit |
675970 |
unsigned short vol_power2;
|
|
Packit |
675970 |
unsigned short left_gain;
|
|
Packit |
675970 |
unsigned short right_gain;
|
|
Packit |
675970 |
unsigned short dsp_audio_fmt;
|
|
Packit |
675970 |
#ifndef NORMAL_DSP_TASK
|
|
Packit |
675970 |
unsigned short mute;
|
|
Packit |
675970 |
unsigned long int samples_played_high;
|
|
Packit |
675970 |
unsigned long int samples_played_low;
|
|
Packit |
675970 |
#endif
|
|
Packit |
675970 |
} audio_status_info_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short int dsp_cmd;
|
|
Packit |
675970 |
unsigned short int status;
|
|
Packit |
675970 |
} dsp_cmd_status_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
/* data write status structure */
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short int dsp_cmd;
|
|
Packit |
675970 |
unsigned short int status;
|
|
Packit |
675970 |
unsigned short int buffer_bytes_free;
|
|
Packit |
675970 |
} write_status_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd;
|
|
Packit |
675970 |
unsigned short data_size;
|
|
Packit |
675970 |
} data_write_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short int dsp_cmd;
|
|
Packit |
675970 |
unsigned short int status;
|
|
Packit |
675970 |
unsigned short int frame_size;
|
|
Packit |
675970 |
unsigned int stream_time_ms;
|
|
Packit |
675970 |
} read_status_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
/* get time data structure */
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short int dsp_cmd;
|
|
Packit |
675970 |
unsigned short int status;
|
|
Packit |
675970 |
unsigned short int stream_ID;
|
|
Packit |
675970 |
long int time_ms;
|
|
Packit |
675970 |
} time_data_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
/* general stream command data structure */
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short int dsp_cmd;
|
|
Packit |
675970 |
unsigned short int stream_ID;
|
|
Packit |
675970 |
} stream_cmd_data_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd;
|
|
Packit |
675970 |
unsigned short scale;
|
|
Packit |
675970 |
unsigned short power2;
|
|
Packit |
675970 |
} volume_data_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
typedef struct {
|
|
Packit |
675970 |
unsigned short dsp_cmd;
|
|
Packit |
675970 |
unsigned short left_gain;
|
|
Packit |
675970 |
unsigned short right_gain;
|
|
Packit |
675970 |
unsigned short steps;
|
|
Packit |
675970 |
} panning_data_t;
|
|
Packit |
675970 |
|
|
Packit |
675970 |
#endif /* _TYPES_H */
|