Skip to content

Commit a5bdcce

Browse files
ranj063kv2019i
authored andcommitted
topology2: Add topology for testing SOF plugin
The topology uses passthrough pipelines for playback/capture and supports only 48k, 2ch, 16bit format for now. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent dd8b932 commit a5bdcce

3 files changed

Lines changed: 178 additions & 5 deletions

File tree

tools/plugin/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,16 @@ Ex: "~/work/sof/sof/build_plugin/sof_ep/install/lib:~/work/sof/sof/build_plugin/
4141
And set the environment variable SOF_PLUGIN_TOPOLOGY_PATH to point to the directory containing the topology binary
4242
```
4343

44-
Code can then be run by starting sof-pipe with your desired topology
44+
Code can then be run by starting sof-pipe with your desired topology (Ex: sof-plugin.tplg)
4545

4646
```
47-
./sof-pipe -T sof-tgl-nocodec.tplg
47+
./sof-pipe -T sof-plugin.tplg
4848
```
4949

5050
At this point the sof-pipe daemon is waiting for IPC. Audio applications can now invoke sof-pipe processing via
5151

5252
```
53-
aplay -Dsof:tgl-nocodec:1:default:default:48k2c16b -f dat some48kHz.wav
53+
aplay -Dsof:plugin:1:default:default:48k2c16b -f dat some48kHz.wav
5454
```
5555
The command line is parsed as follows:
5656
- "sof" is the plugin name
@@ -66,9 +66,9 @@ The above example needs to be 48k as example pipe has no SRC/ASRC.
6666
Likewise
6767

6868
```
69-
arecord -Dsof:tgl-nocodec:1:default:default:48k2c16b -f dat file.wav
69+
arecord -Dsof:plugin:1:default:default:48k2c16b -f dat file.wav
7070
```
71-
Will record audio using the tgl-nocodec topology and PCM ID 1.
71+
Will record audio using the plugin topology and PCM ID 1.
7272

7373
Mixer settings can be adjusted for bdw-nocodec by (Not functional yet)
7474

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
<searchdir:include>
2+
<searchdir:include/common>
3+
<searchdir:include/components>
4+
<searchdir:include/dais>
5+
<searchdir:include/pipelines/cavs>
6+
<searchdir:platform>
7+
<searchdir:platform/intel>
8+
9+
<vendor-token.conf>
10+
<manifest.conf>
11+
<tokens.conf>
12+
<host-gateway-capture.conf>
13+
<host-gateway-playback.conf>
14+
<io-gateway-capture.conf>
15+
<io-gateway.conf>
16+
<data.conf>
17+
<pcm.conf>
18+
<pcm_caps.conf>
19+
<fe_dai.conf>
20+
<ssp.conf>
21+
<route.conf>
22+
<intel/common_definitions.conf>
23+
<dai-copier.conf>
24+
<module-copier.conf>
25+
<pipeline.conf>
26+
<input_audio_format.conf>
27+
<output_audio_format.conf>
28+
29+
Object.Pipeline.io-gateway-capture [
30+
{
31+
index 10
32+
direction capture
33+
34+
Object.Widget.dai-copier."1" {
35+
dai_index 1
36+
dai_type "SSP"
37+
type dai_out
38+
copier_type "SSP"
39+
stream_name "NoCodec-1"
40+
node_type $I2S_LINK_INPUT_CLASS
41+
42+
num_input_audio_formats 1
43+
Object.Base.input_audio_format [
44+
{
45+
in_bit_depth 16
46+
in_valid_bit_depth 16
47+
}
48+
]
49+
num_output_audio_formats 1
50+
Object.Base.output_audio_format [
51+
{
52+
out_bit_depth 16
53+
out_valid_bit_depth 16
54+
}
55+
]
56+
}
57+
}
58+
]
59+
60+
Object.Pipeline.host-gateway-capture [
61+
{
62+
index 9
63+
64+
Object.Widget.host-copier.1 {
65+
stream_name 'SSP1 Capture'
66+
pcm_id 1
67+
num_input_audio_formats 1
68+
Object.Base.input_audio_format [
69+
{
70+
in_bit_depth 16
71+
in_valid_bit_depth 16
72+
}
73+
]
74+
num_output_audio_formats 1
75+
Object.Base.output_audio_format [
76+
{
77+
out_bit_depth 16
78+
out_valid_bit_depth 16
79+
}
80+
]
81+
}
82+
}
83+
]
84+
85+
Object.Pipeline.io-gateway [
86+
{
87+
index 4
88+
direction playback
89+
90+
Object.Widget.dai-copier.1 {
91+
dai_index 1
92+
dai_type "SSP"
93+
copier_type "SSP"
94+
stream_name "NoCodec-1"
95+
node_type $I2S_LINK_OUTPUT_CLASS
96+
num_input_audio_formats 1
97+
Object.Base.input_audio_format [
98+
{
99+
in_bit_depth 16
100+
in_valid_bit_depth 16
101+
}
102+
]
103+
num_output_audio_formats 1
104+
Object.Base.output_audio_format [
105+
{
106+
out_bit_depth 16
107+
out_valid_bit_depth 16
108+
}
109+
]
110+
}
111+
}
112+
]
113+
Object.Pipeline.host-gateway-playback [
114+
{
115+
index 3
116+
Object.Widget.host-copier.1 {
117+
stream_name 'SSP1 Playback'
118+
pcm_id 1
119+
num_input_audio_formats 1
120+
Object.Base.input_audio_format [
121+
{
122+
in_bit_depth 16
123+
in_valid_bit_depth 16
124+
}
125+
]
126+
num_output_audio_formats 1
127+
Object.Base.output_audio_format [
128+
{
129+
out_bit_depth 16
130+
out_valid_bit_depth 16
131+
}
132+
]
133+
}
134+
}
135+
]
136+
137+
Object.PCM.pcm [
138+
{
139+
name "PluginPCM"
140+
id 1
141+
direction "duplex"
142+
Object.Base.fe_dai.1 {
143+
name "PluginPlayback"
144+
}
145+
146+
Object.PCM.pcm_caps.1 {
147+
direction "playback"
148+
name "SSP1 Playback"
149+
formats 'S16_LE'
150+
}
151+
152+
Object.PCM.pcm_caps.2 {
153+
direction "capture"
154+
name "SSP1 Capture"
155+
formats 'S16_LE'
156+
}
157+
}
158+
]
159+
160+
161+
Object.Base.route [
162+
{
163+
source "host-copier.1.playback"
164+
sink "dai-copier.SSP.NoCodec-1.playback"
165+
}
166+
{
167+
source "dai-copier.SSP.NoCodec-1.capture"
168+
sink "host-copier.1.capture"
169+
}
170+
]

tools/topology/topology2/development/tplg-targets.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,7 @@ PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-crossover.bin,EFX_CROSSOVE
114114
# Topology to test RTC AEC
115115
"development/cavs-nocodec-rtcaec\;sof-tgl-nocodec-rtcaec\;PLATFORM=tgl,\
116116
PREPROCESS_PLUGINS=nhlt,NHLT_BIN=nhlt-sof-tgl-nocodec-rtcaec.bin"
117+
118+
# Topology for SOF plugin
119+
"development/sof-plugin\;sof-plugin"
117120
)

0 commit comments

Comments
 (0)