summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-08-02 09:28:03 +0200
committerTakashi Iwai <tiwai@suse.de>2021-08-04 08:08:06 +0200
commitac9245a5406e6074a1aa211f103629d3f154c5a5 (patch)
tree068428c901ef2bfeebe94ee8613011e71579f6b7 /scripts
parent58a95dfa4fdd9c72e62be34dd025d268c1e04a83 (diff)
downloadlinux-ac9245a5406e6074a1aa211f103629d3f154c5a5.tar.bz2
ALSA: pcm: Allow exact buffer preallocation
A few drivers want to have rather the exact buffer preallocation at the driver probe time and keep using it for the whole operations without allowing dynamic buffer allocation. For satisfying the demands, this patch extends the managed buffer allocation API slightly. Namely, when 0 is passed to max argument of the allocation helper functions snd_pcm_set_managed_buffer*(), it treats as if the fixed size allocation of the given size. If the pre-allocation fails in this mode, the function returns now -ENOMEM. Otherwise, i.e. max argument is non-zero, the function never returns -ENOMEM but tries to fall back to the smaller chunks and allows the dynamic allocation later -- which is still the default behavior until now. For more intuitive use, also two new helpers are added for handling the fixed size buffer allocation, too: snd_pcm_set_fixed_buffer() and snd_pcm_set_fixed_buffer_all(). Acked-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210802072815.13551-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions