Files
linux-nv-oot/include/sound/tegra_nvfx_plugin.h
Dara Ramesh ee8a8e9853 ASoC: tegra: add adsp audio driver
Added ADSP audio driver support for tegra soc and tegra virt alt.

Below are the changes made with respect to Kernel 5.10:

- Removed the ADSP COMPR DAI links due to differences in compress DAI
  link registration in Android (ACK 6.6) which causes build issues.

- Omitted the callback function for dumping ADMA registers, as the
  upstream ADMA driver does not support it.

Bug 3910602
Bug 4635899

Change-Id: I63ea878ef2e9a960d127d02470e8048535878518
Signed-off-by: Dara Ramesh <dramesh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132128
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-10 04:30:57 -07:00

85 lines
2.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2021-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
*
* tegra_nvfx_plugin.h - Shared NVFX interface for different plugins between
* Tegra ADSP ALSA driver and ADSP side user space code.
*/
#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_ */