-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tools: Topology2: Add test topology for RTNR
Signed-off-by: Seppo Ingalsuo <[email protected]>
- Loading branch information
Showing
11 changed files
with
231 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
tools/topology/topology2/include/bench/rtnr_controls_capture.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Created initially with script "./bench_comp_generate.sh rtnr" | ||
# may need edits to modify controls | ||
Object.Control { | ||
# Un-comment the supported controls in RTNR | ||
bytes."1" { | ||
name '$ANALOG_CAPTURE_PCM RTNR bytes' | ||
IncludeByKey.BENCH_RTNR_PARAMS { | ||
"default" "include/components/rtnr/default_bytes.conf" | ||
} | ||
} | ||
bytes."2" { | ||
name '$ANALOG_CAPTURE_PCM RTNR data' | ||
IncludeByKey.BENCH_RTNR_PARAMS { | ||
"default" "include/components/rtnr/default_data.conf" | ||
} | ||
} | ||
mixer."1" { | ||
name '$ANALOG_CAPTURE_PCM RTNR enable' | ||
} | ||
#enum."1" { | ||
# name '$ANALOG_CAPTURE_PCM RTNR enum' | ||
#} | ||
} |
23 changes: 23 additions & 0 deletions
23
tools/topology/topology2/include/bench/rtnr_controls_playback.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Created initially with script "./bench_comp_generate.sh rtnr" | ||
# may need edits to modify controls | ||
Object.Control { | ||
# Un-comment the supported controls in RTNR | ||
bytes."1" { | ||
name '$ANALOG_PLAYBACK_PCM RTNR bytes' | ||
IncludeByKey.BENCH_RTNR_PARAMS { | ||
"default" "include/components/rtnr/default_bytes.conf" | ||
} | ||
} | ||
bytes."2" { | ||
name '$ANALOG_PLAYBACK_PCM RTNR data' | ||
IncludeByKey.BENCH_RTNR_PARAMS { | ||
"default" "include/components/rtnr/default_data.conf" | ||
} | ||
} | ||
mixer."1" { | ||
name '$ANALOG_PLAYBACK_PCM RTNR enable' | ||
} | ||
#enum."1" { | ||
# name '$ANALOG_PLAYBACK_PCM RTNR enum' | ||
#} | ||
} |
19 changes: 19 additions & 0 deletions
19
tools/topology/topology2/include/bench/rtnr_hda_route.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Created with script "./bench_comp_generate.sh rtnr" | ||
Object.Base.route [ | ||
{ | ||
sink 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.playback' | ||
source 'rtnr.1.1' | ||
} | ||
{ | ||
sink 'rtnr.1.1' | ||
source 'host-copier.0.playback' | ||
} | ||
{ | ||
source 'dai-copier.HDA.$HDA_ANALOG_DAI_NAME.capture' | ||
sink 'rtnr.3.2' | ||
} | ||
{ | ||
source 'rtnr.3.2' | ||
sink 'host-copier.0.capture' | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Created with script "./bench_comp_generate.sh rtnr" | ||
Object.Widget.rtnr.1 { | ||
index 1 | ||
<include/bench/one_input_output_format_s16.conf> | ||
<include/bench/rtnr_controls_playback.conf> | ||
} | ||
Object.Widget.rtnr.2 { | ||
index 3 | ||
<include/bench/one_input_output_format_s16.conf> | ||
<include/bench/rtnr_controls_capture.conf> | ||
} | ||
<include/bench/host_io_gateway_pipelines_s16.conf> | ||
<include/bench/rtnr_hda_route.conf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Created with script "./bench_comp_generate.sh rtnr" | ||
Object.Widget.rtnr.1 { | ||
index 1 | ||
<include/bench/one_input_output_format_s24.conf> | ||
<include/bench/rtnr_controls_playback.conf> | ||
} | ||
Object.Widget.rtnr.2 { | ||
index 3 | ||
<include/bench/one_input_output_format_s24.conf> | ||
<include/bench/rtnr_controls_capture.conf> | ||
} | ||
<include/bench/host_io_gateway_pipelines_s24.conf> | ||
<include/bench/rtnr_hda_route.conf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Created with script "./bench_comp_generate.sh rtnr" | ||
Object.Widget.rtnr.1 { | ||
index 1 | ||
<include/bench/one_input_output_format_s32.conf> | ||
<include/bench/rtnr_controls_playback.conf> | ||
} | ||
Object.Widget.rtnr.2 { | ||
index 3 | ||
<include/bench/one_input_output_format_s32.conf> | ||
<include/bench/rtnr_controls_capture.conf> | ||
} | ||
<include/bench/host_io_gateway_pipelines_s32.conf> | ||
<include/bench/rtnr_hda_route.conf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# | ||
# | ||
# A generic RTNR component. All attributes defined herein are namespaced | ||
# by alsatplg to "Object.Widget.rtnr.attribute_name" | ||
# | ||
# Usage: this component can be used by declaring in the parent object. i.e. | ||
# | ||
# Object.Widget.rtnr."N" { | ||
# index 1 | ||
# } | ||
# } | ||
|
||
# | ||
# Where M is pipeline ID and N is a unique integer in the parent object. | ||
|
||
<include/controls/mixer.conf> | ||
|
||
Class.Widget."rtnr" { | ||
# | ||
# Pipeline ID | ||
# | ||
DefineAttribute."index" { | ||
type "integer" | ||
} | ||
|
||
# | ||
# Unique instance for RTNR widget | ||
# | ||
DefineAttribute."instance" { | ||
type "integer" | ||
} | ||
|
||
# Include common widget attributes definition | ||
<include/components/widget-common.conf> | ||
|
||
attributes { | ||
!constructor [ | ||
"index" | ||
"instance" | ||
] | ||
!mandatory [ | ||
"num_input_pins" | ||
"num_output_pins" | ||
"num_input_audio_formats" | ||
"num_output_audio_formats" | ||
] | ||
|
||
!immutable [ | ||
"uuid" | ||
"type" | ||
] | ||
!deprecated [ | ||
"preload_count" | ||
] | ||
unique "instance" | ||
} | ||
|
||
|
||
# RTNR widget switch control | ||
Object.Control { | ||
mixer."1" { | ||
Object.Base.channel.1 { | ||
name "fc" | ||
shift 0 | ||
} | ||
Object.Base.ops.1 { | ||
name "ctl" | ||
info "volsw" | ||
#259 binds the mixer control to switch get/put handlers | ||
get 259 | ||
put 259 | ||
} | ||
max 1 | ||
} | ||
} | ||
|
||
# | ||
# Default attributes for rtnr | ||
# | ||
# 5c7ca334-e15d-11eb-ba80-0242ac130004 | ||
uuid "34:a3:7c:5c:5d:e1:eb:11:ba:80:02:42:ac:13:00:04" | ||
type "effect" | ||
no_pm "true" | ||
num_input_pins 1 | ||
num_output_pins 1 | ||
} |
13 changes: 13 additions & 0 deletions
13
tools/topology/topology2/include/components/rtnr/default_bytes.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Copied and modified for IPC4 from RTNR bytes in | ||
# tools/topology/topology1/sof/pipe-rtnr-google-rtc-audio-processing-capture.m4 | ||
# param_id = 0 for SOF_RTNR_CONFIG | ||
Object.Base.data."rtnr_bytes_config" { | ||
bytes "0x53,0x4f,0x46,0x34,0x00,0x00,0x00,0x00, | ||
0x20,0x00,0x00,0x00,0x00,0x30,0x01,0x03, | ||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, | ||
0x80,0xbb,0x00,0x00,0x00,0x00,0x00,0x00" | ||
} |
9 changes: 9 additions & 0 deletions
9
tools/topology/topology2/include/components/rtnr/default_data.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copied and modified for IPC4 from RTNR data in | ||
# tools/topology/topology1/sof/pipe-rtnr-google-rtc-audio-processing-capture.m4 | ||
# param_id = 1 for SOF_RTNR_DATA | ||
Object.Base.data."rtnr_data_config" { | ||
bytes "0x53,0x4f,0x46,0x34,0x01,0x00,0x00,0x00, | ||
0x00,0x00,0x00,0x00,0x00,0x30,0x01,0x03, | ||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00" | ||
} |