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
5 changes: 5 additions & 0 deletions tools/topology/topology2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,8 @@ 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` |
| 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 @@ -301,6 +303,9 @@ 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` |

**Intel HDA Pipeline IDs:**

Expand Down
82 changes: 82 additions & 0 deletions tools/topology/topology2/cavs-uaol.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# Basic USB Audio Offload Link (UAOL) topology.
#
# This is a function topology, loaded next to the other function topologies of
# the sof_sdw card, so its PCM and pipeline IDs must not collide with theirs.
#
# The UAOL function itself lives in platform/intel/uaol-generic.conf.

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

<vendor-token.conf>
<manifest.conf>
<tokens.conf>
<virtual.conf>
<host-copier-gain-mixin-playback.conf>
<mixout-gain-dai-copier-playback.conf>
<deepbuffer-playback.conf>
<host-gateway-capture.conf>
<dai-copier-eqiir-module-copier-capture.conf>
<input_audio_format.conf>
<output_audio_format.conf>
<data.conf>
<pcm.conf>
<pcm_caps.conf>
<fe_dai.conf>
<uaol.conf>
<hw_config_simple.conf>
<manifest.conf>
<route.conf>
<common_definitions.conf>
<deep-buffer-default.conf>
<dai-copier.conf>
<module-copier.conf>
<pipeline.conf>
<dai.conf>
<host.conf>

Define {
UAOL_PLAYBACK_PCM 'UAOL Playback'
UAOL_CAPTURE_PCM 'UAOL 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'
# The BE IDs are the dai link IDs that are matched with the machine
# driver, which creates the playback link first
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_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
# The mixer of the playback path only supports a stereo stream, while the
# capture path passes through whatever the USB device records
UAOL_PLAYBACK_CHANNELS 2
UAOL_CAPTURE_CHANNELS_MIN 1
UAOL_CAPTURE_CHANNELS_MAX 2
UAOL_RATE 48000

# 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'
}

<platform/intel/uaol-generic.conf>
4 changes: 4 additions & 0 deletions tools/topology/topology2/include/components/dai-copier.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ Class.Widget."dai-copier" {
"HDA"
"SSP"
"DMIC"
"UAOL"
"SAI"
]
}
Expand All @@ -57,6 +58,7 @@ Class.Widget."dai-copier" {
"SSP"
"DMIC"
"HDA"
"UAOL"
"SAI"
]
}
Expand Down Expand Up @@ -103,6 +105,8 @@ Class.Widget."dai-copier" {
$DMIC_LINK_INPUT_CLASS # DMIC link input (DSP <-)
$I2S_LINK_OUTPUT_CLASS # I2S link output (DSP ->)
$I2S_LINK_INPUT_CLASS # I2S link input (DSP <-)
$ALH_UAOL_STREAM_LINK_OUTPUT_CLASS # UAOL link output (DSP ->)
$ALH_UAOL_STREAM_LINK_INPUT_CLASS # UAOL link input (DSP <-)
$IPC_OUTPUT_CLASS # IPC output (DSP ->)
$IPC_INPUT_CLASS # IPC input (DSP <-)
$I2S_MULTILINK_OUTPUT_CLASS # I2S Multi gtw output (DSP ->)
Expand Down
1 change: 1 addition & 0 deletions tools/topology/topology2/include/components/dai.conf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ Class.Widget."dai" {
"DMIC"
"HDA"
"ALH"
"UAOL"
"SAI"
"ESAI"
]
Expand Down
95 changes: 95 additions & 0 deletions tools/topology/topology2/include/dais/uaol.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#
# UAOL DAI
#
# All attributes defined herein are namespaced by alsatplg to
# "Object.Dai.UAOL.attribute_name"
#
# UAOL (USB Audio Offload Link) is an ACE2+ alt link. It belongs to the ALH
# class family in the firmware gateway enumeration, but it is described by its
# own DAI class because the ALH class carries SoundWire specific attributes.
#
# Usage: this component can be used by declaring as follows:
#
# For Playback
#Object.Dai.UAOL."N" {
# direction "playback"
# name "UAOL0"
# id 0
# Object.Base.hw_config."0" {}
# }
# For Capture
#Object.Dai.UAOL."N" {
# direction "capture"
# name "UAOL0"
# id 0
# Object.Base.hw_config."1" {}
# }
#
# Where N is the dai index of the UAOL DAI in the firmware

Class.Dai."UAOL" {
#
# instance ID of UAOL DAI object
#
DefineAttribute."instance" {}

#
# UAOL link index in the firmware
#
DefineAttribute."dai_index" {
token_ref "dai.word"
}

DefineAttribute."direction" {
type "string"
constraints {
!valid_values [
"playback"
"capture"
"duplex"
]
}
}

# type of DAI
DefineAttribute.dai_type {
type "string"
token_ref "dai.string"
}

# Backend DAI Link ID matching with the machine driver
DefineAttribute.id {}

DefineAttribute."default_hw_config_id" {}

DefineAttribute.name {
type "string"
}

DefineAttribute.rate {}

DefineAttribute.ch {}

attributes {
!constructor [
"name"
]
!mandatory [
"id"
"dai_index"
]
!immutable [
"type"
]
#
# UAOL DAI objects instantiated within the same alsaconf node must
# have unique instance attribute
#
unique "instance"
}

dai_type "UAOL"
default_hw_config_id 0
rate 48000
ch 2
}
Loading
Loading