]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ASoC: fix pcm-creation regression
authorJohan Hovold <johan@kernel.org>
Wed, 12 Jul 2017 15:55:29 +0000 (17:55 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 17 Jul 2017 14:50:32 +0000 (15:50 +0100)
commitc641e5b207ed7dfaa692820aeb5b6dde3de3e9b0
tree32db6d91738de6ae0b00b6816068eb0ad109faae
parent5771a8c08880cdca3bfb4a3fc6d309d6bba20877
ASoC: fix pcm-creation regression

This reverts commit 99b04f4c4051 ("ASoC: add Component level
pcm_new/pcm_free"), which started calling the pcm_new callback for every
component in a *card* when creating a new pcm, something which does not
seem to make any sense.

This specifically led to memory leaks in systems with more than one
platform component and where DMA memory is allocated in the
platform-driver callback. For example, when both mcasp devices are being
used on an am335x board, DMA memory would be allocated twice for every
DAI link during probe.

When CONFIG_SND_VERBOSE_PROCFS was set this fortunately also led to
warnings such as:

WARNING: CPU: 0 PID: 565 at ../fs/proc/generic.c:346 proc_register+0x110/0x154
proc_dir_entry 'sub0/prealloc' already registered

Since there seems to be no users of the new component callbacks, and the
current implementation introduced a regression, let's revert the
offending commit for now.

Fixes: 99b04f4c4051 ("ASoC: add Component level pcm_new/pcm_free")
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable <stable@vger.kernel.org> # 4.10
include/sound/soc.h
sound/soc/soc-core.c
sound/soc/soc-pcm.c