Patrick Lai | fc8f224 | 2013-01-06 00:52:34 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2010-2013, The Linux Foundation. All rights reserved. |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | #ifndef __Q6_ASM_H__ |
| 13 | #define __Q6_ASM_H__ |
| 14 | |
| 15 | #include <mach/qdsp6v2/apr.h> |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 16 | #include <sound/apr_audio.h> |
Swaminathan Sathappan | bdc5508 | 2012-02-16 22:47:40 -0800 | [diff] [blame] | 17 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
Mitchel Humpherys | 71a6ac9 | 2012-09-06 10:22:31 -0700 | [diff] [blame] | 18 | #include <linux/msm_ion.h> |
Swaminathan Sathappan | bdc5508 | 2012-02-16 22:47:40 -0800 | [diff] [blame] | 19 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 20 | |
| 21 | #define IN 0x000 |
| 22 | #define OUT 0x001 |
| 23 | #define CH_MODE_MONO 0x001 |
| 24 | #define CH_MODE_STEREO 0x002 |
| 25 | |
| 26 | #define FORMAT_LINEAR_PCM 0x0000 |
| 27 | #define FORMAT_DTMF 0x0001 |
| 28 | #define FORMAT_ADPCM 0x0002 |
| 29 | #define FORMAT_YADPCM 0x0003 |
| 30 | #define FORMAT_MP3 0x0004 |
| 31 | #define FORMAT_MPEG4_AAC 0x0005 |
| 32 | #define FORMAT_AMRNB 0x0006 |
| 33 | #define FORMAT_AMRWB 0x0007 |
| 34 | #define FORMAT_V13K 0x0008 |
| 35 | #define FORMAT_EVRC 0x0009 |
| 36 | #define FORMAT_EVRCB 0x000a |
| 37 | #define FORMAT_EVRCWB 0x000b |
| 38 | #define FORMAT_MIDI 0x000c |
| 39 | #define FORMAT_SBC 0x000d |
| 40 | #define FORMAT_WMA_V10PRO 0x000e |
| 41 | #define FORMAT_WMA_V9 0x000f |
| 42 | #define FORMAT_AMR_WB_PLUS 0x0010 |
Bharath Ramachandramurthy | 4f71d50 | 2011-10-23 19:45:22 -0700 | [diff] [blame] | 43 | #define FORMAT_MPEG4_MULTI_AAC 0x0011 |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 44 | #define FORMAT_MULTI_CHANNEL_LINEAR_PCM 0x0012 |
Santosh Mardi | 2332120 | 2012-03-22 04:33:25 +0530 | [diff] [blame] | 45 | #define FORMAT_AC3 0x0013 |
| 46 | #define FORMAT_DTS 0x0014 |
| 47 | #define FORMAT_EAC3 0x0015 |
| 48 | #define FORMAT_ATRAC 0x0016 |
| 49 | #define FORMAT_MAT 0x0017 |
| 50 | #define FORMAT_AAC 0x0018 |
Srikanth Uyyala | 66f781a | 2012-06-13 23:23:25 +0530 | [diff] [blame] | 51 | #define FORMAT_DTS_LBR 0x0019 |
Subhash Chandra Bose Naripeddy | f764805 | 2012-09-24 18:51:43 -0700 | [diff] [blame] | 52 | #define FORMAT_PASS_THROUGH 0x0020 |
Aviral Gupta | 03bd424 | 2012-10-09 22:09:32 +0530 | [diff] [blame] | 53 | #define FORMAT_MP2 0x0021 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 54 | |
| 55 | #define ENCDEC_SBCBITRATE 0x0001 |
| 56 | #define ENCDEC_IMMEDIATE_DECODE 0x0002 |
| 57 | #define ENCDEC_CFG_BLK 0x0003 |
Aviral Gupta | 4ad0f50 | 2012-10-16 12:40:07 +0530 | [diff] [blame] | 58 | #define DTS_ENC_SAMPLE_RATE48k 48000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 59 | |
| 60 | #define CMD_PAUSE 0x0001 |
| 61 | #define CMD_FLUSH 0x0002 |
| 62 | #define CMD_EOS 0x0003 |
| 63 | #define CMD_CLOSE 0x0004 |
| 64 | #define CMD_OUT_FLUSH 0x0005 |
| 65 | |
| 66 | /* bit 0:1 represents priority of stream */ |
| 67 | #define STREAM_PRIORITY_NORMAL 0x0000 |
| 68 | #define STREAM_PRIORITY_LOW 0x0001 |
| 69 | #define STREAM_PRIORITY_HIGH 0x0002 |
| 70 | |
| 71 | /* bit 4 represents META enable of encoded data buffer */ |
| 72 | #define BUFFER_META_ENABLE 0x0010 |
| 73 | |
| 74 | /* Enable Sample_Rate/Channel_Mode notification event from Decoder */ |
| 75 | #define SR_CM_NOTIFY_ENABLE 0x0004 |
| 76 | |
Patrick Lai | 3182be5 | 2012-11-17 00:29:07 -0800 | [diff] [blame] | 77 | #define TUN_WRITE_IO_MODE 0x0008 /* tunnel read write mode */ |
| 78 | #define TUN_READ_IO_MODE 0x0004 /* tunnel read write mode */ |
| 79 | #define ASYNC_IO_MODE 0x0002 |
| 80 | #define SYNC_IO_MODE 0x0001 |
| 81 | #define NO_TIMESTAMP 0xFF00 |
| 82 | #define SET_TIMESTAMP 0x0000 |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 83 | |
| 84 | #define SOFT_PAUSE_ENABLE 1 |
| 85 | #define SOFT_PAUSE_DISABLE 0 |
| 86 | |
| 87 | #define SESSION_MAX 0x08 |
| 88 | |
Fred Oh | 0b92033 | 2013-01-18 15:58:29 -0800 | [diff] [blame] | 89 | #define SOFT_PAUSE_PERIOD 30 /* ramp up/down for 30ms */ |
Deepa Madiregama | 623b593 | 2012-05-22 14:44:33 +0530 | [diff] [blame] | 90 | #define SOFT_PAUSE_STEP_LINEAR 0 /* Step value 0ms or 0us */ |
Fred Oh | 0b92033 | 2013-01-18 15:58:29 -0800 | [diff] [blame] | 91 | #define SOFT_PAUSE_STEP 0 /* Step value 0ms or 0us */ |
Sriranjan Srikantam | 5285a21 | 2011-09-06 19:09:19 -0700 | [diff] [blame] | 92 | enum { |
| 93 | SOFT_PAUSE_CURVE_LINEAR = 0, |
| 94 | SOFT_PAUSE_CURVE_EXP, |
| 95 | SOFT_PAUSE_CURVE_LOG, |
| 96 | }; |
| 97 | |
Fred Oh | 0b92033 | 2013-01-18 15:58:29 -0800 | [diff] [blame] | 98 | #define SOFT_VOLUME_PERIOD 30 /* ramp up/down for 30ms */ |
Deepa Madiregama | 623b593 | 2012-05-22 14:44:33 +0530 | [diff] [blame] | 99 | #define SOFT_VOLUME_STEP_LINEAR 0 /* Step value 0ms or 0us */ |
Fred Oh | 0b92033 | 2013-01-18 15:58:29 -0800 | [diff] [blame] | 100 | #define SOFT_VOLUME_STEP 0 /* Step value 0ms or 0us */ |
Sriranjan Srikantam | 5285a21 | 2011-09-06 19:09:19 -0700 | [diff] [blame] | 101 | enum { |
| 102 | SOFT_VOLUME_CURVE_LINEAR = 0, |
| 103 | SOFT_VOLUME_CURVE_EXP, |
| 104 | SOFT_VOLUME_CURVE_LOG, |
| 105 | }; |
| 106 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 107 | typedef void (*app_cb)(uint32_t opcode, uint32_t token, |
| 108 | uint32_t *payload, void *priv); |
| 109 | |
| 110 | struct audio_buffer { |
| 111 | dma_addr_t phys; |
| 112 | void *data; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 113 | uint32_t used; |
| 114 | uint32_t size;/* size of buffer */ |
| 115 | uint32_t actual_size; /* actual number of bytes read by DSP */ |
Swaminathan Sathappan | bdc5508 | 2012-02-16 22:47:40 -0800 | [diff] [blame] | 116 | #ifdef CONFIG_MSM_MULTIMEDIA_USE_ION |
| 117 | struct ion_handle *handle; |
| 118 | struct ion_client *client; |
| 119 | #else |
Laura Abbott | ea3e7b6 | 2012-04-30 15:59:21 -0700 | [diff] [blame] | 120 | void *mem_buffer; |
Swaminathan Sathappan | bdc5508 | 2012-02-16 22:47:40 -0800 | [diff] [blame] | 121 | #endif |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 122 | }; |
| 123 | |
| 124 | struct audio_aio_write_param { |
| 125 | unsigned long paddr; |
| 126 | uint32_t uid; |
| 127 | uint32_t len; |
| 128 | uint32_t msw_ts; |
| 129 | uint32_t lsw_ts; |
| 130 | uint32_t flags; |
| 131 | }; |
| 132 | |
| 133 | struct audio_aio_read_param { |
| 134 | unsigned long paddr; |
| 135 | uint32_t len; |
| 136 | uint32_t uid; |
| 137 | }; |
| 138 | |
| 139 | struct audio_port_data { |
| 140 | struct audio_buffer *buf; |
| 141 | uint32_t max_buf_cnt; |
| 142 | uint32_t dsp_buf; |
| 143 | uint32_t cpu_buf; |
| 144 | /* read or write locks */ |
| 145 | struct mutex lock; |
| 146 | spinlock_t dsp_lock; |
| 147 | }; |
| 148 | |
| 149 | struct audio_client { |
| 150 | int session; |
| 151 | /* idx:1 out port, 0: in port*/ |
| 152 | struct audio_port_data port[2]; |
| 153 | |
| 154 | struct apr_svc *apr; |
| 155 | struct mutex cmd_lock; |
| 156 | |
| 157 | atomic_t cmd_state; |
Laxminath Kasam | 7700225 | 2012-12-19 14:54:14 +0530 | [diff] [blame] | 158 | atomic_t cmd_close_state; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 159 | atomic_t time_flag; |
Jay Wang | 0668d106 | 2012-07-11 18:53:21 -0700 | [diff] [blame] | 160 | atomic_t nowait_cmd_cnt; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 161 | wait_queue_head_t cmd_wait; |
| 162 | wait_queue_head_t time_wait; |
| 163 | |
| 164 | app_cb cb; |
| 165 | void *priv; |
| 166 | uint32_t io_mode; |
| 167 | uint64_t time_stamp; |
Srikanth Uyyala | a50b51d | 2012-07-02 16:02:24 +0530 | [diff] [blame] | 168 | atomic_t cmd_response; |
Jayasena Sangaraboina | 99bf09c | 2012-07-17 12:03:08 -0700 | [diff] [blame] | 169 | bool perf_mode; |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 170 | }; |
| 171 | |
| 172 | void q6asm_audio_client_free(struct audio_client *ac); |
| 173 | |
| 174 | struct audio_client *q6asm_audio_client_alloc(app_cb cb, void *priv); |
| 175 | |
Ben Romberger | 61754dc | 2011-10-31 18:25:41 -0700 | [diff] [blame] | 176 | struct audio_client *q6asm_get_audio_client(int session_id); |
| 177 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 178 | int q6asm_audio_client_buf_alloc(unsigned int dir/* 1:Out,0:In */, |
| 179 | struct audio_client *ac, |
| 180 | unsigned int bufsz, |
| 181 | unsigned int bufcnt); |
| 182 | int q6asm_audio_client_buf_alloc_contiguous(unsigned int dir |
| 183 | /* 1:Out,0:In */, |
| 184 | struct audio_client *ac, |
| 185 | unsigned int bufsz, |
| 186 | unsigned int bufcnt); |
| 187 | |
| 188 | int q6asm_audio_client_buf_free_contiguous(unsigned int dir, |
| 189 | struct audio_client *ac); |
| 190 | |
| 191 | int q6asm_open_read(struct audio_client *ac, uint32_t format); |
Jayasena Sangaraboina | 99bf09c | 2012-07-17 12:03:08 -0700 | [diff] [blame] | 192 | int q6asm_open_read_v2_1(struct audio_client *ac, uint32_t format); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 193 | |
Subhash Chandra Bose Naripeddy | 694b7d9 | 2012-06-20 20:46:13 -0700 | [diff] [blame] | 194 | int q6asm_open_read_compressed(struct audio_client *ac, |
| 195 | uint32_t frames_per_buffer, uint32_t meta_data_mode); |
Subhash Chandra Bose Naripeddy | 8f84689 | 2012-06-12 11:29:18 -0700 | [diff] [blame] | 196 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 197 | int q6asm_open_write(struct audio_client *ac, uint32_t format); |
| 198 | |
Santosh Mardi | 2332120 | 2012-03-22 04:33:25 +0530 | [diff] [blame] | 199 | int q6asm_open_write_compressed(struct audio_client *ac, uint32_t format); |
| 200 | |
Aviral Gupta | 4ad0f50 | 2012-10-16 12:40:07 +0530 | [diff] [blame] | 201 | int q6asm_open_transcode_loopback(struct audio_client *ac, uint32_t channels); |
| 202 | |
| 203 | int q6asm_enc_cfg_blk_dts(struct audio_client *ac, |
| 204 | uint32_t sample_rate, uint32_t channels); |
| 205 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 206 | int q6asm_open_read_write(struct audio_client *ac, |
| 207 | uint32_t rd_format, |
| 208 | uint32_t wr_format); |
| 209 | |
| 210 | int q6asm_write(struct audio_client *ac, uint32_t len, uint32_t msw_ts, |
| 211 | uint32_t lsw_ts, uint32_t flags); |
| 212 | int q6asm_write_nolock(struct audio_client *ac, uint32_t len, uint32_t msw_ts, |
| 213 | uint32_t lsw_ts, uint32_t flags); |
| 214 | |
| 215 | int q6asm_async_write(struct audio_client *ac, |
| 216 | struct audio_aio_write_param *param); |
| 217 | |
| 218 | int q6asm_async_read(struct audio_client *ac, |
| 219 | struct audio_aio_read_param *param); |
| 220 | |
Subhash Chandra Bose Naripeddy | 694b7d9 | 2012-06-20 20:46:13 -0700 | [diff] [blame] | 221 | int q6asm_async_read_compressed(struct audio_client *ac, |
| 222 | struct audio_aio_read_param *param); |
| 223 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 224 | int q6asm_read(struct audio_client *ac); |
| 225 | int q6asm_read_nolock(struct audio_client *ac); |
| 226 | |
| 227 | int q6asm_memory_map(struct audio_client *ac, uint32_t buf_add, |
| 228 | int dir, uint32_t bufsz, uint32_t bufcnt); |
| 229 | |
| 230 | int q6asm_memory_unmap(struct audio_client *ac, uint32_t buf_add, |
| 231 | int dir); |
| 232 | |
| 233 | int q6asm_run(struct audio_client *ac, uint32_t flags, |
| 234 | uint32_t msw_ts, uint32_t lsw_ts); |
| 235 | |
| 236 | int q6asm_run_nowait(struct audio_client *ac, uint32_t flags, |
| 237 | uint32_t msw_ts, uint32_t lsw_ts); |
| 238 | |
| 239 | int q6asm_reg_tx_overflow(struct audio_client *ac, uint16_t enable); |
| 240 | |
| 241 | int q6asm_cmd(struct audio_client *ac, int cmd); |
| 242 | |
| 243 | int q6asm_cmd_nowait(struct audio_client *ac, int cmd); |
| 244 | |
| 245 | void *q6asm_is_cpu_buf_avail(int dir, struct audio_client *ac, |
| 246 | uint32_t *size, uint32_t *idx); |
| 247 | |
Jay Wang | 9cf59a0 | 2011-08-10 16:58:40 -0700 | [diff] [blame] | 248 | void *q6asm_is_cpu_buf_avail_nolock(int dir, struct audio_client *ac, |
| 249 | uint32_t *size, uint32_t *idx); |
| 250 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 251 | int q6asm_is_dsp_buf_avail(int dir, struct audio_client *ac); |
| 252 | |
| 253 | /* File format specific configurations to be added below */ |
| 254 | |
| 255 | int q6asm_enc_cfg_blk_aac(struct audio_client *ac, |
| 256 | uint32_t frames_per_buf, |
| 257 | uint32_t sample_rate, uint32_t channels, |
| 258 | uint32_t bit_rate, |
| 259 | uint32_t mode, uint32_t format); |
| 260 | |
| 261 | int q6asm_enc_cfg_blk_pcm(struct audio_client *ac, |
| 262 | uint32_t rate, uint32_t channels); |
| 263 | |
Harmandeep Singh | eaf59b4 | 2012-06-05 21:46:02 -0700 | [diff] [blame] | 264 | int q6asm_enc_cfg_blk_pcm_native(struct audio_client *ac, |
| 265 | uint32_t rate, uint32_t channels); |
| 266 | |
Mingming Yin | 647e9ea | 2012-03-17 19:56:10 -0700 | [diff] [blame] | 267 | int q6asm_enc_cfg_blk_multi_ch_pcm(struct audio_client *ac, |
| 268 | uint32_t rate, uint32_t channels); |
| 269 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 270 | int q6asm_enable_sbrps(struct audio_client *ac, |
| 271 | uint32_t sbr_ps); |
| 272 | |
Swaminathan Sathappan | 70765cd | 2011-07-19 18:42:47 -0700 | [diff] [blame] | 273 | int q6asm_cfg_dual_mono_aac(struct audio_client *ac, |
| 274 | uint16_t sce_left, uint16_t sce_right); |
| 275 | |
Swaminathan Sathappan | 6f53088 | 2012-05-01 16:42:22 -0700 | [diff] [blame] | 276 | int q6asm_set_encdec_chan_map(struct audio_client *ac, |
| 277 | uint32_t num_channels); |
| 278 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 279 | int q6asm_enc_cfg_blk_qcelp(struct audio_client *ac, uint32_t frames_per_buf, |
| 280 | uint16_t min_rate, uint16_t max_rate, |
| 281 | uint16_t reduced_rate_level, uint16_t rate_modulation_cmd); |
| 282 | |
| 283 | int q6asm_enc_cfg_blk_evrc(struct audio_client *ac, uint32_t frames_per_buf, |
| 284 | uint16_t min_rate, uint16_t max_rate, |
| 285 | uint16_t rate_modulation_cmd); |
| 286 | |
| 287 | int q6asm_enc_cfg_blk_amrnb(struct audio_client *ac, uint32_t frames_per_buf, |
| 288 | uint16_t band_mode, uint16_t dtx_enable); |
| 289 | |
Alex Wong | 2caeecc | 2011-10-28 10:52:15 +0530 | [diff] [blame] | 290 | int q6asm_enc_cfg_blk_amrwb(struct audio_client *ac, uint32_t frames_per_buf, |
| 291 | uint16_t band_mode, uint16_t dtx_enable); |
| 292 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 293 | int q6asm_media_format_block_pcm(struct audio_client *ac, |
| 294 | uint32_t rate, uint32_t channels); |
| 295 | |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 296 | int q6asm_media_format_block_multi_ch_pcm(struct audio_client *ac, |
Subhash Chandra Bose Naripeddy | c4f0c16 | 2012-09-05 20:48:57 -0700 | [diff] [blame] | 297 | uint32_t rate, uint32_t channels, |
| 298 | char *channel_map); |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 299 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 300 | int q6asm_media_format_block_aac(struct audio_client *ac, |
| 301 | struct asm_aac_cfg *cfg); |
| 302 | |
Ajit Khare | bf47583 | 2012-08-07 13:19:44 -0700 | [diff] [blame] | 303 | int q6asm_media_format_block_amrwbplus(struct audio_client *ac, |
| 304 | struct asm_amrwbplus_cfg *cfg); |
| 305 | |
Bharath Ramachandramurthy | 4f71d50 | 2011-10-23 19:45:22 -0700 | [diff] [blame] | 306 | int q6asm_media_format_block_multi_aac(struct audio_client *ac, |
| 307 | struct asm_aac_cfg *cfg); |
| 308 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 309 | int q6asm_media_format_block_wma(struct audio_client *ac, |
| 310 | void *cfg); |
| 311 | |
| 312 | int q6asm_media_format_block_wmapro(struct audio_client *ac, |
| 313 | void *cfg); |
| 314 | |
| 315 | /* PP specific */ |
| 316 | int q6asm_equalizer(struct audio_client *ac, void *eq); |
| 317 | |
| 318 | /* Send Volume Command */ |
| 319 | int q6asm_set_volume(struct audio_client *ac, int volume); |
| 320 | |
| 321 | /* Set SoftPause Params */ |
| 322 | int q6asm_set_softpause(struct audio_client *ac, |
| 323 | struct asm_softpause_params *param); |
| 324 | |
Swaminathan Sathappan | b0021cd | 2011-08-31 15:20:12 -0700 | [diff] [blame] | 325 | /* Set Softvolume Params */ |
| 326 | int q6asm_set_softvolume(struct audio_client *ac, |
| 327 | struct asm_softvolume_params *param); |
| 328 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 329 | /* Send left-right channel gain */ |
| 330 | int q6asm_set_lrgain(struct audio_client *ac, int left_gain, int right_gain); |
| 331 | |
| 332 | /* Enable Mute/unmute flag */ |
| 333 | int q6asm_set_mute(struct audio_client *ac, int muteflag); |
| 334 | |
Patrick Lai | fc8f224 | 2013-01-06 00:52:34 -0800 | [diff] [blame] | 335 | int q6asm_get_session_time(struct audio_client *ac, uint64_t *tstamp); |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 336 | |
| 337 | /* Client can set the IO mode to either AIO/SIO mode */ |
| 338 | int q6asm_set_io_mode(struct audio_client *ac, uint32_t mode); |
| 339 | |
Ben Romberger | 45b351c | 2011-07-20 22:37:27 -0700 | [diff] [blame] | 340 | #ifdef CONFIG_RTAC |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 341 | /* Get Service ID for APR communication */ |
| 342 | int q6asm_get_apr_service_id(int session_id); |
| 343 | #endif |
| 344 | |
Alex Wong | 2caeecc | 2011-10-28 10:52:15 +0530 | [diff] [blame] | 345 | /* Common format block without any payload |
| 346 | */ |
| 347 | int q6asm_media_format_block(struct audio_client *ac, uint32_t format); |
| 348 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 349 | #endif /* __Q6_ASM_H__ */ |