blob: 5941f7192db4b3ddecd814f45f417f4c03d1c6c7 [file] [log] [blame]
Subhash Chandra Bose Naripeddyea095882012-12-17 23:18:21 -08001/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -07002 *
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 Romberger092d70c2013-08-07 15:33:47 -070019#include <mach/qdsp6v2/rtac.h>
Kiran Kandi3648bde2012-11-16 09:49:01 -080020#include <sound/q6afe-v2.h>
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070021#include <sound/q6audio-v2.h>
22
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070023
24/* multiple copp per stream. */
25struct route_payload {
Kiran Kandi3648bde2012-11-16 09:49:01 -080026 unsigned int copp_ids[AFE_MAX_PORTS];
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070027 unsigned short num_copps;
28 unsigned int session_id;
29};
30
Ben Romberger564493d2012-12-04 20:48:28 -080031int srs_trumedia_open(int port_id, int srs_tech_id, void *srs_params);
32
Phani Kumar Uppalapati85b7c9b2013-02-19 09:59:47 -080033int adm_open(int port, int path, int rate, int mode, int topology,
Krishnankutty Kolathappilly3613a162013-11-25 12:13:10 -080034 int perf_mode, uint16_t bits_per_sample);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070035
Jitendra Singh Naruka52a66912013-06-28 11:53:45 -070036int adm_get_params(int port_id, uint32_t module_id, uint32_t param_id,
Subhash Chandra Bose Naripeddy17102842013-01-13 11:08:06 -080037 uint32_t params_length, char *params);
38
39int adm_dolby_dap_send_params(int port_id, char *params,
40 uint32_t params_length);
41
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070042int adm_multi_ch_copp_open(int port, int path, int rate, int mode,
Krishnankutty Kolathappilly3613a162013-11-25 12:13:10 -080043 int topology, int perf_mode, uint16_t bits_per_sample);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070044
Ben Romberger971765c2013-07-23 17:27:18 -070045int adm_unmap_cal_blocks(void);
46
Ben Romberger092d70c2013-08-07 15:33:47 -070047int adm_map_rtac_block(struct rtac_cal_block_data *cal_block);
48
49int adm_unmap_rtac_block(uint32_t *mem_map_handle);
50
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070051int adm_memory_map_regions(int port_id, uint32_t *buf_add, uint32_t mempool_id,
52 uint32_t *bufsz, uint32_t bufcnt);
53
Ben Romberger971765c2013-07-23 17:27:18 -070054int adm_memory_unmap_regions(int port_id);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070055
Krishnankutty Kolathappilly3613a162013-11-25 12:13:10 -080056int adm_close(int port, int perf_mode);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070057
58int adm_matrix_map(int session_id, int path, int num_copps,
Krishnankutty Kolathappilly3613a162013-11-25 12:13:10 -080059 unsigned int *port_id, int copp_id, int perf_mode);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070060
61int adm_connect_afe_port(int mode, int session_id, int port_id);
62
Ravi Kumar Alamandae6048752013-05-19 23:23:24 -070063void adm_ec_ref_rx_id(int port_id);
64
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070065int adm_get_copp_id(int port_id);
66
Ravi Kumar Alamandad9f1b172013-10-21 13:57:12 -070067int adm_get_lowlatency_copp_id(int port_id);
68
Subhash Chandra Bose Naripeddyea095882012-12-17 23:18:21 -080069void adm_set_multi_ch_map(char *channel_map);
70
71void adm_get_multi_ch_map(char *channel_map);
72
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070073#endif /* __Q6_ADM_V2_H__ */