Skip to content

Commit

Permalink
Tools: Topology2: ASRC: Remove non-used tokens with IPC4
Browse files Browse the repository at this point in the history
This patch fixes the configuration tokens for ASRC with IPC4,
the tokens asynchronous_mode and rate_in from IPC3 are not
valid. In IPC4 all the control is packed to bit-fiels in
operation mode. Token rate_out is in use as before.

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu committed Feb 21, 2025
1 parent e15a3a4 commit 441a0fe
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 41 deletions.
18 changes: 10 additions & 8 deletions tools/topology/topology2/include/bench/asrc_s16.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Created with script "./bench_comp_generate.sh asrc"
# Edited/added:
# - operation mode 1 for push for playback, 2 for pull for playback
# - rate_out 48000 for the fixed playback sink rate
# - rate_out 0 for the capture PCM defined sink rate
Object.Widget.asrc.1 {
index 1
asynchronous_mode 0
operation_mode 0
rate_out 48000
index 1
operation_mode 1
rate_out 48000
<include/components/src_format_s16_convert_to_48k.conf>
}
Object.Widget.asrc.2 {
index 3
rate_in 48000
asynchronous_mode 0
operation_mode 1
index 3
operation_mode 2
rate_out 0
<include/components/src_format_s16_convert_from_48k.conf>
}
<include/bench/host_io_gateway_pipelines_src_s16.conf>
Expand Down
18 changes: 10 additions & 8 deletions tools/topology/topology2/include/bench/asrc_s24.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Created with script "./bench_comp_generate.sh asrc"
# Edited/added:
# - operation mode 1 for push for playback, 2 for pull for playback
# - rate_out 48000 for the fixed playback sink rate
# - rate_out 0 for the capture PCM defined sink rate
Object.Widget.asrc.1 {
index 1
asynchronous_mode 0
operation_mode 0
rate_out 48000
index 1
operation_mode 1
rate_out 48000
<include/components/src_format_s24_convert_to_48k.conf>
}
Object.Widget.asrc.2 {
index 3
asynchronous_mode 0
operation_mode 1
rate_in 48000
index 3
operation_mode 2
rate_out 0
<include/components/src_format_s24_convert_from_48k.conf>
}
<include/bench/host_io_gateway_pipelines_src_s24.conf>
Expand Down
18 changes: 10 additions & 8 deletions tools/topology/topology2/include/bench/asrc_s32.conf
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# Created with script "./bench_comp_generate.sh asrc"
# Edited/added:
# - operation mode 1 for push for playback, 2 for pull for playback
# - rate_out 48000 for the fixed playback sink rate
# - rate_out 0 for the capture PCM defined sink rate
Object.Widget.asrc.1 {
index 1
asynchronous_mode 0
operation_mode 0
rate_out 48000
index 1
operation_mode 1
rate_out 48000
<include/components/src_format_s32_convert_to_48k.conf>
}
Object.Widget.asrc.2 {
index 3
asynchronous_mode 0
operation_mode 1
rate_in 48000
index 3
operation_mode 2
rate_out 0
<include/components/src_format_s32_convert_from_48k.conf>
}
<include/bench/host_io_gateway_pipelines_src_s32.conf>
Expand Down
4 changes: 1 addition & 3 deletions tools/topology/topology2/include/common/tokens.conf
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ Object.Base.VendorToken {

"7" {
name "asrc"
rate_in 320
rate_out 321
asynchronous_mode 322
rate_out 321
operation_mode 323
}

Expand Down
14 changes: 0 additions & 14 deletions tools/topology/topology2/include/components/asrc.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# Object.Widget.asrc."N" {
# format "s24le"
# rate_out 48000
# asynchronous_mode 1
# operation_mode 0
# }
#
Expand All @@ -32,24 +31,12 @@ Class.Widget."asrc" {
# Bespoke attributes for ASRC
#

# Source sample rate
DefineAttribute."rate_in" {
# Token set reference name and type
token_ref "asrc.word"

}

# Target sample rate
DefineAttribute."rate_out" {
# Token set reference name and type
token_ref "asrc.word"
}

DefineAttribute."asynchronous_mode" {
# Token set reference name and type
token_ref "asrc.word"
}

DefineAttribute."operation_mode" {
# Token set reference name and type
token_ref "asrc.word"
Expand All @@ -66,7 +53,6 @@ Class.Widget."asrc" {
]

!mandatory [
"asynchronous_mode"
"operation_mode"
"num_input_audio_formats"
"num_output_audio_formats"
Expand Down

0 comments on commit 441a0fe

Please sign in to comment.