[PATCH 2/2] ASoC: simple-card-utils: Increase maximum number of links to 128

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Apr 19 03:42:55 CEST 2021


Hi Thierry

> From: Thierry Reding <treding at nvidia.com>
> 
> On Tegra186 and later, the number of links can go up to 72, so bump the
> maximum number of links to the next power of two (128).
> 
> Fixes: f2138aed231c ("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
> Signed-off-by: Thierry Reding <treding at nvidia.com>
(snip)
> +#define SNDRV_MAX_LINKS 128
> +
>  struct link_info {
>  	int link; /* number of link */
>  	int cpu;  /* turn for CPU / Codec */
> -	struct prop_nums num[SNDRV_MINOR_DEVICES];
> +	struct prop_nums num[SNDRV_MAX_LINKS];
>  };


How many numbers do you really need ?

Because simple-card needs many parameters,
thus I will get below warning.
# It is not yet happen on upstream kernel, but will be

	warning: the frame size of 2280 bytes is larger than 2048 bytes [-Wframe-larger-than=]

This warning doesn't appear if SNDRV_MAX_LINKS was 64.
Can we reduce it ?

Thank you for your help !!

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list