Closed ErikEngerd closed 1 year ago
The alsa info for the case where legacy audio is enabled (dsp_driver=1) and without dmic is as follows. alsa-info.legacy.txt
With legacy HD audio disabled:
options snd-hda-intel patch=alc294-sound-patch.fw
#options snd-intel-dspcfg dsp_driver=1
#options snd-hda-intel model=laptop-dmic
then the alsa-info is a follows:
It seems like I am really close to getting a fully working sound setup. Is there a way to get a permanent fix for this in sof, or is there perhaps another workaround I can use to get audio fully working? What additional information do you require?
@ErikEngerd what is the problem if you enable SOF and keep the "options snd-hda-intel patch=alc294-sound-patch.fw"
In theory there's no correlation between SOF and snd-hda-intel, we use the snd-hda-intel driver but don't control its internal behavior.
This is one of the cases above. Doublechecked it again and I still have no sound. Also, recording from the usb mic works then.
Humm, this looks like a known issue/enhancement needed https://github.com/thesofproject/linux/issues/2714. @kv2019i FYI.
Thanks for your quick response. I didn't know patch support was only there for the legacy HD audio. At least that will save me a lot of trying with sof to get it working.
Is there perhaps also a way to have this issue looked at for incorporation into the snd-hda-intel driver? If so, where should I report this issue?
Meanwhile, I have ordered a mini USB mic to use until the built-in mic will be working. Tested USB mic support with another USB mic already and that was working.
The fastest way to solve this across the board might be to add the configuration needed with a quirk, see e.g. in sound/pci/hda/patch_realtek.c
You might need to add you own quirk, similar to e.g.
SND_PCI_QUIRK(0x1043, 0x12ff, "ASUS G751", ALC668_FIXUP_ASUS_G751),
@ErikEngerd see tentative code in https://github.com/thesofproject/linux/pull/4177, completely untested or even possibly correct, just based on existing code and the values you provided above.
thanks for the patch. I am a bit confused though since the codec is Alc294 I believe and not ALC 269. Also, I am wondering how to use the quirk based on the code. What module option to use?
I am also not a kernel developer but definitely a sw developer (with my origins in c, c++ back in the day). Also I have compiled drivers and complete kernels in the past so I would like to test the code myself.
aha, as I understand now the quirk becomes active automatically based on subsystem and vendor id, am I right?
yes, the quirk would only be applied for your specific system indeed, with PCI information used.
You are right that it's an ALC294 but this codec goes by multiple codes.
/* different alc269-variants */
enum {
ALC269_TYPE_ALC269VA,
ALC269_TYPE_ALC269VB,
ALC269_TYPE_ALC269VC,
ALC269_TYPE_ALC269VD,
ALC269_TYPE_ALC280,
ALC269_TYPE_ALC282,
ALC269_TYPE_ALC283,
ALC269_TYPE_ALC284,
ALC269_TYPE_ALC293,
ALC269_TYPE_ALC286,
ALC269_TYPE_ALC298,
ALC269_TYPE_ALC255,
ALC269_TYPE_ALC256,
ALC269_TYPE_ALC257,
ALC269_TYPE_ALC215,
ALC269_TYPE_ALC225,
ALC269_TYPE_ALC245,
ALC269_TYPE_ALC287,
ALC269_TYPE_ALC294,
ALC269_TYPE_ALC300,
ALC269_TYPE_ALC623,
ALC269_TYPE_ALC700,
};
We have instructions if you want to try installing your own kernel, see here: https://thesofproject.github.io/latest/getting_started/setup_linux/install_locally.html
@plbossart @ErikEngerd Right, "patch" support is only in snd-hda-intel -> https://github.com/thesofproject/linux/issues/2714 snd-hda-intel provides more debugging interfaces to customize codec setup (without changing kernel code). So the approach has been to use snd-hda-intel to debug the codec, and then when suitable settings have been found, add them as quirks to the codec driver, so SOF can benefit from the quirks as well.
Now that everything is working I have done a small write-up of the essential steps to go from problem to solution. Thanks a lot for all your help!
@ErikEngerd this is great, I had no idea about the Asus page https://asus-linux.org/blog/sound-2021-01-11/ Wow.
can this be closed now, since a patch was accepted?
With default settings, I have no sound on this laptop. There is also no sound with the legacy HD audio driver. The digital microphone works though.
However, I followed these instructions from here to create a firmware file. With this firmware file, the legacy HD audio driver works but of course I have no dmic support. There is still no sound through the speakers and headphone with sof.
The firmware patch file is as follows:
The firmware file is essential, if I leave out the verbs for instance it doesn't work anymore.