Skip to content

Commit

Permalink
topology2: Add new token 'playback_pause_supported' and set it true f…
Browse files Browse the repository at this point in the history
…or 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
  • Loading branch information
ujfalusi committed Jun 5, 2024
1 parent 0bda13d commit 3c08efc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 4 additions & 0 deletions tools/topology/topology2/cavs-nocodec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -916,6 +916,7 @@ Object.PCM.pcm [
name "$SSP0_PCM_NAME"
id $SSP0_PCM_ID
direction "duplex"
playback_pause_supported "true"
Object.Base.fe_dai.1 {
name "$SSP0_PCM_NAME"
}
Expand Down Expand Up @@ -981,6 +982,7 @@ IncludeByKey.PASSTHROUGH {
name "$SSP2_PCM_NAME"
id 2
direction "duplex"
playback_pause_supported "true"
Object.Base.fe_dai.1 {
name "$SSP2_PCM_NAME"
}
Expand Down Expand Up @@ -1012,6 +1014,7 @@ IncludeByKey.PASSTHROUGH {
name "$SSP2_PCM_NAME"
id 2
direction "duplex"
playback_pause_supported "true"
Object.Base.fe_dai.1 {
name "$SSP2_PCM_NAME"
}
Expand Down Expand Up @@ -1374,6 +1377,7 @@ IncludeByKey.SSP1_ENABLED {
name "$SSP1_PCM_NAME"
id 1
direction "duplex"
playback_pause_supported "true"
Object.Base.fe_dai.1 {
name "$SSP1_PCM_NAME"
}
Expand Down
6 changes: 6 additions & 0 deletions tools/topology/topology2/include/common/pcm.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ Class.PCM."pcm" {
token_ref "stream.bool"
}

DefineAttribute."playback_pause_supported" {
# Token reference and type
token_ref "stream.bool"
}

attributes {
!constructor [
"name"
Expand All @@ -60,4 +65,5 @@ Class.PCM."pcm" {

# Default values for PCM attributes
compress "false"
playback_pause_supported "false"
}
5 changes: 3 additions & 2 deletions tools/topology/topology2/include/common/tokens.conf
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ Object.Base.VendorToken {

"13" {
name "stream"
playback_compatible_d0i3 "1200"
capture_compatible_d0i3 "1201"
playback_compatible_d0i3 1200
capture_compatible_d0i3 1201
playback_pause_supported 1202
}

"14" {
Expand Down

0 comments on commit 3c08efc

Please sign in to comment.