summary
This is all the configuration required, on Linux 6.0.0-6-amd64 on an hp Z240 SFF PC. Put these lines in /etc/modprobe.d/snd_hda_intel.conf
and reboot.
# /etc/modprobe.d/snd_hda_intel.conf
options snd_hda_intel model=alc221-hp-mic
options snd_hda_intel power_save=0options snd_hda_intel power_save_controller=N
options snd_hda_intel enable_msi=1
problems
With enable_msi
set to 0 (the default), while happily playing sound for a random indeterminate period of time, the sound system would lose grip and leave me with nothing but buzzing in the headphones, and only a reboot would return things to normal. Sometimes, unloading and reloading the sound modules did the trick, but often things would be stuck waiting for the hardware to return to normal, which it had no intention of doing. Enabling Message Signalled Interrupts avoids this problem.
power-saving mode
Sometimes the sound will play for a fraction of a second, and then immediately change to static noise on the headphones. The fact that this happens at the start of playback, presumably just after the sound hardware has been brought out of power-saving mode, points towards disabling power-saving to be the way forwards. There are two parameters related to power, and they are both recommended, even though they will not be applicable to all hardware.
options snd_hda_intel power_save=0
options snd_hda_intel power_save_controller=N
references
- https://www.kernel.org/doc/html/v6.0/sound/hd-audio/notes.html
- https://docs.kernel.org/sound/hd-audio/models.html?highlight=alc221+hp+mic
- https://en.wikipedia.org/wiki/Message_Signaled_Interrupts
- https://www.intel.co.uk/content/www/uk/en/standards/high-definition-audio-specification.html
- https://www.intel.com/content/dam/www/public/us/en/documents/product-specifications/high-definition-audio-specification.pdf
Hello, thanks for the post, I have the same workstation in the MT form factor, but they seem to have the same on-board audio chip. Could you get the combo headset jack on the front to work? With your configuration, it seems to be detected as a mic jack, but the techdet for Z240 on HP’s website specifies that the jack can be used for a combo headset.
Hello, sorry for the appallingly slow reply. I’ve been unable to get it working as a combo headset jack. After much messing around and complaints from people that the audio wasn’t very good at the other end, I finally relented and bought a “DuKabel” USB soundwidget from Amazon for 11.99 GBP and it’s been great!
I was hoping that HP would have installed a better quality of sound chip, but alas.