Skip to content

Conversation

@yongzhi1
Copy link
Contributor

With both INCLUDE_IIR_EQ and BT offload enabled, observe tplg load failed for:

[ 7.449626] sof-audio-pci 0000:00:1f.3: error: ipc error for 0x80010000 size 12
[ 7.449629] sof-audio-pci 0000:00:1f.3: error: failed to set DAI config for SSP0-Codec index 0
[ 7.449630] sof-audio-pci 0000:00:1f.3: error: failed to save DAI config for SSP0
[ 7.449631] sof-audio-pci 0000:00:1f.3: ASoC: physical link loading failed
[ 7.449633] sof-audio-pci 0000:00:1f.3: ASoC: topology: could not load header: -12

So conditionally compile BT as the feature is optional on tgl.

Signed-off-by: Yong Zhi yong.zhi@intel.com

@yongzhi1
Copy link
Contributor Author

yongzhi1 commented Jun 19, 2021

The above issue does not happen with either:

  1. Disable INCLUDE_IIR_EQ or
  2. Remove 2 HDMI pipelines

So looks like with both BT & EQ added, the system hits some resource limitation.

cc @kv2019i @juimonen @RDharageswari @macchian

@plbossart
Copy link
Member

@yongzhi1 can you look at sof-logger results to help root-cause the issue. I am not comfortable with such tricks unless we clarify what the problem really is - this main branch is not even using the actual pre- and post-processing.

@yongzhi1
Copy link
Contributor Author

@yongzhi1 can you look at sof-logger results to help root-cause the issue. I am not comfortable with such tricks unless we clarify what the problem really is - this main branch is not even using the actual pre- and post-processing.

When "[ 8.127019] sof-audio-pci 0000:00:1f.3: error: tplg component load failed -12" happened, the dsp log stopped after printing the 4 lines:

localhost ~ # sof-logger -l /lib/firmware/intel/sof/community/sof-tgl.ldc -t
TIMESTAMP (us) DELTA C# COMPONENT LOCATION CONTENT ktime=23.950s @ 2021-06-21 06:10:17 -0500 CDT
[ 15376819.753563] ( 0.000000) c0 dma-trace src/trace/dma-trace.c:335 ERROR FW ABI 0x3012001 DBG ABI 0x5003000 tag v0.0-0-g0000 src hash 0x32eafbe4 (ldc hash 0x32eafbe4)
[ 280.520822] ( 280.520813) c0 ll-schedule ./schedule/ll_schedule.c:407 task add 0x9e126480 dma-trace-task <2b972272-c5b1-4b7e-926f-0fc5cb4c4690>
[ 297.708322] ( 17.187500) c0 ll-schedule ./schedule/ll_schedule.c:411 task params pri 4 flags 0 start 500000 period 500000
[ 323.645820] ( 25.937498) c0 ll-schedule ./schedule/ll_schedule.c:323 new added task->start 3311848 at 3275627

I also suspected something else went wrong, but so far have not found direct clue.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be BT specific rather than IIR specific check (as there are IIR uses outside of BT)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me investigate a little further, there should be a more convincing cause of the failure.

Copy link
Contributor Author

@yongzhi1 yongzhi1 Jun 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ranj063 for sharing thesofproject/linux#3005, with that we can confirm this is indeed a resource related issue:

# code block
      755913.147046] (          18.229166) c0 ssp-dai      1.0   /drivers/intel/ssp/ssp.c:603  ssp_set_config(), ssrsa = 0x00000003, sstsa = 0x00000003
[      755932.469962] (          19.322916) c0 dai                           src/lib/dai.c:188  dai_put type 1 index 0 new sref 2
[      755958.772044] (          26.302082) c0 dai          2.13           src/audio/dai.c:706  dai_config() dai type = 1 index = 0 dd 0x9e142100
[      755982.886627] (          24.114582) c0 dai          2.13           src/audio/dai.c:736  ERROR dai_config(): No memory for dai_config.
[      756001.115793] (          18.229166) c0 ipc                   src/ipc/helper-ipc3.c:487  ERROR ipc_comp_dai_config(): comp_dai_config() failed

I agree it makes more sense to add a condition for BT instead of EQ.

@yongzhi1 yongzhi1 marked this pull request as draft June 21, 2021 22:24
@sathyap-chrome
Copy link
Contributor

@yongzhi1 i see similar IPC with latest build of ADL - do you see any issue latest changes ?
2021-06-15T09:21:31.533720Z ERR kernel: [ 7766.103026] sof-audio-pci-intel-tgl 0000:00:1f.3: error: ipc error for 0x80010000 size 12
2021-06-15T09:21:31.533742Z ERR kernel: [ 7766.112300] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to set DAI config for SSP0-Codec
2021-06-15T09:21:31.533744Z ERR kernel: [ 7766.122164] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on SSP0 Pin: -22
2021-06-15T09:21:31.551042Z ERR kernel: [ 7766.132861] SSP0-Codec: ASoC: soc_pcm_hw_params() failed (-22)
2021-06-15T09:21:31.551059Z ERR kernel: [ 7766.139492] Headset: ASoC: dpcm_fe_dai_hw_params failed (-22)

  • I see this with Brya I2S and this happens while plugging headset when youtube playback is going on.

@lgirdwood
Copy link
Member

@yongzhi1 i see similar IPC with latest build of ADL - do you see any issue latest changes ?
2021-06-15T09:21:31.533720Z ERR kernel: [ 7766.103026] sof-audio-pci-intel-tgl 0000:00:1f.3: error: ipc error for 0x80010000 size 12
2021-06-15T09:21:31.533742Z ERR kernel: [ 7766.112300] sof-audio-pci-intel-tgl 0000:00:1f.3: error: failed to set DAI config for SSP0-Codec
2021-06-15T09:21:31.533744Z ERR kernel: [ 7766.122164] sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on SSP0 Pin: -22
2021-06-15T09:21:31.551042Z ERR kernel: [ 7766.132861] SSP0-Codec: ASoC: soc_pcm_hw_params() failed (-22)
2021-06-15T09:21:31.551059Z ERR kernel: [ 7766.139492] Headset: ASoC: dpcm_fe_dai_hw_params failed (-22)

  • I see this with Brya I2S and this happens while plugging headset when youtube playback is going on.

@sathyap-chrome do you have the FW log as this will show if its a memory resource error like the one reported by @yongzhi1 otherwise we should open a new issue.

@sathyap-chrome
Copy link
Contributor

sathyap-chrome commented Jun 22, 2021

@lgirdwood this was seen in a valdiation machine run - wanted to understand from Yong. if we get right steps and able to repro on latest drop, will start a new issue.

Add -DINCLUDE_BT_OFFLOAD to conditionally compile BT audio offload
based on feature readiness and requirement.

Signed-off-by: Yong Zhi <yong.zhi@intel.com>
@yongzhi1
Copy link
Contributor Author

yongzhi1 commented Jun 22, 2021

v2 update:

Create "INCLUDE_BT_OFFLOAD" option to control the inclusion of BT offload into the tplg.
(By default this also removed BT offload from this m4, the feature is only officially supported on ADL/soundwire config, for sof-tgl-max98373-rt5682.m4 there is no requirement right now and we can enable BT when the mem issue to be resolved by dynamic pipe?)

@yongzhi1 yongzhi1 marked this pull request as ready for review June 24, 2021 13:23
@lgirdwood
Copy link
Member

@yongzhi1 @sathya-nujella this may not be needed, it looks the the OOM is hitting other things as well.
Fyi @keyonjie is refining the TGL heap to align with real usage. Lets retest this again after Keyons memory PR is merged.

@yongzhi1
Copy link
Contributor Author

Lets retest this again after Keyons memory PR is merged.

That's great to know @lgirdwood , I can check whenever the PR is ready, thanks @keyonjie

@yongzhi1
Copy link
Contributor Author

Verified with PR #4575, the OOM issue during tplg loading can be resolved, so current PR is no longer needed. A huge thanks to @keyonjie and SOF team!

@yongzhi1 yongzhi1 closed this Jul 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants