HP 27 AIO – The speakers only produce a crackling sound

Hello everyone,
I’ve bought a new (second-hand) PC and simply installed the hard drives from my old laptop into the new machine. Everything works perfectly (go Linux :grinning_face:), except for the speakers.
Old system: HP Probook, new system: HP 27 aio.

The Bang & Olufsen speakers produce a crackling sound. To check if they’re faulty, I tested them with the original Windows 11 – they work, and playing music without crackling was no problem.

The headphone jack works as well. I can plug in headphones and get sound - no crackling.

I’ve already searched the internet for the sound card and drivers, but none of the solutions worked, the crackling don’t go away.

The sound card is an Intel Cannon Lake PCH cAVS, as recognised by the kernel. Under Windows 11, it was displayed as Realtek VLC255.
Soundserver is pipewire.
Kernel 6.18.18-1

Here are the outputs from the various programmes:
inxi -Aa:

Audio:
  Device-1: Intel Cannon Lake PCH cAVS vendor: Hewlett-Packard
    driver: sof-audio-pci-intel-cnl alternate: snd_soc_avs,
    snd_sof_pci_intel_cnl, snd_hda_intel bus-ID: 00:1f.3 chip-ID: 8086:a348
    class-ID: 0403
  API: ALSA v: k6.18.18-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.6.2 status: active with: 1: pipewire-pulse
    status: active 2: wireplumber status: active 3: pipewire-alsa type: plugin
    4: pw-jack type: plugin tools: pactl,pw-cat,pw-cli,wpctl

aplay --list-devices:

**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 0: HDA Analog (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 3: HDMI1 (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 4: HDMI2 (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 5: HDMI3 (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: sofhdadsp [sof-hda-dsp], Gerät 31: HDA Analog Deep Buffer (*) []
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0

mhwd -lh -d --pci:

17: PCI 1f.3: 0403 Audio device
  SysFS ID: /devices/pci0000:00/0000:00:1f.3
  SysFS BusID: 0000:00:1f.3
  Hardware Class: sound
  Device Name: "Onboard - Sound"
  Model: "Intel Cannon Lake PCH cAVS"
  Vendor: pci 0x8086 "Intel Corporation"
  Device: pci 0xa348 "Cannon Lake PCH cAVS"
  SubVendor: pci 0x103c "Hewlett-Packard Company"
  SubDevice: pci 0x84ee 
  Revision: 0x10
  Driver: "sof-audio-pci-intel-cnl"
  Driver Modules: "snd_sof_pci_intel_cnl"
  Memory Range: 0xa1410000-0xa1413fff (rw,non-prefetchable)
  Memory Range: 0xa1000000-0xa10fffff (rw,non-prefetchable)
  IRQ: 143 (1729 events)
  Module Alias: "pci:v00008086d0000A348sv0000103Csd000084EEbc04sc03i80"
  Driver Info #0:
    Driver Status: snd_soc_avs is active
    Driver Activation Cmd: "modprobe snd_soc_avs"
  Driver Info #1:
    Driver Status: snd_sof_pci_intel_cnl is active
    Driver Activation Cmd: "modprobe snd_sof_pci_intel_cnl"
  Driver Info #2:
    Driver Status: snd_hda_intel is active
    Driver Activation Cmd: "modprobe snd_hda_intel"

lspci -k -nn -d ::0401; lspci -k -nn -d ::0403:

00:1f.3 Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
        DeviceName: Onboard - Sound
        Subsystem: Hewlett-Packard Company Device [103c:84ee]
        Kernel driver in use: sof-audio-pci-intel-cnl
        Kernel modules: snd_soc_avs, snd_sof_pci_intel_cnl, snd_hda_intel

cat /proc/asound/cards:

0 [sofhdadsp      ]: sof-hda-dsp - sof-hda-dsp
                      HP-HPPavilionAll_in_One27_xa0xxx--84EE

dmesg | grep snd:

[    6.453497] snd_hda_codec_alc269 ehdaudio0D0: ALC225: picked fixup  for PCI SSID 103c:0000
[    6.456368] snd_hda_codec_alc269 ehdaudio0D0: autoconfig for ALC225: line_outs=1 (0x1b/0x0/0x0/0x0/0x0) type:speaker
[    6.456373] snd_hda_codec_alc269 ehdaudio0D0:    speaker_outs=0 (0x0/0x0/0x0/0x0/0x0)
[    6.456376] snd_hda_codec_alc269 ehdaudio0D0:    hp_outs=1 (0x21/0x0/0x0/0x0/0x0)
[    6.456378] snd_hda_codec_alc269 ehdaudio0D0:    mono: mono_out=0x0
[    6.456379] snd_hda_codec_alc269 ehdaudio0D0:    inputs:
[    6.456381] snd_hda_codec_alc269 ehdaudio0D0:      Internal Mic=0x12
[    6.456383] snd_hda_codec_alc269 ehdaudio0D0:      Mic=0x19

Does anyone have any advice for me on where or what else I can look for to track down the fault?

Thanks …

Translated with deepL

Are the packages sof-firmware and sof-tools installed? Did you try to switch between different audio profiles? Can you please post pactl list cards?

1 Like

Overview of Intel hardware platforms — SOF Project 2.11.0 documentation

SOF is available on Intel PCI devices starting with Gemini Lake, and has since been the only solution provided by Intel for the following platforms: Comet Lake, Ice Lake, and Tiger Lake.

Since multiple drivers can register for the same PCI ID, it was (until recently) common for users and distributions to use the wrong driver, which could only be resolved by changing the Linux .config file or deselecting drivers in the /etc/modprobe.d configuration files.

The snd-intel-dspcfg module introduced in early 2020 exposes an API used by all drivers, and the user can now override default choices by setting the dsp_driver parameter.
For example, setting options snd-intel-dspcfg dsp_driver=1 will allow for the HDaudio legacy driver to be used.
This will typically work for speakers and headphones/headsets, but will not allow DMIC capture.

To create the modprobe option file:

sudo tee /etc/modprobe.d/alsa-sof.conf <<< 'options snd-intel-dspcfg dsp_driver=1'

and reboot system to reload ALSA modules

2 Likes
Card #52
        Name: alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic
        Driver: alsa
        Owner Module: n/a
        Properties:
                device.enum.api = "udev"
                device.api = "alsa"
                media.class = "Audio/Device"
                api.alsa.path = "hw:0"
                api.alsa.card = "0"
                api.alsa.card.name = "sof-hda-dsp"
                api.alsa.card.longname = "HP-HPPavilionAll_in_One27_xa0xxx--84EE"
                device.plugged.usec = "7150537"
                device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
                device.bus = "pci"
                device.subsystem = "sound"
                device.vendor.id = "0x8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "0xa348"
                device.product.name = "Cannon Lake PCH cAVS"
                device.name = "alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic"
                device.description = "Cannon Lake PCH cAVS"
                device.nick = "sof-hda-dsp"
                device.icon_name = "audio-card-analog-pci"
                api.alsa.use-acp = "true"
                api.acp.auto-profile = "false"
                api.acp.auto-port = "false"
                api.dbus.ReserveDevice1.Priority = "-20"
                api.alsa.split-enable = "true"
                api.dbus.ReserveDevice1 = "Audio0"
                spa.object.id = "2"
                factory.id = "15"
                client.id = "46"
                object.id = "51"
                object.serial = "52"
                object.path = "alsa:acp:sofhdadsp"
                alsa.card = "0"
                alsa.card_name = "sof-hda-dsp"
                alsa.long_card_name = "HP-HPPavilionAll_in_One27_xa0xxx--84EE"
                alsa.driver_name = "snd_soc_skl_hda_dsp"
                alsa.mixer_name = "Realtek ALC225"
                alsa.components = "HDA:8086280b,80860101,00100000 HDA:10ec0225,103c84ee,00100002"
                alsa.id = "sofhdadsp"
                device.string = "0"
        Profiles:
                off: Aus (sinks: 0, sources: 0, priority: 0, available: yes)
                HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1): Play HiFi quality Music (HDMI1, HDMI2, HDMI3, Headphones, Mic1) (sinks: 4, sources: 1, priority: 10200, available: no)
                HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker): Play HiFi quality Music (HDMI1, HDMI2, HDMI3, Mic1, Speaker) (sinks: 4, sources: 1, priority: 10100, available: yes)
                pro-audio: Pro Audio (sinks: 5, sources: 1, priority: 1, available: yes)
        Active Profile: HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker)
        Ports:
                [Out] HDMI3: HDMI / DisplayPort 3 Output (type: HDMI, priority: 700, latency offset: 0 usec, availability group: HDMI/DP,pcm=5, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "HDMI/DP,pcm=5"
                                device.icon_name = "video-display"
                                card.profile.port = "0"
                        Part of profile(s): HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker), HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1)
                [Out] HDMI2: HDMI / DisplayPort 2 Output (type: HDMI, priority: 600, latency offset: 0 usec, availability group: HDMI/DP,pcm=4, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "HDMI/DP,pcm=4"
                                device.icon_name = "video-display"
                                card.profile.port = "1"
                        Part of profile(s): HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker), HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1)
                [Out] HDMI1: HDMI / DisplayPort 1 Output (type: HDMI, priority: 500, latency offset: 0 usec, availability group: HDMI/DP,pcm=3, not available)
                        Properties:
                                port.type = "hdmi"
                                port.availability-group = "HDMI/DP,pcm=3"
                                device.icon_name = "video-display"
                                card.profile.port = "2"
                        Part of profile(s): HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker), HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1)
                [Out] Speaker: Speaker (type: Speaker, priority: 100, latency offset: 0 usec, availability unknown)
                        Properties:
                                port.type = "speaker"
                                device.icon_name = "audio-speakers"
                                card.profile.port = "3"
                        Part of profile(s): HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker)
                [In] Mic1: Stereo Microphone (type: Mic, priority: 200, latency offset: 0 usec, availability group: Mic, not available)
                        Properties:
                                port.type = "mic"
                                port.availability-group = "Mic"
                                device.icon_name = "audio-input-microphone"
                                card.profile.port = "4"
                        Part of profile(s): HiFi (HDMI1, HDMI2, HDMI3, Mic1, Speaker), HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1)
                [Out] Headphones: Headphones (type: Headphones, priority: 200, latency offset: 0 usec, availability group: Front Headphone, not available)
                        Properties:
                                port.type = "headphones"
                                port.availability-group = "Front Headphone"
                                device.icon_name = "audio-headphones"
                                card.profile.port = "5"
                        Part of profile(s): HiFi (HDMI1, HDMI2, HDMI3, Headphones, Mic1)

Sorry, both are installed.

Mod edit: Consecutive posts merged to keep things tidy. :wink:

No need to be sorry. Did you see nikgnomic’s post HP 27 AIO – The speakers only produce a crackling sound - #3 by nikgnomic Perhaps setting to the legacy driver helps?

No, I’ve come across that solution a few times online and tried out various settings, but none of them worked for me.

I’ve found the solution.
I found a description of the problem here.
https://askubuntu.com/questions/1200906/sound-ubuntu-linux-19-10-on-hp-pavilion-aio-not-working

The error occurs after booting up. After a suspend, the audio output works. :thinking: I had it work once, but I didn’t understand why. Because I’d been in suspend mode beforehand. Who would think of that :facepalm:?

Unlike the solution here, https://askubuntu.com/a/1226379, I had to add
blacklist snd_hda_codec_alc269
to modprobe.d/sound.conf. Blacklisting the “snd_hda_codec_realtek” driver wasn’t working for me.
The driver was also listed under
sudo lsmod | grep -i snd.

Solution
Open:

sudo nano /etc/modprobe.d/sound.conf

Add:

#fix for hp-pavilion aio 27 xa0000ng
blacklist snd_hda_codec_alc269

Save and reboot. The anoying crackling is gone and sound works after booting up.
Thanks for your help!


Translated with DeepL (free version)

Mod edit: Consecutive posts merged to keep things tidy. :wink:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.