Re: [PATCH v7 1/1] ALSA: hda/tas2781: Add tas2781 hda driver based on SPI

From: Takashi Iwai
Date: Thu Jun 13 2024 - 08:36:21 EST


On Thu, 13 Jun 2024 10:26:33 +0200,
Baojun Xu wrote:
> --- a/sound/pci/hda/Makefile
> +++ b/sound/pci/hda/Makefile
> @@ -70,6 +70,8 @@ obj-$(CONFIG_SND_HDA_SCODEC_CS35L56_SPI) += snd-hda-scodec-cs35l56-spi.o
> obj-$(CONFIG_SND_HDA_CS_DSP_CONTROLS) += snd-hda-cs-dsp-ctls.o
> obj-$(CONFIG_SND_HDA_SCODEC_COMPONENT) += snd-hda-scodec-component.o
> obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_I2C) += snd-hda-scodec-tas2781-i2c.o
> +obj-$(CONFIG_SND_HDA_SCODEC_TAS2781_SPI) += snd-hda-scodec-tas2781-spi.o
> +snd-hda-scodec-tas2781-spi-y := tas2781_hda_spi.o tas2781_spi_fwlib.o

Try to put *-y addition to the right place. There are the section
defining snd-hda-codec-*-y.

> +#define TASDEVICE_REG(book, page, reg) (((book & GENMASK(7, 0)) << 16) + \
> + ((page & GENMASK(7, 0)) << 8) + \
> + ((reg & GENMASK(6, 0)) << 1))

Usually bits are combined with '|', not '+'.

> +/* Firmware block Checksum */
> +#define TASDEVICE_Checksum TASDEVICE_REG(0x0, 0x0, 0x7e)

Use capital letters.


... and at this point, I noticed that the patch doesn't contain the
code for sound/pci/hda/tas2781_spi_fwlib.c at all. The patch must be
utterly broken.

*PLEASE* try to apply and build the patch to submit beforehand from
the clean state and verify it really works.


thanks,

Takashi