Repository navigation
[Regression][BYT][rt5651]: 'ipc timed out for 0x60050000' after aplay music at the 2nd time #873
Copy link
Copy link
Closed
thesofproject/sof
#1451Labels
BYTApplies to Baytrail platformApplies to Baytrail platformIPC timeoutIPC timeout observedIPC timeout observedbugSomething isn't workingSomething isn't working
Description
Summary
'ipc timed out for 0x60050000' after aplay music at the 2nd time, it caused by PR #849 (a1043e8).
To reproduce
aplay -Dhw:0,0 -f dat /dev/zero- interrupt playback via 'ctrl + c'
- play again with
aplay -Dhw:0,0 -f dat /dev/zero
Actual Result
aplay: set_params:1363: Unable to install hw params:
Playback cannot be recovered when error occurred until reboot device.
Test Recipe
date: 2019-04-26
sof (master): 6a84b4e
linux (topic/sof-dev): f7e9d4a
topology: sof-byt-rt5651.tplg
dmesg log
[ 70.336849] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.336877] sof-audio-acpi 80860F28:01: posn : host 0xb1c0 dai 0x255680 wall 0x74acc09
[ 70.336896] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.336925] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 11376 DAI position 611744
[ 70.422258] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.422291] sof-audio-acpi 80860F28:01: posn : host 0xf180 dai 0x25d600 wall 0x763b33d
[ 70.422316] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.422354] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 15456 DAI position 619904
[ 70.506909] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.506935] sof-audio-acpi 80860F28:01: posn : host 0x3180 dai 0x265580 wall 0x77c9a0f
[ 70.506953] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.506983] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 3168 DAI position 628064
[ 70.592330] sof-audio-acpi 80860F28:01: ipc rx: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.592370] sof-audio-acpi 80860F28:01: posn : host 0x7140 dai 0x26d500 wall 0x795813d
[ 70.592400] sof-audio-acpi 80860F28:01: ipc rx done: 0x600a0001: GLB_STREAM_MSG: POSITION
[ 70.592448] sof-audio-acpi 80860F28:01: PCM: stream 0 dir 0 DMA position 7248 DAI position 636224
[ 70.592468] sof-audio-acpi 80860F28:01: pcm: trigger stream 0 dir 0 cmd 0
[ 70.592483] sof-audio-acpi 80860F28:01: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 70.899113] sof-audio-acpi 80860F28:01: error: ipc timed out for 0x60050000 size 12
[ 70.899180] sof-audio-acpi 80860F28:01: error: unexpected fault 0x600a0001 trace 0x60050000
[ 70.899198] sof-audio-acpi 80860F28:01: error: waking up any trace sleepers
[ 70.899212] Low Latency: ASoC: trigger FE failed -110
[ 70.899429] sof-audio-acpi 80860F28:01: pcm: free stream 0 dir 0
[ 70.899446] sof-audio-acpi 80860F28:01: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 71.203158] sof-audio-acpi 80860F28:01: error: ipc timed out for 0x60030000 size 12
[ 71.203236] sof-audio-acpi 80860F28:01: error: unexpected fault 0x600a0001 trace 0x60030000
[ 71.203250] sof-audio-acpi 80860F28:01: error: waking up any trace sleepers
[ 71.203395] sof-audio-acpi 80860F28:01: pcm: close stream 0 dir 0
[ 72.437287] sof-audio-acpi 80860F28:01: pcm: open stream 0 dir 0
[ 72.437293] sof-audio-acpi 80860F28:01: period min 192 max 16384 bytes
[ 72.437296] sof-audio-acpi 80860F28:01: period count 2 max 16
[ 72.437299] sof-audio-acpi 80860F28:01: buffer max 65536 bytes
[ 72.437607] sof-audio-acpi 80860F28:01: rate_min: 48000 rate_max: 48000
[ 72.437611] sof-audio-acpi 80860F28:01: channels_min: 2 channels_max: 2
[ 72.437616] sof-audio-acpi 80860F28:01: rate_min: 48000 rate_max: 48000
[ 72.437619] sof-audio-acpi 80860F28:01: channels_min: 2 channels_max: 2
[ 72.437628] sof-audio-acpi 80860F28:01: rate_min: 48000 rate_max: 48000
[ 72.437631] sof-audio-acpi 80860F28:01: channels_min: 2 channels_max: 2
[ 72.437636] sof-audio-acpi 80860F28:01: pcm: hw params stream 0 dir 0
[ 72.437641] sof-audio-acpi 80860F28:01: generating page table for 0000000050e66b71 size 0xffc0 pages 16
[ 72.437644] sof-audio-acpi 80860F28:01: stream_tag 0
[ 72.437653] sof-audio-acpi 80860F28:01: ipc tx: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[ 72.739120] sof-audio-acpi 80860F28:01: error: ipc timed out for 0x60010000 size 108
[ 72.739198] sof-audio-acpi 80860F28:01: error: unexpected fault 0x600a0001 trace 0x60010000
[ 72.739212] sof-audio-acpi 80860F28:01: error: waking up any trace sleepers
[ 72.739228] sof-audio-acpi 80860F28:01: error: hw params ipc failed for stream 0
[ 72.739245] sof-audio-acpi 80860F28:01: ASoC: 80860F28:01 hw params failed: -110
[ 72.739261] Low Latency: ASoC: hw_params FE failed -110
[ 72.739291] sof-audio-acpi 80860F28:01: pcm: free stream 0 dir 0
[ 72.739307] sof-audio-acpi 80860F28:01: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 73.043143] sof-audio-acpi 80860F28:01: error: ipc timed out for 0x60030000 size 12
[ 73.043221] sof-audio-acpi 80860F28:01: error: unexpected fault 0x600a0001 trace 0x60030000
[ 73.043235] sof-audio-acpi 80860F28:01: error: waking up any trace sleepers
[ 73.044529] sof-audio-acpi 80860F28:01: pcm: close stream 0 dir 0
Reactions are currently unavailable
Metadata
Metadata
Labels
BYTApplies to Baytrail platformApplies to Baytrail platformIPC timeoutIPC timeout observedIPC timeout observedbugSomething isn't workingSomething isn't working
Activity
keyonjie commentedon Apr 26, 2019
Hi @stevyan can you paste the sof-logger logs also please?
stevyan commentedon Apr 26, 2019
ipc_error-sof-logger.log
stevyan commentedon Apr 26, 2019
Another issue also caused by PR #849,
'ipc timed out for 0x60050000 | 0x60060000 | 0x60070000' after pause/resume music more than 5 times.
To reproduce
aplay -Dhw:0,0 -f dat /dev/zero -vv -iActual Result
Test Recipe
date: 2019-04-26
sof (master): 6a84b4e
linux (topic/sof-dev): f7e9d4a
topology: sof-byt-rt5651.tplg, sof-byt-nocodec.tplg
dmesg log
ipc_error.log
ipc_error-slogger.log
lyakh commentedon May 3, 2019
I'm unable to reproduce either of the two reported problems neither with nocodec nor with rt5651 with linux 3f6a2df and a recent SOF thesofproject/sof@6e4faef
@stevyan could you try to double-check with the current trees?
Jiangxinx commentedon May 6, 2019
This issue can still be reproduced on daily test.
To reproduce
1.aplay -Dhw:0,0 -f dat /dev/zero
2.ctrl + c
3.aplay again with aplay -Dhw:0,0 -f dat /dev/zero
Test Recipe
sof (master): de5bba4
linux (topic/sof-dev): 1071743
topology: sof-byt-rt5651.tplg
lyakh commentedon May 6, 2019
@Jiangxinx strange, I cannot reproduce it here so far. I'll try to check out your exact commit IDs. Is that with pulseaudio or without?
Jiangxinx commentedon May 6, 2019
@lyakh I disabled pulseaudio, by the way, this issue can be reproduced by using paplay immediately if enable pulseaudio.
lyakh commentedon May 6, 2019
@Jiangxinx what command line do you use with paplay?
Jiangxinx commentedon May 6, 2019
@lyakh Just playback audio file simply: paplay audio.wav -vvvv
6 remaining items
mrajwa commentedon May 6, 2019
@lyakh, I saw that but it doesn't say much to me. What do you mean by "bisected"?
lyakh commentedon May 6, 2019
the first mistake with KPB is, that it's built when disabled in .config, but that's simple to fix. But maybe it's good that it was like that, otherwise we wouldn't find this bug. Or is KPB not supposed to work on BYT?
lyakh commentedon May 6, 2019
@mrajwa https://git-scm.com/docs/git-bisect
mrajwa commentedon May 8, 2019
@lyakh thanks, I haven't used this git feature before. Anyway, are you sure that exactly this commit causes the timeout? It barely change samples size for internal use of KPB, I can not imagine how could it affect any IPC message. Not to mention you probably don't use KPB in your topology at all, do you?
PS: Bisect requires your judgement at the end of the day, so I feel like you spotted wrong commit.
lyakh commentedon May 9, 2019
@mrajwa no, bisect doesn't require your judgement, as long as the problem is 100% reproducible and you don't make mistakes during bisecting. Of course, such mistakes are possible, that's why usually, especially when I cannot see how the identified culprit causes the problem, I double check it: I test the tree before the identified commit and after it. So, you don't have to feel, just please, do the same - test the tree before and after that your commit.
You are right, I'm not using KPB but KPB was built unconditionally before my recent commit, so, when checking that, if you use a recent tree, including my commit thesofproject/sof#1368 you'll have to enable KPB in the SOF configuration. But otherwise you don't need any special topology or run-time treatment.
xun2z commentedon May 16, 2019
I root-caused this issue today. It seems we have some modification (2 commits) in dw-dma.c (SOF Firmware) leads to this issue. The following 2 both causes this issue.
The second one is easy to understand: we have an additional process when calling stop trigger.
So @stevyan , can you try to revert these two commits in SOF firmware and see if I'm right?
stevyan commentedon May 17, 2019
This issue isn't occurred after reverted those 2 commits over 300 aplay & arecord interrupted test;
Test Recipe
date: 2019-05-17
sof (master): f04bc83 + reverted (7275e42, 433de9f)
linux (topic/sof-dev): 2291b8c
topology: sof-byt-rt5651.tplg
lyakh commentedon May 17, 2019
@xun2z thanks for tracking those commits down! Somehow I was getting very inconsistent results with my debugging, but I managed to confirm, that indeed those two commits create problems on BYT. @tlauda have you tested those your patches on BYT? I can well see how those changes make sense "in theory" for all platforms, including BYT, but in practice we get breakage. Would you agree to revert your patch for non-CONFIG_HW_LLI platforms? Again - "in theory" this isn't the correct thing to do, because HW_LLI has nothing to do with the way interrupts are processed, but it just so happens for now, that that option is only disabled on "legacy" BYT, BDW, HSW and CHT platforms. So if we revert some parts of those your patches for non-HW_LLI, I think all the platforms will work. I'll attach a proposed diff here in a couple of hours.
tlauda commentedon May 17, 2019
@lyakh Does the following change would be OK with you?
lyakh commentedon May 17, 2019
@tlauda yes, almost, but with a bit of optimisation:
lyakh commentedon May 17, 2019
@tlauda that way the original order is preserved on all platforms:
tlauda commentedon May 17, 2019
@lyakh Looks great. Could you prepare the PR for the FW?
lyakh commentedon May 17, 2019
@tlauda yep, ready to push, just doing some basic smoke-testing on up2