Sound driver and firmware problems when using flake

Hello everyone.

Context:

I am using a Lenovo Yoga 9 14IAP7.

This computer has several speakers. By default, the drivers detect only the smallest speakers. The fix I have found that works for all distros using ALSA firmware is here.

By adding this line options snd-sof-intel-hda-common hda_model=alc287-yoga9-bass-spk-pin to the /etc/modprobe.d/snd.conf and installing the alsa-firmware package, the speakers work just fine using default channels (newbie setup)

Problem:

After switching to Flake, I found that it stopped working and switching back did not help.

I do not remember the post nor the command, but after running it, I figured out that the sound card was not detected. Adding this configuration helped to detect sound card:

lines options snd-intel-dspcfg dsp_driver=1
file /etc/modprobe.d/snd.conf

It helped to detect the sound card (and it still does), but by using the legacy driver, the alsa-firmware fix does not work.

I googled snd-intel-dspcfg.dsp_driver=1 and found out that there is also an option 3. After adding it to the configuration, switching, and rebooting, everything worked.

After the next reboot, the sound card was once again not detected. It is hard for me to spot where the problem is as creating a new version should make it fully repeatable.

After changing between options 1 and 3, I somehow managed to get it working again, but after rebooting, it still went into dummy output mode (no sound card detected).

P.S. I also tried to add the packages:

alsa-firmware
sof-firmware

And the option: hardware.enableAllFirmware = true; with no success.

The whole configuration I currently use can be found here: GitHub - skyferix/nixos-config

Any help or suggestions would be greatly appreciated. Thank you!

Looked up posts:

1 Like