linux-yocto/sound/soc/mediatek
Chen-Yu Tsai 3b13b5a4f2 ASoC: mediatek: use reserved memory or enable buffer pre-allocation
[ Upstream commit ec4a10ca4a ]

In commit 32c9c06adb ("ASoC: mediatek: disable buffer pre-allocation")
buffer pre-allocation was disabled to accommodate newer platforms that
have a limited reserved memory region for the audio frontend.

Turns out disabling pre-allocation across the board impacts platforms
that don't have this reserved memory region. Buffer allocation failures
have been observed on MT8173 and MT8183 based Chromebooks under low
memory conditions, which results in no audio playback for the user.

Since some MediaTek platforms already have dedicated reserved memory
pools for the audio frontend, the plan is to enable this for all of
them. This requires device tree changes. As a fallback, reinstate the
original policy of pre-allocating audio buffers at probe time of the
reserved memory pool cannot be found or used.

This patch covers the MT8173, MT8183, MT8186 and MT8192 platforms for
now, the reason being that existing MediaTek platform drivers that
supported reserved memory were all platforms that mainly supported
ChromeOS, and is also the set of devices that I can verify.

Fixes: 32c9c06adb ("ASoC: mediatek: disable buffer pre-allocation")
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Link: https://patch.msgid.link/20250612074901.4023253-7-wenst@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 12:13:33 +02:00
..
common ASoC: mediatek: use reserved memory or enable buffer pre-allocation 2025-08-15 12:13:33 +02:00
mt2701 ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
mt6797 ASoC: Switch back to struct platform_driver::remove() 2024-09-09 18:26:49 +01:00
mt7986 ASoC: mediatek: mt7986-afe-pcm: Remove redundant error message 2024-09-12 18:05:27 +01:00
mt8173 ASoC: mediatek: use reserved memory or enable buffer pre-allocation 2025-08-15 12:13:33 +02:00
mt8183 ASoC: mediatek: use reserved memory or enable buffer pre-allocation 2025-08-15 12:13:33 +02:00
mt8186 ASoC: mediatek: use reserved memory or enable buffer pre-allocation 2025-08-15 12:13:33 +02:00
mt8188 ASoC: mediatek: mt8188: Add reference for dmic clocks 2025-05-29 11:02:38 +02:00
mt8192 ASoC: mediatek: use reserved memory or enable buffer pre-allocation 2025-08-15 12:13:33 +02:00
mt8195 ASoC: mediatek: mt8195: Set ETDM1/2 IN/OUT to COMP_DUMMY() 2025-06-19 15:31:31 +02:00
mt8365 ASoC: mediatek: mt8365-dai-i2s: pass correct size to mt8365_dai_set_priv 2025-08-01 09:48:41 +01:00
Kconfig ASoC: mt8365: Allow build coverage 2024-09-09 16:58:18 +01:00
Makefile ASoC: mediatek: Add MT8365 support 2024-09-05 12:31:04 +01:00