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

kernel 5.7: No sound. sof-audio-pci ASoC: can't set iDisp3 Pin hw params: -22 #2065

Closed
dzikages555 opened this issue Apr 29, 2020 · 3 comments

Comments

@dzikages555
Copy link

dzikages555 commented Apr 29, 2020

In-progress (hit submit accidentally) :/

Kernel: 5.7.0-050700rc3.202004262131

Short version

  1. Sound card is detected, but sound is not working
  2. dmesg contains multiple entries like these:
[  179.203459] sof-audio-pci 0000:00:1f.3: ASoC: can't set iDisp3 Pin hw params: -22
[  179.204169]  iDisp3: ASoC: hw_params BE failed -22
[  179.204872]  HDMI3: ASoC: hw_params BE failed -22

Long version

Machine

Laptop:  
  Omen by HP Laptop 17-cb0xxx (with i7-9750H)

Sound card:
  00:1f.3 Multimedia audio controller: Intel Corporation Cannon Lake PCH cAVS (rev 10)
  Subsystem: Hewlett-Packard Company Cannon Lake PCH cAVS

Integrated graphics card: 
  disabled by HP in bios/firmware and I cannot enable it in bios.

Kernel 5.4

  • On kernel 5.4 my card is not detected because of this bug:[BUG] Audio device not recognized on HP Omen 17 #1658 .
  • loading snd-intel-dspcfg with dsp_driver=1 changes driver in use to snd_hda_intel and i have sound but my internal microphone does not work
    • I tried various model options (e.g.options snd-hda-intel model=laptop-dmic and none seems work

Kernel 5.7

So checked fix for #1658

dmesg

[   23.874755] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   23.875391] snd_hda_intel 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   23.875450] snd_hda_intel 0000:01:00.1: enabling device (0000 -> 0002)
[   23.875497] snd_hda_intel 0000:01:00.1: Disabling MSI
[   23.875502] snd_hda_intel 0000:01:00.1: Handle vga_switcheroo audio client
[   23.914629] input: HDA NVidia HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input27
[   23.914661] input: HDA NVidia HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input28
[   23.914700] input: HDA NVidia HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input29
[   23.914726] input: HDA NVidia HDMI/DP,pcm=9 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input30
[   23.914757] input: HDA NVidia HDMI/DP,pcm=10 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input31
[   23.914813] input: HDA NVidia HDMI/DP,pcm=11 as /devices/pci0000:00/0000:00:01.0/0000:01:00.1/sound/card0/input32
[   24.008085] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[   24.016989] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[   24.017002] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[   24.017120] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[   24.017167] sof-audio-pci 0000:00:1f.3: init of i915 and HDMI codec failed
[   24.019327] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[   24.033614] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 1
[   24.033615] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[   24.147454] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
[   24.147455] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:13:0
[   24.151488] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp1
[   24.151489] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp2
[   24.151489] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link iDisp3
[   24.151490] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link Analog Playback and Capture
[   24.151490] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link Digital Playback and Capture
[   24.151491] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic01
[   24.151491] skl_hda_dsp_generic skl_hda_dsp_generic: info: override BE DAI link dmic16k
[   24.151946] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:11:0 Kernel ABI 3:13:0
[   24.151949] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[   24.153173] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[   24.153174] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[   24.154097] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[   24.154098] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[   24.154983] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[   24.154984] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[   24.156000] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[   24.156001] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[   24.156002] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[   24.156003] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[   24.156004] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[   24.156005] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[   24.157010] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[   24.157011] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[   24.157916] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[   24.157917] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[   24.158909] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[   24.169090] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[   24.182143] snd_hda_codec_realtek ehdaudio0D0: autoconfig for ALC285: line_outs=1 (0x17/0x0/0x0/0x0/0x0) type:speaker
[   24.182144] snd_hda_codec_realtek ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[   24.182145] snd_hda_codec_realtek ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[   24.182146] snd_hda_codec_realtek ehdaudio0D0:    mono: mono_out=0x0
[   24.182146] snd_hda_codec_realtek ehdaudio0D0:    inputs:
[   24.182147] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x1b
[   24.182148] snd_hda_codec_realtek ehdaudio0D0:      Mic=0x19
[   24.452911] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> iDisp1 Pin mapping ok
[   24.452918] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> iDisp2 Pin mapping ok
[   24.452923] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> iDisp3 Pin mapping ok
[   24.452930] skl_hda_dsp_generic skl_hda_dsp_generic: Analog Codec DAI <-> Analog CPU DAI mapping ok
[   24.452937] skl_hda_dsp_generic skl_hda_dsp_generic: Digital Codec DAI <-> Digital CPU DAI mapping ok
[   24.452942] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC01 Pin mapping ok
[   24.452947] skl_hda_dsp_generic skl_hda_dsp_generic: dmic-hifi <-> DMIC16k Pin mapping ok
[   24.452969] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC48kHz 6 mapping ok
[   24.452981] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> DMIC16kHz 7 mapping ok
[   24.452999] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Analog 0 mapping ok
[   24.453019] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDA Digital 1 mapping ok
[   24.453031] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI1 3 mapping ok
[   24.453044] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI2 4 mapping ok
[   24.453056] skl_hda_dsp_generic skl_hda_dsp_generic: snd-soc-dummy-dai <-> HDMI3 5 mapping ok
[   24.455236] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input33
[   24.455365] input: sof-hda-dsp Mic as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input34
[   24.455554] input: sof-hda-dsp Headphone as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card1/input35
...
[   35.061288] sof-audio-pci 0000:00:1f.3: ASoC: can't set iDisp3 Pin hw params: -22
[   35.061383]  iDisp3: ASoC: hw_params BE failed -22
[   35.061446]  HDMI3: ASoC: hw_params BE failed -22
[   35.061863] sof-audio-pci 0000:00:1f.3: ASoC: can't set iDisp3 Pin hw params: -22
[   35.061944]  iDisp3: ASoC: hw_params BE failed -22
[   35.061986]  HDMI3: ASoC: hw_params BE failed -22
...
[  179.206063] sof-audio-pci 0000:00:1f.3: ASoC: can't set iDisp3 Pin hw params: -22
[  179.206829]  iDisp3: ASoC: hw_params BE failed -22
[  179.207566]  HDMI3: ASoC: hw_params BE failed -22

lspci

00:1f.3 Multimedia audio controller: Intel Corporation Cannon Lake PCH cAVS (rev 10)
        Subsystem: Hewlett-Packard Company Cannon Lake PCH cAVS
        Flags: bus master, fast devsel, latency 32, IRQ 188
        Kernel driver in use: sof-audio-pci

01:00.1 Audio device: NVIDIA Corporation TU106 High Definition Audio Controller (rev a1)
        Subsystem: Hewlett-Packard Company TU106 High Definition Audio Controller
        Flags: bus master, fast devsel, latency 0, IRQ 17
        Kernel driver in use: snd_hda_intel

/proc/asound

 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xdc080000 irq 17
 1 [sofhdadsp      ]: sof-hda-dsp - sof-hda-dsp
                      HP-OMENbyHPLaptop17_cb0xxx--8603
  1:        : sequencer
  2: [ 0- 3]: digital audio playback
  3: [ 0- 7]: digital audio playback
  4: [ 0- 8]: digital audio playback
  5: [ 0- 9]: digital audio playback
  6: [ 0-10]: digital audio playback
  7: [ 0-11]: digital audio playback
  8: [ 0- 0]: hardware dependent
  9: [ 0]   : control
 10: [ 1- 6]: digital audio capture
 11: [ 1- 7]: digital audio capture
 12: [ 1- 0]: digital audio playback
 13: [ 1- 0]: digital audio capture
 14: [ 1- 1]: digital audio playback
 15: [ 1- 1]: digital audio capture
 16: [ 1- 3]: digital audio playback
 17: [ 1- 4]: digital audio playback
 18: [ 1- 5]: digital audio playback
 19: [ 1- 0]: hardware dependent
 20: [ 1]   : control
 33:        : timer

No sound:

alsamixer sees (correctly or not - I don't know) my card:

 <     Master     >   Headphone         Speaker         Mic Boost       Mic Boost 1     Auto-Mute Mode  PGA1.0 1 Master  PGA3.0 3 Master  PGA7.0 7 Master  PGA8.0 8 Master  PGA9.0 9 Master

aplay - no sound:

$ aplay test.wav

$ aplay -D hw:1,1  test.wav
aplay: main:830: audio open error: Invalid argument

$ aplay -D hw:1,0  test.wav
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
aplay: set_params:1349: Channels count non available

$ aplay -l
card0: ...
...
card 1: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

pactl list cards - only sees nvidia sound card. On kernel 5.4 with dsp_driver=1 pulse audio sees my intel sound card.

Let me know if you need more information. I can also patch/recompile my kernel if you want:)

BTW assuming that SOF driver detects correct topology of my setup on 5.7 kernel, is it possible to use this information somehow (I don't know: creating devices manually, writing things to procfs/sysfs, hda, hdajackretask, patching patch_realtek.c) on 5.4 kernel with snd_hda_intel to get my mic working?

@singingtelegram
Copy link

Can confirm having the same issues on 5.7rc3 and earlier versions of Linux 5.7. Microphone appears to be working, but audio playback yields no sound and error -22 in dmesg.

@dzikages555
Copy link
Author

dzikages555 commented May 3, 2020

I'm closing this issue, because:

  • I managed to get both my mic and speakers/headphones working
  • No errors iDisp3: ASoC: hw_params BE failed -22 are displayed anymore
  • It was not a problem with the SOF kernel module.

Solution

I spent more than 12 hours to get a working sound on Linux (because 2020 is the year of the Linux desktop;)), so here's a solution for people with the same problem as I have:

  • Install kernel 5.7-rc3 (I'm using Ubuntu debs from https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.7-rc3/)
  • download sof-*-v1.4.2.ri from https://github.com/thesofproject/sof/releases/tag/v1.4.2
    • I'm using sof-cnl-v1.4.2.ri because lspci -kv |grep sof -B10 tells me that I have Cannon Lake PCH (Subsystem: Hewlett-Packard Company Cannon Lake PCH cAVS)
  • rm /lib/firmware/intel/sof/sof-cnl.ri to remove nasty symlink. Then cp -a sof-cnl-v1.4.2.ri /lib/firmware/intel/sof/sof-cnl.ri
  • wget https://raw.githubusercontent.com/alsa-project/alsa-ucm-conf/master/ucm2/sof-hda-dsp/Hdmi.conf
    mv Hdmi.conf /usr/share/alsa/ucm2/sof-hda-dsp/Hdmi.conf
    • this is very important and it removes iDisp3: ASoC: hw_params BE failed -22 errors
  • reboot your computer
  • check that correct firmware was loaded:
dmesg |grep sof |grep -i firmware
[   22.227067] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a 
  • everything should work fine:
  • aplay test.wav, arecord foo.wav; aplay foo.wav, alsamixer (you may need to press F6 to change sound card), and pacat < /dev/urandom.
  • because HP disabled your integrated GPU, you will have to to install nvidia drivers by yourself to get decent graphics. Download NVIDIA-Linux-x86_64-440.82.run. They don't compile with 5.7-rc3 kernel, but you can fix them like this:
bash NVIDIA-Linux-x86_64-440.82.run --extract-only
cd NVIDIA-Linux-x86_64-440.82
vim ./kernel/conftest.sh 
# comment out this line:
# compile_check_conftest "$CODE" "NV_SET_MEMORY_ARRAY_UC_PRESENT" "" "functions"
./nvidia-installer --no-x-check --ui=none -e

Related issues

@plbossart
Copy link
Member

  • download sof-*-v1.4.2.ri from https://github.com/thesofproject/sof/releases/tag/v1.4.2

    • I'm using sof-cnl-v1.4.2.ri because lspci -kv |grep sof -B10 tells me that I have Cannon Lake PCH (Subsystem: Hewlett-Packard Company Cannon Lake PCH cAVS)
  • rm /lib/firmware/intel/sof/sof-cnl.ri to remove nasty symlink. Then cp -a sof-cnl-v1.4.2.ri /lib/firmware/intel/sof/sof-cnl.ri

The recommentation is to take the binaries from the sof-bin repository and use the go.sh script to update the symlinks for all platforms.
https://github.com/thesofproject/sof-bin/tree/stable-v1.4.2

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

No branches or pull requests

3 participants