Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] pipeline will interact with each other in HDA mode #854

Closed
keqiaozhang opened this issue Apr 22, 2019 · 19 comments
Closed

[BUG] pipeline will interact with each other in HDA mode #854

keqiaozhang opened this issue Apr 22, 2019 · 19 comments
Assignees
Labels
bug Something isn't working duplicate This issue or pull request already exists GLK Applies to Gemini Lake WHL Applies to WhiskeyLake platform

Comments

@keqiaozhang
Copy link
Collaborator

keqiaozhang commented Apr 22, 2019

Describe the bug
This issue can occur when 2 pipeline playback are running in different terminals, terminating one of them will cause another pipeline stop with I/O error.

To Reproduce

  1. open two terminals and do playback on each terminal with different pcm device.
    terminal 1 headset playback: aplay -Dhw:0,0 -f dat -c 2 audio.wav
    terminal 2 HDMI playback: aplay -Dhw:0,2 -f dat -c 2 audio.wav
  2. press ctl+c to stop HDMI playback, then check the status of the another one.
  3. At least use one HDA pcm device to do the playback.

Expected behavior
no interaction between each pipeline.

Impact
terminating one of them will cause another pipeline stop with I/O error.

Environment

  1. sof-master: 0c9326
  2. tplg: sof-whl-rt5682.tplg
  3. kernel-sof-dev: 90860
  4. platform: WHL-I2S
  5. Reproducibility Rate: 100%

Screenshots or console output
$ aplay -Dhw:0,0 -f dat -c 2 test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
underrun!!! (at least 0.047 ms long)
aplay: pcm_write:2011: write error: Input/output error

dmesg
no observes errors.

sof-logger

 CORE  LEVEL      COMP_ID                TIMESTAMP            DELTA                FILE_NAME    CONTENT
    0      1       VOLUME          27044583.385417  27044584.000000   src/audio/volume.c:465    volume_copy() error: source component buffer has not enough data available
    0      1         PIPE          27044804.479167       221.093750 src/audio/pipeline.c:681    pipeline_copy() error: ret = -5, start->comp.id = 1, dir = 1
    0      1         PIPE 1.5      27044811.041667         6.562500 src/audio/pipeline.c:789    pipeline_xrun_recover()
    0      1          DMA          27045177.395833       366.354156 intel/cavs/hda-dma.c:279    hda-dmac: 5 wait for buffer full timeout
    0      1         HOST          27045183.958333         6.562500     src/audio/host.c:792    host_copy() error: dma_copy() failed, ret = 4294967234
    0      1         PIPE          27045189.947917         5.989583 src/audio/pipeline.c:681    pipeline_copy() error: ret = -62, start->comp.id = 4, dir = 1
    0      1         PIPE 1.5      27045196.562500         6.614583 src/audio/pipeline.c:789    pipeline_xrun_recover()
    0      1         COMP          27045209.479167        12.916667 rc/audio/component.c:201    comp_set_state() error: wrong state = 5, COMP_TRIGGER_PREPARE
    0      1         PIPE          27045215.364583         5.885417 src/audio/pipeline.c:365    pipeline_prepare() error: ret = -22,dev->comp.id = 0
    0      1         PIPE 1.5      27045221.614583         6.250000 src/audio/pipeline.c:796    pipeline_xrun_recover() error: pipeline_prepare() failed, ret = -22
    0      1         PIPE 1.5      27045227.239583         5.625000 src/audio/pipeline.c:865    pipeline_task(): xrun recover failed! pipeline will be stopped!

logger-t :

   0      2       BUFFER          27043352.395833      1244.635376   src/audio/buffer.c:127    comp_update_buffer_produce(), no bytes to produce
    0      2          DMA          27043357.031250         4.635417 intel/cavs/hda-dma.c:627    hda-dmac: 5 channel 0 -> stop
    0      1       VOLUME          27044583.385417      1226.354126   src/audio/volume.c:465    volume_copy() error: source component buffer has not enough data available
    0      2         COMP          27044589.270833         5.885417 of/audio/component.h:700    comp_underrun(), ((dev->comp.id << 16) | source->avail) = 65536, ((min_bytes << 16) | copy_bytes) = 0
    0      2         PIPE 1.5      27044593.281250         4.010417 src/audio/pipeline.c:540    pipeline_trigger()
    0      2         HOST          27044597.447917         4.166667     src/audio/host.c:283    host_trigger()
    0      2          DMA          27044602.083333         4.635417 intel/cavs/hda-dma.c:627    hda-dmac: 5 channel 0 -> stop
    0      2       VOLUME          27044606.562500         4.479167   src/audio/volume.c:434    volume_trigger()
    0      2          DAI 1.4      27044610.729167         4.166667      src/audio/dai.c:528    dai_comp_trigger(), command = 8
    0      2          DAI 1.4      27044614.635417         3.906250      src/audio/dai.c:586    dai_comp_trigger(), XRUN
    0      2          DAI 1.4      27044618.125000         3.489583      src/audio/dai.c:592    dai_comp_trigger(), PAUSE/STOP
    0      2          DMA          27044621.770833         3.645833 src/drivers/dw/dma.c:456    dw_dma_stop(): dma 0 channel 0 stop
    0      2          SSP          27044630.520833         8.750000 ers/intel/cavs/ssp.c:812    ssp_trigger() cmd 0
    0      2          SSP          27044793.333333       162.812500 ers/intel/cavs/ssp.c:793    ssp_stop(), TX stop
    0      2          SSP          27044798.177083         4.843750 ers/intel/cavs/ssp.c:802    ssp_stop(), SSP port disabled
    0      1         PIPE          27044804.479167         6.302083 src/audio/pipeline.c:681    pipeline_copy() error: ret = -5, start->comp.id = 1, dir = 1
    0      1         PIPE 1.5      27044811.041667         6.562500 src/audio/pipeline.c:789    pipeline_xrun_recover()
    0      2         PIPE 1.5      27044816.197917         5.156250 src/audio/pipeline.c:358    pipeline_prepare()
    0      2         HOST          27044820.312500         4.114583     src/audio/host.c:635    host_prepare()
    0      2         COMP          27044824.166667         3.854167 rc/audio/component.c:136    comp_set_state(), state already set to 3
    0      2         PIPE 1.5      27044828.333333         4.166667 src/audio/pipeline.c:540    pipeline_trigger()
    0      2         HOST          27044832.395833         4.062500     src/audio/host.c:283    host_trigger()
    0      2          DMA          27044836.562500         4.166667 intel/cavs/hda-dma.c:533    hda-dmac: 5 channel 0 -> start
    0      2          DMA          27044840.625000         4.062500 intel/cavs/hda-dma.c:369    hda-dmac: 5 channel 0 -> enable
    0      2       VOLUME          27044898.958333        58.333332   src/audio/volume.c:434    volume_trigger()
    0      2          DAI 1.4      27044902.916667         3.958333      src/audio/dai.c:528    dai_comp_trigger(), command = 1
    0      2          DAI 1.4      27044906.770833         3.854167      src/audio/dai.c:539    dai_comp_trigger(), START
    0      1          DMA          27045177.395833       270.625000 intel/cavs/hda-dma.c:279    hda-dmac: 5 wait for buffer full timeout
    0      1         HOST          27045183.958333         6.562500     src/audio/host.c:792    host_copy() error: dma_copy() failed, ret = 4294967234
    0      1         PIPE          27045189.947917         5.989583 src/audio/pipeline.c:681    pipeline_copy() error: ret = -62, start->comp.id = 4, dir = 1
    0      1         PIPE 1.5      27045196.562500         6.614583 src/audio/pipeline.c:789    pipeline_xrun_recover()
    0      2         PIPE 1.5      27045201.718750         5.156250 src/audio/pipeline.c:358    pipeline_prepare()
    0      2         HOST          27045205.729167         4.010417     src/audio/host.c:635    host_prepare()
    0      1         COMP          27045209.479167         3.750000 rc/audio/component.c:201    comp_set_state() error: wrong state = 5, COMP_TRIGGER_PREPARE
    0      1         PIPE          27045215.364583         5.885417 src/audio/pipeline.c:365    pipeline_prepare() error: ret = -22,dev->comp.id = 0
    0      1         PIPE 1.5      27045221.614583         6.250000 src/audio/pipeline.c:796    pipeline_xrun_recover() error: pipeline_prepare() failed, ret = -22
    0      1         PIPE 1.5      27045227.239583         5.625000 src/audio/pipeline.c:865    pipeline_task(): xrun recover failed! pipeline will be stopped!
    0      2          IPC          29281219.739583   2235992.500000    src/ipc/handler.c:480    ipc: comp 0 -> trigger cmd 0x50000
    0      2         PIPE 1.5      29281224.739583         5.000000 src/audio/pipeline.c:540    pipeline_trigger()
    0      2         HOST          29281229.322917         4.583333     src/audio/host.c:283    host_trigger()
    0      2          DMA          29281234.010417         4.687500 intel/cavs/hda-dma.c:627    hda-dmac: 5 channel 0 -> stop
    0      2       VOLUME          29281238.854167         4.843750   src/audio/volume.c:434    volume_trigger()
    0      2          DAI 1.4      29281243.177083         4.322917      src/audio/dai.c:528    dai_comp_trigger(), command = 0
    0      2          DAI 1.4      29281247.083333         3.906250      src/audio/dai.c:592    dai_comp_trigger(), PAUSE/STOP
    0      2          DMA          29281251.041667         3.958333 src/drivers/dw/dma.c:456    dw_dma_stop(): dma 0 channel 0 stop
    0      2          SSP          29281257.760417         6.718750 ers/intel/cavs/ssp.c:812    ssp_trigger() cmd 0
    0      2          SSP          29281421.354167       163.593750 ers/intel/cavs/ssp.c:802    ssp_stop(), SSP port disabled
    0      2          IPC          29281749.166667       327.812500    src/ipc/handler.c:369    ipc: comp 0 -> free
    0      2         PIPE 1.5      29281753.802083         4.635417 src/audio/pipeline.c:583    pipeline_reset()
    0      2         HOST          29281757.968750         4.166667     src/audio/host.c:699    host_reset()
    0      2          DMA          29281762.135417         4.166667 intel/cavs/hda-dma.c:627    hda-dmac: 5 channel 0 -> stop
    0      2       VOLUME          29281769.322917         7.187500   src/audio/volume.c:601    volume_reset()

dmesg.log
logger.log
logger-t.log

@keqiaozhang keqiaozhang added br-sof-dev bug Something isn't working CML Applies to Comet Lake platform labels Apr 22, 2019
@keqiaozhang
Copy link
Collaborator Author

@Jiangxinx @ClarexZhou
Could you please help to verify this issue on other HDA platform?

@ClarexZhou
Copy link

ClarexZhou commented Apr 22, 2019

Behavior is different on CML.
No interaction between Dhw:0,0 and Dhw:0,3
Only no audio output when start aplay on Dhw:0,1 during playing on Dhw:0,0.
No interaction when press ctl+c to stop one.

Environment
Kernel Repo: https://github.com/RanderWang/linux/commits/cml-validation-20190422
Made from: RanderWang/linux@9086043 [thesofproject/linux: topic/sof-dev]
+RanderWang/linux@c105b1b
+RanderWang/linux@ffecddc
+RanderWang/linux@3b917aa
+RanderWang/linux@6f928a3
+RanderWang/linux@a916d2d
+RanderWang/linux@694599b
+RanderWang/linux@a43379d
+RanderWang/linux@d36ed40
+RanderWang/linux@9b3bd71
+RanderWang/linux@e852311
+RanderWang/linux@8f30111
+RanderWang/linux@95cd082

Firmware Repo :https://github.com/bardliao/sof/tree/whl-daliy-20190422
Made from: bardliao/linux@0c93261

Topology: Same as above SOF repo

@wenqingfu
Copy link

@keqiaozhang can you please help to verify if this issue can be reproduced on I2S platform? thanks!

@keqiaozhang
Copy link
Collaborator Author

@keqiaozhang can you please help to verify if this issue can be reproduced on I2S platform? thanks!

@wenqingfu , I tried to reproduce this issue on GLK before, but it's blocked by #828 , HDMI is not working.
I just tested it again with PR #834 on GLK, this issue can be reproduced. The reproducibility rate is about 20% and IPC timed out when TRIG_START, but audio is still working in the next run.

[  339.892580] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 1 dir 0 cmd 1
[  339.892585] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
[  340.197136] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60040000 size 12
[  340.197142] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[  340.197180] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[  340.197182] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[  340.197184]  Headset: ASoC: trigger FE failed -110
[  340.197186] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 1 dir 0 cmd 0
[  340.197212] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP

trace log:

 CORE  LEVEL      COMP_ID                TIMESTAMP            DELTA                FILE_NAME    CONTENT
    0      1       VOLUME           9387949.166667   9387949.000000   src/audio/volume.c:465    volume_copy() error: source component buffer has not enough data available
    0      1         PIPE           9388138.125000       188.958328 src/audio/pipeline.c:681    pipeline_copy() error: ret = -5, start->comp.id = 9, dir = 1
    0      1         PIPE 2.13      9388144.427083         6.302083 src/audio/pipeline.c:789    pipeline_xrun_recover()
    0      1          DMA           9388437.291667       292.864594 intel/cavs/hda-dma.c:279    hda-dmac: 5 wait for buffer full timeout
    0      1         HOST           9388443.541667         6.250000     src/audio/host.c:792    host_copy() error: dma_copy() failed, ret = 4294967234
    0      1         PIPE           9388449.166667         5.625000 src/audio/pipeline.c:681    pipeline_copy() error: ret = -62, start->comp.id = 12, dir = 1
    0      1         PIPE 2.13      9388455.520833         6.354167 src/audio/pipeline.c:789    pipeline_xrun_recover()
    0      1         COMP           9388468.072917        12.552083 rc/audio/component.c:201    comp_set_state() error: wrong state = 5, COMP_TRIGGER_PREPARE
    0      1         PIPE           9388473.854167         5.781250 src/audio/pipeline.c:365    pipeline_prepare() error: ret = -22,dev->comp.id = 8
    0      1         PIPE 2.13      9388479.791667         5.937500 src/audio/pipeline.c:796    pipeline_xrun_recover() error: pipeline_prepare() failed, ret = -22
    0      1         PIPE 2.13      9388485.104167         5.312500 src/audio/pipeline.c:865    pipeline_task(): xrun recover failed! pipeline will be stopped!

dmesg.log
logger.log
logger-t.log

Test recipe:
kernel: sof-dev/2e9456 +PR #834
sof/tplg: master/e4c1651

@ClarexZhou ClarexZhou added the WHL Applies to WhiskeyLake platform label Apr 24, 2019
@keqiaozhang keqiaozhang added the GLK Applies to Gemini Lake label Apr 24, 2019
@stevyan
Copy link

stevyan commented Apr 24, 2019

Summary
Not reproduce on APL UP2 pcm512x

Step

  1. aplay -Dhw:0,0 -f s16_le -r 48000 -c 2 /dev/zero
  2. aplay -Dhw:0,2 -f s16_le -r 48000 -c 2 /dev/zero (HDMI)

Actual Result
No error occurred.

Test recipe
Date: 2019-04-24
sof (master): e4c1651
kernel (topic/sof-dev): 2e94569
topology: sof-apl-pcm512x.tplg

@libinyang
Copy link

libinyang commented Apr 24, 2019

Clair's bug is narrowed down to codec issue. As per discussion we can lower its priority.
It is different from Keqiao's bug. Clair, could you please open a new issue for it?

@stevyan
Copy link

stevyan commented Apr 24, 2019

Summary
"write error: Input/output error" occurred on APL UP2 pcm512x

Step

  1. playback HDMI firstly at Terminal A. aplay -Dhw:0,2 -f s16_le -r 48000 -c 2 /dev/zero
  2. Terminal B: aplay -Dhw:0,0 -f s16_le -r 48000 -c 2 /dev/zero

Actual Result

  1. Terminal A: write error: Input/output error
  2. Terminal B: underrun, and then "write error: Input/output error"

Test recipe
Date: 2019-04-24
sof (master): e4c1651
kernel (topic/sof-dev): 2e94569
topology: sof-apl-pcm512x.tplg

dmesg log

[25672.069244] sof-audio-pci 0000:00:0e.0: pcm: free stream 2 dir 0
[25672.069252] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[25672.069461] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[25672.069544] sof-audio-pci 0000:00:0e.0: pcm: close stream 2 dir 0
[25672.069560] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 0 dir 0 cmd 0
[25672.069576] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[25672.069810] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[25672.085975] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 0 dir 0 cmd 1
[25672.085997] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
[25672.388744] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60040000 size 12
[25672.388762] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[25672.388808] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[25672.388815] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[25672.388825]  Port5: ASoC: trigger FE failed -110
[25672.388842] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 0 dir 0 cmd 0
[25672.388858] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[25672.692703] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60050000 size 12
[25672.692721] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[25672.692766] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[25672.692773] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[25672.692784]  Port5: ASoC: trigger FE failed -110
[25673.300849] sof-audio-pci 0000:00:0e.0: pcm: free stream 0 dir 0
[25673.300867] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[25673.604500] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60030000 size 12
[25673.604510] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[25673.604549] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[25673.604551] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[25673.618544] sof-audio-pci 0000:00:0e.0: pcm: close stream 0 dir 0
[25675.766250] sof-audio-pci 0000:00:0e.0: ipc tx: 0x40010000: GLB_PM_MSG: CTX_SAVE
[25676.068721] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x40010000 size 76
[25676.068739] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[25676.068784] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[25676.068793] sof-audio-pci 0000:00:0e.0: error: ctx_save ipc error during suspend -110
[25676.068813] sof-audio-pci 0000:00:0e.0: can't suspend (snd_sof_runtime_suspend [snd_sof] returned -110)

@plbossart
Copy link
Member

Can we have confirmation that the two outputs work in isolation and the issues only show up when the two outputs are used concurrently.

@keqiaozhang
Copy link
Collaborator Author

keqiaozhang commented Apr 25, 2019

Can we have confirmation that the two outputs work in isolation and the issues only show up when the two outputs are used concurrently.

Yes, the two outputs work in isolation and the issue only can be reproduced when two outputs are used concurrently.
I also tested the following scenario on GLK, there're two TYPE-C connectors, so we can do playback on these 2 ports via the converters.

Steps:

  1. Terminal A: do playback on HDMI (type-c to HDMI).
  2. Terminal B: do playback on DP (type-c to DP), at this time, both of them stop immediately with I/O error.
    Dmesg:
[  566.305205] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
[  566.605311] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60040000 size 12
[  566.605317] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[  566.605354] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[  566.605356] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[  566.605359]  HDMI1: ASoC: trigger FE failed -110
[  566.605361] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 5 dir 0 cmd 0
[  566.605365] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[  566.605385] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[  566.605390] sof-audio-pci 0000:00:0e.0: ipc rx: 0x90020000: GLB_TRACE_MSG
[  566.605397] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x90020000: GLB_TRACE_MSG
[  567.213480] sof-audio-pci 0000:00:0e.0: pcm: free stream 5 dir 0
[  567.213483] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[  567.517308] sof-audio-pci 0000:00:0e.0: error: ipc timed out for 0x60030000 size 12
[  567.517311] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
[  567.517348] sof-audio-pci 0000:00:0e.0: error: unexpected fault 0x00000000 trace 0x00004000
[  567.517350] sof-audio-pci 0000:00:0e.0: error: waking up any trace sleepers
[  567.517393] sof-audio-pci 0000:00:0e.0: pcm: close stream 5 dir 0
[  567.541767] sof-audio-pci 0000:00:0e.0: ipc rx: 0x90020000: GLB_TRACE_MSG
[  567.541772] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x90020000: GLB_TRACE_MSG
[  567.541792] sof-audio-pci 0000:00:0e.0: ipc rx: 0x90020000: GLB_TRACE_MSG

trace:

    0      2          SSP           5646528.177083         4.791667 ers/intel/cavs/ssp.c:802    ssp_stop(), SSP port disabled
    0      2          IPC           5646675.625000       147.447922    src/ipc/handler.c:369    ipc: comp 1 -> free
    0      2         PIPE 1.6       5646680.625000         5.000000 src/audio/pipeline.c:583    pipeline_reset()
    0      2         HOST           5646684.687500         4.062500     src/audio/host.c:699    host_reset()
    0      2          DMA           5646688.697917         4.010417 intel/cavs/hda-dma.c:627    hda-dmac: 5 channel 0 -> stop
    0      1         PIPE           5646695.468750         6.770833 src/audio/pipeline.c:681    pipeline_copy() error: ret = -5, start->comp.id = 28, d 1

dmesg.log
logger-t.log

Test recipe:
kernel: sof-dev/2e9456 +PR #834 (to fix the HDMI/DP playback issue)
sof/tplg: master/e4c1651

@xiulipan
Copy link

@keqiaozhang
Why there is a ssp_stop(), SSP port disabled here. It is the right test case.
@tlauda @ranj063
Are we also using SSP for HDA HDMI playback pipeline? It looks wired to me.

@ClarexZhou
Copy link

@libinyang CML issue is split and track on #874

@mengdonglin mengdonglin removed the CML Applies to Comet Lake platform label Apr 28, 2019
@wenqingfu
Copy link

quote @keqiaozhang in thesofproject/sof#1354 (comment) , "these PRs can fix issue #854"

@stevyan
Copy link

stevyan commented May 30, 2019

Error doesn't occurred based on CFL RVP HDA

Test recipe
Date: 2019-05-30
sof (master): 92fc706
kernel (topic/sof-dev): 80a2cb8
topology: sof-hda-general.tplg

@Jiangxinx
Copy link

APL UP2 pcm512x & APL UP2 nocodec daily test
Not reproduce when testing HDMI and HDA:

     1.playback HDMI firstly at Terminal A. aplay -Dhw:0,2 -f s16_le -r 48000 -c 2 /dev/zero
     2.Terminal B: aplay -Dhw:0,0 -f s16_le -r 48000 -c 2 /dev/zero

Still occurre "write error: Input/output error" when testing Media Playback and HDA:

     1.playback Media Playback firstly at Terminal A. aplay -Dhw:0,4 -f s16_le -r 48000 -c 2 /dev/zero
     2.Terminal B: aplay -Dhw:0,0 -f s16_le -r 48000 -c 2 /dev/zero

Result of testing Media Playback and HDA
Terminal A: write error: Input/output error
Terminal B: underrun, and then "write error: Input/output error"

Test recipe
Date: 2019-05-30
sof (master): 92fc706
kernel (topic/sof-dev): 80a2cb8
topology: sof-apl-pcm512x.tplg & sof-apl-nocodec.tplg

Dmesg

[17323.341947] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x90020000: GLB_TRACE_MSG
[17324.185815] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 7 dir 0 cmd 0
[17324.185834] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[17324.186067] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[17324.186113] sof-audio-pci 0000:00:0e.0: pcm: free stream 7 dir 0
[17324.186123] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[17324.186304] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[17324.186387] sof-audio-pci 0000:00:0e.0: pcm: close stream 7 dir 0
[17324.289822] sof-audio-pci 0000:00:0e.0: pcm: trigger stream 0 dir 0 cmd 0
[17324.289842] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[17324.290191] sof-audio-pci 0000:00:0e.0: error: ipc error for 0x60050000 size 12
[17324.290206]  Port0: ASoC: trigger FE failed -22
[17324.290247] sof-audio-pci 0000:00:0e.0: pcm: free stream 0 dir 0
[17324.290259] sof-audio-pci 0000:00:0e.0: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[17324.290613] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[17324.290728] sof-audio-pci 0000:00:0e.0: pcm: close stream 0 dir 0
[17324.841930] sof-audio-pci 0000:00:0e.0: ipc rx: 0x90020000: GLB_TRACE_MSG
[17324.841945] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x90020000: GLB_TRACE_MSG
[17326.470329] sof-audio-pci 0000:00:0e.0: ipc tx: 0x40010000: GLB_PM_MSG: CTX_SAVE
[17326.470510] sof-audio-pci 0000:00:0e.0: ipc tx succeeded: 0x40010000: GLB_PM_MSG: CTX_SAVE
[17326.470524] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x1010303 successful
[17326.470532] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x303 successful
[17326.470539] sof-audio-pci 0000:00:0e.0: DSP core(s) enabled? 0 : core_mask 3
[17326.470552] sof-audio-pci 0000:00:0e.0: Debug PCIR: 00000010 at  00000044

sof-logger

    0      1         COMP         901935871757.812500              nan rc/audio/component.c:261 	comp_get_copy_limits() error: sink component buffer has not enough free bytes for copy
    0      1       VOLUME         901935871963.229248       205.416672 udio/volume/volume.c:510 	volume_copy(): Failed comp_get_copy_limits()
    0      1         PIPE         901935871969.270874         6.041667 src/audio/pipeline.c:808 	pipeline_copy() error: ret = -5, start->comp.id = 8, dir = 1
    0      1         PIPE 1.9     901935871975.989624         6.718750 src/audio/pipeline.c:920 	pipeline_xrun_recover()
    0      1         COMP         901935872067.812500        91.822914 rc/audio/component.c:140 	comp_set_state() error: wrong state = 1, COMP_TRIGGER_START
    0      1          IPC         901935872074.166748         6.354167 src/audio/pipeline.c:658 	pipeline_trigger() error: ret = -22, host->comp.id = 0, cmd = 1
    0      1         PIPE 1.9     901935872080.937500         6.770833 src/audio/pipeline.c:939 	pipeline_xrun_recover() error: pipeline_trigger() failed, ret = -22
    0      1         PIPE 1.9     901935872086.875000         5.937500 src/audio/pipeline.c:998 	pipeline_task(): xrun recover failed! pipeline will be stopped!
    0      1         COMP         901937592315.677124   1720228.750000 rc/audio/component.c:161 	comp_set_state() error: wrong state = 1, COMP_TRIGGER_STOP
    0      1          IPC         901937592322.343750         6.666667 src/audio/pipeline.c:658 	pipeline_trigger() error: ret = -22, host->comp.id = 0, cmd = 0
    0      1          IPC         901937592329.479248         7.135417    src/ipc/handler.c:513 	ipc: comp 0 trigger 0x50000 failed -22

@wenqingfu wenqingfu assigned kv2019i and unassigned libinyang Jun 4, 2019
@kv2019i
Copy link
Collaborator

kv2019i commented Jun 4, 2019

@wenqingfu Ack, looking at multiple multi-stream cases, I can take a look at this as well.

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 6, 2019

Analyzed and moved to firmware as thesofproject/sof#1526

We can keep this open until FW confirms.

@Jiangxinx please add more info to the FW bug if nocodec test scenario can be repeated on other platforms than APL

@kv2019i
Copy link
Collaborator

kv2019i commented Jun 6, 2019

I could not reproduce the issues with nocodec mode on WHL. But nocdec mode issue on APL seems clear.
UPDATE: this only happens on topologies with a mixer on the path, explains why I didn't see this on WHL at least yet (see more in the FW bug).

@kv2019i
Copy link
Collaborator

kv2019i commented Jul 2, 2019

@keqiaozhang Can you confirm this is fixed now and close the bug if yes? The bug is now fixed in firmware ( thesofproject/sof#1526 ).

@YvonneYang2
Copy link

Issue not reproduced with test recipe as below, so close it.

Test recipe:
Firmware: 357e47c https://github.com/thesofproject/sof/commits/master
Kernel: 6ec3295 https://github.com/thesofproject/linux/commits/topic/sof-dev
Topology: sof-glk-da7219.tplg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists GLK Applies to Gemini Lake WHL Applies to WhiskeyLake platform
Projects
None yet
Development

No branches or pull requests