Repository navigation
[BUG][CML] HDA Analog and HDA Digital pipeline will interact with each other #874
Description
Describe the bug
HDA Analog aplay will has no audio output once start aplay on HDA Digital during aplaying on Analog.
To Reproduce
- terminal 1 headset playback: aplay -Dhw:0,0 -f dat -c 2 audio.wav
- 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
mengdonglin commentedon Apr 28, 2019
To fix this issue:
plbossart commentedon Apr 30, 2019
@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.
bardliao commentedon May 2, 2019
@plbossart Yes, I think it is S/PDIF. And there is no digital interface presented in legacy HDA driver.
juimonen commentedon May 2, 2019
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.
plbossart commentedon May 2, 2019
@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.
bardliao commentedon May 3, 2019
@juimonen Could you check if #674 helps?
juimonen commentedon May 3, 2019
@bardliao I have it on my tree, and so it doesn't help at least on my issue...
juimonen commentedon May 3, 2019
@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
wenqingfu commentedon May 6, 2019
@ranj063 can you please test and confirm if your PR #895 would fix this issue?
ranj063 commentedon May 7, 2019
@wenqingfu no, my PR does not fix this issue. We have already tested it
6 remaining items
wenqingfu commentedon May 10, 2019
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
libinyang commentedon May 10, 2019
Yes, it is still a valid bug. So we should fix it, this is because:
kv2019i commentedon May 13, 2019
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.
ClarexZhou commentedon May 14, 2019
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
RanderWang commentedon May 15, 2019
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.
mengdonglin commentedon May 16, 2019
Closing as invalid use case for codec without support for digital output.
mengdonglin commentedon May 17, 2019
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.
mengdonglin commentedon May 17, 2019
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
wenqingfu commentedon May 17, 2019
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."