diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-11-23 16:36:52 +1100 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-11-23 16:36:52 +1100 |
commit | 9bc9a6bc734707bfecf58a8c68bab8478c16cae6 (patch) | |
tree | 77242f8ae00e4cda1e9c79060e52d71725f24b77 /pcm.c | |
parent | 4d67fe2f36b0761cdae7080a5e474a9f871377e3 (diff) |
Fix vmalloc failure for some platforms
On the Intel minnowboard, vmalloc was failing for such a large
amount of requested memory. We do not need to be requesting so
much.
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'pcm.c')
-rw-r--r-- | pcm.c | 7 |
1 files changed, 2 insertions, 5 deletions
@@ -121,7 +121,6 @@ static int pcm_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *hw_params) { int retval; - size_t bufsz; /* Check supported channels */ if ((params_channels(hw_params) < @@ -133,10 +132,8 @@ static int pcm_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } - bufsz = params_buffer_bytes(hw_params) * - substream->runtime->hw.periods_max; - - retval = snd_pcm_lib_alloc_vmalloc_buffer(substream, bufsz); + retval = snd_pcm_lib_alloc_vmalloc_buffer( + substream, params_buffer_bytes(hw_params)); if (retval < 0) D_ERRORK("pcm: buffer allocation failed: %d", retval); |