[Sound-open-firmware] [PATCH] rmbox: Add EQs, SRC and Tone components to trace output
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- rmbox/rmbox.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
diff --git a/rmbox/rmbox.c b/rmbox/rmbox.c index 83d3c6e..1ea7835 100644 --- a/rmbox/rmbox.c +++ b/rmbox/rmbox.c @@ -38,6 +38,10 @@ #define TRACE_CLASS_VOLUME (14 << 24) #define TRACE_CLASS_SWITCH (15 << 24) #define TRACE_CLASS_MUX (16 << 24) +#define TRACE_CLASS_SRC (17 << 24) +#define TRACE_CLASS_TONE (18 << 24) +#define TRACE_CLASS_EQ_FIR (19 << 24) +#define TRACE_CLASS_EQ_IIR (20 << 24)
#define MAILBOX_HOST_OFFSET 0x144000
@@ -146,6 +150,14 @@ static void show_trace(uint32_t val, uint32_t addr, uint32_t *timestamp, uint32_ trace = "switch"; else if (class == TRACE_CLASS_MUX) trace = "mux"; + else if (class == TRACE_CLASS_SRC) + trace = "src"; + else if (class == TRACE_CLASS_TONE) + trace = "tone"; + else if (class == TRACE_CLASS_EQ_FIR) + trace = "eq-fir"; + else if (class == TRACE_CLASS_EQ_IIR) + trace = "eq-iir"; else { printf("value 0x%8.8x\n", (uint32_t)val); return;
Add a simple passthrough and a passthrough with volume.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- topology/test/passthrough-24bit-48k-ssp2.m4 | 54 ++++++++++++++++++++++++ topology/test/passthrough-vol-24bit-48k-ssp2.m4 | 55 +++++++++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 topology/test/passthrough-24bit-48k-ssp2.m4 create mode 100644 topology/test/passthrough-vol-24bit-48k-ssp2.m4
diff --git a/topology/test/passthrough-24bit-48k-ssp2.m4 b/topology/test/passthrough-24bit-48k-ssp2.m4 new file mode 100644 index 0000000..9b9919d --- /dev/null +++ b/topology/test/passthrough-24bit-48k-ssp2.m4 @@ -0,0 +1,54 @@ +# +# Topology for pass through pipeline +# + +# Include topology builder +include(`local.m4') +include(`build.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Baytrail DSP configuration +include(`dsps/byt.m4') + +# +# Machine Specific Config - !! MUST BE SET TO MATCH TEST MACHINE DRIVER !! +# + +# DAI Link Name +define(`TEST_DAI_LINK_NAME', `Baytrail Audio') + +# DAI Link Stream Name +define(`TEST_DAI_LINK_STREAM_NAME', `Audio') + +# +# Define the pipeline +# +# PCM0 ----> SSP2 +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Use DMAC 0 channel 1 for PCM audio playback data + +PIPELINE_PCM_DAI_ADD(sof/pipe-passthrough-playback.m4, + 1, 0, 2, s24le, + 48, 1000, 0, 0, 0, 1, + SSP, 2, TEST_DAI_LINK_STREAM_NAME, 2) + +# +# BE configurations - overrides config in ACPI if present +# +# Clocks masters wrt codec +# +# 24bit I2S using 25bit sample conatiner on SSP2 +# +DAI_CONFIG(SSP, 2, TEST_DAI_LINK_NAME, TEST_DAI_LINK_STREAM_NAME, I2S, 24, + DAI_CLOCK(mclk, 19200000, slave), + DAI_CLOCK(bclk, 2400000, slave), + DAI_CLOCK(fsync, 48000, slave), + DAI_TDM(2, 25, 3, 3)) diff --git a/topology/test/passthrough-vol-24bit-48k-ssp2.m4 b/topology/test/passthrough-vol-24bit-48k-ssp2.m4 new file mode 100644 index 0000000..b1a0dab --- /dev/null +++ b/topology/test/passthrough-vol-24bit-48k-ssp2.m4 @@ -0,0 +1,55 @@ +# +# Topology for pass through pipeline +# + +# Include topology builder +include(`local.m4') +include(`build.m4') + +# Include TLV library +include(`common/tlv.m4') + +# Include Token library +include(`sof/tokens.m4') + +# Include Baytrail DSP configuration +include(`dsps/byt.m4') + +# +# Machine Specific Config - !! MUST BE SET TO MATCH TEST MACHINE DRIVER !! +# + +# DAI Link Name +define(`TEST_DAI_LINK_NAME', `Baytrail Audio') + +# DAI Link Stream Name +define(`TEST_DAI_LINK_STREAM_NAME', `Audio') + + +# +# Define the pipeline +# +# PCM0 ---> volume ---> SSP2 +# + +# Low Latency playback pipeline 1 on PCM 0 using max 2 channels of s24le. +# Schedule 48 frames per 1000us deadline on core 0 with priority 0 +# Use DMAC 0 channel 1 for PCM audio playback data + +PIPELINE_PCM_DAI_ADD(sof/pipe-passthrough-vol-playback.m4, + 1, 0, 2, s24le, + 48, 1000, 0, 0, 0, 1, + SSP, 2, TEST_DAI_LINK_STREAM_NAME, s24le, 2) + +# +# BE configurations - overrides config in ACPI if present +# +# Clocks masters wrt codec +# +# 24bit I2S using 25bit sample conatiner on SSP2 +# +DAI_CONFIG(SSP, 2, TEST_DAI_LINK_NAME, TEST_DAI_LINK_STREAM_NAME, I2S, 24, + DAI_CLOCK(mclk, 19200000, slave), + DAI_CLOCK(bclk, 2400000, slave), + DAI_CLOCK(fsync, 48000, slave), + DAI_TDM(2, 25, 3, 3))
SRC in default full rate and high quality configuration is quite large. free up some memory on BYT and CHT by using only one SRC.
TODO: Provide the SRC with configuration data for supported rates and quality in order to significantly reduce it's footprint.
Signed-off-by: Liam Girdwood liam.r.girdwood@linux.intel.com --- topology/reef-byt-nocodec.m4 | 9 --------- topology/reef-byt-rt5640.m4 | 9 --------- topology/reef-byt-rt5651.m4 | 18 +++++------------- topology/reef-cht-nocodec.m4 | 9 --------- 4 files changed, 5 insertions(+), 40 deletions(-)
diff --git a/topology/reef-byt-nocodec.m4 b/topology/reef-byt-nocodec.m4 index 96e2e4b..01b223d 100644 --- a/topology/reef-byt-nocodec.m4 +++ b/topology/reef-byt-nocodec.m4 @@ -22,8 +22,6 @@ include(`dsps/byt.m4') # |--low latency mixer ----> volume ----> SSP2 # PCM2 ----> SRC -----> volume ----+ # | -# PCM3 ----> SRC -----> volume ----+ -# | # Tone -----> volume ----+ # # PCM1 <---- Volume <---- SSP2 @@ -44,11 +42,6 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0 # 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)
-# 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) - # Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 PIPELINE_ADD(sof/pipe-tone.m4, 5, 2, s32le, 192, 4000, 2, 0) @@ -60,8 +53,6 @@ SectionGraph."pipe-byt-nocodec" { lines [ # media 0 dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) - # media 1 - dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_4) #tone dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_5) ] diff --git a/topology/reef-byt-rt5640.m4 b/topology/reef-byt-rt5640.m4 index c135fed..00d31c7 100644 --- a/topology/reef-byt-rt5640.m4 +++ b/topology/reef-byt-rt5640.m4 @@ -22,8 +22,6 @@ include(`dsps/byt.m4') # |--low latency mixer ----> volume ----> SSP2 # PCM2 ----> SRC -----> volume ----+ # | -# PCM3 ----> SRC -----> volume ----+ -# | # Tone -----> volume ----+ # # PCM1 <---- Volume <---- SSP2 @@ -44,11 +42,6 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0 # 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)
-# 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) - # Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 PIPELINE_ADD(sof/pipe-tone.m4, 5, 2, s32le, 192, 4000, 2, 0) @@ -60,8 +53,6 @@ SectionGraph."pipe-byt-rt5640" { lines [ # media 0 dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) - # media 1 - dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_4) #tone dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_5) ] diff --git a/topology/reef-byt-rt5651.m4 b/topology/reef-byt-rt5651.m4 index 877492a..fd5263f 100644 --- a/topology/reef-byt-rt5651.m4 +++ b/topology/reef-byt-rt5651.m4 @@ -22,8 +22,6 @@ include(`dsps/byt.m4') # |--low latency mixer ----> volume ----> SSP2 # PCM2 ----> SRC -----> volume ----+ # | -# PCM3 ----> SRC -----> volume ----+ -# | # Tone -----> volume ----+ # # PCM1 <---- Volume <---- SSP2 @@ -44,11 +42,6 @@ PIPELINE_PCM_ADD(sof/pipe-low-latency-capture.m4, 2, 1, 2, s32le, 48, 1000, 0, 0 # 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)
-# 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) - # Tone Playback pipeline 5 using max 2 channels of s32le. # Schedule 192 frames per 4000us deadline on core 0 with priority 2 PIPELINE_ADD(sof/pipe-tone.m4, 5, 2, s32le, 192, 4000, 2, 0) @@ -60,8 +53,6 @@ SectionGraph."pipe-byt-rt5651" { lines [ # media 0 dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) - # media 1 - dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_4) #tone dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_5) ] @@ -73,11 +64,11 @@ SectionGraph."pipe-byt-rt5651" { # SSP port 2 is our only pipeline DAI #
-# playback DAI is SSP2 using I2S DAPM stream and 2 periods -DAI_ADD(sof/pipe-dai-playback.m4, SSP, 2, I2S, PIPELINE_SOURCE_1, 2) +# playback DAI is SSP2 using "Audio" DAPM stream name and 2 periods +DAI_ADD(sof/pipe-dai-playback.m4, SSP, 2, Audio, PIPELINE_SOURCE_1, 2)
-# capture DAI is SSP2 using I2S DAPM stream and 2 periods -DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, I2S, PIPELINE_SINK_2, 2) +# capture DAI is SSP2 using "Audio" DAPM stream name and 2 periods +DAI_ADD(sof/pipe-dai-capture.m4, SSP, 2, Audio, PIPELINE_SINK_2, 2)
# # BE configurations - overrides config in ACPI if present @@ -87,3 +78,4 @@ DAI_CONFIG(SSP, 2, Baytrail Audio, Audio, I2S, 24, DAI_CLOCK(bclk, 2400000, slave), DAI_CLOCK(fsync, 48000, slave), DAI_TDM(2, 25, 3, 3)) + diff --git a/topology/reef-cht-nocodec.m4 b/topology/reef-cht-nocodec.m4 index 381ff12..334443b 100644 --- a/topology/reef-cht-nocodec.m4 +++ b/topology/reef-cht-nocodec.m4 @@ -22,8 +22,6 @@ include(`dsps/cht.m4') # |--low latency mixer ----> volume ----> SSP2 # PCM2 ----> SRC -----> volume ----+ # | -# PCM3 ----> SRC -----> volume ----+ -# | # Tone -----> volume ----+ # # PCM1 <---- Volume <---- SSP2 @@ -39,11 +37,6 @@ 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 3 on PCM 2 using max 2 channels of s32le. -# Schedule 96 frames per 2000us 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) - # 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 @@ -60,8 +53,6 @@ SectionGraph."pipe-cht-nocodec" { lines [ # media 0 dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_3) - # media 1 - dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_4) #tone dapm(PIPELINE_MIXER_1, PIPELINE_SOURCE_5) ]
participants (1)
-
Liam Girdwood