Repository navigation
[BUG] No sound on HP Spectre x360 13-aw2022ur (2020, Tiger Lake) #2700
Description
Describe the bug
Both legacy driver and SOF driver only create devices for HDMI outputs, no speakers or headphones (or microphones). I've tried 5.8, 5.10 and 5.11 kernels with the latest 1.6.1 SOF distribution, the only difference is wording changed from dmic-related to soundwire-related around SOF initialization in dmesg.
PulseAudio refuses to init the card when SOF driver is enabled, playing sounds to /dev/snd/pcm* devices doesn't result in any output to speakers or headphones.
Laptop has the latest firmware (F.10 Rev.A) and there's no problem with sound in Windows obviously.
I'm running ubuntu, but according to the forum thread it's the same on Arch with the 13-aw2777ng laptop (it's basically the same hardware).
There's a wiki page on a similar 14-inch laptop describing some gpio trickery to enable the amplifier, but it assumes a functional pulseaudio with created sinks and so on. I've done that anyway to no avail -- pulseaudio still refuses to init and no sound is produced when playing to pcm devices.
lspci -v excerpt
0000:00:1f.3 Multimedia audio controller: Intel Corporation Tiger Lake-LP Smart Sound Technology Audio Controller (rev 20)
Subsystem: Hewlett-Packard Company Tiger Lake-LP Smart Sound Technology Audio Controller
Flags: bus master, fast devsel, latency 32, IRQ 195, IOMMU group 15
Memory at 603f290000 (64-bit, non-prefetchable) [size=16K]
Memory at 603f000000 (64-bit, non-prefetchable) [size=1M]
Capabilities: [50] Power Management version 3
Capabilities: [80] Vendor Specific Information: Len=14 <?>
Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
Kernel driver in use: sof-audio-pci
Kernel modules: snd_hda_intel, snd_sof_pci
dmesg|egrep -i "(dsp|sof|snd)"
[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.11.0-051100rc4-generic root=UUID=e74551eb-f911-4604-bf2e-48b2e3948180 ro quiet splash snd-intel-dspcfg.dsp_driver=0 vt.handoff=7
[ 0.039932] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.11.0-051100rc4-generic root=UUID=e74551eb-f911-4604-bf2e-48b2e3948180 ro quiet splash snd-intel-dspcfg.dsp_driver=0 vt.handoff=7
[ 0.640855] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.783036] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[ 0.783037] software IO TLB: mapped [mem 0x0000000047b2a000-0x000000004bb2a000] (64MB)
[ 2.866672] integrity: Loaded X.509 cert 'Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53'
[ 2.866684] integrity: Loaded X.509 cert 'Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4'
[ 4.454718] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 4.454740] snd_hda_intel 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[ 4.468308] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 4.468321] sof-audio-pci 0000:00:1f.3: SoundWire enabled on CannonLake+ platform, using SOF driver
[ 4.468329] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 4.468498] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 6.216824] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 6.308478] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 6.323471] sof-audio-pci 0000:00:1f.3: No SoundWire machine driver found
[ 6.323474] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 4
[ 6.323476] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 6.323481] sof-audio-pci 0000:00:1f.3: DMICs detected in NHLT tables: 2
[ 6.423642] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:6:1-53680
[ 6.423645] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:17:0 Kernel ABI 3:18:0
[ 6.429420] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:17:0 Kernel ABI 3:18:0
[ 6.436996] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[ 6.448089] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 3
[ 6.448091] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 4
[ 6.448092] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 5
[ 6.448093] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 6
[ 6.448094] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 7
[ 6.448095] skl_hda_dsp_generic skl_hda_dsp_generic: hda_dsp_hdmi_build_controls: no PCM in topology for HDMI converter 8
[ 6.463302] input: sof-hda-dsp HDMI/DP,pcm=1 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input27
[ 6.463415] input: sof-hda-dsp HDMI/DP,pcm=2 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input28
[ 6.463505] input: sof-hda-dsp HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0/input29
There's ABI mismatch currently but I don't know where to get ABI3:18 SOF and the problem was the same with matching ABIs for both fw and topology.
ls -la /dev/snd/
total 0
drwxr-xr-x 3 root root 240 янв 18 21:43 .
drwxr-xr-x 19 root root 4820 янв 18 21:43 ..
drwxr-xr-x 2 root root 60 янв 18 21:43 by-path
crw-rw----+ 1 root audio 116, 8 янв 18 21:43 controlC0
crw-rw----+ 1 root audio 116, 7 янв 18 21:43 hwC0D2
crw-rw----+ 1 root audio 116, 4 янв 18 21:43 pcmC0D1p
crw-rw----+ 1 root audio 116, 5 янв 18 21:43 pcmC0D2p
crw-rw----+ 1 root audio 116, 6 янв 18 21:48 pcmC0D3p
crw-rw----+ 1 root audio 116, 2 янв 18 21:43 pcmC0D6c
crw-rw----+ 1 root audio 116, 3 янв 18 21:43 pcmC0D7c
crw-rw----+ 1 root audio 116, 1 янв 18 21:43 seq
crw-rw----+ 1 root audio 116, 33 янв 18 21:43 timer
aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 1: HDMI1 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 2: HDMI2 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI3 (*) []
Subdevices: 1/1
Subdevice #0: subdevice #0
uname -a
Linux x360 5.11.0-051100rc4-generic #202101180234 SMP Mon Jan 18 02:36:59 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
pulseaudio -v (pulseaudio daemon is stopped. I've tried to delete pulseaudio config with the same result)
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 13.99.2
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 8e166aaa463244aa82c417113114655e.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/test/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-13.99.2/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
I: [pulseaudio] module-device-restore.c: Successfully opened database file '/home/test/.config/pulse/8e166aaa463244aa82c417113114655e-device-volumes'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
I: [pulseaudio] module-stream-restore.c: Successfully opened database file '/home/test/.config/pulse/8e166aaa463244aa82c417113114655e-stream-volumes'.
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: thesofproject/sof#1; argument: "").
I: [pulseaudio] module-card-restore.c: Successfully opened database file '/home/test/.config/pulse/8e166aaa463244aa82c417113114655e-card-database'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: thesofproject/sof#2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: thesofproject/sof#3; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: thesofproject/sof#4; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-connect" (index: thesofproject/sof#5; argument: "").
I: [pulseaudio] alsa-ucm.c: UCM available for card hw:0
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HiFi
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device HDMI1, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'CaptureChannels' for device Mic2, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'CaptureChannels' for device Mic1, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device Speaker, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device Headphones, assuming stereo.
I: [pulseaudio] module-alsa-card.c: Found UCM profiles
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HiFi
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp,3 doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC0D0p' failed (-2)
I: [pulseaudio] alsa-util.c: Error opening PCM device hw:sofhdadsp: No such file or directory
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
I: [pulseaudio] module-udev-detect.c: Card /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0 (alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic) failed to load module.
I: [pulseaudio] module-udev-detect.c: Found 1 cards.
I: [pulseaudio] module.c: Loaded "module-udev-detect" (index: thesofproject/sof#6; argument: "").
I: [pulseaudio] module.c: Loaded "module-bluetooth-policy" (index: thesofproject/sof#8; argument: "").
I: [pulseaudio] module.c: Loaded "module-bluez5-discover" (index: thesofproject/sof#10; argument: "").
I: [pulseaudio] module.c: Loaded "module-bluetooth-discover" (index: thesofproject/sof#9; argument: "").
I: [pulseaudio] module.c: Loaded "module-native-protocol-unix" (index: thesofproject/sof#11; argument: "").
I: [pulseaudio] module-default-device-restore.c: Restoring default sink 'auto_null'.
I: [pulseaudio] core.c: configured_default_sink: (unset) -> auto_null
I: [pulseaudio] module-default-device-restore.c: No previous default source setting, ignoring.
I: [pulseaudio] module.c: Loaded "module-default-device-restore" (index: thesofproject/sof#12; argument: "").
I: [pulseaudio] module-device-restore.c: Restoring volume for sink auto_null: front-left: 65536 / 100%, front-right: 65536 / 100%
I: [pulseaudio] module-device-restore.c: Restoring mute state for sink auto_null: unmuted
I: [pulseaudio] sink.c: Created sink 0 "auto_null" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] sink.c: device.description = "Dummy Output"
I: [pulseaudio] sink.c: device.class = "abstract"
I: [pulseaudio] sink.c: device.icon_name = "audio-card"
I: [pulseaudio] source.c: Created source 0 "auto_null.monitor" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c: device.description = "Monitor of Dummy Output"
I: [pulseaudio] source.c: device.class = "monitor"
I: [pulseaudio] source.c: device.icon_name = "audio-input-microphone"
I: [null-sink] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [pulseaudio] core.c: default_source: (unset) -> auto_null.monitor
I: [pulseaudio] core.c: default_sink: (unset) -> auto_null
I: [pulseaudio] module.c: Loaded "module-null-sink" (index: thesofproject/sof#14; argument: "sink_name=auto_null sink_properties='device.description="Dummy Output"'").
I: [pulseaudio] module.c: Loaded "module-always-sink" (index: thesofproject/sof#13; argument: "").
I: [pulseaudio] module.c: Loaded "module-intended-roles" (index: thesofproject/sof#15; argument: "").
I: [pulseaudio] module.c: Loaded "module-suspend-on-idle" (index: thesofproject/sof#16; argument: "").
I: [pulseaudio] module.c: Loaded "module-console-kit" (index: thesofproject/sof#17; argument: "").
I: [pulseaudio] client.c: Created 0 "Login Session 2"
I: [pulseaudio] core.c: exit_idle_time: 20 -> 0
I: [pulseaudio] module.c: Loaded "module-systemd-login" (index: thesofproject/sof#18; argument: "").
I: [pulseaudio] module.c: Loaded "module-position-event-sounds" (index: thesofproject/sof#19; argument: "").
I: [pulseaudio] module.c: Loaded "module-role-cork" (index: thesofproject/sof#20; argument: "").
I: [snapd-glib] module-snap-policy.c: Starting GLib main loop
I: [pulseaudio] module.c: Loaded "module-snap-policy" (index: thesofproject/sof#21; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-heuristics" (index: thesofproject/sof#22; argument: "").
I: [pulseaudio] module.c: Loaded "module-filter-apply" (index: thesofproject/sof#23; argument: "").
I: [pulseaudio] main.c: Daemon startup complete.
I: [pulseaudio] alsa-ucm.c: UCM available for card hw:0
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HiFi
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device HDMI1, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'CaptureChannels' for device Mic2, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'CaptureChannels' for device Mic1, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device Speaker, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device Headphones, assuming stereo.
I: [pulseaudio] module-alsa-card.c: Found UCM profiles
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HiFi
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp,3 doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC0D0p' failed (-2)
I: [pulseaudio] alsa-util.c: Error opening PCM device hw:sofhdadsp: No such file or directory
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
(and that error repeats multiple times)
sof-logger -l ../../lib/firmware/intel/sof/v1.6.1/sof-tgl-v1.6.1.ldc (I guess this is expected)
TIMESTAMP DELTA C# COMPONENT LOCATION CONTENT
error: in logger_read(), fread(..., /sys/kernel/debug/sof/etrace) failed: Operation not permitted(-1)
fuser -v /dev/snd/* gives empty result. pactl list cards gives empty result as well when pulseaudio is running.
Can you please fix that or point me in the right direction if you think problem is elsewhere?
Update 19.01.2021
There were some UCM-related improvements in pulseaudio 14.x, so I've built it from the git to no avail.
pulseaudio -v (config files are removed)
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 14.2
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 8e166aaa463244aa82c417113114655e.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/test/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/local/lib/x86_64-linux-gnu/pulse-14.2/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
I: [pulseaudio] database.c: Successfully opened 'device-volumes' database file '/home/test/.config/pulse/8e166aaa463244aa82c417113114655e-device-volumes.tdb'.
I: [pulseaudio] module.c: Loaded "module-device-restore" (index: #0; argument: "").
I: [pulseaudio] database.c: Successfully opened 'stream-volumes' database file '/home/test/.config/pulse/8e166aaa463244aa82c417113114655e-stream-volumes.tdb'.
I: [pulseaudio] module.c: Loaded "module-stream-restore" (index: #1; argument: "").
I: [pulseaudio] database.c: Successfully opened 'card-database' database file '/home/test/.config/pulse/8e166aaa463244aa82c417113114655e-card-database.tdb'.
I: [pulseaudio] module.c: Loaded "module-card-restore" (index: #2; argument: "").
I: [pulseaudio] module.c: Loaded "module-augment-properties" (index: #3; argument: "").
I: [pulseaudio] module.c: Loaded "module-switch-on-port-available" (index: #4; argument: "").
I: [pulseaudio] alsa-ucm.c: UCM available for card hw:0
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HiFi
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device HDMI1, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'CaptureChannels' for device Mic2, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'CaptureChannels' for device Mic1, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device Speaker, assuming stereo.
I: [pulseaudio] alsa-ucm.c: UCM file does not specify 'PlaybackChannels' for device Headphones, assuming stereo.
I: [pulseaudio] module-alsa-card.c: Found UCM profiles
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HiFi
I: [pulseaudio] alsa-util.c: Device hw:sofhdadsp,3 doesn't support 44100 Hz, changed to 48000 Hz.
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC0D0p' failed (-2)
I: [pulseaudio] alsa-util.c: Error opening PCM device hw:sofhdadsp: No such file or directory
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="pci-0000_00_1f.3-platform-skl_hda_dsp_generic" card_name="alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1""): initialization failed.
I: [pulseaudio] module-udev-detect.c: Card /devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0 (alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic) failed to load module.
I: [pulseaudio] module-udev-detect.c: Found 1 cards.
(the same error repeats a few times)
I've also tried it with the latest userspace alsa lib, tools, fw and UCM, the only difference is the missing pcm name in the log
I: [pulseaudio.off] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC0D5p' failed (-2)
I: [pulseaudio.off] alsa-util.c: Error opening PCM device hw:sofhdadsp,5: No such file or directory
Activity
hirnschmalz commentedon Jan 19, 2021
I can confirm this, same issue here on my HP Spectre x360 13-aw2777ng
juimonen commentedon Jan 19, 2021
@bardliao @libinyang this seems to be soundwire device... any idea why we don't have pcm devices?
bardliao commentedon Jan 19, 2021
The issue is that SOF driver can't find a suitable machine driver for this device. The driver will look up eg. snd_soc_acpi_intel_cml_sdw_machines[] to find a suitable machine driver.
So we have to add your device codec information to the corresponding acpi match table.
Please add below to
/etc/modprobe.d/sof-dyndbg.confand attach the whole dmesg output here. Create one if you don't have this file on your device.And, please show me the result of
lspci | grep '00:1f.3'Thanks
aigilea commentedon Jan 19, 2021
Attaching full dmesg with dyndbg.
lspci | grep '00:1f.3'hirnschmalz commentedon Jan 19, 2021
Here's my output of
lspci | grep '00:1f.3'and my dmesg.
bardliao commentedon Jan 19, 2021
From above, the codecs on your device is rt711 and rt1308.
But from below, your codec's information is not listed in the acpi table.
So, we have to add the codec information to BIOS at first. We need to figure out who can help on it. @mengdonglin
It is a TGL device and the match table is snd_soc_acpi_intel_tgl_sdw_machines[].
Looking at the table, we don't have a matched table for your device (rt711 on link 0 and 1 rt1308 on link 1), but fortunately, we have a similar configuration tgl_rvp. We should be able to enable SoundWire on your device with slight modification.
Below patch may help, but I have no chance to test it.
But, again, you have to fix the BIOS issue first. Alternative way is to add acpi table by yourself.
You can follow the guide to add additional acpi table.
A reference asl file is rtk_sdw_i2c.asl.
You don't need the I2C part. What you need is to add rt711 and rt1308 address into
Scope (_SB.PC00.HDAS.SNDW)aigilea commentedon Jan 19, 2021
There's some progress.
Now it looks better in dmesg, SOF initializes without errors, but the result is even stranger:
ls /dev/sndI'm attaching the new dmesg and just in case dsdt.
upd.
I've re-checked if maybe I've somehow messed the particular kernel build up, but no, removing just the acpi patch turns everything back to errors in dmesg and a few files in /dev/snd with the same patched kernel.
plbossart commentedon Jan 19, 2021
@aigilea thanks for testing. Can you try to add dynamic debug to sof_sdw ? when the probe remains silent, it's usually that the machine driver probe fails, and unfortunately we have no way to report this at a higher level.
plbossart commentedon Jan 19, 2021
@bardliao I am wondering if we shouldn't add a hack where we use the adr for 701 for either RT711 or RT1308. The BIOS is broken, and if we don't get a fix we should have an indirection to the 'right' devices.
aigilea commentedon Jan 19, 2021
@plbossart I've tried enabling dyndbg for sof_sdw.c, sof_sdw and sof_sdw* (but forgot to save that dmesg, I can redo this one if it may be useful). I haven't found any new information in dmesgs.
I've enabled dyndbg via kernel options, this morning it worked that way with atkdb.c so I guess it's ok. If it's not, I can redo any other way.
ASoC: soundwire: fix broken BIOS with _ADR workaround
plbossart commentedon Jan 19, 2021
@aigilea to be honest none of us on the Intel Linux team knew of the existence of HP devices with SoundWire, but that's indeed a real product. We can't expect everyone to override the DSDT, that's too invasive.
if you have spare cycles, can you try #2701 without the DSDT override? It should at least find the right devices but may fail later on.
I still need to confirm if there are one or two amplifiers on the link1, in the first case we are missing a topology configuration for mono amplifier.
ASoC: soundwire: fix broken BIOS with _ADR workaround
plbossart commentedon Jan 19, 2021
You can enable dynamic debug by copying this file
ddebug.txt as /etc/modprobe.d/sof-dyndbg.conf (reboot required after adding the file)/
223 remaining items
ronohara commentedon Jul 13, 2021
@plbossart I had installed the latest alsa-ucm-conf
cd /root
git clone https://github.com/alsa-project/alsa-ucm-conf.git
BUT I got the link in /usr/share/alsa incorrect.
cd /usr/share/alsa
ls -la ucm2
lrwxrwxrwx 1 root root 28 Apr 16 12:12 ucm2 -> /root/dev/alsa-ucm-conf/ucm2
Corrected it with:
rm /usr/share/alsa/ucm2
ln -s /root/alsa-ucm-conf/ucm2 /usr/share/alsa/ucm2
Rebooted - and there is a huge amount of activity from the kernel ...
dmesg.txt https://pastebin.com/7ywNgKVK
alsa-info https://pastebin.com/DVpAj1y9
But still no sound.
PS: Putting all this commentary in for posterity .. there is almost no documents or hints about setting up alsa-ucm-conf
plbossart commentedon Jul 13, 2021
@ronohara you probably need to test the basics with command-line playback from a terminal
alsaucm -c sof-soundwire set _verb HiFi set _enadev Speaker
speaker-test -Dhw:0,2 -c2 -r48000
alsaucm -c sof-soundwire set _verb HiFi set _enadev Mic
arecord -Dhw:0,4 -c2 -r48000
if you don't hear sound or don't see any activity on the record there is something wrong with your setup.
ronohara commentedon Jul 13, 2021
@plbossart Interesting .... speaker-test works !!! plenty of 'pink noise' and left/right is distinct (I will worry about the Mic later)
speaker-test 1.2.5.1
Playback device is hw:0,2
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 96 to 16384
Period size range from 48 to 4096
Using max buffer size 16384
Periods = 4
was set period_size = 4096
was set buffer_size = 16384
0 - Front Left
1 - Front Right
Time per period = 5.631267
0 - Front Left
1 - Front Right
Time per period = 5.973940
0 - Front Left
1 - Front Right
Time per period = 1.792136
But the Sound Control 'test' button does not work ... and applications using alsa don't work either.
plbossart commentedon Jul 13, 2021
@ronohara I guess it's a problem with the UCM2 setup then, or PulseAudio not getting the right config.
ronohara commentedon Aug 15, 2021
@plobssart ... still no joy after upgrading alsa to 1.2.5 (lib, tools, utils) ... some traps for that. You need to remove the apt installed bits of alsa (1.2.2) before your compile /install from source, Otherwise some of the old version gets linked into the lib files.
Upgraded to LM 20.2 as well.
Status is: kernel 5.13 sees and uses the hardware just fine (dmesg.txt)... and alss-info shows all sorts of things as good.
dmesg: https://pastebin.com/NXBrEMnJ
alsa-info: https://pastebin.com/Yx4MK0yr
The last line of alsa-info is weird:
!!Packages installed
!!--------------------
rc alsa-utils 1.2.2-1ubuntu2.1 amd64 Utilities for configuring and using ALSA
and yet using apt .. I get this...
x360 tmp # apt remove alsa-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'alsa-utils' is not installed, so not removed
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
the Sound Control still does not deliver sound - but does see the sof-soundwire card and I have output hardware set to Stereo and Speakers
When you put the test button on the sound control, the dmesg log shows the kernel nudges the card and the card says that it worked ok ..... which is also odd.
As an example:
[ 417.573278] sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: trigger stream 0 dir 0 cmd 0
[ 417.573281] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x60050000
[ 417.573429] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx succeeded: 0x60050000
[ 417.573440] sof-audio-pci-intel-tgl 0000:00:1f.3: FW Poll Status: reg=0x140000 successful
[ 417.573443] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x60030000
[ 417.573595] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx succeeded: 0x60030000
[ 417.573621] sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: free stream 0 dir 0
[ 417.574315] rt711 sdw:0:25d:711:0: [rt711_sdw_write] 00e0 <= 0003
[ 417.574398] rt711 sdw:0:25d:711:0: [rt711_sdw_write] 00f0 <= 0003
[ 417.574402] rt711 sdw:0:25d:711:0: rt711_clock_config complete, clk_freq=4800000
[ 417.574720] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx: 0x80010000
[ 417.574894] sof-audio-pci-intel-tgl 0000:00:1f.3: ipc tx succeeded: 0x80010000
[ 417.574916] sof-audio-pci-intel-tgl 0000:00:1f.3: pcm: close stream 0 dir 0
plbossart commentedon Aug 16, 2021
@ronohara maybe try removing/reinstalling libasound2-data. We've seen cases where bad mixer settings keep being used, and removing them helps.
ronohara commentedon Aug 17, 2021
Hmm - apt purge libasound2-data ,,,, looks a bit dangerous
The following packages will be REMOVED
ant* ant-optional* antlr* antlr3* antlr3.2* aspectj* blender* blueberry* brasero* brasero-cdrkit* brltty* bsh*
ca-certificates-java* celluloid* cheese* cup* default-jdk* default-jdk-headless* default-jre*
default-jre-headless* dissenter-browser* evolution-data-server* ffmpeg* ffmpegthumbnailer* fop* gimp*
gir1.2-gnomebluetooth-1.0* gnome-bluetooth* gnome-control-center* gnome-disk-utility* gnome-session-canberra*
gnome-settings-daemon* gnome-video-effects-extra* gnome-video-effects-frei0r* google-chrome-stable*
gstreamer1.0-alsa* gstreamer1.0-libav* gstreamer1.0-plugins-bad* hexchat* hypnotix* javacc* javahelp2* jlex*
junit4* jython* k3b* k3b-extrathemes* kaccounts-integration* kaccounts-providers* kactivitymanagerd* kate*
kcalc* kde-cli-tools* kde-config-cddb* kde-config-telepathy-accounts* kde-spectacle* kde-telepathy*
kde-telepathy-approver* kde-telepathy-auth-handler* kde-telepathy-contact-list* kde-telepathy-desktop-applets*
kde-telepathy-filetransfer-handler* kde-telepathy-integration-module* kde-telepathy-kpeople*
kde-telepathy-minimal* kde-telepathy-send-file* kde-telepathy-text-ui* kdeconnect* keditbookmarks* khelpcenter*
kinit* kio* konsole* konsole-kpart* kpackagelauncherqml* ktexteditor-katepart* libasound2* libasound2-data*
libasound2-plugins* libatopology2* libavdevice58* libavfilter7* libbrasero-media3-1* libcanberra-gtk-module*
libcanberra-gtk0* libcanberra-gtk3-0* libcanberra-gtk3-module* libcanberra-pulse* libcanberra0* libcheese-gtk25*
libespeak-ng1* libexcalibur-logkit-java* libffmpegthumbnailer4v5* libflite1* libfluidsynth2* libfop-java*
libgegl-0.4-0* libgeronimo-jms-1.1-spec-java* libgimp2.0* libgnome-bluetooth13* libgsound0* libk3b7*
libk3b7-extracodecs* libkf5cddb5* libkf5declarative5* libkf5kcmutils5* libkf5khtml-bin* libkf5khtml5*
libkf5newstuff5* libkf5newstuffcore5* libkf5notifications5* libkf5notifyconfig5* libkf5parts-plugins*
libkf5parts5* libkf5plasma5* libkf5plasmaquick5* libkf5purpose-bin* libkf5purpose5* libkf5quickaddons5*
libkf5runner5* libkf5texteditor5* libkf5wallet-bin* libkf5wallet5* libktpcommoninternals9* libktplogger9*
libktpmodels9* libktpotr9* libktpwidgets9* libkwalletbackend5-5* libmarco-private2* libmatemixer0* libmpv1*
libmsv-java* libnb-platform18-java* libopenal1* libpcaudio0* libqt5webenginecore5* libqt5webenginewidgets5*
libreoffice-sdbc-hsqldb* libsdl-image1.2* libsdl1.2debian* libsdl2-2.0-0* libsndio7.0* libsox-fmt-all*
libsox-fmt-alsa* libvisual-0.4-plugins* libxsltc-java* marco* mate-control-center* mate-media*
mate-notification-daemon* mate-power-manager* mate-settings-daemon* mate-utils* meld* metacity*
mint-meta-codecs* mint-meta-mate* mpg321* mplayer* nautilus-extension-brasero* onboard* openjdk-11-demo*
openjdk-11-jdk* openjdk-11-jdk-headless* openjdk-11-jre* openjdk-11-jre-headless* openjdk-11-source*
openjdk-14-demo* openjdk-14-jdk* openjdk-14-jdk-headless* openjdk-14-jre* openjdk-14-jre-headless*
openjdk-14-source* orca* pavucontrol* phonon4qt5-backend-vlc* plasma-framework* plasma-runner-telepathy-contact*
povray* povray-examples* povray-includes* pulseaudio* pulseaudio-module-bluetooth* pulseaudio-module-zeroconf*
qml-module-org-kde-kconfig* qml-module-org-kde-kirigami2* qml-module-org-kde-kquickcontrols*
qml-module-org-kde-kquickcontrolsaddons* qml-module-org-kde-newstuff* qml-module-org-kde-purpose*
qml-module-org-kde-runnermodel* qml-module-org-kde-telepathy* rhino* signal-desktop* signon-kwallet-extension*
slick-greeter* speech-dispatcher* speech-dispatcher-audio-plugins* speech-dispatcher-espeak-ng*
tumbler-plugins-extra* vim* vim-julia* visualvm* vlc* vlc-plugin-base*
The following NEW packages will be installed
notification-daemon
0 to upgrade, 1 to newly install, 206 to remove and 1 not to upgrade.
Need to get 37.0 kB of archives.
After this operation, 2,437 MB disk space will be freed.
Do you want to continue? [Y/n]
ronohara commentedon Aug 17, 2021
And alsamixer now has a library problem. Looks like I might have to compile quite a bit from source to get the 1.2.5 alsa support working.
360 tmp # alsamixer
ALSA lib dlmisc.c:170:(snd_dlsym_verify) unable to verify version for symbol snd_func_private_integer
ALSA lib conf.c:4720:(_snd_config_evaluate) symbol snd_func_private_integer is not defined inside (null)
ALSA lib conf.c:5220:(snd_config_expand) Evaluate error: No such device or address
ALSA lib conf.c:3858:(snd_config_hook_load) Unable to expand filenames in the pre-load section
ALSA lib conf.c:3736:(snd_config_hooks_call) function snd_config_hook_load_for_all_cards returned error: No such device or address
ALSA lib control.c:1268:(snd_ctl_open_conf) Invalid type for CTL default definition
cannot open mixer: Invalid argument
x360 tmp #
JonAnCla commentedon Aug 31, 2021
Hey @ronohara, in case it helps, I was able to build .deb files for alsa 1.2.5.1 from the debian sources for the future "sid" release for the following:
(libasound is part of alsa-lib)
You can download the debian source bundles for these here, e.g. here's the one for alsa-lib
https://launchpad.net/debian/sid/+source/alsa-lib
you can then build the deb files from these sources using:
dpkg-buildpackage -rfakeroot -uc -us --build=binary -d(you will also need to install build dependencies but you probably have these already)
That way you can easily install the 1.2.5.1 debs or got back to an older version using apt or dpkg
However, even after doing all of this and using a 5.13 kernel, I am not able to get sound when I cold boot my system (linux mint 20 based on ubuntu 20.04)
Will follow up separately with logs & further questions
plbossart commentedon Oct 5, 2021
The jack detection doesn't seem to work on these HP x360 convertible devices, I added PR #3195 after local tests on a device. That helps with the ALSA mixer controls. I did find one case where the headset was not detected but that's not super reliable anyways. remove-insert forced the detection alright.
Changing the device with the Gnome settings remains broken, something's not working between PipeWire, Gnome Settings and possibly UCM. @perexg FYI.
The rest seems to work fine on Fedora 34 with the 5.14.9 kernel. speaker, local mics, headphones, headset record audio with decent levels.
UPSTREAM: soundwire: Intel: introduce DMI quirks for HP Spectre x360 …
UPSTREAM: soundwire: Intel: introduce DMI quirks for HP Spectre x360 …
ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible
ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible
ASoC: Intel: sof_sdw: add quirk for HP Spectre x360 convertible