Repository navigation
Up2 with nocodec topology: DSP panic with 6 SSPs #253
Copy link
Copy link
Closed
Labels
P1Blocker bugs or important featuresBlocker bugs or important featuresbugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already existsfirmwareProved to be a firmware issueProved to be a firmware issue
Description
With the usual 6 SSP+1DMIC topology the DSP panics. When the SSP5 is commented out from the topology file things work fine.
I suspect an off-by-one error. Filing as a kernel bug for now but this is more of a firmware issue I suspect.
Differences in the topology file to make things work:
diff --git a/topology/sof-apl-nocodec.m4 b/topology/sof-apl-nocodec.m4
index 2a99560..711589f 100644
--- a/topology/sof-apl-nocodec.m4
+++ b/topology/sof-apl-nocodec.m4
@@ -100,17 +100,17 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
10, 4, 2, s16le,
48, 1000, 0, 0)
-# Low Latency playback pipeline 11 on PCM 5 using max 2 channels of s16le.
-# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
- 11, 5, 2, s16le,
- 48, 1000, 0, 0)
-
-# Low Latency capture pipeline 12 on PCM 5 using max 2 channels of s16le.
-# Schedule 48 frames per 1000us deadline on core 0 with priority 0
-PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
- 12, 5, 2, s16le,
- 48, 1000, 0, 0)
+# # Low Latency playback pipeline 11 on PCM 5 using max 2 channels of s16le.
+# # Schedule 48 frames per 1000us deadline on core 0 with priority 0
+# PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
+# 11, 5, 2, s16le,
+# 48, 1000, 0, 0)
+
+# # Low Latency capture pipeline 12 on PCM 5 using max 2 channels of s16le.
+# # Schedule 48 frames per 1000us deadline on core 0 with priority 0
+# PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
+# 12, 5, 2, s16le,
+# 48, 1000, 0, 0)
# Passthrough capture pipeline 13 on PCM 6 using max 2 channels.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
@@ -197,26 +197,26 @@ DAI_ADD(sof/pipe-dai-capture.m4,
PIPELINE_SINK_10, 2, s16le,
48, 1000, 0, 0)
-# playback DAI is SSP5 using 2 periods
-# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
-DAI_ADD(sof/pipe-dai-playback.m4,
- 11, SSP, 5, NoCodec-5,
- PIPELINE_SOURCE_11, 2, s16le,
- 48, 1000, 0, 0)
-
-# capture DAI is SSP5 using 2 periods
-# Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
-DAI_ADD(sof/pipe-dai-capture.m4,
- 12, SSP, 5, NoCodec-5,
- PIPELINE_SINK_12, 2, s16le,
- 48, 1000, 0, 0)
-
-# capture DAI is DMIC 0 using 2 periods
-# Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
-DAI_ADD(sof/pipe-dai-capture.m4,
- 13, DMIC, 0, NoCodec-6,
- PIPELINE_SINK_13, 2, s32le,
- 48, 1000, 0, 0)
+# # playback DAI is SSP5 using 2 periods
+# # Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
+# DAI_ADD(sof/pipe-dai-playback.m4,
+# 11, SSP, 5, NoCodec-5,
+# PIPELINE_SOURCE_11, 2, s16le,
+# 48, 1000, 0, 0)
+
+# # capture DAI is SSP5 using 2 periods
+# # Buffers use s16le format, with 48 frame per 1000us on core 0 with priority 0
+# DAI_ADD(sof/pipe-dai-capture.m4,
+# 12, SSP, 5, NoCodec-5,
+# PIPELINE_SINK_12, 2, s16le,
+# 48, 1000, 0, 0)
+
+# # capture DAI is DMIC 0 using 2 periods
+# # Buffers use s32le format, with 48 frame per 1000us on core 0 with priority 0
+# DAI_ADD(sof/pipe-dai-capture.m4,
+# 13, DMIC, 0, NoCodec-6,
+# PIPELINE_SINK_13, 2, s32le,
+# 48, 1000, 0, 0)
dnl PCM_DUPLEX_ADD(name, pcm_id, playback, capture)
PCM_DUPLEX_ADD(Port0, 0, PIPELINE_PCM_1, PIPELINE_PCM_2)
@@ -224,7 +224,7 @@ PCM_DUPLEX_ADD(Port1, 1, PIPELINE_PCM_3, PIPELINE_PCM_4)
PCM_DUPLEX_ADD(Port2, 2, PIPELINE_PCM_5, PIPELINE_PCM_6)
PCM_DUPLEX_ADD(Port3, 3, PIPELINE_PCM_7, PIPELINE_PCM_8)
PCM_DUPLEX_ADD(Port4, 4, PIPELINE_PCM_9, PIPELINE_PCM_10)
-PCM_DUPLEX_ADD(Port5, 5, PIPELINE_PCM_11, PIPELINE_PCM_12)
+#PCM_DUPLEX_ADD(Port5, 5, PIPELINE_PCM_11, PIPELINE_PCM_12)
dnl PCM_CAPTURE_ADD(name, pipeline, capture)
PCM_CAPTURE_ADD(DMIC01, 6, PIPELINE_PCM_13)
@@ -270,12 +270,12 @@ DAI_CONFIG(SSP, 4, 4, NoCodec-4,
SSP_TDM(2, 16, 3, 3),
SSP_CONFIG_DATA(SSP, 4, 16)))
-DAI_CONFIG(SSP, 5, 5, NoCodec-5,
- SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in),
- SSP_CLOCK(bclk, 1536000, codec_slave),
- SSP_CLOCK(fsync, 48000, codec_slave),
- SSP_TDM(2, 16, 3, 3),
- SSP_CONFIG_DATA(SSP, 5, 16)))
+# DAI_CONFIG(SSP, 5, 5, NoCodec-5,
+# SSP_CONFIG(I2S, SSP_CLOCK(mclk, 24576000, codec_mclk_in),
+# SSP_CLOCK(bclk, 1536000, codec_slave),
+# SSP_CLOCK(fsync, 48000, codec_slave),
+# SSP_TDM(2, 16, 3, 3),
+# SSP_CONFIG_DATA(SSP, 5, 16)))
DAI_CONFIG(DMIC, 0, 6, NoCodec-6,
dnl DMIC_CONFIG(driver_version, clk_min, clk_mac, duty_min, duty_max,
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Blocker bugs or important featuresBlocker bugs or important featuresbugSomething isn't workingSomething isn't workingduplicateThis issue or pull request already existsThis issue or pull request already existsfirmwareProved to be a firmware issueProved to be a firmware issue
Activity
plbossart commentedon Nov 7, 2018
dmesg log excerpt
Full log here:
dmesg_ssp5_fail.log
keyonjie commentedon Nov 8, 2018
@plbossart I think @libinyang is working on a similar issue.
@libinyang can you help comment?
libinyang commentedon Nov 8, 2018
@plbossart @keyonjie
I think this should be the similar issue of thesofproject/sof#539
I'm working on #539 in sof repo. And I have PR for SOF: thesofproject/sof#541 to fix such issue.
The issue is caused by initializing memory heap incorrectly. This will cause some memory related potential issues.
plbossart commentedon Nov 8, 2018
@libinyang yes the problem goes away with your fix
However @ranj063 I now have a DMIC IPC issue that appears with your DMIC alloc fix in the firmware, can you look at the topology for the nocodec case? Looks like we fix GLK but broke the rest...
dmesg log with Libin's PR541+sof-apl-nocodec.m4 topology:
if I take out the DMIC from the topology things are just fine. How many engineers does it take to fix memory allocation....
libinyang commentedon Nov 8, 2018
@plbossart @ranj063
The later bug can be fixed by:
thesofproject/sof#549
However, 549 must be applied after 541 because if the memory heap initialization issue is not fixed, the system is unstable for memory mapping changing, and many potential issues may occur.
mengdonglin commentedon Nov 8, 2018
This is a duplicate of thesofproject/sof#539, and Libin has a PR to fix it
libinyang commentedon Nov 9, 2018
@stevyan
This bug should be fixed with the latest SOF with PR thesofproject/sof#541 and thesofproject/sof#549. Could you please verify?
@plbossart
markyang commentedon Nov 12, 2018
Summary:
This issue cannot be reproduced on UP2 any more.
Test env:
sof master: 5838f71
sof tool: 2cd668c
kernel sof-dev: 9b81e16
tplg: sof-apl-nocodec.tplg-2cd668c
Merge pull request thesofproject#253 from dswij/cigrep
mac80211: Drop frames from invalid MAC address in ad-hoc mode
Revert "powerpc/irq: Don't open code irq_soft_mask helpers"
netfilter: nf_tables: deactivate anonymous set from preparation phase
selftest/bpf: Add various selftests for program limits
selftests/bpf: Test bpf_mprog query API via libbpf and raw syscall
selftests/bpf: Test query on empty mprog and pass revision into attach
selftests/bpf: Add test for detachment on empty mprog entry
selftests/bpf: Add various more tcx test cases
selftests/bpf: Add additional mprog query test coverage