]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: pcm: skip DMA buffer pre-allocation
authorKeyon Jie <yang.jie@linux.intel.com>
Fri, 28 Feb 2020 23:18:47 +0000 (17:18 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 2 Mar 2020 14:13:47 +0000 (14:13 +0000)
commit48238ed9df8b38fafb34f342cc5542e8aaad8a8c
treeb739ada2cb92fd9beacfcd792e8b90c21712407f
parent08246f70529bd84d58be734dc2df585d5be22212
ASoC: SOF: pcm: skip DMA buffer pre-allocation

As discussion in ALSA https://patchwork.kernel.org/patch/11336023/, it
is suggested to skip DMA buffer pre-allocation with passing size=0 when
calling snd_pcm_set_managed_buffer(), to make the full buffer_bytes
range configured in topology file selectable from user space, here do
the corresponding change in SOF PCM driver to implement it.

This change doesn't have dependency to the change that Takashi will do
in the ALSA core by adding total_pcm_alloc_bytes limitation to the
struct snd_card, it passes tests both with or without Takashi's coming
change on SOF CML platform.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
Link: https://lore.kernel.org/r/20200228231850.9226-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/pcm.c