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

sof-audio-pci-intel-tgl error messages piling on DMESG #5220

Open
rfsalomon opened this issue Oct 28, 2024 · 11 comments
Open

sof-audio-pci-intel-tgl error messages piling on DMESG #5220

rfsalomon opened this issue Oct 28, 2024 · 11 comments

Comments

@rfsalomon
Copy link

System information:

Operating System: openSUSE Tumbleweed 20241025
KDE Plasma Version: 6.2.2
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.0
Kernel Version: 6.11.5-1-default (64-bit)
Graphics Platform: Wayland
Processors: 24 × 12th Gen Intel® Core™ i7-12850HX
Memory: 31.1 GiB of RAM
Graphics Processor: NVIDIA RTX A2000 8GB Laptop GPU/PCIe/SSE2
Manufacturer: LENOVO
Product Name: 21D6S16900
System Version: ThinkPad P16 Gen 1

The following messages keep being written to DMESG:

sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp1 Pin: -22

This message repeats 20 times before changing to

sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp1 Pin: -22

Which repeats 20 times and changes to

sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp3 Pin: -22

Which also repeats for 20 times before going back to iDisp1 and continuing the cycle

The driver logs the following information before entering the error message cycle:

sof-audio-pci-intel-tgl 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040380
sof-audio-pci-intel-tgl 0000:00:1f.3: use msi interrupt mode
sof-audio-pci-intel-tgl 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
sof-audio-pci-intel-tgl 0000:00:1f.3: DMICs detected in NHLT tables: 2
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware paths/files for ipc type 0:
sof-audio-pci-intel-tgl 0000:00:1f.3:  Firmware file:     intel/sof/sof-adl-s.ri
sof-audio-pci-intel-tgl 0000:00:1f.3:  Topology file:     intel/sof-tplg/sof-hda-generic-2ch.tplg
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1
sof-audio-pci-intel-tgl 0000:00:1f.3: unknown sof_ext_man header type 3 size 0x30
cdc_ncm 4-1.1:2.0: setting tx_max = 16384 
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware info: version 2:2:0-57864
sof-audio-pci-intel-tgl 0000:00:1f.3: Firmware: ABI 3:22:1 Kernel ABI 3:23:1
sof-audio-pci-intel-tgl 0000:00:1f.3: Topology: ABI 3:22:1 Kernel ABI 3:23:1

Sound works fine but the sheer amount of error messages logged caught my eye.

Additional information:

# hwinfo –sound

20: PCI 1f.3: 0403 Audio device
  [Created at pci.386]
  Unique ID: nS1_.ZKSQd808JI1
  SysFS ID: /devices/pci0000:00/0000:00:1f.3
  SysFS BusID: 0000:00:1f.3
  Hardware Class: sound
  Model: "Intel Audio device"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0x7ad0
  SubVendor: pci 0x17aa "Lenovo"
  SubDevice: pci 0x22fc
  Revision: 0x11
  Driver: "sof-audio-pci-intel-tgl"
  Driver Modules: "snd_sof_pci_intel_tgl"
  Memory Range: 0x4251638000-0x425163bfff (rw,non-prefetchable)
  Memory Range: 0x4251500000-0x42515fffff (rw,non-prefetchable)
  IRQ: 206 (1156 events)
  Module Alias: "pci:v00008086d00007AD0sv000017AAsd000022FCbc04sc03i80"
  Driver Info #0:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"
  Driver Info #1:
    Driver Status: snd_soc_avs is active
    Driver Activation Cmd: "modprobe snd_soc_avs"
  Driver Info #2:
    Driver Status: snd_sof_pci_intel_tgl is active
    Driver Activation Cmd: "modprobe snd_sof_pci_intel_tgl"
  Config Status: cfg=new, avail=yes, need=no, active=unknown

28: PCI 100.1: 0403 Audio device
  [Created at pci.386]
  Unique ID: NXNs.Z+BlTBGqFL4
  Parent ID: vSkL.WM1Tf0yQKB5
  SysFS ID: /devices/pci0000:00/0000:00:01.0/0000:01:00.1
  SysFS BusID: 0000:01:00.1
  Hardware Class: sound
  Model: "nVidia Audio device"
  Vendor: pci 0x10de "nVidia Corporation"
  Device: pci 0x2291
  SubVendor: pci 0x17aa "Lenovo"
  SubDevice: pci 0x22db
  Revision: 0xa1
  Driver: "snd_hda_intel"
  Driver Modules: "snd_hda_intel"
  Memory Range: 0xaa000000-0xaa003fff (rw,non-prefetchable)
  IRQ: 17 (617 events)
  Module Alias: "pci:v000010DEd00002291sv000017AAsd000022DBbc04sc03i00"
  Driver Info #0:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #10 (PCI bridge)

39: USB 00.1: 0401 Multimedia audio controller
  [Created at usb.122]
  Unique ID: zjpQ.NUtrPFK8oC9
  Parent ID: k4bc.2DFUsyrieMD
  SysFS ID: /devices/pci0000:00/0000:00:14.0/usb1/1-12/1-12:1.1
  SysFS BusID: 1-12:1.1
  Hardware Class: sound
  Model: "Samsung Electronics Samsung USB C Earphones"
  Hotplug: USB
[dmesg.txt](https://github.com/user-attachments/files/17543068/dmesg.txt)

  Vendor: usb 0x04e8 "Samsung Electronics Co., Ltd"
  Device: usb 0xa05e "Samsung USB C Earphones"
  Revision: "1.00"
  Serial ID: "20160406.1"
  Driver: "snd-usb-audio"
  Driver Modules: "snd_usb_audio"
  Speed: 12 Mbps
  Module Alias: "usb:v04E8pA05Ed0100dc00dsc00dp00ic01isc02ip00in01"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #49 (Hub)
@ujfalusi
Copy link
Collaborator

@rfsalomon, the prints like

sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp1 Pin: -22

are printed because PA/PW is probing all PCMs of the sound cards and since you have NVIDIA dGPU, the HDMI via Intel display is not working, they are physically disconnected.

Can you attach the output of alsa-info.sh, a full kernel log (dmesg)?

@rfsalomon
Copy link
Author

Here they are.

dmesg.txt
alsa-info.txt

@rfsalomon
Copy link
Author

rfsalomon commented Nov 12, 2024

891af1bd-9e14-4463-b427-5cf10c390d5b

@rfsalomon, the prints like

sof-audio-pci-intel-tgl 0000:00:1f.3: ASoC: error at snd_soc_dai_hw_params on iDisp1 Pin: -22

are printed because PA/PW is probing all PCMs of the sound cards and since you have NVIDIA dGPU, the HDMI via Intel display is not working, they are physically disconnected.

Understood. However, these lines should not appear on the console when the user logs in without a shell, should they?

@ujfalusi
Copy link
Collaborator

You have misspelled option to select the legacy driver snd-intel-dspcf.dsp_driver=1 -> snd-intel-dspcfg.dsp_driver=1
With that option you will certainly not get the same prints, but you will loose the digital microphones in the laptop.

Right, I see now in the dmesg/alsa-info log:

[   14.212949] [     T45] sof-audio-pci-intel-tgl 0000:00:1f.3: hda codecs found, mask 1

the display codec is not connected and in this case SOF needs to treat the HDMI audio PCM devices as dummy ones, they are created, but they will no work and they will eventually throw an error, which is unfortunate.
I cannot recall what solution we have for this, @kv2019i, do you have recollection?

The problem is that the topology files we have assumes that there is always HDMI audio. I'm sure this machine is not the first with such setup and so far they have worked somehow.

I do agree t hat the prints are not nice in the console.

@kv2019i
Copy link
Collaborator

kv2019i commented Nov 13, 2024

@ujfalusi This seems like a user-space problem. alsa-info shows that no HDMI/DP PCMs are created for integrated graphics and dummy codecs are plugged in instead. So for kernel this is as expected. alsa-info also shows no controls for HDMI/DP for the SOF device, so user-space elements should NOT try to open the SOF devices.

For some reaosn some user-space entity keeps on opening the dummy HDMI/DP entities (even if kcontrols say there's nothing connected) and the resulting error is to be expected (you can't actually stream to the dummy codec).

That's a good question which component and why in user-space is making this call. I'm guessing this is using Pipewire. Pipewire logs would be the next place to check -- i.e. what's in the log when kernel sees open on the dummy HDMI/DP PCMs.

@ujfalusi
Copy link
Collaborator

ujfalusi commented Nov 13, 2024

Yes, it is wireplumber which probes the PCMs to figure out their capabilities.
UCM correctly figures out that the HDMI PCM devices are unusable without the need to open the PCMs.

fwiw, I can reproduce it on my gaming laptop with options snd_sof_intel_hda codec_mask=1 and logging in.
I cannot find a way to tell wireplumber to not probe the HDMI PCMs.

@ujfalusi
Copy link
Collaborator

I think it is the pro-audio profile probing which is opening all PCM devices, it is unconditionally goes through all cards and all PCM device via add_pro_profile()
https://gitlab.freedesktop.org/pipewire/pipewire/-/blob/master/spa/plugins/alsa/acp/acp.c?ref_type=heads#L297

I don't see a way to disable this.
It is forced with https://gitlab.freedesktop.org/pipewire/pipewire/-/commit/f62c40c205f84d70d41fef3f3d361b0e4651a50e commit.

@ujfalusi
Copy link
Collaborator

indeed, dropping the call to add_pro_profile() will get rid of the prints in the expense of no pro-audio profile.

@ujfalusi
Copy link
Collaborator

ujfalusi commented Nov 14, 2024

https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/3407

@rfsalomon, I think it would be best to create a bug for Pipewire and add a link to this issue to work out a solution.

@rfsalomon
Copy link
Author

rfsalomon commented Nov 14, 2024

Will do. I'll post the bug link here for reference. Thanks!

[edit] https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/1835

@ujfalusi
Copy link
Collaborator

The issue upstream moved to https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/4405

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