diff options
-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); |