Subhash Chandra Bose Naripeddy | ea09588 | 2012-12-17 23:18:21 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved. |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -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_ADM_V2_H__ |
| 13 | #define __Q6_ADM_V2_H__ |
| 14 | |
| 15 | |
| 16 | #define ADM_PATH_PLAYBACK 0x1 |
| 17 | #define ADM_PATH_LIVE_REC 0x2 |
| 18 | #define ADM_PATH_NONLIVE_REC 0x3 |
Ben Romberger | 092d70c | 2013-08-07 15:33:47 -0700 | [diff] [blame] | 19 | #include <mach/qdsp6v2/rtac.h> |
Kiran Kandi | 3648bde | 2012-11-16 09:49:01 -0800 | [diff] [blame] | 20 | #include <sound/q6afe-v2.h> |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 21 | #include <sound/q6audio-v2.h> |
| 22 | |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 23 | |
| 24 | /* multiple copp per stream. */ |
| 25 | struct route_payload { |
Kiran Kandi | 3648bde | 2012-11-16 09:49:01 -0800 | [diff] [blame] | 26 | unsigned int copp_ids[AFE_MAX_PORTS]; |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 27 | unsigned short num_copps; |
| 28 | unsigned int session_id; |
| 29 | }; |
| 30 | |
Ben Romberger | 564493d | 2012-12-04 20:48:28 -0800 | [diff] [blame] | 31 | int srs_trumedia_open(int port_id, int srs_tech_id, void *srs_params); |
| 32 | |
Phani Kumar Uppalapati | 85b7c9b | 2013-02-19 09:59:47 -0800 | [diff] [blame] | 33 | int adm_open(int port, int path, int rate, int mode, int topology, |
Krishnankutty Kolathappilly | 3613a16 | 2013-11-25 12:13:10 -0800 | [diff] [blame] | 34 | int perf_mode, uint16_t bits_per_sample); |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 35 | |
Jitendra Singh Naruka | 52a6691 | 2013-06-28 11:53:45 -0700 | [diff] [blame] | 36 | int adm_get_params(int port_id, uint32_t module_id, uint32_t param_id, |
Subhash Chandra Bose Naripeddy | 1710284 | 2013-01-13 11:08:06 -0800 | [diff] [blame] | 37 | uint32_t params_length, char *params); |
| 38 | |
| 39 | int adm_dolby_dap_send_params(int port_id, char *params, |
| 40 | uint32_t params_length); |
| 41 | |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 42 | int adm_multi_ch_copp_open(int port, int path, int rate, int mode, |
Krishnankutty Kolathappilly | 3613a16 | 2013-11-25 12:13:10 -0800 | [diff] [blame] | 43 | int topology, int perf_mode, uint16_t bits_per_sample); |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 44 | |
Ben Romberger | 971765c | 2013-07-23 17:27:18 -0700 | [diff] [blame] | 45 | int adm_unmap_cal_blocks(void); |
| 46 | |
Ben Romberger | 092d70c | 2013-08-07 15:33:47 -0700 | [diff] [blame] | 47 | int adm_map_rtac_block(struct rtac_cal_block_data *cal_block); |
| 48 | |
| 49 | int adm_unmap_rtac_block(uint32_t *mem_map_handle); |
| 50 | |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 51 | int adm_memory_map_regions(int port_id, uint32_t *buf_add, uint32_t mempool_id, |
| 52 | uint32_t *bufsz, uint32_t bufcnt); |
| 53 | |
Ben Romberger | 971765c | 2013-07-23 17:27:18 -0700 | [diff] [blame] | 54 | int adm_memory_unmap_regions(int port_id); |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 55 | |
Krishnankutty Kolathappilly | 3613a16 | 2013-11-25 12:13:10 -0800 | [diff] [blame] | 56 | int adm_close(int port, int perf_mode); |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 57 | |
| 58 | int adm_matrix_map(int session_id, int path, int num_copps, |
Krishnankutty Kolathappilly | 3613a16 | 2013-11-25 12:13:10 -0800 | [diff] [blame] | 59 | unsigned int *port_id, int copp_id, int perf_mode); |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 60 | |
| 61 | int adm_connect_afe_port(int mode, int session_id, int port_id); |
| 62 | |
Ravi Kumar Alamanda | e604875 | 2013-05-19 23:23:24 -0700 | [diff] [blame] | 63 | void adm_ec_ref_rx_id(int port_id); |
| 64 | |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 65 | int adm_get_copp_id(int port_id); |
| 66 | |
Ravi Kumar Alamanda | d9f1b17 | 2013-10-21 13:57:12 -0700 | [diff] [blame] | 67 | int adm_get_lowlatency_copp_id(int port_id); |
| 68 | |
Subhash Chandra Bose Naripeddy | ea09588 | 2012-12-17 23:18:21 -0800 | [diff] [blame] | 69 | void adm_set_multi_ch_map(char *channel_map); |
| 70 | |
| 71 | void adm_get_multi_ch_map(char *channel_map); |
| 72 | |
Bharath Ramachandramurthy | 2e3168f | 2012-05-03 16:29:09 -0700 | [diff] [blame] | 73 | #endif /* __Q6_ADM_V2_H__ */ |