thesofproject / linux

Linux kernel source tree
Other
91 stars 133 forks source link

MTL SDW AOIC fails to load topology #4906

Closed plbossart closed 8 months ago

plbossart commented 8 months ago

From the latest kernel, we can see that 'SDW2-playback' is not created by the machine driver

[    6.336183] snd_soc_sof_sdw:mc_probe: sof_sdw sof_sdw: Entry
[    6.336190] snd_soc_sof_sdw:log_quirks: sof_sdw sof_sdw: quirk realtek,jack-detect-source 3
[    6.336192] snd_soc_sof_sdw:count_sdw_endpoints: sof_sdw sof_sdw: Found 2 devices with 2 endpoints
[    6.336196] snd_soc_sof_sdw:parse_sdw_endpoints: sof_sdw sof_sdw: Adding prefix rt711 for sdw:0:0:025d:0711:01
[    6.336197] snd_soc_sof_sdw:parse_sdw_endpoints: sof_sdw sof_sdw: Add dev: 0, 0x30025d071101 end: 0, SimpleJack, P/C to solo: 0
[    6.336201] snd_soc_sof_sdw:parse_sdw_endpoints: sof_sdw sof_sdw: Adding prefix rt1316-1 for sdw:0:3:025d:1316:01
[    6.336202] snd_soc_sof_sdw:parse_sdw_endpoints: sof_sdw sof_sdw: Add dev: 3, 0x330025d131601 end: 0, SmartAmp, P/C to solo: 0
[    6.336204] snd_soc_sof_sdw:sof_card_dai_links_create: sof_sdw sof_sdw: sdw 4, ssp 0, dmic 0, hdmi 3, bt: 0
[    6.336208] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Playback, id 0
[    6.336235] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW0-Capture, id 1
[    6.336238] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW3-Playback, id 2
[    6.336241] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link SDW3-Capture, id 3
[    6.336243] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link iDisp1, id 4
[    6.336246] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link iDisp2, id 5
[    6.336249] snd_soc_sof_sdw:init_dai_link: sof_sdw sof_sdw: create dai link iDisp3, id 6
[    6.336583] snd_sof:snd_sof_load_topology: sof-audio-pci-intel-mtl 0000:00:1f.3: loading topology:intel/sof-ipc4-tplg/sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg
....
[    6.336939] snd_sof:sof_widget_ready: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: widget 21 (alh-copier.SDW2-Playback.0) is ready [type: 27, pipe: 21, pins: 1 / 0, stream: SDW2-Playback]
[    6.336943] sof-audio-pci-intel-mtl 0000:00:1f.3: error: can't connect DAI alh-copier.SDW2-Playback.0 stream SDW2-Playback
[    6.336970] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : alh-copier.SDW2-Playback.0 stream SDW2-Playback
[    6.336992] sof_sdw sof_sdw: ASoC: failed to load widget alh-copier.SDW2-Playback.0
[    6.337004] sof_sdw sof_sdw: ASoC: topology: could not load header: -22
[    6.337038] sof-audio-pci-intel-mtl 0000:00:1f.3: error: tplg component load failed -22
[    6.337053] sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to load DSP topology -22
[    6.337066] sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
[    6.337095] sof_sdw sof_sdw: ASoC: failed to instantiate card -22
[    6.337317] sof_sdw sof_sdw: error -EINVAL: snd_soc_register_card failed -22
[    6.337349] sof_sdw sof_sdw: probe with driver sof_sdw failed with error -22

This looks like either a bug in the machine driver after all the changes from @bardliao and @charleskeepax, or a problem with the topology.

I vote for the former, it's not clear to me why the microphone link is not created even though there's clearly a RT714 device listed.

plbossart commented 8 months ago

Haha it's a bug in my own code, I added the ACPI entry in the wrong location so we select the HP Omen 14 configuration instead of the MTL SDW AOIC

This was not detected because of the silly use of the tplg_name kernel parameter

root@jf-mtlp-rvp-sdw-4:/etc/modprobe.d# more tplg_filename.conf 
options snd-sof-pci tplg_filename=sof-mtl-rt711-l0-rt1316-l23-rt714-l1.tplg

@fredoh9 @marc-hb we have to stop using those kernel parameters, and track what the kernel selects. The override should ONLY be used for specific configurations.

marc-hb commented 8 months ago

Here's another example just for the record

https://sof-ci.01.org/linuxpr/PR4902/build2084/devicetest/index.html

journalctl -b a399ac4dcb1f4a1eacb56b3c68010721

Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_widget_ready: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: widget 17 (host-copier.2.playback) is ready [type: 23, pipe: 20, pins: 0 / 1, stream: sdw amplifiers]
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_control_load: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: load control type 1 name : Amplifier Volume
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_control_load_volume: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: load kcontrol index 18 chans 2
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_widget_ready: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: widget 18 (gain.20.1) is ready [type: 6, pipe: 20, pins: 1 / 1, stream: none]
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_widget_ready: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: widget 19 (mixin.20.1) is ready [type: 4, pipe: 20, pins: 1 / 3, stream: none]
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_widget_ready: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: widget 20 (pipeline.20) is ready [type: 32, pipe: 20, pins: 0 / 0, stream: none]
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_sof:sof_widget_ready: sof-audio-pci-intel-mtl 0000:00:1f.3: tplg: widget 21 (alh-copier.SDW2-Playback.0) is ready [type: 27, pipe: 21, pins: 1 / 0, stream: SDW2-Playback]
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: error: can't connect DAI alh-copier.SDW2-Playback.0 stream SDW2-Playback
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to add widget id 0 type 27 name : alh-copier.SDW2-Playback.0 stream SDW2-Playback
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof_sdw sof_sdw: ASoC: failed to load widget alh-copier.SDW2-Playback.0
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof_sdw sof_sdw: ASoC: topology: could not load header: -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: error: tplg component load failed -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: error: failed to load DSP topology -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof-audio-pci-intel-mtl 0000:00:1f.3: ASoC: error at snd_soc_component_probe on 0000:00:1f.3: -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof_sdw sof_sdw: ASoC: failed to instantiate card -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof_sdw sof_sdw: error -EINVAL: snd_soc_register_card failed -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: sof_sdw sof_sdw: probe with driver sof_sdw failed with error -22
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_soc_rt1316_sdw:rt1316_io_init: rt1316-sdca sdw:0:2:025d:1316:01: rt1316_io_init hw_init complete
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: soundwire_bus:sdw_handle_slave_status: rt1316-sdca sdw:0:2:025d:1316:01: signaling initialization completion for Slave 1
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_soc_rt1316_sdw:rt1316_io_init: rt1316-sdca sdw:0:3:025d:1316:01: rt1316_io_init hw_init complete
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: soundwire_bus:sdw_handle_slave_status: rt1316-sdca sdw:0:3:025d:1316:01: signaling initialization completion for Slave 1
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_soc_rt711_sdca:rt711_sdca_calibration: rt711-sdca sdw:0:0:025d:0711:01: rt711_sdca_calibration calibration complete, ret=0
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: snd_soc_rt711_sdca:rt711_sdca_io_init: rt711-sdca sdw:0:0:025d:0711:01: rt711_sdca_io_init hw_init complete
Apr 04 21:38:18 jf-mtlp-rvp-sdw-3 kernel: soundwire_bus:sdw_handle_slave_status: rt711-sdca sdw:0:0:025d:0711:01: signaling initialization completion for Slave 6
marc-hb commented 8 months ago

This was not detected because of the silly use of the tplg_name kernel parameter

You're preaching to the choir.

On the other hand, nothing there changed recently.

This regression was caught in #4882 (MTLP AIOC entirely red) yet it was merged anyway.

plbossart commented 8 months ago

this just shows that when CI provides unclear results with no logs, everyone will ignore CI results. Me included.

marc-hb commented 8 months ago

this just shows that when CI provides unclear results with no logs, everyone will ignore CI results. Me included.

Yes, the entire industry knows that by now.

https://www.martinfowler.com/articles/continuousIntegration.html#FixBrokenBuildsImmediately