Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/boards/intel_adsp/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ config MM_DRV
default y

config UAOL
default n
default y if ACE


# # Zephyr / power settings
Expand Down
4 changes: 0 additions & 4 deletions app/wov-d0i3-fake-wake.conf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,3 @@ CONFIG_COMP_MWW_FAKE_WAKE_MS=5000
# LLEXT relocatable ELF format for loadable modules on Intel ADSP ACE 3.0
CONFIG_LLEXT_TYPE_ELF_RELOCATABLE=y

# Disable USB Audio Offload (UAOL)
CONFIG_UAOL=n
CONFIG_DAI_INTEL_UAOL=n

2 changes: 1 addition & 1 deletion src/audio/intel_uaol.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
*/

#include <zephyr/drivers/uaol.h>
#include <zephyr/logging/log.h>
#include <rtos/string.h>
#include <sof/tlv.h>
#include <sof/audio/component_ext.h>
#include <sof/audio/intel_uaol.h>

LOG_MODULE_REGISTER(uaol, CONFIG_SOF_LOG_LEVEL);
Expand Down
15 changes: 10 additions & 5 deletions tools/topology/topology2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,10 @@ default ID ranges for the same endpoint types.
| Jack Echo Ref | 11 | `SDW_JACK_ECHO_REF_PCM_ID` |
| Speaker Echo Ref | 12 | `SDW_SPK_ECHO_REF_PCM_ID` |
| Bluetooth | 2 or 20 | `BT_PCM_ID` |
| USB Audio Offload (UAOL) | 21 | `UAOL_PCM_ID` |
| Deepbuffer UAOL | 22 | `DEEP_BUFFER_PCM_ID` |
| USB Audio Offload (UAOL0) | 21 | `UAOL_PCM_ID` |
| USB Audio Offload (UAOL1) | 22 | `UAOL_PCM1_ID` |
| Deepbuffer UAOL0 | 23 | `UAOL_DB_PCM_ID` |
| Deepbuffer UAOL1 | 24 | `UAOL_DB1_PCM_ID` |
| Deep Buffer (Jack) | 31 | `DEEP_BUFFER_PCM_ID` |
| Deep Buffer (Speaker) | 35 | `DEEP_BUFFER_PCM_ID_2` |
| DMIC Deep Buffer | 46 | `DMIC0_DEEP_BUFFER_PCM_ID` |
Expand Down Expand Up @@ -304,9 +306,12 @@ is at N1 (50/51, 60/61, 70/71, 80/81).
| HDMI 4 Host / DAI | 80 / 81 | `HDMI4_HOST_PIPELINE_ID` / `HDMI4_DAI_PIPELINE_ID` |
| Compress Jack / Speaker | 90 / 92 | `COMPR_PIPELINE_ID` / `COMPR_2_PIPELINE_ID` |
| PCH DMIC0 Host / DAI | 100 / 101 | `DMIC0_HOST_PIPELINE_ID` / `DMIC0_DAI_PIPELINE_ID` |
| UAOL Playback Host / DAI | 210 / 211 | `UAOL_PB_HOST_PIPELINE_ID` / `UAOL_PB_DAI_PIPELINE_ID` |
| UAOL Capture Host / DAI | 212 / 213 | `UAOL_CP_HOST_PIPELINE_ID` / `UAOL_CP_DAI_PIPELINE_ID` |
| UAOL Deepbuffer | 214 | `DEEP_BUFFER_PIPELINE_ID` |
| UAOL0 Playback Host / DAI | 210 / 211 | `UAOL_PB_HOST_PIPELINE_ID` / `UAOL_PB_DAI_PIPELINE_ID` |
| UAOL0 Capture Host / DAI | 212 / 213 | `UAOL_CP_HOST_PIPELINE_ID` / `UAOL_CP_DAI_PIPELINE_ID` |
| UAOL0 Deepbuffer | 214 | `UAOL_DB_PIPELINE_ID` |
| UAOL1 Playback Host / DAI | 215 / 216 | `UAOL_PB1_HOST_PIPELINE_ID` / `UAOL_PB1_DAI_PIPELINE_ID` |
| UAOL1 Capture Host / DAI | 217 / 218 | `UAOL_CP1_HOST_PIPELINE_ID` / `UAOL_CP1_DAI_PIPELINE_ID` |
| UAOL1 Deepbuffer | 219 | `UAOL_DB1_PIPELINE_ID` |

**Intel HDA Pipeline IDs:**

Expand Down
59 changes: 39 additions & 20 deletions tools/topology/topology2/cavs-uaol.conf
Original file line number Diff line number Diff line change
Expand Up @@ -42,45 +42,64 @@
<host.conf>

Define {
UAOL_PLAYBACK_PCM 'UAOL Playback'
UAOL_CAPTURE_PCM 'UAOL Capture'
UAOL_PLAYBACK_PCM 'USB Offload 0 Playback'
UAOL_CAPTURE_PCM 'USB Offload 0 Capture'
# The two directions are separate DAI links so that the format fixup of
# a link is decided by the DAI copier of that direction alone. The names
# are abbreviated because alsatplg drops widget tuples above 36 characters
# and the dai-copier name is 'dai-copier.UAOL.<name>.<direction>'
UAOL_PB_DAI_NAME 'UAOL0-Play'
UAOL_CP_DAI_NAME 'UAOL0-Cap'
# a link is decided by the DAI copier of that direction alone, and the
# link carries two streams per direction, each with a backend of its
# own: UAOL<link>-Play<n> and UAOL<link>-Cap<n>. The names are abbreviated
# because alsa-lib drops widget tuples once the dai-copier name,
# 'dai-copier.UAOL.<name>.<direction>', exceeds 37 characters
UAOL_PB_DAI_NAME 'UAOL0-Play0'
UAOL_CP_DAI_NAME 'UAOL0-Cap0'
# The BE IDs are the dai link IDs that are matched with the machine
# driver, which creates the playback link first
# driver, which creates the backends in the order Play0, Cap0, Play1,
# Cap1
UAOL_PB_BE_ID 9
UAOL_CP_BE_ID 10
# UAOL_DAI_INDEX is the UAOL link the DSP uses, only link 0 is addressable
UAOL_DAI_INDEX 0
UAOL_PCM_NAME 'UAOL'
UAOL_PCM_NAME 'USB Offload 0'
UAOL_PCM_ID 21
UAOL_PB_HOST_PIPELINE_ID 210
UAOL_PB_DAI_PIPELINE_ID 211
UAOL_CP_HOST_PIPELINE_ID 212
UAOL_CP_DAI_PIPELINE_ID 213

# Second stream pair of the link, on its own PCM
UAOL_NUM_STREAMS 2
UAOL_PLAYBACK1_PCM 'USB Offload 1 Playback'
UAOL_CAPTURE1_PCM 'USB Offload 1 Capture'
UAOL_PB1_DAI_NAME 'UAOL0-Play1'
UAOL_CP1_DAI_NAME 'UAOL0-Cap1'
UAOL_PB1_BE_ID 11
UAOL_CP1_BE_ID 12
UAOL_PCM1_NAME 'USB Offload 1'
UAOL_PCM1_ID 22
UAOL_PB1_HOST_PIPELINE_ID 215
UAOL_PB1_DAI_PIPELINE_ID 216
UAOL_CP1_HOST_PIPELINE_ID 217
UAOL_CP1_DAI_PIPELINE_ID 218
# Both paths pass through whatever the offloaded USB device asks for, so
# the PCM advertises everything a USB device may support. 7 channels is
# left out of the widget formats, it has no channel config and no channel
# map, so it is the one count in the range which cannot be run.
UAOL_CHANNELS_MIN 1
UAOL_CHANNELS_MAX 8
# UAOL supports up to 192 kHz
# UAOL supports up to 384 kHz
UAOL_RATE_MIN 8000
UAOL_RATE_MAX 192000
UAOL_RATES '8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000'
UAOL_RATE_MAX 384000
UAOL_RATES '8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,384000'

# The deep buffer PCM feeds the same mixer as the normal playback PCM. It
# takes the source and the sink as plain widget names, so it repeats the
# pipeline IDs defined above.
DEEP_BUFFER_PCM_NAME 'Deepbuffer UAOL'
DEEP_BUFFER_PCM_ID 22
DEEP_BUFFER_PIPELINE_ID 214
DEEP_BUFFER_PIPELINE_SRC 'mixin.214.1'
DEEP_BUFFER_PIPELINE_SINK 'mixout.211.1'
# The deep buffer PCMs feed the same mixer as the normal playback PCM of
# their stream
UAOL_DEEP_BUFFER 'true'
UAOL_DB_PCM_NAME 'Deepbuffer USB Offload 0'
UAOL_DB_PCM_ID 23
UAOL_DB_PIPELINE_ID 214
UAOL_DB1_PCM_NAME 'Deepbuffer USB Offload 1'
UAOL_DB1_PCM_ID 24
UAOL_DB1_PIPELINE_ID 219
}

<platform/intel/uaol-generic.conf>
101 changes: 101 additions & 0 deletions tools/topology/topology2/development/sof-hda-generic-uaol.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# HDA generic topology extended with the USB Audio Offload Link (UAOL).
#
# Development topology. The UAOL is not part of sof-hda-generic itself: the
# backend of a function which is not present on the machine makes the whole
# topology fail to load, and the UAOL DAIs only exist on ACE2 and newer
# platforms, with a kernel built for USB audio offload. Keeping it separate
# leaves sof-hda-generic loadable everywhere.
#
# Select it with:
# options snd_sof tplg_filename=sof-hda-generic-uaol.tplg
#
# The module parameter also stops the machine driver from appending the -idisp
# suffix, so this topology carries the iDisp backends unconditionally, as
# sof-hda-generic does. For a machine without an HDA codec, where the driver
# would have picked sof-hda-generic-idisp, use the sof-hda-generic-idisp-uaol variant
# instead, which is built from this file without the HDA codec paths.
#
# The UAOL function itself lives in platform/intel/uaol-generic.conf, and is
# shared with the cavs-uaol function topology of the sof_sdw card.

<searchdir:include>
<searchdir:include/common>
<searchdir:include/components>
<searchdir:include/dais>
<searchdir:include/pipelines>
<searchdir:include/pipelines/cavs>
<searchdir:platform>
<searchdir:platform/intel>

<sof-hda-generic.conf>

<uaol.conf>
<input_audio_format.conf>
<output_audio_format.conf>

Define {
UAOL_PLAYBACK_PCM 'USB Offload 0 Playback'
UAOL_CAPTURE_PCM 'USB Offload 0 Capture'
# The two directions are separate DAI links so that the format fixup of
# a link is decided by the DAI copier of that direction alone, and the
# link carries two streams per direction, each with a backend of its
# own: UAOL<link>-Play<n> and UAOL<link>-Cap<n>. The names are abbreviated
# because alsa-lib drops widget tuples once the dai-copier name,
# 'dai-copier.UAOL.<name>.<direction>', exceeds 37 characters
UAOL_PB_DAI_NAME 'UAOL0-Play0'
UAOL_CP_DAI_NAME 'UAOL0-Cap0'
# The BE IDs are the dai link IDs that are matched with the machine
# driver. skl_hda_dsp_generic assigns fixed IDs, so these are the same
# whichever other functions the board has. The backends come in the
# order Play0, Cap0, Play1, Cap1
UAOL_PB_BE_ID 9
UAOL_CP_BE_ID 10
# UAOL_DAI_INDEX is the UAOL link the DSP uses, only link 0 is addressable
UAOL_DAI_INDEX 0
UAOL_PCM_NAME 'USB Offload 0'
UAOL_PCM_ID 21
UAOL_PB_HOST_PIPELINE_ID 210
UAOL_PB_DAI_PIPELINE_ID 211
UAOL_CP_HOST_PIPELINE_ID 212
UAOL_CP_DAI_PIPELINE_ID 213

# Second stream pair of the link, on its own PCM. Each backend offloads
# the USB PCM its route kcontrol points at; with a single USB device both
# routes point at it and the second PCM fails with EBUSY while the first
# one runs, a second device or a second PCM of the first lets both run
UAOL_NUM_STREAMS 2
UAOL_PLAYBACK1_PCM 'USB Offload 1 Playback'
UAOL_CAPTURE1_PCM 'USB Offload 1 Capture'
UAOL_PB1_DAI_NAME 'UAOL0-Play1'
UAOL_CP1_DAI_NAME 'UAOL0-Cap1'
UAOL_PB1_BE_ID 11
UAOL_CP1_BE_ID 12
UAOL_PCM1_NAME 'USB Offload 1'
UAOL_PCM1_ID 22
UAOL_PB1_HOST_PIPELINE_ID 215
UAOL_PB1_DAI_PIPELINE_ID 216
UAOL_CP1_HOST_PIPELINE_ID 217
UAOL_CP1_DAI_PIPELINE_ID 218
# Both paths pass through whatever the offloaded USB device asks for, so
# the PCM advertises everything a USB device may support. 7 channels is
# left out of the widget formats, it has no channel config and no channel
# map, so it is the one count in the range which cannot be run.
UAOL_CHANNELS_MIN 1
UAOL_CHANNELS_MAX 8
# UAOL supports up to 384 kHz
UAOL_RATE_MIN 8000
UAOL_RATE_MAX 384000
UAOL_RATES '8000,11025,12000,16000,22050,24000,32000,44100,48000,64000,88200,96000,128000,176400,192000,384000'

# The deep buffer PCMs feed the same mixer as the normal playback PCM of
# their stream, next to the one the HDA playback has
UAOL_DEEP_BUFFER 'true'
UAOL_DB_PCM_NAME 'Deepbuffer USB Offload 0'
UAOL_DB_PCM_ID 23
UAOL_DB_PIPELINE_ID 214
UAOL_DB1_PCM_NAME 'Deepbuffer USB Offload 1'
UAOL_DB1_PCM_ID 24
UAOL_DB1_PIPELINE_ID 219
}

<platform/intel/uaol-generic.conf>
8 changes: 8 additions & 0 deletions tools/topology/topology2/development/tplg-targets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,14 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-crossover.bin,EFX_CROSSOVE
"development/cavs-nocodec-rtcaec\;sof-tgl-nocodec-rtcaec\;PLATFORM=tgl,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-rtcaec.bin"

# Topology to test the USB audio offload on an HDA machine, load it with
# snd_sof.tplg_filename=sof-hda-generic-uaol.tplg
"development/sof-hda-generic-uaol\;sof-hda-generic-uaol\;HDA_CONFIG=mix,HDA_MIC_ENHANCED_CAPTURE=true,\
EFX_HDA_MIC_TDFB_PARAMS=line2_pass,EFX_HDA_MIC_DRC_PARAMS=passthrough"
# The same for a machine without an HDA codec, HDMI only, load it with
# snd_sof.tplg_filename=sof-hda-generic-idisp-uaol.tplg
"development/sof-hda-generic-uaol\;sof-hda-generic-idisp-uaol\;"

# SSP test topology for Data Processing SRC on MTL
"cavs-nocodec\;sof-mtl-nocodec-dp-test\;PLATFORM=mtl,NUM_DMICS=4,PDM1_MIC_A_ENABLE=1,PDM1_MIC_B_ENABLE=1,\
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-mtl-nocodec.bin,SRC_DOMAIN=DP"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Every format the offloaded USB endpoint can carry: S16_LE, S24_LE and
# S32_LE, 1 to 8 channels and every standard rate from 8 to 192 kHz.
# S32_LE, 1 to 8 channels and every standard rate from 8 to 384 kHz.
#
# 7 channels is left out, it has no channel config and no channel map in
# common_definitions.conf.
num_input_audio_formats 315
num_input_audio_formats 336
CombineArrays.Object.Base.input_audio_format [
{
in_rate [
Expand All @@ -22,6 +22,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -46,6 +47,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand All @@ -70,6 +72,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -94,6 +97,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand All @@ -118,6 +122,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -142,6 +147,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand All @@ -166,6 +172,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -190,6 +197,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand All @@ -214,6 +222,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -238,6 +247,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand All @@ -262,6 +272,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -286,6 +297,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand All @@ -310,6 +322,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 16 ]
in_valid_bit_depth [ 16 ]
Expand All @@ -334,6 +347,7 @@
128000
176400
192000
384000
]
in_bit_depth [ 32 ]
in_valid_bit_depth [ 24 32 ]
Expand Down
Loading
Loading