Skip to content

Commit 8b5c365

Browse files
committed
topology2: Add the UAOL DAI type
The USB Audio Offload Link is an ACE2+ alt link. The firmware enumerates its gateways in the ALH class family, but the ALH DAI class carries SoundWire specific attributes, so UAOL is described by a DAI class of its own. Allow "UAOL" as a dai type and as a copier type, and let the dai-copier take the two UAOL node types which common_definitions.conf already defines. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent f3732b2 commit 8b5c365

3 files changed

Lines changed: 100 additions & 0 deletions

File tree

tools/topology/topology2/include/components/dai-copier.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Class.Widget."dai-copier" {
4444
"HDA"
4545
"SSP"
4646
"DMIC"
47+
"UAOL"
4748
"SAI"
4849
]
4950
}
@@ -57,6 +58,7 @@ Class.Widget."dai-copier" {
5758
"SSP"
5859
"DMIC"
5960
"HDA"
61+
"UAOL"
6062
"SAI"
6163
]
6264
}
@@ -103,6 +105,8 @@ Class.Widget."dai-copier" {
103105
$DMIC_LINK_INPUT_CLASS # DMIC link input (DSP <-)
104106
$I2S_LINK_OUTPUT_CLASS # I2S link output (DSP ->)
105107
$I2S_LINK_INPUT_CLASS # I2S link input (DSP <-)
108+
$ALH_UAOL_STREAM_LINK_OUTPUT_CLASS # UAOL link output (DSP ->)
109+
$ALH_UAOL_STREAM_LINK_INPUT_CLASS # UAOL link input (DSP <-)
106110
$IPC_OUTPUT_CLASS # IPC output (DSP ->)
107111
$IPC_INPUT_CLASS # IPC input (DSP <-)
108112
$I2S_MULTILINK_OUTPUT_CLASS # I2S Multi gtw output (DSP ->)

tools/topology/topology2/include/components/dai.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ Class.Widget."dai" {
2828
"DMIC"
2929
"HDA"
3030
"ALH"
31+
"UAOL"
3132
"SAI"
3233
"ESAI"
3334
]
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
#
2+
# UAOL DAI
3+
#
4+
# All attributes defined herein are namespaced by alsatplg to
5+
# "Object.Dai.UAOL.attribute_name"
6+
#
7+
# UAOL (USB Audio Offload Link) is an ACE2+ alt link. It belongs to the ALH
8+
# class family in the firmware gateway enumeration, but it is described by its
9+
# own DAI class because the ALH class carries SoundWire specific attributes.
10+
#
11+
# Usage: this component can be used by declaring as follows:
12+
#
13+
# For Playback
14+
#Object.Dai.UAOL."N" {
15+
# direction "playback"
16+
# name "UAOL0"
17+
# id 0
18+
# Object.Base.hw_config."0" {}
19+
# }
20+
# For Capture
21+
#Object.Dai.UAOL."N" {
22+
# direction "capture"
23+
# name "UAOL0"
24+
# id 0
25+
# Object.Base.hw_config."1" {}
26+
# }
27+
#
28+
# Where N is the dai index of the UAOL DAI in the firmware
29+
30+
Class.Dai."UAOL" {
31+
#
32+
# instance ID of UAOL DAI object
33+
#
34+
DefineAttribute."instance" {}
35+
36+
#
37+
# UAOL link index in the firmware
38+
#
39+
DefineAttribute."dai_index" {
40+
token_ref "dai.word"
41+
}
42+
43+
DefineAttribute."direction" {
44+
type "string"
45+
constraints {
46+
!valid_values [
47+
"playback"
48+
"capture"
49+
"duplex"
50+
]
51+
}
52+
}
53+
54+
# type of DAI
55+
DefineAttribute.dai_type {
56+
type "string"
57+
token_ref "dai.string"
58+
}
59+
60+
# Backend DAI Link ID matching with the machine driver
61+
DefineAttribute.id {}
62+
63+
DefineAttribute."default_hw_config_id" {}
64+
65+
DefineAttribute.name {
66+
type "string"
67+
}
68+
69+
DefineAttribute.rate {}
70+
71+
DefineAttribute.ch {}
72+
73+
attributes {
74+
!constructor [
75+
"name"
76+
]
77+
!mandatory [
78+
"id"
79+
"dai_index"
80+
]
81+
!immutable [
82+
"type"
83+
]
84+
#
85+
# UAOL DAI objects instantiated within the same alsaconf node must
86+
# have unique instance attribute
87+
#
88+
unique "instance"
89+
}
90+
91+
dai_type "UAOL"
92+
default_hw_config_id 0
93+
rate 48000
94+
ch 2
95+
}

0 commit comments

Comments
 (0)