1#ifndef QDSP5AUDRECCMDI_H 2#define QDSP5AUDRECCMDI_H 3 4/*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====* 5 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 7 8GENERAL DESCRIPTION 9 This file contains defintions of format blocks of commands 10 that are accepted by AUDREC Task 11 12REFERENCES 13 None 14 15EXTERNALIZED FUNCTIONS 16 None 17 18Copyright(c) 1992 - 2008 by QUALCOMM, Incorporated. 19 20This software is licensed under the terms of the GNU General Public 21License version 2, as published by the Free Software Foundation, and 22may be copied, distributed, and modified under those terms. 23 24This program is distributed in the hope that it will be useful, 25but WITHOUT ANY WARRANTY; without even the implied warranty of 26MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27GNU General Public License for more details. 28 29*====*====*====*====*====*====*====*====*====*====*====*====*====*====*====*/ 30 31/*=========================================================================== 32 33 EDIT HISTORY FOR FILE 34 35This section contains comments describing changes made to this file. 36Notice that changes are listed in reverse chronological order. 37 38 $Header: //source/qcom/qct/multimedia2/Audio/drivers/QDSP5Driver/QDSP5Interface/main/latest/qdsp5audreccmdi.h#3 $ 39 40============================================================================*/ 41 42/* 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 53 */ 54 55/* 56 * Commands on uPAudRecCmdQueue 57 */ 58 59/* 60 * Command to initiate and terminate the audio recording section 61 */ 62 63#define AUDREC_CMD_CFG 0x0000 64#define AUDREC_CMD_CFG_LEN sizeof(audrec_cmd_cfg) 65 66#define AUDREC_CMD_TYPE_0_INDEX_WAV 0x0000 67#define AUDREC_CMD_TYPE_0_INDEX_AAC 0x0001 68 69#define AUDREC_CMD_TYPE_0_ENA 0x4000 70#define AUDREC_CMD_TYPE_0_DIS 0x0000 71 72#define AUDREC_CMD_TYPE_0_NOUPDATE 0x0000 73#define AUDREC_CMD_TYPE_0_UPDATE 0x8000 74 75#define AUDREC_CMD_TYPE_1_INDEX_SBC 0x0002 76 77#define AUDREC_CMD_TYPE_1_ENA 0x4000 78#define AUDREC_CMD_TYPE_1_DIS 0x0000 79 80#define AUDREC_CMD_TYPE_1_NOUPDATE 0x0000 81#define AUDREC_CMD_TYPE_1_UPDATE 0x8000 82 83typedef struct { 84 unsigned short cmd_id; 85 unsigned short type_0; 86 unsigned short type_1; 87} __attribute__((packed)) audrec_cmd_cfg; 88 89 90/* 91 * Command to configure the recording parameters for RecType0(AAC/WAV) encoder 92 */ 93 94#define AUDREC_CMD_AREC0PARAM_CFG 0x0001 95#define AUDREC_CMD_AREC0PARAM_CFG_LEN \ 96 sizeof(audrec_cmd_arec0param_cfg) 97 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 107 108#define AUDREC_CMD_STEREO_MODE_MONO 0x0000 109#define AUDREC_CMD_STEREO_MODE_STEREO 0x0001 110 111typedef 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; 120 121/* 122 * Command to configure the recording parameters for RecType1(SBC) encoder 123 */ 124 125#define AUDREC_CMD_AREC1PARAM_CFG 0x0002 126#define AUDREC_CMD_AREC1PARAM_CFG_LEN \ 127 sizeof(audrec_cmd_arec1param_cfg) 128 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 133 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 142 143typedef 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; 152 153 154/* 155 * Commands on audRecUpBitStreamQueue 156 */ 157 158/* 159 * Command to indicate the current packet read count 160 */ 161 162#define AUDREC_CMD_PACKET_EXT_PTR 0x0000 163#define AUDREC_CMD_PACKET_EXT_PTR_LEN \ 164 sizeof(audrec_cmd_packet_ext_ptr) 165 166#define AUDREC_CMD_TYPE_0 0x0000 167#define AUDREC_CMD_TYPE_1 0x0001 168 169typedef 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; 175 176#endif 177