# Customize audio graph Each audio use case is a graph with subgraphs of a specific type. Each subgraph has one or more functional software blocks (referred to as modules) that perform a specific function. ## Audio graph terms Audio graph terms | **Use case** | A graph of modules from source endpoint(s) to sink endpoint(s)
that meets the product defined use case. | | --- | --- | | **Graph** | A logical interpretation of a group of one or more subgraphs
connected together to create a specific use case. | | **Subgraph** | A logical abstraction for a group of modules that connect
and are manipulated as a single entity. | | **Container** | Object that allows the system designer to group and run
audio processing modules together in a single software thread. | | **Module** | The smallest independent processing unit in the signal
processing framework. | | **Key value (KV) pair** | The individual key and associated values in a key vector.
For example, a key can be a sound device and a value can be
headphone, speaker, or some other sound device. | | **Key vector** | Uniquely identifies a graph or subgraph through a set of KV
pairs. | | **Graph key vector (GKV)** | GKV is a unique identifier that gets a graph, which is
represented by KV pairs. The graph or system
designer associates a set of unique <keys> and <values> when
creating a subgraph from the QACT UI canvas. | | **Calibration key vector (CKV)** | CKV is a unique identifier that gets calibration data,
which is represented by KV pairs. The graph
or system designer associates a set of unique <keys> and
<values> when storing calibration data. | | **Tag and tag key vector (TKV)** | A tag is an identifier that sets runtime parameters for one or
more modules. It allows updating module configurations (for example,
enabling/disabling features like echo cancellation or
equalization) in a graph at runtime. | ## Graph segments An audio use case has the following segments. The front-end represents stream and streamPP subgraphs, while the back-end represents the per-stream per-device (PSPD), devicePP, and device subgraphs. Graph segments | **Stream** | Gives a data write/read interface and performs decoding and
encoding of compressed data. | | --- | --- | | **StreamPP** | Has stream-based processing modules (for example,
equalizer). | | **PSPD** | Has a module to convert the stream media format to the
device media format. | | **DevicePP** | Has processing modules for sound device tuning. | | **Device** | Hardware endpoint such as CodecDMA (SoundWire), I2S, or TDM port. | Once a front-end connects to a back-end using a routing mixer control, the full GKV forms by concatenating the subgraph GKVs and the CKVs assigned using mixer controls. Upon opening the front-end PCM or compress device, AGM invokes GSL APIs with concatenated GKVs and CKVs to set up the graph in SPF and apply calibration. At the same time, AGM opens a kernel PCM device corresponding to the connected back-ends to begin audio peripheral setup. ## Sample audio graph The following figure shows an example audio graph for a playback scenario. VBackground-1 Solid Page-1 Sheet.37 Round Corner Rectangle.36 Round Corner Rectangle.41 Round Corner Rectangle.42 Round Corner Rectangle.43 Round Corner Rectangle CONT#1 CONT#1 Round Corner Rectangle.1017 PCM Converter PCM Converter Round Corner Rectangle.1024 PCM Decoder PCM Decoder Round Corner Rectangle.1025 Write SHMEM EP Write SHMEM EP Dynamic connector.1032 Dynamic connector.1033 Round Corner Rectangle.7 CONT#6 CONT#6 Round Corner Rectangle.8 Media Format Converter Media Format Converter Round Corner Rectangle.9 CONT#2 CONT#2 Round Corner Rectangle.10 Splitter Splitter Round Corner Rectangle.11 PP2 PP2 Round Corner Rectangle.21 PP1 PP1 Dynamic connector.13 Dynamic connector.23 Round Corner Rectangle.15 CONT#8 CONT#8 Round Corner Rectangle.16 HW EP HW EP Round Corner Rectangle.17 CONT#7 CONT#7 Round Corner Rectangle.28 PP6 PP6 Round Corner Rectangle.29 PP5 PP5 Round Corner Rectangle.30 Mixer Mixer Dynamic connector.21 Dynamic connector.22 Sheet.23 Client PCM Data Client PCM Data Dynamic connector.46 Dynamic connector.47 Dynamic connector.48 Dynamic connector.49 Dynamic connector.50 Sheet.33 SGKV: [StreamRx: PCM Low Latency Playback Instance: instance 1] SGKV: [StreamRx: PCM Low Latency PlaybackInstance: instance 1] Sheet.34 SGKV: [StreamRx: PCM Low Latency Playback Device: Speaker Ins... SGKV: [StreamRx: PCM Low Latency Playback Device: SpeakerInstance: instance 1] Sheet.35 SGKV: [DeviceRx:Speaker DevicePP rx: Speaker PP] SGKV: [DeviceRx:SpeakerDevicePP rx: Speaker PP] Sheet.36 SGKV: [DeviceRx:Speaker] SGKV: [DeviceRx:Speaker] Sample audio graph for playback In this graph: 1. The stream subgraph has a write shared memory endpoint, PCM decoder, and PCM converter. The client passes PCM samples to write shared memory endpoint. 2. If conversion is necessary, the PCM converter converts PCM samples to a format supported by the stream-specific postprocessing modules. 3. Output of the stream subgraph is fed into the stream-device subgraph, which has the media format converter (MFC). MFC converts the stream-subgraph PCM to the device-subgraph PCM format. 4. After conversion, output of the stream-device subgraph is fed into the device PP subgraph for device-specific postprocessing. A mixer is placed at the beginning of subgraph to mix input streams. 5. Output of the devicePP subgraph is then fed into the device subgraph, which has a hardware endpoint module such as an I2S driver. The following is the GKV for this example graph: GKV1: GKV2: Copy to clipboard ### Audio graph manager The audio graph manager (AGM) gives interfaces to allow TinyALSA-based mixer controls and PCM/compress plug-ins to interact and enable audio use cases. AGM runs as part of the PipeWire service that runs in the user space. AGM gives APIs for mixer plug-ins and PCM/compress APIs to set up audio use cases. It maintains many ALSA clients to set up use cases. AGM also manages front-end to back-end connections. The following figure shows the AGM block at a high level. VBackground-1 Solid Page-1 Sheet.33 Rectangle Kernel space Kernel space Rectangle.23 Userspace Userspace Square AGM service AGM service Sheet.2 AGM API AGM API Sheet.4 PAL PAL Sheet.3 Session objects Session objects Sheet.7 GSL GSL Sheet.13 ALSA devices ALSA devices Sheet.18 Sheet.17 Graph objects Graph objects Sheet.21 Sheet.9 Device objects Device objects Dynamic connector.28 Dynamic connector.30 Dynamic connector.31 Sheet.32 Dynamic connector High-level AGM software block AGM objects | Object | Description | | --- | --- | | **Session** | | | **Graph** | | | **Device** | | ### AudioReach graph services The AudioReachâ„¢ Signal Processing Framework graph services (ARGS) consists of the graph service layer (GSL), generic packet router (GPR), and acdb management layer (AML). It handles initialization and creation of graphs, and creation of packets for sending series of commands to the SPF. ARGS components | Component | Description | | --- | --- | | **GSL** | | | **GPR** | | | **AML** | | ## Audio calibration database acdb is a static database on the Apps processor. It has all tuning/calibration parameters for the LPAI. The `*.acdb` file format organizes calibration data for various audio modules for various use cases. Edit this file format using QACT (a PC tool) and place it on the device file system in the `/etc/acdbdata/` folder. During use case initialization or device switch, the AML queries the acdb database with a specified GKV and pushes the device calibration data to SPF. ### Signal processing framework Signal processing framework (SPF) runs in the LPAI subsystem and performs audio data processing. The following figure gives a high-level overview of the functional blocks used in SPF. VBackground-1 Solid Page-1 Sheet.52 Sheet.1 Processing Domain B Processing Domain B Sheet.3 Processing Domain A Processing Domain A Sheet.4 Signal Processing Framework (SPF) Signal Processing Framework (SPF) Sheet.5 Generic Packet Router (GPR) Generic Packet Router (GPR) Sheet.6 Sheet.7 Audio Processing Manager (APM) Audio Processing Manager (APM) Sheet.8 Offload Offload Sheet.9 Specialized Specialized Sheet.10 Generic Generic Sheet.12 Container Container Sheet.14 M1 M1 Sheet.15 M2 M2 Sheet.16 M3 M3 Dynamic connector Dynamic connector.20 Sheet.21 AMD AMD Sheet.22 PRM PRM Sheet.23 IRM IRM Sheet.25 Module-2 Module-2 Sheet.26 Module-3 Module-3 Sheet.28 ... ... Dynamic connector.33 Sheet.34 Application Application Sheet.35 Platform and OS abstraction layer Platform and OS abstraction layer Sheet.36 Board Support Package (timer, memory manager, power manager, ... Board Support Package(timer, memory manager, power manager, debug, etc.) Sheet.37 Hardware drivers Hardware drivers Sheet.38 Real-Time Operating System (RTOS) Real-Time Operating System (RTOS) Simple Arrow CAPI CAPI Sheet.49 Module-1 Module-1 Simple Arrow.50 CAPI CAPI Simple Arrow.51 CAPI CAPI High-level SPF software block SPF components | Component | Description | | --- | --- | | **APM** | Audio processing manager (APM) sets up and manages the use case
graphs in the SPF. It gives the
standard APIs to the graph management library and APM client
to set up and configure audio use cases. | | **Modules** | A module is a functional block in the SPF. It
performs real-time audio processing in
the LPAI subsystem. | | **Containers** | A container is a framework implementation that runs a
group of data processing modules together in the same software
thread. Each container runs in its own software
thread. | Last Published: Jun 17, 2026 [Previous Topic Enable TinyALSA-based applications](https://docs.qualcomm.com/bundle/publicresource/80-70030-16/topics/tinyalsa.md) [Next Topic Troubleshoot audio](https://docs.qualcomm.com/bundle/publicresource/80-70030-16/topics/troubleshoot.md)