Skip to content

[BUG][CML] HDA Analog and HDA Digital pipeline will interact with each other #874

Closed

Description

@ClarexZhou

Describe the bug
HDA Analog aplay will has no audio output once start aplay on HDA Digital during aplaying on Analog.

To Reproduce

  1. terminal 1 headset playback: aplay -Dhw:0,0 -f dat -c 2 audio.wav
  2. terminal 2 HDA digital playback: aplay -Dhw:0,2 -f dat -c 2 audio.wav, check

Expected behavior
HDA Analog shouldn't be effected.

Actual result
Analog no audio output, restart aplay can output normally.

Log
logger_error.log
logger.log
dmesg.log

No obvious error log on sof-logger. Dmesg as below:

[ 3019.235287] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 1
[ 3019.235298] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60040000: GLB_STREAM_MSG: TRIG_START
[ 3019.235636] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60040000: GLB_STREAM_MSG: TRIG_START
[ 3019.235640] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=1
[ 3020.211918] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 3020.211945] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 3021.800815] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 1 dir 0 cmd 0
[ 3021.800833] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 3021.800980] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 3021.800993] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=0
[ 3021.801179] sof-audio-pci 0000:00:1f.3: pcm: free stream 1 dir 0
[ 3021.801191] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 3021.801304] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 3021.801532] sof-audio-pci 0000:00:1f.3: pcm: close stream 1 dir 0
[ 3022.711788] sof-audio-pci 0000:00:1f.3: ipc rx: 0x90020000: GLB_TRACE_MSG
[ 3022.711818] sof-audio-pci 0000:00:1f.3: ipc rx done: 0x90020000: GLB_TRACE_MSG
[ 3165.775880] sof-audio-pci 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 0
[ 3165.775897] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 3165.776043] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60050000: GLB_STREAM_MSG: TRIG_STOP
[ 3165.776056] sof-audio-pci 0000:00:1f.3: In hda_link_pcm_trigger cmd=0
[ 3165.776230] sof-audio-pci 0000:00:1f.3: pcm: free stream 0 dir 0
[ 3165.776242] sof-audio-pci 0000:00:1f.3: ipc tx: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 3165.776398] sof-audio-pci 0000:00:1f.3: ipc tx succeeded: 0x60030000: GLB_STREAM_MSG: PCM_FREE
[ 3165.776574] sof-audio-pci 0000:00:1f.3: pcm: close stream 0 dir 0

Test Recipe
Kernel repo | https://github.com/RanderWang/linux/tree/cml-validation-20190425

Made from:
f7e9d4a [thesofproject/linux: topic/sof-dev]

8a8e045 [RanderWang/linux: cml-validation-20190425]
62eaa40 [RanderWang/linux: cml-validation-20190425]
bf461fd [RanderWang/linux: cml-validation-20190425]
49bb879 [RanderWang/linux: cml-validation-20190425]
6af82dc [RanderWang/linux: cml-validation-20190425]
e54f292 [RanderWang/linux: cml-validation-20190425]
e026573 [RanderWang/linux: cml-validation-20190425]
3bdeae3 [RanderWang/linux: cml-validation-20190425]
cea87d5 [RanderWang/linux: cml-validation-20190425]

Firmware repo | https://github.com/RanderWang/sof/tree/cml-linux-20190425
Made from:
395a34e [thesofproject/sof: master]
279c995 [RanderWang/sof: cml-linux-20190425]
8598799 [RanderWang/sof: cml-linux-20190425]

Topology: | https://github.com/RanderWang/sof/tree/cml-linux-20190425
file: tools/topology/sof-hda-generic.m4, sof-hda-generic-2ch.tplg

Kconfig: | https://sof-ci-storage.sh.intel.com/daily/20190425/linux-2e945691-1/config-daily-hda-20190425

Activity

  1. added
    bugSomething isn't working
    CMLApplies to Comet Lake platform
    HDAApplies to HD-Audio bus for codec connection
    on Apr 26, 2019
  2. mengdonglin commented on Apr 28, 2019

    @mengdonglin

    To fix this issue:

    1. Need fix for DMA coupled/decoupled mode
    2. Need Realtek to check codec driver.
  3. plbossart commented on Apr 30, 2019

    @plbossart
    Member

    @bardliao do you know what the digital output means? S/PDIF?
    It'd be good to double-check with the legacy HDAudio driver, I wonder if this issue from from the codec itself or is an SOF issue with something interfering at the link DMA level.

  4. bardliao commented on May 2, 2019

    @bardliao
    Collaborator

    @plbossart Yes, I think it is S/PDIF. And there is no digital interface presented in legacy HDA driver.

  5. juimonen commented on May 2, 2019

    @juimonen

    I have exactly similar behavior in my up2 when trying to playback and record at the same time. Stopping recording will stop the playback stream also. The dmesg looks exactly the same, like triggering stop would trigger another stop for the stream in another pcm, but same card... I would look are we coupling something in asoc layer that is causing the stop for other streams also.

  6. plbossart commented on May 2, 2019

    @plbossart
    Member

    @juimonen can you try with NOCODEC and no SOF_HDA at all?
    This behavior happened in the past and Rander fixed a number of issues a couple of weeks ago, wondering if we undid his work.

  7. bardliao commented on May 3, 2019

    @bardliao
    Collaborator

    @juimonen Could you check if #674 helps?

  8. juimonen commented on May 3, 2019

    @juimonen

    @bardliao I have it on my tree, and so it doesn't help at least on my issue...

  9. juimonen commented on May 3, 2019

    @juimonen

    @bardliao @plbossart my issue was on firmware side. If you have connected pipelines, pipeline_reset doesn't take into account separate pipelines with different id's, it resets everything that's connected. Sorry about the noise, the logs looks surprisingly same

  10. wenqingfu commented on May 6, 2019

    @wenqingfu

    To fix this issue:

    1. Need fix for DMA coupled/decoupled mode
    2. Need Realtek to check codec driver.

    @ranj063 can you please test and confirm if your PR #895 would fix this issue?

  11. ranj063 commented on May 7, 2019

    @ranj063
    Collaborator

    @ranj063 can you please test and confirm if your PR #895 would fix this issue?

    @wenqingfu no, my PR does not fix this issue. We have already tested it

  12. 6 remaining items

  13. wenqingfu commented on May 10, 2019

    @wenqingfu

    We have a solution that we will fix it in UCM in @RanderWang patch of UCM.

    IIRC, it's only for the specific CML device where there is no digit (SPDIF) output. @libinyang to articulate. It would still be valid bug, I think, on our CFL RVP

  14. libinyang commented on May 10, 2019

    @libinyang

    Yes, it is still a valid bug. So we should fix it, this is because:

    1. UCM fixes it by not exporting to user by UI. user still can use aplay to hit this issue.
    2. This is a general issue, not only related to CML.
  15. kv2019i commented on May 13, 2019

    @kv2019i
    Collaborator

    Despite @ranj063 you stating earlier that your channel allocation fix doesn't help with this issue, I now get different results. With the sof+linux fix for channel allocation, this issue is fixed. I went back to unpatched kernel+fw, verified I can reproduce issue, and then went back to link-dma-allocation branch, and works.

    @ClarexZhou bug is fixed in my setup with following:
    thesofproject/sof#1354
    linux 202ea26 (ranjani/fix/link-dma-allocation)
    sf 4f239dea (ranjani/fix/link-dma-allocation)

    Note: I cannot verify SPDIF audio content (no SPDIF out connector on the SDS) but PCM establishment is ok and playback seems correct from ALSA/host point of view.

  16. added
    duplicateThis issue or pull request already exists
    on May 13, 2019
  17. ClarexZhou commented on May 14, 2019

    @ClarexZhou
    Author

    Error still seen on CML laptop with thesofproject/sof#1354 and PR #895
    Environment
    platform: CML laptop with ALC3204 codec
    Rander UCM https://github.com/RanderWang/intel-UCM  
    Kernel repo:9494607 https://github.com/thesofproject/linux/tree/release/sof-v5.0
    Firmware repo: https://github.com/bardliao/sof/tree/dell-test Which is commit id b73b9a6 + PR #1354
    Topology: https://github.com/thesofproject/sof/commits/master . Same as above SOF repo
    file: tools/topology/sof-hda-generic.m4, sof-hda-generic-2ch.tplg

  18. RanderWang commented on May 15, 2019

    @RanderWang

    I tried legacy HDA, there is no digital support for this codec, so your test is invalid.
    And if this is a bug, please report to realtek and close this bug. And on ubuntu please
    use UCM which will only report we support pcm.

  19. mengdonglin commented on May 16, 2019

    @mengdonglin

    Closing as invalid use case for codec without support for digital output.

  20. added
    invalidThis doesn't seem right
    and removed
    duplicateThis issue or pull request already exists
    on May 16, 2019
  21. mengdonglin commented on May 17, 2019

    @mengdonglin

    We’ve verified HDMI, DP and 1 stream for analog output will not interact each other (issue #878 , can be fixed by PR #895 and thesofproject/sof#1354). So I think SOF is okay because SOF driver handles all HD-A streams in a generic way.

    We can double check after we have a codec with digit support to verify if there is still a real issue later. The default HD-A codec ALC700 for recent platforms (WHL, ICL etc) doesn’t have digit support either, checked by @RanderWang with legacy HD-A driver. The legacy HD-A driver can query codec capabilities automatically.

  22. mengdonglin commented on May 17, 2019

    @mengdonglin

    For topology, I think it can provide a max set of codec capabilities. But we can use different codec UCM configurations to cover the diversity. We can have more discussion in #956

  23. wenqingfu commented on May 17, 2019

    @wenqingfu

    It should be called "invalid". restore the "duplicate" label.

    Quote @kv2019i "With the sof+linux fix for channel allocation, this issue is fixed. I went back to unpatched kernel+fw, verified I can reproduce issue, and then went back to link-dma-allocation branch, and works."

  24. added
    duplicateThis issue or pull request already exists
    and removed
    invalidThis doesn't seem right
    on May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

CMLApplies to Comet Lake platformHDAApplies to HD-Audio bus for codec connectionP2Critical bugs or normal featuresbugSomething isn't workingduplicateThis 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