mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 02:34:01 +08:00
ASoC: simple-card-utils: Increase maximum number of links to 128
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: f2138aed23
("ASoC: simple-card-utils: enable flexible CPU/Codec/Platform")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20210416071147.2149109-2-thierry.reding@gmail.com
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0f687d8267
commit
343e55e718
@ -115,10 +115,12 @@ struct asoc_simple_priv {
|
||||
((codec) = simple_props_to_dai_codec(props, i)); \
|
||||
(i)++)
|
||||
|
||||
#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];
|
||||
};
|
||||
|
||||
int asoc_simple_parse_daifmt(struct device *dev,
|
||||
|
@ -619,7 +619,7 @@ static int graph_count_noml(struct asoc_simple_priv *priv,
|
||||
{
|
||||
struct device *dev = simple_priv_to_dev(priv);
|
||||
|
||||
if (li->link >= SNDRV_MINOR_DEVICES) {
|
||||
if (li->link >= SNDRV_MAX_LINKS) {
|
||||
dev_err(dev, "too many links\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
@ -642,7 +642,7 @@ static int graph_count_dpcm(struct asoc_simple_priv *priv,
|
||||
{
|
||||
struct device *dev = simple_priv_to_dev(priv);
|
||||
|
||||
if (li->link >= SNDRV_MINOR_DEVICES) {
|
||||
if (li->link >= SNDRV_MAX_LINKS) {
|
||||
dev_err(dev, "too many links\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -482,7 +482,7 @@ static int simple_count_noml(struct asoc_simple_priv *priv,
|
||||
struct device_node *codec,
|
||||
struct link_info *li, bool is_top)
|
||||
{
|
||||
if (li->link >= SNDRV_MINOR_DEVICES) {
|
||||
if (li->link >= SNDRV_MAX_LINKS) {
|
||||
struct device *dev = simple_priv_to_dev(priv);
|
||||
|
||||
dev_err(dev, "too many links\n");
|
||||
@ -503,7 +503,7 @@ static int simple_count_dpcm(struct asoc_simple_priv *priv,
|
||||
struct device_node *codec,
|
||||
struct link_info *li, bool is_top)
|
||||
{
|
||||
if (li->link >= SNDRV_MINOR_DEVICES) {
|
||||
if (li->link >= SNDRV_MAX_LINKS) {
|
||||
struct device *dev = simple_priv_to_dev(priv);
|
||||
|
||||
dev_err(dev, "too many links\n");
|
||||
|
Loading…
Reference in New Issue
Block a user