blob: e07f634885ddfa0bd4be0bc6642b446a1d7cfdef [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
44int adm_memory_map_regions(int port_id, uint32_t *buf_add, uint32_t mempool_id,
45 uint32_t *bufsz, uint32_t bufcnt);
46
47int adm_memory_unmap_regions(int port_id, uint32_t *buf_add, uint32_t *bufsz,
48 uint32_t bufcnt);
49
Subhash Chandra Bose Naripeddyaffd9ad2013-03-14 23:00:45 -070050int adm_close(int port, bool perf_mode);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070051
52int adm_matrix_map(int session_id, int path, int num_copps,
Subhash Chandra Bose Naripeddyaffd9ad2013-03-14 23:00:45 -070053 unsigned int *port_id, int copp_id, bool perf_mode);
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070054
55int adm_connect_afe_port(int mode, int session_id, int port_id);
56
Ravi Kumar Alamandae6048752013-05-19 23:23:24 -070057void adm_ec_ref_rx_id(int port_id);
58
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070059int adm_get_copp_id(int port_id);
60
Subhash Chandra Bose Naripeddyea095882012-12-17 23:18:21 -080061void adm_set_multi_ch_map(char *channel_map);
62
63void adm_get_multi_ch_map(char *channel_map);
64
Bharath Ramachandramurthy2e3168f2012-05-03 16:29:09 -070065#endif /* __Q6_ADM_V2_H__ */