Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jwessel...
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / dream / include / mach / qdsp5 / qdsp5audreccmdi.h
blobd03ee024ae918f60cf276febb85cb46d08cac015
1 #ifndef QDSP5AUDRECCMDI_H
2 #define QDSP5AUDRECCMDI_H
4 /*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*
6 A U D I O R E C O R D I N T E R N A L C O M M A N D S
8 GENERAL DESCRIPTION
9 This file contains defintions of format blocks of commands
10 that are accepted by AUDREC Task
12 REFERENCES
13 None
15 EXTERNALIZED FUNCTIONS
16 None
18 Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated.
20 This software is licensed under the terms of the GNU General Public
21 License version 2, as published by the Free Software Foundation, and
22 may be copied, distributed, and modified under those terms.
24 This program is distributed in the hope that it will be useful,
25 but WITHOUT ANY WARRANTY; without even the implied warranty of
26 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 GNU General Public License for more details.
29 *====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/
31 /*===========================================================================
33 EDIT HISTORY FOR FILE
35 This section contains comments describing changes made to this file.
36 Notice that changes are listed in reverse chronological order.
38 $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audreccmdi.h#3 $
40 ============================================================================*/
43 * AUDRECTASK COMMANDS
44 * ARM uses 2 queues to communicate with the AUDRECTASK
45 * 1.uPAudRecCmdQueue
46 * Location :MEMC
47 * Buffer Size : 8
48 * No of Buffers in a queue : 3
49 * 2.audRecUpBitStreamQueue
50 * Location : MEMC
51 * Buffer Size : 4
52 * No of buffers in a queue : 2
56 * Commands on uPAudRecCmdQueue
60 * Command to initiate and terminate the audio recording section
63 #define AUDREC_CMD_CFG 0x0000
64 #define AUDREC_CMD_CFG_LEN sizeof(audrec_cmd_cfg)
66 #define AUDREC_CMD_TYPE_0_INDEX_WAV 0x0000
67 #define AUDREC_CMD_TYPE_0_INDEX_AAC 0x0001
69 #define AUDREC_CMD_TYPE_0_ENA 0x4000
70 #define AUDREC_CMD_TYPE_0_DIS 0x0000
72 #define AUDREC_CMD_TYPE_0_NOUPDATE 0x0000
73 #define AUDREC_CMD_TYPE_0_UPDATE 0x8000
75 #define AUDREC_CMD_TYPE_1_INDEX_SBC 0x0002
77 #define AUDREC_CMD_TYPE_1_ENA 0x4000
78 #define AUDREC_CMD_TYPE_1_DIS 0x0000
80 #define AUDREC_CMD_TYPE_1_NOUPDATE 0x0000
81 #define AUDREC_CMD_TYPE_1_UPDATE 0x8000
83 typedef struct {
84 unsigned short cmd_id;
85 unsigned short type_0;
86 unsigned short type_1;
87 } __attribute__((packed)) audrec_cmd_cfg;
91 * Command to configure the recording parameters for RecType0(AAC/WAV) encoder
94 #define AUDREC_CMD_AREC0PARAM_CFG 0x0001
95 #define AUDREC_CMD_AREC0PARAM_CFG_LEN \
96 sizeof(audrec_cmd_arec0param_cfg)
98 #define AUDREC_CMD_SAMP_RATE_INDX_8000 0x000B
99 #define AUDREC_CMD_SAMP_RATE_INDX_11025 0x000A
100 #define AUDREC_CMD_SAMP_RATE_INDX_12000 0x0009
101 #define AUDREC_CMD_SAMP_RATE_INDX_16000 0x0008
102 #define AUDREC_CMD_SAMP_RATE_INDX_22050 0x0007
103 #define AUDREC_CMD_SAMP_RATE_INDX_24000 0x0006
104 #define AUDREC_CMD_SAMP_RATE_INDX_32000 0x0005
105 #define AUDREC_CMD_SAMP_RATE_INDX_44100 0x0004
106 #define AUDREC_CMD_SAMP_RATE_INDX_48000 0x0003
108 #define AUDREC_CMD_STEREO_MODE_MONO 0x0000
109 #define AUDREC_CMD_STEREO_MODE_STEREO 0x0001
111 typedef struct {
112 unsigned short cmd_id;
113 unsigned short ptr_to_extpkt_buffer_msw;
114 unsigned short ptr_to_extpkt_buffer_lsw;
115 unsigned short buf_len;
116 unsigned short samp_rate_index;
117 unsigned short stereo_mode;
118 unsigned short rec_quality;
119 } __attribute__((packed)) audrec_cmd_arec0param_cfg;
122 * Command to configure the recording parameters for RecType1(SBC) encoder
125 #define AUDREC_CMD_AREC1PARAM_CFG 0x0002
126 #define AUDREC_CMD_AREC1PARAM_CFG_LEN \
127 sizeof(audrec_cmd_arec1param_cfg)
129 #define AUDREC_CMD_PARAM_BUF_BLOCKS_4 0x0000
130 #define AUDREC_CMD_PARAM_BUF_BLOCKS_8 0x0001
131 #define AUDREC_CMD_PARAM_BUF_BLOCKS_12 0x0002
132 #define AUDREC_CMD_PARAM_BUF_BLOCKS_16 0x0003
134 #define AUDREC_CMD_PARAM_BUF_SUB_BANDS_8 0x0010
135 #define AUDREC_CMD_PARAM_BUF_MODE_MONO 0x0000
136 #define AUDREC_CMD_PARAM_BUF_MODE_DUAL 0x0040
137 #define AUDREC_CMD_PARAM_BUF_MODE_STEREO 0x0050
138 #define AUDREC_CMD_PARAM_BUF_MODE_JSTEREO 0x0060
139 #define AUDREC_CMD_PARAM_BUF_LOUDNESS 0x0000
140 #define AUDREC_CMD_PARAM_BUF_SNR 0x0100
141 #define AUDREC_CMD_PARAM_BUF_BASIC_VER 0x0000
143 typedef struct {
144 unsigned short cmd_id;
145 unsigned short ptr_to_extpkt_buffer_msw;
146 unsigned short ptr_to_extpkt_buffer_lsw;
147 unsigned short buf_len;
148 unsigned short param_buf;
149 unsigned short bit_rate_0;
150 unsigned short bit_rate_1;
151 } __attribute__((packed)) audrec_cmd_arec1param_cfg;
155 * Commands on audRecUpBitStreamQueue
159 * Command to indicate the current packet read count
162 #define AUDREC_CMD_PACKET_EXT_PTR 0x0000
163 #define AUDREC_CMD_PACKET_EXT_PTR_LEN \
164 sizeof(audrec_cmd_packet_ext_ptr)
166 #define AUDREC_CMD_TYPE_0 0x0000
167 #define AUDREC_CMD_TYPE_1 0x0001
169 typedef struct {
170 unsigned short cmd_id;
171 unsigned short type;
172 unsigned short curr_rec_count_msw;
173 unsigned short curr_rec_count_lsw;
174 } __attribute__((packed)) audrec_cmd_packet_ext_ptr;
176 #endif