Skip to content

Commit 7d852b3

Browse files
Sheetalbroonie
authored andcommitted
ASoC: tegra: Tegra264 support in isomgr_bw
Tegra264 supports max 32 channels, hence calculating the max bandwidth using the channel info from soc_data. Signed-off-by: Sheetal <sheetal@nvidia.com> Link: https://patch.msgid.link/20250512051747.1026770-12-sheetal@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 4152d33 commit 7d852b3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sound/soc/tegra/tegra_isomgr_bw.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include "tegra_isomgr_bw.h"
1212
#include "tegra210_admaif.h"
1313

14-
/* Max possible rate is 192KHz x 16channel x 4bytes */
15-
#define MAX_BW_PER_DEV 12288
14+
#define MAX_SAMPLE_RATE 192 /* KHz*/
15+
#define MAX_BYTES_PER_SAMPLE 4
1616

1717
int tegra_isomgr_adma_setbw(struct snd_pcm_substream *substream,
1818
struct snd_soc_dai *dai, bool is_running)
@@ -98,7 +98,8 @@ int tegra_isomgr_adma_register(struct device *dev)
9898
}
9999

100100
adma_isomgr->max_pcm_device = admaif->soc_data->num_ch;
101-
adma_isomgr->max_bw = STREAM_TYPE * MAX_BW_PER_DEV * adma_isomgr->max_pcm_device;
101+
adma_isomgr->max_bw = STREAM_TYPE * MAX_SAMPLE_RATE * MAX_BYTES_PER_SAMPLE *
102+
admaif->soc_data->max_stream_ch * adma_isomgr->max_pcm_device;
102103

103104
for (i = 0; i < STREAM_TYPE; i++) {
104105
adma_isomgr->bw_per_dev[i] = devm_kzalloc(dev, adma_isomgr->max_pcm_device *

0 commit comments

Comments
 (0)