Add ExynosAuto ABOX generic platform and PCM support
Subsystems (5)
A message that is not in the archive (sent off-list or not yet received): CGME20250721024611epcas2p43099e043aaa6f48c05eb0237065d31c7@epcas2p4.samsung.com
This patch series adds the ABOX Generic audio management driver for Samsung ExynosAuto SoCs, along with IPC messaging and PCM frontend drivers, including their corresponding device tree bindings.
### ABOX Architecture Design: Fixed and Variable Structure
The ABOX audio framework is designed with a clear split between:
- **Fixed part** (common framework): reusable components across SoCs
- Generic ABOX platform driver
- IPC messaging handler
- PCM frontend with ALSA compressed audio support
- Solution manager for dynamic control
- **Variable part** (SoC-specific): defined via device tree
- IRQ numbers, stream IDs, buffer sizes, and ADSP allocation
- Defined per PCM/IPC device node in DTS
This separation allows the fixed part to be upstreamed and maintained as a reusable framework, while only the DTS and minimal changes are needed to adapt to each SoC generation.
### Major Components in This Series
- abox_generic: Root platform driver coordinating subcomponents
- abox_ipc_generic: Handles ADSP messaging via IRQ-based IPC
- abox_pcm_dev: PCM frontend with support for solution chain selection
- abox_solution_mgr: Manages software-based audio chains via dynamic kcontrols
### Testing
Tested on ExynosAuto v920 board:
- Verified ALSA compressed audio playback via DSP
- Confirmed solution switching via kcontrol
- Verified DT node parsing and IRQ routing from device tree
PATCH 1/9 ASoC: samsung: Add generic ABOX management driver
This driver implements the *generic* (fixed) part of the ABOX management stack for Samsung Automotive SoCs. It does not directly control hardware but provides common interfaces and state needed by SoC-specific (variable) drivers.
The abox generic driver manages child drivers and provides an interface that bridges the fixed and variable parts, connecting the two modules.
Design Note:
- The abox generic driver has child drivers, but they are built into a single kernel module.
- The generic driver and the SoC-specific (variable) driver do not have a parent-child device relationship.
- Instead, they are independent, peer modules.
- To bridge the gap, the generic driver exposes shared state via a global pointer and EXPORT_SYMBOL accessor.
- This allows multiple SoC-specific modules to attach to common generic functionality without tight coupling.
- Only one instance of the generic driver is supported.
Future work will focus on integrating this driver tightly with ALSA SoC components and improving user-space interfaces.
Code style and interface improvements will be made in subsequent patches based on upstream review feedback.
Tested on Exynos Auto platform for basic initialization and state sharing.
Note:
The ABOX (Audio Box) is an audio DSP hardware block integrated into Exynos Automotive SoCs. It includes components such as DMA controllers, I2S interfaces, GIC (interrupt controller), and the ADSP (audio DSP core).
--- sound/soc/samsung/Kconfig | 2 + sound/soc/samsung/Makefile | 1 + sound/soc/samsung/auto_abox/Kconfig | 22 + sound/soc/samsung/auto_abox/generic/Kbuild | 12 + .../samsung/auto_abox/generic/abox_generic.c | 384 ++++++++++++++++++ .../auto_abox/generic/include/abox_generic.h | 84 ++++ 6 files changed, 505 insertions(+) create mode 100644 sound/soc/samsung/auto_abox/Kconfig create mode 100644 sound/soc/samsung/auto_abox/generic/Kbuild create mode 100644 sound/soc/samsung/auto_abox/generic/abox_generic.c create mode 100644 sound/soc/samsung/auto_abox/generic/include/abox_generic.h
sound/soc/samsung/Kconfig +2 -0
@@ -148,4 +148,6 @@ config SND_SOC_SAMSUNG_MIDAS_WM1811 help Say Y if you want to add support for SoC audio on the Midas boards. +source "sound/soc/samsung/auto_abox/Kconfig" + endif #SND_SOC_SAMSUNG
sound/soc/samsung/Makefile +1 -0
@@ -42,3 +42,4 @@ obj-$(CONFIG_SND_SOC_ARNDALE) += snd-soc-arndale.o obj-$(CONFIG_SND_SOC_SAMSUNG_TM2_WM5110) += snd-soc-tm2-wm5110.o obj-$(CONFIG_SND_SOC_SAMSUNG_ARIES_WM8994) += snd-soc-aries-wm8994.o obj-$(CONFIG_SND_SOC_SAMSUNG_MIDAS_WM1811) += snd-soc-midas-wm1811.o +obj-$(CONFIG_SND_SOC_SAMSUNG_AUTO_ABOX) += auto_abox/generic/
sound/soc/samsung/auto_abox/Kconfig new file +22 -0
@@ -0,0 +1,22 @@ +#: SPDX-License-Identifier: GPL-2.0-only + +menu "Exynosauto Automotive Abox Modules Options" + +config SND_SOC_SAMSUNG_AUTO_ABOX + tristate "ASoC support for Samsung Exynosauto Automotive ABOX Audio" + select SND_SOC_COMPRESS + help + This driver provides a generic management layer for the ABOX + audio block on Samsung SoCs. + + The design splits the ABOX support into: + - Fixed generic driver + - SoC-specific hardware drivers + + These parts are independent modules without parent-child + binding. The generic driver therefore exposes a global + accessor via EXPORT_SYMBOL so that variable parts can share + state and callbacks safely. + +endmenu +
sound/soc/samsung/auto_abox/generic/Kbuild new file +12 -0
@@ -0,0 +1,12 @@ +# SPDX-License-Identifier: GPL-2.0 +# Exynosauto Automotive Abox Driver Support + +snd-soc-samsung-abox-generic-$(CONFIG_SND_SOC_SAMSUNG_AUTO_ABOX) := \ + abox_generic.o + +ccflags-y += -I./include + +obj-$(CONFIG_SND_SOC_SAMSUNG_AUTO_ABOX) += \ + snd-soc-samsung-abox-generic.o + +
sound/soc/samsung/auto_abox/generic/abox_generic.c new file +384 -0
384 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_generic.h new file +84 -0
84 lines not on this page · raw message
Signature · 1 line
2.25.1
Mark Brown
maintainerRe: [PATCH 1/9] ASoC: samsung: Add generic ABOX management driver
Quoted 7 lines · ew kim
This driver implements the *generic* (fixed) part of the ABOX management stack for Samsung Automotive SoCs. It does not directly control hardware but provides common interfaces and state needed by SoC-specific (variable) drivers.
The abox generic driver manages child drivers and provides an interface that bridges the fixed and variable parts, connecting the two modules.
I think for such an unusual design we need a much clearer description of what this is trying to do and why it's not following normal kernel patterns. I can't tell what the services this generic code is providing are, nor why it's done this way.
PATCH 2/9 arm64: dts: exynosautov920: add abox_generic dt node
In reply to ew kimAdd device tree node for the abox_generic platform driver to enable its registration as a platform device. This node does not represent direct hardware resources but is necessary for driver initialization and platform device binding.
Properties added in the device tree node:
- samsung,num-pcm-playback (uint32):
Maximum number of supported PCM playback devices. Here, PCM playback devices refer to ALSA PCM devices.
- samsung,num-pcm-capture (uint32):
Maximum number of supported PCM capture devices. Here, PCM capture devices refer to ALSA PCM devices.
- samsung,num-i2s-dummy-backend (uint32):
Maximum number of supported I2S dummy backend devices.
The node is declared disabled by default in the main device tree source, and enabled via board-specific DTS overlays by setting status = "okay".
This device tree binding document will be added under Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml
to describe the node properties and usage.
--- arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts | 4 ++++ arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 10 ++++++++++ 2 files changed, 14 insertions(+)
arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +4 -0
@@ -86,3 +86,7 @@ &usi_0 { &xtcxo { clock-frequency = <38400000>; }; + +&abox_generic { + status = "okay"; +};
arch/arm64/boot/dts/exynos/exynosautov920.dtsi +10 -0
@@ -1126,6 +1126,16 @@ timer { <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, <GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; }; + + abox_generic: abox_generic { + compatible = "samsung,abox_generic"; + samsung,num-pcm-playback = <32>; + samsung,num-pcm-capture = <32>; + samsung,num-i2s-dummy-backend = <5>; + status = "disabled"; + #address-cells = <2>; + #size-cells = <1>; + }; }; #include "exynosautov920-pinctrl.dtsi"
Signature · 1 line
2.25.1
Re: [PATCH 2/9] arm64: dts: exynosautov920: add abox_generic dt node
Quoted 24 lines · ew kim
Add device tree node for the
abox_genericplatform driver to enable its registration as a platform device. This node does not represent direct hardware resources but is necessary for driver initialization and platform device binding.Properties added in the device tree node:
- samsung,num-pcm-playback (uint32):
Maximum number of supported PCM playback devices. Here, PCM playback devices refer to ALSA PCM devices.- samsung,num-pcm-capture (uint32):
Maximum number of supported PCM capture devices. Here, PCM capture devices refer to ALSA PCM devices.- samsung,num-i2s-dummy-backend (uint32):
Maximum number of supported I2S dummy backend devices.The node is declared disabled by default in the main device tree source, and enabled via board-specific DTS overlays by setting status = "okay".
This device tree binding document will be added under
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml
Quoted 6 lines
to describe the node properties and usage.
Signed-off-by ew kim <[email protected]>--- arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts | 4 ++++ arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 10 ++++++++++
Entirely wrong order of patches.
Quoted 7 lines
2 files changed, 14 insertions(+)arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +0
-0
arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts &usi_0 { · line 92
Quoted 8 lines
arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +4
-0@@ -86,3 +86,7 @@ &usi_0 { &xtcxo { clock-frequency = <38400000>; }; + +&abox_generic { + status = "okay"; +};
?
arch/arm64/boot/dts/exynos/exynosautov920.dtsi timer { · line 1130
Quoted 10 lines
arch/arm64/boot/dts/exynos/exynosautov920.dtsi +2
-0@@ -1126,6 +1126,16 @@ timer { <GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>, <GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>; }; + + abox_generic: abox_generic {
And you did not resolve any of previous comments, just sent the same v1.
NAK.
Implement and respond to feedback. Then version properly your patches.
Best regards,
Krzysztof
PATCH 3/9 ASoC: dt-bindings: sound: Add Samsung ExynosAuto ABOX binding
In reply to ew kimAdd the device tree binding documentation for the Samsung Exynos Automotive ABOX generic audio management core. This binding describes how to configure the maximum number of PCM playback, PCM capture, and dummy I2S backend instances for the ABOX core. Actual hardware functionality is provided by child audio sub-drivers.
--- .../bindings/sound/samsung,exynosauto.yaml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +69 -0
@@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung,exynosauto.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung Exynos Automotive Abox Generic + +maintainers: + - Eunwoo Kim <[email protected]> + +description: | + The Samsung Exynos Automotive Abox Generic node represents a + generic audio management platform device inside Exynos Automotive SoCs. + It does not directly control hardware resources itself, but acts as + a common interface to manage child audio sub-drivers for PCM playback, + PCM capture, and I2S dummy backends. + + Typically, this node provides configuration for the maximum number of + PCM playback and capture devices (ALSA PCM) and the maximum number + of dummy I2S backend devices. The actual hardware control is handled + by child drivers attached to this generic core. + + This node must exist for the platform driver to probe, + even though it does not map any physical hardware address. + +properties: + compatible: + const: samsung,abox_generic + + samsung,num-pcm-playback: + description: Maximum number of PCM playback instances (ALSA PCM devices). + $ref: /schemas/types.yaml#/definitions/uint32 + + samsung,num-pcm-capture: + description: Maximum number of PCM capture instances (ALSA PCM devices). + $ref: /schemas/types.yaml#/definitions/uint32 + + samsung,num-i2s-dummy-backend: + description: Maximum number of dummy I2S backend instances. + $ref: /schemas/types.yaml#/definitions/uint32 + + '#address-cells': + description: Required for child nodes that may declare address space. + const: 2 + + '#size-cells': + description: Required for child nodes that may declare address space. + const: 1 + +required: + - compatible + - samsung,num-pcm-playback + - samsung,num-pcm-capture + - samsung,num-i2s-dummy-backend + +additionalProperties: false + +examples: + - | + abox_generic { + compatible = "samsung,abox_generic"; + samsung,num-pcm-playback = <32>; + samsung,num-pcm-capture = <32>; + samsung,num-i2s-dummy-backend = <5>; + status = "disabled"; + #address-cells = <2>; + #size-cells = <1>; + };
Signature · 1 line
2.25.1
Krzysztof Kozlowski
maintainerRe: [PATCH 3/9] ASoC: dt-bindings: sound: Add Samsung ExynosAuto ABOX binding
Quoted 22 lines · ew kim
Add the device tree binding documentation for the Samsung Exynos Automotive ABOX generic audio management core. This binding describes how to configure the maximum number of PCM playback, PCM capture, and dummy I2S backend instances for the ABOX core. Actual hardware functionality is provided by child audio sub-drivers.
Signed-off-by ew kim <[email protected]>--- .../bindings/sound/samsung,exynosauto.yaml | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/samsung,exynosauto.yamlDocumentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +4
-0@@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/samsung,exynosauto.yaml#
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 14
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +10
-0+$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Samsung Exynos Automotive Abox Generic + +maintainers: + - Eunwoo Kim <[email protected]> + +description: | + The Samsung Exynos Automotive Abox Generic node represents a + generic audio management platform device inside Exynos Automotive SoCs.
No, we do not add bindings for "generic" stuff.
Describe the SoC.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 15
Quoted 1 line
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +1
-0+ It does not directly control hardware resources itself, but acts as
Does not control hardware? so not suitable for bindings and DTS.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 17
Quoted 2 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +2
-0+ a common interface to manage child audio sub-drivers for PCM playback, + PCM capture, and I2S dummy backends.
Not relevant.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 22
Quoted 5 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +5
-0+ + Typically, this node provides configuration for the maximum number of + PCM playback and capture devices (ALSA PCM) and the maximum number + of dummy I2S backend devices. The actual hardware control is handled + by child drivers attached to this generic core.
Not relevant. Describe the hardware.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 25
Quoted 3 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +3
-0+ + This node must exist for the platform driver to probe, + even though it does not map any physical hardware address.
Drivers are not relevant, read writing bindings.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 29
Quoted 4 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +4
-0+ +properties: + compatible: + const: samsung,abox_generic
You did not implement previous feedback. This does not follow DTS coding style and writing bindings.
I already asked you to read DTS coding style and nothing improved, no issues were resolved.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 41
Quoted 12 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +12
-0+ + samsung,num-pcm-playback: + description: Maximum number of PCM playback instances (ALSA PCM devices). + $ref: /schemas/types.yaml#/definitions/uint32 + + samsung,num-pcm-capture: + description: Maximum number of PCM capture instances (ALSA PCM devices). + $ref: /schemas/types.yaml#/definitions/uint32 + + samsung,num-i2s-dummy-backend: + description: Maximum number of dummy I2S backend instances. + $ref: /schemas/types.yaml#/definitions/uint32
Nothing above describes hardware. Bindings are not for ALSA.
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +10
-0+ + '#address-cells': + description: Required for child nodes that may declare address space. + const: 2 + + '#size-cells': + description: Required for child nodes that may declare address space. + const: 1 + +required:
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 61
Quoted 10 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +10
-0+ - compatible + - samsung,num-pcm-playback + - samsung,num-pcm-capture + - samsung,num-i2s-dummy-backend + +additionalProperties: false + +examples: + - | + abox_generic {
Did you read DTS coding style?
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 66
Quoted 5 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +5
-0+ compatible = "samsung,abox_generic"; + samsung,num-pcm-playback = <32>; + samsung,num-pcm-capture = <32>; + samsung,num-i2s-dummy-backend = <5>; + status = "disabled";
No.
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml line 69
Quoted 3 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml new file +3
-0+ #address-cells = <2>; + #size-cells = <1>; + };
Best regards,
Krzysztof
PATCH 4/9 ASoC: samsung: abox: Add IPC generic support for message forwarding
In reply to ew kimThis adds the IPC generic driver as a child module of abox_generic to handle bidirectional IPC message and IRQ routing between the generic fixed layer and the SoC-specific audio side.
The driver:
- Registers a shared IRQ handler to allow SoC (variable part) to notify the generic layer of IPC messages.
- Exports a registration interface to allow the generic layer to send IPC messages to the SoC side.
- Uses a global singleton (non-DT) to coordinate state and callback registration between the layers, due to lack of direct parent-child linkage.
The driver is not a standalone module, and is built as part of the snd-soc-samsung-abox-generic.ko module.
--- sound/soc/samsung/auto_abox/Kconfig | 19 +- sound/soc/samsung/auto_abox/generic/Kbuild | 3 +- .../samsung/auto_abox/generic/abox_generic.c | 13 +- .../auto_abox/generic/abox_ipc_generic.c | 218 ++++++++++++++++++ .../auto_abox/generic/include/abox_generic.h | 2 +- .../generic/include/abox_ipc_generic.h | 181 +++++++++++++++ 6 files changed, 421 insertions(+), 15 deletions(-) create mode 100644 sound/soc/samsung/auto_abox/generic/abox_ipc_generic.c create mode 100644 sound/soc/samsung/auto_abox/generic/include/abox_ipc_generic.h
sound/soc/samsung/auto_abox/Kconfig +13 -6
@@ -10,13 +10,20 @@ config SND_SOC_SAMSUNG_AUTO_ABOX audio block on Samsung SoCs. The design splits the ABOX support into: - - Fixed generic driver - - SoC-specific hardware drivers + - A fixed generic control layer (ABOX Generic) + - SoC-specific hardware drivers (e.g., IPC, PCM, Backend) - These parts are independent modules without parent-child - binding. The generic driver therefore exposes a global - accessor via EXPORT_SYMBOL so that variable parts can share - state and callbacks safely. + These components are tightly coupled and share internal data + and callbacks. To ensure correct symbol resolution and + initialization ordering, all drivers are built together into + a single kernel object: snd-soc-samsung-abox-generic.ko + + The sub-drivers are registered internally from the generic + driver's probe using platform_register_drivers(), rather than + being standalone platform drivers with independent module init. + + This approach ensures integration consistency for fixed and + variable components across different automotive SoCs. endmenu
sound/soc/samsung/auto_abox/generic/Kbuild +2 -1
@@ -2,7 +2,8 @@ # Exynosauto Automotive Abox Driver Support snd-soc-samsung-abox-generic-$(CONFIG_SND_SOC_SAMSUNG_AUTO_ABOX) := \ - abox_generic.o + abox_generic.o \ + abox_ipc_generic.o ccflags-y += -I./include
sound/soc/samsung/auto_abox/generic/abox_generic.c +6 -7
@@ -13,7 +13,9 @@#include <sound/soc-dapm.h> #include "include/abox_generic.h" +#include "include/abox_ipc_generic.h" +extern struct platform_driver samsung_abox_ipc_generic_driver;/** * abox_generic_data_global - Shared state for ABOX generic driver. *
@@ -264,9 +266,6 @@ int abox_generic_request_soc_ioctl(struct device *generic_dev, enum abox_soc_iocreturn generic_data->soc_ioctl (soc_dev, cmd, data); } -static struct platform_driver *abox_generic_sub_drivers[] = { -}; -static int abox_generic_read_property_from_dt (struct device *dev,struct abox_generic_data *data) {struct device_node *np = dev->of_node;
@@ -308,6 +307,10 @@ static int abox_generic_allocate_memory(struct device *dev, struct abox_generic_return 0 ; } +static struct platform_driver *abox_generic_sub_drivers[] = { + &samsung_abox_ipc_generic_driver, +}; +static int samsung_abox_generic_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -344,14 +347,10 @@ static int samsung_abox_generic_probe(struct platform_device *pdev)static void samsung_abox_generic_remove (struct platform_device *pdev) { -struct abox_generic_data *data =platform_get_drvdata (pdev); -platform_unregister_drivers (abox_generic_sub_drivers,ARRAY_SIZE (abox_generic_sub_drivers)); g_abox_generic_data =NULL ; - -return 0 ; }static void samsung_abox_generic_shutdown (struct platform_device *pdev)
sound/soc/samsung/auto_abox/generic/abox_ipc_generic.c new file +218 -0
218 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_generic.h +1 -1
@@ -30,7 +30,7 @@ enum abox_soc_ioctl_cmd { };/** -* SOC_IOCTL - SoC-specific callback prototype +* soc_ioctl_fn - SoC-specific callback prototype * @soc_dev: SoC device pointer * @cmd: Command to handle (enum abox_soc_ioctl_cmd) * @data: Additional argument, type depends on command
sound/soc/samsung/auto_abox/generic/include/abox_ipc_generic.h new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
2.25.1
Mark Brown
maintainerRe: [PATCH 4/9] ASoC: samsung: abox: Add IPC generic support for message forwarding
Quoted 1 line · ew kim
+EXPORT_SYMBOL(abox_ipc_generic_get_pcm_dev_handler_callback);
ASoC is all EXPORT_SYMBOL_GPL() so if you're providing access to ASoC things you should also use that.
PATCH 5/9 arm64: dts: exynosautov920: Add ABOX IPC Generic device node
In reply to ew kimThis patch adds a new child node abox_ipc_generic under the abox_generic node for ExynosAuto v920. The ABOX IPC Generic driver handles inter-processor communication (IPC) between the ABOX DSP and host SoC using IRQs.
The node includes configuration for the number of IRQ channels used for IPC routing. This allows SoC-specific subsystems to send and receive messages through the ABOX generic audio stack.
--- arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts | 6 +++++- arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +5 -1
@@ -89,4 +89,8 @@ &xtcxo { &abox_generic { status = "okay"; -}; +}; + +&abox_ipc_generic { + status = "okay"; +};
arch/arm64/boot/dts/exynos/exynosautov920.dtsi +8 -2
@@ -1133,8 +1133,14 @@ abox_generic: abox_generic { samsung,num-pcm-capture = <32>; samsung,num-i2s-dummy-backend = <5>; status = "disabled"; - #address-cells = <2>; - #size-cells = <1>; + /* #address-cells = <2>; */ + /* #size-cells = <1>; */ + + abox_ipc_generic: abox_ipc_generic { + compatible = "samsung,abox_ipc_generic"; + samsung,num-irq = <64>; + status = "disabled"; + }; }; };
Signature · 1 line
2.25.1
Krzysztof Kozlowski
maintainerRe: [PATCH 5/9] arm64: dts: exynosautov920: Add ABOX IPC Generic device node
Quoted 1 line · ew kim
This patch adds a new child node
abox_ipc_genericunder the
Please read kernel submitting patches and DT bindings submitting patches.
Quoted 34 lines
abox_genericnode for ExynosAuto v920. The ABOX IPC Generic driver handles inter-processor communication (IPC) between the ABOX DSP and host SoC using IRQs.The node includes configuration for the number of IRQ channels used for IPC routing. This allows SoC-specific subsystems to send and receive messages through the ABOX generic audio stack.
Signed-off-by ew kim <[email protected]>--- arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts | 6 +++++- arch/arm64/boot/dts/exynos/exynosautov920.dtsi | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-)arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +5
-1@@ -89,4 +89,8 @@ &xtcxo { &abox_generic { status = "okay"; -}; +}; + +&abox_ipc_generic { + status = "okay"; +};arch/arm64/boot/dts/exynos/exynosautov920.dtsi +0
-0
arch/arm64/boot/dts/exynos/exynosautov920.dtsi abox_generic: abox_generic { · line 1140
Quoted 10 lines
arch/arm64/boot/dts/exynos/exynosautov920.dtsi +5
-2@@ -1133,8 +1133,14 @@ abox_generic: abox_generic { samsung,num-pcm-capture = <32>; samsung,num-i2s-dummy-backend = <5>; status = "disabled"; - #address-cells = <2>; - #size-cells = <1>; + /* #address-cells = <2>; */ + /* #size-cells = <1>; */ + + abox_ipc_generic: abox_ipc_generic { + compatible = "samsung,abox_ipc_generic";
No bindings. Are you sure you follow standard patchset order?
Best regards,
Krzysztof
PATCH 6/9 ASoC : dt-bindings: sound: Add binding for ABOX IPC Generic
In reply to ew kimThis patch updates the existing samsung,exynosauto.yaml schema to describe the ABOX IPC Generic child node. This node represents a virtual IPC interface used by the ABOX audio subsystem to communicate with SoC-specific hardware using shared IRQ channels.
The schema describes the samsung,num-irq property and allows integration of the IPC node under abox_generic.
--- .../bindings/sound/samsung,exynosauto.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+)
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +23 -0
@@ -48,6 +48,23 @@ properties: description: Required for child nodes that may declare address space. const: 1 + abox_ipc_generic: + type: object + description: ABOX IPC Generic subnode for SoC-level message routing + properties: + compatible: + const: samsung,abox_ipc_generic + + samsung,num-irq: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of IRQ channels supported for IPC routing. + + required: + - compatible + - samsung,num-irq + + additionalProperties: false + required: - compatible - samsung,num-pcm-playback
@@ -66,4 +83,10 @@ examples: status = "disabled"; #address-cells = <2>; #size-cells = <1>; + + abox_ipc_generic { + compatible = "samsung,abox_ipc_generic"; + samsung,num-irq = <64>; + status = "disabled"; + }; };
Signature · 1 line
2.25.1
Krzysztof Kozlowski
maintainerRe: [PATCH 6/9] ASoC : dt-bindings: sound: Add binding for ABOX IPC Generic
Quoted 18 lines · ew kim
This patch updates the existing samsung,exynosauto.yaml schema to describe the ABOX IPC Generic child node. This node represents a virtual IPC interface used by the ABOX audio subsystem to communicate with SoC-specific hardware using shared IRQ channels.
The schema describes the
samsung,num-irqproperty and allows integration of the IPC node underabox_generic.Signed-off-by ew kim <[email protected]>--- .../bindings/sound/samsung,exynosauto.yaml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+)Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +0
-0
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml properties: · line 56
Quoted 9 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +6
-0@@ -48,6 +48,23 @@ properties: description: Required for child nodes that may declare address space. const: 1 + abox_ipc_generic: + type: object + description: ABOX IPC Generic subnode for SoC-level message routing + properties: + compatible: + const: samsung,abox_ipc_generic
We cannot take generic IPC.
Quoted 15 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +11
-0+ + samsung,num-irq: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Number of IRQ channels supported for IPC routing. + + required: + - compatible + - samsung,num-irq + + additionalProperties: false + required: - compatible - samsung,num-pcm-playback
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml examples: · line 90
Quoted 8 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +5
-0@@ -66,4 +83,10 @@ examples: status = "disabled"; #address-cells = <2>; #size-cells = <1>; + + abox_ipc_generic { + compatible = "samsung,abox_ipc_generic"; + samsung,num-irq = <64>; + status = "disabled";
So you never test it...
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml examples: · line 92
Quoted 2 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +1
-0+ }; };
Best regards,
Krzysztof
PATCH 7/9 ASoC: samsung: Add PCM driver with solution support
In reply to ew kimAdd abox_pcm_dev as an ALSA SoC frontend driver for PCM playback and capture on the Exynos ABOX audio subsystem.
This driver registers per-PCM frontend devices and connects them to the SoC-specific DMA engines and I2S dummy backends. It also supports dynamic routing through DAPM and ALSA kcontrols, enabling flexible audio path configuration.
Key features:
- Implements compress ops (.open, .set_params, .trigger, etc.)
- Dynamically generates DAPM widgets, routes, and kcontrols
- Integrates post-processing (PP) path support via mux control
- Provides runtime attach interface for solution management
The solution manager (abox_solution_mgr) is introduced as an optional component that can be registered at runtime. When available, it enables per-chain software audio solution selection via enum-type ALSA kcontrols.
Additionally, a new utility module (abox_util_generic) is added to support reusable helpers for DMA management and device tree parsing.
--- sound/soc/samsung/auto_abox/generic/Kbuild | 5 +- .../samsung/auto_abox/generic/abox_generic.c | 223 +- .../auto_abox/generic/abox_ipc_generic.c | 23 + .../samsung/auto_abox/generic/abox_pcm_dev.c | 2366 +++++++++++++++++ .../auto_abox/generic/abox_solution_mgr.c | 456 ++++ .../auto_abox/generic/abox_util_generic.c | 48 + .../auto_abox/generic/include/abox_generic.h | 45 +- .../generic/include/abox_ipc_generic.h | 44 +- .../auto_abox/generic/include/abox_pcm.h | 135 + .../generic/include/abox_solution_mgr.h | 98 + .../generic/include/abox_util_generic.h | 110 + 11 files changed, 3504 insertions(+), 49 deletions(-) create mode 100644 sound/soc/samsung/auto_abox/generic/abox_pcm_dev.c create mode 100644 sound/soc/samsung/auto_abox/generic/abox_solution_mgr.c create mode 100644 sound/soc/samsung/auto_abox/generic/abox_util_generic.c create mode 100644 sound/soc/samsung/auto_abox/generic/include/abox_pcm.h create mode 100644 sound/soc/samsung/auto_abox/generic/include/abox_solution_mgr.h create mode 100644 sound/soc/samsung/auto_abox/generic/include/abox_util_generic.h
sound/soc/samsung/auto_abox/generic/Kbuild +4 -1
@@ -3,7 +3,10 @@ snd-soc-samsung-abox-generic-$(CONFIG_SND_SOC_SAMSUNG_AUTO_ABOX) := \ abox_generic.o \ - abox_ipc_generic.o + abox_ipc_generic.o \ + abox_util_generic.o \ + abox_solution_mgr.o \ + abox_pcm_dev.o ccflags-y += -I./include
sound/soc/samsung/auto_abox/generic/abox_generic.c +213 -10
292 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/abox_ipc_generic.c +23 -0
@@ -154,6 +154,29 @@ int abox_ipc_generic_request_xfer(enum INTER_IPC_ID ipc_id, struct _abox_inter_ireturn data->request_xfer (ipc_id, pmsg, sync, ipc_ret, adsp); } +int abox_ipc_generic_register_pcm_dev_handler (struct device *pcm_dev,unsigned int irq_id, +ipc_generic_irq_handler_t handler) +{ +struct abox_ipc_generic_data *data; + + data =abox_ipc_generic_get_data (); +if (!data) { +pr_err ("%s: There is no abox_ipc_generic_data\n" , __func__); +return -EINVAL ; + } +if (irq_id >= data->num_irq) { +dev_err (pcm_dev,"%s Invalid pcm irq id %d\n" , __func__, irq_id); +return -EINVAL ; + } + +dev_dbg (pcm_dev,"%s[%d] pcm_irq_id(%d) handler is registered\n" , + __func__, __LINE__, irq_id); + data->pcm_dev_irq_handler[irq_id].handler = handler; + data->pcm_dev_irq_handler[irq_id].dev = pcm_dev; + +return 0 ; +} +static int samsung_abox_ipc_generic_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
sound/soc/samsung/auto_abox/generic/abox_pcm_dev.c new file +2366 -0
2,366 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/abox_solution_mgr.c new file +456 -0
302 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/abox_util_generic.c new file +48 -0
48 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_generic.h +29 -16
45 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_ipc_generic.h +22 -22
44 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_pcm.h new file +135 -0
135 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_solution_mgr.h new file +98 -0
98 lines not on this page · raw message
sound/soc/samsung/auto_abox/generic/include/abox_util_generic.h new file +110 -0
110 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.25.1
Part of the diff is not shown here. View the raw message.
PATCH 8/9 arm64: dts: exynosautov920: add PCM playback/capture
In reply to ew kimThis patch adds the PCM playback and capture device nodes as children of the abox_generic audio controller for ExynosAuto v920.
Each PCM device is defined with a unique ID and an associated IRQ SW number used for communication with the ADSP. These nodes include information such as buffer size, ALSA DAI name prefix, and category type(e.g., deep_buffer).
The nodes are initially marked as "disabled" and can be enabled per board (e.g., in the SADK .dts) as needed.
--- .../boot/dts/exynos/exynosautov920-sadk.dts | 8 +++++ .../arm64/boot/dts/exynos/exynosautov920.dtsi | 32 +++++++++++++++++-- 2 files changed, 38 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/exynos/exynosautov920-sadk.dts +8 -0
@@ -94,3 +94,11 @@ &abox_generic { &abox_ipc_generic { status = "okay"; }; + +&abox_pcm_playback_0 { + status = "okay"; +}; + +&abox_pcm_capture_0 { + status = "okay"; +};
arch/arm64/boot/dts/exynos/exynosautov920.dtsi +30 -2
@@ -1133,14 +1133,42 @@ abox_generic: abox_generic { samsung,num-pcm-capture = <32>; samsung,num-i2s-dummy-backend = <5>; status = "disabled"; - /* #address-cells = <2>; */ - /* #size-cells = <1>; */ + #address-cells = <1>; + #size-cells = <1>; abox_ipc_generic: abox_ipc_generic { compatible = "samsung,abox_ipc_generic"; samsung,num-irq = <64>; status = "disabled"; }; + + abox_pcm_playback_0: abox_pcm_playback@3fd0000 { + compatible = "samsung,abox-pcm-playback"; + samsung,id = <0>; + samsung,irq_id = <0>; + samsung,allocate-adsp = <0>; + reg = <0x3fd0000 0x10>; + reg-names = "pp_pointer_offset"; + #sound-dai-cells = <0>; + sound-name-prefix = "ABOX"; + samsung,category = "deep_buffer"; + samsung,buffer_bytes_max = <0x24000>; + status = "disabled"; + }; + + abox_pcm_capture_0: abox_pcm_capture@3fd0400 { + compatible = "samsung,abox-pcm-capture"; + samsung,id = <0>; + samsung,irq_id = <32>; + samsung,allocate-adsp = <0>; + reg = <0x3fd0400 0x10>; + reg-names = "pp_pointer_offset"; + #sound-dai-cells = <0>; + sound-name-prefix = "ABOX"; + samsung,category = "deep_buffer"; + samsung,buffer_bytes_max = <0x24000>; + status = "disabled"; + }; }; };
--
2.25.1
PATCH 9/9 ASoC: dt-bindings: sound: exynosauto: add PCM frontend nodes for ABOX generic
In reply to ew kimThis patch extends the Exynos Automotive ABOX generic device tree bindings to support PCM playback and capture frontend nodes.
Each PCM device node describes an audio stream interface handled by the ABOX DSP. These nodes include properties for stream ID, IRQ, ADSP core assignment, buffer limits, and stream category (deep_buffer or compress).
The bindings use patternProperties to match playback and capture nodes as children of the abox_generic controller.
--- .../bindings/sound/samsung,exynosauto.yaml | 126 +++++++++++++++++- 1 file changed, 123 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +123 -3
@@ -28,6 +28,14 @@ properties: compatible: const: samsung,abox_generic + status: + enum: [ okay, disabled ] + description: DTS node enablement state + + $nodename: + pattern: "^abox_generic$" + description: Node name must be 'abox_generic' + samsung,num-pcm-playback: description: Maximum number of PCM playback instances (ALSA PCM devices). $ref: /schemas/types.yaml#/definitions/uint32
@@ -42,7 +50,7 @@ properties: '#address-cells': description: Required for child nodes that may declare address space. - const: 2 + const: 1 '#size-cells': description: Required for child nodes that may declare address space.
@@ -55,6 +63,10 @@ properties: compatible: const: samsung,abox_ipc_generic + status: + enum: [ okay, disabled ] + description: DTS node enablement state + samsung,num-irq: $ref: /schemas/types.yaml#/definitions/uint32 description: Number of IRQ channels supported for IPC routing.
@@ -65,13 +77,92 @@ properties: additionalProperties: false +patternProperties: + "^abox_pcm_(playback|capture)@[0-9a-f]+$": + type: object + description: | + ABOX PCM playback or capture frontend device node. These nodes define + individual PCM streams used by the audio subsystem, and are children of + the abox_generic controller. Each node describes a PCM stream ID, IRQ line, + ADSP core allocation, and stream-specific parameters. + + properties: + compatible: + enum: + - samsung,abox-pcm-playback + - samsung,abox-pcm-capture + description: Compatible string for PCM playback or capture device. + + reg: + maxItems: 1 + description: Offset for pointer register (pp_pointer_offset) used for communication with ADSP. + + reg-names: + const: pp_pointer_offset + + samsung,id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Unique ID per PCM Device, separated by stream type (playback or capture). + Must be less than samsung,num-of-pcm_playback or samsung,num-of-pcm_capture + defined in the abox_generic node. + + samsung,irq_id: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Software IRQ ID assigned in the control domain. Represents the software interrupt + line used by the ADSP to communicate with this PCM device. + + samsung,allocate-adsp: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Index of the ADSP core that this PCM device is allocated to. Indicates on which core + the stream is handled. + + sound-name-prefix: + $ref: /schemas/types.yaml#/definitions/string + description: | + Prefix name for ALSA DAI interface. Helps to namespace controls and routing. + + samsung,category: + enum: [deep_buffer, compress] + description: | + Type of the PCM stream. Can be either 'deep_buffer' for normal PCM playback/capture, + or 'compress' for compressed offload streams. + + samsung,buffer_bytes_max: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Maximum size (in bytes) of the DMA buffer allocated for this PCM device. + + '#sound-dai-cells': + const: 0 + description: Must be 0. Required by ALSA SoC bindings. + + status: + enum: [ okay, disabled ] + description: Device node enablement status. Set to "okay" to activate the node. + + required: + - compatible + - reg + - reg-names + - samsung,id + - samsung,irq_id + - samsung,allocate-adsp + - samsung,category + - samsung,buffer_bytes_max + - '#sound-dai-cells' + + additionalProperties: true + required: - compatible - samsung,num-pcm-playback - samsung,num-pcm-capture - samsung,num-i2s-dummy-backend -additionalProperties: false +unevaluatedProperties: false examples: - |
@@ -81,7 +172,7 @@ examples: samsung,num-pcm-capture = <32>; samsung,num-i2s-dummy-backend = <5>; status = "disabled"; - #address-cells = <2>; + #address-cells = <1>; #size-cells = <1>; abox_ipc_generic {
@@ -89,4 +180,33 @@ examples: samsung,num-irq = <64>; status = "disabled"; }; + + abox_pcm_playback@3fd0000 { + compatible = "samsung,abox-pcm-playback"; + samsung,id = <0>; + samsung,irq_id = <0>; + samsung,allocate-adsp = <0>; + reg = <0x3fd0000 0x10>; + reg-names = "pp_pointer_offset"; + #sound-dai-cells = <0>; + sound-name-prefix = "ABOX"; + samsung,category = "deep_buffer"; + samsung,buffer_bytes_max = <0x24000>; + status = "disabled"; + }; + + abox_pcm_capture@3fd0400 { + compatible = "samsung,abox-pcm-capture"; + samsung,id = <0>; + samsung,irq_id = <32>; + samsung,allocate-adsp = <0>; + reg = <0x3fd0400 0x10>; + reg-names = "pp_pointer_offset"; + #sound-dai-cells = <0>; + sound-name-prefix = "ABOX"; + samsung,category = "deep_buffer"; + samsung,buffer_bytes_max = <0x24000>; + status = "disabled"; + }; }; +
Signature · 1 line
2.25.1
Krzysztof Kozlowski
maintainerRe: [PATCH 9/9] ASoC: dt-bindings: sound: exynosauto: add PCM frontend nodes for ABOX generic
Quoted 9 lines · ew kim
This patch extends the Exynos Automotive ABOX generic device tree bindings to support PCM playback and capture frontend nodes.
Each PCM device node describes an audio stream interface handled by the ABOX DSP. These nodes include properties for stream ID, IRQ, ADSP core assignment, buffer limits, and stream category (
deep_bufferor compress).The bindings use patternProperties to match playback and capture nodes as children of the
abox_genericcontroller.
This split of one device into three makes no sense. Adding new binding is one commit.
Quoted 11 lines
Signed-off-by ew kim <[email protected]>--- .../bindings/sound/samsung,exynosauto.yaml | 126 +++++++++++++++++- 1 file changed, 123 insertions(+), 3 deletions(-)Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +0
-0
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml properties: · line 33
Quoted 6 lines
Documentation/devicetree/bindings/sound/samsung,exynosauto.yaml +3
-0@@ -28,6 +28,14 @@ properties: compatible: const: samsung,abox_generic + status: + enum: [ okay, disabled ] + description: DTS node enablement state
Sorry, but why are you writing something entirely different than every other binding?
Best regards,
Krzysztof
Mark Brown
maintainerQuoted 6 lines · ew kim
This patch series adds the ABOX Generic audio management driver for Samsung ExynosAuto SoCs, along with IPC messaging and PCM frontend drivers, including their corresponding device tree bindings.
### ABOX Architecture Design: Fixed and Variable Structure
Quoted 9 lines
The ABOX audio framework is designed with a clear split between:
- **Fixed part** (common framework): reusable components across SoCs
- Generic ABOX platform driver
- IPC messaging handler
- PCM frontend with ALSA compressed audio support
- Solution manager for dynamic control
- **Variable part** (SoC-specific): defined via device tree
- IRQ numbers, stream IDs, buffer sizes, and ADSP allocation
- Defined per PCM/IPC device node in DTS
This all sounds from a system integration point of view like a fairly standard audio DSP. Usually something like that would be structured with the generic bits of DSP support done as a library which the drivers for specific bits of hardware link to, the SOF code is the most obvious example of this we have upstream but there's a few other simpler ones like the Cirrus CODECs. If there's a reason why this wouldn't work here it's not clear to me from what you've posted thus far.