Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-sof-logger: fix the DSP boot check #1095

Conversation

kv2019i
Copy link
Contributor

@kv2019i kv2019i commented Sep 4, 2023

The DSP boot check reload_drivers() must wait longer than 5 seconds as we have many configurations where DSP boot will take more than 60sec (due to e.g. Intel platforms with i915 hardware present but driver not present in the kernel version under test).

Additionally the test case must check whether DSP did boot up after the timeout expires, and fail the test case if it didn't.

@kv2019i kv2019i requested a review from a team as a code owner September 4, 2023 10:29
ujfalusi
ujfalusi previously approved these changes Sep 4, 2023
Copy link
Contributor

@ujfalusi ujfalusi left a comment

Choose a reason for hiding this comment

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

@kv2019i, wow, that's a nice catch (and overlook in the test code)

dlogi "Polling ${CARD_NODE}, waiting for DSP boot..."
for i in $(seq 1 5); do
for i in $(seq 1 70); do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you use MAX_WAIT_FW_LOADING here? See #1059 for other use cases

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you look at the (small) PRs linked from #1059 you will see a new, convenience function poll_wait_for() function that can likely replace this loop.

Copy link
Collaborator

@marc-hb marc-hb left a comment

Choose a reason for hiding this comment

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

Is this a fix for #01077 ? If yes please mention it in the commit message.

dlogi "Polling ${CARD_NODE}, waiting for DSP boot..."
for i in $(seq 1 5); do
for i in $(seq 1 70); do
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you look at the (small) PRs linked from #1059 you will see a new, convenience function poll_wait_for() function that can likely replace this loop.

@fredoh9 fredoh9 self-requested a review September 5, 2023 18:06
Copy link
Collaborator

@fredoh9 fredoh9 left a comment

Choose a reason for hiding this comment

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

Good catch!

The DSP boot check reload_drivers() must wait longer than 5 seconds as
we have many configurations where DSP boot will take more than 60sec
(due to e.g. Intel platforms with i915 hardware present but driver not
present in the kernel version under test).

Additionally the test case must check whether DSP did boot
up after the timeout expires, and fail the test case if it
didn't.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i kv2019i force-pushed the 202309-fix-sof-logger-check-reload-dsp-boot branch from 94e9731 to 6220dba Compare September 6, 2023 13:11
@kv2019i
Copy link
Contributor Author

kv2019i commented Sep 6, 2023

Fixed the variable, will try to adopt the poll loop.

Use poll_wait_for() to implement polling for DSP boot.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Suggested-by: Marc Herbert <marc.herbert@intel.com>
@kv2019i
Copy link
Contributor Author

kv2019i commented Sep 6, 2023

V3 uploaded:

  • moves to use the poll_wait_for()

@marc-hb
Copy link
Collaborator

marc-hb commented Sep 6, 2023

@marc-hb marc-hb requested a review from plbossart September 6, 2023 21:59
@marc-hb
Copy link
Collaborator

marc-hb commented Sep 6, 2023

Interesting, rt1011 i2c-10EC1011:00 needs about 10 seconds to boot every time on cml-hel-rt5682. Confirmed on two different devices. @plbossart is that a bug?

In any case I will bump the default timeout to 13 seconds.

Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: snd_sof:ipc3_log_header: sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: snd_sof:sof_ipc3_complete_pipeline: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: complete pipeline PIPELINE.1.SSP0.OUT id 5
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: snd_sof:ipc3_log_header: sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: snd_hda_codec_hdmi ehdaudio0D2: ASoC: sink widget AIF1TX overwritten
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: snd_hda_codec_hdmi ehdaudio0D2: ASoC: source widget AIF1RX overwritten
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:00: ADC offset=0x0
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:00: Gain0 offset=0x1ffeea
Sep 06 21:59:16 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:00: Gain1 offset=0x1ffed2
Sep 06 21:59:17 jf-cml-hel-rt5682-01 kernel: usbcore: registered new interface driver snd-usb-audio
Sep 06 21:59:18 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:00: r0 resistance about 7.26 ohm, reg=0x2337F6
Sep 06 21:59:19 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:01: ADC offset=0x0
Sep 06 21:59:19 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:01: Gain0 offset=0x1bf
Sep 06 21:59:19 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:01: Gain1 offset=0x196
Sep 06 21:59:21 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:01: r0 resistance about 6.89 ohm, reg=0x2521A7
Sep 06 21:59:21 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:02: ADC offset=0x0
Sep 06 21:59:21 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:02: Gain0 offset=0x1ffca4
Sep 06 21:59:21 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:02: Gain1 offset=0x1ffd97
Sep 06 21:59:23 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:02: r0 resistance about 5.92 ohm, reg=0x2B2D08
Sep 06 21:59:23 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:03: ADC offset=0x0
Sep 06 21:59:23 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:03: Gain0 offset=0x276
Sep 06 21:59:23 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:03: Gain1 offset=0x2d2
Sep 06 21:59:25 jf-cml-hel-rt5682-01 kernel: rt1011 i2c-10EC1011:03: r0 resistance about 6.16 ohm, reg=0x297CAC
Sep 06 21:59:26 jf-cml-hel-rt5682-01 kernel: snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: creating new PCM DMIC16kHz
Sep 06 21:59:26 jf-cml-hel-rt5682-01 kernel: snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: spcm: allocate Sound Trigger Capture 8 capture DMA buffer size 0x83400 max 0x138800
Sep 06 21:59:26 jf-cml-hel-rt5682-01 kernel: snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: creating new PCM Port1
Sep 06 21:59:26 jf-cml-hel-rt5682-01 kernel: snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: spcm: allocate Passthrough Playback 0 playback DMA buffer size 0x10000 max 0x10000

marc-hb added a commit to marc-hb/sof-test that referenced this pull request Sep 6, 2023
rt1011 i2c-10EC1011:00 needs about 10 seconds to boot every time on
cml-hel-rt5682, see evidence in thesofproject#1095

```
21:59:16 snd_sof:ipc3_log_header: sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
21:59:16 snd_sof:sof_ipc3_complete_pipeline: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: complete pipeline PIPELINE.1.SSP0.OUT id 5
21:59:16 snd_sof:ipc3_log_header: sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
21:59:16 snd_hda_codec_hdmi ehdaudio0D2: ASoC: sink widget AIF1TX overwritten
21:59:16 snd_hda_codec_hdmi ehdaudio0D2: ASoC: source widget AIF1RX overwritten
21:59:16 rt1011 i2c-10EC1011:00: ADC offset=0x0
21:59:16 rt1011 i2c-10EC1011:00: Gain0 offset=0x1ffeea
21:59:16 rt1011 i2c-10EC1011:00: Gain1 offset=0x1ffed2
21:59:17 usbcore: registered new interface driver snd-usb-audio
21:59:18 rt1011 i2c-10EC1011:00: r0 resistance about 7.26 ohm, reg=0x2337F6
21:59:19 rt1011 i2c-10EC1011:01: ADC offset=0x0
21:59:19 rt1011 i2c-10EC1011:01: Gain0 offset=0x1bf
21:59:19 rt1011 i2c-10EC1011:01: Gain1 offset=0x196
21:59:21 rt1011 i2c-10EC1011:01: r0 resistance about 6.89 ohm, reg=0x2521A7
21:59:21 rt1011 i2c-10EC1011:02: ADC offset=0x0
21:59:21 rt1011 i2c-10EC1011:02: Gain0 offset=0x1ffca4
21:59:21 rt1011 i2c-10EC1011:02: Gain1 offset=0x1ffd97
21:59:23 rt1011 i2c-10EC1011:02: r0 resistance about 5.92 ohm, reg=0x2B2D08
21:59:23 rt1011 i2c-10EC1011:03: ADC offset=0x0
21:59:23 rt1011 i2c-10EC1011:03: Gain0 offset=0x276
21:59:23 rt1011 i2c-10EC1011:03: Gain1 offset=0x2d2
21:59:25 rt1011 i2c-10EC1011:03: r0 resistance about 6.16 ohm, reg=0x297CAC
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: creating new PCM DMIC16kHz
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: spcm: allocate Sound Trigger Capture 8 capture DMA buffer size 0x83400 max 0x138800
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: creating new PCM Port1
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: spcm: allocate Passthrough Playback 0 playback DMA buffer size 0x10000 max 0x10000
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
marc-hb added a commit that referenced this pull request Sep 7, 2023
rt1011 i2c-10EC1011:00 needs about 10 seconds to boot every time on
cml-hel-rt5682, see evidence in #1095

```
21:59:16 snd_sof:ipc3_log_header: sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
21:59:16 snd_sof:sof_ipc3_complete_pipeline: sof-audio-pci-intel-cnl 0000:00:1f.3: tplg: complete pipeline PIPELINE.1.SSP0.OUT id 5
21:59:16 snd_sof:ipc3_log_header: sof-audio-pci-intel-cnl 0000:00:1f.3: ipc tx: 0x30130000: GLB_TPLG_MSG: PIPE_COMPLETE
21:59:16 snd_hda_codec_hdmi ehdaudio0D2: ASoC: sink widget AIF1TX overwritten
21:59:16 snd_hda_codec_hdmi ehdaudio0D2: ASoC: source widget AIF1RX overwritten
21:59:16 rt1011 i2c-10EC1011:00: ADC offset=0x0
21:59:16 rt1011 i2c-10EC1011:00: Gain0 offset=0x1ffeea
21:59:16 rt1011 i2c-10EC1011:00: Gain1 offset=0x1ffed2
21:59:17 usbcore: registered new interface driver snd-usb-audio
21:59:18 rt1011 i2c-10EC1011:00: r0 resistance about 7.26 ohm, reg=0x2337F6
21:59:19 rt1011 i2c-10EC1011:01: ADC offset=0x0
21:59:19 rt1011 i2c-10EC1011:01: Gain0 offset=0x1bf
21:59:19 rt1011 i2c-10EC1011:01: Gain1 offset=0x196
21:59:21 rt1011 i2c-10EC1011:01: r0 resistance about 6.89 ohm, reg=0x2521A7
21:59:21 rt1011 i2c-10EC1011:02: ADC offset=0x0
21:59:21 rt1011 i2c-10EC1011:02: Gain0 offset=0x1ffca4
21:59:21 rt1011 i2c-10EC1011:02: Gain1 offset=0x1ffd97
21:59:23 rt1011 i2c-10EC1011:02: r0 resistance about 5.92 ohm, reg=0x2B2D08
21:59:23 rt1011 i2c-10EC1011:03: ADC offset=0x0
21:59:23 rt1011 i2c-10EC1011:03: Gain0 offset=0x276
21:59:23 rt1011 i2c-10EC1011:03: Gain1 offset=0x2d2
21:59:25 rt1011 i2c-10EC1011:03: r0 resistance about 6.16 ohm, reg=0x297CAC
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: creating new PCM DMIC16kHz
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: spcm: allocate Sound Trigger Capture 8 capture DMA buffer size 0x83400 max 0x138800
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: creating new PCM Port1
21:59:26 snd_sof:sof_pcm_new: sof-audio-pci-intel-cnl 0000:00:1f.3: spcm: allocate Passthrough Playback 0 playback DMA buffer size 0x10000 max 0x10000
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@marc-hb
Copy link
Collaborator

marc-hb commented Sep 7, 2023

SOFCI TEST

EDIT: with the increase to 13s, check-sof-logger is now passing on cml-hel-rt5682 in https://sof-ci.01.org/softestpr/PR1095/build702/devicetest/index.html! The logs show this device needs indeed 10s. For most other devices 1s seems enough.

The unrelated APL topology error will be fixed by thesofproject/sof#8175

The MTL test plan https://sof-ci.01.org/softestpr/PR1095/build701/devicetest/index.html is lagging as usual because of thesofproject/sof#8174 but it already passed before the 13s increase. It's not running this test anyway.

https://sof-ci.01.org/softestpr/PR1095/build703/devicetest/index.html is all green.

@marc-hb marc-hb merged commit cd1502a into thesofproject:main Sep 7, 2023
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