linux-loongson/sound/soc/mediatek/mt8186
Chen-Yu Tsai ec4a10ca4a
ASoC: mediatek: use reserved memory or enable buffer pre-allocation
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>
2025-06-12 13:45:35 +01:00
..
Makefile ASoC: mediatek: Use *-y instead of *-objs in Makefile 2024-05-08 11:39:23 +09:00
mt8186-afe-clk.c ASoC: mediatek: mt8186: Remove unused mt8186_afe_(suspend|resume)_clock 2025-02-06 16:27:57 +00:00
mt8186-afe-clk.h ASoC: mediatek: mt8186: Remove unused mt8186_afe_(suspend|resume)_clock 2025-02-06 16:27:57 +00:00
mt8186-afe-common.h ASoC: mediatek: mt8186: Allow setting shared clocks from machine driver 2022-09-09 18:49:00 +01:00
mt8186-afe-control.c ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
mt8186-afe-gpio.c ASoC: mt8186-mt6366-rt1019-rt5682s: Drop unused include 2023-10-09 14:27:49 +01:00
mt8186-afe-gpio.h ASoC: mediatek: mt8186: support gpio control in platform driver 2022-06-06 16:00:51 +01:00
mt8186-afe-pcm.c ASoC: mediatek: use reserved memory or enable buffer pre-allocation 2025-06-12 13:45:35 +01:00
mt8186-audsys-clk.c ASoC: mediatek: mt8186: Fix use-after-free in driver remove path 2023-05-15 10:21:13 +09:00
mt8186-audsys-clk.h ASoC: mediatek: mt8186: Fix use-after-free in driver remove path 2023-05-15 10:21:13 +09:00
mt8186-audsys-clkid.h
mt8186-dai-adda.c ASoC: mediatek: Commonize ADDA rate transform functions and enums 2024-03-25 14:19:07 +00:00
mt8186-dai-hostless.c ASoC: mediatek: mt8186: support hostless in platform driver 2022-06-06 16:00:44 +01:00
mt8186-dai-hw-gain.c ASoC: mediatek: mt8186: Handle component name prefix 2023-10-26 12:15:50 +01:00
mt8186-dai-i2s.c ASoC: mediatek: mt8186: Handle component name prefix 2023-10-26 12:15:50 +01:00
mt8186-dai-pcm.c ASoC: mediatek: use helper function 2023-01-31 11:05:02 +00:00
mt8186-dai-src.c ASoC: mediatek: mt8186: Handle component name prefix 2023-10-26 12:15:50 +01:00
mt8186-dai-tdm.c ASoC: mediatek: mt8186: remove redundant assignments to variable tdm_con 2023-10-24 18:03:10 +01:00
mt8186-interconnection.h ASoC: mediatek: mt8186: add misc driver and register definitions 2022-06-06 16:00:52 +01:00
mt8186-misc-control.c ASoC: mediatek: mt8186: add misc driver and register definitions 2022-06-06 16:00:52 +01:00
mt8186-mt6366-common.c ASoC: mediatek: convert not to use asoc_xxx() 2023-09-26 17:18:38 +02:00
mt8186-mt6366-common.h ASoC: mediatek: mt8186: add mt8186-mt6366 common driver 2022-07-20 17:42:25 +01:00
mt8186-mt6366.c ASoC: mediatek: mt8186-mt6366: use inclusive language for SND_SOC_DAIFMT_CBx_CFx 2025-03-03 12:59:28 +00:00
mt8186-reg.h ASoC: mediatek: mt8186: add misc driver and register definitions 2022-06-06 16:00:52 +01:00