Skip to content

[BUG][mtl-004] nocodec playback can't work on MTL #7176

Closed

Description

@RanderWang

Test step: speaker-test -c 2 -t sine -Dhw:0,0 // SSP was used

Kernel: sof-dev
FW: mtl-004-drop-stable commit 09213dc
Topology: sof-main, binary mtl-nocodec.tplg

FW error log:

[00:00:00.163,918] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties dai_index 2
[00:00:00.163,965] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties fifo 172048
[00:00:00.164,016] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties handshake 6
[00:00:00.164,066] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties init delay 0
[00:00:00.164,186] dai_comp: dai_playback_params: comp:1 0x40001 dai_playback_params() dest_dev = 6 stream_id = 0 src_width = 4 dest_width = 4
[00:00:00.164,245] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties dai_index 2
[00:00:00.164,293] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties fifo 172048
[00:00:00.164,343] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties handshake 6
[00:00:00.164,393] dai_intel_ssp: dai_ssp_get_properties: dai_ssp_get_properties init delay 0
[00:00:00.165,100] dai_comp: comp:1 0x40001 dai_config_prepare(): dma_request_channel() failed
[00:00:00.165,190] pipe: pipe:1 0x0 pipeline_prepare(): ret = -5, dev->comp.id = 196608
[00:00:00.165,255] ipc: ipc: pipe 1 comp 0 prepare failed -5
[00:00:00.165,971] component: comp_set_state: comp:1 0x40001 comp_set_state(), state already set to 1

Activity

  1. added
    bugSomething isn't working as expected
    on Feb 27, 2023
  2. changed the title [-][BUG] mtl-004-drop-stable: nocodec playback can't work[/-] [+][BUG] mtl-004-drop-stable: nocodec playback can't work on MTL[/+] on Feb 27, 2023
  3. RanderWang commented on Feb 27, 2023

    @RanderWang
    CollaboratorAuthor
  4. RanderWang commented on Feb 27, 2023

    @RanderWang
    CollaboratorAuthor

    DMIC can work with 004 branch

  5. added
    I2SApplies to I2S bus for codec connection
    MTLApplies to Meteor Lake platform
    mtl-004Issues observed with mtl-004 release
    P1Blocker bugs or important features
    on Feb 27, 2023
  6. abonislawski commented on Feb 28, 2023

    @abonislawski
    Member

    Should be fixed now on mtl-004

  7. keqiaozhang commented on Mar 1, 2023

    @keqiaozhang
    Collaborator

    I tried latest mtl-004 branch(d769820), but the result is bad. playback failed at the first round with ipc timed out 0x13000004|0x1 GLB_SET_PIPELINE_STATE.
    https://sof-ci.ostc.intel.com/#/result/planresultdetail/21514

    @abonislawski , please help to double confirm it on your device.

  8. mengdonglin commented on Mar 1, 2023

    @mengdonglin
    Collaborator

    I tried latest mtl-004 branch(d769820), but the result is bad. playback failed at the first round with ipc timed out 0x13000004|0x1 GLB_SET_PIPELINE_STATE. https://sof-ci.ostc.intel.com/#/result/planresultdetail/21514

    @abonislawski , please help to double confirm it on your device.

    Here are the dmesg and mtrace when failure happened in case check-playback-all-formats.sh

    On MTL with SDW:
    dmesg:

    [  786.353442] kernel: snd_sof:sof_ipc4_trigger_pipelines: sof-audio-pci-intel-mtl 0000:00:1f.3: trigger cmd: 1 state: 4
    [  786.353481] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx      : 0x13000003|0x1: GLB_SET_PIPELINE_STATE [data size: 12]
    [  786.354952] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx reply: 0x33000000|0x1: GLB_SET_PIPELINE_STATE
    [  786.354977] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx done : 0x13000003|0x1: GLB_SET_PIPELINE_STATE [data size: 12]
    [  786.354984] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx      : 0x13000004|0x1: GLB_SET_PIPELINE_STATE [data size: 12]
    [  786.766684] kernel: soundwire_cadence:cdns_update_slave_status_work: soundwire_intel soundwire_intel.link.0: Slave status change: 0x40000
    [  786.767241] kernel: snd_soc_rt711_sdca:rt711_sdca_interrupt_callback: rt711-sdca sdw:0:025d:0711:01: rt711_sdca_interrupt_callback control_port_stat=4, sdca_cascade=1
    [  786.768347] kernel: soundwire_cadence:cdns_update_slave_status_work: soundwire_intel soundwire_intel.link.0: Slave status change: 0x20000
    [  786.798785] kernel: snd_soc_rt711_sdca:rt711_sdca_headset_detect: rt711-sdca sdw:0:025d:0711:01: rt711_sdca_headset_detect, detected_mode=0x3
    [  786.798794] kernel: snd_soc_rt711_sdca:rt711_sdca_jack_detect_handler: rt711-sdca sdw:0:025d:0711:01: in rt711_sdca_jack_detect_handler, jack_type=0x1
    [  786.798802] kernel: snd_soc_rt711_sdca:rt711_sdca_jack_detect_handler: rt711-sdca sdw:0:025d:0711:01: in rt711_sdca_jack_detect_handler, btn_type=0x0
    [  786.798809] kernel: snd_soc_rt711_sdca:rt711_sdca_jack_detect_handler: rt711-sdca sdw:0:025d:0711:01: in rt711_sdca_jack_detect_handler, scp_sdca_stat1=0x1, scp_sdca_stat2=0x0
    [  786.861399] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc timed out for 0x13000004|0x1
    [  786.861430] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: preventing DSP entering D3 state to preserve context
    [  786.861435] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ IPC dump start ]------------
    [  786.861465] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Host IPC initiator: 0x93000004|0x1|0x0, target: 0x33000000|0x1|0x0, ctl: 0x3
    [  786.861492] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ IPC dump end ]------------
    [  786.861511] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump start ]------------
    [  786.861530] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: IPC timeout
    [  786.861544] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: fw_state: SOF_FW_BOOT_COMPLETE (7)
    [  786.861568] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM status: 0x5, ROM error: 0x0
    [  786.861586] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM debug status: 0x50000005, ROM debug error: 0x0
    [  786.861608] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM feature bit enabled
    [  786.861624] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump end ]------------
    [  786.861659] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: failed to set final state 4 for all pipelines
    [  786.861682] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at soc_component_trigger on 0000:00:1f.3: -110
    [  786.861709] kernel:  Jack out: ASoC: trigger FE cmd: 1 failed: -110
    

    mtrace:

    [00:00:00.243,761] <inf> init: print_version_banner: FW ABI 0x301a000 DBG ABI 0x5003000 tags SOF:v2.0-rc1-2260-gd7698202f086 zephyr:v3.1.0-rc3-10534-g9c22efe46882 src hash 0x33132836 (ref hash 0x33132836)
    [00:00:00.244,011] <inf> clock: clock_set_freq: clock 0 set freq 10000000Hz freq_idx 0
    [00:00:00.244,148] <inf> clock: clock_set_freq: clock 1 set freq 10000000Hz freq_idx 0
    [00:00:00.244,278] <inf> clock: clock_set_freq: clock 2 set freq 10000000Hz freq_idx 0
    *** Booting Zephyr OS build v3.1.0-rc3-10534-g9c22efe46882 ***
    [00:00:00.245,733] <inf> main: main: SOF on intel_adsp_ace15_mtpm
    [00:00:00.245,833] <inf> main: main: SOF initialized
    [00:00:00.246,258] <inf> ipc: ipc_cmd: rx	: 0x44000000|0x31400008
    [00:00:00.250,393] <inf> ipc: ipc_cmd: rx	: 0x44000000|0x3060004c
    [00:00:56.508,730] <inf> ipc: ipc_cmd: rx	: 0x11000005|0x0
    [00:00:56.508,923] <inf> pipe: pipeline_new: pipeline new pipe_id 0 priority 0
    [00:00:56.513,125] <inf> ipc: ipc_cmd: rx	: 0x40000004|0x15
    [00:00:56.513,460] <inf> ipc: buffer_new: buffer new size 0x180 id 0.0 flags 0x0
    [00:00:56.513,860] <inf> dma: dma_get: dma_get() ID 0 sref = 1 busy channels 0
    Terminated
    

    On MTL in SSP nocodec mode:
    dmesg:

    [  785.069538] kernel: snd_sof:sof_pcm_trigger: sof-audio-pci-intel-mtl 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 1
    [  785.070061] kernel: snd_sof_intel_hda_common:hda_dsp_stream_trigger: sof-audio-pci-intel-mtl 0000:00:1f.3: FW Poll Status: reg[0x1c0]=0x14001e successful
    [  785.070068] kernel: snd_sof:sof_ipc4_trigger_pipelines: sof-audio-pci-intel-mtl 0000:00:1f.3: trigger cmd: 1 state: 4
    [  785.070106] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx      : 0x13000003|0x1: GLB_SET_PIPELINE_STATE [data size: 12]
    [  785.071584] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx reply: 0x33000000|0x1: GLB_SET_PIPELINE_STATE
    [  785.071601] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx done : 0x13000003|0x1: GLB_SET_PIPELINE_STATE [data size: 12]
    [  785.071608] kernel: snd_sof:sof_ipc4_log_header: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc tx      : 0x13000004|0x1: GLB_SET_PIPELINE_STATE [data size: 12]
    [  785.571657] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ipc timed out for 0x13000004|0x1
    [  785.571711] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: preventing DSP entering D3 state to preserve context
    [  785.571716] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ IPC dump start ]------------
    [  785.571764] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: Host IPC initiator: 0x93000004|0x1|0x0, target: 0x33000000|0x1|0x0, ctl: 0x3
    [  785.571813] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ IPC dump end ]------------
    [  785.571850] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump start ]------------
    [  785.571886] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: IPC timeout
    [  785.571914] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: fw_state: SOF_FW_BOOT_COMPLETE (7)
    [  785.571955] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM status: 0x5, ROM error: 0x0
    [  785.571989] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM debug status: 0x50000005, ROM debug error: 0x0
    [  785.572030] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ROM feature bit enabled
    [  785.572067] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ------------[ DSP dump end ]------------
    [  785.572120] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: failed to set final state 4 for all pipelines
    [  785.572160] kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at soc_component_trigger on 0000:00:1f.3: -110
    [  785.572208] kernel:  Port0: ASoC: trigger FE cmd: 1 failed: -110
    

    mtrace:

    [00:00:00.571,171] <inf> init: print_version_banner: FW ABI 0x301a000 DBG ABI 0x5003000 tags SOF:v2.0-rc1-2260-gd7698202f086 zephyr:v3.1.0-rc3-10534-g9c22efe46882 src hash 0x33132836 (ref hash 0x33132836)
    [00:00:00.571,420] <inf> clock: clock_set_freq: clock 0 set freq 10000000Hz freq_idx 0
    [00:00:00.571,556] <inf> clock: clock_set_freq: clock 1 set freq 10000000Hz freq_idx 0
    [00:00:00.571,688] <inf> clock: clock_set_freq: clock 2 set freq 10000000Hz freq_idx 0
    *** Booting Zephyr OS build v3.1.0-rc3-10534-g9c22efe46882 ***
    [00:00:00.573,141] <inf> main: main: SOF on intel_adsp_ace15_mtpm
    [00:00:00.573,243] <inf> main: main: SOF initialized
    [00:00:00.573,668] <inf> ipc: ipc_cmd: rx	: 0x43000000|0x20701000
    [00:00:00.577,228] <inf> ipc: ipc_cmd: rx	: 0x44000000|0x31400008
    [00:00:00.578,310] <inf> ipc: ipc_cmd: rx	: 0x44000000|0x3060004c
    [00:01:04.061,260] <inf> ipc: ipc_cmd: rx	: 0x11000005|0x0
    [00:01:04.061,415] <inf> pipe: pipeline_new: pipeline new pipe_id 0 priority 0
    [00:01:04.074,771] <inf> ipc: ipc_cmd: rx	: 0x40000004|0x15
    Terminated
    
  9. abonislawski commented on Mar 3, 2023

    @abonislawski
    Member

    @mengdonglin @keqiaozhang can we rerun and double confirm? It works fine on my linux platform and Dhara also reported echo ref is working fine on 004

  10. keqiaozhang commented on Mar 7, 2023

    @keqiaozhang
    Collaborator

    This issue is related to the debug build, if we enable the debug option -d when building FW, we will run to this error on all MTL platforms.

  11. kv2019i commented on Mar 7, 2023

    @kv2019i
    Collaborator

    @abonislawski I suspect this an assert. This branch has "app: zephyr: enable CONFIG_ASSERT in debug overlay" commit, but I suspect either SOF or the Zephyr branch used here, is missing some assert fix, and now you hit an assert when you build with "-d" (which enables asserts now).

  12. abonislawski commented on Mar 7, 2023

    @abonislawski
    Member

    @keqiaozhang @kv2019i I assume debug build works fine on main branch?

  13. keqiaozhang commented on Mar 8, 2023

    @keqiaozhang
    Collaborator

    @abonislawski debug build works fine on main branch.

  14. changed the title [-][BUG] mtl-004-drop-stable: nocodec playback can't work on MTL[/-] [+][BUG][mtl-004] nocodec playback can't work on MTL[/+] on Mar 8, 2023
  15. abonislawski commented on Mar 9, 2023

    @abonislawski
    Member

    I found root cause for crashing with -d option, normal FW (without -d) is affected too but still handle this.

    @keqiaozhang I need assistance from kernel team to check why FW receives 0 CPC for gain module, all other modules are fine.

    Analyzed today the problem with -d option, we are crashing because of wrong clock selected for this load and this results in timer overruns. Without -d option DSP can still handle it and crashing only with asserts enabled.

    However, the clock selection mechanism and manifest data are correct. The true root cause is incorrect data in IPC for gain module. For gain FW receives 0 CPC instead of 10183 from manifest and this results in wrong calculations for clock selection. All other modules receives normal CPC.

    #7228

  16. RanderWang commented on Mar 10, 2023

    @RanderWang
    CollaboratorAuthor

    @abonislawski It is missed in gain setting in topology. Let me add it.

  17. abonislawski commented on Mar 10, 2023

    @abonislawski
    Member

    @RanderWang thanks!

    So looks like manifest data is ignored anyway, for example for MIXIN in topology I can see CPC 910 but measured minimum is 2572 (added to rimage manifest here thesofproject/rimage@0bcef6f )

    Why this works like that?

  18. RanderWang commented on Mar 10, 2023

    @RanderWang
    CollaboratorAuthor

    @abonislawski First I wanted to talk about windows driver. The cpc value is zero in extended module config and windows driver calculates it based on CPS, then sends to FW. So Linux driver should do it like this, but now we get cpc from topology, not from extended module config. I don't think we need to set cpc value in rimage for above reason

  19. RanderWang commented on Mar 10, 2023

    @RanderWang
    CollaboratorAuthor

    topology change: #7242

  20. abonislawski commented on Mar 10, 2023

    @abonislawski
    Member

    @RanderWang its not really a big difference cps/cpc, it can be calculated from one to another. At the end we need to get CPC in FW, its fine if you calculate it from cps (but from manifest as in current windows solution).
    However please note that windows solution have limitations (for example lets think about copier types but cps/cpc is based only on format) and it is already outdated and we could think about something better where we could differentiate normal copier from i2s copier, etc. so after all topology solution is not that bad but at least needs to be extended

  21. RanderWang commented on Mar 10, 2023

    @RanderWang
    CollaboratorAuthor

    @RanderWang its not really a big difference cps/cpc, it can be calculated from one to another. At the end we need to get CPC in FW, its fine if you calculate it from cps (but from manifest as in current windows solution). However please note that windows solution have limitations (for example lets think about copier types but cps/cpc is based only on format) and it is already outdated and we could think about something better where we could differentiate normal copier from i2s copier, etc. so after all topology solution is not that bad but at least needs to be extended

    @abonislawski Thanks for your info. We need to figure out a general method to make cSOF compatible with both windows and Linux.

  22. RanderWang commented on Mar 20, 2023

    @RanderWang
    CollaboratorAuthor

    fixed

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

Metadata

Metadata

Assignees

Labels

I2SApplies to I2S bus for codec connectionMTLApplies to Meteor Lake platformP1Blocker bugs or important featuresbugSomething isn't working as expectedmtl-004Issues observed with mtl-004 release

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions