From: Chen-Yu Tsai <wenst@chromium.org>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Chen-Yu Tsai <wenst@chromium.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Jiaxin Yu <jiaxin.yu@mediatek.com>,
linux-sound@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 00/13] ASoC: mediatek: use reserved memory or enable buffer pre-allocation
Date: Thu, 24 Apr 2025 18:24:54 +0800 [thread overview]
Message-ID: <20250424102509.1083185-1-wenst@chromium.org> (raw)
Hi everyone,
This is v2 of what was just a single patch "ASoC: mediatek: re-enable
buffer pre-allocation on some platforms". Link to v1:
https://lore.kernel.org/all/20250401085659.1222008-1-wenst@chromium.org/
Angelo requested that these platforms use reserved memory regions if
possible, and fall back to pre-allocated buffers only if that fails,
to align with other MediaTek SoCs / platforms that already use reserved
memory. The series covers MediaTek's MT8173, MT8183, MT8186, and MT8192
SoCs.
There are three parts to the series:
- Part one (patches 1 through 5) update the DT bindings to allow having
a memory region. The text binding for the MT8173 was converted to YAML
and also aligned with current usage by addition of a power domain.
Note that the MT8183 text binding was _not_ converted. It is
drastically different from what was landed in the device trees. Some
time is needed to work out the differences. I might try to recombine
the audio clocks (which are actually part of the same hardware block)
as well.
- Part two (patches 6 through 9) update the audio frontend drivers for
the various platforms covered in this series.
- Patch 6 is the evolution of version 1, now defaulting to reserved
memory if possible.
- Patch 7 adds support for >32 bit DMA addresses to the MT8183 driver.
This was missing, and prevents the memory regions, which are
allocated from the top end of main memory by default, from working.
- Patch 8 and 9 are just some minor cleanups to reduce the number of
"&pdev->dev" style dereferences. They are placed after the other
changes to make it easier for the fixes to be backported.
- Part three (patches 10 through 13) add a reserved memory region for
the audio frontend on the various platforms.
For the MT8173, the change covers the whole platform. In practice
there are only ChromeOS devices.
For the other platforms, only the ChromeOS devices are covered. These
are what I have available for testing.
Please have a look. I assume the DT binding and driver changes will go
through the ASoC tree, while the device tree changes will go through the
MediaTek tree.
Thanks
ChenYu
Chen-Yu Tsai (13):
ASoC: dt-bindings: Convert MT8173 AFE binding to dt-schema
ASoC: dt-bindings: mt8173-afe-pcm: Add power domain
ASoC: dt-bindings: mt8173-afe-pcm: Allow specifying reserved memory
region
ASoC: dt-bindings: mt8186-afe-pcm: Allow specifying reserved memory
region
ASoC: dt-bindings: mt8192-afe-pcm: Allow specifying reserved memory
region
ASoC: mediatek: use reserved memory or enable buffer pre-allocation
ASoC: mediatek: mt8183-afe-pcm: Support >32 bit DMA addresses
ASoC: mediatek: mt8173-afe-pcm: use local `dev` pointer in driver
callbacks
ASoC: mediatek: mt8183-afe-pcm: use local `dev` pointer in driver
callbacks
arm64: dts: mediatek: mt8173: Reserve memory for audio frontend
arm64: dts: mediatek: mt8183-kukui: Reserve memory for audio frontend
arm64: dts: mediatek: mt8186-corsola: Reserve memory for audio
frontend
arm64: dts: mediatek: mt8192-asurada: Reserve memory for audio
frontend
.../sound/mediatek,mt8173-afe-pcm.yaml | 98 +++++++++++++++++++
.../bindings/sound/mt8186-afe-pcm.yaml | 5 +
.../bindings/sound/mt8192-afe-pcm.yaml | 5 +
.../devicetree/bindings/sound/mtk-afe-pcm.txt | 45 ---------
arch/arm64/boot/dts/mediatek/mt8173.dtsi | 9 ++
.../arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 11 +++
.../boot/dts/mediatek/mt8186-corsola.dtsi | 8 ++
.../boot/dts/mediatek/mt8192-asurada.dtsi | 11 +++
.../mediatek/common/mtk-afe-platform-driver.c | 4 +-
sound/soc/mediatek/common/mtk-base-afe.h | 1 +
sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 66 +++++++------
sound/soc/mediatek/mt8183/mt8183-afe-pcm.c | 83 ++++++++++++----
sound/soc/mediatek/mt8186/mt8186-afe-pcm.c | 7 ++
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 7 ++
14 files changed, 266 insertions(+), 94 deletions(-)
create mode 100644 Documentation/devicetree/bindings/sound/mediatek,mt8173-afe-pcm.yaml
delete mode 100644 Documentation/devicetree/bindings/sound/mtk-afe-pcm.txt
--
2.49.0.805.g082f7c87e0-goog
next reply other threads:[~2025-04-24 11:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-24 10:24 Chen-Yu Tsai [this message]
2025-04-24 10:24 ` [PATCH v2 01/13] ASoC: dt-bindings: Convert MT8173 AFE binding to dt-schema Chen-Yu Tsai
2025-04-28 7:24 ` Krzysztof Kozlowski
2025-04-24 10:24 ` [PATCH v2 02/13] ASoC: dt-bindings: mt8173-afe-pcm: Add power domain Chen-Yu Tsai
2025-05-09 18:08 ` Rob Herring (Arm)
2025-04-24 10:24 ` [PATCH v2 03/13] ASoC: dt-bindings: mt8173-afe-pcm: Allow specifying reserved memory region Chen-Yu Tsai
2025-05-09 18:08 ` Rob Herring (Arm)
2025-04-24 10:24 ` [PATCH v2 04/13] ASoC: dt-bindings: mt8186-afe-pcm: " Chen-Yu Tsai
2025-05-09 18:08 ` Rob Herring (Arm)
2025-04-24 10:24 ` [PATCH v2 05/13] ASoC: dt-bindings: mt8192-afe-pcm: " Chen-Yu Tsai
2025-05-09 18:09 ` Rob Herring (Arm)
2025-04-24 10:25 ` [PATCH v2 06/13] ASoC: mediatek: use reserved memory or enable buffer pre-allocation Chen-Yu Tsai
2025-04-24 10:25 ` [PATCH v2 07/13] ASoC: mediatek: mt8183-afe-pcm: Support >32 bit DMA addresses Chen-Yu Tsai
2025-06-11 16:21 ` Mark Brown
2025-04-24 10:25 ` [PATCH v2 08/13] ASoC: mediatek: mt8173-afe-pcm: use local `dev` pointer in driver callbacks Chen-Yu Tsai
2025-04-24 10:25 ` [PATCH v2 09/13] ASoC: mediatek: mt8183-afe-pcm: " Chen-Yu Tsai
2025-06-11 16:22 ` Mark Brown
2025-04-24 10:25 ` [PATCH v2 10/13] arm64: dts: mediatek: mt8173: Reserve memory for audio frontend Chen-Yu Tsai
2025-04-24 10:25 ` [PATCH v2 11/13] arm64: dts: mediatek: mt8183-kukui: " Chen-Yu Tsai
2025-04-24 10:25 ` [PATCH v2 12/13] arm64: dts: mediatek: mt8186-corsola: " Chen-Yu Tsai
2025-04-24 10:25 ` [PATCH v2 13/13] arm64: dts: mediatek: mt8192-asurada: " Chen-Yu Tsai
2025-05-14 8:54 ` [PATCH v2 00/13] ASoC: mediatek: use reserved memory or enable buffer pre-allocation Mark Brown
2025-06-11 10:22 ` AngeloGioacchino Del Regno
2025-06-11 10:31 ` AngeloGioacchino Del Regno
2025-06-14 11:12 ` (subset) " Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250424102509.1083185-1-wenst@chromium.org \
--to=wenst@chromium.org \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jiaxin.yu@mediatek.com \
--cc=krzk+dt@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox