Skip to contentSkip to conversation

ALSA: hda/tas2781: Fix index issue in tas2781 hda SPI driver

PATCH In review Baojun Xu 2 participants 2 messages Feb 14, 2025 Sound

lore
Share & tools
lore

Baojun Xu

author
#0 lore raw

PATCH 1/1 ALSA: hda/tas2781: Fix index issue in tas2781 hda SPI driver

Correct wrong mask for device index.

---
 sound/pci/hda/tas2781_spi_fwlib.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
sound/pci/hda/tas2781_spi_fwlib.c +5 -5
index 0e2acbc3c900..131d9a77d140 100644
@@ -2,7 +2,7 @@
 //
 // TAS2781 HDA SPI driver
 //
-// Copyright 2024 Texas Instruments, Inc.
+// Copyright 2024-2025 Texas Instruments, Inc.
 //
 // Author: Baojun Xu <[email protected]>
 
@@ -771,19 +771,19 @@ static int tasdevice_process_block(void *context, unsigned char *data,
 	switch (subblk_typ) {
 	case TASDEVICE_CMD_SING_W:
 		subblk_offset = tasdevice_single_byte_wr(tas_priv,
-			dev_idx & 0x4f, data, sublocksize);
+			dev_idx & 0x3f, data, sublocksize);
 		break;
 	case TASDEVICE_CMD_BURST:
 		subblk_offset = tasdevice_burst_wr(tas_priv,
-			dev_idx & 0x4f, data, sublocksize);
+			dev_idx & 0x3f, data, sublocksize);
 		break;
 	case TASDEVICE_CMD_DELAY:
 		subblk_offset = tasdevice_delay(tas_priv,
-			dev_idx & 0x4f, data, sublocksize);
+			dev_idx & 0x3f, data, sublocksize);
 		break;
 	case TASDEVICE_CMD_FIELD_W:
 		subblk_offset = tasdevice_field_wr(tas_priv,
-			dev_idx & 0x4f, data, sublocksize);
+			dev_idx & 0x3f, data, sublocksize);
 		break;
 	default:
 		subblk_offset = 2;
Signature · 1 line
2.34.1
#1 lore raw
Quoted 4 lines · Baojun Xu

Correct wrong mask for device index.

Applied now with Fixes tag to commit bb5f86ea50ff ("ALSA: hda/tas2781:
Add tas2781 hda SPI driver").

Please put the proper Fix tag at the next time.

thanks,

Takashi