diff mbox series

[v2,4/4] ALSA: hda/tas2781: Support dsp firmware Alpha and Beta seaies

Message ID 20250219061057.714-4-shenghao-ding@ti.com (mailing list archive)
State New
Headers show
Series [v2,1/4] ASoC: tas2781: Support dsp firmware Alpha and Beta seaies | expand

Commit Message

Shenghao Ding Feb. 19, 2025, 6:10 a.m. UTC
For calibration, basic version does not contain any calibration addresses,
it depends on calibration tool to convery the addresses to the driver.
Since Alpha and Beta firmware, all the calibration addresses are saved
into the firmware. In order to fallback the BASIC or older version, code
was added an extra branch to handle Alpha and Beta version.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>

---
v2:
 - | Reported-by: kernel test robot <lkp@intel.com>
   | Closes:
   | https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/2025
   | 02160812.P7szOygN-lkp@intel.com/__;!!G3vK!WriwhtbQGlg6p00bcWutlhb-y9vS
   | pDrSu5_g9oOzzGOoABdirEARTntFzyX6Ss3UPRDxi_E-IA$
 - | Reported-by: kernel test robot <lkp@intel.com>
   | Closes:
   | https://urldefense.com/v3/__https://lore.kernel.org/oe-kbuild-all/2025
   | 02160632.u0zxG7yD-lkp@intel.com/__;!!G3vK!VtEdfur3fZklvPVfHFFfFP60Ub2E
   | JYvmjSUZ65lJ6BsQPJDl1fjYRDqh3c6Q5y6sA70ssXDG5g$
---
 sound/pci/hda/tas2781_spi_fwlib.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/pci/hda/tas2781_spi_fwlib.c b/sound/pci/hda/tas2781_spi_fwlib.c
index 131d9a77d140..c90641119509 100644
--- a/sound/pci/hda/tas2781_spi_fwlib.c
+++ b/sound/pci/hda/tas2781_spi_fwlib.c
@@ -370,10 +370,10 @@  static unsigned char map_dev_idx(struct tasdevice_fw *tas_fmw,
 	int i, n = ARRAY_SIZE(non_ppc3_mapping_table);
 	unsigned char dev_idx = 0;
 
-	if (fw_fixed_hdr->ppcver >= PPC3_VERSION_TAS2781) {
+	if (fw_fixed_hdr->ppcver >= PPC3_VERSION_TAS2781_BASIC_MIN) {
 		p = (struct blktyp_devidx_map *)ppc3_tas2781_mapping_table;
 		n = ARRAY_SIZE(ppc3_tas2781_mapping_table);
-	} else if (fw_fixed_hdr->ppcver >= PPC3_VERSION) {
+	} else if (fw_fixed_hdr->ppcver >= PPC3_VERSION_BASE) {
 		p = (struct blktyp_devidx_map *)ppc3_mapping_table;
 		n = ARRAY_SIZE(ppc3_mapping_table);
 	}
@@ -1605,7 +1605,7 @@  static int dspfw_default_callback(struct tasdevice_priv *tas_priv,
 	int rc = 0;
 
 	if (drv_ver == 0x100) {
-		if (ppcver >= PPC3_VERSION) {
+		if (ppcver >= PPC3_VERSION_BASE) {
 			tas_priv->fw_parse_variable_header =
 				fw_parse_variable_header_kernel;
 			tas_priv->fw_parse_program_data =