Dear community,
Hope all is well on your end
I have recently bought a laptop from Lenovo ( Legion gen8 16IRX8H ) , that does not have sound support among Linux users.
Thanks to the I2C, I believe I have located a piece of equipment that is manufactured by Texas Instrument:
/sys/bus/i2c/devices/i2c-TIAS2781\:00/
This smart amplifier is a TAS2781 which already have support for the Alsa SoC https://git.ti.com/cgit/tas2781-linux-drivers/tas2781-linux-driver/ , but and ca't be useful on a Linux x86/x86_64.
The tas2781s is connected with a Realtek (ALC287) codec in this laptop. The Lenovo BIOS, unfortunately, doesn't contain the proper information to make the Realtek codec to communicate with the AMP chip (it misses of init verbs table), so a substantial rework of the Realtek driver is needed.
As I understood, there is a file called patch_realtek.c in the current Linux kernel source, specifically in sound/pci/hda/patch_realtek.c . This file has a fixup with snd_pci_quirk for the motherboard to fix the speakers of many laptops/desktops. For instance, a line that includes a patch for a specific laptop that use the CIRRUS AMP looks like this:
SND_PCI_QUIRK(0x17aa, 0x3874, "Legion 7 16IAX7", ALC287_FIXUP_CS35L41_I2C_2),
I took the (0x17aa, 0x3884) that matches my alsa-info http://alsa-project.org/db/?f=ed0116e9d7235fd5cbece5dccaa589ecad71f534 and the DSDT table (that can be found here https://bugzilla.kernel.org/attachment.cgi?id=303959) and its extract is the following:
{
Device (SPKR)
{
Name (_HID, "TIAS2781") // _HID: Hardware ID
Name (_UID, Zero) // _UID: Unique ID
Method (_SUB, 0, NotSerialized) // _SUB: Subsystem ID
{
If ((SPID == Zero))
{
Return ("17AA3886")
}
If ((SPID == One))
{
Return ("17AA3884")
}
}