| 1 |
/* SPDX-License-Identifier: GPL-2.0-only |
| 2 |
* SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. |
| 3 |
* All rights reserved. |
| 4 |
* |
| 5 |
* tegra_isomgr_bw.h - Definitions for ADMA bandwidth calculation |
| 6 |
* |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef __TEGRA_ISOMGR_BW_H__ |
| 10 |
#define __TEGRA_ISOMGR_BW_H__ |
| 11 |
|
| 12 |
/* Playback and Capture streams */ |
| 13 |
#define STREAM_TYPE 2 |
| 14 |
|
| 15 |
struct tegra_adma_isomgr { |
| 16 |
/* Protect pcm devices bandwidth */ |
| 17 |
struct mutex mutex; |
| 18 |
/* interconnect path handle */ |
| 19 |
struct icc_path *icc_path_handle; |
| 20 |
u32 *bw_per_dev[STREAM_TYPE]; |
| 21 |
u32 current_bandwidth; |
| 22 |
u32 max_pcm_device; |
| 23 |
u32 max_bw; |
| 24 |
}; |
| 25 |
|
| 26 |
int tegra_isomgr_adma_register(struct device *dev); |
| 27 |
void tegra_isomgr_adma_unregister(struct device *dev); |
| 28 |
int tegra_isomgr_adma_setbw(struct snd_pcm_substream *substream, |
| 29 |
struct snd_soc_dai *dai, bool is_running); |
| 30 |
|
| 31 |
#endif |