blob: 6324d29d0db1b4ad129045287ab07f4dfa6a69d0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
/*
* tegra_nvfx_plugin.h - Shared NVFX interface for different plugins between
* Tegra ADSP ALSA driver and ADSP side user space code.
*
* Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*/
#ifndef _TEGRA_NVFX_PLUGIN_H_
#define _TEGRA_NVFX_PLUGIN_H_
/* Mode */
#define ADMA_MODE_ONESHOT 1
#define ADMA_MODE_CONTINUOUS 2
#define ADMA_MODE_LINKED_LIST 4
/* Direction */
#define ADMA_MEMORY_TO_MEMORY 1
#define ADMA_AHUB_TO_MEMORY 2
#define ADMA_MEMORY_TO_AHUB 4
#define ADMA_AHUB_TO_AHUB 8
#define EAVB_RX_DMA 0
#define EAVB_TX_DMA 1
/* EAVB DMA PLUGIN NAMES */
#define EAVB_RX_PLUGIN "eavb_dma_rx"
#define EAVB_TX_PLUGIN "eavb_dma_tx"
/* ADMA plugin related interface */
enum {
/* NVFX ADMA params */
nvfx_adma_method_init = nvfx_method_external_start,
nvfx_adma_method_get_position,
nvfx_adma_set_custom_params,
nvfx_adma_set_null_sink_mode,
};
typedef struct {
nvfx_call_params_t call_params;
int32_t adma_channel;
int32_t mode;
int32_t direction;
int32_t ahub_channel;
int32_t periods;
uint32_t adma_ch_page;
variant_t event;
uint32_t burst_size;
uint32_t intr_dur;
} nvfx_adma_init_params_t;
typedef struct {
nvfx_call_params_t nvfx_call_params;
uint32_t is_enabled;
uint32_t buffer;
uint32_t offset;
uint64_t bytes_transferred;
} nvfx_adma_get_position_params_t;
typedef union {
nvfx_req_call_params_t req_call;
nvfx_adma_init_params_t init;
nvfx_adma_get_position_params_t get_position;
} nvfx_adma_req_call_params_t;
/* EAVB DMA plugin related interface */
enum {
/* NVFX EAVB DMA params */
nvfx_eavbdma_method_init = nvfx_method_external_start,
nvfx_eavbdma_method_get_position,
};
typedef struct {
nvfx_call_params_t call_params;
int32_t direction;
variant_t event;
} nvfx_eavbdma_init_params_t;
typedef union {
nvfx_req_call_params_t req_call;
nvfx_eavbdma_init_params_t init;
} nvfx_eavbdma_req_call_params_t;
#endif /* #ifndef _TEGRA_NVFX_PLUGIN_H_ */
|