blob: 48bb1aa5bc1adac9c23659f0074e0292a143c74c [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
Kiran Kandi3648bde2012-11-16 09:49:01 -080019#include <sound/q6afe-v2.h>
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070020#include <sound/q6audio-v2.h>
21
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070022
23/* multiple copp per stream. */
24struct route_payload {
Kiran Kandi3648bde2012-11-16 09:49:01 -080025 unsigned int copp_ids[AFE_MAX_PORTS];
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070026 unsigned short num_copps;
27 unsigned int session_id;
28};
29
Ben Romberger564493d2012-12-04 20:48:28 -080030int srs_trumedia_open(int port_id, int srs_tech_id, void *srs_params);
31
Phani Kumar Uppalapati85b7c9b2013-02-19 09:59:47 -080032int adm_open(int port, int path, int rate, int mode, int topology,
Bhalchandra Gajare5b40c532013-02-19 13:36:47 -080033 bool perf_mode, uint16_t bits_per_sample);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070034
Jitendra Singh Naruka52a66912013-06-28 11:53:45 -070035int adm_get_params(int port_id, uint32_t module_id, uint32_t param_id,
Subhash Chandra Bose Naripeddy17102842013-01-13 11:08:06 -080036 uint32_t params_length, char *params);
37
38int adm_dolby_dap_send_params(int port_id, char *params,
39 uint32_t params_length);
40
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070041int adm_multi_ch_copp_open(int port, int path, int rate, int mode,
Bhalchandra Gajare5b40c532013-02-19 13:36:47 -080042 int topology, bool perf_mode, uint16_t bits_per_sample);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070043
Ben Romberger971765c2013-07-23 17:27:18 -070044int adm_unmap_cal_blocks(void);
45
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070046int adm_memory_map_regions(int port_id, uint32_t *buf_add, uint32_t mempool_id,
47 uint32_t *bufsz, uint32_t bufcnt);
48
Ben Romberger971765c2013-07-23 17:27:18 -070049int adm_memory_unmap_regions(int port_id);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070050
Subhash Chandra Bose Naripeddyaffd9ad2013-03-14 23:00:45 -070051int adm_close(int port, bool perf_mode);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070052
53int adm_matrix_map(int session_id, int path, int num_copps,
Subhash Chandra Bose Naripeddyaffd9ad2013-03-14 23:00:45 -070054 unsigned int *port_id, int copp_id, bool perf_mode);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070055
56int adm_connect_afe_port(int mode, int session_id, int port_id);
57
Ravi Kumar Alamandae6048752013-05-19 23:23:24 -070058void adm_ec_ref_rx_id(int port_id);
59
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070060int adm_get_copp_id(int port_id);
61
Subhash Chandra Bose Naripeddyea095882012-12-17 23:18:21 -080062void adm_set_multi_ch_map(char *channel_map);
63
64void adm_get_multi_ch_map(char *channel_map);
65
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070066#endif /* __Q6_ADM_V2_H__ */