SRC should be scheduled on at least 4ms tick. Increase buffers to deal with 2 times output rate.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- topology/reef-bxt-nocodec.m4 | 10 +++++----- topology/reef-byt-nocodec.m4 | 4 ++-- topology/reef-byt-rt5640.m4 | 4 ++-- topology/reef-byt-rt5651.m4 | 4 ++-- topology/reef-cht-nocodec.m4 | 8 ++++---- topology/reef-hsw-rt5640.m4 | 10 +++++----- topology/sof/pipe-pcm-media.m4 | 10 ++++++---- 7 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/topology/reef-bxt-nocodec.m4 b/topology/reef-bxt-nocodec.m4 index 2028323..486d4ea 100644 --- a/topology/reef-bxt-nocodec.m4 +++ b/topology/reef-bxt-nocodec.m4 @@ -40,14 +40,14 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0, 0, 2)
# PCM Media Playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 # Use DMAC 0 channel 3 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 96, 2000, 1, 0, 0, 3) +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 3)
# PCM Media Playback pipeline 4 on PCM 3 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 -# Use DMAC 0 channel 4 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 4, 3, 2, s32le, 96, 2000, 1, 0, 0, 4) +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 +# Use DMAC 0 channel 3 for PCM audio playback data +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 4)
# Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 diff --git a/topology/reef-byt-nocodec.m4 b/topology/reef-byt-nocodec.m4 index 1c3cf5f..938666d 100644 --- a/topology/reef-byt-nocodec.m4 +++ b/topology/reef-byt-nocodec.m4 @@ -38,9 +38,9 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0, 0, 2)
# PCM Media Playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 # Use DMAC 0 channel 3 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 96, 2000, 1, 0, 0, 3) +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 3)
# Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 diff --git a/topology/reef-byt-rt5640.m4 b/topology/reef-byt-rt5640.m4 index 9855f1a..05743e2 100644 --- a/topology/reef-byt-rt5640.m4 +++ b/topology/reef-byt-rt5640.m4 @@ -38,9 +38,9 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0, 0, 2)
# PCM Media Playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 # Use DMAC 0 channel 3 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 96, 2000, 1, 0, 0, 3) +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 3)
# Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 diff --git a/topology/reef-byt-rt5651.m4 b/topology/reef-byt-rt5651.m4 index 1b492b7..cb9dcc2 100644 --- a/topology/reef-byt-rt5651.m4 +++ b/topology/reef-byt-rt5651.m4 @@ -38,9 +38,9 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0, 0, 2)
# PCM Media Playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 # Use DMAC 0 channel 3 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 96, 2000, 1, 0, 0, 3) +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 3)
# Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 diff --git a/topology/reef-cht-nocodec.m4 b/topology/reef-cht-nocodec.m4 index ead0f75..52e8d50 100644 --- a/topology/reef-cht-nocodec.m4 +++ b/topology/reef-cht-nocodec.m4 @@ -37,10 +37,10 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, # Use DMAC 0 channel 2 for PCM audio capture data PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0, 0, 2)
-# PCM Media Playback pipeline 4 on PCM 3 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 -# Use DMAC 0 channel 4 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 4, 3, 2, s32le, 96, 2000, 1, 0, 0, 4) +# PCM Media Playback pipeline 3 on PCM 2 using max 2 channels of s32le. +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 +# Use DMAC 0 channel 3 for PCM audio playback data +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 3)
# Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 diff --git a/topology/reef-hsw-rt5640.m4 b/topology/reef-hsw-rt5640.m4 index e4d9392..af18633 100644 --- a/topology/reef-hsw-rt5640.m4 +++ b/topology/reef-hsw-rt5640.m4 @@ -40,14 +40,14 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-playback.m4, 1, 0, 2, s32le, 48, 1000, 0, PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0, 0, 2)
# PCM Media Playback pipeline 3 on PCM 2 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 # Use DMAC 0 channel 3 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 96, 2000, 1, 0, 0, 3) +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 3)
# PCM Media Playback pipeline 4 on PCM 3 using max 2 channels of s32le. -# Schedule 96 frames per 2000us deadline on core 0 with priority 1 -# Use DMAC 0 channel 4 for PCM audio playback data -PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 4, 3, 2, s32le, 96, 2000, 1, 0, 0, 4) +# Schedule 192 frames per 4000us deadline on core 0 with priority 1 +# Use DMAC 0 channel 3 for PCM audio playback data +PIPELINE_PCM_ADD(sof/pipe-pcm-media.m4, 3, 2, 2, s32le, 192, 4000, 1, 0, 0, 4)
# Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 diff --git a/topology/sof/pipe-pcm-media.m4 b/topology/sof/pipe-pcm-media.m4 index bde9dd2..97958cd 100644 --- a/topology/sof/pipe-pcm-media.m4 +++ b/topology/sof/pipe-pcm-media.m4 @@ -73,12 +73,14 @@ W_PGA(0, PCM PCM_ID Playback Volume, PIPELINE_FORMAT, 2, 2, 2) # "SRC 0" has 2 sink and source periods. W_SRC(0, PIPELINE_FORMAT, 2, 2, media_src_conf, 2)
-# Media Buffers -W_BUFFER(0, COMP_BUFFER_SIZE(2, +# Media Source Buffers to SRC, make them big enough to deal with 2 * rate. +W_BUFFER(0, COMP_BUFFER_SIZE(4, COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES)) -W_BUFFER(1,COMP_BUFFER_SIZE(2, +W_BUFFER(1,COMP_BUFFER_SIZE(4, COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES)) -W_BUFFER(2, COMP_BUFFER_SIZE(2, + +# Buffer B2 is on fixed rate sink side of SRC. Set it 1.5 * rate. +W_BUFFER(2, COMP_BUFFER_SIZE(3, COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, SCHEDULE_FRAMES))
#