Skip to content

Commit 3c08efc

Browse files
committed
topology2: Add new token 'playback_pause_supported' and set it true for nocodec only
We need to face with reality that the pause/resume is a feature that is not well tested - end users are using audio via audio servers and they don't use pause/resume, causing constant issues with no real life benefit: With IPC4 multiple pause/resume will make the delay reporting way off from the known universe, causing reported delays in tens or hundreds of years. Looks like suspend/resume with paused stream has been broken for a long time and just got noticed (since it was not tested). Pause on capture has never been supported, but it was advertised on playback by the kernel. Add a new token to allow selected PCMs to be allowed to advertise pause support (playback_pause_supported) and keep it false by default. For testing purposes enable the pause support for nocodec topologies. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: thesofproject/linux#5035
1 parent 0bda13d commit 3c08efc

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

tools/topology/topology2/cavs-nocodec.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -916,6 +916,7 @@ Object.PCM.pcm [
916916
name "$SSP0_PCM_NAME"
917917
id $SSP0_PCM_ID
918918
direction "duplex"
919+
playback_pause_supported "true"
919920
Object.Base.fe_dai.1 {
920921
name "$SSP0_PCM_NAME"
921922
}
@@ -981,6 +982,7 @@ IncludeByKey.PASSTHROUGH {
981982
name "$SSP2_PCM_NAME"
982983
id 2
983984
direction "duplex"
985+
playback_pause_supported "true"
984986
Object.Base.fe_dai.1 {
985987
name "$SSP2_PCM_NAME"
986988
}
@@ -1012,6 +1014,7 @@ IncludeByKey.PASSTHROUGH {
10121014
name "$SSP2_PCM_NAME"
10131015
id 2
10141016
direction "duplex"
1017+
playback_pause_supported "true"
10151018
Object.Base.fe_dai.1 {
10161019
name "$SSP2_PCM_NAME"
10171020
}
@@ -1374,6 +1377,7 @@ IncludeByKey.SSP1_ENABLED {
13741377
name "$SSP1_PCM_NAME"
13751378
id 1
13761379
direction "duplex"
1380+
playback_pause_supported "true"
13771381
Object.Base.fe_dai.1 {
13781382
name "$SSP1_PCM_NAME"
13791383
}

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ Class.PCM."pcm" {
4444
token_ref "stream.bool"
4545
}
4646

47+
DefineAttribute."playback_pause_supported" {
48+
# Token reference and type
49+
token_ref "stream.bool"
50+
}
51+
4752
attributes {
4853
!constructor [
4954
"name"
@@ -60,4 +65,5 @@ Class.PCM."pcm" {
6065

6166
# Default values for PCM attributes
6267
compress "false"
68+
playback_pause_supported "false"
6369
}

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,9 @@ Object.Base.VendorToken {
129129

130130
"13" {
131131
name "stream"
132-
playback_compatible_d0i3 "1200"
133-
capture_compatible_d0i3 "1201"
132+
playback_compatible_d0i3 1200
133+
capture_compatible_d0i3 1201
134+
playback_pause_supported 1202
134135
}
135136

136137
"14" {

0 commit comments

Comments
 (0)