Repository navigation
[BUG][BYT]Ipc error 0X60010000 size 20 when try speaker test on media playback #2379
Copy link
Copy link
Closed
Labels
BYTApplies to Baytrail platformApplies to Baytrail platformP3Low-impact bugs or featuresLow-impact bugs or featuresSRCApplies to SRCApplies to SRCbugSomething isn't working as expectedSomething isn't working as expectedwon't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)This will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
Description
Describe the bug
Ipc error 0X60010000 size 20 when try speaker test on media playback.
When issue occur, try aplay will occur I/O error, and only reboot can back it to normal.
To Reproduce
1.Reboot via "sudo reboot"
2.Speaker test via "speaker-test -Dhw:0,1 -r48000 -f1000 -c2 -t wav -l 10"
Reproduction Rate
5/5
Expected behavior
No error occur, and speaker test output normal
Impact
Occur ipc error
Environment
Platform: BYT with codec RT5682 in I2S mode
Firmware: 7e88cc0 https://github.com/thesofproject/sof/commits/master
Kernel: f19d23b https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: file: tools/topology/sof-byt-rt5682.tplg same as firmware
Dmesg
[ 34.692088] sof-audio-acpi 80860F28:01: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 35.162449] rfkill: input handler disabled
[ 3266.777104] sof-audio-acpi 80860F28:01: pcm: open stream 1 dir 0
[ 3266.777121] sof-audio-acpi 80860F28:01: period min 192 max 262144 bytes
[ 3266.777131] sof-audio-acpi 80860F28:01: period count 2 max 32
[ 3266.777140] sof-audio-acpi 80860F28:01: buffer max 8388608 bytes
[ 3266.785320] sof-audio-acpi 80860F28:01: rate_min: 48000 rate_max: 48000
[ 3266.785336] sof-audio-acpi 80860F28:01: channels_min: 2 channels_max: 2
[ 3266.785376] sof-audio-acpi 80860F28:01: rate_min: 48000 rate_max: 48000
[ 3266.785386] sof-audio-acpi 80860F28:01: channels_min: 2 channels_max: 2
[ 3266.785405] sof-audio-acpi 80860F28:01: rate_min: 48000 rate_max: 48000
[ 3266.785414] sof-audio-acpi 80860F28:01: channels_min: 2 channels_max: 2
[ 3266.785432] sof-audio-acpi 80860F28:01: pcm: hw params stream 1 dir 0
[ 3266.785448] sof-audio-acpi 80860F28:01: generating page table for 00000000f5e0b3a5 size 0x7ff800 pages 2048
[ 3266.785511] sof-audio-acpi 80860F28:01: stream_tag 0
[ 3266.785532] sof-audio-acpi 80860F28:01: ipc tx: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
[ 3266.785847] sof-audio-acpi 80860F28:01: error: ipc error for 0x60010000 size 20
[ 3266.785868] sof-audio-acpi 80860F28:01: error: hw params ipc failed for stream 0
[ 3266.785883] sof-audio-acpi 80860F28:01: ASoC: 80860F28:01 hw params failed: -12
[ 3266.785897] Media Playback 1: ASoC: hw_params FE failed -12
[ 3266.785919] sof-audio-acpi 80860F28:01: pcm: free stream 1 dir 0
[ 3266.787236] sof-audio-acpi 80860F28:01: pcm: close stream 1 dir 0
[ 3267.000850] sof-audio-acpi 80860F28:01: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 3267.000877] sof-audio-acpi 80860F28:01: ipc rx done: 0x90020000: GLB_TRACE_MSG
logger-error-trace
CORE LEVEL COMP_ID TIMESTAMP DELTA FILE_NAME CONTENT
0 1 IPC 3265971510.208333 nan pc/ipc-host-ptable.c:163 ipc: parse descriptors failed -12
Metadata
Metadata
Assignees
Labels
BYTApplies to Baytrail platformApplies to Baytrail platformP3Low-impact bugs or featuresLow-impact bugs or featuresSRCApplies to SRCApplies to SRCbugSomething isn't working as expectedSomething isn't working as expectedwon't fixThis will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)This will not be worked on atm (e.g. a bug closed for lack of user request, hardware etc)
Activity
dengyangchao commentedon Feb 13, 2020
Old issue, can run speaker test on HW:0,0 and output normal
when run on HW:0,1(media playback) cause ipc error
dengyangchao commentedon Feb 17, 2020
Issue also can be reproduced on BYT Nocodec
[-][BUG][BYT][RT5682]Ipc error 0X60010000 size 20 when try speaker test on media playback[/-][+][BUG][BYT]Ipc error 0X60010000 size 20 when try speaker test on media playback[/+]slawblauciak commentedon Feb 18, 2020
Is this a regression?
lgirdwood commentedon Feb 18, 2020
Duplicate of #2400 ?
dengyangchao commentedon Feb 19, 2020
@lgirdwood This issue is different with #2400 , found it when do speaker-test front left and front right on pipeline media playback
lgirdwood commentedon Feb 19, 2020
@dengyangchao there is no memory to allocate page descriptors ?
caused here
@mengdonglin can you assign - we need to also add an error trace message here too. The is no heap free with this block size.
ClarexZhou commentedon Mar 5, 2020
@xiulipan will add an error trace message
xiulipan commentedon Mar 5, 2020
@lgirdwood PR send #2487
Log dump on one BYT with speaker test
The issue seems to be the max buffer size 2096640 too big. Can also reproduce by following aplay.
@singalsu @tlauda Is it OK for us to have such big
BUFFER_SIZE BUFFER_TIME BUFFER_BYTESwith SRC comp?Normal volume pipeline hw params
lgirdwood commentedon Mar 5, 2020
@xiulipan we may need to factor this into the BYT topologies as max buffer size. I dont think we have use case for deep buffering on BYT yet as we could work out the elems on the fly when needed (i.e. no pre-alloc and calc of elems).
mengdonglin commentedon Mar 6, 2020
@singalsu Please help to remove SRC pipeline from BYT topology. Thanks
6 remaining items
lgirdwood commentedon Mar 16, 2020
@singalsu yes, please send a PR that reduces SRC to just 8/16/32/48 on BYT, CHT. It would also be good to put something in the Kconfig SRC help to state assumption on memory sizes and as an example 44.1kHz would not easily fit in BYT unless other baisc features were removed. Thanks.
@mengdonglin This can be closed after @singalsu has submitted his PR.
singalsu commentedon Mar 16, 2020
A fix proposal is in PR #2555. The 44.1 kHz playback still works but everything above 48 kHz is removed. Playback works on my T100 now. With git master it didn't work. Can you @dengyangchao please test with this PR if it helps!
dengyangchao commentedon Mar 17, 2020
@singalsu Since #2555 merged, tried with master df6c637.
No error observed on HW:0,0(low latency), found ipc error on HW:0,1(media playback) when try speaker-test
48K in media playback(HW:0,1):
48000-speaker-test-dmesg.log
44.1K in media playback(HW:0,1):
44100-speaker-test-dmesg.log
Also used command" aplay -Dhw:0,1 --dump -hw-params /dev/zero" to check the media parameter
it seems #2555 don't change it.
after-applied-2555.txt
didn't applies 2555.txt
singalsu commentedon Mar 17, 2020
I get the same error with speaker-test. It doesn't look like firmware issue, nothing abnormal in the sof-logger output. There's even a kernel crash happening sometime after the IPC error.
lgirdwood commentedon Mar 17, 2020
@singalsu can you log the kernel crash.
dengyangchao commentedon Mar 18, 2020
Set buffer size to 2096640, then aplay via comand"aplay -Dhw:0,1 -f dat /dev/zero -vvv -i --buffer-size=2096640 --dump-hw-params"
occur same ipc error
Also tried to set buffer size to 64K/32K/16K through below commands, it work well, no error occur.
aplay -Dhw:0,1 -f dat /dev/zero -vvv -i --buffer-size=64000 --dump-hw-params
aplay -Dhw:0,1 -f dat /dev/zero -vvv -i --buffer-size=32000 --dump-hw-params
aplay -Dhw:0,1 -f dat /dev/zero -vvv -i --buffer-size=16000 --dump-hw-params
dmesg-16k.log
dmesg-32k.log
dmesg-64k.log
dmesg-2096640.log
singalsu commentedon Mar 18, 2020
This kernel is not new (edit: build Jan 8 2020) but here's the dmesg. I'll install new kernel and see what happens.
The illegal PCM buffer for media PCM is from not using the stock macros for creating the pipeline. There's a lot of this pipeline specific things in the macro and it has not been cleaned up like other topologies with new nicer macros for parameters. I can see if I manage to set the buffer max. properly.
singalsu commentedon Mar 18, 2020
@lgirdwood No more kernel crash with today's topic/sof-dev kernel.
singalsu commentedon Mar 18, 2020
I'll do a PR, speaker-test with 48k works, need to adjust still for 44.1k to work too...
singalsu commentedon Mar 18, 2020
The PR is #2574 . I just noticed that speaker-test can't be used with "-t wav" with different "-r" than the supplied "speaker left, speaker right" wav clip 48 kHz. Option "-f 997 -t sine" works for any "-r".
dengyangchao commentedon Mar 19, 2020
After applied #2574 , below commands can work well, issue can't be reproduced.
If use command "speaker-test -Dhw:0,1 -r44100 -f1000 -c2 -t wav -l 10" it shows sample rate doesn't match, no error message.
singalsu commentedon Mar 19, 2020
Yep, that looks like a bug in speaker-test. It should resample the wav clip or issue an error if "-r" is given with -"t wav".
It's a good idea to replace 1 kHz sine wave tests with 997 Hz. 997 is prime number so it won't repeat the same PCM code values as 1 kHz would and possibly hide buffering errors.
singalsu commentedon Mar 20, 2020
PR #2574 is merged so we can close this issue.