Duy Truong | 790f06d | 2013-02-13 16:38:12 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2010-2012, 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_ADM_H__ |
| 13 | #define __Q6_ADM_H__ |
| 14 | #include <sound/q6afe.h> |
| 15 | |
| 16 | #define ADM_PATH_PLAYBACK 0x1 |
| 17 | #define ADM_PATH_LIVE_REC 0x2 |
| 18 | #define ADM_PATH_NONLIVE_REC 0x3 |
| 19 | |
| 20 | /* multiple copp per stream. */ |
| 21 | struct route_payload { |
| 22 | unsigned int copp_ids[AFE_MAX_PORTS]; |
| 23 | unsigned short num_copps; |
| 24 | unsigned int session_id; |
| 25 | }; |
| 26 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 27 | int adm_open(int port, int path, int rate, int mode, int topology); |
| 28 | |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 29 | int adm_multi_ch_copp_open(int port, int path, int rate, int mode, |
Jayasena Sangaraboina | 99bf09c | 2012-07-17 12:03:08 -0700 | [diff] [blame] | 30 | int topology, int perfmode); |
Kiran Kandi | 5e809b0 | 2012-01-31 00:24:33 -0800 | [diff] [blame] | 31 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 32 | int adm_memory_map_regions(uint32_t *buf_add, uint32_t mempool_id, |
| 33 | uint32_t *bufsz, uint32_t bufcnt); |
| 34 | |
| 35 | int adm_memory_unmap_regions(uint32_t *buf_add, uint32_t *bufsz, |
| 36 | uint32_t bufcnt); |
| 37 | |
| 38 | int adm_close(int port); |
| 39 | |
Aviral Gupta | 4ad0f50 | 2012-10-16 12:40:07 +0530 | [diff] [blame] | 40 | int adm_pseudo_close(int port); |
| 41 | |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 42 | int adm_matrix_map(int session_id, int path, int num_copps, |
| 43 | unsigned int *port_id, int copp_id); |
| 44 | |
Santosh Mardi | 2332120 | 2012-03-22 04:33:25 +0530 | [diff] [blame] | 45 | int adm_connect_afe_port(int mode, int session_id, int port_id); |
Santosh Mardi | d176079 | 2012-06-12 16:23:19 +0530 | [diff] [blame] | 46 | int adm_disconnect_afe_port(int mode, int session_id, int port_id); |
Santosh Mardi | 2332120 | 2012-03-22 04:33:25 +0530 | [diff] [blame] | 47 | |
Jayasena Sangaraboina | f4ab0df | 2012-06-06 22:38:40 -0700 | [diff] [blame] | 48 | void adm_ec_ref_rx_id(int port_id); |
| 49 | |
Aviral Gupta | 4ad0f50 | 2012-10-16 12:40:07 +0530 | [diff] [blame] | 50 | int adm_connect_afe_port_v2(int mode, int session_id, int port_id, |
| 51 | int sample_rate, int channels); |
| 52 | |
| 53 | int adm_multi_ch_copp_pseudo_open_v3(int port_id, int path, int rate, |
| 54 | int channel_mode, int topology); |
| 55 | |
Ben Romberger | 45b351c | 2011-07-20 22:37:27 -0700 | [diff] [blame] | 56 | #ifdef CONFIG_RTAC |
Bryan Huntsman | 3f2bc4d | 2011-08-16 17:27:22 -0700 | [diff] [blame] | 57 | int adm_get_copp_id(int port_id); |
| 58 | #endif |
| 59 | |
| 60 | #endif /* __Q6_ADM_H__ */ |