Skip to content

SOF modules reloading failure  #835

Closed

Description

@keqiaozhang

Describe the bug
Failed to set intel-hdmi-hifi2 hw params when unloading the sof modules

To Reproduce
$: ./sof_remove.sh
This script can be found in:
https://github.com/thesofproject/sof/blob/master/tools/kmod_scripts/sof_remove.sh

Expected behavior
SOF modules can be unloaded/reloaded repeatedly.

Impact
ASoC: can't set intel-hdmi-hifi2 hw params: -19

Environment

  1. Kernel: origin/topic/sof-dev-2de29f
    Firmware: origin/sof-master-00bbb1
  2. tplg name:sof-glk-da7219.tplg
  3. GLK Chromebook.
  4. Reproducibility Rate:100%

Screenshots or console output
None

dmesg

[   13.377579] sof-audio-pci 0000:00:0e.0: pcm: open stream 6 dir 0
[   13.377582] sof-audio-pci 0000:00:0e.0: period min 192 max 16384 bytes
[   13.377584] sof-audio-pci 0000:00:0e.0: period count 2 max 16
[   13.377585] sof-audio-pci 0000:00:0e.0: buffer max 65536 bytes
[   13.377782] HDMI HDA Codec ehdaudio0D2: ASoC: can't set intel-hdmi-hifi2 hw params: -19
[   13.377787]  iDisp2: ASoC: hw_params BE failed -19
[   13.377789]  HDMI2: ASoC: hw_params BE failed -19

dmesg.log

Activity

  1. added
    bugSomething isn't working
    P1Blocker bugs or important features
    GLKApplies to Gemini Lake
    on Apr 15, 2019
  2. keqiaozhang commented on Apr 15, 2019

    @keqiaozhang
    Author

    This issue may related to #828 , but need developer to double confirm it.

  3. wenqingfu commented on Apr 15, 2019

    @wenqingfu

    @ranj063 can you confirm if it's the same regression from #828 that can be fixed by your PR #834 ?

  4. ranj063 commented on Apr 15, 2019

    @ranj063
    Collaborator

    @wenqingfu I dont have a glk runnign ubuntu. @fredoh9 has offered to do the test this afternoon. Thanks Fred

  5. fredoh9 commented on Apr 15, 2019

    @fredoh9
    Collaborator

    I tested HDMI playback(HW:0,5) with kernel tip and with Ranj's PR. I still see "failed -19" with Ranj's fix also. Attached two logs.

    glk_0415_kernel_tip.log
    glk_0415_ranj_fix.log

  6. xiulipan commented on Apr 16, 2019

    @xiulipan

    @fredoh9

    [ 56.811657] HDMI HDA Codec ehdaudio0D2: ASoC: can't set intel-hdmi-hifi1 hw params: -19
    [ 56.811661] iDisp1: ASoC: hw_params BE failed -19
    [ 56.811663] HDMI1: ASoC: hw_params BE failed -19

    This means you have wrong config or wrong hw connection to the monitor. So the hdmi-codec is not find.

  7. changed the title [-]SOF modules unloading failure [/-] [+]SOF modules reloading failure [/+] on Apr 16, 2019
  8. keqiaozhang commented on Apr 16, 2019

    @keqiaozhang
    Author

    @fredoh9

    [ 56.811657] HDMI HDA Codec ehdaudio0D2: ASoC: can't set intel-hdmi-hifi1 hw params: -19
    [ 56.811661] iDisp1: ASoC: hw_params BE failed -19
    [ 56.811663] HDMI1: ASoC: hw_params BE failed -19

    This means you have wrong config or wrong hw connection to the monitor. So the hdmi-codec is not find.

    @xiulipan
    You are right, this error is caused by the wrong amixer setting for HDMI. It can be fixed by

    amixer -c0 cset name='Pin5-Port0 Mux' 1
    amixer -c0 cset name='Pin5-Port1 Mux' 1
    amixer -c0 cset name='Pin5-Port2 Mux' 1
    amixer -c0 cset name='Pin6-Port0 Mux' 2
    amixer -c0 cset name='Pin6-Port1 Mux' 2
    amixer -c0 cset name='Pin6-Port2 Mux' 2
    amixer -c0 cset name='Pin7-Port0 Mux' 3
    amixer -c0 cset name='Pin7-Port1 Mux' 3
    amixer -c0 cset name='Pin7-Port2 Mux' 3
    

    After this, sof modules can be unloaded. But it run to another error when reloading sof modules:

    [  134.286407] da7219 i2c-DLGS7219:00: Invalid VDDIO voltage
    [  134.286814] da7219 i2c-DLGS7219:00: Using default DAI clk names: da7219-dai-wclk, da7219-dai-bclk
    [  134.289069] genirq: Flags mismatch irq 0. 00002008 (da7219-aad) vs. 00015a00 (timer)
    [  134.289086] da7219 i2c-DLGS7219:00: Failed to request IRQ: -16
    [  134.289089] da7219 i2c-DLGS7219:00: ASoC: failed to probe component -16
    [  134.289102] bxt_da7219_max98357a glk_da7219_max98357a: ASoC: failed to instantiate card -16
    

    Bug title is revised to modules reloading.
    dmesg.log

  9. zhuyingjiang commented on Apr 22, 2019

    @zhuyingjiang

    This seems a da7219 codec issue, when rmmod snd_soc_da7219 and then modprobe snd_soc_da7219, the irq number of the da7219 i2c is 0. But by the first load by the OS the irq is 96. So the load component in the SOF failed.

  10. keqiaozhang commented on Jun 3, 2019

    @keqiaozhang
    Author

    I tried this issue today with latest code base and the error message is changed.
    when reloading the audio modules, it run into DSP panic, but all audio modules can be reloaded and sof is still functional after that(aplay/arecord can run). looks like this error is just a warning, Could someone take a look.
    dmesg

    [   36.536364] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x5000001 successful
    [   36.551364] sof-audio-pci 0000:00:0e.0: FW Poll Status: reg=0x5 successful
    [   36.551367] sof-audio-pci 0000:00:0e.0: Firmware download successful, booting...
    [   36.551514] sof-audio-pci 0000:00:0e.0: error : DSP panic!
    [   36.551520] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
    [   36.551523] sof-audio-pci 0000:00:0e.0: error: status = 0x0dead000 panic = 0x00000220
    [   36.551525] sof-audio-pci 0000:00:0e.0: status: fw entered - code 00000005
    [   36.554245] sof-audio-pci 0000:00:0e.0: ipc rx: 0x70000000: FW_READY
    [   36.554248] sof-audio-pci 0000:00:0e.0: ipc: DSP is ready 0x70000000 offset 0x81000
    [   36.554264] sof-audio-pci 0000:00:0e.0: Firmware info: version 1:1:0-8901e
    [   36.554265] sof-audio-pci 0000:00:0e.0: Firmware: ABI 3:7:0 Kernel ABI 3:7:0
    [   36.554292] sof-audio-pci 0000:00:0e.0: found ext header type 1 size 0xb8
    [   36.554327] sof-audio-pci 0000:00:0e.0:  mailbox upstream 0x81000 - size 0x1000
    [   36.554329] sof-audio-pci 0000:00:0e.0:  mailbox downstream 0xa0000 - size 0x2000
    [   36.554330] sof-audio-pci 0000:00:0e.0:  stream region 0xc1000 - size 0x1000
    [   36.554334] sof-audio-pci 0000:00:0e.0: ipc rx done: 0x70000000: FW_READY
    [   36.554337] sof-audio-pci 0000:00:0e.0: firmware boot complete
    

    dmesg.log
    logger-trace.log

    Test recipe:
    Kernel: sof-dev/0a747dc
    sof/tplg: master/8901e
    Platform: GLK-Ubuntu

  11. xiulipan commented on Jun 3, 2019

    @xiulipan

    @keqiaozhang
    which tplg is used for GLK-ubuntu?
    That is a very interesting issue here, there is panic(SOF_IPC_PANIC_MEM); happen before we send out the FW_READY ipc message.
    @tlauda any idea?

  12. keqiaozhang commented on Jun 3, 2019

    @keqiaozhang
    Author

    @keqiaozhang
    which tplg is used for GLK-ubuntu?
    sof-glk-da7219.tplg

  13. YvonneYang2 commented on Jul 12, 2019

    @YvonneYang2

    Issue not reproduced on glk with test recipe as below:

    Test recipe:
    Firmware: 09b416b https://github.com/thesofproject/sof/commits/master
    Kernel: 4a8b4fb https://github.com/thesofproject/linux/commits/topic/sof-dev
    Topology: file: tools/topology/sof-glk-da7219.tplg same as firmware
    platform: GLK

  14. YvonneYang2 commented on Jul 22, 2019

    @YvonneYang2

    Original issue hw_params BE failed -19 and DSP panic issue both not reproduced on glk with test recipe as below, so close the bug. If DSP panic issue reproduces again, will report a new issue to track.

    Test recipe:
    Firmware: a513ac7 https://github.com/thesofproject/sof/commits/master
    Kernel: 44c31df https://github.com/thesofproject/linux/commits/topic/sof-dev
    Topology: file: tools/topology/sof-glk-da7219.tplg same as firmware
    platform: GLK

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

Metadata

Metadata

Assignees

Labels

GLKApplies to Gemini LakeP1Blocker bugs or important featuresbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions