Skip to content

[PM] playback on HDMI can't continue after suspend/resume #788

Closed

Description

@keyonjie

How to reproduce:

  1. run aplay on HDMI output;
  2. run 'rtcwake -m mem -s 5' on another terminal;

Expected result: HDMI playback continue after resume from suspend;
Actual result: the playback of HDMI will stop.

This will actually block the HDMI playback suspend/resume stress test on all platforms.

Activity

  1. added
    P2Critical bugs or normal features
    on Jan 3, 2019
  2. lgirdwood commented on Jan 8, 2019

    @lgirdwood
    Member

    @keyonjie logs please.

  3. markyang commented on Jan 14, 2019

    @markyang

    Summary:
    This issue can be reproduced on APL with PCM512x using the latest build.
    sof-logger is empty. sof-logger -t log is attached below.

    dmesg:

    [20790.943963] OOM killer enabled.
    [20790.943965] Restarting tasks ... 
    [20790.946168] sof-audio sof-audio: pcm: trigger stream 2 dir 0 cmd 6
    [20790.946175] sof-audio sof-audio: PCM: resume stream 2 dir 0 DMA position 0
    [20790.946179] sof-audio sof-audio: pcm: hw params stream 2 dir 0
    [20790.946186] sof-audio sof-audio: generating page table for 00000000776bf9ad size 0xff00 pages 16
    [20790.946211] sof-audio sof-audio: period_bytes:0xfc0
    [20790.946214] sof-audio sof-audio: periods:16
    [20790.946225] sof-audio sof-audio: stream_tag 1
    [20790.946566] done.
    [20790.946594] video LNXVIDEO:00: Restoring backlight state
    [20790.946603] PM: suspend exit
    [20790.947650] sof-audio sof-audio: ipc tx: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
    [20790.948178] sof-audio sof-audio: ipc tx succeeded: 0x60010000: GLB_STREAM_MSG: PCM_PARAMS
    [20790.948475] sof-audio sof-audio: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
    [20790.948671] sof-audio sof-audio: ipc tx succeeded: 0x60040000: GLB_STREAM_MSG: TRIG_START
    [20791.099652] ata1: SATA link down (SStatus 4 SControl 300)
    [20791.099680] ata2: SATA link down (SStatus 4 SControl 300)
    [20792.060856] sof-audio sof-audio: pcm: trigger stream 2 dir 0 cmd 0
    [20792.060895] sof-audio sof-audio: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
    [20792.364365] sof-audio sof-audio: error: ipc timed out for 0x60050000 size 0xc
    [20792.364387] sof-audio sof-audio: status: fw entered - code 00000005
    [20792.364536] sof-audio sof-audio: error: unexpected fault 0x00000000 trace 0x00004000
    [20792.364543] sof-audio sof-audio: error: waking up any trace sleepers
    [20792.364571]  HDMI2: ASoC: trigger FE failed -110
    [20792.364611] sof-audio sof-audio: pcm: free stream 2 dir 0
    [20792.668392] sof-audio sof-audio: error: ipc timed out for 0x60030000 size 0xc
    [20792.668413] sof-audio sof-audio: status: fw entered - code 00000005
    [20792.668561] sof-audio sof-audio: error: unexpected fault 0x00000000 trace 0x00004000
    [20792.668568] sof-audio sof-audio: error: waking up any trace sleepers
    [20792.668799] sof-audio sof-audio: pcm: close stream 2 dir 0
    [20793.176053] r8169 0000:03:00.0 enp3s0: Link is Up - 100Mbps/Full - flow control rx/tx
    [20798.244362] sof-audio sof-audio: error: ipc timed out for 0x40010000 size 0x4c
    [20798.244383] sof-audio sof-audio: status: fw entered - code 00000005
    [20798.244532] sof-audio sof-audio: error: unexpected fault 0x00000000 trace 0x00004000
    [20798.244549] sof-audio sof-audio: error: ctx_save ipc error during suspend -110
    [20798.244578] sof-audio sof-audio: FW Poll Status: reg=0x1010303 successful
    [20798.245376] sof-audio sof-audio: FW Poll Status: reg=0x303 successful
    [20798.245387] sof-audio sof-audio: DSP core(s) enabled? 0 : core_mask 3
    [20798.245448] sof-audio sof-audio: Debug PCIR: 00000010 at  00000044
    

    Test steps:

    1. aplay -Dhw:0,2 -c2 -r48000 -fS16_LE -vv -i music.wav
    2. sudo rtcwake -m mem -s 2
    

    Test env:
    sof master: 872cefe
    kernel sof-dev: 2ac82ee
    tplg: sof-apl-pcm512x.tplg

    Log:
    dmesg-apl.txt
    logger-t.txt

  4. lgirdwood commented on Jan 14, 2019

    @lgirdwood
    Member

    @keyonjie can you check that all the

    while(hw_reg_value() == val) {
    ...
    };
    

    Have a timeout clause that will break. I have a suspicion we probably have one ion the HDA logic since the stream appears to start (but then ALSA stops it as it's position is not updating).

  5. keyonjie commented on Jan 15, 2019

    @keyonjie
    ContributorAuthor

    @lgirdwood I believe we have some HDA DMA logic issue here, I will take looking into it after Xrun cleanup finished.

  6. lgirdwood commented on Jan 15, 2019

    @lgirdwood
    Member

    @keyonjie ok, thanks, I have a feeling there maybe a few remaining.

  7. added
    P1Blocker bugs or important features
    and removed
    P2Critical bugs or normal features
    on Jan 15, 2019
  8. dabekjakub commented on Jan 16, 2019

    @dabekjakub
    Member

    @lgirdwood Is it even supported scenario to have a playback/transfer and simutaniously signal to power down without stoping playback/transfer? Or did i misunderstand the issue ?

  9. lgirdwood commented on Jan 16, 2019

    @lgirdwood
    Member

    @dabekjakub your understanding is the same as mine, I would expect streams to be stopped prior to power down. But in this case I think the driver is automatically power down since the stream failed.

  10. 3 remaining items

  11. lgirdwood commented on Jan 17, 2019

    @lgirdwood
    Member

    @dabekjakub do you have any logs from FW side as my understanding is that this should work on Chrome as @plbossart says since Chrome will send a TRIGGER_STOP and TRIGGER_START.

  12. plbossart commented on Jan 17, 2019

    @plbossart
    Member

    @lgirdwood in theory the IP can support suspend and restart from where the DMA position was, so your assertion is only true because we don't support what the hardware could do :-)

  13. dabekjakub commented on Jan 18, 2019

    @dabekjakub
    Member

    We have no logs from this since on our platforms we have reproduction of
    thesofproject/linux#489

    I was just throwing logical assumption out in the open that if we have tests that confirm working scenario of TRIGGER_STOP > SUSPEND > RESUME > TRIGGER_START (and we do). Then only issue possible would be kernel side.

    However I looked into provided logs

    [20792.060895] sof-audio sof-audio: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
    [20792.364365] sof-audio sof-audio: error: ipc timed out for 0x60050000 size 0xc
    [20792.364387] sof-audio sof-audio: status: fw entered - code 00000005
    [20792.364536] sof-audio sof-audio: error: unexpected fault 0x00000000 trace 0x00004000

    This part should catch our attention. Issue here is that stream stopping ipc is getting timed out.

    and that is not all since in provided FW logs we have stop and free ipcs handled but they are reported as timed out on kernel side.

    @keyonjie Could You confirm that on the kernel side You have no answer when ipc timeouts here ? Because I can see ipcs handled in logs.

  14. keyonjie commented on Jan 21, 2019

    @keyonjie
    ContributorAuthor

    @dabekjakub as we talked in the meeting, I believe FW error first happen at trigger start before this trigger stop, here we see the trigger stop IPC timeout as FW can't respond to IPC anymore.

  15. keyonjie commented on Jan 21, 2019

    @keyonjie
    ContributorAuthor

    BTW, please use generic hda tplg and machine driver on UP2, it's very easy(100%) to reproduce this issue.

  16. mengdonglin commented on Jan 28, 2019

    @mengdonglin
    Collaborator

    This seems to be a duplicate of the generic issue thesofproject/linux#489 on multiple platforms.

  17. michalgrodzicki commented on Feb 13, 2019

    @michalgrodzicki

    This seems to be a duplicate of the generic issue thesofproject/linux#489 on multiple platforms.

    @mengdonglin - if it's a duplicate who should be owner of this issue? @RanderWang ?

  18. mengdonglin commented on Feb 25, 2019

    @mengdonglin
    Collaborator

    @dabekjakub @michalgrodzicki I think @ranj063 has between working on this before her vacation. And this is a duplicate of thesofproject/linux#489

  19. mengdonglin commented on Mar 4, 2019

    @mengdonglin
    Collaborator

    Closing because it seems a driver issue, will follow up by thesofproject/linux#489

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

APLApplies to Apollolake platformP1Blocker bugs or important featuresbugSomething isn't working as expectedduplicateThis issue or pull request already exists

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions