projects
/
cascardo
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ASoC: 88pm860x: array overflow in snd_soc_put_volsw_2r_st()
[cascardo/linux.git]
/
sound
/
soc
/
soc-pcm.c
diff --git
a/sound/soc/soc-pcm.c
b/sound/soc/soc-pcm.c
index
fb70fbe
..
330c9a6
100644
(file)
--- a/
sound/soc/soc-pcm.c
+++ b/
sound/soc/soc-pcm.c
@@
-2020,6
+2020,16
@@
int soc_new_pcm(struct snd_soc_pcm_runtime *rtd, int num)
capture = 1;
}
capture = 1;
}
+ if (rtd->dai_link->playback_only) {
+ playback = 1;
+ capture = 0;
+ }
+
+ if (rtd->dai_link->capture_only) {
+ playback = 0;
+ capture = 1;
+ }
+
/* create the PCM */
if (rtd->dai_link->no_pcm) {
snprintf(new_name, sizeof(new_name), "(%s)",
/* create the PCM */
if (rtd->dai_link->no_pcm) {
snprintf(new_name, sizeof(new_name), "(%s)",