Skip to content

Commit e5eb7df

Browse files
committed
topology2: tokens: Split the tokens for input/output pin index
Separate the pin index token ID for input/output pin index to avoid collisions between the two and incorrect pin index parsing in the kernel. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent b77dbc3 commit e5eb7df

File tree

5 files changed

+34
-32
lines changed

5 files changed

+34
-32
lines changed

tools/topology/topology2/include/common/input_audio_format.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Class.Base."input_audio_format" {
1515
DefineAttribute."instance" {
1616
}
1717

18-
DefineAttribute."pin_index" {
18+
DefineAttribute."input_pin_index" {
1919
# Token set reference name
2020
token_ref "sof_tkn_cavs_audio_format.word"
2121
}

tools/topology/topology2/include/common/output_audio_format.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Class.Base."output_audio_format" {
1515
DefineAttribute."instance" {
1616
}
1717

18-
DefineAttribute."pin_index" {
18+
DefineAttribute."output_pin_index" {
1919
# Token set reference name
2020
token_ref "sof_tkn_cavs_audio_format.word"
2121
}

tools/topology/topology2/include/common/tokens.conf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Object.Base.VendorToken {
156156
in_interleaving_style 1906
157157
in_fmt_cfg 1907
158158
in_sample_type 1908
159-
pin_index 1909
159+
input_pin_index 1909
160160
# tokens up to 1929 reserved for future use
161161
out_rate 1930
162162
out_bit_depth 1931
@@ -167,6 +167,7 @@ Object.Base.VendorToken {
167167
out_interleaving_style 1936
168168
out_fmt_cfg 1937
169169
out_sample_type 1938
170+
output_pin_index 1939
170171
# tokens up to 1969 reserved for future use
171172
ibs 1970
172173
obs 1971

tools/topology/topology2/include/pipelines/cavs/io-gateway.conf

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -46,32 +46,33 @@ Class.Pipeline."io-gateway" {
4646
num_input_audio_formats 3
4747
num_output_audio_formats 3
4848
# 32-bit 48KHz 2ch
49-
Object.Base.audio_format.3 {
50-
in_bit_depth 32
51-
in_valid_bit_depth 24
52-
out_bit_depth 32
53-
out_valid_bit_depth 24
54-
}
55-
56-
Object.Base.audio_format.1 {
57-
in_bit_depth 32
58-
in_valid_bit_depth 32
59-
out_bit_depth 32
60-
out_valid_bit_depth 32
61-
}
62-
# 32-bit 48KHz 4ch
63-
Object.Base.audio_format.2 {
64-
in_channels 4
65-
in_bit_depth 32
66-
in_valid_bit_depth 32
67-
out_channels 4
68-
out_bit_depth 32
69-
out_valid_bit_depth 32
70-
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
71-
in_ch_map $CHANNEL_MAP_3_POINT_1
72-
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
73-
out_ch_map $CHANNEL_MAP_3_POINT_1
74-
}
49+
Object.Base.audio_format [
50+
{
51+
in_bit_depth 32
52+
in_valid_bit_depth 24
53+
out_bit_depth 32
54+
out_valid_bit_depth 24
55+
}
56+
{
57+
in_bit_depth 32
58+
in_valid_bit_depth 32
59+
out_bit_depth 32
60+
out_valid_bit_depth 32
61+
}
62+
# 32-bit 48KHz 4ch
63+
{
64+
in_channels 4
65+
in_bit_depth 32
66+
in_valid_bit_depth 32
67+
out_channels 4
68+
out_bit_depth 32
69+
out_valid_bit_depth 32
70+
in_ch_cfg $CHANNEL_CONFIG_3_POINT_1
71+
in_ch_map $CHANNEL_MAP_3_POINT_1
72+
out_ch_cfg $CHANNEL_CONFIG_3_POINT_1
73+
out_ch_map $CHANNEL_MAP_3_POINT_1
74+
}
75+
]
7576
}
7677

7778
pipeline."1" {

tools/topology/topology2/include/pipelines/cavs/mixout-gain-smart-amp-dai-copier-playback.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,18 +93,18 @@ Class.Pipeline."mixout-gain-smart-amp-dai-copier-playback" {
9393
# 32-bit 48KHz 2ch
9494
Object.Base.input_audio_format {
9595
1 {
96-
pin_index 0
96+
input_pin_index 0
9797
in_bit_depth 32
9898
in_valid_bit_depth 32
9999
}
100100
2 {
101-
pin_index 1
101+
input_pin_index 1
102102
in_bit_depth 32
103103
in_valid_bit_depth 32
104104
}
105105
}
106106
Object.Base.output_audio_format.1 {
107-
pin_index 0
107+
output_pin_index 0
108108
out_bit_depth 32
109109
out_valid_bit_depth 32
110110
}

0 commit comments

Comments
 (0)