ALSA: hda/tas2781: Add tas2781 hda SPI driver
authorBaojun Xu <baojun.xu@ti.com>
Mon, 16 Dec 2024 12:20:08 +0000 (20:20 +0800)
committerTakashi Iwai <tiwai@suse.de>
Fri, 17 Jan 2025 10:08:43 +0000 (11:08 +0100)
commitbb5f86ea50ffb292f42eb1ebdb99991d5c5ac3ba
treea30e5d3634e3b6709b8484ba90897be7ea0129f8
parentd466887a9478780807290fec467d70143f3ab6d2
ALSA: hda/tas2781: Add tas2781 hda SPI driver

This patch was used to add TAS2781 devices on SPI support in sound/pci/hda.
It use ACPI node descript about parameters of TAS2781 on SPI, it like:
    Scope (_SB.PC00.SPI0)
    {
        Device (GSPK)
        {
            Name (_HID, "TXNW2781")  // _HID: Hardware ID
            Method (_CRS, 0, NotSerialized)
            {
                Name (RBUF, ResourceTemplate ()
                {
                    SpiSerialBusV2 (...)
                    SpiSerialBusV2 (...)
                }
            }
        }
    }

And in platform/x86/serial-multi-instantiate.c, those spi devices will be
added into system as a single SPI device, so TAS2781 SPI driver will
probe twice for every single SPI device. And driver will also parser
mono DSP firmware binary and RCA binary for itself.
The code support Realtek as the primary codec.
In patch version-10, add multi devices firmware binary support,
to compatble with windows driver, they can share same firmware binary.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20241216122008.15425-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
drivers/acpi/scan.c
drivers/platform/x86/serial-multi-instantiate.c
sound/pci/hda/Kconfig
sound/pci/hda/Makefile
sound/pci/hda/patch_realtek.c
sound/pci/hda/tas2781-spi.h [new file with mode: 0644]
sound/pci/hda/tas2781_hda_spi.c [new file with mode: 0644]
sound/pci/hda/tas2781_spi_fwlib.c [new file with mode: 0644]