summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-07 06:25:14 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-07 06:25:14 -0800
commit35731dbb9352cd912ffaebd273d203456f37d1da (patch)
treebabd1ad20bafc27b5b02f2e47135c6420a6c54e6
parentc5b24f32217ab4a057f78be6ed7f311b8a49f023 (diff)
parent05f4374845738d2146075e77d9139e60a558de18 (diff)
Merge "ASoC: Add backend user count checking"
-rw-r--r--sound/soc/soc-compress.c5
-rw-r--r--sound/soc/soc-pcm.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/soc-compress.c b/sound/soc/soc-compress.c
index eb894d073c07..736b9c45e59a 100644
--- a/sound/soc/soc-compress.c
+++ b/sound/soc/soc-compress.c
@@ -527,6 +527,11 @@ static int soc_compr_set_params_fe(struct snd_compr_stream *cstream,
cstream, &async_domain);
} else {
be_list[j++] = be;
+ if (j == DPCM_MAX_BE_USERS) {
+ dev_dbg(fe->dev,
+ "ASoC: MAX backend users!\n");
+ break;
+ }
}
}
for (i = 0; i < j; i++) {
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c
index 13649f96b370..0ba9dfb854b3 100644
--- a/sound/soc/soc-pcm.c
+++ b/sound/soc/soc-pcm.c
@@ -2403,6 +2403,10 @@ void dpcm_be_dai_prepare_async(struct snd_soc_pcm_runtime *fe, int stream,
dpcm, domain);
} else {
dpcm_async[i++] = dpcm;
+ if (i == DPCM_MAX_BE_USERS) {
+ dev_dbg(fe->dev, "ASoC: MAX backend users!\n");
+ break;
+ }
}
}